'; // add extra row if needed if (ifset($template['extra'])) { echo ''; } break; case 'BODY': $current = $template['current']; echo ''; break; case 'FOOT': echo ''; break; } } function listplug_table($template, $type) { switch($type) { case 'HEAD': echo ""; echo ""; // print head call_user_func("listplug_table_" . $template['content'] , $template, 'HEAD'); echo ""; break; case 'BODY': // print tabletype specific thingies echo ""; call_user_func("listplug_table_" . $template['content'] , $template, 'BODY'); echo ""; break; case 'FOOT': call_user_func("listplug_table_" . $template['content'] , $template, 'FOOT'); echo "
"; break; } } function listplug_table_memberlist($template, $type) { switch($type) { case 'HEAD': echo '' . _LIST_MEMBER_NAME . '' . _LIST_MEMBER_RNAME . '' . _LIST_MEMBER_URL . '' . _LIST_MEMBER_ADMIN; help('superadmin'); echo "" . _LIST_MEMBER_LOGIN; help('canlogin'); echo "" . _LISTS_ACTIONS. ""; break; case 'BODY': $current = $template['current']; echo ''; $id = listplug_nextBatchId(); echo ''; echo ''; echo ''; echo '', htmlspecialchars($current->mrealname), ''; echo "", htmlspecialchars($current->murl), ""; echo '', ($current->madmin ? _YES : _NO),''; echo '', ($current->mcanlogin ? _YES : _NO), ''; echo ""._LISTS_EDIT.""; echo ""._LISTS_DELETE.""; break; } } function listplug_table_teamlist($template, $type) { global $manager; switch($type) { case 'HEAD': echo ""._LIST_MEMBER_NAME.""._LIST_MEMBER_RNAME.""._LIST_TEAM_ADMIN; help('teamadmin'); echo ""._LISTS_ACTIONS.""; break; case 'BODY': $current = $template['current']; echo ''; $id = listplug_nextBatchId(); echo ''; echo ''; echo ''; echo '', htmlspecialchars($current->mrealname), ''; echo '', ($current->tadmin ? _YES : _NO) , ''; echo ""._LISTS_DELETE.""; $url = 'index.php?action=teamchangeadmin&memberid=' . intval($current->tmember) . '&blogid=' . intval($current->tblog); $url = $manager->addTicketToUrl($url); echo ""._LIST_TEAM_CHADMIN.""; break; } } function listplug_table_pluginlist($template, $type) { global $manager; switch($type) { case 'HEAD': echo ''._LISTS_INFO.''._LISTS_DESC.''; echo ''._LISTS_ACTIONS.''; break; case 'BODY': $current = $template['current']; $plug =& $manager->getPlugin($current->pfile); if ($plug) { echo ''; echo '' , htmlspecialchars($plug->getName()) , '
'; echo _LIST_PLUGS_AUTHOR, ' ' , htmlspecialchars($plug->getAuthor()) , '
'; echo _LIST_PLUGS_VER, ' ' , htmlspecialchars($plug->getVersion()) , '
'; if ($plug->getURL()) echo '',_LIST_PLUGS_SITE,'
'; // echo ''.htmlspecialchars(shorten($plug->getURL(), 25, '...')),'
'; echo ''; echo ''; echo _LIST_PLUGS_DESC .'
'. encode_desc($plug->getDescription()); if (sizeof($plug->getEventList()) > 0) { echo '

',_LIST_PLUGS_SUBS,'
',htmlspecialchars(implode($plug->getEventList(),', ')); // check the database to see if it is up-to-date and notice the user if not } if (!$plug->subscribtionListIsUptodate()) { echo '

',_LIST_PLUG_SUBS_NEEDUPDATE,''; } if (sizeof($plug->getPluginDep()) > 0) { echo '

