3 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4 * Copyright (C) 2002-2009 The Nucleus Group
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 * (see nucleus/documentation/index.html#license for more info)
13 * Functions to create lists of things inside the admin are
15 * @license http://nucleuscms.org/license.txt GNU General Public License
16 * @copyright Copyright (C) 2002-2009 The Nucleus Group
17 * @version $Id: showlist.php 1624 2012-01-09 11:36:20Z sakamocchi $
21 // can take either an array of objects, or an SQL query
22 function showlist($query, $type, $template) {
24 if (is_array($query)) {
25 if (sizeof($query) == 0)
28 call_user_func('listplug_' . $type, $template, 'HEAD');
30 foreach ($query as $currentObj) {
31 $template['current'] = $currentObj;
32 call_user_func('listplug_' . $type, $template, 'BODY');
35 call_user_func('listplug_' . $type, $template, 'FOOT');
37 return sizeof($query);
40 $res = sql_query($query);
42 // don't do anything if there are no results
43 $numrows = sql_num_rows($res);
47 call_user_func('listplug_' . $type, $template, 'HEAD');
49 while($template['current'] = sql_fetch_object($res))
50 call_user_func('listplug_' . $type, $template, 'BODY');
52 call_user_func('listplug_' . $type, $template, 'FOOT');
54 sql_free_result($res);
56 // return amount of results
61 function listplug_select($template, $type) {
64 echo '<select name="' . ifset($template['name']) . '" tabindex="' . ifset($template['tabindex']) . '" ' . ifset($template['javascript']) . '>';
66 // add extra row if needed
67 if (ifset($template['extra'])) {
68 echo '<option value="', ifset($template['extraval']), '">', $template['extra'], '</option>';
73 $current = $template['current'];
75 echo '<option value="' . i18n::hsc($current->value) . '"';
76 if ($template['selected'] == $current->value)
77 echo ' selected="selected" ';
78 if (isset($template['shorten']) && $template['shorten'] > 0) {
79 echo ' title="'. i18n::hsc($current->text).'"';
80 $current->text = i18n::hsc(shorten($current->text, $template['shorten'], $template['shortenel']));
82 echo '>' . i18n::hsc($current->text) . '</option>';
90 function listplug_table($template, $type) {
96 call_user_func("listplug_table_" . $template['content'] , $template, 'HEAD');
97 echo "</tr></thead><tbody>";
100 // print tabletype specific thingies
101 echo "<tr onmouseover='focusRow(this);' onmouseout='blurRow(this);'>";
102 call_user_func("listplug_table_" . $template['content'] , $template, 'BODY');
106 call_user_func("listplug_table_" . $template['content'] , $template, 'FOOT');
107 echo "</tbody></table>";
112 function listplug_table_memberlist($template, $type) {
115 echo '<th>' . _LIST_MEMBER_NAME . '</th><th>' . _LIST_MEMBER_RNAME . '</th><th>' . _LIST_MEMBER_URL . '</th><th>' . _LIST_MEMBER_ADMIN;
117 echo "</th><th>" . _LIST_MEMBER_LOGIN;
119 echo "</th><th colspan='2'>" . _LISTS_ACTIONS. "</th>";
122 $current = $template['current'];
125 $id = listplug_nextBatchId();
126 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->mnumber,'" />';
127 echo '<label for="batch',$id,'">';
128 echo "<a href='mailto:", i18n::hsc($current->memail), "' tabindex='".$template['tabindex']."'>", i18n::hsc($current->mname), "</a>";
131 echo '<td>', i18n::hsc($current->mrealname), '</td>';
132 echo "<td><a href='", i18n::hsc($current->murl), "' tabindex='", $template['tabindex'] , "'>", i18n::hsc($current->murl), "</a></td>";
133 echo '<td>', ($current->madmin ? _YES : _NO),'</td>';
134 echo '<td>', ($current->mcanlogin ? _YES : _NO), '</td>';
135 echo "<td><a href='index.php?action=memberedit&memberid=$current->mnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
136 echo "<td><a href='index.php?action=memberdelete&memberid=$current->mnumber' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
141 function listplug_table_teamlist($template, $type) {
145 echo "<th>"._LIST_MEMBER_NAME."</th><th>"._LIST_MEMBER_RNAME."</th><th>"._LIST_TEAM_ADMIN;
147 echo "</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
150 $current = $template['current'];
153 $id = listplug_nextBatchId();
154 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->tmember,'" />';
155 echo '<label for="batch',$id,'">';
156 echo "<a href='mailto:", i18n::hsc($current->memail), "' tabindex='".$template['tabindex']."'>", i18n::hsc($current->mname), "</a>";
159 echo '<td>', i18n::hsc($current->mrealname), '</td>';
160 echo '<td>', ($current->tadmin ? _YES : _NO) , '</td>';
161 echo "<td><a href='index.php?action=teamdelete&memberid=$current->tmember&blogid=$current->tblog' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
163 $url = 'index.php?action=teamchangeadmin&memberid=' . intval($current->tmember) . '&blogid=' . intval($current->tblog);
164 $url = $manager->addTicketToUrl($url);
165 echo "<td><a href='",i18n::hsc($url),"' tabindex='".$template['tabindex']."'>"._LIST_TEAM_CHADMIN."</a></td>";
170 function listplug_table_pluginlist($template, $type) {
174 echo '<th>'._LISTS_INFO.'</th><th>'._LISTS_DESC.'</th>';
175 echo '<th style="white-space:nowrap">'._LISTS_ACTIONS.'</th>';
178 $current = $template['current'];
180 $plug =& $manager->getPlugin($current->pfile);
183 echo '<strong>' , i18n::hsc($plug->getName()) , '</strong><br />';
184 echo _LIST_PLUGS_AUTHOR, ' ' , i18n::hsc($plug->getAuthor()) , '<br />';
185 echo _LIST_PLUGS_VER, ' ' , i18n::hsc($plug->getVersion()) , '<br />';
187 echo '<a href="',i18n::hsc($plug->getURL()),'" tabindex="'.$template['tabindex'].'">',_LIST_PLUGS_SITE,'</a><br />';
190 echo _LIST_PLUGS_DESC .'<br/>'. i18n::hen($plug->getDescription());
191 if (sizeof($plug->getEventList()) > 0) {
192 echo '<br /><br />',_LIST_PLUGS_SUBS,'<br />',i18n::hsc(implode($plug->getEventList(),', '));
193 // check the database to see if it is up-to-date and notice the user if not
195 if (!$plug->subscribtionListIsUptodate()) {
196 echo '<br /><br /><strong>',_LIST_PLUG_SUBS_NEEDUPDATE,'</strong>';
198 if (sizeof($plug->getPluginDep()) > 0) {
199 echo '<br /><br />',_LIST_PLUGS_DEP,'<br />',i18n::hsc(implode($plug->getPluginDep(),', '));
202 // check dependency require
204 $res = sql_query('SELECT pfile FROM ' . sql_table('plugin'));
205 while($o = sql_fetch_object($res)) {
206 $preq =& $manager->getPlugin($o->pfile);
208 $depList = $preq->getPluginDep();
209 foreach ($depList as $depName) {
210 if ($current->pfile == $depName) {
216 if (count($req) > 0) {
217 echo '<h4 class="plugin_dependreq_title">' . _LIST_PLUGS_DEPREQ . "</h4>\n";
218 echo '<p class="plugin_dependreq_text">';
219 echo i18n::hsc(implode(', ', $req));
225 echo '<td colspan="2">' . sprintf(_PLUGINFILE_COULDNT_BELOADED, i18n::hsc($current->pfile)) . '</td>';
229 $baseUrl = 'index.php?plugid=' . intval($current->pid) . '&action=';
230 $url = $manager->addTicketToUrl($baseUrl . 'pluginup');
231 echo "<a href='",i18n::hsc($url),"' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_UP,"</a>";
232 $url = $manager->addTicketToUrl($baseUrl . 'plugindown');
233 echo "<br /><a href='",i18n::hsc($url),"' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_DOWN,"</a>";
234 echo "<br /><a href='index.php?action=plugindelete&plugid=$current->pid' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_UNINSTALL,"</a>";
235 if ($plug && ($plug->hasAdminArea() > 0))
236 echo "<br /><a href='".i18n::hsc($plug->getAdminURL())."' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_ADMIN,"</a>";
237 if ($plug && ($plug->supportsFeature('HelpPage') > 0))
238 echo "<br /><a href='index.php?action=pluginhelp&plugid=$current->pid' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_HELP,"</a>";
239 if (quickQuery('SELECT COUNT(*) AS result FROM '.sql_table('plugin_option_desc').' WHERE ocontext=\'global\' and opid='.$current->pid) > 0)
240 echo "<br /><a href='index.php?action=pluginoptions&plugid=$current->pid' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_OPTIONS,"</a>";
246 function listplug_table_plugoptionlist($template, $type) {
250 echo '<th>'._LISTS_INFO.'</th><th>'._LISTS_VALUE.'</th>';
253 $current = $template['current'];
254 listplug_plugOptionRow($current);
259 <th colspan="2"><?php echo _PLUGS_SAVE?></th>
261 <td><?php echo _PLUGS_SAVE?></td>
262 <td><input type="submit" value="<?php echo _PLUGS_SAVE?>" /></td>
268 function listplug_plugOptionRow($current)
270 $varname = 'plugoption['.$current['oid'].']['.$current['contextid'].']';
272 // retreive the optionmeta
273 $meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
275 // only if it is not a hidden option write the controls to the page
276 if ( in_array('access', $meta) && $meta['access'] == 'hidden' )
281 if ( !$current['description'] )
283 echo '<td>' , i18n::hsc($current['name']) . "</td>\n";
287 if ( !defined($current['description']) )
289 echo '<td>' , i18n::hsc($current['description']) . "</td>\n";
293 echo '<td>' , i18n::hsc(constant($current['description'])) . "</td>\n";
297 switch($current['type'])
300 ADMIN::input_yesno($varname, $current['value'], 0, 'yes', 'no');
303 echo '<input type="password" size="40" maxlength="128" name="',i18n::hsc($varname),'" value="',i18n::hsc($current['value']),"\" />\n";
306 echo '<select name="'.i18n::hsc($varname)."\">\n";
307 $aOptions = NucleusPlugin::getOptionSelectValues($current['typeinfo']);
308 $aOptions = i18n::explode('|', $aOptions);
310 for ( $i=0; $i<(count($aOptions)-1); $i+=2 )
312 if ($aOptions[$i+1] == $current['value'])
314 echo '<option value="' . i18n::hsc($aOptions[$i+1]) . '" selected="selected">';
318 echo '<option value="' . i18n::hsc($aOptions[$i+1]) . '">';
320 if ( defined($aOptions[$i]) )
322 echo i18n::hsc(constant($aOptions[$i]));
326 echo i18n::hsc($aOptions[$i]);
334 //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
335 if ( array_key_exists('access', $meta) && $meta['access'] == 'readonly' )
337 echo '<textarea class="pluginoption" cols="30" rows="5" name="' . i18n::hsc($varname) . "\" readonly=\"readonly\">\n";
341 echo '<textarea class="pluginoption" cols="30" rows="5" name="' . i18n::hsc($varname) . "\">\n";
343 echo i18n::hsc($current['value']) . "\n";
344 echo "</textarea>\n";
348 //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
349 echo '<input type="text" size="40" maxlength="128" name="',i18n::hsc($varname),'" value="',i18n::hsc($current['value']),'"';
350 if ( array_key_exists('datatype', $meta) && $meta['datatype'] == 'numerical' )
352 echo ' onkeyup="checkNumeric(this)" onblur="checkNumeric(this)"';
354 if ( array_key_exists('access', $current) && $meta['access'] == 'readonly')
356 echo ' readonly="readonly"';
360 if ( array_key_exists('extra', $current) )
362 echo $current['extra'];
369 function listplug_table_itemlist($template, $type) {
374 echo "<th>"._LIST_ITEM_INFO."</th><th>"._LIST_ITEM_CONTENT."</th><th style=\"white-space:nowrap\" colspan='1'>"._LISTS_ACTIONS."</th>";
377 $current = $template['current'];
378 $current->itime = strtotime($current->itime); // string -> unix timestamp
380 if ($current->idraft == 1)
381 $cssclass = "class='draft'";
383 // (can't use offset time since offsets might vary between blogs)
384 if ($current->itime > $template['now'])
385 $cssclass = "class='future'";
387 echo "<td $cssclass>",_LIST_ITEM_BLOG,' ', i18n::hsc($current->bshortname);
388 echo " <br />",_LIST_ITEM_CAT,' ', i18n::hsc($current->cname);
389 echo " <br />",_LIST_ITEM_AUTHOR, ' ', i18n::hsc($current->mname);
390 echo " <br />",_LIST_ITEM_DATE," " . date("Y-m-d",$current->itime);
391 echo "<br />",_LIST_ITEM_TIME," " . date("H:i",$current->itime);
393 echo "<td $cssclass>";
395 $id = listplug_nextBatchId();
397 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->inumber,'" />';
398 echo '<label for="batch',$id,'">';
399 echo "<b>" . i18n::hsc(strip_tags($current->ititle)) . "</b>";
404 $current->ibody = strip_tags($current->ibody);
405 $current->ibody = i18n::hsc(shorten($current->ibody,300,'...'));
407 $COMMENTS = new COMMENTS($current->inumber);
408 echo "$current->ibody</td>";
409 echo "<td style=\"white-space:nowrap\" $cssclass>";
410 echo "<a href='index.php?action=itemedit&itemid=$current->inumber'>"._LISTS_EDIT."</a>";
411 // evaluate amount of comments for the item
412 $camount = $COMMENTS->amountComments();
414 echo "<br /><a href='index.php?action=itemcommentlist&itemid=$current->inumber'>";
415 echo "( " . sprintf(_LIST_ITEM_COMMENTS, $COMMENTS->amountComments())." )</a>";
418 echo "<br />" . _LIST_ITEM_NOCONTENT;
420 echo "<br /><a href='index.php?action=itemmove&itemid=$current->inumber'>"._LISTS_MOVE."</a>";
421 echo "<br /><a href='index.php?action=itemdelete&itemid=$current->inumber'>"._LISTS_DELETE."</a>";
427 // for batch operations: generates the index numbers for checkboxes
428 function listplug_nextBatchId() {
433 function listplug_table_commentlist($template, $type) {
436 echo "<th>"._LISTS_INFO."</th><th>"._LIST_COMMENT."</th><th colspan='3'>"._LISTS_ACTIONS."</th>";
439 $current = $template['current'];
440 $current->ctime = strtotime($current->ctime); // string -> unix timestamp
443 echo date("Y-m-d@H:i",$current->ctime);
446 echo i18n::hsc($current->mname) ,' ', _LIST_COMMENTS_MEMBER;
448 echo i18n::hsc($current->cuser);
449 if ($current->cmail != '') {
451 echo i18n::hsc($current->cmail);
453 if ($current->cemail != '') {
455 echo i18n::hsc($current->cemail);
459 $current->cbody = strip_tags($current->cbody);
460 $current->cbody = i18n::hsc(shorten($current->cbody, 300, '...'));
463 $id = listplug_nextBatchId();
464 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->cnumber,'" />';
465 echo '<label for="batch',$id,'">';
466 echo $current->cbody;
470 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=commentedit&commentid=$current->cnumber'>"._LISTS_EDIT."</a></td>";
471 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=commentdelete&commentid=$current->cnumber'>"._LISTS_DELETE."</a></td>";
472 if ($template['canAddBan'])
473 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=banlistnewfromitem&itemid=$current->citem&ip=", i18n::hsc($current->cip), "' title='", i18n::hsc($current->chost), "'>"._LIST_COMMENT_BANIP."</a></td>";
479 function listplug_table_bloglist($template, $type) {
482 echo "<th>" . _NAME . "</th><th colspan='7'>" ._LISTS_ACTIONS. "</th>";
485 $current = $template['current'];
487 echo "<td title='blogid:$current->bnumber shortname:$current->bshortname'><a href='$current->burl'><img src='images/globe.gif' width='13' height='13' alt='". _BLOGLIST_TT_VISIT."' /></a> " . i18n::hsc($current->bname) . "</td>";
488 echo "<td><a href='index.php?action=createitem&blogid=$current->bnumber' title='" . _BLOGLIST_TT_ADD ."'>" . _BLOGLIST_ADD . "</a></td>";
489 echo "<td><a href='index.php?action=itemlist&blogid=$current->bnumber' title='". _BLOGLIST_TT_EDIT."'>". _BLOGLIST_EDIT."</a></td>";
490 echo "<td><a href='index.php?action=blogcommentlist&blogid=$current->bnumber' title='". _BLOGLIST_TT_COMMENTS."'>". _BLOGLIST_COMMENTS."</a></td>";
491 echo "<td><a href='index.php?action=bookmarklet&blogid=$current->bnumber' title='". _BLOGLIST_TT_BMLET."'>". _BLOGLIST_BMLET . "</a></td>";
493 if ($current->tadmin == 1) {
494 echo "<td><a href='index.php?action=blogsettings&blogid=$current->bnumber' title='" . _BLOGLIST_TT_SETTINGS . "'>" ._BLOGLIST_SETTINGS. "</a></td>";
495 echo "<td><a href='index.php?action=banlist&blogid=$current->bnumber' title='" . _BLOGLIST_TT_BANS. "'>". _BLOGLIST_BANS."</a></td>";
498 if ($template['superadmin']) {
499 echo "<td><a href='index.php?action=deleteblog&blogid=$current->bnumber' title='". _BLOGLIST_TT_DELETE."'>" ._BLOGLIST_DELETE. "</a></td>";
508 function listplug_table_shortblognames($template, $type) {
511 echo "<th>" . _EBLOG_SHORTNAME . "</th><th>" . _EBLOG_NAME. "</th>";
514 $current = $template['current'];
516 echo '<td>' , i18n::hsc($current->bshortname) , '</td>';
517 echo '<td>' , i18n::hsc($current->bname) , '</td>';
523 function listplug_table_shortnames($template, $type) {
526 echo "<th>" . _NAME . "</th><th>" . _LISTS_DESC. "</th>";
529 $current = $template['current'];
531 echo '<td>' , i18n::hsc($current->name) , '</td>';
532 echo '<td>' , i18n::hsc($current->description) , '</td>';
539 function listplug_table_categorylist($template, $type) {
542 echo "<th>"._LISTS_NAME."</th><th>"._LISTS_DESC."</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
545 $current = $template['current'];
548 $id = listplug_nextBatchId();
549 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->catid,'" />';
550 echo '<label for="batch',$id,'">';
551 echo i18n::hsc($current->cname);
555 echo '<td>', i18n::hsc($current->cdesc), '</td>';
556 echo "<td><a href='index.php?action=categorydelete&blogid=$current->cblog&catid=$current->catid' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
557 echo "<td><a href='index.php?action=categoryedit&blogid=$current->cblog&catid=$current->catid' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
564 function listplug_table_templatelist($template, $type) {
568 echo "<th>"._LISTS_NAME."</th><th>"._LISTS_DESC."</th><th colspan='3'>"._LISTS_ACTIONS."</th>";
571 $current = $template['current'];
573 echo "<td>" , i18n::hsc($current->tdname), "</td>";
574 echo "<td>" , i18n::hsc($current->tddesc), "</td>";
575 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=templateedit&templateid=$current->tdnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
577 $url = $manager->addTicketToUrl('index.php?action=templateclone&templateid=' . intval($current->tdnumber));
578 echo "<td style=\"white-space:nowrap\"><a href='",i18n::hsc($url),"' tabindex='".$template['tabindex']."'>"._LISTS_CLONE."</a></td>";
579 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=templatedelete&templateid=$current->tdnumber' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
585 function listplug_table_skinlist($template, $type) {
586 global $CONF, $DIR_SKINS, $manager;
589 echo "<th>"._LISTS_NAME."</th><th>"._LISTS_DESC."</th><th colspan='3'>"._LISTS_ACTIONS."</th>";
592 $current = $template['current'];
596 // use a special style for the default skin
597 if ($current->sdnumber == $CONF['BaseSkin']) {
598 echo '<strong>',i18n::hsc($current->sdname),'</strong>';
600 echo i18n::hsc($current->sdname);
604 echo _LISTS_TYPE ,': ' , i18n::hsc($current->sdtype);
605 echo '<br />', _LIST_SKINS_INCMODE , ' ' , (($current->sdincmode=='skindir') ?_PARSER_INCMODE_SKINDIR:_PARSER_INCMODE_NORMAL);
606 if ($current->sdincpref) echo '<br />' , _LIST_SKINS_INCPREFIX , ' ', i18n::hsc($current->sdincpref);
608 // add preview image when present
609 if ($current->sdincpref && @file_exists($DIR_SKINS . $current->sdincpref . 'preview.png'))
613 $hasEnlargement = @file_exists($DIR_SKINS . $current->sdincpref . 'preview-large.png');
615 echo '<a href="',$CONF['SkinsURL'], i18n::hsc($current->sdincpref),'preview-large.png" title="' . _LIST_SKIN_PREVIEW_VIEWLARGER . '">';
617 $imgAlt = sprintf(_LIST_SKIN_PREVIEW, i18n::hsc($current->sdname));
618 echo '<img class="skinpreview" src="',$CONF['SkinsURL'], i18n::hsc($current->sdincpref),'preview.png" width="100" height="75" alt="' . $imgAlt . '" />';
623 if (@file_exists($DIR_SKINS . $current->sdincpref . 'readme.html'))
625 $url = $CONF['SkinsURL'] . i18n::hsc($current->sdincpref) . 'readme.html';
626 $readmeTitle = sprintf(_LIST_SKIN_README, i18n::hsc($current->sdname));
627 echo '<br /><a href="' . $url . '" title="' . $readmeTitle . '">' . _LIST_SKIN_README_TXT . '</a>';
636 echo "<td>" , i18n::hsc($current->sddesc);
637 // show list of defined parts
638 $r = sql_query('SELECT stype FROM '.sql_table('skin').' WHERE sdesc='.$current->sdnumber . ' ORDER BY stype');
640 while ($o = sql_fetch_object($r))
641 array_push($types,$o->stype);
642 if (sizeof($types) > 0) {
643 $friendlyNames = SKIN::getFriendlyNames();
644 for ($i=0;$i<sizeof($types);$i++) {
646 if (in_array($type, array('index', 'item', 'archivelist', 'archive', 'search', 'error', 'member', 'imagepopup'))) {
647 $types[$i] = '<li>' . helpHtml('skinpart'.$type) . ' <a href="index.php?action=skinedittype&skinid='.$current->sdnumber.'&type='.$type.'" tabindex="'.$template['tabindex'].'">' . i18n::hsc($friendlyNames[$type]) . "</a></li>";
649 $types[$i] = '<li>' . helpHtml('skinpartspecial') . ' <a href="index.php?action=skinedittype&skinid='.$current->sdnumber.'&type='.$type.'" tabindex="'.$template['tabindex'].'">' . i18n::hsc($friendlyNames[$type]) . "</a></li>";
652 echo '<br /><br />',_LIST_SKINS_DEFINED,' <ul>',implode($types,'') ,'</ul>';
655 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=skinedit&skinid=$current->sdnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
657 $url = $manager->addTicketToUrl('index.php?action=skinclone&skinid=' . intval($current->sdnumber));
658 echo "<td style=\"white-space:nowrap\"><a href='",i18n::hsc($url),"' tabindex='".$template['tabindex']."'>"._LISTS_CLONE."</a></td>";
659 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=skindelete&skinid=$current->sdnumber' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
665 function listplug_table_draftlist($template, $type) {
668 echo "<th>"._LISTS_BLOG."</th><th>"._LISTS_TITLE."</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
671 $current = $template['current'];
673 echo '<td>', i18n::hsc($current->bshortname) , '</td>';
674 echo '<td>', i18n::hsc(strip_tags($current->ititle)) , '</td>';
675 echo "<td><a href='index.php?action=itemedit&itemid=$current->inumber'>"._LISTS_EDIT."</a></td>";
676 echo "<td><a href='index.php?action=itemdelete&itemid=$current->inumber'>"._LISTS_DELETE."</a></td>";
682 function listplug_table_otherdraftlist($template, $type) {
685 echo "<th>"._LISTS_BLOG."</th><th>"._LISTS_TITLE."</th><th>"._LISTS_AUTHOR."</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
688 $current = $template['current'];
690 echo '<td>', i18n::hsc($current->bshortname) , '</td>';
691 echo '<td>', i18n::hsc(strip_tags($current->ititle)) , '</td>';
692 echo '<td>', i18n::hsc($current->mname) , '</td>';
693 echo "<td><a href='index.php?action=itemedit&itemid=$current->inumber'>"._LISTS_EDIT."</a></td>";
694 echo "<td><a href='index.php?action=itemdelete&itemid=$current->inumber'>"._LISTS_DELETE."</a></td>";
700 function listplug_table_actionlist($template, $type) {
703 echo '<th>'._LISTS_TIME.'</th><th>'._LIST_ACTION_MSG.'</th>';
706 $current = $template['current'];
708 echo '<td>' , i18n::hsc($current->timestamp), '</td>';
709 echo '<td>' , i18n::hsc($current->message), '</td>';
715 function listplug_table_banlist($template, $type) {
718 echo '<th>'._LIST_BAN_IPRANGE.'</th><th>'. _LIST_BAN_REASON.'</th><th>'._LISTS_ACTIONS.'</th>';
721 $current = $template['current'];
723 echo '<td>' , i18n::hsc($current->iprange) , '</td>';
724 echo '<td>' , i18n::hsc($current->reason) , '</td>';
725 echo "<td><a href='index.php?action=banlistdelete&blogid=", intval($current->blogid) , "&iprange=" , i18n::hsc($current->iprange) , "'>",_LISTS_DELETE,"</a></td>";