Пример #1
0
 function output_page($entry)
 {
     global $mbcon, $section_body, $permission, $adminlist, $userdetail, $config, $categories, $weather, $t, $section_bodys, $part, $template, $lnc;
     if (!@is_a($t, 'template')) {
         $t = new template();
     }
     $entrytitle = $entry['pagetitle'];
     $entrydate = zhgmdate("{$mbcon['timeformat']}", $entry['pagetime'] + 3600 * $config['timezone']);
     $entrytime = gmdate('H:i', $entry['pagetime'] + 3600 * $config['timezone']);
     list($entrydatey, $entrydatem, $entrydated) = explode('/', gmdate('Y/n/j', $entry['pagetime'] + 3600 * $config['timezone']));
     $entrydatemnamefull = gmdate('F', $entry['pagetime'] + 3600 * $config['timezone']);
     $entrydatemnameshort = gmdate('M', $entry['pagetime'] + 3600 * $config['timezone']);
     $tmp = $entry['pageauthor'];
     $entryauthor = $adminlist[$tmp];
     $entryauthor = "<a href=\"" . getlink_user($tmp) . "\" >{$entryauthor}</a>";
     $iftags = "none";
     $entry['pagecontent'] = @str_replace('[separator]', '', $entry['pagecontent']);
     $entrycontent = $this->getcontent($entry['pagecontent'], $entry['htmlstat'], $entry['ubbstat'], $entry['emotstat'], 1);
     $entrycontent = $this->keep_htmlcode_matches($entrycontent);
     //Start Template
     $section_bodys[] = $t->set('viewpage', array('entrytitle' => $entrytitle, 'entrydate' => $entrydate, 'entrytime' => $entrytime, 'entryauthor' => $entryauthor, 'entrycontent' => $entrycontent, 'entrytitletext' => $entry['pagetitle'], 'entrydatey' => $entrydatey, 'entrydatem' => $entrydatem, 'entrydated' => $entrydated));
     return $section_bodys;
 }