',_LIST_PLUGS_DEP,'
',htmlspecialchars(implode($plug->getPluginDep(),', ')); } // // check dependency require $req = array(); $res = sql_query('SELECT pfile FROM ' . sql_table('plugin')); while($o = sql_fetch_object($res)) { $preq =& $manager->getPlugin($o->pfile); if ($preq) { $depList = $preq->getPluginDep(); foreach ($depList as $depName) { if ($current->pfile == $depName) { $req[] = $o->pfile; } } } } if (count($req) > 0) { echo '

' . _LIST_PLUGS_DEPREQ . "

\n"; echo '

'; echo htmlspecialchars(implode(', ', $req), ENT_QUOTES); echo "

\n"; } //
echo ''; } else { echo '' . sprintf(_PLUGINFILE_COULDNT_BELOADED, htmlspecialchars($current->pfile, ENT_QUOTES)) . ''; } echo ''; $baseUrl = 'index.php?plugid=' . intval($current->pid) . '&action='; $url = $manager->addTicketToUrl($baseUrl . 'pluginup'); echo "",_LIST_PLUGS_UP,""; $url = $manager->addTicketToUrl($baseUrl . 'plugindown'); echo "
",_LIST_PLUGS_DOWN,""; echo "
",_LIST_PLUGS_UNINSTALL,""; if ($plug && ($plug->hasAdminArea() > 0)) echo "
",_LIST_PLUGS_ADMIN,""; if ($plug && ($plug->supportsFeature('HelpPage') > 0)) echo "
",_LIST_PLUGS_HELP,""; if (quickQuery('SELECT COUNT(*) AS result FROM '.sql_table('plugin_option_desc').' WHERE ocontext=\'global\' and opid='.$current->pid) > 0) echo "
",_LIST_PLUGS_OPTIONS,""; echo ''; break; } } function listplug_table_plugoptionlist($template, $type) { global $manager; switch($type) { case 'HEAD': echo ''._LISTS_INFO.''._LISTS_VALUE.''; break; case 'BODY': $current = $template['current']; listplug_plugOptionRow($current); break; case 'FOOT': ?> ',htmlspecialchars($current['description']?$current['description']:$current['name']),''; echo ''; switch($current['type']) { case 'yesno': ADMIN::input_yesno($varname, $current['value'], 0, 'yes', 'no'); break; case 'password': echo ''; break; case 'select': echo ''; break; case 'textarea': //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']); echo ''; break; case 'text': default: //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']); echo ''; } echo @$current['extra']; echo ''; } } function listplug_table_itemlist($template, $type) { $cssclass = null; switch($type) { case 'HEAD': echo ""._LIST_ITEM_INFO.""._LIST_ITEM_CONTENT.""._LISTS_ACTIONS.""; break; case 'BODY': $current = $template['current']; $current->itime = strtotime($current->itime); // string -> unix timestamp if ($current->idraft == 1) $cssclass = "class='draft'"; // (can't use offset time since offsets might vary between blogs) if ($current->itime > $template['now']) $cssclass = "class='future'"; echo "",_LIST_ITEM_BLOG,' ', htmlspecialchars($current->bshortname); echo "
",_LIST_ITEM_CAT,' ', htmlspecialchars($current->cname); echo "
",_LIST_ITEM_AUTHOR, ' ', htmlspecialchars($current->mname); echo "
",_LIST_ITEM_DATE," " . date("Y-m-d",$current->itime); echo "
",_LIST_ITEM_TIME," " . date("H:i",$current->itime); echo ""; echo ""; $id = listplug_nextBatchId(); echo ''; echo ''; echo "
"; $current->ibody = strip_tags($current->ibody); $current->ibody = htmlspecialchars(shorten($current->ibody,300,'...')); $COMMENTS = new COMMENTS($current->inumber); echo "$current->ibody"; echo ""; echo ""._LISTS_EDIT.""; // evaluate amount of comments for the item $camount = $COMMENTS->amountComments(); if ($camount>0) { echo "
"; echo "( " . sprintf(_LIST_ITEM_COMMENTS, $COMMENTS->amountComments())." )"; } else { echo "
"._LIST_ITEM_NOCONTENT; } echo "
"._LISTS_MOVE.""; echo "
"._LISTS_DELETE.""; echo ""; break; } } // for batch operations: generates the index numbers for checkboxes function listplug_nextBatchId() { static $id = 0; return $id++; } function listplug_table_commentlist($template, $type) { switch($type) { case 'HEAD': echo ""._LISTS_INFO.""._LIST_COMMENT.""._LISTS_ACTIONS.""; break; case 'BODY': $current = $template['current']; $current->ctime = strtotime($current->ctime); // string -> unix timestamp echo ''; echo date("Y-m-d@H:i",$current->ctime); echo '
'; if ($current->mname) echo htmlspecialchars($current->mname) ,' ', _LIST_COMMENTS_MEMBER; else echo htmlspecialchars($current->cuser); if ($current->cmail != '') { echo '
'; echo htmlspecialchars($current->cmail); } if ($current->cemail != '') { echo '
'; echo htmlspecialchars($current->cemail); } echo ''; $current->cbody = strip_tags($current->cbody); $current->cbody = htmlspecialchars(shorten($current->cbody, 300, '...')); echo ''; $id = listplug_nextBatchId(); echo ''; echo ''; echo ''; echo ""._LISTS_EDIT.""; echo ""._LISTS_DELETE.""; if ($template['canAddBan']) echo ""._LIST_COMMENT_BANIP.""; break; } } function listplug_table_bloglist($template, $type) { switch($type) { case 'HEAD': echo "" . _NAME . "" ._LISTS_ACTIONS. ""; break; case 'BODY': $current = $template['current']; echo "". _BLOGLIST_TT_VISIT." " . htmlspecialchars($current->bname) . ""; echo "" . _BLOGLIST_ADD . ""; echo "". _BLOGLIST_EDIT.""; echo "". _BLOGLIST_COMMENTS.""; echo "". _BLOGLIST_BMLET . ""; if ($current->tadmin == 1) { echo "" ._BLOGLIST_SETTINGS. ""; echo "". _BLOGLIST_BANS.""; } if ($template['superadmin']) { echo "" ._BLOGLIST_DELETE. ""; } break; } } function listplug_table_shortblognames($template, $type) { switch($type) { case 'HEAD': echo "" . _EBLOG_SHORTNAME . "" . _EBLOG_NAME. ""; break; case 'BODY': $current = $template['current']; echo '' , htmlspecialchars($current->bshortname) , ''; echo '' , htmlspecialchars($current->bname) , ''; break; } } function listplug_table_shortnames($template, $type) { switch($type) { case 'HEAD': echo "" . _NAME . "" . _LISTS_DESC. ""; break; case 'BODY': $current = $template['current']; echo '' , htmlspecialchars($current->name) , ''; echo '' , htmlspecialchars($current->description) , ''; break; } } function listplug_table_categorylist($template, $type) { switch($type) { case 'HEAD': echo ""._LISTS_NAME.""._LISTS_DESC.""._LISTS_ACTIONS.""; break; case 'BODY': $current = $template['current']; echo ''; $id = listplug_nextBatchId(); echo ''; echo ''; echo ''; echo '', htmlspecialchars($current->cdesc), ''; echo ""._LISTS_DELETE.""; echo ""._LISTS_EDIT.""; break; } } function listplug_table_templatelist($template, $type) { global $manager; switch($type) { case 'HEAD': echo ""._LISTS_NAME.""._LISTS_DESC.""._LISTS_ACTIONS.""; break; case 'BODY': $current = $template['current']; echo "" , htmlspecialchars($current->tdname), ""; echo "" , htmlspecialchars($current->tddesc), ""; echo ""._LISTS_EDIT.""; $url = $manager->addTicketToUrl('index.php?action=templateclone&templateid=' . intval($current->tdnumber)); echo ""._LISTS_CLONE.""; echo ""._LISTS_DELETE.""; break; } } function listplug_table_skinlist($template, $type) { global $CONF, $DIR_SKINS, $manager; switch($type) { case 'HEAD': echo ""._LISTS_NAME.""._LISTS_DESC.""._LISTS_ACTIONS.""; break; case 'BODY': $current = $template['current']; echo ''; // use a special style for the default skin if ($current->sdnumber == $CONF['BaseSkin']) { echo '',htmlspecialchars($current->sdname),''; } else { echo htmlspecialchars($current->sdname); } echo '

