3 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4 * Copyright (C) 2002-2013 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)
12 * Functions to create lists of things inside the admin are
15 // can take either an array of objects, or an SQL query
16 function showlist($query, $type, $template) {
18 if (is_array($query)) {
19 if (sizeof($query) == 0)
22 call_user_func('listplug_' . $type, $template, 'HEAD');
24 foreach ($query as $currentObj) {
25 $template['current'] = $currentObj;
26 call_user_func('listplug_' . $type, $template, 'BODY');
29 call_user_func('listplug_' . $type, $template, 'FOOT');
31 return sizeof($query);
34 $res = sql_query($query);
36 // don't do anything if there are no results
37 $numrows = sql_num_rows($res);
41 call_user_func('listplug_' . $type, $template, 'HEAD');
43 while($template['current'] = sql_fetch_object($res))
44 call_user_func('listplug_' . $type, $template, 'BODY');
46 call_user_func('listplug_' . $type, $template, 'FOOT');
48 sql_free_result($res);
50 // return amount of results
55 function listplug_select($template, $type) {
58 echo '<select name="' . ifset($template['name']) . '" tabindex="' . ifset($template['tabindex']) . '" ' . ifset($template['javascript']) . '>';
60 // add extra row if needed
61 if (ifset($template['extra'])) {
62 echo '<option value="', ifset($template['extraval']), '">', $template['extra'], '</option>';
67 $current = $template['current'];
69 echo '<option value="' . htmlspecialchars($current->value) . '"';
70 if ($template['selected'] == $current->value)
71 echo ' selected="selected" ';
72 if (isset($template['shorten']) && $template['shorten'] > 0) {
73 echo ' title="'. htmlspecialchars($current->text).'"';
74 $current->text = shorten($current->text, $template['shorten'], $template['shortenel']);
76 echo '>' . htmlspecialchars($current->text) . '</option>';
84 function listplug_table($template, $type) {
90 call_user_func("listplug_table_" . $template['content'] , $template, 'HEAD');
91 echo "</tr></thead><tbody>";
94 // print tabletype specific thingies
95 echo "<tr onmouseover='focusRow(this);' onmouseout='blurRow(this);'>";
96 call_user_func("listplug_table_" . $template['content'] , $template, 'BODY');
100 call_user_func("listplug_table_" . $template['content'] , $template, 'FOOT');
101 echo "</tbody></table>";
106 function listplug_table_memberlist($template, $type) {
109 echo '<th>' . _LIST_MEMBER_NAME . '</th><th>' . _LIST_MEMBER_RNAME . '</th><th>' . _LIST_MEMBER_URL . '</th><th>' . _LIST_MEMBER_ADMIN;
111 echo "</th><th>" . _LIST_MEMBER_LOGIN;
113 echo "</th><th colspan='2'>" . _LISTS_ACTIONS. "</th>";
116 $current = $template['current'];
119 $id = listplug_nextBatchId();
120 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->mnumber,'" />';
121 echo '<label for="batch',$id,'">';
122 echo "<a href='mailto:", htmlspecialchars($current->memail), "' tabindex='".$template['tabindex']."'>", htmlspecialchars($current->mname), "</a>";
125 echo '<td>', htmlspecialchars($current->mrealname), '</td>';
126 echo "<td><a href='", htmlspecialchars($current->murl), "' tabindex='", $template['tabindex'] , "'>", htmlspecialchars($current->murl), "</a></td>";
127 echo '<td>', ($current->madmin ? _YES : _NO),'</td>';
128 echo '<td>', ($current->mcanlogin ? _YES : _NO), '</td>';
129 echo "<td><a href='index.php?action=memberedit&memberid=$current->mnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
130 echo "<td><a href='index.php?action=memberdelete&memberid=$current->mnumber' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
135 function listplug_table_teamlist($template, $type) {
139 echo "<th>"._LIST_MEMBER_NAME."</th><th>"._LIST_MEMBER_RNAME."</th><th>"._LIST_TEAM_ADMIN;
141 echo "</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
144 $current = $template['current'];
147 $id = listplug_nextBatchId();
148 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->tmember,'" />';
149 echo '<label for="batch',$id,'">';
150 echo "<a href='mailto:", htmlspecialchars($current->memail), "' tabindex='".$template['tabindex']."'>", htmlspecialchars($current->mname), "</a>";
153 echo '<td>', htmlspecialchars($current->mrealname), '</td>';
154 echo '<td>', ($current->tadmin ? _YES : _NO) , '</td>';
155 echo "<td><a href='index.php?action=teamdelete&memberid=$current->tmember&blogid=$current->tblog' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
157 $url = 'index.php?action=teamchangeadmin&memberid=' . intval($current->tmember) . '&blogid=' . intval($current->tblog);
158 $url = $manager->addTicketToUrl($url);
159 echo "<td><a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>"._LIST_TEAM_CHADMIN."</a></td>";
164 function listplug_table_pluginlist($template, $type) {
168 echo '<th>'._LISTS_INFO.'</th><th>'._LISTS_DESC.'</th>';
169 echo '<th style="white-space:nowrap">'._LISTS_ACTIONS.'</th>';
172 $current = $template['current'];
174 $plug =& $manager->getPlugin($current->pfile);
177 echo '<strong>' , htmlspecialchars($plug->getName()) , '</strong><br />';
178 echo _LIST_PLUGS_AUTHOR, ' ' , htmlspecialchars($plug->getAuthor()) , '<br />';
179 echo _LIST_PLUGS_VER, ' ' , htmlspecialchars($plug->getVersion()) , '<br />';
181 echo '<a href="',htmlspecialchars($plug->getURL()),'" tabindex="'.$template['tabindex'].'">',_LIST_PLUGS_SITE,'</a><br />';
184 echo _LIST_PLUGS_DESC .'<br/>'. encode_desc($plug->getDescription());
185 if (sizeof($plug->getEventList()) > 0) {
186 echo '<br /><br />',_LIST_PLUGS_SUBS,'<br />',htmlspecialchars(implode($plug->getEventList(),', '));
187 // check the database to see if it is up-to-date and notice the user if not
189 if (!$plug->subscribtionListIsUptodate()) {
190 echo '<br /><br /><strong>',_LIST_PLUG_SUBS_NEEDUPDATE,'</strong>';
192 if (sizeof($plug->getPluginDep()) > 0) {
193 echo '<br /><br />',_LIST_PLUGS_DEP,'<br />',htmlspecialchars(implode($plug->getPluginDep(),', '));
196 // check dependency require
198 $res = sql_query('SELECT pfile FROM ' . sql_table('plugin'));
199 while($o = sql_fetch_object($res)) {
200 $preq =& $manager->getPlugin($o->pfile);
202 $depList = $preq->getPluginDep();
203 foreach ($depList as $depName) {
204 if ($current->pfile == $depName) {
210 if (count($req) > 0) {
211 echo '<h4 class="plugin_dependreq_title">' . _LIST_PLUGS_DEPREQ . "</h4>\n";
212 echo '<p class="plugin_dependreq_text">';
213 echo htmlspecialchars(implode(', ', $req), ENT_QUOTES);
219 echo '<td colspan="2">' . sprintf(_PLUGINFILE_COULDNT_BELOADED, htmlspecialchars($current->pfile, ENT_QUOTES)) . '</td>';
221 echo '<td style="white-space:nowrap">';
223 $baseUrl = 'index.php?plugid=' . intval($current->pid) . '&action=';
224 $url = $manager->addTicketToUrl($baseUrl . 'pluginup');
225 echo "<a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_UP,"</a>";
226 $url = $manager->addTicketToUrl($baseUrl . 'plugindown');
227 echo "<br /><a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_DOWN,"</a>";
228 echo "<br /><a href='index.php?action=plugindelete&plugid=$current->pid' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_UNINSTALL,"</a>";
229 if ($plug && ($plug->hasAdminArea() > 0))
230 echo "<br /><a href='".htmlspecialchars($plug->getAdminURL())."' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_ADMIN,"</a>";
231 if ($plug && ($plug->supportsFeature('HelpPage') > 0))
232 echo "<br /><a href='index.php?action=pluginhelp&plugid=$current->pid' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_HELP,"</a>";
233 if (quickQuery('SELECT COUNT(*) AS result FROM '.sql_table('plugin_option_desc').' WHERE ocontext=\'global\' and opid='.$current->pid) > 0)
234 echo "<br /><a href='index.php?action=pluginoptions&plugid=$current->pid' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_OPTIONS,"</a>";
240 function listplug_table_plugoptionlist($template, $type) {
244 echo '<th>'._LISTS_INFO.'</th><th>'._LISTS_VALUE.'</th>';
247 $current = $template['current'];
248 listplug_plugOptionRow($current);
253 <th colspan="2"><?php echo _PLUGS_SAVE?></th>
255 <td><?php echo _PLUGS_SAVE?></td>
256 <td><input type="submit" value="<?php echo _PLUGS_SAVE?>" /></td>
262 function listplug_plugOptionRow($current) {
263 $varname = 'plugoption['.$current['oid'].']['.$current['contextid'].']';
264 // retreive the optionmeta
265 $meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
267 // only if it is not a hidden option write the controls to the page
268 if (!array_key_exists('access', $meta) || $meta['access'] != 'hidden') {
269 echo '<td>',htmlspecialchars($current['description']?$current['description']:$current['name']),'</td>';
271 switch($current['type']) {
273 ADMIN::input_yesno($varname, $current['value'], 0, 'yes', 'no');
276 echo '<input type="password" size="40" maxlength="128" name="',htmlspecialchars($varname),'" value="',htmlspecialchars($current['value']),'" />';
279 echo '<select name="'.htmlspecialchars($varname).'">';
280 $aOptions = NucleusPlugin::getOptionSelectValues($current['typeinfo']);
281 $aOptions = explode('|', $aOptions);
282 for ($i=0; $i<(count($aOptions)-1); $i+=2) {
283 echo '<option value="'.htmlspecialchars($aOptions[$i+1]).'"';
284 if ($aOptions[$i+1] == $current['value'])
285 echo ' selected="selected"';
286 echo '>'.htmlspecialchars($aOptions[$i]).'</option>';
291 //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
292 echo '<textarea class="pluginoption" cols="30" rows="5" name="',htmlspecialchars($varname),'"';
293 if ($meta['access'] == 'readonly') {
294 echo ' readonly="readonly"';
296 echo '>',htmlspecialchars($current['value']),'</textarea>';
300 //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
302 echo '<input type="text" size="40" maxlength="128" name="',htmlspecialchars($varname),'" value="',htmlspecialchars($current['value']),'"';
303 if (array_key_exists('datatype', $meta) && $meta['datatype'] == 'numerical') {
304 echo ' onkeyup="checkNumeric(this)" onblur="checkNumeric(this)"';
306 if (array_key_exists('access', $meta) && $meta['access'] == 'readonly') {
307 echo ' readonly="readonly"';
311 if (array_key_exists('extra', $current)) {
312 echo $current['extra'];
318 function listplug_table_itemlist($template, $type) {
323 echo "<th>"._LIST_ITEM_INFO."</th><th>"._LIST_ITEM_CONTENT."</th><th style=\"white-space:nowrap\" colspan='1'>"._LISTS_ACTIONS."</th>";
326 $current = $template['current'];
327 $current->itime = strtotime($current->itime); // string -> unix timestamp
329 if ($current->idraft == 1)
330 $cssclass = "class='draft'";
332 // (can't use offset time since offsets might vary between blogs)
333 if ($current->itime > $template['now'])
334 $cssclass = "class='future'";
336 $action = requestVar('action');
338 echo '<td ' . $cssclass . ' style="white-space:nowrap;">';
339 if ($action !== 'itemlist')
340 echo _LIST_ITEM_BLOG . ' ', htmlspecialchars($current->bshortname) . ' <br />';
341 echo _LIST_ITEM_CAT,' ', htmlspecialchars($current->cname) . ' <br />';
342 if ($action !== 'browseownitems')
343 echo _LIST_ITEM_AUTHOR, ' ', htmlspecialchars($current->mname) . ' <br />';
344 echo date("Y-m-d",$current->itime) , " " . date("H:i",$current->itime);
346 echo "<td $cssclass>";
348 $id = listplug_nextBatchId();
350 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->inumber,'" />';
351 echo '<label for="batch',$id,'">';
352 echo "<b>" . htmlspecialchars(strip_tags($current->ititle)) . "</b>";
357 $current->ibody = strip_tags($current->ibody);
358 $current->ibody = htmlspecialchars(shorten($current->ibody,200,'...'));
360 $COMMENTS = new COMMENTS($current->inumber);
361 echo "$current->ibody</td>";
362 echo "<td style=\"white-space:nowrap\" $cssclass>";
363 echo "<a href='index.php?action=itemedit&itemid={$current->inumber}'>" . _LISTS_EDIT . "</a>";
364 echo " / <a href='index.php?action=itemmove&itemid={$current->inumber}'>" . _LISTS_MOVE . "</a>";
365 echo " / <a href='index.php?action=itemdelete&itemid={$current->inumber}'>" . _LISTS_DELETE . "</a><br />";
366 // evaluate amount of comments for the item
367 $camount = $COMMENTS->amountComments();
369 echo "<a href='index.php?action=itemcommentlist&itemid=$current->inumber'>";
370 echo "( " . sprintf(_LIST_ITEM_COMMENTS, $COMMENTS->amountComments())." )</a>";
373 echo _LIST_ITEM_NOCONTENT;
380 // for batch operations: generates the index numbers for checkboxes
381 function listplug_nextBatchId() {
386 function listplug_table_commentlist($template, $type) {
389 echo "<th>"._LISTS_INFO."</th><th>"._LIST_COMMENT."</th><th colspan='3'>"._LISTS_ACTIONS."</th>";
392 $current = $template['current'];
393 $current->ctime = strtotime($current->ctime); // string -> unix timestamp
396 echo date("Y-m-d@H:i",$current->ctime);
399 echo htmlspecialchars($current->mname) ,' ', _LIST_COMMENTS_MEMBER;
401 echo htmlspecialchars($current->cuser);
402 if ($current->cmail != '') {
404 echo htmlspecialchars($current->cmail);
406 if ($current->cemail != '') {
408 echo htmlspecialchars($current->cemail);
412 $current->cbody = strip_tags($current->cbody);
413 $current->cbody = htmlspecialchars(shorten($current->cbody, 300, '...'));
416 $id = listplug_nextBatchId();
417 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->cnumber,'" />';
418 echo '<label for="batch',$id,'">';
419 echo $current->cbody;
423 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=commentedit&commentid=$current->cnumber'>"._LISTS_EDIT."</a></td>";
424 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=commentdelete&commentid=$current->cnumber'>"._LISTS_DELETE."</a></td>";
425 if ($template['canAddBan'])
426 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=banlistnewfromitem&itemid=$current->citem&ip=", htmlspecialchars($current->cip), "' title='", htmlspecialchars($current->chost), "'>"._LIST_COMMENT_BANIP."</a></td>";
432 function listplug_table_bloglist($template, $type) {
435 echo "<th>" . _NAME . "</th><th colspan='7'>" ._LISTS_ACTIONS. "</th>";
438 $current = $template['current'];
440 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> " . htmlspecialchars($current->bname) . "</td>";
441 echo "<td><a href='index.php?action=createitem&blogid=$current->bnumber' title='" . _BLOGLIST_TT_ADD ."'>" . _BLOGLIST_ADD . "</a></td>";
442 echo "<td><a href='index.php?action=itemlist&blogid=$current->bnumber' title='". _BLOGLIST_TT_EDIT."'>". _BLOGLIST_EDIT."</a></td>";
443 echo "<td><a href='index.php?action=blogcommentlist&blogid=$current->bnumber' title='". _BLOGLIST_TT_COMMENTS."'>". _BLOGLIST_COMMENTS."</a></td>";
444 echo "<td><a href='index.php?action=bookmarklet&blogid=$current->bnumber' title='". _BLOGLIST_TT_BMLET."'>". _BLOGLIST_BMLET . "</a></td>";
446 if ($current->tadmin == 1) {
447 echo "<td><a href='index.php?action=blogsettings&blogid=$current->bnumber' title='" . _BLOGLIST_TT_SETTINGS . "'>" ._BLOGLIST_SETTINGS. "</a></td>";
448 echo "<td><a href='index.php?action=banlist&blogid=$current->bnumber' title='" . _BLOGLIST_TT_BANS. "'>". _BLOGLIST_BANS."</a></td>";
451 if ($template['superadmin']) {
452 echo "<td><a href='index.php?action=deleteblog&blogid=$current->bnumber' title='". _BLOGLIST_TT_DELETE."'>" ._BLOGLIST_DELETE. "</a></td>";
461 function listplug_table_shortblognames($template, $type) {
464 echo "<th>" . _EBLOG_SHORTNAME . "</th><th>" . _EBLOG_NAME. "</th>";
467 $current = $template['current'];
469 echo '<td>' , htmlspecialchars($current->bshortname) , '</td>';
470 echo '<td>' , htmlspecialchars($current->bname) , '</td>';
476 function listplug_table_shortnames($template, $type) {
479 echo "<th>" . _NAME . "</th><th>" . _LISTS_DESC. "</th>";
482 $current = $template['current'];
484 echo '<td>' , htmlspecialchars($current->name) , '</td>';
485 echo '<td>' , htmlspecialchars($current->description) , '</td>';
492 function listplug_table_categorylist($template, $type) {
495 echo "<th>"._LISTS_NAME."</th><th>"._LISTS_DESC."</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
498 $current = $template['current'];
501 $id = listplug_nextBatchId();
502 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->catid,'" />';
503 echo '<label for="batch',$id,'">';
504 echo htmlspecialchars($current->cname);
508 echo '<td>', htmlspecialchars($current->cdesc), '</td>';
509 echo "<td><a href='index.php?action=categorydelete&blogid=$current->cblog&catid=$current->catid' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
510 echo "<td><a href='index.php?action=categoryedit&blogid=$current->cblog&catid=$current->catid' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
517 function listplug_table_templatelist($template, $type) {
521 echo "<th>"._LISTS_NAME."</th><th>"._LISTS_DESC."</th><th colspan='3'>"._LISTS_ACTIONS."</th>";
524 $current = $template['current'];
526 echo "<td>" , htmlspecialchars($current->tdname), "</td>";
527 echo "<td>" , htmlspecialchars($current->tddesc), "</td>";
528 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=templateedit&templateid=$current->tdnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
530 $url = $manager->addTicketToUrl('index.php?action=templateclone&templateid=' . intval($current->tdnumber));
531 echo "<td style=\"white-space:nowrap\"><a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>"._LISTS_CLONE."</a></td>";
532 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=templatedelete&templateid=$current->tdnumber' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
538 function listplug_table_skinlist($template, $type) {
539 global $CONF, $DIR_SKINS, $manager;
542 echo "<th>"._LISTS_NAME."</th><th>"._LISTS_DESC."</th><th colspan='3'>"._LISTS_ACTIONS."</th>";
545 $current = $template['current'];
549 // use a special style for the default skin
550 if ($current->sdnumber == $CONF['BaseSkin']) {
551 echo '<strong>',htmlspecialchars($current->sdname),'</strong>';
553 echo htmlspecialchars($current->sdname);
557 echo _LISTS_TYPE ,': ' , htmlspecialchars($current->sdtype);
558 echo '<br />', _LIST_SKINS_INCMODE , ' ' , (($current->sdincmode=='skindir') ?_PARSER_INCMODE_SKINDIR:_PARSER_INCMODE_NORMAL);
559 if ($current->sdincpref) echo '<br />' , _LIST_SKINS_INCPREFIX , ' ', htmlspecialchars($current->sdincpref);
561 // add preview image when present
562 if ($current->sdincpref && @file_exists($DIR_SKINS . $current->sdincpref . 'preview.png'))
566 $hasEnlargement = @file_exists($DIR_SKINS . $current->sdincpref . 'preview-large.png');
568 echo '<a href="',$CONF['SkinsURL'], htmlspecialchars($current->sdincpref),'preview-large.png" title="' . _LIST_SKIN_PREVIEW_VIEWLARGER . '">';
570 $imgAlt = sprintf(_LIST_SKIN_PREVIEW, htmlspecialchars($current->sdname, ENT_QUOTES));
571 echo '<img class="skinpreview" src="',$CONF['SkinsURL'], htmlspecialchars($current->sdincpref),'preview.png" width="100" height="75" alt="' . $imgAlt . '" />';
576 if (@file_exists($DIR_SKINS . $current->sdincpref . 'readme.html'))
578 $url = $CONF['SkinsURL'] . htmlspecialchars($current->sdincpref, ENT_QUOTES) . 'readme.html';
579 $readmeTitle = sprintf(_LIST_SKIN_README, htmlspecialchars($current->sdname, ENT_QUOTES));
580 echo '<br /><a href="' . $url . '" title="' . $readmeTitle . '">' . _LIST_SKIN_README_TXT . '</a>';
589 echo '<td class="availableSkinTypes">' . htmlspecialchars($current->sddesc);
590 // show list of defined parts
591 $r = sql_query('SELECT stype FROM '.sql_table('skin').' WHERE sdesc='.$current->sdnumber
\r
593 ." stype NOT IN ('index', 'item', 'error', 'search', 'archive', 'archivelist', 'imagepopup', 'member') ASC , "
\r
596 while ($o = sql_fetch_object($r))
597 array_push($types,$o->stype);
598 if (sizeof($types) > 0) {
599 $friendlyNames = SKIN::getFriendlyNames();
600 for ($i=0;$i<sizeof($types);$i++) {
602 if (in_array($type, array('index', 'item', 'archivelist', 'archive', 'search', 'error', 'member', 'imagepopup'))) {
603 $types[$i] = '<li>' . helpHtml('skinpart'.$type) . ' <a href="index.php?action=skinedittype&skinid='.$current->sdnumber.'&type='.$type.'" tabindex="'.$template['tabindex'].'">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
605 $types[$i] = '<li>' . helpHtml('skinpartspecial') . ' <a href="index.php?action=skinedittype&skinid='.$current->sdnumber.'&type='.$type.'" tabindex="'.$template['tabindex'].'">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
608 echo '<br /><br />',_LIST_SKINS_DEFINED,' <ul>',implode($types,'') ,'</ul>';
611 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=skinedit&skinid=$current->sdnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
613 $url = $manager->addTicketToUrl('index.php?action=skinclone&skinid=' . intval($current->sdnumber));
614 echo "<td style=\"white-space:nowrap\"><a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>"._LISTS_CLONE."</a></td>";
615 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=skindelete&skinid=$current->sdnumber' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
621 function listplug_table_draftlist($template, $type) {
624 echo "<th>"._LISTS_BLOG."</th><th>"._LISTS_TITLE."</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
627 $current = $template['current'];
629 echo '<td>', htmlspecialchars($current->bshortname) , '</td>';
630 echo '<td>', htmlspecialchars(strip_tags($current->ititle)) , '</td>';
631 echo "<td><a href='index.php?action=itemedit&itemid=$current->inumber'>"._LISTS_EDIT."</a></td>";
632 echo "<td><a href='index.php?action=itemdelete&itemid=$current->inumber'>"._LISTS_DELETE."</a></td>";
639 function listplug_table_actionlist($template, $type) {
642 echo '<th>'._LISTS_TIME.'</th><th>'._LIST_ACTION_MSG.'</th>';
645 $current = $template['current'];
647 echo '<td>' , htmlspecialchars($current->timestamp), '</td>';
648 echo '<td>' , htmlspecialchars($current->message), '</td>';
654 function listplug_table_banlist($template, $type) {
657 echo '<th>'._LIST_BAN_IPRANGE.'</th><th>'. _LIST_BAN_REASON.'</th><th>'._LISTS_ACTIONS.'</th>';
660 $current = $template['current'];
662 echo '<td>' , htmlspecialchars($current->iprange) , '</td>';
663 echo '<td>' , htmlspecialchars($current->reason) , '</td>';
664 echo "<td><a href='index.php?action=banlistdelete&blogid=", intval($current->blogid) , "&iprange=" , htmlspecialchars($current->iprange) , "'>",_LISTS_DELETE,"</a></td>";