Example #1
0
    if ($pno > 1) {
        echo "[<a href='pcnew.php?pno=" . ($pno - 1) . $loadtype . "'>前" . $pcconfig["NEWS"] . "条记录</a>]\n";
    } else {
        echo "[前" . $pcconfig["NEWS"] . "条记录]\n";
    }
    if ($etemno == $pcconfig["NEWS"]) {
        echo "[<a href='pcnew.php?pno=" . ($pno + 1) . $loadtype . "'>后" . $pcconfig["NEWS"] . "条记录</a>]\n";
    } else {
        echo "[后" . $pcconfig["NEWS"] . "条记录]\n";
    }
    ?>
</p>
<?php 
}
//20min更新一次
if (pc_update_cache_header()) {
    return;
}
@($pno = (int) $_GET["pno"]);
$pno = $pno < 1 ? 1 : $pno;
$type = @$_GET["t"] == "c" ? "c" : "n";
$link = pc_db_connect();
if ($type == "n") {
    $newBlogs = getNewBlogs($link, $pno);
    $newNum = count($newBlogs["useretems"]);
} else {
    $newComments = getNewComments($link, $pno);
    $newNum = count($newComments);
}
pc_db_close($link);
pc_html_init("gb2312", $pcconfig["BBSNAME"] . "Blog");
Example #2
0
<?php

require "pcfuncs.php";
require "pcstat.php";
require "pcmainfuncs.php";
if (pc_update_cache_header(60 * 24)) {
    return;
}
function pcmain_hot_users($link, $period, $color)
{
    $users = getHotUsersByPeriod($link, $period, 50);
    for ($i = 0; $i < count($users); $i++) {
        echo "<font color=\"" . $color . "\">" . ($i + 1) . "</font>&nbsp;<a href=\"/pc/index.php?id=" . $users[$i]["username"] . "\" title=\"" . htmlspecialchars($users[$i]["corpusname"]) . "\">" . html_format(html_format_fix_length($users[$i]["corpusname"], 20)) . "</a>" . "\n<a href=\"/bbsqry.php?userid=" . $users[$i]["username"] . "\"><font class=low2>" . $users[$i]["username"] . "</font></a><br />";
    }
}
function pcmain_score_top_users($link, $color)
{
    $users = getScoreTopUsers($link, 50);
    for ($i = 0; $i < count($users); $i++) {
        echo "<font color=\"" . $color . "\">" . ($i + 1) . "</font>&nbsp;<a href=\"/pc/index.php?id=" . $users[$i]["username"] . "\" title=\"" . htmlspecialchars($users[$i]["corpusname"]) . "\">" . html_format(html_format_fix_length($users[$i]["corpusname"], 20)) . "</a>" . "\n<a href=\"/bbsqry.php?userid=" . $users[$i]["username"] . "\"><font class=low2>" . $users[$i]["username"] . "</font></a><br />";
    }
}
function pcmain_hot_nodes($link, $period, $color)
{
    $nodes = getHotNodesByPeriod($link, $period, 50);
    for ($i = 0; $i < count($nodes); $i++) {
        echo "<font color=\"" . $color . "\">" . ($i + 1) . "</font>&nbsp;<a href=\"/pc/pccon.php?id=" . $nodes[$i]["uid"] . "&nid=" . $nodes[$i]["nid"] . "&s=all\" title=\"" . htmlspecialchars($nodes[$i]["subject"]) . "\">" . html_format(html_format_fix_length($nodes[$i]["subject"], 32)) . "</a><br />";
    }
}
function pcmain_hot_topics($link, $period, $color)
{