示例#1
0
文件: pcdoc.php 项目: bianle/www2
function display_pc_settings($pc)
{
    global $pcconfig;
    ?>
<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">&nbsp;
	<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">&nbsp;
	<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">&nbsp;
	<?php 
    pc_select_blogtheme($pc["THEM"]);
    ?>
	[<a href="pcsec.php?act=list">查看本站可用的主题</a>]
	</td>
</tr>
<tr>
	<td class="t3">启用站外信箱</td>
	<td class="t5">&nbsp;
	<input type="text" maxlength="200" name="pcuseremail" value="<?php 
    echo $pc["EMAIL"];
    ?>
" class="f1">
	(留空表示使用本站信箱)
	</td>
</tr>
<tr>
	<td class="t3">收藏夹模式</td>
	<td class="t5">&nbsp;
	<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">&nbsp;
	<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">&nbsp;
	<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">&nbsp;
	<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">&nbsp;
	<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">&nbsp;
	<a href="pcmember.php?userid=<?php 
        echo $pc["USER"];
        ?>
">点击此处</a>
	</td>
</tr>
<?php 
    }
    if ($pcconfig["USERFILES"]) {
        if ($pc["FILELIMIT"] && $pc["FILENUMLIMIT"]) {
            ?>
<tr>
	<td class="t3">个人空间</td>
	<td class="t5">&nbsp;
	<a href="pcfile.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";
    }
    ?>
>不使用编辑器
	<input type="radio" name="htmleditor" value="3" <?php 
    if ($pc["EDITOR"] == 3) {
        echo "checked";
    }
    ?>
>HTMLArea编辑器(rc1)
	</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>
<?php 
    if (defined("_BLOG_ANONY_COMMENT_")) {
        ?>
<tr>
	<td class="t3">是否允许匿名用户评论</td>
	<td class="t5">
		<input type="checkbox" name="anonycomment" value="yes" class=f1<?php 
        echo $pc["ANONYCOMMENT"] ? " checked" : "";
        ?>
>勾选表示允许匿名评论
	</td>
</tr>
<?php 
    }
    ?>
<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 htmlspecialchars($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 
}
示例#2
0
<table cellspacing="0" cellpadding="3" class="t1">
<tr>
<td class="t2">用户名</td>
<td class="t2">BLOG名</td>
<td class="t2">访问数</td>
<td class="t2">日志数</td>
<td class="t2">公</td>
<td class="t2">人</td>
<td class="t2">文</td>
<td class="t2">新</td>
<td class="t2">操作</td>
</tr>
<?php 
    foreach ($pcs as $pc) {
        echo "<tr><td class=t4><a href=\"/bbsqry.php?userid=" . $pc[username] . "\">" . $pc[username] . "</a></td>" . "<td class=t5><a href=\"index.php?id=" . $pc[username] . "\" title=\"" . html_format($pc[description]) . "\">" . html_format($pc[corpusname]) . "</a></td>" . "<td class=t4>" . $pc[visitcount] . "</td>" . "<td class=t3>" . $pc[nodescount] . "</td><td class=t4>";
        echo pc_is_groupwork(array("TYPE" => $pc[pctype])) ? "<font color=red><b>Y</b></font>" : "n";
        echo "</td><td class=t4>";
        echo $pc[pctype] < 2 ? "y" : "<font color=red><b>N</b></font>";
        echo "</td><td class=t4>";
        echo $pc[pctype] < 4 ? "y" : "<font color=red><b>N</b></font>";
        echo "</td><td class=t4>";
        echo $pc[pctype] < 6 ? "y" : "<font color=red><b>N</b></font>";
        echo "</td><td class=t3><a href=\"" . $_SERVER["PHP_SELF"] . "?userid=" . $pc[username] . "\">操作</a></td></tr>";
    }
    ?>
</table>
<br />
<form action="<?php 
    echo $_SERVER["PHP_SELF"];
    ?>
" method="get">
示例#3
0
文件: pcmember.php 项目: bianle/www2
    html_error_quit("guest 没有Blog!");
    exit;
} else {
    $link = pc_db_connect();
    $pc = pc_load_infor($link, $_GET["userid"]);
    if (!$pc) {
        pc_db_close($link);
        html_error_quit("对不起,您要查看的Blog不存在");
        exit;
    }
    if (!pc_is_admin($currentuser, $pc)) {
        pc_db_close($link);
        html_error_quit("对不起,您要查看的Blog不存在");
        exit;
    }
    if (!pc_is_groupwork($pc)) {
        pc_db_close($link);
        html_error_quit("对不起,只有公有BLOG才能编辑成员");
        exit;
    }
    if ($_GET["act"] == "add" && $_GET["id"]) {
        pc_add_member($link, $pc, $_GET["id"]);
    }
    if ($_GET["act"] == "del" && $_GET["id"]) {
        pc_del_member($link, $pc, $_GET["id"]);
    }
    $members = pc_get_members($link, $pc);
    pc_html_init("gb2312", $pc["NAME"]);
    ?>
<br /><br />
<p align="center"><b>成员管理</b></p>
示例#4
0
文件: pcfuncs.php 项目: bianle/www2
function pc_convertto_group($link, $pc)
{
    if (!$pc || !is_array($pc)) {
        return -1;
    }
    if (pc_is_groupwork($pc)) {
        return -2;
    }
    $query = "UPDATE users SET createtime = createtime , pctype = 1  WHERE uid = " . $pc["UID"] . " LIMIT 1;";
    if (!mysql_query($query, $link)) {
        return -4;
    }
    $pc["TYPE"] = 1;
    if (!pc_group_logs($link, $pc, "CONVERT TO GROUPWORK")) {
        return -5;
    }
    return 0;
}
示例#5
0
文件: index.php 项目: bianle/www2
function display_nodes($link, $pc, $nodes, $tablewidth = "100%", $tablestyle = 0, $totalnodes, $pno)
{
    global $pcconfig;
    for ($i = 0; $i < min($pc["INDEX"]["nodeNum"], count($nodes)); $i++) {
        $contentcss = $nodes[$i]["htmltag"] ? "indexcontentwithhtml" : "indexcontent";
        if ($tablestyle == 1) {
            $tableclass = "f1";
            if ($i % 2 == 1) {
                $cellclass = array("t14", "t14", "t14");
            } else {
                $cellclass = array("t16", "t16", "t16");
            }
        } else {
            $tableclass = "t15";
            if ($i % 2 == 1) {
                $cellclass = array("t14", "t11", "t8");
            } else {
                $cellclass = array("t16", "t13", "t5");
            }
        }
        echo "<center><table cellspacing=0 cellpadding=10 width=\"" . $tablewidth . "\" class=" . $tableclass . ">\n" . "<tr><td class=\"" . $cellclass[0] . "\">" . time_format_date($nodes[$i]["created"]) . "</td>" . "<td class=\"" . $cellclass[1] . "\" align=right>[<a href=\"pccom.php?act=pst&nid=" . $nodes[$i]["nid"] . "\">评论</a>]\n" . "[<a href=\"";
        if ($pc["EMAIL"]) {
            echo "mailto:" . $pc["EMAIL"];
        } else {
            echo "/bbspstmail.php?userid=" . $pc["USER"] . "&title=问候";
        }
        echo "\">写信问候</a>]</td></tr>\n" . "<tr><td class=\"" . $cellclass[0] . "\"><img src=\"icon/" . $nodes[$i]["emote"] . ".gif\" border=0 align=absmiddle>\n" . "<a href=\"pccon.php?id=" . $pc["UID"] . "&nid=" . $nodes[$i]["nid"] . "&s=all\" class=f2>" . html_format($nodes[$i]["subject"]) . "</a></td>" . "<td align=right class=\"" . $cellclass[1] . "\">&nbsp;</td>" . "</tr>";
        if ($pc["INDEX"]["nodeChars"] == 0) {
            echo "<tr><td colspan=2 class=\"" . $cellclass[1] . "\"><font class='" . $contentcss . "'>" . html_format($nodes[$i]["body"], TRUE, $nodes[$i]["htmltag"]) . "</font></td></tr>\n";
        } else {
            echo "<tr><td colspan=2 class=\"" . $cellclass[1] . "\"><font class='" . $contentcss . "'>" . html_format(substr($nodes[$i]["body"], 0, $pc["INDEX"]["nodeChars"]) . " ", TRUE, $nodes[$i]["htmltag"]);
            if (strlen($nodes[$i]["body"]) > $pc["INDEX"]["nodeChars"]) {
                echo " <br class=\"\" /> ......<br class=\"\" /><br class=\"\" />" . "<strong><A href=\"pccon.php?id=" . $pc["UID"] . "&nid=" . $nodes[$i]["nid"] . "&s=all\">>> 阅读全文</A></strong>" . "</font></td></tr>\n";
            }
        }
        if (pc_is_groupwork($pc) && $nodes[$i]["publisher"]) {
            $publisher = $nodes[$i]["publisher"];
        } else {
            $publisher = $pc["USER"];
        }
        echo "<tr><td colspan=2 class=\"" . $cellclass[2] . "\"><font class=\"f7\">\n&nbsp; <a href=\"/bbsqry.php?userid=" . $publisher . "\">" . $publisher . "</a> 发布于 " . time_format($nodes[$i]["created"]) . "\n|\n浏览[" . $nodes[$i]["visitcount"] . "]" . "\n|\n<a href=\"pccon.php?id=" . $pc["UID"] . "&nid=" . $nodes[$i]["nid"] . "&s=all\">评论[" . $nodes[$i]["commentcount"] . "]</a>";
        if ($nodes[$i]["trackback"]) {
            echo "\n|\n<a href=\"javascript:openScript('pctb.php?nid=" . $nodes[$i]["nid"] . "&uid=" . $pc["UID"] . "&subject=" . base64_encode($nodes[$i]["subject"]) . "' , 460, 480)\">引用[" . $nodes[$i]["trackbackcount"] . "]</a>";
            echo "&nbsp;<a href=\"#\" onClick=\"javascript: holdtext.innerText = 'http://" . $pcconfig["SITE"] . "/pc/tb.php?id=" . $nodes[$i]["nid"] . "'; Copied = holdtext.createTextRange(); Copied.execCommand('Copy'); alert('该引用地址已经复制到剪贴板'); return false; \">Trackback Ping URL</a>";
        }
        echo "</font></td></tr>\n</table></center>\n";
    }
    echo "<center><table cellspacing=0 cellpadding=10 width=\"" . $tablewidth . "\" class=" . $tableclass . ">\n" . "<tr><td class=\"" . $cellclass[2] . "\" align=\"center\">";
    display_blog_page_tool($pc, $totalnodes, $pno);
    echo "</td></tr></table></center>";
}
示例#6
0
文件: pcshowcom.php 项目: bianle/www2
';">
</tr>
</table>
</form></center>
<?php 
}
$userPermission = pc_get_user_permission($currentuser, $pc);
$sec = $userPermission["sec"];
$pur = $userPermission["pur"];
$tags = $userPermission["tags"];
if (!$tags[$node["access"]]) {
    pc_html_init("gb2312", $pcconfig["BBSNAME"] . "Blog");
    html_error_quit("对不起,您不能查看本条记录!");
    exit;
}
if (!($pur == 3 && !pc_is_groupwork($pc)) && $node["nodetype"] == 0) {
    pc_counter($link);
    pc_ncounter($link, $comment["nid"]);
}
pc_html_init("gb2312", $pcconfig["BBSNAME"] . "Blog");
?>
<br>
<center>
<table cellspacing="0" cellpadding="5" border="0" width="90%" class="t1">
<tr>
	<td class="t2">
	<img src="icon/<?php 
echo $node["emote"];
?>
.gif" border="0" alt="心情符号" align="absmiddle">
	《