pcdoc.php
来自「清华BBS源代码」· PHP 代码 · 共 866 行 · 第 1/2 页
PHP
866 行
if(pc_is_groupwork($pc)) pc_group_logs($link,$pc,"ADD FRIEND: ".$id); } function del_friend($pc) { $id = $_GET["id"]; pc_del_friend($id,$pc["USER"]); if(pc_is_groupwork($pc)) pc_group_logs($link,$pc,"DEL FRIEND: ".$id); } function display_friend_manage($pc,$err="") { $friendlist = pc_friend_list($pc["USER"]);?><table cellspacing="0" cellpadding="5" border="0" width="99%" class="t1"><tr> <td class="t2" width="25%">序号</td> <td class="t2">好友</td> <td class="t2">Blog</td> <td class="t2" width="25%">删除</td></tr><?php for($i = 0;$i < count($friendlist) ; $i ++) { echo "<tr>\n<td class='t3'>".($i+1)."</td>\n". "<td class='t4'><a href=\"/bbsqry.php?userid=".$friendlist[$i]."\">".$friendlist[$i]."</a></td>\n". "<td class='t3'><a href=\"pcsearch.php?exact=1&key=u&keyword=".$friendlist[$i]."\">".$friendlist[$i]."</a></td>\n". "<td class='t4'><a href=\"pcdoc.php?userid=".$pc["USER"]."&tag=5&act=delfriend&id=".urlencode($friendlist[$i])."\">删除</a></td>\n</tr>\n"; }?><form action="pcdoc.php" method="get" onsubmit="if(this.id.value==''){alert('请输入好友用户名!');return false;}"><tr> <td colspan="3" align="center"> <input type="hidden" name="act" value="addfriend"> <input type="hidden" name="tag" value="5"> <input type="hidden" name="userid" value="<?php echo $pc["USER"]; ?>"> <input type="text" size="12" name="id" id="id" class="b2"> <input type="submit" value="添加好友" class="b1"><?php echo $err;?> </td></tr></form></table><?php } function display_blog_settings($link,$pc,$tag) { global $sec; $blog = pc_blog_menu($link,$pc); ?><table cellspacing="0" cellpadding="5" border="0" width="99%" class="t1"><tr> <td class="t2" width="50">序号</td> <td class="t2">Blog</td> <td class="t2" width="200">分区</td> <td class="t2" width="50">修改</td> <td class="t2" width="50">删除</td></tr><?php for($i = 0; $i < count($blog); $i ++) { echo "<tr>\n<td class='t3'>".($i+1)."</td>\n". "<td class='t5'> <a href=\"pcdoc.php?userid=".$pc["USER"]."&tag=".$blog[$i]["TAG"]."&tid=".$blog[$i]["TID"]."\">《".html_format($blog[$i]["NAME"])."》</a></td>\n". "<td class='t3'><a href=\"pcdoc.php?userid=".$pc["USER"]."&tag=".$blog[$i]["TAG"]."\">".$sec[$blog[$i]["TAG"]]."</a></td>\n". "<td class='t4'><a href=\"pcmanage.php?userid=".$pc["USER"]."&act=tedit&tid=".$blog[$i]["TID"]."\">修改</a></td>\n". "<td class='t3'><a href=\"pcmanage.php?userid=".$pc["USER"]."&act=tdel&tid=".$blog[$i]["TID"]."\">"."删除</a></td>\n". "</tr>\n"; } ?></table><form action="pcmanage.php?userid=<?php echo $pc["USER"]; ?>&act=tadd" method="post" onsubmit="if(this.topicname.value==''){alert('请输入Blog名称!');return false;}"><input type="hidden" name="tag" value="<?php echo $tag; ?>"><p align="center" class="b2">新建Blog:分区<select name="access" class="b2"> <option value="0">公开区</option> <option value="1">好友区</option> <option value="2">私人区</option></select>Blog名<input type="text" name="topicname" maxlength="200" size="30" class="b2"><input type="submit" value="新建Blog" class="b1"></p></form><?php } function display_pc_settings($pc) {?><form action="pcmanage.php?userid=<?php echo $pc["USER"]; ?>&act=sedit" method="post" onsubmit="if(this.pcname.value==''){alert('请输入Blog名称!');return false;}"> <table cellspacing="0" cellpadding="3" border="0" width="99%" class="t1"> <tr> <td class="t2" colspan="2">参数设定</td></tr><tr> <td class="t3">Blog名称</td> <td class="t5"> <input type="text" maxlength="40" name="pcname" id="pcname" value="<?php echo $pc["NAME"]; ?>" class="f1"> </td></tr><tr> <td class="t3">Blog描述</td> <td class="t5"> <input type="text" maxlength="200" name="pcdesc" value="<?php echo $pc["DESC"]; ?>" class="f1"> </td></tr><tr> <td class="t3">Blog主题</td> <td class="t5"> <?php pc_select_blogtheme($pc["THEM"]); ?> [<a href="pcsec.php?act=list">查看本站可用的主题</a>] </td></tr><tr> <td class="t3">启用站外信箱</td> <td class="t5"> <input type="text" maxlength="200" name="pcuseremail" value="<?php echo $pc["EMAIL"]; ?>" class="f1"> (留空表示使用本站信箱) </td></tr><tr> <td class="t3">收藏夹模式</td> <td class="t5"> <input type="radio" name="pcfavmode" value="0" <?php if($pc["FAVMODE"]==0) echo "checked"; ?> > 私有 <input type="radio" name="pcfavmode" value="1" <?php if($pc["FAVMODE"]==1) echo "checked"; ?> > 对好友开放 <input type="radio" name="pcfavmode" value="2" <?php if($pc["FAVMODE"]==2) echo "checked"; ?> > 完全开放 </td></tr><tr> <td class="t3">Logo图片</td> <td class="t5"> <input type="text" maxlength="255" name="pclogo" value="<?php echo htmlspecialchars($pc["LOGO"]); ?>" class="f1"> (请填写Logo图片所在的URL地址,留空表示无LOGO图片) </td></tr><tr> <td class="t3">背景图片</td> <td class="t5"> <input type="text" name="pcbkimg" maxlength="255" value="<?php echo htmlspecialchars($pc["BKIMG"]); ?>" class="f1"> (请填写背景图片所在的URL地址,留空表示无背景图片) </td></tr><tr> <td class="t3">公开区默认分类</td> <td class="t5"> <input type="text" name="pcdefaulttopic" maxlength="100" value="<?php echo htmlspecialchars($pc["DEFAULTTOPIC"]); ?>" class="f1"> (留空表示取消公开区默认分类,建议在取消前移走该分类的所有文章) </td></tr><tr> <td class="t3">友情链接管理</td> <td class="t5"> <a href="pclinks.php?userid=<?php echo $pc["USER"]; ?>">点击此处</a> </td></tr><?php if(pc_is_groupwork($pc)) {?><tr> <td class="t3">成员管理</td> <td class="t5"> <a href="pcmember.php?userid=<?php echo $pc["USER"]; ?>">点击此处</a> </td></tr><?php }?><tr> <td class="t3">HTML编辑器</td> <td class="t5"> <?php /* <input type="radio" name="htmleditor" value="0" <?php if($pc["EDITOR"]==0) echo "checked"; ?>>HTMLArea编辑器 <input type="radio" name="htmleditor" value="9" <?php if($pc["EDITOR"]==9) echo "checked"; ?>>不使用编辑器 */ ?> <input type="radio" name="htmleditor" value="1" <?php if($pc["EDITOR"]==1) echo "checked"; ?>>HTMLArea编辑器 <input type="radio" name="htmleditor" value="2" <?php if($pc["EDITOR"]==2) echo "checked"; ?>>UBB编辑器 <input type="radio" name="htmleditor" value="0" <?php if($pc["EDITOR"]==0) echo "checked"; ?>>不使用编辑器 </td></tr><tr> <td class="t3">Blog模板</td> <td class="t5"> <input type="radio" name="template" value="0" <?php if($pc["STYLE"]["SID"]==0) echo "checked"; ?>>默认模板 <input type="radio" name="template" value="1" <?php if($pc["STYLE"]["SID"]==1) echo "checked"; ?>>水木清华 <input type="radio" name="template" value="2" <?php if($pc["STYLE"]["SID"]==2) echo "checked"; ?>>Earth Song <input type="radio" name="template" value="9" <?php if($pc["STYLE"]["SID"]==9) echo "checked"; ?>>自定义模板 <a href="pcstyle.php?userid=<?php echo $pc["USER"]; ?>">管理自定义模板(XML/XSL/CSS)</a> </td></tr><tr> <td class="t3">Blog首页显示文章数</td> <td class="t5"> <input type="input" name="indexnodes" class=f1 size=1 maxlength=1 value="<?php echo $pc["INDEX"]["nodeNum"]; ?>">篇(至多9篇) </td></tr><tr> <td class="t3">Blog首页每篇文章显示字节</td> <td class="t5"> <input type="input" name="indexnodechars" class=f1 size=5 maxlength=5 value="<?php echo $pc["INDEX"]["nodeChars"]; ?>">字节(设定0表示显示整篇文章) </td></tr><tr> <td class="t3">设定黑名单</td> <td class="t5"> <a href="pcblist.php">设定Blog黑名单</a> </td></tr><tr> <td class="t3">首页其他信息(支持HTML语法和JavaScript)</td> <td class="t5"> <textarea name="userinfor" id="userinfor" class="f1" rows=10 cols=50><?php echo $pc[INFOR]; ?></textarea> </td></tr><tr> <td class="t4" colspan="2"> <input type="submit" value="修改Blog参数" class="b1"> <input type="reset" value="恢复原始参数" class="b1"> </td></tr><tr></table></form><br><?php } $userid = addslashes($_GET["userid"]); $pid = (int)($_GET["pid"]); $tag = (int)($_GET["tag"]); $tid = (int)($_GET["tid"]); $link = pc_db_connect(); $pc = pc_load_infor($link,$userid); if(!$pc) { pc_db_close($link); html_init("gb2312","Blog"); html_error_quit("对不起,您要查看的Blog不存在"); exit(); } if(pc_is_admin($currentuser,$pc) && $loginok == 1) { if($_GET["act"] == "addfriend") $f_err = add_friend($pc); if($_GET["act"] == "delfriend") del_friend($pc); } $isfriend = pc_is_friend($currentuser["userid"],$pc["USER"]); $userPermission = pc_get_user_permission($currentuser,$pc); $sec = $userPermission["sec"]; $pur = $userPermission["pur"]; $tags = $userPermission["tags"]; $secnum = count($sec); if(!$tags[$tag]) $tag = 0; /*visit count start*/ if($pur != 3)//Blog所有者的访问不进行计数 windinsn dec 10,2003 pc_counter($link); /*visit count end*/ //if( pc_cache( $pc["MODIFY"] ) ) // return; if($tag == 0 || $tag ==1 || $tag ==2) { $blogMenus = pc_blog_menu($link,$pc,$tag); if(!$pc["DEFAULTTOPIC"] && $tag == 0 && !$tid) $tid = $blogMenus[0]["TID"]; } pc_html_init("gb2312",$pc["NAME"],"","",$pc["BKIMG"]);?><a name="top"></a><table cellspacing="0" cellpadding="0" border="0" width="100%"><tr> <td> <table cellspacing="0" cellpadding="3" border="0" class="t0" width="100%" class="tt1"> <tr> <td class="tt1"> <?php echo "<a href=\"/\" class=\"f1\">".$pcconfig["BBSNAME"]."</a> - <a href='pcmain.php' class=\"f1\">Blog</a> - <a href=\"index.php?id=".$pc["USER"]."\" class=\"f1\">".$pc["NAME"]."</a>"; ?></td> <td align="right" class="tt1"><?php echo pc_personal_domainname($pc["USER"]); ?> </td> </tr> </table> </td></tr><tr> <td class="f2" align="center" height="40" valign="middle"> <?php echo $pc["USER"]; ?> 的Blog - <?php echo $pc["NAME"]; ?> </td></tr><tr> <td> <table cellspacing="0" cellpadding="10" border="0" width="100%" class="tt2"> <tr><?php if($pc["LOGO"]) echo "<td><img src=\"".$pc["LOGO"]."\" border=\"0\" alt=\"".$pc["DESC"]."\"></td>\n";?> <td align="left"> <?php echo $pc["DESC"]; ?></td> </tr> </table> </td></tr><tr><td valign="top"><table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><?php if($tag == 0 || $tag == 1 || $tag ==2 ) {?> <td rowspan="2" align="middle" valign="top" width="150"> <?php display_blog_menu($pc,$tid,$tag,$blogMenus); ?> </td><?php }?> <td align="left" valign="top"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td><img src="images/empty.gif"></td> <td align="right" valign="top"> <table cellspacing="0" cellpadding="3" border="0" class='t21'> <tr><?php while(list($secTag,$secTagValue) = each($tags)) { if(!$secTagValue) continue; if($secTag == $tag) echo "<td width='70' class='t23'>".$sec[$tag]."</td>\n"; else echo "<td width='70' class='t22'><a href=\"pcdoc.php?userid=".$pc["USER"]."&tag=".$secTag."\" class='b22'>".$sec[$secTag]."</a></td>\n"; }?> </tr> </table> </td> <td width="10"><img src="images/empty.gif"></td> </tr> </table> </td></tr><tr> <td align="left" valign="top"><?php if($tag == 3) display_fav_folder($link,$pc,$pid,$pur,addslashes($_GET["order"])); elseif($tag < 5 ) display_art_list($link,$pc,$tag,$pur,$tid,addslashes($_GET["order"])); elseif($tag == 5) display_friend_manage($pc,$f_err); elseif($tag == 6) display_blog_settings($link,$pc,$tag); elseif($tag == 7) display_pc_settings($pc);?> </td></tr></table></td></tr><tr> <td align="center" valign="middle" class="f1"> [访问量 <font class="f4"> <?php echo $pc["VISIT"]; ?> </font> ] [更新时间: <?php echo time_format($pc["MODIFY"]); ?> ] [ <a href="pcnsearch.php?userid=<?php echo $pc["USER"]; ?>">文章搜索</a> ] [ <a href="index.php?id=<?php echo $pc["USER"]; ?>"><?php echo $pc["NAME"]; ?></a> ] <br> </td></tr><tr> <td align="center" class="tt3" valign="middle" height="25"> [<a href="#top" class=f1>返回顶部</a>] [<a href='javascript:location=location' class=f1>刷新</a>] [<?php echo "<a href=\""; if($pc["EMAIL"]) echo "mailto:".$pc["EMAIL"]; else echo "/bbspstmail.php?userid=".$pc["USER"]."&title=问候"; echo "\" class=f1>给".$pc["USER"]."写信</a>"; ?>] [<a href="index.php?id=<?php echo $pc["USER"]; ?>" class=f1><?php echo $pc["NAME"]; ?>首页</a>] [<a href="pcmain.php" class=f1>Blog首页</a>] [<a href="<?php if(!strcmp($currentuser["userid"],"guest")) echo "/guest-frames.html"; else echo "/frames.html";?> " class=f1 target="_top"><?php echo $pcconfig["BBSNAME"]; ?>首页</a>] <a href="rss.php?userid=<?php echo $pc["USER"]; ?>"><img src="images/xml.gif" border="0" alt="XML" align="absmiddle"></a> </td></tr></table><?php pc_db_close($link); html_normal_quit();?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?