'; echo _LISTS_TYPE ,': ' , htmlspecialchars($current->sdtype); echo '
', _LIST_SKINS_INCMODE , ' ' , (($current->sdincmode=='skindir') ?_PARSER_INCMODE_SKINDIR:_PARSER_INCMODE_NORMAL); if ($current->sdincpref) echo '
' , _LIST_SKINS_INCPREFIX , ' ', htmlspecialchars($current->sdincpref); // add preview image when present if ($current->sdincpref && @file_exists($DIR_SKINS . $current->sdincpref . 'preview.png')) { echo '

'; $hasEnlargement = @file_exists($DIR_SKINS . $current->sdincpref . 'preview-large.png'); if ($hasEnlargement) echo ''; $imgAlt = sprintf(_LIST_SKIN_PREVIEW, htmlspecialchars($current->sdname, ENT_QUOTES)); echo '' . $imgAlt . ''; if ($hasEnlargement) echo ''; if (@file_exists($DIR_SKINS . $current->sdincpref . 'readme.html')) { $url = $CONF['SkinsURL'] . htmlspecialchars($current->sdincpref, ENT_QUOTES) . 'readme.html'; $readmeTitle = sprintf(_LIST_SKIN_README, htmlspecialchars($current->sdname, ENT_QUOTES)); echo '
' . _LIST_SKIN_README_TXT . ''; } } echo ""; echo '' . htmlspecialchars($current->sddesc); // show list of defined parts $r = sql_query('SELECT stype FROM '.sql_table('skin').' WHERE sdesc='.$current->sdnumber . ' ORDER BY stype'); $types = array(); while ($o = sql_fetch_object($r)) array_push($types,$o->stype); if (sizeof($types) > 0) { $friendlyNames = SKIN::getFriendlyNames(); for ($i=0;$i' . htmlspecialchars($friendlyNames[$type]) . ""; } else { $types[$i] = '
  • ' . helpHtml('skinpartspecial') . ' ' . htmlspecialchars($friendlyNames[$type]) . "
  • "; } } echo '

    ',_LIST_SKINS_DEFINED,' '; } echo ""; echo ""._LISTS_EDIT.""; $url = $manager->addTicketToUrl('index.php?action=skinclone&skinid=' . intval($current->sdnumber)); echo ""._LISTS_CLONE.""; echo ""._LISTS_DELETE.""; break; } } function listplug_table_draftlist($template, $type) { switch($type) { case 'HEAD': echo ""._LISTS_BLOG.""._LISTS_TITLE.""._LISTS_ACTIONS.""; break; case 'BODY': $current = $template['current']; echo '', htmlspecialchars($current->bshortname) , ''; echo '', htmlspecialchars(strip_tags($current->ititle)) , ''; echo ""._LISTS_EDIT.""; echo ""._LISTS_DELETE.""; break; } } function listplug_table_actionlist($template, $type) { switch($type) { case 'HEAD': echo ''._LISTS_TIME.''._LIST_ACTION_MSG.''; break; case 'BODY': $current = $template['current']; echo '' , htmlspecialchars($current->timestamp), ''; echo '' , htmlspecialchars($current->message), ''; break; } } function listplug_table_banlist($template, $type) { switch($type) { case 'HEAD': echo ''._LIST_BAN_IPRANGE.''. _LIST_BAN_REASON.''._LISTS_ACTIONS.''; break; case 'BODY': $current = $template['current']; echo '' , htmlspecialchars($current->iprange) , ''; echo '' , htmlspecialchars($current->reason) , ''; echo "",_LISTS_DELETE,""; break; } } ?>