\n"; // add extra row if needed if ( ifset($template['extra']) ) { echo '\n"; } break; case 'BODY': $current = $template['current']; echo '\n"; break; case 'FOOT': echo ''; break; } return; } function listplug_table($template, $type) { switch( $type ) { case 'HEAD': echo "\n\n"; echo "\n"; echo "\n"; echo "\n"; // print head call_user_func("listplug_table_{$template['content']}" , $template, 'HEAD'); echo "\n"; echo "\n"; echo "\n"; break; case 'BODY': // print tabletype specific thingies echo "\n"; call_user_func("listplug_table_{$template['content']}" , $template, 'BODY'); echo "\n"; break; case 'FOOT': call_user_func("listplug_table_{$template['content']}" , $template, 'FOOT'); echo "\n"; echo "
\n"; echo "\n"; break; } return; } function listplug_table_memberlist($template, $type) { switch( $type ) { case 'HEAD': echo '' . _LIST_MEMBER_NAME . "\n"; echo '' . _LIST_MEMBER_RNAME . "\n"; echo '' . _LIST_MEMBER_URL . "\n"; echo '' . _LIST_MEMBER_ADMIN . "\n"; help('superadmin'); echo "\n"; echo '' . _LIST_MEMBER_LOGIN; help('canlogin'); echo "\n"; echo '' . _LISTS_ACTIONS. "\n"; break; case 'BODY': $current = $template['current']; echo ''; $id = listplug_nextBatchId(); echo "mnumber}\" />\n"; echo "\n"; echo ""; echo "" . ENTITY::hsc($current->mrealname) . "\n"; echo '' . ENTITY::hsc($current->murl) . "\n"; echo '' . ($current->madmin ? _YES : _NO) . "\n"; echo '' . ($current->mcanlogin ? _YES : _NO) . "\n"; echo '' . _LISTS_EDIT . "\n"; echo '' . _LISTS_DELETE . "\n"; break; } return; } function listplug_table_teamlist($template, $type) { global $manager; switch( $type ) { case 'HEAD': echo "" . _LIST_MEMBER_NAME . "\n"; echo "" . _LIST_MEMBER_RNAME . "\n"; echo "" . _LIST_TEAM_ADMIN . "\n"; help('teamadmin'); echo "\n"; echo ""._LISTS_ACTIONS."\n"; break; case 'BODY': $current = $template['current']; echo ''; $id = listplug_nextBatchId(); echo "tmember}\" />\n"; echo '\n"; echo ""; echo '', ENTITY::hsc($current->mrealname), "\n"; echo '', ($current->tadmin ? _YES : _NO) , "\n"; echo "tmember&blogid={$current->tblog}\" tabindex=\"{$template['tabindex']}\">" . _LISTS_DELETE . "\n"; $url = "index.php?action=teamchangeadmin&memberid={$current->tmember}&blogid={$current->tblog}"; $url = $manager->addTicketToUrl($url); echo '' . _LIST_TEAM_CHADMIN . "\n"; break; } return; } function listplug_table_pluginlist($template, $type) { global $manager; switch( $type ) { case 'HEAD': echo '' . _LISTS_INFO . "\n"; echo '' . _LISTS_DESC . "\n"; echo '' . _LISTS_ACTIONS . "\n"; break; case 'BODY': $current = $template['current']; $plug =& $manager->getPlugin($current->pfile); if ( $plug ) { echo "\n"; echo '

' . ENTITY::hsc($plug->getName()) . "

\n"; echo "
\n"; if ( $plug->getAuthor() ) { echo '
' . _LIST_PLUGS_AUTHOR . "
\n"; echo '
' . ENTITY::hsc($plug->getAuthor()) , "
\n"; } if ( $plug->getVersion() ) { echo '
' . _LIST_PLUGS_VER, "
\n"; echo '
' . ENTITY::hsc($plug->getVersion()) . "
\n"; } if ( $plug->getURL() ) { echo '
' . _LIST_PLUGS_SITE . "
\n"; echo '
リンク
' . "\n"; } echo "
\n"; echo "\n"; echo "\n"; echo "
\n"; echo '
' . _LIST_PLUGS_DESC ."
\n"; echo '
' . ENTITY::hen($plug->getDescription()) ."
\n"; if ( sizeof($plug->getEventList()) > 0 ) { echo '
' . _LIST_PLUGS_SUBS ."
\n"; echo '
' . ENTITY::hsc(implode(', ', $plug->getEventList())) ."
\n"; } if ( sizeof($plug->getPluginDep()) > 0 ) { echo '
' . _LIST_PLUGS_DEP ."
\n"; echo '
' . ENTITY::hsc(implode(', ', $plug->getPluginDep())) ."
\n"; } /* check dependency */ $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 '
' . ENTITY::hsc(implode(', ', $req)) . "
\n"; } /* check the database to see if it is up-to-date and notice the user if not */ if ( !$plug->subscribtionListIsUptodate() ) { echo '
' . 'NOTICE:' . "
\n"; echo '
' . _LIST_PLUG_SUBS_NEEDUPDATE . "
\n"; } echo "
\n"; echo "\n"; } else { echo '' . sprintf(_PLUGINFILE_COULDNT_BELOADED, ENTITY::hsc($current->pfile)) . "\n"; } echo "\n"; echo "\n"; echo "\n"; break; } return; } function listplug_table_plugoptionlist($template, $type) { global $manager; switch( $type ) { case 'HEAD': echo '' . _LISTS_INFO . "\n"; echo '' . _LISTS_VALUE . "\n"; break; case 'BODY': listplug_plugOptionRow($template['current']); break; case 'FOOT': echo "\n"; echo '' . _PLUGS_SAVE . "\n"; echo "\n"; echo "\n"; echo "" . _PLUGS_SAVE . "\n"; echo "\n"; echo "\n"; break; } return; } function listplug_plugOptionRow($current) { $varname = "plugoption[{$current['oid']}][{$current['contextid']}]"; // retreive the optionmeta $meta = NucleusPlugin::getOptionMeta($current['typeinfo']); // only if it is not a hidden option write the controls to the page if ( in_array('access', $meta) && $meta['access'] == 'hidden' ) { return; } if ( !$current['description'] ) { echo '' , ENTITY::hsc($current['name']) . "\n"; } else { if ( !defined($current['description']) ) { echo '' , ENTITY::hsc($current['description']) . "\n"; } else { echo '' , ENTITY::hsc(constant($current['description'])) . "\n"; } } echo "\n"; switch($current['type']) { case 'yesno': ADMIN::input_yesno($varname, $current['value'], 0, 'yes', 'no'); break; case 'password': echo '\n"; break; case 'select': echo '\n"; break; case 'textarea': //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']); if ( array_key_exists('access', $meta) && $meta['access'] == 'readonly' ) { echo '\n"; break; case 'text': default: //$meta = NucleusPlugin::getOptionMeta($current['typeinfo']); echo '\n"; } if ( array_key_exists('extra', $current) ) { echo $current['extra']; } echo "\n"; return; } function listplug_table_itemlist($template, $type) { $cssclass = ''; switch( $type ) { case 'HEAD': echo ""._LIST_ITEM_INFO."\n"; echo ""._LIST_ITEM_CONTENT."\n"; echo ""._LISTS_ACTIONS.""; break; case 'BODY': $current = $template['current']; // string -> unix timestamp $current->itime = strtotime($current->itime); 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 "\n"; echo "
\n"; echo '
' . _LIST_ITEM_BLOG . "
\n"; echo '
' . ENTITY::hsc($current->bshortname) . "
\n"; echo '
' . _LIST_ITEM_CAT . "
\n"; echo '
' . ENTITY::hsc($current->cname) . "
\n"; echo '
' . _LIST_ITEM_AUTHOR . "
\n"; echo '
' . ENTITY::hsc($current->mname) . "
\n"; echo '
' . _LIST_ITEM_DATE . "
\n"; echo '
' . date("Y-m-d",$current->itime) . "
\n"; echo '
' . _LIST_ITEM_TIME . "
\n"; echo '
' . date("H:i",$current->itime) . "
\n"; echo "
\n"; echo "\n"; $id = listplug_nextBatchId(); echo "\n"; echo "

\n"; echo "inumber}\" />\n"; echo "\n"; echo "

