当前位置: 首页>>代码示例>>PHP>>正文


PHP bbs_session_modify_user_mode函数代码示例

本文整理汇总了PHP中bbs_session_modify_user_mode函数的典型用法代码示例。如果您正苦于以下问题:PHP bbs_session_modify_user_mode函数的具体用法?PHP bbs_session_modify_user_mode怎么用?PHP bbs_session_modify_user_mode使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bbs_session_modify_user_mode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: login_init

<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_READING);
$gid = $_GET["gid"];
settype($gid, "integer");
$start = isset($_GET["start"]) ? $_GET["start"] : 0;
settype($start, "integer");
$pno = isset($_GET["pno"]) ? $_GET["pno"] : 0;
settype($pno, "integer");
if ($gid < 0) {
    $gid = 0;
}
if ($start <= 0) {
    $start = $gid;
}
$board = $_GET["board"];
$brdarr = array();
$bid = bbs_getboard($board, $brdarr);
if ($bid == 0) {
    html_error_quit("错误的讨论区");
}
$board = $brdarr["NAME"];
$board_desc = $brdarr["DESC"];
$brd_encode = urlencode($board);
//$isnormalboard = bbs_normalboard($board);
$lookupuser = array();
$guestUID = bbs_getuser("guest", $lookupuser);
$isnormalboard = bbs_checkreadperm($guestUID, $bid);
//bbs_set_onboard($bid,1);
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbstcon.php

示例2: login_init

<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_MAIL);
assert_login();
mailbox_header("阅读信件");
if (isset($_GET["path"])) {
    $mail_path = $_GET["path"];
    $mail_title = $_GET["title"];
} else {
    $mail_path = ".DIR";
    //default is .DIR
    $mail_title = "收件箱";
}
if (isset($_GET["start"])) {
    $start = $_GET["start"];
} else {
    $start = 999999;
}
//default*/
if (strstr($mail_path, '..')) {
    html_error_quit("读取邮件数据失败!");
}
$mail_fullpath = bbs_setmailfile($currentuser["userid"], $mail_path);
$mail_num = bbs_getmailnum2($mail_fullpath);
if ($mail_num < 0 || $mail_num > 30000) {
    html_error_quit("Too many mails!");
}
$num = 19;
if ($start > $mail_num - 19) {
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbsmailbox.php

示例3: login_init

<?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;
            }
        }
    }
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbsfall.php

示例4: login_init

<?php

require "www2-funcs.php";
require "www2-board.php";
require "www2-bmp.php";
$sessionid = login_init(TRUE);
bbs_session_modify_user_mode(BBS_MODE_EDIT);
assert_login();
$brdnum = @$_GET["bid"];
settype($brdnum, "integer");
$brdarr = array();
$isnormalboard = bbs_safe_getboard($brdnum, "", $brdarr);
if (is_null($isnormalboard)) {
    html_error_quit("错误的讨论区");
}
$board = $brdarr["NAME"];
$usernum = $currentuser["index"];
$brd_encode = urlencode($board);
if (bbs_checkpostperm($usernum, $brdnum) == 0) {
    html_error_quit("错误的讨论区或者您无权在此讨论区发表文章");
}
if (bbs_is_readonly_board($brdarr)) {
    html_error_quit("不能在只读讨论区发表文章");
}
$ftype = $dir_modes["NORMAL"];
bbs_board_nav_header($brdarr, "修改附件");
if (isset($_GET['id'])) {
    $id = intval($_GET['id']);
} else {
    html_error_quit("错误的文编号");
}
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbseditatt.php

示例5: login_init

<?php

require "www2-funcs.php";
if (defined("SITE_SMTH")) {
    // 不提供在线用户列表 add by windinsn, May 5,2004
    exit;
}
login_init();
bbs_session_modify_user_mode(BBS_MODE_LUSERS);
page_header("在线用户列表");
if (isset($_GET["start"])) {
    $start = $_GET["start"];
} else {
    $start = 1;
}
if ($start <= 0) {
    $start = 1;
}
$num = 20;
$users = bbs_getonline_user_list($start, $num);
if ($users == 0) {
    $count = 0;
} else {
    $count = count($users);
}
?>
<table class="main adj">
<col class="center"/><col/><col/><col/><col/><col/><col class="right"/>
<tbody>
<tr><th>序号</th><th>友</th><th>使用者代号</th><th>使用者昵称</th><th>来自</th><th>动态</th><th>发呆</th></tr>
<?php 
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbsuser.php

示例6: login_init

<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_SELECT);
require "www2-board.php";
if (isset($_GET["group"])) {
    $group = $_GET["group"];
} else {
    $group = 0;
}
settype($group, "integer");
if (isset($_GET["group2"])) {
    $group2 = $_GET["group2"];
} else {
    $group2 = 0;
}
settype($group2, "integer");
if ($group < 0 || $group >= BBS_SECNUM) {
    html_error_quit("错误的参数");
}
$boards = bbs_getboards(constant("BBS_SECCODE" . $group), $group2, 8);
if ($boards === FALSE) {
    html_error_quit("该目录尚未有版面");
}
page_header(constant("BBS_SECNAME" . $group . "_0"), "", "<meta name='kbsrc.brd' content='' />");
?>
<h1><?php 
echo constant("BBS_SECNAME" . $group . "_0");
?>
分区</h1>
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbsboa.php

