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
18 * @version $NucleusJP: showlist.php,v 1.7.2.3 2007/12/03 00:01:48 kmorimatsu Exp $
22 // can take either an array of objects, or an SQL query
23 function showlist($query, $type, $template) {
25 if (is_array($query)) {
26 if (sizeof($query) == 0)
29 call_user_func('listplug_' . $type, $template, 'HEAD');
31 foreach ($query as $currentObj) {
32 $template['current'] = $currentObj;
33 call_user_func('listplug_' . $type, $template, 'BODY');
36 call_user_func('listplug_' . $type, $template, 'FOOT');
38 return sizeof($query);
41 $res = sql_query($query);
43 // don't do anything if there are no results
44 $numrows = mysql_num_rows($res);
48 call_user_func('listplug_' . $type, $template, 'HEAD');
50 while($template['current'] = mysql_fetch_object($res))
51 call_user_func('listplug_' . $type, $template, 'BODY');
53 call_user_func('listplug_' . $type, $template, 'FOOT');
55 mysql_free_result($res);
57 // return amount of results
62 function listplug_select($template, $type) {
65 echo '<select name="' . ifset($template['name']) . '" tabindex="' . ifset($template['tabindex']) . '" ' . ifset($template['javascript']) . '>';
67 // add extra row if needed
68 if (ifset($template['extra'])) {
69 echo '<option value="', ifset($template['extraval']), '">', $template['extra'], '</option>';
74 $current = $template['current'];
76 echo '<option value="' . htmlspecialchars($current->value) . '"';
77 if ($template['selected'] == $current->value)
78 echo ' selected="selected" ';
79 if (isset($template['shorten']) && $template['shorten'] > 0) {
80 echo ' title="'. htmlspecialchars($current->text).'"';
81 $current->text = shorten($current->text, $template['shorten'], $template['shortenel']);
83 echo '>' . htmlspecialchars($current->text) . '</option>';
91 function listplug_table($template, $type) {
97 call_user_func("listplug_table_" . $template['content'] , $template, 'HEAD');
98 echo "</tr></thead><tbody>";
101 // print tabletype specific thingies
102 echo "<tr onmouseover='focusRow(this);' onmouseout='blurRow(this);'>";
103 call_user_func("listplug_table_" . $template['content'] , $template, 'BODY');
107 call_user_func("listplug_table_" . $template['content'] , $template, 'FOOT');
108 echo "</tbody></table>";
113 function listplug_table_memberlist($template, $type) {
116 echo '<th>' . _LIST_MEMBER_NAME . '</th><th>' . _LIST_MEMBER_RNAME . '</th><th>' . _LIST_MEMBER_URL . '</th><th>' . _LIST_MEMBER_ADMIN;
118 echo "</th><th>" . _LIST_MEMBER_LOGIN;
120 echo "</th><th colspan='2'>" . _LISTS_ACTIONS. "</th>";
123 $current = $template['current'];
126 $id = listplug_nextBatchId();
127 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->mnumber,'" />';
128 echo '<label for="batch',$id,'">';
129 echo "<a href='mailto:", htmlspecialchars($current->memail), "' tabindex='".$template['tabindex']."'>", htmlspecialchars($current->mname), "</a>";
132 echo '<td>', htmlspecialchars($current->mrealname), '</td>';
133 echo "<td><a href='", htmlspecialchars($current->murl), "' tabindex='", $template['tabindex'] , "'>", htmlspecialchars($current->murl), "</a></td>";
134 echo '<td>', ($current->madmin ? _YES : _NO),'</td>';
135 echo '<td>', ($current->mcanlogin ? _YES : _NO), '</td>';
136 echo "<td><a href='index.php?action=memberedit&memberid=$current->mnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
137 echo "<td><a href='index.php?action=memberdelete&memberid=$current->mnumber' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
142 function listplug_table_teamlist($template, $type) {
146 echo "<th>"._LIST_MEMBER_NAME."</th><th>"._LIST_MEMBER_RNAME."</th><th>"._LIST_TEAM_ADMIN;
148 echo "</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
151 $current = $template['current'];
154 $id = listplug_nextBatchId();
155 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->tmember,'" />';
156 echo '<label for="batch',$id,'">';
157 echo "<a href='mailto:", htmlspecialchars($current->memail), "' tabindex='".$template['tabindex']."'>", htmlspecialchars($current->mname), "</a>";
160 echo '<td>', htmlspecialchars($current->mrealname), '</td>';
161 echo '<td>', ($current->tadmin ? _YES : _NO) , '</td>';
162 echo "<td><a href='index.php?action=teamdelete&memberid=$current->tmember&blogid=$current->tblog' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
164 $url = 'index.php?action=teamchangeadmin&memberid=' . intval($current->tmember) . '&blogid=' . intval($current->tblog);
165 $url = $manager->addTicketToUrl($url);
166 echo "<td><a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>"._LIST_TEAM_CHADMIN."</a></td>";
171 function listplug_table_pluginlist($template, $type) {
175 echo '<th>'._LISTS_INFO.'</th><th>'._LISTS_DESC.'</th>';
176 echo '<th style="white-space:nowrap">'._LISTS_ACTIONS.'</th>';
179 $current = $template['current'];
181 $plug =& $manager->getPlugin($current->pfile);
184 echo '<strong>' , htmlspecialchars($plug->getName()) , '</strong><br />';
185 echo _LIST_PLUGS_AUTHOR, ' ' , htmlspecialchars($plug->getAuthor()) , '<br />';
186 echo _LIST_PLUGS_VER, ' ' , htmlspecialchars($plug->getVersion()) , '<br />';
188 echo '<a href="',htmlspecialchars($plug->getURL()),'" tabindex="'.$template['tabindex'].'">',_LIST_PLUGS_SITE,'</a><br />';
189 // echo '<a href="',htmlspecialchars($plug->getURL()),'" tabindex="'.$template['tabindex'].'">'.htmlspecialchars(shorten($plug->getURL(), 25, '...')),'</a><br />';
192 echo _LIST_PLUGS_DESC .'<br/>'. encode_desc($plug->getDescription());
193 if (sizeof($plug->getEventList()) > 0) {
194 echo '<br /><br />',_LIST_PLUGS_SUBS,'<br />',htmlspecialchars(implode($plug->getEventList(),', '));
195 // check the database to see if it is up-to-date and notice the user if not
197 if (!$plug->subscribtionListIsUptodate()) {
198 echo '<br /><br /><strong>',_LIST_PLUG_SUBS_NEEDUPDATE,'</strong>';
200 if (sizeof($plug->getPluginDep()) > 0) {
201 echo '<br /><br />',_LIST_PLUGS_DEP,'<br />',htmlspecialchars(implode($plug->getPluginDep(),', '));
204 // check dependency require
206 $res = sql_query('SELECT pfile FROM ' . sql_table('plugin'));
207 while($o = mysql_fetch_object($res)) {
208 $preq =& $manager->getPlugin($o->pfile);
210 $depList = $preq->getPluginDep();
211 foreach ($depList as $depName) {
212 if ($current->pfile == $depName) {
218 if (count($req) > 0) {
219 echo '<h4 class="plugin_dependreq_title">' . _LIST_PLUGS_DEPREQ . "</h4>\n";
220 echo '<p class="plugin_dependreq_text">';
221 echo htmlspecialchars(implode(', ', $req), ENT_QUOTES);
227 echo '<td colspan="2">' . sprintf(_PLUGINFILE_COULDNT_BELOADED, htmlspecialchars($current->pfile, ENT_QUOTES)) . '</td>';
229 echo '<td style="white-space:nowrap">';
231 $baseUrl = 'index.php?plugid=' . intval($current->pid) . '&action=';
232 $url = $manager->addTicketToUrl($baseUrl . 'pluginup');
233 echo "<a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_UP,"</a>";
234 $url = $manager->addTicketToUrl($baseUrl . 'plugindown');
235 echo "<br /><a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_DOWN,"</a>";
236 echo "<br /><a href='index.php?action=plugindelete&plugid=$current->pid' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_UNINSTALL,"</a>";
237 if ($plug && ($plug->hasAdminArea() > 0))
238 echo "<br /><a href='".htmlspecialchars($plug->getAdminURL())."' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_ADMIN,"</a>";
239 if ($plug && ($plug->supportsFeature('HelpPage') > 0))
240 echo "<br /><a href='index.php?action=pluginhelp&plugid=$current->pid' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_HELP,"</a>";
241 if (quickQuery('SELECT COUNT(*) AS result FROM '.sql_table('plugin_option_desc').' WHERE ocontext=\'global\' and opid='.$current->pid) > 0)
242 echo "<br /><a href='index.php?action=pluginoptions&plugid=$current->pid' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_OPTIONS,"</a>";
248 function listplug_table_plugoptionlist($template, $type) {
252 echo '<th>'._LISTS_INFO.'</th><th>'._LISTS_VALUE.'</th>';
255 $current = $template['current'];
256 listplug_plugOptionRow($current);
261 <th colspan="2"><?php echo _PLUGS_SAVE?></th>
263 <td><?php echo _PLUGS_SAVE?></td>
264 <td><input type="submit" value="<?php echo _PLUGS_SAVE?>" /></td>
270 function listplug_plugOptionRow($current) {
271 $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 (@$meta['access'] != 'hidden') {
277 echo '<td>',htmlspecialchars($current['description']?$current['description']:$current['name']),'</td>';
279 switch($current['type']) {
281 ADMIN::input_yesno($varname, $current['value'], 0, 'yes', 'no');
284 echo '<input type="password" size="40" maxlength="128" name="',htmlspecialchars($varname),'" value="',htmlspecialchars($current['value']),'" />';
287 echo '<select name="'.htmlspecialchars($varname).'">';
288 $aOptions = NucleusPlugin::getOptionSelectValues($current['typeinfo']);
289 $aOptions = explode('|', $aOptions);
290 for ($i=0; $i<(count($aOptions)-1); $i+=2) {
291 echo '<option value="'.htmlspecialchars($aOptions[$i+1]).'"';
292 if ($aOptions[$i+1] == $current['value'])
293 echo ' selected="selected"';
294 echo '>'.htmlspecialchars($aOptions[$i]).'</option>';
299 //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
300 echo '<textarea class="pluginoption" cols="30" rows="5" name="',htmlspecialchars($varname),'"';
301 if (@$meta['access'] == 'readonly') {
302 echo ' readonly="readonly"';
304 echo '>',htmlspecialchars($current['value']),'</textarea>';
308 //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
310 echo '<input type="text" size="40" maxlength="128" name="',htmlspecialchars($varname),'" value="',htmlspecialchars($current['value']),'"';
311 if (@$meta['datatype'] == 'numerical') {
312 echo ' onkeyup="checkNumeric(this)" onblur="checkNumeric(this)"';
314 if (@$meta['access'] == 'readonly') {
315 echo ' readonly="readonly"';
319 echo @$current['extra'];
324 function listplug_table_itemlist($template, $type) {
329 echo "<th>"._LIST_ITEM_INFO."</th><th>"._LIST_ITEM_CONTENT."</th><th style=\"white-space:nowrap\" colspan='1'>"._LISTS_ACTIONS."</th>";
332 $current = $template['current'];
333 $current->itime = strtotime($current->itime); // string -> unix timestamp
335 if ($current->idraft == 1)
336 $cssclass = "class='draft'";
338 // (can't use offset time since offsets might vary between blogs)
339 if ($current->itime > $template['now'])
340 $cssclass = "class='future'";
342 echo "<td $cssclass>",_LIST_ITEM_BLOG,' ', htmlspecialchars($current->bshortname);
343 echo " <br />",_LIST_ITEM_CAT,' ', htmlspecialchars($current->cname);
344 echo " <br />",_LIST_ITEM_AUTHOR, ' ', htmlspecialchars($current->mname);
345 echo " <br />",_LIST_ITEM_DATE," " . date("Y-m-d",$current->itime);
346 echo "<br />",_LIST_ITEM_TIME," " . date("H:i",$current->itime);
348 echo "<td $cssclass>";
350 $id = listplug_nextBatchId();
352 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->inumber,'" />';
353 echo '<label for="batch',$id,'">';
354 echo "<b>" . htmlspecialchars(strip_tags($current->ititle)) . "</b>";
359 $current->ibody = strip_tags($current->ibody);
360 $current->ibody = htmlspecialchars(shorten($current->ibody,300,'...'));
362 $COMMENTS = new COMMENTS($current->inumber);
363 echo "$current->ibody</td>";
364 echo "<td style=\"white-space:nowrap\" $cssclass>";
365 echo "<a href='index.php?action=itemedit&itemid=$current->inumber'>"._LISTS_EDIT."</a>";
366 // evaluate amount of comments for the item
367 $camount = $COMMENTS->amountComments();
369 echo "<br /><a href='index.php?action=itemcommentlist&itemid=$current->inumber'>";
370 echo "( " . sprintf(_LIST_ITEM_COMMENTS, $COMMENTS->amountComments())." )</a>";
373 echo "<br />"._LIST_ITEM_NOCONTENT;
375 echo "<br /><a href='index.php?action=itemmove&itemid=$current->inumber'>"._LISTS_MOVE."</a>";
376 echo "<br /><a href='index.php?action=itemdelete&itemid=$current->inumber'>"._LISTS_DELETE."</a>";
382 // for batch operations: generates the index numbers for checkboxes
383 function listplug_nextBatchId() {
388 function listplug_table_commentlist($template, $type) {
391 echo "<th>"._LISTS_INFO."</th><th>"._LIST_COMMENT."</th><th colspan='3'>"._LISTS_ACTIONS."</th>";
394 $current = $template['current'];
395 $current->ctime = strtotime($current->ctime); // string -> unix timestamp
398 echo date("Y-m-d@H:i",$current->ctime);
401 echo htmlspecialchars($current->mname) ,' ', _LIST_COMMENTS_MEMBER;
403 echo htmlspecialchars($current->cuser);
404 if ($current->cmail != '') {
406 echo htmlspecialchars($current->cmail);
408 if ($current->cemail != '') {
410 echo htmlspecialchars($current->cemail);
414 $current->cbody = strip_tags($current->cbody);
415 $current->cbody = htmlspecialchars(shorten($current->cbody, 300, '...'));
418 $id = listplug_nextBatchId();
419 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->cnumber,'" />';
420 echo '<label for="batch',$id,'">';
421 echo $current->cbody;
425 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=commentedit&commentid=$current->cnumber'>"._LISTS_EDIT."</a></td>";
426 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=commentdelete&commentid=$current->cnumber'>"._LISTS_DELETE."</a></td>";
427 if ($template['canAddBan'])
428 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>";
434 function listplug_table_bloglist($template, $type) {
437 echo "<th>" . _NAME . "</th><th colspan='7'>" ._LISTS_ACTIONS. "</th>";
440 $current = $template['current'];
442 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>";
443 echo "<td><a href='index.php?action=createitem&blogid=$current->bnumber' title='" . _BLOGLIST_TT_ADD ."'>" . _BLOGLIST_ADD . "</a></td>";
444 echo "<td><a href='index.php?action=itemlist&blogid=$current->bnumber' title='". _BLOGLIST_TT_EDIT."'>". _BLOGLIST_EDIT."</a></td>";
445 echo "<td><a href='index.php?action=blogcommentlist&blogid=$current->bnumber' title='". _BLOGLIST_TT_COMMENTS."'>". _BLOGLIST_COMMENTS."</a></td>";
446 echo "<td><a href='index.php?action=bookmarklet&blogid=$current->bnumber' title='". _BLOGLIST_TT_BMLET."'>". _BLOGLIST_BMLET . "</a></td>";
448 if ($current->tadmin == 1) {
449 echo "<td><a href='index.php?action=blogsettings&blogid=$current->bnumber' title='" . _BLOGLIST_TT_SETTINGS . "'>" ._BLOGLIST_SETTINGS. "</a></td>";
450 echo "<td><a href='index.php?action=banlist&blogid=$current->bnumber' title='" . _BLOGLIST_TT_BANS. "'>". _BLOGLIST_BANS."</a></td>";
453 if ($template['superadmin']) {
454 echo "<td><a href='index.php?action=deleteblog&blogid=$current->bnumber' title='". _BLOGLIST_TT_DELETE."'>" ._BLOGLIST_DELETE. "</a></td>";
463 function listplug_table_shortblognames($template, $type) {
466 echo "<th>" . _EBLOG_SHORTNAME . "</th><th>" . _EBLOG_NAME. "</th>";
469 $current = $template['current'];
471 echo '<td>' , htmlspecialchars($current->bshortname) , '</td>';
472 echo '<td>' , htmlspecialchars($current->bname) , '</td>';
478 function listplug_table_shortnames($template, $type) {
481 echo "<th>" . _NAME . "</th><th>" . _LISTS_DESC. "</th>";
484 $current = $template['current'];
486 echo '<td>' , htmlspecialchars($current->name) , '</td>';
487 echo '<td>' , htmlspecialchars($current->description) , '</td>';
494 function listplug_table_categorylist($template, $type) {
497 echo "<th>"._LISTS_NAME."</th><th>"._LISTS_DESC."</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
500 $current = $template['current'];
503 $id = listplug_nextBatchId();
504 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->catid,'" />';
505 echo '<label for="batch',$id,'">';
506 echo htmlspecialchars($current->cname);
510 echo '<td>', htmlspecialchars($current->cdesc), '</td>';
511 echo "<td><a href='index.php?action=categorydelete&blogid=$current->cblog&catid=$current->catid' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
512 echo "<td><a href='index.php?action=categoryedit&blogid=$current->cblog&catid=$current->catid' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
519 function listplug_table_templatelist($template, $type) {
523 echo "<th>"._LISTS_NAME."</th><th>"._LISTS_DESC."</th><th colspan='3'>"._LISTS_ACTIONS."</th>";
526 $current = $template['current'];
528 echo "<td>" , htmlspecialchars($current->tdname), "</td>";
529 echo "<td>" , htmlspecialchars($current->tddesc), "</td>";
530 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=templateedit&templateid=$current->tdnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
532 $url = $manager->addTicketToUrl('index.php?action=templateclone&templateid=' . intval($current->tdnumber));
533 echo "<td style=\"white-space:nowrap\"><a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>"._LISTS_CLONE."</a></td>";
534 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=templatedelete&templateid=$current->tdnumber' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
540 function listplug_table_skinlist($template, $type) {
541 global $CONF, $DIR_SKINS, $manager;
544 echo "<th>"._LISTS_NAME."</th><th>"._LISTS_DESC."</th><th colspan='3'>"._LISTS_ACTIONS."</th>";
547 $current = $template['current'];
551 // use a special style for the default skin
552 if ($current->sdnumber == $CONF['BaseSkin']) {
553 echo '<strong>',htmlspecialchars($current->sdname),'</strong>';
555 echo htmlspecialchars($current->sdname);
559 echo _LISTS_TYPE ,': ' , htmlspecialchars($current->sdtype);
560 echo '<br />', _LIST_SKINS_INCMODE , ' ' , (($current->sdincmode=='skindir') ?_PARSER_INCMODE_SKINDIR:_PARSER_INCMODE_NORMAL);
561 if ($current->sdincpref) echo '<br />' , _LIST_SKINS_INCPREFIX , ' ', htmlspecialchars($current->sdincpref);
563 // add preview image when present
564 if ($current->sdincpref && @file_exists($DIR_SKINS . $current->sdincpref . 'preview.png'))
568 $hasEnlargement = @file_exists($DIR_SKINS . $current->sdincpref . 'preview-large.png');
570 echo '<a href="',$CONF['SkinsURL'], htmlspecialchars($current->sdincpref),'preview-large.png" title="' . _LIST_SKIN_PREVIEW_VIEWLARGER . '">';
572 $imgAlt = sprintf(_LIST_SKIN_PREVIEW, htmlspecialchars($current->sdname, ENT_QUOTES));
573 echo '<img class="skinpreview" src="',$CONF['SkinsURL'], htmlspecialchars($current->sdincpref),'preview.png" width="100" height="75" alt="' . $imgAlt . '" />';
578 if (@file_exists($DIR_SKINS . $current->sdincpref . 'readme.html'))
580 $url = $CONF['SkinsURL'] . htmlspecialchars($current->sdincpref, ENT_QUOTES) . 'readme.html';
581 $readmeTitle = sprintf(_LIST_SKIN_README, htmlspecialchars($current->sdname, ENT_QUOTES));
582 echo '<br /><a href="' . $url . '" title="' . $readmeTitle . '">' . _LIST_SKIN_README_TXT . '</a>';
591 echo '<td class="availableSkinTypes">' . htmlspecialchars($current->sddesc);
592 // show list of defined parts
593 $r = sql_query('SELECT stype FROM '.sql_table('skin').' WHERE sdesc='.$current->sdnumber . ' ORDER BY stype');
595 while ($o = mysql_fetch_object($r))
596 array_push($types,$o->stype);
597 if (sizeof($types) > 0) {
598 $friendlyNames = SKIN::getFriendlyNames();
599 for ($i=0;$i<sizeof($types);$i++) {
601 if (in_array($type, array('index', 'item', 'archivelist', 'archive', 'search', 'error', 'member', 'imagepopup'))) {
602 $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>";
604 $types[$i] = '<li>' . helpHtml('skinpartspecial') . ' <a href="index.php?action=skinedittype&skinid='.$current->sdnumber.'&type='.$type.'" tabindex="'.$template['tabindex'].'">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
607 echo '<br /><br />',_LIST_SKINS_DEFINED,' <ul>',implode($types,'') ,'</ul>';
610 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=skinedit&skinid=$current->sdnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
612 $url = $manager->addTicketToUrl('index.php?action=skinclone&skinid=' . intval($current->sdnumber));
613 echo "<td style=\"white-space:nowrap\"><a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>"._LISTS_CLONE."</a></td>";
614 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=skindelete&skinid=$current->sdnumber' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
620 function listplug_table_draftlist($template, $type) {
623 echo "<th>"._LISTS_BLOG."</th><th>"._LISTS_TITLE."</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
626 $current = $template['current'];
628 echo '<td>', htmlspecialchars($current->bshortname) , '</td>';
629 echo '<td>', htmlspecialchars(strip_tags($current->ititle)) , '</td>';
630 echo "<td><a href='index.php?action=itemedit&itemid=$current->inumber'>"._LISTS_EDIT."</a></td>";
631 echo "<td><a href='index.php?action=itemdelete&itemid=$current->inumber'>"._LISTS_DELETE."</a></td>";
638 function listplug_table_actionlist($template, $type) {
641 echo '<th>'._LISTS_TIME.'</th><th>'._LIST_ACTION_MSG.'</th>';
644 $current = $template['current'];
646 echo '<td>' , htmlspecialchars($current->timestamp), '</td>';
647 echo '<td>' , htmlspecialchars($current->message), '</td>';
653 function listplug_table_banlist($template, $type) {
656 echo '<th>'._LIST_BAN_IPRANGE.'</th><th>'. _LIST_BAN_REASON.'</th><th>'._LISTS_ACTIONS.'</th>';
659 $current = $template['current'];
661 echo '<td>' , htmlspecialchars($current->iprange) , '</td>';
662 echo '<td>' , htmlspecialchars($current->reason) , '</td>';
663 echo "<td><a href='index.php?action=banlistdelete&blogid=", intval($current->blogid) , "&iprange=" , htmlspecialchars($current->iprange) , "'>",_LISTS_DELETE,"</a></td>";