예제 #1
0
파일: bbsfall.php 프로젝트: bianle/www2
<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_GMENU);
toolbox_header("好友名单");
assert_login();
if (isset($_GET["start"])) {
    $start = $_GET["start"];
    settype($start, "integer");
} else {
    $start = 0;
}
$total = bbs_countfriends($currentuser["userid"]);
if ($total < 0) {
    html_error_quit("系统错误");
}
if ($total != 0) {
    if ($start >= $total) {
        $start = $total - 20;
        if ($start < 0) {
            $start = 0;
        }
    } else {
        if ($start < 0) {
            $start = $total - 20;
            if ($start < 0) {
                $start = 0;
            }
        }
    }
예제 #2
0
파일: bbsstyle.php 프로젝트: bianle/www2
<?php

require "www2-funcs.php";
login_init();
toolbox_header("界面修改");
if (isset($_GET['do']) && isset($_COOKIE["WWWPARAMS"])) {
    if (strcmp($currentuser["userid"], "guest")) {
        bbs_setwwwparameters($_COOKIE["WWWPARAMS"]);
        /* TODO: return value ? */
    }
}
?>
<script type="text/javascript"><!--
	var settings = {"sizer": 3, "pager": 4, "hot": 5, "unread": 12, "replyform": 13}; /* faint IE5 */
	function setInd(n, v) {
		var ff = getObj(n + 'F');
		var tt = getObj(n + 'T');
		/* some users might not have bold font... that's why I add underline */
		if (ff) {
			ff.style.fontWeight = v ? 'normal' : 'bold';
			ff.style.textDecoration = v ? 'none' : 'underline';
		}
		if (tt) {
			tt.style.fontWeight = v ? 'bold' : 'normal';
			tt.style.textDecoration = v ? 'underline' : 'none';
		}
	}
	function adjSet(n, v) {
		var idx = settings[n];
		if (n == "sizer") {
			getObj("fontSizer").style.display = v ? "block" : "none";
예제 #3
0
파일: bbssig.php 프로젝트: bianle/www2
<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_EDITUFILE);
toolbox_header("签名档修改");
assert_login();
$filename = bbs_sethomefile($currentuser["userid"], "signatures");
if (isset($_POST['text'])) {
    $fp = @fopen($filename, "w+");
    if ($fp !== false) {
        fwrite($fp, str_replace("\r\n", "\n", $_POST["text"]));
        fclose($fp);
        bbs_recalc_sig();
        html_success_quit($currentuser["userid"] . "签名档修改成功");
    }
    html_error_quit("系统错误");
}
?>
<form method="post" action="bbssig.php" class="large">
<fieldset><legend>修改签名档 (每 6 行为一个单位,可设置多个签名档)</legend>
<textarea name="text" onkeydown='return textarea_okd(this, event);' wrap="physical" id="sfocus">
<?php 
echo @htmlspecialchars(file_get_contents($filename));
?>
</textarea>
</fieldset>
<div class="oper">
<input type="submit" value="存盘" /> <input type="reset" value="复原" />
</div>
</form>
예제 #4
0
파일: bbsparm.php 프로젝트: bianle/www2
<?php

/* 修改个人参数,从 wForum 偷来的。atppp 20040524 */
require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_USERDEF);
toolbox_header("个人参数修改");
assert_login();
define('SHOWTELNETPARAM', 0);
//是否显示 telnet 选项
/* 格式:每项五个参数,第一个 0 表示 telnet 下专用参数;第二个是参数名称;第三个是参数具体解释;第四五是参数 ON 和 OFF 所代表的具体含义 */
$user_define = array(array(0, "显示活动看版", "是否显示活动看板", "显示", "不显示"), array(0, "使用彩色", "是否使用彩色显示", "使用", "不使用"), array(0, "编辑时显示状态栏", "编辑文章时是否显示状态栏", "显示", "不显示"), array(0, "分类讨论区以 New 显示", "是否以未读方式阅读分类讨论区", "是", "否"), array(0, "选单的讯息栏", "是否显示选单讯息栏", "显示", "不显示"), array(0, "上站时显示好友名单", "上站时是否显示好友在线名单", "显示", "不显示"), array(0, "让好友呼叫", "当呼叫器关闭时是否允许好友呼叫", "是", "否"), array(0, "使用自己的离站画面", "是否使用自己的离站画面", "是", "否"), array(0, "进站时显示备忘录", "进站时是否显示备忘录", "是", "否"), array(0, "离站时显示备忘录", "离站时是否显示备忘录", "是", "否"), array(0, "讯息栏模式", "讯息栏的显示内容", "呼叫器状态", "在线人数"), array(0, "菜单模式选择", "telnet的菜单模式", "缺省模式", "精简模式"), array(0, "阅读文章是否使用绕卷选择", "阅读文章是否绕卷选择", "是", "否"), array(0, "阅读文章游标停於第一篇未读", "文章列表时光标自动定位的位置", "第一篇未读文章", "最新一篇文章"), array(0, "屏幕标题色彩", "屏幕标题色彩显示模式", "标准", "自动变换"), array(1, "接受所有人的讯息", "是否允许所有人给您发短消息", "是", "否"), array(1, "接受好友的讯息", "是否允许好友给您发短消息", "是", "否"), array(0, "收到讯息发出声音", "收到短信后是否以声音提醒您", "是", "否"), array(0, "离站後寄回所有讯息", "退出登录时是否把短信息寄回信箱", "是", "否"), array(0, "发文章时实时显示讯息", "编辑文章时是否实时显示短消息", "是", "否"), array(0, "菜单上显示帮助信息", "是否在菜单上显示帮助信息", "是", "否"), array(0, "进站时显示十大新闻", "进站时是否显示十大热门话题", "显示", "不显示"), array(0, "进站时观看留言版", "进站时是否显示留言板", "显示", "不显示"), array(0, "忽略讯息功能键", "用哪个键忽略短信", "Enter键", "Esc键"), array(0, "使用高亮界面", "是否使用高亮界面", "使用", "不使用"), array(0, "进站时观看上站人数统计图", "进站时是否显示上站人数统计图", "显示", "不显示"), array(0, "未读标记字符", "用哪个字符作为未读标记", "*", "N"), array(0, "使用GB码阅读", "用GB码阅读", "是", "否"), array(0, "对汉字进行整字处理", "是否对汉字进行整字处理", "是", "否"), array(0, "显示详细用户信息(wForum)", "是否允许他人看到您的用户资料", "允许", "不允许"), array(0, "显示真实用户信息(wForum)", "是否允许他人看到您的真实资料", "允许", "不允许"));
$user_define1 = array(array(1, "隐藏 IP", "是否隐藏自己的 IP 信息", "隐藏", "不隐藏"));
$mailbox_prop = array(array(1, "发信时保存信件到发件箱", "是否发信时自动选择保存到发件箱", "保存", "不保存"), array(1, "删除信件时不保存到垃圾箱", "是否删除信件时不保存到垃圾箱", "不保存", "保存"), array(0, "快捷邮箱键", "版面按 'v' 时进入什么界面", "信箱主界面", "收件箱"), array(1, "自动清除过期垃圾邮件", "是否自动清除过期垃圾邮件", "是", "否"));
if (isset($_GET['do'])) {
    $userdefine0 = getOptions("user_define", $currentuser['userdefine0']);
    $userdefine1 = getOptions("user_define1", $currentuser['userdefine1']);
    $mailbox_prop = getOptions("mailbox_prop", $currentuinfo['mailbox_prop']);
    bbs_setuserparam($userdefine0, $userdefine1, $mailbox_prop);
    html_success_quit("参数修改成功");
    exit;
}
showOptionsForm();
page_footer();
function getOptions($var_name, $oldvalue)
{
    global ${$var_name};
    $userdefine = ${$var_name};
    $ccc = count($userdefine);
    $flags = $oldvalue;
    for ($i = 0; $i < $ccc; $i++) {
예제 #5
0
파일: bbsfdel.php 프로젝트: bianle/www2
<?php

require "www2-funcs.php";
login_init();
toolbox_header("好友编辑");
assert_login();
if (isset($_GET["userid"])) {
    $duserid = $_GET["userid"];
    $ret = bbs_delete_friend($duserid);
    if ($ret == 1) {
        html_error_quit("您没有设定任何好友");
    } else {
        if ($ret == 2) {
            html_error_quit("此人本来就不在你的好友名单中");
        } else {
            if ($ret == 3) {
                html_error_quit("删除失败");
            } else {
                html_success_quit($duserid . "已从您的好友名单中删除.");
            }
        }
    }
}
예제 #6
0
파일: bbspwd.php 프로젝트: bianle/www2
<?php

require "www2-funcs.php";
login_init();
toolbox_header("密码修改");
assert_login();
if (isset($_GET['do'])) {
    $pass = $_POST['pw2'];
    if (strlen($pass) < 4 || strlen($pass) > 39) {
        html_error_quit("新密码长度应为 4~39");
    }
    if ($pass != $_POST['pw3']) {
        html_error_quit("两次输入的密码不相同");
    }
    if (bbs_checkuserpasswd($currentuser["userid"], $_POST['pw1']) != 0) {
        html_error_quit("密码不正确");
    }
    $simplepasswd = bbs_simplepasswd($pass);
    if ($simplepasswd == -1) {
        html_error_quit("该密码被禁止使用,请重新设置密码");
    } else {
        if ($simplepasswd) {
            prompt_setpasswd();
        }
    }
    if (!bbs_setpassword($currentuser["userid"], $pass)) {
        html_error_quit("系统错误,请联系管理员");
    }
    html_success_quit("密码修改成功,您的新密码已设定");
    exit;
}
예제 #7
0
파일: bbsinfo.php 프로젝트: bianle/www2
<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_EDITUFILE);
toolbox_header("个人资料修改");
assert_login();
if (isset($_GET["submit"]) || isset($_POST["submit"])) {
    if (isset($_POST["username"])) {
        $username = trim($_POST["username"]);
        if (strlen($username) < 2) {
            html_error_quit("昵称太短");
        }
    } else {
        html_error_quit("昵称必须填写");
    }
    if (isset($_POST["realname"])) {
        $realname = $_POST["realname"];
        if (strlen($realname) < 2) {
            html_error_quit("真实姓名太短");
        }
    } else {
        html_error_quit("真实姓名必须填写");
    }
    if (isset($_POST["address"])) {
        $address = $_POST["address"];
        if (strlen($address) < 8) {
            html_error_quit("居住地址太短");
        }
    } else {
        html_error_quit("居住地址必须填写");
예제 #8
0
파일: bbsnick.php 프로젝트: bianle/www2
<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_GMENU);
toolbox_header("��ʱ�dz��޸�");
assert_login();
if (isset($_POST["username"])) {
    $username = $_POST["username"];
    if (strlen($username) < 2) {
        html_error_quit("�dz�̫��");
    }
    $ret = bbs_modify_nick($username);
    if ($ret < 0) {
        html_error_quit("ϵͳ����");
    } else {
        html_success_quit("��ʱ�dz��޸ijɹ�");
    }
    exit;
}
?>
<form action="bbsnick.php" method="post" class="medium">
	<fieldset><legend>��ʱ�ı��dz� (�����ķ���Ч)</legend>
		<div class="inputs">
			<label>���dz�:</label>
			<input id="sselect" type="text" name="username" value="<?php 
echo htmlspecialchars($currentuser["username"], ENT_QUOTES);
?>
" size="24" maxlength="39"/>
		</div>
	</fieldset>
예제 #9
0
파일: bbsbadlist.php 프로젝트: bianle/www2
<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_EDITUFILE);
toolbox_header("黑名单");
assert_login();
$fname = bbs_sethomefile($currentuser["userid"], "ignores");
if (isset($_POST["badlist"])) {
    $empty = "";
    for ($i = 0; $i < BBS_IDLEN; $i++) {
        $empty .= "";
    }
    $badlist = explode("\n", $_POST["badlist"]);
    $count = count($badlist);
    $badstr = "";
    $user = array();
    $reallist = array();
    $rid = 0;
    for ($i = 0; $i < $count; $i++) {
        $userid = trim($badlist[$i]);
        if (bbs_getuser($userid, $user)) {
            if ($currentuser["userid"] == $user["userid"]) {
                break;
            }
            $repeat = 0;
            for ($j = 0; $j < $rid; $j++) {
                if ($reallist[$j] == $user["userid"]) {
                    $repeat = 1;
                    break;
                }
예제 #10
0
파일: bbsplan.php 프로젝트: bianle/www2
<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_EDITUFILE);
toolbox_header("说明档修改");
assert_login();
$filename = bbs_sethomefile($currentuser["userid"], "plans");
if (isset($_POST['text'])) {
    $fp = @fopen($filename, "w+");
    if ($fp !== false) {
        fwrite($fp, str_replace("\r\n", "\n", $_POST["text"]));
        fclose($fp);
        html_success_quit($currentuser["userid"] . "说明档修改成功");
    }
    html_error_quit("系统错误");
}
?>
<form method="post" action="bbsplan.php" class="large">
<fieldset><legend>修改说明档</legend>
<textarea name="text" onkeydown='return textarea_okd(this, event);' wrap="physical" id="sfocus">
<?php 
echo @htmlspecialchars(file_get_contents($filename));
?>
</textarea>
</fieldset>
<div class="oper">
<input type="submit" value="存盘" /> <input type="reset" value="复原" />
</div>
</form>
<?php