function display_section_blogs($sec) { global $pcconfig; if (!$pcconfig["SECTION"][$sec]) { echo "对不起,目前尚无该分类。[<a href=\"javascript:history.go(-1);\">返回</a>]"; return; } echo "下面是<font class=f4>" . html_format($pcconfig["SECTION"][$sec]) . "</font>分类的Blog:<br /><hr size=1>"; @($pno = (int) $_GET["pno"]); if ($pno < 1) { $pno = 1; } $link = pc_db_connect(); if ($sec == "others") { $query = "SELECT username , corpusname , description , createtime FROM users WHERE theme LIKE 'others%' OR theme = '' ORDER BY modifytime DESC LIMIT " . $pcconfig["THEMLIST"] * ($pno - 1) . "," . $pcconfig["THEMLIST"] . ";"; } else { $query = "SELECT username , corpusname , description , createtime FROM users WHERE theme LIKE '" . addslashes($sec) . "%' ORDER BY modifytime DESC LIMIT " . $pcconfig["THEMLIST"] * ($pno - 1) . "," . $pcconfig["THEMLIST"] . ";"; } $result = mysql_query($query, $link); $numRows = mysql_num_rows($result); ?> <ul style="margin-left: 20px;"><?php for ($i = 0; $i < $numRows; $i++) { $rows = mysql_fetch_array($result); echo "<li><strong><a href=\"index.php?id=" . $rows["username"] . "\">" . html_format($rows["corpusname"]) . "</a></strong>[" . time_format_date1($rows["createtime"]) . "]:" . html_format($rows["description"], TRUE) . "</li>"; } ?> </ul> <p align=center class=f1> <?php if ($pno > 1) { echo "<a href=\"pcsec.php?sec=" . $sec . "&pno=" . ($pno - 1) . "\">上一页</a>\n"; } if ($numRows == $pcconfig["THEMLIST"]) { echo "<a href=\"pcsec.php?sec=" . $sec . "&pno=" . ($pno + 1) . "\">下一页</a>\n"; } pc_db_close($link); ?> </p><?php }
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"); ?> <br><br> <p align=center class=f2> 欢迎使用<?php echo $pcconfig["BBSNAME"]; ?>