Пример #2
0
        $blogitem['statistics']['extend'] = 1;
    }
}
//[End]statistics
//[Start]archive
if (in_array('archive', $allopenmods)) {
    if (!empty($mbcon['archivemonths'])) {
        $basemonth = $nowtime['month'];
        $baseyear = $nowtime['year'];
        for ($i = 0; $i < $mbcon['archivemonths']; $i++) {
            if ($basemonth == 0) {
                $basemonth = 12;
                $baseyear = $baseyear - 1;
            }
            $archiveformat = $mbcon['archiveformat'] == 'custom' ? $mbcon['customarchiveformat'] : $mbcon['archiveformat'];
            $ymshow = zhgmdate($archiveformat, gmmktime(0, 0, 0, $basemonth, 1, $baseyear));
            $outurl = getlink_archive($basemonth, $baseyear);
            $archive1[] = "<li><a href=\"{$outurl}\" rel=\"noindex,nofollow\">{$ymshow}</a></li>";
            $basemonth -= 1;
        }
        $archiveshow = '<ul>' . implode("\n", $archive1) . '</ul>';
    }
    plugin_runphp('sidebararchive');
    $blogitem['archive'] += array('type' => 'block', 'name' => 'archive', 'title' => $lnc[106], 'content' => $archiveshow);
    if ($mbcon['extend_archive'] == 1) {
        $blogitem['archive']['extend'] = 1;
    }
}
//[End]archive
//[Start]Misc
if (in_array('misc', $allopenmods)) {
Пример #3
0
 checkpermission('ViewUserList');
 acceptrequest('usergroup,ordered');
 include_once "data/cache_usergroup.php";
 $queryplus = $usergroup === "" ? '' : "WHERE `usergroup`='{$usergroup}'";
 if ($ordered !== '') {
     $allorder = array('`username` ASC', '`username` ASC', '`username` DESC', '`regtime` DESC', '`regtime` ASC');
     $ordernow = $allorder[$ordered];
 } else {
     $ordernow = '`username` ASC';
 }
 $start_id = ($page - 1) * $mbcon['listitemperpage'];
 $detail_array = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}user` {$queryplus}  ORDER BY {$ordernow} LIMIT {$start_id}, {$mbcon['listitemperpage']}");
 for ($i = 0; $i < count($detail_array); $i++) {
     $tmp_gp = $detail_array[$i]['usergroup'];
     $tmp_sgp = $usergp[$tmp_gp];
     $tmp_tm = zhgmdate("{$mbcon['timeformat']} H:i", $detail_array[$i]['regtime'] + 3600 * $config['timezone']);
     $tablebody .= "<tr><td width='42%' class=\"listbox-entry\">{$detail_array[$i]['username']}</td><td width='10%'  align='center' class=\"listbox-entry\">{$tmp_sgp}</td><td width='40%' align='center' class=\"listbox-entry\">{$tmp_tm}</td><td width='5%' align='center' class=\"listbox-entry\"><a href=\"" . getlink_user($detail_array[$i]['userid']) . "\"><img src='{$mbcon['images']}/detail.gif' alt='{$lnc[194]}' title='{$lnc[194]}' border='0'></a></td></tr>\n";
 }
 $tablelist = "<tr><td class=\"listbox-header\" width='42%' align='center'>{$lnc[132]}</td><td class=\"listbox-header\" width='13%'  align='center'>{$lnc[199]}</td><td class=\"listbox-header\" width='40%' align='center'>{$lnc[200]}</td><td class=\"listbox-header\" width='5%' align='center'></td></tr>\n" . $tablebody;
 foreach ($usergp as $i => $value) {
     if ($i == 0) {
         continue;
     }
     $selected = $i == $usergroup ? ' selected="selected"' : '';
     $puttingcate[] = "<a href=\"view.php?go=userlist&amp;usergroup={$i}&amp;ordered={$ordered}\">{$value}</a>";
 }
 $puttingcates = "{$lnc[201]} <a href=\"view.php?go=userlist&amp;ordered={$ordered}\">{$lnc[202]}</a> | " . @implode(' | ', $puttingcate);
 $tablelist .= "<tr><td colspan='5' align='left'></td></tr>\n";
 $m_b = new getblogs();
 $innerpages = $m_b->make_pagebar($page, $mbcon['pagebaritems'], "view.php?go=userlist", $statistics['users'] + 1, $mbcon['listitemperpage']);
 $innerpages .= "<br/>{$puttingcates}<br/> {$lnc[203]} <a href=\"view.php?go=userlist&amp;usergroup={$usergroup}&amp;ordered=1\">{$lnc[204]}</a> | <a href=\"view.php?go=userlist&amp;usergroup={$usergroup}&amp;ordered=2\">{$lnc[205]}</a> | <a href=\"view.php?go=userlist&amp;usergroup={$usergroup}&amp;ordered=3\">{$lnc[206]}</a> | <a href=\"view.php?go=userlist&amp;usergroup={$usergroup}&amp;ordered=4\">{$lnc[207]}</a>";
Пример #4
0
     $year = $cy;
     $cyearmonth = $cm < 10 ? "{$year}0{$month}" : "{$year}{$month}";
     $all_datas = $blog->getarraybyquery("SELECT `cid` FROM `{$db_prefix}calendar` WHERE `cyearmonth`='{$cyearmonth}'");
     $counter_now = count($all_datas['cid']);
     $jointstr = @implode(',', $all_datas['cid']);
     if ($jointstr == '') {
         $jointstr = 'null';
     }
     $partialquery = "{$limitation2} blogid in({$jointstr}) ORDER BY `pubtime` DESC";
     $urlpattern = getlink_archive($month, $year, '%s', '1');
     if ($flset['modeselectable'] != 1) {
         $pagebaritem = "";
     }
     $timeperiod_start = gmmktime(0, 0, 0, $month, 1, $year);
     $archiveformat = $mbcon['archiveformat'] == 'custom' ? $mbcon['customarchiveformat'] : $mbcon['archiveformat'];
     $pagetitle = zhgmdate($archiveformat, $timeperiod_start) . " {$lnc[106]} × ";
     if ($mbcon['archive_list'] == 1) {
         $perpagevalue = $mbcon['listitemperpage'];
         $actionforexc = 'list';
         $urlref = getlink_archive($month, $year, '2', '%s');
     } else {
         $perpagevalue = $mbcon['exceptperpage'];
         $actionforexc = 'excerpt';
         $urlref = getlink_archive($month, $year, '1', '%s');
     }
     break;
 case 'showday':
     if (!$itemid) {
         @header("Location: index.php");
     } else {
         @(list($year, $month, $day) = @explode('-', $itemid));