本文整理汇总了PHP中showerr函数的典型用法代码示例。如果您正苦于以下问题:PHP showerr函数的具体用法?PHP showerr怎么用?PHP showerr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了showerr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: olpay_end
function olpay_end($numcode)
{
global $db, $pre, $webdb, $banktype, $pay_code, $lfjuid;
$pay_code = str_replace('QIBO', '=', $pay_code);
//这个符号“=”容易出问题
if (!$pay_code) {
showerr("数据有误!!");
}
list($type, $atc_moeny, $atc_numcode, $mid, $shopmoney) = explode("\t", mymd5($pay_code, 'DE'));
if ($atc_numcode != intval($numcode)) {
showerr("数据被修改过!!");
}
//主要是针对支付宝不能单纯一位数字的问题,inc/olpay/alipay.php,文件中做了修改
$numcode = str_replace("code", "", $numcode);
//万能表单订单
if ($type == 'form') {
$rt = $db->get_one("SELECT * FROM {$pre}olpay WHERE numcode='{$numcode}' AND `formid`='{$mid}'");
//商城订单
} elseif ($type == 'module') {
$rt = $db->get_one("SELECT * FROM {$pre}olpay WHERE numcode='{$numcode}' AND `moduleid`='{$mid}'");
$db->query("UPDATE {$pre}shoporderuser SET ifpay='1' WHERE id='{$atc_numcode}'");
//奖励积分
if ($shopmoney) {
add_user($lfjuid, $shopmoney, '购买商品得分');
}
}
if (!$rt) {
showerr('系统中没有您的订单,无法完成支付!');
}
if ($rt['ifpay'] == 1) {
showerr('该订单已经支付成功!');
}
$db->query("UPDATE {$pre}olpay SET ifpay='1' WHERE id='{$rt['id']}'");
refreshto("{$webdb['www_url']}/", "恭喜你支付成功", 60);
}
示例2: ck_regpost
function ck_regpost($postdb)
{
global $webdb;
$array = unserialize(StripSlashes($webdb[Reg_Field]));
foreach ($array[field_db] as $key => $rs) {
if ($rs[mustfill] == 1 && $postdb[$rs[field_name]] === '') {
showerr("{$rs[title]}不能为空");
}
if ($rs[field_type] == 'int' && $postdb[$rs[field_name]] && !ereg("^[-0-9]+\$", $postdb[$rs[field_name]])) {
showerr("{$rs[title]}只能为数字");
}
if ($rs[field_type] == 'varchar') {
$rs[field_leng] = $rs[field_leng] ? $rs[field_leng] : 255;
if (strlen($postdb[$rs[field_name]]) > $rs[field_leng]) {
showerr("{$rs[title]}不能超过{$rs[field_leng]}个字符,一个汉字等于两个字符");
}
}
if ($rs[field_type] == 'int') {
$rs[field_leng] = $rs[field_leng] ? $rs[field_leng] : 10;
if (strlen($postdb[$rs[field_name]]) > $rs[field_leng]) {
showerr("{$rs[title]}不能超过{$rs[field_leng]}个字符");
}
}
}
}
示例3: olpay_end
function olpay_end($numcode)
{
global $db, $pre, $webdb, $banktype;
$rt = $db->get_one("SELECT * FROM {$pre}olpay WHERE numcode='{$numcode}' AND `paytype`=1");
if (!$rt) {
showerr('系统中没有您的充值订单,无法完成充值!');
}
if ($rt['ifpay'] == 1) {
showerr('该订单已经充值成功!');
}
$db->query("UPDATE {$pre}olpay SET ifpay='1' WHERE id='{$rt['id']}'");
$num = $rt[money] * $webdb[alipay_scale];
add_user($rt[uid], $num, '在线充值');
refreshto("{$webdb['www_url']}/", "恭喜你充值成功", 10);
}
示例4: check_fup
/**
*检查是否误操作.设置子栏目为自己的父栏目
**/
function check_fup($table, $fid, $fup)
{
global $db;
if (!$fup) {
return;
} elseif ($fid == $fup) {
showerr("不能设置自身为父栏目");
}
$query = $db->query("SELECT * FROM {$table} WHERE fid='{$fup}'");
while ($rs = $db->fetch_array($query)) {
if ($rs[fup] == $fid) {
showerr("你不能设置本身的子栏目作为父栏目,这是不允许的.但你可以设置其他子栏目作为父栏目");
} elseif ($rs[fup]) {
check_fup($table, $fid, $rs[fup]);
}
}
}
示例5: dirname
<?php
require dirname(__FILE__) . "/global.php";
if (!$lfjid) {
showerr('请先登录!');
}
if ($job == 'post') {
$rsdb = $db->get_one("SELECT * FROM {$_pre}content WHERE id='{$id}'");
if (!$rsdb) {
showerr('职位不存在!');
}
if ($db->get_one("SELECT * FROM {$_pre}apply WHERE cid='{$id}' AND uid='{$lfjuid}'")) {
showerr('你已经申请过该职位了!');
}
@extract($db->get_one("SELECT id AS join_id FROM {$_pre}person WHERE uid='{$lfjuid}'"));
$db->query("INSERT INTO {$_pre}apply SET cid='{$id}',uid='{$lfjuid}',join_id='{$join_id}',posttime='{$timestamp}'");
refreshto("./", '申请成功', 1);
}
示例6: showerr
if (!is_writable(ROOT_PATH . "{$postdb['dirname']}/data/")) {
showerr(ROOT_PATH . "{$postdb['dirname']}/data/" . "目录不可写");
}
$db->query("UPDATE {$pre}module SET name='{$postdb['name']}',dirname='{$postdb['dirname']}',admindir='{$postdb['admindir']}',domain='{$postdb['domain']}',list='{$postdb['list']}',adminmember='{$postdb['adminmember']}',ifclose='{$postdb['ifclose']}',ifsys='{$postdb['ifsys']}' WHERE id='{$id}'");
make_module_cache();
@extract($db->get_one("SELECT pre AS Mpre,id AS Mid,type AS Type FROM `{$pre}module` WHERE id='{$id}' "));
if ($Type) {
$table = "{$pre}{$Mpre}config";
} else {
$table = "{$pre}{$Mpre}_config";
}
if (!is_table($table)) {
jump("修改成功!", "index.php?lfj=module&job=list", 1);
}
if (!is_writable(ROOT_PATH . "{$postdb['dirname']}/data/config.php")) {
showerr(ROOT_PATH . "{$postdb['dirname']}/data/config.php" . "文件不可写");
}
$db->query("DELETE FROM `{$table}` WHERE c_key='module_id'");
$db->query("DELETE FROM `{$table}` WHERE c_key='module_pre'");
$db->query("DELETE FROM `{$table}` WHERE c_key='module_close'");
$db->query("INSERT INTO `{$table}` ( `c_key` , `c_value` , `c_descrip` ) VALUES ('module_id', '{$Mid}', '')");
$db->query("INSERT INTO `{$table}` ( `c_key` , `c_value` , `c_descrip` ) VALUES ('module_pre', '{$Mpre}', '')");
$db->query("INSERT INTO `{$table}` ( `c_key` , `c_value` , `c_descrip` ) VALUES ('module_close', '{$postdb['ifclose']}', '')");
$writefile = "<?php\r\n";
$query = $db->query("SELECT * FROM `{$table}`");
while ($rs = $db->fetch_array($query)) {
$rs[c_value] = addslashes($rs[c_value]);
$writefile .= "\$webdb['{$rs['c_key']}']='{$rs['c_value']}';\r\n";
}
write_file(ROOT_PATH . "{$postdb['dirname']}/data/config.php", $writefile);
jump("修改成功", "index.php?lfj=module&job=list", 1);
示例7: FC_SQL
$fcp->next_record();
$total = (int) $fcp->f("cnt");
$fcp->free_result();
$count = $total;
// this because the "got" count below is commented out
if (!empty($cat)) {
// check to see whether subcats exist under this cat
$check_sub = new FC_SQL();
$check_sub->query("select count(*) as cnt from cat where catunder={$cat}");
$check_sub->next_record();
$check_subc = (int) $check_sub->f("cnt");
$check_sub->free_result();
}
// show error if no products and no subcats
if (empty($count) and empty($check_subc)) {
showerr();
} else {
// echo "select $fds from $tbs where $pj order by $srt<br />";
$fcp->query("select distinct {$fds} from {$tbs} where {$pj} order by {$srt}");
// THIS IS ONLY NEEDED DUE TO SOLID'S POOR LIMIT ABILITY...
// if olimit>0, read off the first olimit rows
if (!$psku && $olimit) {
$i = 0;
while ($i < $olimit) {
$fcp->next_record();
$i++;
}
}
if (!empty($key1)) {
// log keyword search results
$key1 = strtolower($key1);
示例8: die
<?php
if (!function_exists('html')) {
die('F');
}
if (!$lfjuid) {
showerr('请先登录');
}
$_erp = $Fid_db[tableid][$fid];
$rs = $db->get_one("SELECT * FROM {$_pre}content{$_erp} WHERE id='{$id}'");
if ($rs[uid] != $lfjuid && !$web_admin) {
showerr('你没权限');
}
$list = $timestamp + 3600 * 24 * $webdb[Info_TopDay];
if (!$web_admin) {
$lfjdb[money] = intval(get_money($lfjuid));
if ($lfjdb[money] < $webdb[Info_TopMoney]) {
showerr("你的积分不足:{$webdb['Info_TopMoney']},不能选择置顶");
}
add_user($lfjuid, -intval($webdb[Info_TopMoney]), '置顶扣分');
}
$db->query("UPDATE {$_pre}content{$_erp} SET list='{$list}' WHERE id='{$id}'");
refreshto("{$FROMURL}", "置顶成功", 1);
示例9: dirname
<?php
require dirname(__FILE__) . "/global.php";
if (!$lfjid) {
showerr('请先登录!');
} elseif ($uid == $lfjuid) {
showerr('你不能收录自己!');
}
if ($db->get_one("SELECT * FROM {$_pre}collection WHERE memberuid='{$uid}' AND companyuid='{$lfjuid}'")) {
showerr('你已经收录过了!');
}
$db->query("INSERT INTO {$_pre}collection SET memberuid='{$uid}',companyuid='{$lfjuid}',posttime='{$timestamp}'");
refreshto($FROMURL, '收录成功', 3);
示例10: showerr
if (!$webdb[EditYzEmail]) {
showerr("你不可以再修改邮箱,因为已经审核过了.");
} else {
$array[email_yz] = 0;
}
}
if ($lfjdb[mob_yz] && $lfjdb[mobphone] != $mobphone) {
if (!$webdb[EditYzMob]) {
showerr("你不可以再修改手机号码,因为已经审核过了.");
} else {
$array[mob_yz] = 0;
}
}
if ($lfjdb[idcard_yz] && ($lfjdb[idcard] != $idcard || $lfjdb[truename] != $truename)) {
if (!$webdb[EditYzIdcard]) {
showerr("你不可以再修改身份证资料,因为已经审核过了.");
} else {
$array[idcard_yz] = 0;
}
}
$userDB->edit_user($array);
//自定义用户字段
Reg_memberdata_field($lfjuid, $postdb);
//截取用户头像
if ($icon_url) {
$reurl = base64_encode("{$webdb['www_url']}/member/userinfo.php?uid={$lfjuid}");
header("location:{$webdb['www_url']}/do/cutimg.php?job=cutimg&width=150&height=150&srcimg={$icon_url}&reurl={$reurl}");
exit;
}
refreshto("{$FROMURL}", "修改成功", 1);
} else {
示例11: getpage
<?php
require "global.php";
$mid = 2;
$field_db = $module_DB[$mid]['field'];
$Lrows = 10;
$showpage = getpage("{$_pre}join A", "WHERE A.cid={$cid}", "?cid={$cid}", $Lrows);
unset($listdb);
if ($page < 1) {
$page = 1;
}
$min = ($page - 1) * $Lrows;
$query = $db->query("SELECT A.*,B.*,C.* FROM {$_pre}join A LEFT JOIN {$_pre}content_{$mid} C ON A.id=C.id LEFT JOIN {$pre}memberdata B ON A.uid=B.uid WHERE A.cid='{$cid}' ORDER BY A.posttime DESC LIMIT {$min},{$Lrows}");
while ($rs = $db->fetch_array($query)) {
$Module_db->showfield($field_db, $rs, 'list');
$rs[username] || ($rs[username] = $rs[ip]);
$rs[picurl] = tempdir($rs[icon]);
$rs[posttime] = date("Y-m-d H:i:s", $rs[posttime]);
$listdb[] = $rs;
}
$rs = $db->get_one("SELECT * FROM `{$_pre}content` WHERE id='{$cid}'");
if (!$lfjuid || $rs[uid] != $lfjuid) {
showerr("ÄãÎÞȨ²é¿´");
}
require ROOT_PATH . "inc/head.php";
require getTpl("list_{$mid}");
require ROOT_PATH . "inc/foot.php";
示例12: array
}
//投票项
if ($job == 'postnew') {
$votedb[_type][1] = $votedb[_limitip][0] = $votedb[_forbidguestvote][0] = $votedb[_votetype][0] = ' checked ';
$listdb = array('1' => '', '2' => '', '3' => '');
} elseif ($job == 'edit' && $rsdb[ifvote]) {
$votedb = $db->get_one("SELECT * FROM `{$pre}vote_topic` WHERE aid='{$aid}'");
$query = $db->query("SELECT * FROM `{$pre}vote_element` WHERE cid='{$votedb['cid']}' ORDER BY list DESC");
$i = 0;
while ($rs = $db->fetch_array($query)) {
$i++;
$votelistdb[$i] = $rs;
}
$votedb[_type][$votedb[type]] = " checked ";
$votedb[_limitip][$votedb[limitip]] = " checked ";
$votedb[_forbidguestvote][$votedb[forbidguestvote]] = " checked ";
$votedb[_votetype][$votedb[votetype]] = ' checked ';
$votedb[begintime] = $votedb[begintime] ? date("Y-m-d H:i:s", $votedb[begintime]) : '';
$votedb[endtime] = $votedb[endtime] ? date("Y-m-d H:i:s", $votedb[endtime]) : '';
}
if ($aid) {
$query = $db->query("SELECT * FROM {$pre}fu_article WHERE aid='{$aid}'");
while ($rs = $db->fetch_array($query)) {
$fu_fiddb[] = $rs[fid];
}
}
$fu_sort = $Guidedb->Checkbox("{$pre}fu_sort", 'fu_fiddb[]', $fu_fiddb);
if ($mid && !$article_moduleDB[$mid]) {
showerr("当前模型不存在!");
}
}
示例13: define
<?php
define('Memberpath', dirname(__FILE__) . '/');
require Memberpath . "../global.php";
/**
*前台是否开放
**/
if ($webdb[module_close]) {
$webdb[Info_closeWhy] = str_replace("\r\n", "<br>", $webdb[Info_closeWhy]);
showerr("本系统暂时关闭:{$webdb['Info_closeWhy']}");
}
if (!$lfjid) {
showerr("你还没登录");
}
示例14: COUNT
} else {
@extract($db->get_one("SELECT COUNT(*) AS pmNUM FROM {$TB_pre}pms WHERE `msgtoid`='{$lfjuid}' AND folder='inbox' AND new=1"));
}
} else {
@extract($db->get_one("SELECT COUNT(*) AS pmNUM FROM `{$pre}pm` WHERE `touid`='{$lfjuid}' AND type='rebox' AND ifnew='1'"));
}
if (!$pmNUM) {
$MSG = "<A target=\"_blank\" HREF=\"{$webdb['www_url']}/member/index.php?main=pm.php?job=list\">站内消息</A>";
} else {
$MSG = "<A target=\"_blank\" HREF=\"{$webdb['www_url']}/member/index.php?main=pm.php?job=list\" style=\"color:blue;\">你有新消息({$pmNUM})</a>";
}
$lfjdb[_lastvist] = date("Y-m-d H:i", $lfjdb[lastvist]);
$lfjdb[_regdate] = date("Y-m-d H:i", $lfjdb[regdate]);
}
if ($styletype && !eregi("^[-_0-9a-z]+\$", $styletype)) {
showerr("风格样式有误", 1);
} elseif (!$styletype) {
$styletype = 0;
}
require_once html("login_tpl/{$styletype}");
$show = ob_get_contents();
ob_end_clean();
$show = str_replace(array("\n", "\r", "<!---->", "'"), array("", "", "", "\\'"), $show);
if ($webdb[www_url] == '/.') {
$show = str_replace('/./', '/', $show);
}
if ($iframeID) {
//框架方式不会拖慢主页面打开速度,推荐
//处理跨域问题
if ($webdb[cookieDomain]) {
echo "<SCRIPT LANGUAGE=\"JavaScript\">document.domain = \"{$webdb['cookieDomain']}\";</SCRIPT>";
示例15: elseif
if ($rsdb[style]) {
$STYLE = $rsdb[style];
} elseif ($fidDB[style]) {
$STYLE = $fidDB[style];
}
//SEO
$titleDB[title] = filtrate(strip_tags("{$rsdb['title']} - {$city_DB[name][$city_id]}{$fidDB['name']} - {$webdb['Info_webname']}"));
$titleDB[keywords] = filtrate(strip_tags($rsdb[keywords]));
$titleDB[description] = filtrate(get_word(strip_tags($rsdb[content]), 200)) . filtrate(strip_tags("{$fidDB['metadescription']} {$webdb['Info_metadescription']}"));
/**
*栏目指定了哪些用户组才能看信息内容
**/
if ($fidDB[allowviewcontent]) {
if (!$web_admin && !in_array($groupdb[gid], explode(",", $fidDB[allowviewcontent]))) {
if (!$lfjid || !in_array($lfjid, explode(",", $fidDB[admin]))) {
showerr("你所在用户组,无权浏览");
}
}
}
/**
*对信息内容字段的处理
**/
$Module_db->hidefield = true;
$Module_db->classidShowAll = true;
$Module_db->showfield($field_db, $rsdb, 'show');
$rsdb[posttime] = date("Y-m-d H:i:s", $rsdb[posttime]);
$rsdb[picurl] && ($rsdb[picurl] = tempdir($rsdb[picurl]));
/**
*栏目模板优先于城市模板
**/
if ($fidDB[template]) {