• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP printerror函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: DelAdClass

function DelAdClass($classid, $userid, $username)
{
    global $empire, $public_r, $dbtbpre;
    $classid = (int) $classid;
    if (!$classid) {
        printerror("NotChangeAdClassid", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "ad");
    $c = $empire->fetch1("select classname from {$dbtbpre}enewsadclass where classid='{$classid}'");
    $sql = $empire->query("delete from {$dbtbpre}enewsadclass where classid='{$classid}'");
    /*
    //删除广告内容
    $a=$empire->query("select adid from {$dbtbpre}enewsad where classid='$classid'");
    while($r=$empire->fetch($a))
    {
    	$file="../../../d/js/acmsd/".$public_r[adfile].$r[adid].".js";
    	DelFiletext($file);
        }
    */
    if ($sql) {
        //操作日志
        insert_dolog("classid=" . $classid . "<br>classname=" . $c[classname]);
        printerror("DelAdClassSuccess", "AdClass.php");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:28,代码来源:AdClass.php


示例2: AddGbook

function AddGbook($add)
{
    global $empire, $dbtbpre, $level_r, $public_r;
    //验证IP
    eCheckAccessDoIp('gbook');
    CheckCanPostUrl();
    //验证来源
    $bid = (int) getcvar('gbookbid');
    if (empty($bid)) {
        $bid = intval($add[bid]);
    }
    $name = RepPostStr(trim($add[name]));
    $email = RepPostStr($add[email]);
    $call = RepPostStr($add[call]);
    $lytext = RepPostStr($add[lytext]);
    if (empty($bid) || empty($name) || empty($email) || !trim($lytext)) {
        printerror("EmptyGbookname", "history.go(-1)", 1);
    }
    if (!chemail($email)) {
        printerror("EmailFail", "history.go(-1)", 1);
    }
    //验证码
    $keyvname = 'checkgbookkey';
    if ($public_r['gbkey_ok']) {
        ecmsCheckShowKey($keyvname, $add['key'], 1);
    }
    $lasttime = getcvar('lastgbooktime');
    if ($lasttime) {
        if (time() - $lasttime < $public_r['regbooktime']) {
            printerror("GbOutTime", "", 1);
        }
    }
    //版面是否存在
    $br = $empire->fetch1("select bid,checked,groupid from {$dbtbpre}enewsgbookclass where bid='{$bid}';");
    if (empty($br[bid])) {
        printerror("EmptyGbook", "history.go(-1)", 1);
    }
    //权限
    if ($br['groupid']) {
        $user = islogin();
        if ($level_r[$br[groupid]][level] > $level_r[$user[groupid]][level]) {
            printerror("HaveNotEnLevel", "history.go(-1)", 1);
        }
    }
    $lytime = date("Y-m-d H:i:s");
    $ip = egetip();
    $userid = (int) getcvar('mluserid');
    $username = RepPostVar(getcvar('mlusername'));
    $sql = $empire->query("insert into {$dbtbpre}enewsgbook(name,email,`call`,lytime,lytext,retext,bid,ip,checked,userid,username) values('{$name}','{$email}','{$call}','{$lytime}','{$lytext}','','{$bid}','{$ip}','{$br['checked']}','{$userid}','{$username}');");
    ecmsEmptyShowKey($keyvname);
    //清空验证码
    if ($sql) {
        esetcookie("lastgbooktime", time(), time() + 3600 * 24);
        //设置最后发表时间
        $reurl = DoingReturnUrl("../tool/gbook/?bid={$bid}", $add['ecmsfrom']);
        printerror("AddGbookSuccess", $reurl, 1);
    } else {
        printerror("DbError", "history.go(-1)", 1);
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:60,代码来源:gbookfun.php


示例3: EditMemberConnect

function EditMemberConnect($add, $userid, $username)
{
    global $empire, $dbtbpre;
    $add[id] = (int) $add[id];
    if (empty($add[appname]) || !$add[id]) {
        printerror("EmptyMemberConnect", "history.go(-1)");
    }
    $add[isclose] = (int) $add[isclose];
    $add[myorder] = (int) $add[myorder];
    $add[appname] = eaddslashes(ehtmlspecialchars($add[appname]));
    $add[appid] = eaddslashes($add[appid]);
    $add[appkey] = eaddslashes($add[appkey]);
    $add[qappname] = eaddslashes($add[qappname]);
    $add[appsay] = eaddslashes($add[appsay]);
    $sql = $empire->query("update {$dbtbpre}enewsmember_connect_app set appname='{$add['appname']}',appid='{$add['appid']}',appkey='{$add['appkey']}',isclose='{$add['isclose']}',myorder='{$add['myorder']}',qappname='{$add['qappname']}',appsay='{$add['appsay']}' where id='{$add['id']}'");
    $appr = $empire->fetch1("select apptype from {$dbtbpre}enewsmember_connect_app where id='{$add['id']}'");
    if ($sql) {
        GetConfig();
        //操作日志
        insert_dolog("id=" . $add[id] . "&apptype=" . $appr[apptype] . "<br>appname=" . $add[appname]);
        printerror("EditMemberConnectSuccess", "MemberConnect.php" . hReturnEcmsHashStrHref2(1));
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:25,代码来源:MemberConnect.php


示例4: ClearSearchAll

function ClearSearchAll($start, $line, $userid, $username)
{
    global $empire, $dbtbpre, $class_r, $fun_r;
    $line = (int) $line;
    if (empty($line)) {
        $line = 500;
    }
    $start = (int) $start;
    $b = 0;
    $sql = $empire->query("select id,classid,sid from {$dbtbpre}enewssearchall where sid>{$start} order by sid limit " . $line);
    while ($r = $empire->fetch($sql)) {
        $b = 1;
        $newstart = $r['sid'];
        if (empty($class_r[$r[classid]]['tbname'])) {
            $empire->query("delete from {$dbtbpre}enewssearchall where sid='{$r['sid']}'");
            continue;
        }
        $num = $empire->gettotal("select count(*) as total from {$dbtbpre}ecms_" . $class_r[$r[classid]]['tbname'] . " where id='{$r['id']}' and classid='{$r['classid']}' limit 1");
        if (!$num) {
            $empire->query("delete from {$dbtbpre}enewssearchall where sid='{$r['sid']}'");
        }
    }
    if (empty($b)) {
        //操作日志
        insert_dolog("");
        printerror('ClearSearchAllSuccess', 'ClearSearchAll.php');
    }
    echo "<meta http-equiv=\"refresh\" content=\"0;url=ClearSearchAll.php?enews=ClearSearchAll&line={$line}&start={$newstart}\">" . $fun_r[OneClearSearchAllSuccess] . "(ID:<font color=red><b>" . $newstart . "</b></font>)";
    exit;
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:30,代码来源:ClearSearchAll.php


示例5: DelSearchKey_all

function DelSearchKey_all($add, $userid, $username)
{
    global $empire, $dbtbpre;
    //验证权限
    CheckLevel($userid, $username, $classid, "searchkey");
    $searchid = $add['searchid'];
    $count = count($searchid);
    if (empty($count)) {
        printerror("EmptySearchId", "history.go(-1)");
    }
    $ids = '';
    for ($i = 0; $i < $count; $i++) {
        $dh = ',';
        if ($i == 0) {
            $dh = '';
        }
        $ids .= $dh . intval($searchid[$i]);
    }
    $sql = $empire->query("delete from {$dbtbpre}enewssearch where searchid in (" . $ids . ");");
    if ($sql) {
        //操作日志
        insert_dolog("");
        printerror("DelSearchKeySuccess", "SearchKey.php" . hReturnEcmsHashStrHref2(1));
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:27,代码来源:SearchKey.php


示例6: ShowBuyproduct

function ShowBuyproduct()
{
    global $empire, $class_r, $dbtbpre;
    $buycar = getcvar('mybuycar');
    if (empty($buycar)) {
        printerror('你的购物车没有商品', '', 1, 0, 1);
    }
    $record = "!";
    $field = "|";
    echo "<table width='100%' border=0 align=center cellpadding=3 cellspacing=1>\r\n          <tr class='header'> \r\n            <td width='41%' height=23> <div align=center>商品名称</div></td>\r\n            <td width='15%'> <div align=center>市场价格</div></td>\r\n            <td width='15%'> <div align=center>优惠价格</div></td>\r\n            <td width='8%'> <div align=center>数量</div></td>\r\n            <td width='21%'> <div align=center>小计</div></td>\r\n          </tr>";
    $alltotal = 0;
    $return[0] = 0;
    $return[1] = 0;
    $return[2] = 0;
    $r = explode($record, $buycar);
    $count = count($r);
    for ($i = 0; $i < $count - 1; $i++) {
        $pr = explode($field, $r[$i]);
        $productid = $pr[1];
        $fr = explode(",", $pr[1]);
        //ID
        $classid = (int) $fr[0];
        $id = (int) $fr[1];
        if (empty($class_r[$classid][tbname])) {
            continue;
        }
        //数量
        $num = (int) $pr[2];
        if (empty($num)) {
            $num = 1;
        }
        //取得产品信息
        $productr = $empire->fetch1("select title,tprice,price,titleurl,groupid,classid,newspath,filename,id,titlepic,buyfen from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where classid='{$classid}' and id='{$id}' limit 1");
        if (empty($productr[id])) {
            continue;
        }
        //是否全部点数
        if (!$productr[buyfen]) {
            $return[0] = 1;
        }
        $return[1] += $productr[buyfen] * $num;
        //产品图片
        if (empty($productr[titlepic])) {
            $productr[titlepic] = "../../data/images/notimg.gif";
        }
        //返回链接
        $titleurl = sys_ReturnBqTitleLink($productr);
        $thistotal = $productr[price] * $num;
        $alltotal += $thistotal;
        echo "<tr>\r\n\t<td align='center' height=23><a href='" . $titleurl . "' target=_blank>" . $productr[title] . "</a></td>\r\n\t<td align='right'>¥" . $productr[tprice] . "</td>\r\n\t<td align='right'><b>¥" . $productr[price] . "</b></td>\r\n\t<td align='right'>" . $num . "</td>\r\n\t<td align='right'>¥" . $thistotal . "</td>\r\n\t</tr>";
    }
    //支付点数付费
    if (!$return[0]) {
        $a = "<tr height='25'> \r\n      <td colspan=5><div align=right>合计点数:<strong>" . $return[1] . "</strong></div></td>\r\n    </tr>";
    }
    echo "<tr height='27'> \r\n      <td colspan=5><div align=right>合计:<strong>¥" . $alltotal . "</strong></div></td>\r\n    </tr>" . $a . "\r\n  </table>";
    $return[2] = $alltotal;
    return $return;
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:59,代码来源:order.php


示例7: ReInfoUrl

function ReInfoUrl($start, $classid, $from, $retype, $startday, $endday, $startid, $endid, $tbname, $userid, $username)
{
    global $empire, $public_r, $class_r, $fun_r, $dbtbpre;
    //验证权限
    //CheckLevel($userid,$username,$classid,"changedata");
    $start = (int) $start;
    $tbname = RepPostVar($tbname);
    if (empty($tbname) || !eCheckTbname($tbname)) {
        printerror("ErrorUrl", "history.go(-1)");
    }
    $add1 = '';
    //按栏目刷新
    $classid = (int) $classid;
    if ($classid) {
        if (empty($class_r[$classid][islast])) {
            $where = ReturnClass($class_r[$classid][sonclass]);
        } else {
            $where = "classid='{$classid}'";
        }
        $add1 = " and (" . $where . ")";
    }
    //按ID刷新
    if ($retype) {
        $startid = (int) $startid;
        $endid = (int) $endid;
        if ($endid) {
            $add1 .= " and id>={$startid} and id<={$endid}";
        }
    } else {
        $startday = RepPostVar($startday);
        $endday = RepPostVar($endday);
        if ($startday && $endday) {
            $add1 .= " and truetime>=" . to_time($startday . " 00:00:00") . " and truetime<=" . to_time($endday . " 23:59:59");
        }
    }
    $b = 0;
    $sql = $empire->query("select id,classid,checked from {$dbtbpre}ecms_" . $tbname . "_index where id>{$start}" . $add1 . " order by id limit " . $public_r[delnewsnum]);
    while ($r = $empire->fetch($sql)) {
        $b = 1;
        $new_start = $r[id];
        //返回表
        $infotb = ReturnInfoMainTbname($tbname, $r['checked']);
        $infor = $empire->fetch1("select newspath,filename,groupid,isurl,titleurl from " . $infotb . " where id='{$r['id']}' limit 1");
        $infourl = GotoGetTitleUrl($r['classid'], $r['id'], $infor['newspath'], $infor['filename'], $infor['groupid'], $infor['isurl'], $infor['titleurl']);
        $empire->query("update " . $infotb . " set titleurl='{$infourl}' where id='{$r['id']}' limit 1");
    }
    if (empty($b)) {
        insert_dolog("");
        //操作日志
        printerror("ReInfoUrlSuccess", $from);
    }
    echo $fun_r[OneReInfoUrlSuccess] . "(ID:<font color=red><b>" . $new_start . "</b></font>)<script>self.location.href='ReInfoUrl.php?enews=ReInfoUrl&tbname={$tbname}&classid={$classid}&start={$new_start}&from=" . urlencode($from) . "&retype={$retype}&startday={$startday}&endday={$endday}&startid={$startid}&endid={$endid}" . hReturnEcmsHashStrHref(0) . "';</script>";
    exit;
}
开发者ID:novnan,项目名称:meiju,代码行数:54,代码来源:ReInfoUrl.php


示例8: PushInfoToZt

function PushInfoToZt($add,$userid,$username){
	global $empire,$dbtbpre,$class_r;
	$classid=(int)$add['classid'];
	$tid=(int)$add['tid'];
	$ztid=$add['ztid'];
	$cid=$add['cid'];
	$id=$add['id'];
	$count=count($ztid);
	if(!$count||!$id)
	{
		echo"<script>window.close();</script>";
		exit();
	}
	//表名
	$tbname='';
	if($classid)
	{
		$tbname=$class_r[$classid]['tbname'];
	}
	elseif($tid)
	{
		$tbr=$empire->fetch1("select tbname from {$dbtbpre}enewstable where tid='$tid'");
		$tbname=$tbr['tbname'];
	}
	if(!$tbname)
	{
		printerror('ErrorUrl','');
	}
	//ID
	$id=eReturnInids($id);
	$where='id in ('.$id.')';
	$ztids='';
	$zcids='';
	for($i=0;$i<$count;$i++)
	{
		$true_ztid=(int)$ztid[$i];
		if(!$true_ztid)
		{
			continue;
		}
		$true_cid=(int)$cid[$true_ztid];
		if($true_cid<0)
		{
			$true_cid=0;
		}
		$ztids.=$dh.$true_ztid;
		$dh=',';
		AddMoreInfoToZt($true_ztid,$true_cid,$tbname,$where,1);
	}
	//操作日志
	insert_dolog("classid=$classid&tid=$tid<br>ztid=".$ztids."<br>id=".$id);
	echo"<script>alert('推送成功');window.close();</script>";
	exit();
}
开发者ID:novnan,项目名称:meiju,代码行数:54,代码来源:PushToZt.php


示例9: exequery

function exequery($C, $Q)
{
    if (stristr($Q, " union select")) {
        exit;
    }
    $cursor = mysql_query($Q, $C);
    if (!$cursor) {
        printerror("<b>SQL语句:</b> " . $Q);
    }
    return $cursor;
}
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:11,代码来源:setting.inc.php


示例10: EditZtOrder

function EditZtOrder($ztid, $myorder, $userid, $username)
{
    global $empire, $dbtbpre;
    for ($i = 0; $i < count($ztid); $i++) {
        $newmyorder = (int) $myorder[$i];
        $ztid[$i] = (int) $ztid[$i];
        $sql = $empire->query("update {$dbtbpre}enewszt set myorder='{$newmyorder}' where ztid='{$ztid[$i]}'");
    }
    //操作日志
    insert_dolog("");
    printerror("EditZtOrderSuccess", $_SERVER['HTTP_REFERER']);
}
开发者ID:novnan,项目名称:meiju,代码行数:12,代码来源:ListZt.php


示例11: MemberConnect_DelBind

function MemberConnect_DelBind($id)
{
    global $empire, $dbtbpre, $public_r;
    $user_r = islogin();
    //是否登陆
    $id = (int) $id;
    $sql = $empire->query("delete from {$dbtbpre}enewsmember_connect where id='{$id}' and userid='{$user_r['userid']}';");
    if ($sql) {
        printerror2("已解除绑定", "../memberconnect/ListBind.php");
    } else {
        printerror("DbError", "history.go(-1)", 1);
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:13,代码来源:memberconnectfun.php


示例12: DoSetSpace

function DoSetSpace($add)
{
    global $empire, $dbtbpre;
    $user_r = islogin();
    //是否登陆
    $spacename = RepPostStr($add['spacename']);
    $spacegg = RepPostStr($add['spacegg']);
    $sql = $empire->query("update {$dbtbpre}enewsmemberadd set spacename='{$spacename}',spacegg='{$spacegg}' where userid='{$user_r['userid']}' limit 1");
    if ($sql) {
        printerror('SetSpaceSuccess', 'SetSpace.php', 1);
    } else {
        printerror('DbError', '', 1);
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:14,代码来源:spacecomfun.php


示例13: SetWap

function SetWap($add, $userid, $username)
{
    global $empire, $dbtbpre;
    $wapopen = (int) $add['wapopen'];
    $wapdefstyle = (int) $add['wapdefstyle'];
    $wapshowmid = RepPostVar($add['wapshowmid']);
    $waplistnum = (int) $add['waplistnum'];
    $wapsubtitle = (int) $add['wapsubtitle'];
    $wapchar = (int) $add['wapchar'];
    $sql = $empire->query("update {$dbtbpre}enewspublic set wapopen={$wapopen},wapdefstyle={$wapdefstyle},wapshowmid='{$wapshowmid}',waplistnum={$waplistnum},wapsubtitle={$wapsubtitle},wapshowdate='{$add['wapshowdate']}',wapchar={$wapchar} limit 1");
    //操作日志
    insert_dolog("");
    printerror("SetWapSuccess", "SetWap.php");
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:14,代码来源:SetWap.php


示例14: SetRewrite

function SetRewrite($add, $userid, $username)
{
    global $empire, $dbtbpre;
    CheckLevel($userid, $username, $classid, "public");
    //验证权限
    $sql = $empire->query("update {$dbtbpre}enewspublic set rewriteinfo='" . eaddslashes($add[rewriteinfo]) . "',rewriteclass='" . eaddslashes($add[rewriteclass]) . "',rewriteinfotype='" . eaddslashes($add[rewriteinfotype]) . "',rewritetags='" . eaddslashes($add[rewritetags]) . "',rewritepl='" . eaddslashes($add[rewritepl]) . "' limit 1");
    if ($sql) {
        GetConfig();
        //操作日志
        insert_dolog("");
        printerror("SetRewriteSuccess", "SetRewrite.php" . hReturnEcmsHashStrHref2(1));
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:15,代码来源:SetRewrite.php


示例15: ClearTags

function ClearTags($start, $line, $userid, $username)
{
    global $empire, $dbtbpre, $class_r, $fun_r;
    $line = (int) $line;
    if (empty($line)) {
        $line = 500;
    }
    $start = (int) $start;
    $b = 0;
    $sql = $empire->query("select id,classid,tid,tagid from {$dbtbpre}enewstagsdata where tid>{$start} order by tid limit " . $line);
    while ($r = $empire->fetch($sql)) {
        $b = 1;
        $newstart = $r['tid'];
        if (empty($class_r[$r[classid]]['tbname'])) {
            $empire->query("delete from {$dbtbpre}enewstagsdata where tid='{$r['tid']}'");
            $empire->query("update {$dbtbpre}enewstags set num=num-1 where tagid='{$r['tagid']}'");
            continue;
        }
        $index_r = $empire->fetch1("select id,classid,checked from {$dbtbpre}ecms_" . $class_r[$r[classid]]['tbname'] . "_index where id='{$r['id']}' limit 1");
        if (!$index_r['id']) {
            $empire->query("delete from {$dbtbpre}enewstagsdata where tid='{$r['tid']}'");
            $empire->query("update {$dbtbpre}enewstags set num=num-1 where tagid='{$r['tagid']}'");
        } else {
            //返回表
            $infotb = ReturnInfoMainTbname($class_r[$r[classid]]['tbname'], $index_r['checked']);
            //主表
            $infor = $empire->fetch1("select stb from " . $infotb . " where id='{$r['id']}' limit 1");
            //返回表信息
            $infodatatb = ReturnInfoDataTbname($class_r[$r[classid]]['tbname'], $index_r['checked'], $infor['stb']);
            //副表
            $finfor = $empire->fetch1("select infotags from " . $infodatatb . " where id='{$r['id']}' limit 1");
            $tagr = $empire->fetch1("select tagname from {$dbtbpre}enewstags where tagid='{$r['tagid']}'");
            if (!stristr(',' . $finfor['infotags'] . ',', ',' . $tagr['tagname'] . ',')) {
                $empire->query("delete from {$dbtbpre}enewstagsdata where tid='{$r['tid']}'");
                $empire->query("update {$dbtbpre}enewstags set num=num-1 where tagid='{$r['tagid']}'");
            } elseif ($index_r['classid'] != $r[classid]) {
                $empire->query("update {$dbtbpre}enewstagsdata set classid='{$index_r['classid']}' where tid='{$r['tid']}'");
            }
        }
    }
    if (empty($b)) {
        //操作日志
        insert_dolog("");
        printerror('ClearTagsSuccess', 'ClearTags.php' . hReturnEcmsHashStrHref2(1));
    }
    echo "<meta http-equiv=\"refresh\" content=\"0;url=ClearTags.php?enews=ClearTags&line={$line}&start={$newstart}" . hReturnEcmsHashStrHref(0) . "\">" . $fun_r[OneClearTagsSuccess] . "(ID:<font color=red><b>" . $newstart . "</b></font>)";
    exit;
}
开发者ID:novnan,项目名称:meiju,代码行数:48,代码来源:ClearTags.php


示例16: ShowPayfs

function ShowPayfs($payfsid, $r, $price)
{
    global $empire, $public_r, $dbtbpre, $totalr, $shoppr;
    $payfsid = (int) $payfsid;
    $add = $empire->fetch1("select payid,payname,payurl,paysay,userpay,userfen from {$dbtbpre}enewsshoppayfs where payid='{$payfsid}' and isclose=0");
    if (empty($add[payid])) {
        printerror('请选择支付方式', '', 1, 0, 1);
    }
    //总金额
    $buyallmoney = $totalr['totalmoney'] + $price - $totalr['pretotal'];
    if ($add[userfen] && $r[fp]) {
        printerror("FenNotFp", "history.go(-1)", 1);
    }
    //发票
    if ($r[fp]) {
        $fptotal = ($totalr['totalmoney'] - $totalr['pretotal']) * ($shoppr[fpnum] / 100);
        $afp = "+发票费(" . $fptotal . ")";
        $buyallmoney += $fptotal;
    }
    $buyallfen = $totalr['totalfen'] + $price;
    $returntotal = "采购总额(" . $totalr['totalmoney'] . ")+配送费(" . $price . ")" . $afp . "-优惠(" . $totalr['pretotal'] . ")=总额(<b>" . $buyallmoney . " 元</b>)";
    $mytotal = "结算总金额为:<b><font color=red>" . $buyallmoney . " 元</font></b> 全部";
    //是否登陆
    if ($add[userfen] || $add[userpay]) {
        if (!getcvar('mluserid')) {
            printerror("NotLoginTobuy", "history.go(-1)", 1);
        }
        $user = islogin();
        //点数购买
        if ($add[userfen]) {
            if ($buyallfen > $user[userfen]) {
                printerror("NotEnoughFenBuy", "history.go(-1)", 1);
            }
            $returntotal = "采购总点数(" . $totalr['totalfen'] . ")+配送点数费(" . $price . ")=总点数(<b>" . $buyallfen . " 点</b>)";
            $mytotal = "结算总点数为:<b><font color=red>" . $buyallfen . " 点</font></b> 全部";
        } else {
            if ($buyallmoney > $user[money]) {
                printerror("NotEnoughMoneyBuy", "history.go(-1)", 1);
            }
        }
    }
    echo "<table width='100%' border=0 align=center cellpadding=3 cellspacing=1><tr><td>" . $add[payname] . "</td></tr></table>";
    $return[0] = $returntotal;
    $return[1] = $mytotal;
    return $return;
}
开发者ID:novnan,项目名称:meiju,代码行数:46,代码来源:SubmitOrder.php


示例17: SetPayFen

function SetPayFen($add, $userid, $username)
{
    global $empire, $dbtbpre;
    $add[paymoneytofen] = (int) $add[paymoneytofen];
    $add[payminmoney] = (int) $add[payminmoney];
    if (empty($add[paymoneytofen])) {
        printerror("EmptySetPayFen", "history.go(-1)");
    }
    $sql = $empire->query("update {$dbtbpre}enewspublic set paymoneytofen='{$add['paymoneytofen']}',payminmoney='{$add['payminmoney']}'");
    if ($sql) {
        //操作日志
        insert_dolog("moneytofen={$add['paymoneytofen']}&minmoney={$add['payminmoney']}");
        printerror("SetPayFenSuccess", "SetPayFen.php");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:17,代码来源:PayApi.php


示例18: DelDownRecord

function DelDownRecord($add, $userid, $username)
{
    global $empire, $dbtbpre;
    if (empty($add['downtime'])) {
        printerror("EmptyDownTime", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "deldownrecord");
    $truetime = to_time($add['downtime']);
    $sql = $empire->query("delete from {$dbtbpre}enewsdownrecord where truetime<=" . $truetime);
    if ($sql) {
        //操作日志
        insert_dolog("time={$add['downtime']}");
        printerror("DelDownRecordSuccess", "DelDownRecord.php");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:18,代码来源:DelDownRecord.php


示例19: DelDownurl

function DelDownurl($urlid, $userid, $username)
{
    global $empire, $dbtbpre;
    $urlid = (int) $urlid;
    if (empty($urlid)) {
        printerror("NotChangeDownurlid", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "downurl");
    $sql = $empire->query("delete from {$dbtbpre}enewsdownurlqz where urlid='{$urlid}'");
    if ($sql) {
        //操作日志
        insert_dolog("urlid=" . $urlid);
        printerror("DelDownurlSuccess", "url.php" . hReturnEcmsHashStrHref2(1));
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:18,代码来源:url.php


示例20: EditInfoType

function EditInfoType($add, $userid, $username)
{
    global $empire, $dbtbpre, $emod_r;
    $tid = (int) $add['tid'];
    $tbname = RepPostVar($add['tbname']);
    $mid = (int) $add[mid];
    $typeid = $add['typeid'];
    $tname = $add['tname'];
    $myorder = $add['myorder'];
    $yhid = $add['yhid'];
    $deltypeid = $add['deltypeid'];
    $count = count($typeid);
    if (!$tid || !$tbname || !$mid || !$count) {
        printerror("EmptyInfoTypeName", "history.go(-1)");
    }
    //删除
    $del = 0;
    $ids = '';
    $delcount = count($deltypeid);
    if ($delcount) {
        $dh = '';
        for ($j = 0; $j < $delcount; $j++) {
            $ids .= $dh . intval($deltypeid[$j]);
            $dh = ',';
        }
        $empire->query("delete from {$dbtbpre}enewsinfotype where typeid in (" . $ids . ")");
        if ($emod_r[$mid][tbname]) {
            $empire->query("update {$dbtbpre}ecms_" . $emod_r[$mid][tbname] . " set ttid=0 where ttid in (" . $ids . ")");
        }
        $del = 1;
    }
    //修改
    for ($i = 0; $i < $count; $i++) {
        if (strstr(',' . $ids . ',', ',' . $typeid[$i] . ',')) {
            continue;
        }
        $empire->query("update {$dbtbpre}enewsinfotype set tname='" . $tname[$i] . "',myorder='" . intval($myorder[$i]) . "',yhid='" . intval($yhid[$i]) . "' where typeid='" . intval($typeid[$i]) . "'");
    }
    GetClass();
    //更新缓存
    //操作日志
    insert_dolog("mid=" . $mid . "&del={$del}");
    printerror("EditInfoTypeSuccess", "InfoType.php?tid={$tid}&tbname={$tbname}&mid={$mid}");
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:44,代码来源:InfoType.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP printf函数代码示例发布时间:2022-05-15
下一篇:
PHP printc函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap