'batchitem' => _ADM_SKPRT_BATCHITEM,
'batchmember' => _ADM_SKPRT_BATCHMEMBER,
'batchmove' => _ADM_SKPRT_BATCHMOVE,
+ 'batchmovecat' => _ADM_SKPRT_BATCHMOVECAT,
'batchteam' => _ADM_SKPRT_BATCHTEAM,
'blogcommentlist' => _ADM_SKPRT_BLOGCOMMENTLIST,
'blogselectbox' => _ADM_SKPRT_BLOGSELECTBOX,
switch ( $type )
{
case 'title':
- echo TEMPLATE::fill($title, $aVars);
+ echo Template::fill($title, $aVars);
break;
case 'text':
- echo TEMPLATE::fill($text, $aVars);
+ echo Template::fill($text, $aVars);
break;
case 'ackey':
echo Entity::hsc($key);
$template = ob_get_contents();
ob_end_clean();
- echo TEMPLATE::fill($template, $data);
+ echo Template::fill($template, $data);
return;
}
}
'blogname' => Entity::hsc($blog->getName())
);
- echo TEMPLATE::fill($template, $data);
+ echo Template::fill($template, $data);
return;
}
'expname' => Entity::hsc($skinObj->sdname),
'expdesc' => Entity::hsc($skinObj->sddesc),
);
- echo TEMPLATE::fill($template, $data);
+ echo Template::fill($template, $data);
}
break;
case 'template':
'expname' => Entity::hsc($templateObj->tdname),
'expdesc' => Entity::hsc($templateObj->tddesc),
);
- echo TEMPLATE::fill($template, $data);
+ echo Template::fill($template, $data);
}
break;
}
$template['content'] = 'adminskinlist';
$template['tabindex'] = 10;
- $template['friendly_names'] = Skin::getAvailableTypes();
+ $template['friendly_names'] = $this->skin->getAvailableTypes();
Showlist($query, 'table', $template, $templateName);
return;
}
$templates = Template::read($templateName);
}
- $nType = Skin::getFriendlyNames('AdminActions');
+ $nType = $this->skin->getAvailableTypes();
$skinid = intRequestVar('skinid');
$query = "SELECT stype FROM %s WHERE stype NOT IN (%s) AND sdesc=%d;";
{
$template['head'] = "<ul>\n";
}
- echo TEMPLATE::fill($template['head'], $data);
+ echo Template::fill($template['head'], $data);
if ( array_key_exists('ADMIN_SPECIALSKINLIST_BODY', $templates) && !empty($templates['ADMIN_SPECIALSKINLIST_BODY']) )
{
'skinid' => $skinid,
'skintype' => Entity::hsc(strtolower($row['stype']))
);
- echo TEMPLATE::fill($template['body'], $data);
+ echo Template::fill($template['body'], $data);
}
$data = array();
{
$template['foot'] = "</ul>\n";
}
- echo TEMPLATE::fill($template['foot'], $data);
+ echo Template::fill($template['foot'], $data);
}
return;
}
{
global $DIR_ADMINSKINS;
$skinType = strtolower(trim(requestVar('type')));
- $actions = Skin::getAllowedActionsForType($skinType);
+ $actions = $this->skin->getAllowedActionsForType($skinType);
sort($actions);
while ( $current = array_shift($actions) )
public function parse_allowedskinactions()
{
$skinType = strtolower(trim(requestVar('type')));
- $actions = SKIN::getAllowedActionsForType($skinType);
+ $skinid = intRequestVar('skinid');
+ $skin = new Skin($skinid);
+ $actions = $skin->getAllowedActionsForType($skinType);
sort($actions);
while ( $current = array_shift($actions) )
$data = array(
Entity::hsc($blog->getName())
);
- TEMPLATE::fill($template, $data);
+ Template::fill($template, $data);
}
return;
}
$templates = Template::read($templateName);
}
- $types = Skin::getFriendlyNames('AdminActions');
+ $types = $this->skin->getAvailableTypes();
ksort($types);
if ( array_key_exists('ADMINSKINTYPELIST_HEAD', $templates) && !empty($templates['ADMINSKINTYPELIST_HEAD']) )
public function parse_editadminskintype($type = 'id')
{
global $CONF, $manager, $member;
- $skinid = intRequestVar('skinid');
- $skin = new Skin($skinid);
- $fNames = Skin::getFriendlyNames();
+// $skinid = intRequestVar('skinid');
+// $skin = new Skin($skinid);
+ $fNames = $this->skin->getAvailableTypes();
$sType = strtolower(trim(requestVar('type')));
switch ( $type )
echo intRequestVar('skinid');
break;
case 'name':
- echo Entity::hsc($skin->getName());
+ echo Entity::hsc($this->skin->getName());
break;
case 'desc':
- echo Entity::hsc($skin->getDescription());
+ echo Entity::hsc($this->skin->getDescription());
break;
case 'type':
- echo Entity::hsc($skin->getContentType());
+ echo Entity::hsc($this->skin->getContentType());
break;
case 'content':
- echo Entity::hsc($skin->getContent($sType));
+ echo Entity::hsc($this->skin->getContentFromDB($sType));
break;
case 'skintype':
$skinType = !array_key_exists($sType, $fNames) ? ucfirst($sType) : $fNames[$sType];
echo Entity::hsc($sType);
break;
case 'prefix':
- echo Entity::hsc($skin->getIncludePrefix());
+ echo Entity::hsc($this->skin->getIncludePrefix());
break;
case 'mode':
$incMode = $skin->getIncludeMode() ? _PARSER_INCMODE_SKINDIR : _PARSER_INCMODE_NORMAL;
$data = array(
'explugtplname' => Entity::hsc($pfkey)
);
- echo TEMPLATE::fill($base, $data);
+ echo Template::fill($base, $data);
foreach ( $pfvalue as $pffield => $pfdesc )
{
$this->_templateEditRow($template, $pfdesc, $pffield, '', ++$tabidx, 0, $name);
global $CONF, $manager, $member;
$skinid = intRequestVar('skinid');
$skin = new SKIN($skinid);
- $fNames = SKIN::getFriendlyNames('Actions');
+ $fNames = $skin->getAvailableTypes();
$sType = strtolower(trim(requestVar('type')));
switch ( $type )
echo Entity::hsc($skin->getContentType());
break;
case 'content':
- echo Entity::hsc($skin->getContent($sType));
+ echo Entity::hsc($skin->getContentFromDB($sType));
break;
case 'skintype':
$skinType = !array_key_exists($sType, $fNames) ? ucfirst($sType) : $fNames[$sType];
{
global $manager;
$templateid = intRequestVar('templateid');
- $templatename = TEMPLATE::getNameFromId($templateid);
- $templatedescription = TEMPLATE::getDesc($templateid);
+ $templatename = Template::getNameFromId($templateid);
+ $templatedescription = Template::getDesc($templateid);
$template =& $manager->getTemplate($templatename);
switch ( $type )
{
$data = array(
'explugtplname' => Entity::hsc($pfkey)
);
- echo TEMPLATE::fill($base, $data);
+ echo Template::fill($base, $data);
foreach ( $pfvalue as $pffield => $pfdesc )
{
$this->_templateEditRow($template, $pfdesc, $pffield, '', ++$tabidx, 0, $name);
'plugadmintooltip' => Entity::hsc($aInfo['tooltip']),
'plugadmintitle' => Entity::hsc($aInfo['title']),
);
- echo TEMPLATE::fill($template['body'], $data);
+ echo Template::fill($template['body'], $data);
}
if ( array_key_exists('PLUGIN_QUICKMENU_FOOT', $templates) || !empty($templates['PLUGIN_QUICKMENU_FOOT']) )
{
Showlist($query, 'table', $show, $templateName);
break;
case 'template':
- $query = "SELECT tdname as name, tddesc as description WHERE tdname NOT LIKE 'admin/%%' FROM %s";
+ $query = "SELECT tdname as name, tddesc as description FROM %s WHERE tdname NOT LIKE 'admin/%%'";
$show = array(
'content' => 'shortnames'
);
'expname' => Entity::hsc($skinObj->sdname),
'expdesc' => Entity::hsc($skinObj->sddesc),
);
- echo TEMPLATE::fill($template, $data);
+ echo Template::fill($template, $data);
}
break;
case 'template':
'expname' => Entity::hsc($templateObj->tdname),
'expdesc' => Entity::hsc($templateObj->tddesc),
);
- echo TEMPLATE::fill($template, $data);
+ echo Template::fill($template, $data);
}
break;
}
public function parse_skinoverview($templateName = '')
{
global $CONF;
- $query = "SELECT * FROM %s ORDER BY sdname";
+ $query = "SELECT * FROM %s WHERE sdincmode != 'admin' ORDER BY sdname";
$query = sprintf($query, sql_table('skin_desc'));
$template['content'] = 'skinlist';
{
$template['head'] = "<ul>\n";
}
- echo TEMPLATE::fill($template['head'], $data);
+ echo Template::fill($template['head'], $data);
if ( array_key_exists('SPECIALSKINLIST_BODY', $templates) && !empty($templates['SPECIALSKINLIST_BODY']) )
{
$template['body'] = $templates['SPECIALSKINLIST_BODY'];
'skinid' => $skinid,
'skintype' => Entity::hsc(strtolower($row['stype']))
);
- echo TEMPLATE::fill($template['body'], $data);
+ echo Template::fill($template['body'], $data);
}
$data = array();
if (array_key_exists('SPECIALSKINLIST_FOOT', $templates) && !empty($templates['SPECIALSKINLIST_FOOT']) )
{
$template['foot'] = "</ul>\n";
}
- echo TEMPLATE::fill($template['foot'], $data);
+ echo Template::fill($template['foot'], $data);
return;
}
}
'key' => $key,
'value' => $value,
);
- echo TEMPLATE::fill($template, $data);
+ echo Template::fill($template, $data);
}
break;
case 'modrewrite':
{
$templates = array();
if ($tplName) {
- $templates = skinableTEMPLATE::read($tplName);
+ $templates = Template::read($tplName);
}
if (isset($templates['ADMIN_CUSTOMHELPLINK_ANCHOR']) && !empty($templates['ADMIN_CUSTOMHELPLINK_ANCHOR'])) {
$template = $templates['ADMIN_CUSTOMHELPLINK_ANCHOR'];
'onclick' => $onclick,
'title' => (isset($title) && !empty($title)) ? $title : _HELP_TT,
);
- return TEMPLATE::fill($template, $data);
+ return Template::fill($template, $data);
}
/**
'alt' => (isset($alt) && !empty($alt)) ? $alt : _HELP_TT,
'title' => (isset($title) && !empty($title)) ? $title : _HELP_TT,
);
- $icon = TEMPLATE::fill($template, $data);
+ $icon = Template::fill($template, $data);
$help = self::customHelplink($id, $tplName, $url, $title, $onclick);
return $help . $icon;
}
}
else
{
- echo TEMPLATE::fill($template, $dat);
+ echo Template::fill($template, $dat);
}
return;
}
\r
\r
// can take either an array of objects, or an SQL query\r
-function showlist($query, $type, $template, $templateName = '')\r
+function showlist($query, $type, $vars, $templateName = '')\r
{\r
if ( is_array($query) )\r
{\r
return 0;\r
}\r
\r
- call_user_func("listplug_{$type}", $template, 'HEAD', $templateName);\r
+ call_user_func("listplug_{$type}", $vars, 'HEAD', $templateName);\r
\r
foreach ( $query as $currentObj )\r
{\r
- $template['current'] = $currentObj;\r
- call_user_func("listplug_{$type}", $template, 'BODY', $templateName);\r
+ $vars['current'] = $currentObj;\r
+ call_user_func("listplug_{$type}", $vars, 'BODY', $templateName);\r
}\r
\r
- call_user_func("listplug_{$type}", $template, 'FOOT', $templateName);\r
+ call_user_func("listplug_{$type}", $vars, 'FOOT', $templateName);\r
\r
return sizeof($query);\r
}\r
{\r
return 0;\r
}\r
- call_user_func("listplug_{$type}", $template, 'HEAD', $templateName);\r
+ call_user_func("listplug_{$type}", $vars, 'HEAD', $templateName);\r
\r
- while( $template['current'] = sql_fetch_object($res) )\r
+ while( $vars['current'] = sql_fetch_object($res) )\r
{\r
- call_user_func("listplug_{$type}", $template, 'BODY', $templateName);\r
+ call_user_func("listplug_{$type}", $vars, 'BODY', $templateName);\r
}\r
\r
- call_user_func("listplug_{$type}", $template, 'FOOT', $templateName);\r
+ call_user_func("listplug_{$type}", $vars, 'FOOT', $templateName);\r
\r
sql_free_result($res);\r
\r
for ( $i = 0; $i < sizeof($types); $i++ )\r
{\r
$type = $types[$i];\r
- if ( !array_key_exists($type, $template['friendly_names']) || $type == strtolower($template['friendly_names'][$type]) )\r
+ if ( !array_key_exists($type, $vars['friendly_names']) || $type == strtolower($vars['friendly_names'][$type]) )\r
{\r
$article = 'skinpartspecial';\r
}\r
}\r
$types[$i] = "<li>\n"\r
. helpHtml($article) . "\n"\r
- . "<a href=\"index.php?action=skinedittype&skinid={$current->sdnumber}&type={$type}\" tabindex=\"{$template['tabindex']}\">"\r
- . Entity::hsc($template['friendly_names'][$type])\r
+ . "<a href=\"index.php?action=skinedittype&skinid={$current->sdnumber}&type={$type}\" tabindex=\"{$vars['tabindex']}\">"\r
+ . Entity::hsc($vars['friendly_names'][$type])\r
. "</a>\n"\r
. "</li>\n";\r
}\r
. "<%readme%></td>\n"\r
. "<td class=\"availableSkinTypes\"><%skindesc%><%skinparts%></td>\n"\r
. "<td style=\"white-space:nowrap\">"\r
- . "<a href=\"index.php?action=skinedit&skinid=<%skinid%>\" tabindex=\"<%tabindex%>\"><%editbtn%>"\r
+ . "<a href=\"index.php?action=adminskinedit&skinid=<%skinid%>\" tabindex=\"<%tabindex%>\"><%editbtn%>"\r
. "</a></td>\n"\r
. "<td style=\"white-space:nowrap\">"\r
. "<a href=\"<%cloneurl%>\" tabindex=\"<%tabindex%>\"><%clonebtn%>"\r
. "</a></td>\n"\r
. "<td style=\"white-space:nowrap\">"\r
- . "<a href=\"index.php?action=skindelete&skinid=<%skinid%>\" tabindex=\"<%tabindex%>\"><%delbtn%>"\r
+ . "<a href=\"index.php?action=adminskindelete&skinid=<%skinid%>\" tabindex=\"<%tabindex%>\"><%delbtn%>"\r
. "</a></td>\n";\r
}\r
$url = $manager->addTicketToUrl('index.php?action=adminskinclone&skinid=' . intval($current->sdnumber));\r
for ( $i = 0; $i < sizeof($types); $i++ )\r
{\r
$type = $types[$i];\r
- if ( !array_key_exists($type, $template['friendly_names']) || $type == strtolower($template['friendly_names'][$type]) )\r
+ if ( !array_key_exists($type, $vars['friendly_names']) || $type == strtolower($vars['friendly_names'][$type]) )\r
{\r
$article = 'skinpartspecial';\r
}\r
$types[$i] = "<li>\n"\r
. helpHtml($article) . "\n"\r
. "<a href=\"index.php?action=adminskinedittype&skinid={$current->sdnumber}&type={$type}\" tabindex=\"{$vars['tabindex']}\">"\r
- . Entity::hsc($template['friendly_names'][$type])\r
+ . Entity::hsc($vars['friendly_names'][$type])\r
. "</a>\n"\r
. "</li>\n";\r
}\r