\n"; $current->ibody = strip_tags($current->ibody); $current->ibody = ENTITY::hsc(shorten($current->ibody, 300, '...')); echo "

$current->ibody

\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; break; } return; } // 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 . "\n"; echo '' . _LIST_COMMENT . "\n"; echo '' . _LISTS_ACTIONS . ""; break; case 'BODY': $current = $template['current']; $current->ctime = strtotime($current->ctime); // string -> unix timestamp echo "\n"; echo "
    \n"; echo '
  • ' . date("Y-m-d@H:i",$current->ctime) . "
  • \n"; if ( isset($current->mname) ) { echo '
  • ' . ENTITY::hsc($current->mname) ,' ', _LIST_COMMENTS_MEMBER . "
  • \n"; } else { echo '
  • ' . ENTITY::hsc($current->cuser) . "
  • \n"; } if ( isset($current->cmail) && $current->cmail ) { echo '
  • ' . ENTITY::hsc($current->cmail) . "
  • \n"; } if ( isset($current->cemail) && $current->cemail ) { echo '
  • ' . ENTITY::hsc($current->cemail) . "
  • \n"; } echo "
\n"; echo "\n"; $id = listplug_nextBatchId(); echo ''; echo "cnumber}\" />\n"; echo "'; echo ''; echo '' . _LISTS_EDIT . "\n"; echo '' . _LISTS_DELETE . "\n"; if ( $template['canAddBan'] ) { echo '' . _LIST_COMMENT_BANIP . "\n"; } break; } return; } function listplug_table_bloglist($template, $type) { switch( $type ) { case 'HEAD': echo '' . _NAME . "\n"; echo '' . _LISTS_ACTIONS . "\n"; break; case 'BODY': $current = $template['current']; $current->bname = ENTITY::hsc($current->bname); echo "bnumber} shortname:{$current->bshortname}\">burl}\">\"".{$current->bname}\n"; echo "bnumber}\" title=\"" . _BLOGLIST_TT_ADD ."\">" . _BLOGLIST_ADD . "\n"; echo "bnumber}\" title=\"". _BLOGLIST_TT_EDIT."\">". _BLOGLIST_EDIT."\n"; echo "bnumber}\" title=\"". _BLOGLIST_TT_COMMENTS."\">". _BLOGLIST_COMMENTS."\n"; echo "bnumber}\" title=\"". _BLOGLIST_TT_BMLET."\">". _BLOGLIST_BMLET . "\n"; if ( $current->tadmin == 1 ) { echo "bnumber}\" title=\"" . _BLOGLIST_TT_SETTINGS . "\">" . _BLOGLIST_SETTINGS . "\n"; echo "bnumber}\" title=\"" . _BLOGLIST_TT_BANS . "\">" . _BLOGLIST_BANS . "\n"; } if ( $template['superadmin'] ) { echo "bnumber}\" title=\"". _BLOGLIST_TT_DELETE."\">" ._BLOGLIST_DELETE. "\n"; } break; } return; } function listplug_table_shortblognames($template, $type) { switch( $type ) { case 'HEAD': echo '' . _EBLOG_SHORTNAME . "\n"; echo '' . _EBLOG_NAME. ""; break; case 'BODY': $current = $template['current']; $current->bshortname = ENTITY::hsc($current->bshortname); $current->bname = ENTITY::hsc($current->bname); echo "{$current->bshortname}\n"; echo "{$current->bname}\n"; break; } return; } function listplug_table_shortnames($template, $type) { switch( $type ) { case 'HEAD': echo '' . _NAME . "\n"; echo '' . _LISTS_DESC. "\n"; break; case 'BODY': $current = $template['current']; $current->name = ENTITY::hsc($current->name); $current->description = ENTITY::hsc($current->description); echo "{$current->name}\n"; echo "{$current->description}\n"; break; } return; } function listplug_table_categorylist($template, $type) { switch( $type ) { case 'HEAD': echo '' . _LISTS_NAME . ""; echo '' . _LISTS_DESC."\n"; echo '' . _LISTS_ACTIONS . "\n"; break; case 'BODY': $id = listplug_nextBatchId(); $current = $template['current']; $current->cname = ENTITY::hsc($current->cname); $current->cdesc = ENTITY::hsc($current->cdesc); echo "\n"; echo "catid}\" />\n"; echo "\n"; echo '\n'; echo "{$current->cdesc}\n"; echo "cblog}&catid={$current->catid}\" tabindex=\"{$template['tabindex']}\">" . _LISTS_DELETE . "\n"; echo "cblog}&catid={$current->catid}\" tabindex=\"{$template['tabindex']}\">" . _LISTS_EDIT . "\n"; break; } return; } function listplug_table_templatelist($template, $type) { global $manager; switch( $type ) { case 'HEAD': echo '' . _LISTS_NAME . "\n"; echo '' . _LISTS_DESC . "\n"; echo '' . _LISTS_ACTIONS . "\n"; break; case 'BODY': $current = $template['current']; $current->tdnumber = (integer) $current->tdnumber; $current->tdname = ENTITY::hsc($current->tdname); $current->tddesc = ENTITY::hsc($current->tddesc); $url = "index.php?action=templateclone&templateid={$current->tdnumber}"; $url = ENTITY::hsc($manager->addTicketToUrl($url)); echo "{$current->tdname}\n"; echo "{$current->tddesc}\n"; echo "\n"; echo "tdnumber}\" tabindex=\"{$template['tabindex']}\">" . _LISTS_EDIT . "\n"; echo "\n"; echo "\n"; echo "" . _LISTS_CLONE . "\n"; echo "\n"; echo "\n"; echo "tdnumber}\" tabindex=\"{$template['tabindex']}\">" . _LISTS_DELETE . "\n"; echo "\n"; break; } return; } function listplug_table_skinlist($template, $type) { global $CONF, $DIR_SKINS, $manager; switch( $type ) { case 'HEAD': echo '' . _LISTS_NAME . "\n"; echo '' . _LISTS_DESC . "\n"; echo '' . _LISTS_ACTIONS . "\n"; break; case 'BODY': $current = $template['current']; $current->sdnumber = (integer) $current->sdnumber; $current->sdname = ENTITY::hsc($current->sdname); $current->sdtype = ENTITY::hsc($current->sdtype); echo "\n"; // use a special style for the default skin if ( $current->sdnumber == $CONF['BaseSkin'] ) { echo '

' . $current->sdname . "

\n"; } else { echo '

' . $current->sdname . "

\n"; } echo "
\n"; echo '
' . _LISTS_TYPE . "
\n"; echo '
' . $current->sdtype . "
\n"; echo '
' . _LIST_SKINS_INCMODE . "
\n"; if ( $current->sdincmode == 'skindir' ) { echo '
' . _PARSER_INCMODE_SKINDIR . "
\n"; } else { echo '
' . _PARSER_INCMODE_NORMAL . "
\n"; } if ( $current->sdincpref ) { echo '
' . _LIST_SKINS_INCPREFIX . "
\n"; echo '
' . ENTITY::hsc($current->sdincpref) . "
\n"; } echo "
\n"; // add preview image when present if ( $current->sdincpref && @file_exists("{$DIR_SKINS}{$current->sdincpref}preview.png") ) { echo "

\n"; $alternatve_text = sprintf(_LIST_SKIN_PREVIEW, $current->sdname); $has_enlargement = @file_exists($DIR_SKINS . $current->sdincpref . 'preview-large.png'); if ( $has_enlargement ) { echo '\n"; echo '' . $alternatve_text . \n"; echo "
\n"; } else { echo '' . $alternatve_text .
\n"; } if ( @file_exists("{$DIR_SKINS}{$current->sdincpref}readme.html") ) { $url = $CONF['SkinsURL'] . ENTITY::hsc($current->sdincpref) . 'readme.html'; $title = sprintf(_LIST_SKIN_README, $current->sdname); echo "" . _LIST_SKIN_README_TXT . "\n"; } echo "

\n"; } echo "\n"; echo "\n"; echo '

' . ENTITY::hsc($current->sddesc) . "

\n"; /* show list of defined parts */ $query = "SELECT stype FROM %s WHERE sdesc=%d ORDER BY stype"; $query = sprintf($query, sql_table('skin'), $current->sdnumber); $r = sql_query($query); $types = array(); while ( $o = sql_fetch_object($r) ) { array_push($types, $o->stype); } if ( sizeof($types) > 0 ) { $friendlyNames = SKIN::getFriendlyNames(); for ( $i = 0; $i < sizeof($types); $i++ ) { $type = $types[$i]; if ( !in_array($type, array('index', 'item', 'archivelist', 'archive', 'search', 'error', 'member', 'imagepopup')) ) { $article = 'skinpartspecial'; } else { $article = "skinpart{$type}"; } $types[$i] = "
  • \n"; $types[$i] .= helpHtml($article) . "\n"; $types[$i] .= "sdnumber}&type={$type}\" tabindex=\"{$template['tabindex']}\">" . ENTITY::hsc($friendlyNames[$type]) . "\n"; $types[$i] .= "
  • \n"; } echo _LIST_SKINS_DEFINED; echo '
      ' . implode('', $types) . "
    \n"; } echo ""; echo "\n"; echo "sdnumber}\n tabindex=\n{$template['tabindex']}>" . _LISTS_EDIT . "\n"; echo "\n"; $url = "index.php?action=skinclone&skinid={$current->sdnumber}"; $url = ENTITY::hsc($manager->addTicketToUrl($url)); echo "\n"; echo "" . _LISTS_CLONE . "\n"; echo "\n"; echo "\n"; echo "sdnumber}\" tabindex=\"{$template['tabindex']}\">" . _LISTS_DELETE . "\n"; break; } return; } function listplug_table_draftlist($template, $type) { switch( $type ) { case 'HEAD': echo '' . _LISTS_BLOG . "\n"; echo '' . _LISTS_TITLE . "\n"; echo '' . _LISTS_ACTIONS . "\n"; break; case 'BODY': $current = $template['current']; $current->bshortname = ENTITY::hsc($current->bshortname); $current->ititle = ENTITY::hsc(strip_tags($current->ititle)); echo "{$current->bshortname}\n"; echo "{$current->ititle}\n"; echo "inumber}\">" . _LISTS_EDIT . "\n"; echo "inumber}\">" . _LISTS_DELETE . "\n"; break; } return; } function listplug_table_otherdraftlist($template, $type) { switch( $type ) { case 'HEAD': echo '' . _LISTS_BLOG . "\n"; echo '' . _LISTS_TITLE . "\n"; echo '' . _LISTS_AUTHOR . "\n"; echo '' . _LISTS_ACTIONS . "\n"; break; case 'BODY': $current = $template['current']; $current->bshortname = ENTITY::hsc($current->bshortname); $current->ititle = ENTITY::hsc(strip_tags($current->ititle)); $current->mname = ENTITY::hsc($current->mname); echo "{$current->bshortname}\n"; echo "{$current->ititle}\n"; echo "{$current->mname}\n"; echo "inumber}\">" . _LISTS_EDIT . "\n"; echo "inumber}\">" . _LISTS_DELETE . "\n"; break; } return; } function listplug_table_actionlist($template, $type) { switch( $type ) { case 'HEAD': echo '' . _LISTS_TIME . "\n"; echo '' . _LIST_ACTION_MSG . "\n"; break; case 'BODY': $current = $template['current']; $current->timestamp = ENTITY::hsc($current->timestamp); $current->message = ENTITY::hsc($current->message); echo "{$current->timestamp}\n"; echo "{$current->message}\n"; break; } return; } function listplug_table_banlist($template, $type) { switch( $type ) { case 'HEAD': echo '' . _LIST_BAN_IPRANGE . "\n"; echo '' . _LIST_BAN_REASON."\n"; echo '' . _LISTS_ACTIONS . "\n"; break; case 'BODY': $current = $template['current']; $current->blogid = (integer) $current->blogid; $current->iprange = ENTITY::hsc($current->iprange); $current->reason = ENTITY::hsc($current->reason); echo "{$current->iprange}\n"; echo "{$current->reason}\n"; echo "blogid}&iprange=\"ENTITY::hsc($current->iprange}\">" . _LISTS_DELETE . "\n"; break; } return; }