📄 pcdoc.php
字号:
<?php /* ** this file display article list in personal corp. ** @id:windinsn Nov 19,2003 */ require("pcfuncs.php"); function display_blog_menu($pc,$tid,$tag,$blogMenus) { $blogs = $blogMenus;?><table cellspacing="0" cellpadding="5" border="0" width="95%"><tr> <td align="right" class="f2">Blog分类</td></tr><tr> <td align="right"><hr align="right" width="90%" class="hr"></td></tr><?php for($i=0;$i < count($blogs) ;$i++) { if($blogs[$i]["TID"] == $tid) echo "<tr>\n<td align=\"right\" class='t6'>\n".html_format($blogs[$i]["NAME"])."\n</td>\n</tr>\n"; else echo "<tr>\n<td align=\"right\" class='t7'>\n<a href=\"pcdoc.php?userid=".$pc["USER"]."&tag=".$tag."&tid=".$blogs[$i]["TID"]."\" class='t7'>".html_format($blogs[$i]["NAME"])."</a>\n</td>\n</tr>\n"; }?></table><?php } function display_action_bar($tag,$tid=0,$pid=0) { global $pc,$sec,$blogMenus;?><table cellspacing="0" cellpadding="5" border="0" width="95%" class="b2"><tr><td><a href="pcmanage.php?userid=<?php echo $pc["USER"]; ?>&act=post&<?php echo "tag=".$tag."&pid=".$pid."&tid=".$tid; ?>"><img src="images/post.gif" border="0" alt="发表文章"></a></td><td align="right"><input type="hidden" name="access" value="<?php echo $tag; ?>"><input onclick="checkall(this.form)" type="checkbox" value="on" name="chkall" align="absmiddle" class="b2">选中本目录下所有文章 将选中文章<select name="act" class="b2"> <option value="cut" selected>移动</option> <option value="copy">复制</option></select>到<select name="target" class="b2"><?php for( $i = 0 ; $i < 5 ; $i ++) { if($i!=$tag) echo "<option value=\"".$i."\">".$sec[$i]."</option>\n"; } for( $i = 0 ; $i < count($blogMenus) ; $i ++ ) { if($blogMenus[$i]["TID"]!=$tid) echo "<option value=\"T".$blogMenus[$i]["TID"]."\">[".$sec[$tag]."]".html_format($blogMenus[$i]["NAME"])."</option>\n"; }?></select><input type="submit" value="GO" class="b1"></td><td align="right"><a href="#" onclick="bbsconfirm('pcmanage.php?userid=<?php echo $pc["USER"]; ?>&act=clear&ret=<?php echo urlencode($_SERVER["REQUEST_URI"]); ?>','清空删除区的文章吗(无法恢复)?')">清空删除区</a></td></tr></table><?php } function display_art_list($link,$pc,$tag,$pur,$tid=0,$order="",$pno) { global $currentuser; if ($pc['USER'] == '_filter' ) $query = "SELECT `fid` , `pid` , `nid` , `state` , `username`, `uid` , `recuser`, `created` , `emote` , `changed` , `comment` , `commentcount` , `subject` , `visitcount` , `htmltag` ,`trackbackcount` , `trackback` ". " FROM filter WHERE `state` = '".$tag."' "; else $query = "SELECT `nid` , `pid` , `created` , `emote` , `changed` , `comment` , `commentcount` , `subject` , `visitcount` , `htmltag` ,`trackbackcount` , `trackback` ". " FROM nodes WHERE `access` = '".$tag."' AND `uid` = '".$pc["UID"]."' AND `tid` = '".$tid."' "; switch($order) { case "c": $query.=" ORDER BY `created` DESC , "; break; case "u": $query.=" ORDER BY `changed` DESC , "; break; case "v": $query.=" ORDER BY `visitcount` DESC , "; break; case "r": $query.=" ORDER BY `commentcount` DESC , "; break; case "co": $query.=" ORDER BY `comment` ASC , "; break; case "tb": $query.=" ORDER BY `trackbackcount` DESC , "; break; default: $query.=" ORDER BY "; } $query .= " `created` DESC "; $pno = intval($pno); if ($pno < 1) $pno = 1; $cnt = 40; //cnt $start = ($pno-1)*$cnt; $query .= " LIMIT ".$start.",".$cnt." ;"; $result = mysql_query($query,$link); $i = 0; $is_admin = pc_is_manager($currentuser);?><form action="pcmanage.php?userid=<?php echo $pc["USER"]; ?>" method="post"> <table cellspacing="0" cellpadding="3" border="0" width="99%" class="t1"><?php if ($pc['USER'] == '_filter' ) {?><tr> <td class="t2" width="30">序号</td> <td class="t2" width="40">类别</td> <td class="t2" width="80">作者</td> <td class="t2" width="30"><a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=co&tid=".$tid; ?>" class="f3">状态</a></td> <td class="t2">主题</td> <td class="t2" width="120"> <a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=c&tid=".$tid; ?>" class="f3">创建</a> <td class="t2" width="30"><a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=v&tid=".$tid; ?>" class="f3">浏览</a></td> <td class="t2" width="30"><a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=r&tid=".$tid; ?>" class="f3">评论</a></td><?php if ($tag < 3) {?> <td class="t2" width="15">过</td> <td class="t2" width="15">滤</td><?php } else {?> <td class="t2" width="30">恢复</td> <td class="t2" width="80">删文屠夫</td><?php }?></tr><?php } elseif($pur > 2) {?><tr> <td class="t2" width="30">序号</td> <td class="t2" width="30">选中</td> <td class="t2" width="30"><a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=co&tid=".$tid; ?>" class="f3">状态</a></td> <td class="t2">主题</td> <td class="t2" width="120"> <a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=c&tid=".$tid; ?>" class="f3">创建</a> | <a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=u&tid=".$tid; ?>" class="f3">更新</a></td> <td class="t2" width="30"><a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=v&tid=".$tid; ?>" class="f3">浏览</a></td> <td class="t2" width="30"><a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=r&tid=".$tid; ?>" class="f3">评论</a></td><?php if($tag == 0) {?> <td class="t2" width="30"><a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=tb&tid=".$tid; ?>" class="f3">引用</td><?php }?> <td class="t2" width="15">改</td> <td class="t2" width="15">删</td></tr><?php } else {?><tr> <td class="t2" width="30">序号</td> <td class="t2" width="30"><a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=co&tid=".$tid; ?>" class="f3">状态</a></td> <td class="t2">主题</td> <td class="t2" width="120"><a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=c&tid=".$tid; ?>" class="f3">创建</a> | <a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=u&tid=".$tid; ?>" class="f3">更新</a></td> <td class="t2" width="30"><a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=v&tid=".$tid; ?>" class="f3">浏览</a></td> <td class="t2" width="30"><a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=r&tid=".$tid; ?>" class="f3">评论</a></td><?php if($tag == 0) {?> <td class="t2" width="30"><a href="pcdoc.php?<?php echo "userid=".$pc["USER"]."&tag=".$tag."&order=tb&tid=".$tid; ?>" class="f3">引用</td><?php } if ($is_admin) {?> <td class="t2" width="30">滤</td><?php }?></tr><?php } while($rows = mysql_fetch_array($result)) { $i ++; if($rows["comment"] == 0) $c = "<img src='images/lock.gif' alt='被锁定的主题' border='0'>"; else $c = "<img src='images/open.gif' alt='开放的主题' border='0'>"; if ($pc['USER'] == '_filter' ) { echo "<tr>\n<td class='t3'>".($start + $i)."</td>\n". "<td class='t4'>".(($rows[nid]&&$tag<3)?'评论':'文章')."</td>". "<td align=\"center\" class='t4'><a href=\"/bbsqry.php?userid=".$rows["username"]."\">".html_format($rows["username"])."</a></td>\n". "<td class='t3'>".$c."</td>\n". "<td class='t5'>"; echo ($rows["htmltag"]==1)?" ":"#"; echo "<img src=\"icon/".$rows["emote"].".gif\" border=\"0\" align=\"absmiddle\">\n<a href=\"pccon.php?id=".$pc["UID"]."&nid=".$rows["fid"]."&order=".$order."&tid=".$tid."\">".html_format($rows["subject"])."</a></td>\n". "<td class='t3'>\n".time_format($rows["created"])."</td>\n". "<td class='t4'>".$rows["visitcount"]."</td>\n". "<td class='t3'>".$rows["commentcount"]."</td>\n"; if ($tag < 3) { echo "<td class='t3'><a href=\"pcadmin_flt.php?fid=".$rows["fid"]."&filter=n\">过</a></td>\n". "<td class='t4'><a href=\"pcadmin_flt.php?fid=".$rows["fid"]."&filter=y\">滤</a></td>\n"; } else { echo "<td class='t3'><a href=\"pcadmin_flt.php?fid=".$rows["fid"]."&filter=r\">恢复</a></td>\n". "<td class='t4'>".$rows["recuser"]."</td>\n"; } echo "</tr>\n"; } elseif($pur > 2) { echo "<tr>\n<td class='t3'>".($start + $i)."</td>\n". "<td align=\"center\" class='t4'><input type=\"checkbox\" name=\"art".$i."\" value=\"".$rows["nid"]."\" class=\"b2\"></td>\n". "<td class='t3'>".$c."</td>\n". "<td class='t5'>"; echo ($rows["htmltag"]==1)?" ":"#"; echo "<img src=\"icon/".$rows["emote"].".gif\" border=\"0\" align=\"absmiddle\">\n<a href=\"pccon.php?id=".$pc["UID"]."&nid=".$rows["nid"]."&order=".$order."&tid=".$tid."\">".html_format($rows["subject"])."</a></td>\n". "<td class='t3'>\n".time_format($rows["created"])."<br/>".time_format($rows["changed"])."\n</td>\n". "<td class='t4'>".$rows["visitcount"]."</td>\n". "<td class='t3'>".$rows["commentcount"]."</td>\n"; if($tag == 0) { echo "<td class='t4'>"; echo $rows["trackback"]?$rows["trackbackcount"]:"-"; echo "</td>\n"; } echo "<td class='t3'><a href=\"pcmanage.php?userid=".$pc["USER"]."&act=edit&nid=".$rows["nid"]."\">改</a></td>\n". "<td class='t4'><a href=\"#\" onclick=\"bbsconfirm('pcmanage.php?userid=".$pc["USER"]."&act=del&nid=".$rows["nid"]."','确认删除?')\">删</a></td>\n". "</tr>\n"; } else { echo "<tr>\n<td class='t3'>".($start + $i)."</td>\n". "<td class='t4'>".$c."</td>\n". "<td class='t8'> <img src=\"icon/".$rows["emote"].".gif\" border=\"0\ align=\"absmiddle\">\n<a href=\"pccon.php?id=".$pc["UID"]."&nid=".$rows["nid"]."&order=".$order."&tid=".$tid."\">".html_format($rows["subject"])."</a></td>\n". "<td class='t4'>\n".time_format($rows["created"])."<br/>".time_format($rows["changed"])."\n</td>\n". "<td class='t3'>".$rows["visitcount"]."</td>\n". "<td class='t4'>".$rows["commentcount"]."</td>\n"; if($tag == 0) { echo "<td class='t3'>"; echo $rows["trackback"]?$rows["trackbackcount"]:"-"; echo "</td>\n"; } if ($is_admin) { echo "<td class='t4'><a href=\"#\" onclick=\"bbsconfirm('pcadmin_del.php?userid=".$pc["USER"]."&nid=".$rows["nid"]."','确认删除?')\">滤</a></td>\n"; } echo "</tr>\n"; } }?></table><p align="center" class="f1"><?php if ($pno > 1) echo "[<a href=\"pcdoc.php?userid=".$pc["USER"]."&tag=".$tag."&tid=".$tid."\">第一页</a>] [<a href=\"pcdoc.php?userid=".$pc["USER"]."&tag=".$tag."&tid=".$tid."&pno=".($pno-1)."\">上一页</a>] "; if ($cnt == $i) echo "[<a href=\"pcdoc.php?userid=".$pc["USER"]."&tag=".$tag."&tid=".$tid."&pno=".($pno+1)."\">下一页</a>]";?></p><?php if($pur > 2) display_action_bar($tag,$tid);?></form><?php mysql_free_result($result); } function display_fav_folder($link,$pc,$pid=0,$pur,$order="") { $rootpid = pc_fav_rootpid($link,$pc["UID"]); if(!$rootpid) { $pif = pc_init_fav($link,$pc["UID"]); if($pif) {?><script language="javascript">window.location.href="pcdoc.php?userid=<?php echo $pc["USER"]; ?>&tag=3";</script><?php } else { html_error_quit("对不起,Blog收藏夹初始化错误!"); exit(); } } if($pid == 0) $pid = $rootpid; else { $query = "UPDATE nodes SET `visitcount` = visitcount + 1 WHERE `access` = '3' AND `nid` = '".$pid."' AND `uid` = '".$pc["UID"]."';"; mysql_query($query,$link); } $query = "SELECT `nid` , `type` , `created` , `changed` , `emote` , `comment` , `commentcount` , `subject` , `visitcount`,`pid`,`htmltag` ". " FROM nodes WHERE `access` = '3' AND `uid` = '".$pc["UID"]."' AND `pid` = '".$pid."' "; switch($order) { case "c": $query.=" ORDER BY `created` DESC , "; break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -