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 }
pc_db_close($link); html_init("gb2312", $pcconfig["BBSNAME"] . "Blog"); html_error_quit("对不起,您要查看的Blog不存在"); exit; } $stylesheet = pc_load_stylesheet($link, $pc); $userPermission = pc_get_user_permission($currentuser, $pc); $sec = $userPermission["sec"]; $pur = $userPermission["pur"]; $tags = $userPermission["tags"]; if ($pur != 3) { pc_counter($link); } $nodes = pc_load_nodes($link, $pc, $pur, $pno); //文章 $blogs = pc_blog_menu($link, $pc, 0); //分类 $comments = pc_load_comments($link, $pc, $pur); //评论 $bc = pc_load_calendar($link, $pc, $pur); //日历 $trackbacks = pc_load_trackbacks($link, $pc); //引用 $archfiles = pc_load_archfile($pc); //归档 pc_db_close($link); header("Content-Type: text/xml"); header("Content-Disposition: inline;filename=SMTHBlog_" . $pc["USER"] . ".xml"); echo '<?xml version="1.0" encoding="GB2312"?>'; if ($stylesheet === 0) { echo '<?xml-stylesheet type="text/xsl" href="/pc/indexxsl.php?id=' . $pc["USER"] . '"?>';
?> >允许 <input type="radio" name="comment" class="f1" value="1" <?php if ($rows["comment"] == 0) { echo "checked"; } ?> >不允许 </td> </tr> <tr> <td class="t8"> Blog <select name="tid" class="f1"> <?php $blogs = pc_blog_menu($link, $pc, $rows["access"]); for ($i = 0; $i < count($blogs); $i++) { if ($blogs[$i]["TID"] == $rows["tid"]) { echo "<option value=\"" . $blogs[$i]["TID"] . "\" selected>" . html_format($blogs[$i]["NAME"]) . "</option>"; } else { echo "<option value=\"" . $blogs[$i]["TID"] . "\" >" . html_format($blogs[$i]["NAME"]) . "</option>"; } } ?> </select> 主题 <select name="theme" class="f1"> <?php while (list($key, $val) = each($pcconfig["SECTION"])) { if ($key == $rows["theme"]) { echo "<option value=\"" . $key . "\" selected>" . html_format($val) . "</option>";
html_error_quit("对不起,您要查看的Blog不存在"); exit; } $userPermission = pc_get_user_permission($currentuser, $pc); $pur = $userPermission["pur"]; $tags = $userPermission["tags"]; if (!$tags[$node[access]]) { pc_html_init("gb2312", $pc["NAME"], "", "", $pc["BKIMG"]); html_error_quit("对不起,您无权查看该文章!"); exit; } if ($pur != 3) { pc_counter($link); pc_ncounter($link, $nid); } $blogs = pc_blog_menu($link, $pc, $node[access]); if ($node[comment]) { $comments = array(); $query = "SELECT * FROM comments WHERE nid = " . $node[nid] . ";"; $result = mysql_query($query, $link); while ($rows = mysql_fetch_array($result)) { $comments[] = $rows; } mysql_free_result($result); } if ($node[trackback] && $node[access] == 0) { $trackbacks = array(); $query = "SELECT * FROM trackback WHERE nid = " . $node[nid] . ";"; $result = mysql_query($query, $link); while ($rows = mysql_fetch_array($result)) { $trackbacks[] = $rows;