本文整理汇总了PHP中html_error_quit函数的典型用法代码示例。如果您正苦于以下问题:PHP html_error_quit函数的具体用法?PHP html_error_quit怎么用?PHP html_error_quit使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了html_error_quit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: admin_check
function admin_check($adminitem)
{
global $adminperm, $currentuser;
if (!isset($adminperm[$adminitem])) {
html_error_quit("没有这样的管理功能。");
exit;
}
if (!($currentuser["userlevel"] & $adminperm[$adminitem])) {
html_error_quit("您没有进入此管理页面的权限。");
exit;
}
}
示例2: pc_admin_check_permission
function pc_admin_check_permission()
{
global $loginok, $currentuser, $pcconfig;
if ($loginok != 1) {
html_nologin();
} elseif (!strcmp($currentuser["userid"], "guest")) {
html_init("gb2312");
html_error_quit("对不起,请先登录");
exit;
} elseif (!pc_is_manager($currentuser)) {
html_init("gb2312");
html_error_quit("对不起,您无权访问该页");
exit;
} else {
return;
}
}
示例3: login_init
require "www2-funcs.php";
login_init();
bbs_session_modify_user_mode(BBS_MODE_READING);
assert_login();
if (isset($_GET["board"])) {
$board = $_GET["board"];
} else {
html_error_quit("讨论区错误");
}
$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_tmpls($board, $votearr);
if ($retnum < 0) {
$retnum = 0;
}
if (isset($_GET["id"])) {
$restr = "&reid=" . $_GET["id"];
} else {
$restr = "";
}
bbs_board_nav_header($brdarr, "模板列表");
?>
<table class="main adj">
<caption>版面 <?php
示例4: urlencode
$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);
$usernum = $currentuser["index"];
if (!$isnormalboard && bbs_checkreadperm($usernum, $bid) == 0) {
html_error_quit("错误的讨论区");
}
$haveprev = 0;
$num = bbs_get_threads_from_gid($bid, $gid, $start, $articles, $haveprev);
if ($num == 0) {
html_error_quit("错误的参数");
}
$pagesize = 20;
$totalpage = ($num - 1) / $pagesize + 1;
$totalpage = intval($totalpage);
if ($pno < 1 || $pno > $totalpage) {
$pno = 1;
}
$startnum = ($pno - 1) * $pagesize;
$endnum = $startnum + $pagesize;
if ($endnum > $num) {
$endnum = $num;
}
bbs_checkorigin($board);
$origins = array();
$origin_num = bbs_get_records_from_id($board, $gid, $dir_modes["ORIGIN"], $origins);
示例5: html_nologin
** blog黑名单
** windinsn Mar 5 , 2004
*/
require "pcfuncs.php";
if ($loginok != 1) {
html_nologin();
} elseif (!strcmp($currentuser["userid"], "guest")) {
html_init("gb2312");
html_error_quit("guest 没有Blog!");
exit;
} else {
$link = pc_db_connect();
$pc = pc_load_infor($link, $currentuser["userid"]);
if (!$pc || !pc_is_admin($currentuser, $pc)) {
pc_db_close($link);
html_error_quit("对不起,您要查看的Blog不存在");
exit;
}
pc_html_init("gb2312", $pc["NAME"]);
$buserid = $_GET["userid"];
if ($_GET["act"] == "add" && $buserid) {
$lookupuser = array();
if (bbs_getuser($buserid, $lookupuser) == 0) {
echo "<script language=\"javascript\">用户" . $buserid . "不存在!</script>";
} else {
$buserid = $lookupuser["userid"];
if (!pc_in_blacklist($link, $buserid, $pc["UID"])) {
pc_add_blacklist($link, $buserid, $pc["UID"]);
}
}
}
示例6: addslashes
<?php
require "pcfuncs.php";
$userid = addslashes($_GET["id"]);
$uid = (int) $_GET["id"];
$link = pc_db_connect();
$pc = pc_load_infor($link, $userid, $uid);
if (!$pc) {
pc_db_close($link);
html_init("gb2312", $pcconfig["BBSNAME"] . "Blog");
html_error_quit("对不起,您要查看的Blog不存在");
exit;
}
$query = "SELECT nodexsl , stylesheet FROM userstyle WHERE uid = " . $pc["UID"] . " LIMIT 0 , 1;";
$result = mysql_query($query, $link);
$rows = mysql_fetch_array($result);
mysql_free_result($result);
pc_db_close($link);
if (!$rows) {
html_init("gb2312", $pcconfig["BBSNAME"] . "Blog");
html_error_quit("对不起,您要查看的用户尚未设定自定义XSL文件");
exit;
}
if ($rows[stylesheet] == 1) {
header("Content-Type: text/css");
header("Content-Disposition: inline;filename=SMTHBlog_" . $pc["USER"] . ".css");
} else {
header("Content-Type: text/xml");
header("Content-Disposition: inline;filename=SMTHBlog_" . $pc["USER"] . ".xsl");
}
echo stripslashes($rows[nodexsl]);
示例7: display_fav_folder
function display_fav_folder($link, $pc, $pid = 0, $pur, $order = "")
{
$rootpid = pc_fav_rootpid($link, $pc["UID"]);
if (!$rootpid) {
$pif = pc_init_fav($link, $pc["UID"]);
if ($pif) {
?>
<script language="javascript">window.location.href="pcdoc.php?userid=<?php
echo $pc["USER"];
?>
&tag=3";</script>
<?php
} else {
html_error_quit("对不起,Blog收藏夹初始化错误!");
exit;
}
}
if ($pid == 0) {
$pid = $rootpid;
} else {
$query = "UPDATE nodes SET `visitcount` = visitcount + 1 WHERE `access` = '3' AND `nid` = '" . $pid . "' AND `uid` = '" . $pc["UID"] . "';";
mysql_query($query, $link);
}
$query = "SELECT `nid` , `type` , `created` , `changed` , `emote` , `comment` , `commentcount` , `subject` , `visitcount`,`pid`,`htmltag` " . " FROM nodes WHERE `access` = '3' AND `uid` = '" . $pc["UID"] . "' AND `pid` = '" . $pid . "' ";
switch ($order) {
case "c":
$query .= " ORDER BY `created` DESC , ";
break;
case "u":
$query .= " ORDER BY `changed` DESC ,";
break;
case "v":
$query .= " ORDER BY `visitcount` DESC ,";
break;
case "r":
$query .= " ORDER BY `commentcount` DESC ,";
break;
case "co":
$query .= " ORDER BY `comment` ASC ,";
break;
default:
$query .= " ORDER BY ";
}
$query .= " `type` DESC ;";
$result = mysql_query($query, $link);
$i = 0;
?>
<form action="pcmanage.php?userid=<?php
echo $pc["USER"];
?>
" method="post">
<table cellspacing="0" cellpadding="5" border="0" width="99%" class="t1">
<?php
if ($pur > 2) {
?>
<tr>
<td class="t2" width="30">序号</td>
<td class="t2" width="30">选中</td>
<td class="t2" width="30">类型</td>
<td class="t2" width="30"><a href="pcdoc.php?<?php
echo "userid=" . $pc["USER"] . "&tag=3&pid=" . $pid . "&order=co";
?>
" class="f3">状态</a></td>
<td class="t2">主题</td>
<td class="t2" width="120">
<a href="pcdoc.php?<?php
echo "userid=" . $pc["USER"] . "&tag=3&pid=" . $pid . "&order=c";
?>
" class="f3">创建</a>
|
<a href="pcdoc.php?<?php
echo "userid=" . $pc["USER"] . "&tag=3&pid=" . $pid . "&order=u";
?>
" class="f3">更新</a>
</td>
<td class="t2" width="30"><a href="pcdoc.php?<?php
echo "userid=" . $pc["USER"] . "&tag=3&pid=" . $pid . "&order=v";
?>
" class="f3">浏览</a></td>
<td class="t2" width="30"><a href="pcdoc.php?<?php
echo "userid=" . $pc["USER"] . "&tag=3&pid=" . $pid . "&order=r";
?>
" class="f3">评论</a></td>
<td class="t2" width="15">改</td>
<td class="t2" width="15">删</td>
<td class="t2" colspan="<?php
echo $_COOKIE["BLOGFAVACTION"] ? 3 : 2;
?>
">操作</a>
</tr>
<?php
} else {
?>
<tr>
<td class="t2" width="30">序号</td>
<td class="t2" width="30">类型</td>
<td class="t2" width="30"><a href="pcdoc.php?<?php
echo "userid=" . $pc["USER"] . "&tag=3&pid=" . $pid . "&order=co";
?>
" class="f3">状态</a></td>
//.........这里部分代码省略.........
示例8: bbs_attachment_list
break;
case UPLOAD_ERR_PARTIAL:
$msg = "文件传输出错!";
break;
case UPLOAD_ERR_NO_FILE:
$msg = "没有文件上传!";
break;
default:
$msg = "未知错误";
}
}
}
if (!is_array($ret)) {
$attachments = bbs_attachment_list($board, $id);
if (!is_array($attachments)) {
html_error_quit(bbs_error_get_desc($attachments));
}
} else {
$attachments = $ret;
}
$filecount = count($attachments);
$totalsize = 0;
$allnames = array();
$allnames_p = array();
$allpos = array();
$alllen = array();
for ($i = 0; $i < $filecount; $i++) {
$allnames[] = $attachments[$i]["name"];
$allnames_p[] = "'" . addslashes($attachments[$i]["name"]) . "'";
$allpos[] = $attachments[$i]["pos"];
$alllen[] = $attachments[$i]["size"];
示例9: bbs_getfriends
if ($start >= $total) {
$start = $total - 20;
if ($start < 0) {
$start = 0;
}
} else {
if ($start < 0) {
$start = $total - 20;
if ($start < 0) {
$start = 0;
}
}
}
$friends = bbs_getfriends($currentuser["userid"], $start);
if ($friends === FALSE) {
html_error_quit("系统错误1");
}
?>
<table class="main adj">
<col class="center"/><col/><col/><col class="center"/>
<caption>好友名单 (共 <?php
echo $total;
?>
位好友)</caption>
<tbody>
<tr><th>序号</th><th>好友代号</th><th>好友说明</th><th>删除好友</th></tr>
<?php
$i = 0;
foreach ($friends as $friend) {
$i++;
?>
示例10: pc_admin_check_permission
<?php
require "pcadmin_inc.php";
pc_admin_check_permission();
$link = pc_db_connect();
$nid = intval($_GET["nid"]);
$query = 'SELECT * FROM filter WHERE nid = ' . $nid . ' LIMIT 1;';
$result = mysql_query($query);
$node = mysql_fetch_array($result);
if ($node) {
html_error_quit("文章已经被删除过");
}
$query = 'SELECT * FROM nodes WHERE nid = ' . $nid . ' LIMIT 1;';
$result = mysql_query($query);
$node = mysql_fetch_array($result);
if (!$node) {
html_error_quit("文章不存在");
}
$uid = $node[uid];
$query = "INSERT INTO `filter` ( `pid` , `nid` , `tid` , `type` , `state` , `recuser` , `emote` , `hostname` , `changed` , `created` , `uid` , `username` , `comment` , `commentcount` , `subject` , `body` , `access` , `visitcount` , `htmltag`,`trackback` ,`trackbackcount`,`nodetype`,`theme`,`publisher`) " . "VALUES ( '" . $node[pid] . "' , '" . $node[nid] . "' , '" . $node[tid] . "' , '" . $node[type] . "' , 4 , '" . $currentuser["userid"] . "' , '" . $node[emote] . "' , '" . $node[hostname] . "' , '" . $node[changed] . "' , '" . $node[created] . "' , '" . $node[uid] . "' , '" . addslashes($_GET["userid"]) . "' , '" . $node[comment] . "' , '" . $node[commentcount] . "' , '" . $node[subject] . "' , '" . $node[body] . "' , '" . $node[access] . "' , '" . $node[visitcount] . "' , '" . $node[htmltag] . "','" . $node[trackback] . "' ,'" . $node[trackbackcount] . "','" . $node[nodetype] . "','" . $node[theme] . "','" . $node[publisher] . "');";
if (!mysql_query($query)) {
html_error_quit("插入过滤表出错");
}
$query = "UPDATE nodes SET `body` = '@ @ 本文已被管理员屏蔽 @ @' where `nid` = " . $nid . ";";
if (!mysql_query($query)) {
html_error_quit("修改原文出错");
}
pc_update_record($link, $uid);
pc_db_close($link);
pc_return("pcdoc.php?userid=_filter&tag=4");
示例11: login_init
require "www2-funcs.php";
login_init();
assert_login();
page_header("发送手机短信");
if (isset($_POST["dest"])) {
$dest = $_POST["dest"];
if (!isset($_POST["msgstr"])) {
html_error_quit("请输入信息");
}
$msgstr = $_POST["msgstr"];
$ret = bbs_send_sms($dest, $msgstr);
if ($ret == 0) {
html_success_quit("发送成功");
} else {
html_error_quit("发送失败" . $ret);
}
} else {
?>
<form action="bbssendsms.php" method="post" class="small">
<fieldset><legend>发送手机短信</legend>
<div class="inputs">
<label>对方手机号:</label><input type="text" name="dest" maxlength="11" id="sfocus"/><br/>
<label>信息:</label><input type="text" name="msgstr"/>
</div>
</fieldset>
<div class="oper"><input type="submit" value="发送"/></div>
</form>
<?php
page_footer();
}
示例12: intval
if (!$m_register) {
$mobile_phone = "";
}
$ret = @bbs_createregform($userid, $realname, $dept, $address, $gender, $year, $month, $day, $reg_email, $phone, $mobile_phone, $_POST['OICQ'], $_POST['ICQ'], $_POST['MSN'], $_POST['homepage'], intval($_POST['face']), $_POST['myface'], intval($_POST['width']), intval($_POST['height']), intval($_POST['groupname']), $_POST['country'], $_POST['province'], $_POST['city'], intval($_POST['shengxiao']), intval($_POST['blood']), intval($_POST['belief']), intval($_POST['occupation']), intval($_POST['marital']), intval($_POST['education']), $_POST['college'], intval($_POST['character']), FALSE);
//自动生成注册单
switch ($ret) {
case 0:
break;
case 2:
html_error_quit("该用户不存在!");
break;
case 3:
html_error_quit("生成注册单发生 参数错误! 请手工填写注册单");
break;
default:
html_error_quit("生成注册单发生 未知的错误! 请手工填写注册单");
break;
}
html_init("gb2312");
?>
<body>
<h1>申请ID成功</h1>
申请<?php
echo BBS_FULL_NAME;
?>
ID成功,你现在还没有通过身份认证,只有最基本的权限,不能发文,发信,聊天等,系统已经自动生成注册单.<br>
注册单通过站长审核后,你将获得合法用户权限!<br/><a href="index.html">现在登录进站</a>
</body>
</html>
<?php
function show_reg_form()
示例13: setcookie
}
break;
case 'cp':
case 'mv':
setcookie('PCFILEACT', $_GET['act']);
setcookie('PCFILEFID', $f->fid);
break;
case 'pt':
if ($_COOKIE['PCFILEACT'] == 'cp') {
if (!$f->uf_cp($_GET['tid'])) {
html_error_quit($f->err);
}
}
if ($_COOKIE['PCFILEACT'] == 'mv') {
if (!$f->uf_mv($_GET['tid'])) {
html_error_quit($f->err);
}
}
setcookie('PCFILEACT');
setcookie('PCFILEFID');
break;
case 'cl':
setcookie('PCFILEACT');
setcookie('PCFILEFID');
break;
default:
}
if ($_GET['act'] == 'add' || $_GET['act'] == 'mkdir') {
pc_get_userfiles($link, $pc, $used, $total);
}
pc_get_userfiles($link, $pc, $used, $total);
示例14: html_error_quit
html_error_quit("您的注册单还没有处理,请耐心等候");
break;
case 2:
html_error_quit("该用户不存在!");
break;
case 3:
html_error_quit("参数错误");
break;
case 4:
html_error_quit("你已经通过注册了!");
break;
case 5:
html_error_quit("您注册尚不满48小时,请在首次注册48小时后再填写注册单.");
break;
default:
html_error_quit("未知的错误!");
break;
}
?>
<body>
注册单已经提交,24小时内站务将会审核,如果通过,你就会获得合法用户权限!<br>
<a href="javascript:history.go(-1)">快速返回</a>
</body>
</html>
<?php
function show_fill_form()
{
$SITENAME = BBS_FULL_NAME;
echo <<<EOF
<html>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
示例15: page_footer
}
?>
type="text" name="destid" maxlength="12" value="<?php
echo $destid;
?>
" size="12"/><br/>
<label>讯息内容:</label><input <?php
if ($destid) {
echo 'id="sfocus"';
}
?>
type="text" name="msg" maxlength="50" size="50" value="<?php
echo $msg;
?>
"/>
</div></fieldset>
<div class="oper"><input type="submit" value="确认"/></div>
</form>
<?php
page_footer();
} else {
$ret = bbs_sendwebmsg($destid, $msg, $destutmp, $errmsg);
?>
<script>top.fmsg.location="bbsgetmsg.php?refresh";</script>
<?php
if ($ret) {
html_success_quit($errmsg);
} else {
html_error_quit($errmsg);
}
}