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
\r
23 function showlist($query, $type, $template) {
\r
25 if (is_array($query)) {
\r
26 if (sizeof($query) == 0)
\r
29 call_user_func('listplug_' . $type, $template, 'HEAD');
\r
31 foreach ($query as $currentObj) {
\r
32 $template['current'] = $currentObj;
\r
33 call_user_func('listplug_' . $type, $template, 'BODY');
\r
36 call_user_func('listplug_' . $type, $template, 'FOOT');
\r
38 return sizeof($query);
\r
41 $res = sql_query($query);
\r
43 // don't do anything if there are no results
\r
44 $numrows = mysql_num_rows($res);
\r
48 call_user_func('listplug_' . $type, $template, 'HEAD');
\r
50 while($template['current'] = mysql_fetch_object($res))
\r
51 call_user_func('listplug_' . $type, $template, 'BODY');
\r
53 call_user_func('listplug_' . $type, $template, 'FOOT');
\r
55 mysql_free_result($res);
\r
57 // return amount of results
\r
62 function listplug_select($template, $type) {
\r
65 echo '<select name="' . ifset($template['name']) . '" tabindex="' . ifset($template['tabindex']) . '" ' . ifset($template['javascript']) . '>';
\r
67 // add extra row if needed
\r
68 if (ifset($template['extra'])) {
\r
69 echo '<option value="', ifset($template['extraval']), '">', $template['extra'], '</option>';
\r
74 $current = $template['current'];
\r
76 echo '<option value="' . htmlspecialchars($current->value) . '"';
\r
77 if ($template['selected'] == $current->value)
\r
78 echo ' selected="selected" ';
\r
79 if (isset($template['shorten']) && $template['shorten'] > 0) {
\r
80 echo ' title="'. htmlspecialchars($current->text).'"';
\r
81 $current->text = shorten($current->text, $template['shorten'], $template['shortenel']);
\r
83 echo '>' . htmlspecialchars($current->text) . '</option>';
\r
91 function listplug_table($template, $type) {
\r
97 call_user_func("listplug_table_" . $template['content'] , $template, 'HEAD');
\r
98 echo "</tr></thead><tbody>";
\r
101 // print tabletype specific thingies
\r
102 echo "<tr onmouseover='focusRow(this);' onmouseout='blurRow(this);'>";
\r
103 call_user_func("listplug_table_" . $template['content'] , $template, 'BODY');
\r
107 call_user_func("listplug_table_" . $template['content'] , $template, 'FOOT');
\r
108 echo "</tbody></table>";
\r
113 function listplug_table_memberlist($template, $type) {
\r
116 echo '<th>' . _LIST_MEMBER_NAME . '</th><th>' . _LIST_MEMBER_RNAME . '</th><th>' . _LIST_MEMBER_URL . '</th><th>' . _LIST_MEMBER_ADMIN;
\r
117 help('superadmin');
\r
118 echo "</th><th>" . _LIST_MEMBER_LOGIN;
\r
120 echo "</th><th colspan='2'>" . _LISTS_ACTIONS. "</th>";
\r
123 $current = $template['current'];
\r
126 $id = listplug_nextBatchId();
\r
127 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->mnumber,'" />';
\r
128 echo '<label for="batch',$id,'">';
\r
129 echo "<a href='mailto:", htmlspecialchars($current->memail), "' tabindex='".$template['tabindex']."'>", htmlspecialchars($current->mname), "</a>";
\r
132 echo '<td>', htmlspecialchars($current->mrealname), '</td>';
\r
133 echo "<td><a href='", htmlspecialchars($current->murl), "' tabindex='", $template['tabindex'] , "'>", htmlspecialchars($current->murl), "</a></td>";
\r
134 echo '<td>', ($current->madmin ? _YES : _NO),'</td>';
\r
135 echo '<td>', ($current->mcanlogin ? _YES : _NO), '</td>';
\r
136 echo "<td><a href='index.php?action=memberedit&memberid=$current->mnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
\r
137 echo "<td><a href='index.php?action=memberdelete&memberid=$current->mnumber' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
\r
142 function listplug_table_teamlist($template, $type) {
\r
146 echo "<th>"._LIST_MEMBER_NAME."</th><th>"._LIST_MEMBER_RNAME."</th><th>"._LIST_TEAM_ADMIN;
\r
148 echo "</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
\r
151 $current = $template['current'];
\r
154 $id = listplug_nextBatchId();
\r
155 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->tmember,'" />';
\r
156 echo '<label for="batch',$id,'">';
\r
157 echo "<a href='mailto:", htmlspecialchars($current->memail), "' tabindex='".$template['tabindex']."'>", htmlspecialchars($current->mname), "</a>";
\r
160 echo '<td>', htmlspecialchars($current->mrealname), '</td>';
\r
161 echo '<td>', ($current->tadmin ? _YES : _NO) , '</td>';
\r
162 echo "<td><a href='index.php?action=teamdelete&memberid=$current->tmember&blogid=$current->tblog' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
\r
164 $url = 'index.php?action=teamchangeadmin&memberid=' . intval($current->tmember) . '&blogid=' . intval($current->tblog);
\r
165 $url = $manager->addTicketToUrl($url);
\r
166 echo "<td><a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>"._LIST_TEAM_CHADMIN."</a></td>";
\r
171 function listplug_table_pluginlist($template, $type) {
\r
175 echo '<th>'._LISTS_INFO.'</th><th>'._LISTS_DESC.'</th>';
\r
176 echo '<th style="white-space:nowrap">'._LISTS_ACTIONS.'</th>';
\r
179 $current = $template['current'];
\r
181 $plug =& $manager->getPlugin($current->pfile);
\r
184 echo '<strong>' , htmlspecialchars($plug->getName()) , '</strong><br />';
\r
185 echo _LIST_PLUGS_AUTHOR, ' ' , htmlspecialchars($plug->getAuthor()) , '<br />';
\r
186 echo _LIST_PLUGS_VER, ' ' , htmlspecialchars($plug->getVersion()) , '<br />';
\r
187 if ($plug->getURL())
\r
188 echo '<a href="',htmlspecialchars($plug->getURL()),'" tabindex="'.$template['tabindex'].'">',_LIST_PLUGS_SITE,'</a><br />';
\r
191 echo _LIST_PLUGS_DESC .'<br/>'. encode_desc($plug->getDescription());
\r
192 if (sizeof($plug->getEventList()) > 0) {
\r
193 echo '<br /><br />',_LIST_PLUGS_SUBS,'<br />',htmlspecialchars(implode($plug->getEventList(),', '));
\r
194 // check the database to see if it is up-to-date and notice the user if not
\r
196 if (!$plug->subscribtionListIsUptodate()) {
\r
197 echo '<br /><br /><strong>',_LIST_PLUG_SUBS_NEEDUPDATE,'</strong>';
\r
199 if (sizeof($plug->getPluginDep()) > 0) {
\r
200 echo '<br /><br />',_LIST_PLUGS_DEP,'<br />',htmlspecialchars(implode($plug->getPluginDep(),', '));
\r
202 // <add by shizuki>
\r
203 // check dependency require
\r
205 $res = sql_query('SELECT pfile FROM ' . sql_table('plugin'));
\r
206 while($o = mysql_fetch_object($res)) {
\r
207 $preq =& $manager->getPlugin($o->pfile);
\r
209 $depList = $preq->getPluginDep();
\r
210 foreach ($depList as $depName) {
\r
211 if ($current->pfile == $depName) {
\r
212 $req[] = $o->pfile;
\r
217 if (count($req) > 0) {
\r
218 echo '<h4 class="plugin_dependreq_title">' . _LIST_PLUGS_DEPREQ . "</h4>\n";
\r
219 echo '<p class="plugin_dependreq_text">';
\r
220 echo htmlspecialchars(implode(', ', $req), ENT_QUOTES);
\r
223 // </add by shizuki>
\r
226 echo '<td colspan="2">' . sprintf(_PLUGINFILE_COULDNT_BELOADED, htmlspecialchars($current->pfile, ENT_QUOTES)) . '</td>';
\r
230 $baseUrl = 'index.php?plugid=' . intval($current->pid) . '&action=';
\r
231 $url = $manager->addTicketToUrl($baseUrl . 'pluginup');
\r
232 echo "<a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_UP,"</a>";
\r
233 $url = $manager->addTicketToUrl($baseUrl . 'plugindown');
\r
234 echo "<br /><a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_DOWN,"</a>";
\r
235 echo "<br /><a href='index.php?action=plugindelete&plugid=$current->pid' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_UNINSTALL,"</a>";
\r
236 if ($plug && ($plug->hasAdminArea() > 0))
\r
237 echo "<br /><a href='".htmlspecialchars($plug->getAdminURL())."' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_ADMIN,"</a>";
\r
238 if ($plug && ($plug->supportsFeature('HelpPage') > 0))
\r
239 echo "<br /><a href='index.php?action=pluginhelp&plugid=$current->pid' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_HELP,"</a>";
\r
240 if (quickQuery('SELECT COUNT(*) AS result FROM '.sql_table('plugin_option_desc').' WHERE ocontext=\'global\' and opid='.$current->pid) > 0)
\r
241 echo "<br /><a href='index.php?action=pluginoptions&plugid=$current->pid' tabindex='".$template['tabindex']."'>",_LIST_PLUGS_OPTIONS,"</a>";
\r
247 function listplug_table_plugoptionlist($template, $type) {
\r
251 echo '<th>'._LISTS_INFO.'</th><th>'._LISTS_VALUE.'</th>';
\r
254 $current = $template['current'];
\r
255 listplug_plugOptionRow($current);
\r
260 <th colspan="2"><?php echo _PLUGS_SAVE?></th>
\r
262 <td><?php echo _PLUGS_SAVE?></td>
\r
263 <td><input type="submit" value="<?php echo _PLUGS_SAVE?>" /></td>
\r
269 function listplug_plugOptionRow($current) {
\r
270 $varname = 'plugoption['.$current['oid'].']['.$current['contextid'].']';
\r
271 // retreive the optionmeta
\r
272 $meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
\r
274 // only if it is not a hidden option write the controls to the page
\r
275 if (@$meta['access'] != 'hidden') {
\r
276 echo '<td>',htmlspecialchars($current['description']?$current['description']:$current['name']),'</td>';
\r
278 switch($current['type']) {
\r
280 ADMIN::input_yesno($varname, $current['value'], 0, 'yes', 'no');
\r
283 echo '<input type="password" size="40" maxlength="128" name="',htmlspecialchars($varname),'" value="',htmlspecialchars($current['value']),'" />';
\r
286 echo '<select name="'.htmlspecialchars($varname).'">';
\r
287 $aOptions = NucleusPlugin::getOptionSelectValues($current['typeinfo']);
\r
288 $aOptions = explode('|', $aOptions);
\r
289 for ($i=0; $i<(count($aOptions)-1); $i+=2) {
\r
290 echo '<option value="'.htmlspecialchars($aOptions[$i+1]).'"';
\r
291 if ($aOptions[$i+1] == $current['value'])
\r
292 echo ' selected="selected"';
\r
293 echo '>'.htmlspecialchars($aOptions[$i]).'</option>';
\r
298 //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
\r
299 echo '<textarea class="pluginoption" cols="30" rows="5" name="',htmlspecialchars($varname),'"';
\r
300 if (@$meta['access'] == 'readonly') {
\r
301 echo ' readonly="readonly"';
\r
303 echo '>',htmlspecialchars($current['value']),'</textarea>';
\r
307 //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
\r
309 echo '<input type="text" size="40" maxlength="128" name="',htmlspecialchars($varname),'" value="',htmlspecialchars($current['value']),'"';
\r
310 if (@$meta['datatype'] == 'numerical') {
\r
311 echo ' onkeyup="checkNumeric(this)" onblur="checkNumeric(this)"';
\r
313 if (@$meta['access'] == 'readonly') {
\r
314 echo ' readonly="readonly"';
\r
318 echo @$current['extra'];
\r
323 function listplug_table_itemlist($template, $type) {
\r
328 echo "<th>"._LIST_ITEM_INFO."</th><th>"._LIST_ITEM_CONTENT."</th><th style=\"white-space:nowrap\" colspan='1'>"._LISTS_ACTIONS."</th>";
\r
331 $current = $template['current'];
\r
332 $current->itime = strtotime($current->itime); // string -> unix timestamp
\r
334 if ($current->idraft == 1)
\r
335 $cssclass = "class='draft'";
\r
337 // (can't use offset time since offsets might vary between blogs)
\r
338 if ($current->itime > $template['now'])
\r
339 $cssclass = "class='future'";
\r
341 echo "<td $cssclass>",_LIST_ITEM_BLOG,' ', htmlspecialchars($current->bshortname);
\r
342 echo " <br />",_LIST_ITEM_CAT,' ', htmlspecialchars($current->cname);
\r
343 echo " <br />",_LIST_ITEM_AUTHOR, ' ', htmlspecialchars($current->mname);
\r
344 echo " <br />",_LIST_ITEM_DATE," " . date("Y-m-d",$current->itime);
\r
345 echo "<br />",_LIST_ITEM_TIME," " . date("H:i",$current->itime);
\r
347 echo "<td $cssclass>";
\r
349 $id = listplug_nextBatchId();
\r
351 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->inumber,'" />';
\r
352 echo '<label for="batch',$id,'">';
\r
353 echo "<b>" . htmlspecialchars(strip_tags($current->ititle)) . "</b>";
\r
358 $current->ibody = strip_tags($current->ibody);
\r
359 $current->ibody = htmlspecialchars(shorten($current->ibody,300,'...'));
\r
361 $COMMENTS = new COMMENTS($current->inumber);
\r
362 echo "$current->ibody</td>";
\r
363 echo "<td style=\"white-space:nowrap\" $cssclass>";
\r
364 echo "<a href='index.php?action=itemedit&itemid=$current->inumber'>"._LISTS_EDIT."</a>";
\r
365 // evaluate amount of comments for the item
\r
366 $camount = $COMMENTS->amountComments();
\r
368 echo "<br /><a href='index.php?action=itemcommentlist&itemid=$current->inumber'>"._LISTS_COMMENTS;
\r
369 echo '(' . $COMMENTS->amountComments() . ')'."</a>";
\r
372 echo "<br />"._TEMPLATE_CNONE;
\r
374 echo "<br /><a href='index.php?action=itemmove&itemid=$current->inumber'>"._LISTS_MOVE."</a>";
\r
375 echo "<br /><a href='index.php?action=itemdelete&itemid=$current->inumber'>"._LISTS_DELETE."</a>";
\r
381 // for batch operations: generates the index numbers for checkboxes
\r
382 function listplug_nextBatchId() {
\r
387 function listplug_table_commentlist($template, $type) {
\r
390 echo "<th>"._LISTS_INFO."</th><th>"._LIST_COMMENT."</th><th colspan='3'>"._LISTS_ACTIONS."</th>";
\r
393 $current = $template['current'];
\r
394 $current->ctime = strtotime($current->ctime); // string -> unix timestamp
\r
397 echo date("Y-m-d@H:i",$current->ctime);
\r
399 if ($current->mname)
\r
400 echo htmlspecialchars($current->mname) ,' ', _LIST_COMMENTS_MEMBER;
\r
402 echo htmlspecialchars($current->cuser);
\r
403 if ($current->cmail != '') {
\r
405 echo htmlspecialchars($current->cmail);
\r
407 if ($current->cemail != '') {
\r
409 echo htmlspecialchars($current->cemail);
\r
413 $current->cbody = strip_tags($current->cbody);
\r
414 $current->cbody = htmlspecialchars(shorten($current->cbody, 300, '...'));
\r
417 $id = listplug_nextBatchId();
\r
418 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->cnumber,'" />';
\r
419 echo '<label for="batch',$id,'">';
\r
420 echo $current->cbody;
\r
424 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=commentedit&commentid=$current->cnumber'>"._LISTS_EDIT."</a></td>";
\r
425 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=commentdelete&commentid=$current->cnumber'>"._LISTS_DELETE."</a></td>";
\r
426 if ($template['canAddBan'])
\r
427 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>";
\r
433 function listplug_table_bloglist($template, $type) {
\r
436 echo "<th>" . _NAME . "</th><th colspan='7'>" ._LISTS_ACTIONS. "</th>";
\r
439 $current = $template['current'];
\r
441 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>";
\r
442 echo "<td><a href='index.php?action=createitem&blogid=$current->bnumber' title='" . _BLOGLIST_TT_ADD ."'>" . _BLOGLIST_ADD . "</a></td>";
\r
443 echo "<td><a href='index.php?action=itemlist&blogid=$current->bnumber' title='". _BLOGLIST_TT_EDIT."'>". _BLOGLIST_EDIT."</a></td>";
\r
444 echo "<td><a href='index.php?action=blogcommentlist&blogid=$current->bnumber' title='". _BLOGLIST_TT_COMMENTS."'>". _BLOGLIST_COMMENTS."</a></td>";
\r
445 echo "<td><a href='index.php?action=bookmarklet&blogid=$current->bnumber' title='". _BLOGLIST_TT_BMLET."'>". _BLOGLIST_BMLET . "</a></td>";
\r
447 if ($current->tadmin == 1) {
\r
448 echo "<td><a href='index.php?action=blogsettings&blogid=$current->bnumber' title='" . _BLOGLIST_TT_SETTINGS . "'>" ._BLOGLIST_SETTINGS. "</a></td>";
\r
449 echo "<td><a href='index.php?action=banlist&blogid=$current->bnumber' title='" . _BLOGLIST_TT_BANS. "'>". _BLOGLIST_BANS."</a></td>";
\r
452 if ($template['superadmin']) {
\r
453 echo "<td><a href='index.php?action=deleteblog&blogid=$current->bnumber' title='". _BLOGLIST_TT_DELETE."'>" ._BLOGLIST_DELETE. "</a></td>";
\r
462 function listplug_table_shortblognames($template, $type) {
\r
465 echo "<th>" . _EBLOG_SHORTNAME . "</th><th>" . _EBLOG_NAME. "</th>";
\r
468 $current = $template['current'];
\r
470 echo '<td>' , htmlspecialchars($current->bshortname) , '</td>';
\r
471 echo '<td>' , htmlspecialchars($current->bname) , '</td>';
\r
477 function listplug_table_shortnames($template, $type) {
\r
480 echo "<th>" . _NAME . "</th><th>" . _LISTS_DESC. "</th>";
\r
483 $current = $template['current'];
\r
485 echo '<td>' , htmlspecialchars($current->name) , '</td>';
\r
486 echo '<td>' , htmlspecialchars($current->description) , '</td>';
\r
493 function listplug_table_categorylist($template, $type) {
\r
496 echo "<th>"._LISTS_NAME."</th><th>"._LISTS_DESC."</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
\r
499 $current = $template['current'];
\r
502 $id = listplug_nextBatchId();
\r
503 echo '<input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->catid,'" />';
\r
504 echo '<label for="batch',$id,'">';
\r
505 echo htmlspecialchars($current->cname);
\r
509 echo '<td>', htmlspecialchars($current->cdesc), '</td>';
\r
510 echo "<td><a href='index.php?action=categorydelete&blogid=$current->cblog&catid=$current->catid' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
\r
511 echo "<td><a href='index.php?action=categoryedit&blogid=$current->cblog&catid=$current->catid' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
\r
518 function listplug_table_templatelist($template, $type) {
\r
522 echo "<th>"._LISTS_NAME."</th><th>"._LISTS_DESC."</th><th colspan='3'>"._LISTS_ACTIONS."</th>";
\r
525 $current = $template['current'];
\r
527 echo "<td>" , htmlspecialchars($current->tdname), "</td>";
\r
528 echo "<td>" , htmlspecialchars($current->tddesc), "</td>";
\r
529 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=templateedit&templateid=$current->tdnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
\r
531 $url = $manager->addTicketToUrl('index.php?action=templateclone&templateid=' . intval($current->tdnumber));
\r
532 echo "<td style=\"white-space:nowrap\"><a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>"._LISTS_CLONE."</a></td>";
\r
533 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=templatedelete&templateid=$current->tdnumber' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
\r
539 function listplug_table_skinlist($template, $type) {
\r
540 global $CONF, $DIR_SKINS, $manager;
\r
543 echo "<th>"._LISTS_NAME."</th><th>"._LISTS_DESC."</th><th colspan='3'>"._LISTS_ACTIONS."</th>";
\r
546 $current = $template['current'];
\r
550 // use a special style for the default skin
\r
551 if ($current->sdnumber == $CONF['BaseSkin']) {
\r
552 echo '<strong>',htmlspecialchars($current->sdname),'</strong>';
\r
554 echo htmlspecialchars($current->sdname);
\r
557 echo '<br /><br />';
\r
558 echo _LISTS_TYPE ,': ' , htmlspecialchars($current->sdtype);
\r
559 echo '<br />', _LIST_SKINS_INCMODE , ' ' , (($current->sdincmode=='skindir') ?_PARSER_INCMODE_SKINDIR:_PARSER_INCMODE_NORMAL);
\r
560 if ($current->sdincpref) echo '<br />' , _LIST_SKINS_INCPREFIX , ' ', htmlspecialchars($current->sdincpref);
\r
562 // add preview image when present
\r
563 if ($current->sdincpref && @file_exists($DIR_SKINS . $current->sdincpref . 'preview.png'))
\r
565 echo '<br /><br />';
\r
567 $hasEnlargement = @file_exists($DIR_SKINS . $current->sdincpref . 'preview-large.png');
\r
568 if ($hasEnlargement)
\r
569 echo '<a href="',$CONF['SkinsURL'], htmlspecialchars($current->sdincpref),'preview-large.png" title="' . _LIST_SKIN_PREVIEW_VIEWLARGER . '">';
\r
571 $imgAlt = sprintf(_LIST_SKIN_PREVIEW, htmlspecialchars($current->sdname, ENT_QUOTES));
\r
572 echo '<img class="skinpreview" src="',$CONF['SkinsURL'], htmlspecialchars($current->sdincpref),'preview.png" width="100" height="75" alt="' . $imgAlt . '" />';
\r
574 if ($hasEnlargement)
\r
577 if (@file_exists($DIR_SKINS . $current->sdincpref . 'readme.html'))
\r
579 $url = $CONF['SkinsURL'] . htmlspecialchars($current->sdincpref, ENT_QUOTES) . 'readme.html';
\r
580 $readmeTitle = sprintf(_LIST_SKIN_README, htmlspecialchars($current->sdname, ENT_QUOTES));
\r
581 echo '<br /><a href="' . $url . '" title="' . $readmeTitle . '">' . _LIST_SKIN_README_TXT . '</a>';
\r
590 echo "<td>" , htmlspecialchars($current->sddesc);
\r
591 // show list of defined parts
\r
592 $r = sql_query('SELECT stype FROM '.sql_table('skin').' WHERE sdesc='.$current->sdnumber . ' ORDER BY stype');
\r
594 while ($o = mysql_fetch_object($r))
\r
595 array_push($types,$o->stype);
\r
596 if (sizeof($types) > 0) {
\r
597 $friendlyNames = SKIN::getFriendlyNames();
\r
598 for ($i=0;$i<sizeof($types);$i++) {
\r
599 $type = $types[$i];
\r
600 if (in_array($type, array('index', 'item', 'archivelist', 'archive', 'search', 'error', 'member', 'imagepopup'))) {
\r
601 $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>";
\r
603 $types[$i] = '<li>' . helpHtml('skinpartspecial') . ' <a href="index.php?action=skinedittype&skinid='.$current->sdnumber.'&type='.$type.'" tabindex="'.$template['tabindex'].'">' . htmlspecialchars($friendlyNames[$type]) . "</a></li>";
\r
606 echo '<br /><br />',_LIST_SKINS_DEFINED,' <ul>',implode($types,'') ,'</ul>';
\r
609 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=skinedit&skinid=$current->sdnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";
\r
611 $url = $manager->addTicketToUrl('index.php?action=skinclone&skinid=' . intval($current->sdnumber));
\r
612 echo "<td style=\"white-space:nowrap\"><a href='",htmlspecialchars($url),"' tabindex='".$template['tabindex']."'>"._LISTS_CLONE."</a></td>";
\r
613 echo "<td style=\"white-space:nowrap\"><a href='index.php?action=skindelete&skinid=$current->sdnumber' tabindex='".$template['tabindex']."'>"._LISTS_DELETE."</a></td>";
\r
619 function listplug_table_draftlist($template, $type) {
\r
622 echo "<th>"._LISTS_BLOG."</th><th>"._LISTS_TITLE."</th><th colspan='2'>"._LISTS_ACTIONS."</th>";
\r
625 $current = $template['current'];
\r
627 echo '<td>', htmlspecialchars($current->bshortname) , '</td>';
\r
628 echo '<td>', htmlspecialchars(strip_tags($current->ititle)) , '</td>';
\r
629 echo "<td><a href='index.php?action=itemedit&itemid=$current->inumber'>"._LISTS_EDIT."</a></td>";
\r
630 echo "<td><a href='index.php?action=itemdelete&itemid=$current->inumber'>"._LISTS_DELETE."</a></td>";
\r
637 function listplug_table_actionlist($template, $type) {
\r
640 echo '<th>'._LISTS_TIME.'</th><th>'._LIST_ACTION_MSG.'</th>';
\r
643 $current = $template['current'];
\r
645 echo '<td>' , htmlspecialchars($current->timestamp), '</td>';
\r
646 echo '<td>' , htmlspecialchars($current->message), '</td>';
\r
652 function listplug_table_banlist($template, $type) {
\r
655 echo '<th>'._LIST_BAN_IPRANGE.'</th><th>'. _LIST_BAN_REASON.'</th><th>'._LISTS_ACTIONS.'</th>';
\r
658 $current = $template['current'];
\r
660 echo '<td>' , htmlspecialchars($current->iprange) , '</td>';
\r
661 echo '<td>' , htmlspecialchars($current->reason) , '</td>';
\r
662 echo "<td><a href='index.php?action=banlistdelete&blogid=", intval($current->blogid) , "&iprange=" , htmlspecialchars($current->iprange) , "'>",_LISTS_DELETE,"</a></td>";
\r