<td class="t13" height="200" align="left" valign="top"> <font class="<?php echo $comment["htmltag"] ? "contentwithhtml" : "content"; ?> "> <?php echo html_format($comment["body"], TRUE, $comment["htmltag"]); ?> </font> </td> </tr> <tr> <td class="t5" align="right"> [FROM: <?php echo pc_hide_ip($comment["hostname"]); ?> ] </td> </tr> <tr> <td class="t3"> <?php $query = "SELECT `cid` FROM comments WHERE `nid` = '" . $comment["nid"] . "' AND `cid` < '" . $cid . "' ORDER BY `cid` DESC LIMIT 0 , 1 ;"; $result = mysql_query($query, $link); if ($rows = mysql_fetch_array($result)) { echo "<a href=\"pcshowcom.php?cid=" . $rows["cid"] . "\">上一篇</a> \n"; } else { echo "上一篇 \n"; }
<description><![CDATA[ <?php echo html_format($nodes[$i][body], TRUE, $nodes[$i][htmltag]); ?> ]]></description> <smthBlog:node> <smthBlog:id><?php echo $nodes[$i][nid]; ?> </smthBlog:id> <smthBlog:emote><?php echo $nodes[$i][emote]; ?> </smthBlog:emote> <smthBlog:address><?php echo pc_hide_ip($nodes[$i][hostname]); ?> </smthBlog:address> <smthBlog:view><?php echo $nodes[$i][visitcount]; ?> </smthBlog:view> <smthBlog:reply><?php echo $nodes[$i][commentcount]; ?> </smthBlog:reply> <smthBlog:quote><?php echo $nodes[$i][trackbackcount]; ?> </smthBlog:quote> </smthBlog:node>
function display_pc_comments($link, $uid, $nid, $spr) { global $pc; global $currentuser; if (strtolower($pc["USER"]) == strtolower($currentuser["userid"])) { $perm = TRUE; } else { $perm = FALSE; } if ($spr) { $query = "SELECT * FROM comments WHERE `nid` = '" . $nid . "' AND `uid` = '" . $uid . "' ORDER BY `cid` ASC ;"; } else { $query = "SELECT `username` , `emote` , `subject` , `created`,`cid`,`htmltag` FROM comments WHERE `nid` = '" . $nid . "' AND `uid` = '" . $uid . "' ORDER BY `cid` ASC ;"; } $result = mysql_query($query, $link); $re_num = mysql_num_rows($result); ?> <table cellspacing="0" cellpadding="3" border="0" width="90%" class="t1"> <tr> <td class="t9" colspan="2">共有 <?php echo $re_num; ?> 条评论</td> </tr> <?php for ($i = 0; $i < $re_num; $i++) { $rows = mysql_fetch_array($result); $contentcss = $rows["htmltag"] ? "contentwithhtml" : "content"; if ($i % 2 == 0) { $tdclass = array("t8", "t10", "t11"); } else { $tdclass = array("t5", "t12", "t13"); } echo "<tr>\n<td class=\"" . $tdclass[1] . "\"> " . "<img src=\"icon/" . $rows["emote"] . ".gif\" border=\"0\" align=\"absmiddle\">\n" . "<a href=\"pcshowcom.php?cid=" . $rows["cid"] . "\">" . html_format($rows["subject"]) . "</a>" . "[<a href=\"/bbsqry.php?userid=" . $rows["username"] . "\">" . $rows["username"] . "</a> 于 " . time_format($rows["created"]) . " 提到]\n"; if ($perm || strtolower($rows["username"]) == strtolower($currentuser["userid"]) && strtolower($rows["username"]) != "guest" || pc_is_manager($currentuser)) { echo "[<a href=\"#\" onclick=\"bbsconfirm('pceditcom.php?act=del&cid=" . $rows["cid"] . "','确认删除?')\">删</a>]\n"; } if (strtolower($rows["username"]) == strtolower($currentuser["userid"]) && strtolower($rows["username"]) != "guest") { echo "[<a href=\"pceditcom.php?act=edit&cid=" . $rows["cid"] . "\">改</a>]\n"; } echo "</td><td width=\"100\" align=\"right\" class=\"" . $tdclass[0] . "\"><font class=\"f4\">" . ($i + 1) . "</font> </td>\n</tr>\n"; if ($spr) { echo "<tr>\n<td colspan='2' class=\"" . $tdclass[2] . "\"><font class='" . $contentcss . "'>" . html_format($rows["body"], TRUE, $rows["htmltag"]) . "</font></td>\n</tr>\n" . "<tr>\n<td colspan='2' align='right' class=\"" . $tdclass[0] . "\">[FROM: " . pc_hide_ip($rows["hostname"]) . "]" . "</td>\n</tr>\n"; } } ?> </table> <?php mysql_free_result($result); return $re_num; }