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 }
//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"]; ?> Blog系统 </p> <?php display_navigation_bar($type); ?> <hr size=1> <center> <p align=center class=f1><strong>
function pc_reject_apply($link, $userid, $applyAgain) { global $currentuser; if (!$userid) { return FALSE; } if ($applyAgain != 3) { $applyAgain = 2; } $query = "UPDATE newapply SET apptime = apptime ,manager = '" . addslashes($currentuser["userid"]) . "',management = '" . $applyAgain . "' WHERE username = '******';"; if (!mysql_query($query, $link)) { $errstr = "MySQL Error: " . mysql_error($link); pc_db_close($link); exit($errstr); } //log一下 $action = $currentuser["userid"] . " 驳回 " . $userid . " 的BLOG申请(www)"; if ($applyAgain == 3) { $content = $action . ";\n并不允许再申请BLOG。"; } else { $content = ""; } pc_logs($link, $action, $content, $userid); }