示例7: login_init

            $num++;
            echo '<tr class="' . ($num % 2 ? 'odd' : 'even') . '"><td class="center">' . $num . '</td><td class="center"><script>' . $col1 . '</script></td><td>' . $col2 . '</td><td class="center">' . $col3 . '</td><td class="center">' . $col4 . '</td></tr>';
        }
    }
    ?>
</tbody></table>
<?php 
    if ($isBoard) {
        echo "</div>";
    }
    /* </div>: dirty way ... for closing <div class="doc"> */
}
require_once 'www2-funcs.php';
require_once 'www2-board.php';
login_init();
bbs_session_modify_user_mode(BBS_MODE_CSIE_ANNOUNCE);
if (isset($_GET["p"])) {
    $numpath = $_GET["p"];
    $brdarr = array();
    $bid = $numpath;
    settype($bid, "integer");
    if ($bid == 0) {
        html_error_quit("错误的版面");
    }
    $board = bbs_getbname($bid);
    if (!$board) {
        html_error_quit("错误的讨论区");
    }
    if ($bid != bbs_getboard($board, $brdarr)) {
        html_error_quit("错误的讨论区");
    }
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbs0an.php

示例8: login_init

<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_MSGING);
page_header("发讯息");
assert_login();
// get user input
if (isset($_POST["destid"])) {
    $destid = $_POST["destid"];
} elseif (isset($_GET["destid"])) {
    $destid = $_GET["destid"];
} else {
    $destid = "";
}
if (isset($_POST["msg"])) {
    $msg = $_POST["msg"];
} else {
    $msg = "";
}
if (isset($_POST["destutmp"])) {
    $destutmp = $_POST["destutmp"];
} elseif (isset($_GET["destutmp"])) {
    $destutmp = $_GET["destutmp"];
} else {
    $destutmp = 0;
}
settype($destutmp, "integer");
if (strlen($destid) == 0 || strlen($msg) == 0) {
    ?>
<form action="<?php 
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbssendmsg.php

示例9: login_init

<?php

require "www2-funcs.php";
require "www2-board.php";
$htmlErrorNotify = "divReplyForm";
login_init();
bbs_session_modify_user_mode(BBS_MODE_POSTING);
assert_login();
global $currentuser;
$userid = $currentuser["userid"];
if (isset($_GET["board"])) {
    $board = $_GET["board"];
} else {
    html_error_quit("错误的讨论区");
}
// 检查用户能否阅读该版
$brdarr = array();
$brdnum = bbs_getboard($board, $brdarr);
if ($brdnum == 0) {
    html_error_quit("错误的讨论区");
}
$board = $brdarr["NAME"];
bbs_set_onboard($brdnum, 1);
$usernum = $currentuser["index"];
if (bbs_checkreadperm($usernum, $brdnum) == 0) {
    html_error_quit("错误的讨论区");
}
if (bbs_checkpostperm($usernum, $brdnum) == 0) {
    html_error_quit("错误的讨论区或者您无权在此讨论区发表文章");
}
if (bbs_deny_me($userid, $board)) {
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbspst.php

示例10: login_init

<?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++) {
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbsparm.php

示例11: login_init

<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_QUERY);
if (isset($_GET["userid"])) {
    $userid = trim($_GET["userid"]);
    $lookupuser = array();
    if ($userid == "" || bbs_getuser($userid, $lookupuser) == 0) {
        html_error_quit("该用户不存在");
    }
    $usermodestr = bbs_getusermode($userid);
    page_header($lookupuser["userid"], "<a href='bbsqry.php'>查询网友</a>");
    ?>
<div class="main smaller">
<pre>
<?php 
    echo $lookupuser["userid"];
    ?>
 (<?php 
    echo htmlspecialchars($lookupuser["username"]);
    ?>
) 共上站 <?php 
    echo $lookupuser["numlogins"];
    ?>
 次,发表过 <?php 
    echo $lookupuser["numposts"];
    ?>
 篇文章
上次在  [<?php 
    echo date("D M j H:i:s Y", $lookupuser["lastlogin"]);
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbsqry.php

示例12: login_init

<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_LOOKMSGS);
page_header("察看所有讯息");
assert_login();
$msgs = bbs_getwebmsgs();
if ($msgs <= 0) {
    html_error_quit("系统错误");
}
$i = 0;
?>
<script type="text/javascript"><!--
var ta = new tabWriter(1,'main wide fixed',0,[['序号','6%','center'],['时间','20%',0],['类型','6%','center'],['对象','10%',0],['内容',0,0]]);
<?php 
foreach ($msgs as $msg) {
    ?>
ta.r('<?php 
    echo date("Y/m/j H:i:s", $msg["TIME"]);
    ?>
','<?php 
    if ($msg["SENT"]) {
        if ($msg["MODE"] == 3) {
            echo '收';
        } else {
            echo '<a href="bbssendmsg.php?destid=' . $msg["ID"] . '">收</a>';
        }
    } else {
        echo '发';
    }
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbsmsg.php

示例13: login_init

<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_POSTTMPL);
assert_login();
if (isset($_GET["board"])) {
    $board = $_GET["board"];
} else {
    html_error_quit("讨论区错误");
}
if (isset($_GET["num"])) {
    $num = $_GET["num"];
} else {
    html_error_quit("参数错误2");
}
if ($num <= 0) {
    html_error_quit("参数错误3");
}
$brdarr = array();
$brdnum = bbs_getboard($board, $brdarr);
if ($brdnum == 0) {
    html_error_quit("错误的讨论区");
}
if (bbs_checkreadperm($currentuser["index"], $brdnum) == 0) {
    html_error_quit("您没有权限");
}
$votearr = array();
$retnum = bbs_get_tmpl_from_num($board, $num, $votearr);
if ($retnum <= 0) {
    html_error_quit("错误");
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbspsttmpl.php

示例14: pc_html_init

function pc_html_init($charset, $title = "", $otherheader = "", $cssfile = "", $bkimg = "", $htmlEditor = 0)
{
    global $_COOKIE;
    global $cachemode;
    global $currentuser;
    bbs_session_modify_user_mode(BBS_MODE_BLOG);
    if ($cachemode == "") {
        cache_header("nocache");
    }
    echo '<?xml version="1.0" encoding="' . $charset . '"?>' . "\n";
    ?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
    echo $charset;
    ?>
"/>
<script src="pc.js"></script>
<?php 
    if (func_num_args() > 1) {
        ?>
<title><?php 
        echo $title;
        ?>
 </title>
<?php 
    }
    if ($cssfile != "") {
        ?>
<link rel="stylesheet" type="text/css" href="<?php 
        echo $cssfile;
        ?>
"/>
<?php 
    } else {
        ?>
<link rel="stylesheet" type="text/css" href="default.css"/>
<?php 
    }
    if ($htmlEditor == 3) {
        ?>
<script type="text/javascript">
var _editor_url = "htmlarea/";
var editor = null;
</script>
<!-- load the main HTMLArea files -->
<script type="text/javascript" src="htmlarea/htmlarea.js"></script>
<style type="text/css">
textarea { background-color: #fff; border: 1px solid 00f; }
</style>
<?php 
    } else {
        if ($htmlEditor == 1) {
            ?>
<script type="text/javascript">
var _editor_url = "htmlarea-beta/";
var editor = null;
</script>
<!-- load the main HTMLArea files -->
<script type="text/javascript" src="htmlarea-beta/htmlarea.js"></script>
<script type="text/javascript" src="htmlarea-beta/lang/en.js"></script>
<script type="text/javascript" src="htmlarea-beta/dialog.js"></script>
<script type="text/javascript" src="htmlarea-beta/popupwin.js"></script>
<style type="text/css">
@import url(htmlarea/htmlarea.css);
textarea { background-color: #fff; border: 1px solid 00f; }
</style>
<?php 
        }
    }
    ?>
</head>
<body TOPMARGIN="0" leftmargin="0"
<?php 
    if ($htmlEditor == 1 || $htmlEditor == 3) {
        ?>
 onload="initEditor()"
<?php 
    }
    if ($bkimg) {
        echo " background = \"" . $bkimg . "\" ";
    }
    ?>
>
<textarea id="holdtext" style="display:none;"></textarea>
<?php 
}
开发者ID:bianle,项目名称:www2,代码行数:90,代码来源:pcfuncs.php

示例15: login_init

<?php

require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_FRIEND);
assert_login();
page_header("在线好友列表");
$friends = bbs_getonlinefriends();
if ($friends == 0) {
    $num = 0;
} else {
    $num = count($friends);
}
?>
<table class="main adj">
<col class="center"/><col/><col/><col/><col/><col/><col class="right"/>
<tbody>
<tr><th>序号</th><th>友</th><th>使用者代号</th><th>使用者昵称</th><th>来自</th><th>动态</th><th>发呆</th></tr>
<?php 
for ($i = 0; $i < $num; $i++) {
    echo "<tr><td>" . ($i + 1) . "</td>";
    echo "<td>√";
    if ($friends[$i]["invisible"]) {
        echo "C";
    } else {
        echo " ";
    }
    ?>
</td>
<td><a href="bbsqry.php?userid=<?php 
    echo $friends[$i]["userid"];
开发者ID:bianle,项目名称:www2,代码行数:31,代码来源:bbsfriend.php


注:本文中的bbs_session_modify_user_mode函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。