コード例 #1
0
<<A Bluview Technology Product>>
禁止使用Windows记事本修改文件,由此造成的一切使用不正常恕不解答!
PHP+MySQL blog system.
Code: Bob Shen
Offical site: http://www.bo-blog.com
Copyright (c) Bob Shen 中国-上海
In memory of my university life
------------------------------------------------------- */
if (!defined('VALIDREQUEST')) {
    die('Access Denied.');
}
if ($flset['guestbook'] == 1) {
    getHttp404($lnc[313]);
}
$m_b = new getblogs();
if ($permission['LeaveMessage'] == 1) {
    $section_body_main = $m_b->make_visit_form($lnc[129], '', "visit.php?job=addmessage");
    $section_body_main .= "<a name='topreply'></a><div id='addnew'></div>";
}
$replyrecords = $m_b->reply_record_array($mbcon['messageperpage'], $page);
if ($replyrecords[0]['repid'] != '') {
    $section_body_main .= $m_b->make_messages($replyrecords);
    $innerpages = $m_b->make_pagebar($page, $mbcon['pagebaritems'], "guestbook.php", $statistics['messages'], $mbcon['messageperpage']);
}
if ($page == 1) {
    announcebar();
} else {
    $ifannouncement = 'none';
}
$bodymenu = $t->set('mainpage', array('pagebar' => $innerpages, 'iftoppage' => 'none', 'ifbottompage' => 'display', 'ifannouncement' => $ifannouncement, 'topannounce' => $topannounce, 'mainpart' => $section_body_main, 'currentpage' => $pageitems['currentpage'], 'previouspageurl' => $pageitems['previouspageurl'], 'nextpageurl' => $pageitems['nextpageurl'], 'turningpages' => $pageitems['turningpages'], 'totalpages' => $pageitems['totalpages'], 'previouspageexists' => $pageitems['previouspageexists'], 'nextpageexists' => $pageitems['nextpageexists']));
$pagetitle = "{$lnc[91]} - ";
コード例 #2
0
ファイル: mod_read.php プロジェクト: JJYing/Anyway-Website
        $replyarray = $m_b->getgroupbyquery("SELECT t1.*, t2.userid, t2.avatar FROM `{$db_prefix}replies` t1 LEFT JOIN `{$db_prefix}user` t2 ON t1.replierid=t2.userid WHERE t1.blogid='{$itemid}' AND (t1.reproperty<2 OR t1.reproperty=4) ORDER BY t1.reptime {$order}  LIMIT {$start_id}, {$mbcon['replyperpage']}");
    } else {
        $replyarray = $m_b->getgroupbyquery("SELECT * FROM `{$db_prefix}replies` WHERE blogid='{$itemid}' AND (reproperty<2 OR reproperty=4) ORDER BY reptime {$order}  LIMIT {$start_id}, {$mbcon['replyperpage']}");
    }
    if ($replyarray[0]['repid'] != '') {
        $section_body_main[] = $m_b->make_replies($replyarray);
        $outurl = getlink_entry($itemid, $records[0]['blogalias'], '%s', $part);
        $pageway = 1;
        $innerpages = $m_b->make_pagebar($page, $mbcon['pagebaritems'], $outurl, $records[0]['replies'] + $records[0]['tbs'], $mbcon['replyperpage'], $pageway);
    } else {
        checkPageValidity($page, 1);
    }
} else {
    checkPageValidity($page, 1);
}
if ($records[0]['property'] != '1' && $permission['Reply'] == 1) {
    $form_reply = $m_b->make_visit_form($lnc[187], $records[0]['blogid'], "visit.php?job=addreply");
}
$section_body_main[] = $t->set('endviewentry', array('form_reply' => $form_reply, 'innerpages' => $innerpages));
if (!$is_preview) {
    //Read counter
    $allreads = $_COOKIE['readentry'];
    if (!strstr($allreads, "{$itemid},")) {
        $m_b->query("UPDATE LOW_PRIORITY `{$db_prefix}blogs` SET `views`=`views`+1 WHERE `blogid`='{$itemid}'");
        @setcookie('readentry', $allreads . "{$itemid},", time() + 7200);
    }
}
//announcebar();
$ifannouncement = "none";
$bodymenu = $t->set('mainpage', array('pagebar' => '', 'iftoppage' => 'none', 'ifbottompage' => 'none', 'ifannouncement' => $ifannouncement, 'topannounce' => $topannounce, 'mainpart' => @implode('', $section_body_main), 'currentpage' => '', 'previouspageurl' => '', 'nextpageurl' => '', 'turningpages' => '', 'totalpages' => '', 'previouspageexists' => '', 'nextpageexists' => ''));
$pagetitle = "{$records[0]['title']} × ";