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


PHP getcvar函数代码示例

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


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

示例1: login

function login($lusername,$lpassword,$key,$lifetime=0){
	global $set_username,$set_password,$set_loginauth,$set_loginkey;
	if(empty($lusername)||empty($lpassword))
	{
		printerror("EmptyLoginUser","index.php");
	}
	//验证码
	if(!$set_loginkey)
	{
		if($key<>getcvar('checkkey')||empty($key))
		{
			printerror("FailLoginKey","index.php");
		}
	}
	if(md5($lusername)<>md5($set_username)||md5($lpassword)<>$set_password)
	{
		printerror("ErrorUser","index.php");
	}
	//认证码
	if($set_loginauth&&$set_loginauth!=$_POST['loginauth'])
	{
		printerror("ErrorLoginAuth","index.php");
	}
	$logintime=time();
	$rnd=make_password(12);
	$s1=esetcookie("bakusername",$lusername,0);
	$s2=esetcookie("bakrnd",$rnd,0);
	$s3=esetcookie("baklogintime",$logintime,0);
	Ebak_SCookieRnd($lusername,$rnd);
	if(!$s1||!$s2)
	{
		printerror("NotOpenCookie","index.php");
	}
	printerror("LoginSuccess","admin.php");
}
开发者ID:jinjing1989,项目名称:wei,代码行数:35,代码来源:functions.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: Ebak_CHCookieRnd

function Ebak_CHCookieRnd($username, $rnd)
{
    global $set_loginrnd;
    $ckpass = md5(md5($rnd . $set_loginrnd) . '-' . $rnd . '-' . $username . '-');
    if ($ckpass != getcvar('loginebakckpass')) {
        printerror('NotLogin', 'index.php');
    }
}
开发者ID:tanny2015,项目名称:DataStructure,代码行数:8,代码来源:functions.php

示例4: UpdateSpaceViewStats

function UpdateSpaceViewStats($userid)
{
    global $empire, $dbtbpre;
    if (!getcvar('dospacevstats' . $userid)) {
        $sql = $empire->query("update {$dbtbpre}enewsmemberadd set viewstats=viewstats+1 where userid='" . $userid . "' limit 1");
        esetcookie("dospacevstats" . $userid, 1, time() + 3600);
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:8,代码来源:CheckUser.php

示例5: ShowBuycar

function ShowBuycar()
{
    global $empire, $class_r, $dbtbpre;
    $buycar = getcvar('mybuycar');
    $record = "!";
    $field = "|";
    $alltotal = 0;
    $return[0] = 0;
    $return[1] = 0;
    echo "<table width='100%' border=0 align=center cellpadding=3 cellspacing=1>\r\n  <form name=form1 method=post action='../../enews/index.php'>\r\n  <input type=hidden name=enews value=EditBuycar>\r\n    <tr class='header'> \r\n      <td width='16%' height=23> <div align=center>图片</div></td>\r\n      <td width='29%'> <div align=center>商品名称</div></td>\r\n      <td width='14%'> <div align=center>市场价格</div></td>\r\n      <td width='14%'> <div align=center>优惠价格</div></td>\r\n      <td width='8%'> <div align=center>数量</div></td>\r\n      <td width='14%'> <div align=center>小计</div></td>\r\n      <td width='5%'> <div align=center>删除</div></td>\r\n    </tr>";
    $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><a href='" . $titleurl . "' target=_blank><img src='" . $productr[titlepic] . "' border=0 width=80 height=80></a></td>\r\n\t<td align=center><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=center><input type=text name=num[] value='" . $num . "' size=6></td>\r\n\t<td align=right>¥" . $thistotal . "</td>\r\n\t<td align=center><input type=checkbox name=del[] value='" . $productid . "'></td>\r\n\t<input type=hidden name=productid[] value='" . $productid . "'></tr>";
    }
    //支付点数付费
    if (!$return[0]) {
        $a = "<tr height='25'> \r\n      <td colspan=6><div align=right>合计点数:<strong>" . $return[1] . "</strong></div></td>\r\n      <td>&nbsp;</td>\r\n    </tr>";
    }
    echo "<tr height='27'> \r\n      <td colspan=6><div align=right>合计:<strong>¥" . $alltotal . "</strong></div></td>\r\n      <td>&nbsp;</td>\r\n    </tr>" . $a . "\r\n    <tr> \r\n      <td colspan=7 height='25'><div align=right><a href='../../enews/?enews=ClearBuycar'><img src=../../data/images/shop/clearbuycar.gif width=92 height=23 border=0></a>&nbsp;&nbsp;\r\n          <input name=imageField type=image src=../../data/images/shop/editbuycar.gif width=135 height=23 border=0>\r\n          &nbsp;&nbsp;<a href='javascript:window.close();'><img src=../../data/images/shop/buynext.gif width=87 height=23 border=0></a>&nbsp;&nbsp;<a href='../order/'><img src=../../data/images/shop/buycarnext.gif width=87 height=19 border=0></a></div></td>\r\n    </tr>\r\n\t</form>\r\n  </table>";
    return $return;
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:54,代码来源:buycar.php

示例6: ShowClass_ListClass

function ShowClass_ListClass($bclassid, $exp)
{
    global $empire, $fun_r, $dbtbpre;
    //缩
    if (getcvar('displayclass', 1)) {
        $display = " style='display=none'";
    }
    if (empty($bclassid)) {
        $bclassid = 0;
        $exp = "";
    } else {
        $exp = "&nbsp;&nbsp;&nbsp;" . $exp;
    }
    $sql = $empire->query("select * from {$dbtbpre}enewsclass where bclassid='{$bclassid}' order by myorder,classid");
    $returnstr = "";
    while ($r = $empire->fetch($sql)) {
        $classurl = sys_ReturnBqClassUrl($r);
        $divonclick = "";
        $start_tbody = "";
        $end_tbody = "";
        $docinfo = "";
        $classinfotype = '';
        //终级栏目
        if ($r[islast]) {
            $img = "<a href='AddNews.php?enews=AddNews&classid=" . $r[classid] . "' target=_blank><img src='../data/images/txt.gif' border=0></a>";
            $bgcolor = "#ffffff";
            $renewshtml = " <a href='#e' onclick=renews(" . $r[classid] . ",'" . $r[tbname] . "')>" . $fun_r['news'] . "</a> ";
            $docinfo = " <a href='#e' onclick=docinfo(" . $r[classid] . ")>归档</a>";
            $classinfotype = " <a href='#e' onclick=ttc(" . $r[classid] . ")>分类</a>";
        } else {
            $img = "<img src='../data/images/dir.gif'>";
            if (empty($r[bclassid])) {
                $bgcolor = "#DBEAF5";
                $divonclick = " onMouseUp='turnit(classdiv" . $r[classid] . ");' style='CURSOR:hand'";
                $start_tbody = "<tbody id='classdiv" . $r[classid] . "'" . $display . ">";
                $end_tbody = "</tbody>";
            } else {
                $bgcolor = "#ffffff";
            }
            $renewshtml = " <a href='#e' onclick=renews(" . $r[classid] . ",'" . $r[tbname] . "')>" . $fun_r['news'] . "</a> ";
        }
        //外部栏目
        $classname = $r[classname];
        if ($r[wburl]) {
            $classname = "<font color='#666666'>" . $classname . "&nbsp;(外部)</font>";
        }
        $returnstr .= "<tr bgcolor='" . $bgcolor . "' height=25><td><input type=text name=myorder[] value=" . $r[myorder] . " size=2><input type=hidden name=classid[] value=" . $r[classid] . "></td><td" . $divonclick . ">" . $exp . $img . "</td><td align=center>" . $r[classid] . "</td><td><input type=checkbox name=reclassid[] value=" . $r[classid] . "> <a href='" . $classurl . "' target=_blank>" . $classname . "</a></td><td align=center>" . $r[onclick] . "</td><td><a href='#e' onclick=editc(" . $r[classid] . ")>" . $fun_r['edit'] . "</a> <a href='#e' onclick=copyc(" . $r[classid] . ")>" . $fun_r['copyclass'] . "</a> <a href='#e' onclick=delc(" . $r[classid] . ")>" . $fun_r['del'] . "</a></td><td><a href='#e' onclick=relist(" . $r[classid] . ")>" . $fun_r['re'] . "</a>" . $renewshtml . "<a href='#e' onclick=rejs(" . $r[classid] . ")>JS</a> <a href='#e' onclick=tvurl(" . $r[classid] . ")>调用</a>" . $classinfotype . $docinfo . "</td></tr>";
        //取得子栏目
        if (empty($r[islast])) {
            $returnstr .= $start_tbody . ShowClass_ListClass($r[classid], $exp) . $end_tbody;
        }
    }
    return $returnstr;
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:54,代码来源:ListClass.php

示例7: ShowPayfs

function ShowPayfs($pr, $user)
{
    global $empire, $dbtbpre;
    $str = '';
    $sql = $empire->query("select payid,payname,payurl,paysay,userpay,userfen,isdefault from {$dbtbpre}enewsshoppayfs where isclose=0 order by payid");
    while ($r = $empire->fetch($sql)) {
        $checked = $r[isdefault] == 1 ? ' checked' : '';
        $dis = "";
        $words = "";
        //扣点数
        if ($r[userfen]) {
            if ($pr['buytype']) {
                $dis = " disabled";
                $words = "&nbsp;<font color='#666666'>(您选择的商品至少有一个不支持点数购买)</font>";
            } else {
                if (getcvar('mluserid')) {
                    if ($user[userfen] < $pr['totalfen']) {
                        $dis = " disabled";
                        $words = "&nbsp;<font color='#666666'>(您的帐号点数不足,不能使用此支付方式)</font>";
                    }
                } else {
                    $dis = " disabled";
                    $words = "&nbsp;<font color='#666666'>(您未登录,不能使用此支付方式)</font>";
                }
            }
        } elseif ($r[userpay]) {
            if (getcvar('mluserid')) {
                if ($user[money] < $pr['totalmoney']) {
                    $dis = " disabled";
                    $words = "&nbsp;<font color='#666666'>(您的帐号余额不足,不能使用此支付方式)</font>";
                }
            } else {
                $dis = " disabled";
                $words = "&nbsp;<font color='#666666'>(您未登录,不能使用此支付方式)</font>";
            }
        } elseif ($r[payurl]) {
            $words = "";
        } else {
        }
        $str .= "<tr><td><b><input type=radio name=payfsid value='" . $r[payid] . "'" . $checked . "" . $dis . ">" . $r[payname] . "</b>" . $words . "</td></tr><tr><td><table width='98%' border=0 align=right cellpadding=3 cellspacing=1><tr><td>" . $r[paysay] . "</td></tr></table></td></tr>";
    }
    if ($str) {
        $str = "<table width='100%' border=0 align=center cellpadding=3 cellspacing=1>" . $str . "</table>";
    }
    return $str;
}
开发者ID:novnan,项目名称:meiju,代码行数:46,代码来源:order.php

示例8: 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

示例9: AddMemberFeedback

function AddMemberFeedback($add)
{
    global $empire, $dbtbpre;
    //验证码
    $keyvname = 'checkspacefbkey';
    ecmsCheckShowKey($keyvname, $add['key'], 1);
    //用户
    $userid = intval($add['userid']);
    $ur = $empire->fetch1("select " . egetmf('userid') . " from " . eReturnMemberTable() . " where " . egetmf('userid') . "='{$userid}' limit 1");
    if (empty($ur['userid'])) {
        printerror("NotUsername", "", 1);
    }
    //发表者
    $uid = (int) getcvar('mluserid');
    if ($uid) {
        $uname = RepPostVar(getcvar('mlusername'));
    } else {
        $uid = 0;
        $uname = '';
    }
    $uname = RepPostStr($uname);
    $name = RepPostStr($add['name']);
    $company = RepPostStr($add['company']);
    $phone = RepPostStr($add['phone']);
    $fax = RepPostStr($add['fax']);
    $email = RepPostStr($add['email']);
    $address = RepPostStr($add['address']);
    $zip = RepPostStr($add['zip']);
    $title = RepPostStr($add['title']);
    $ftext = RepPostStr($add['ftext']);
    if (!trim($name) || !trim($title) || !trim($ftext)) {
        printerror("EmptyMemberFeedback", "history.go(-1)", 1);
    }
    $addtime = date("Y-m-d H:i:s");
    $ip = egetip();
    $eipport = egetipport();
    $sql = $empire->query("insert into {$dbtbpre}enewsmemberfeedback(name,company,phone,fax,email,address,zip,title,ftext,userid,ip,uid,uname,addtime,eipport) values('{$name}','{$company}','{$phone}','{$fax}','{$email}','{$address}','{$zip}','{$title}','{$ftext}',{$userid},'{$ip}',{$uid},'{$uname}','{$addtime}','{$eipport}');");
    ecmsEmptyShowKey($keyvname);
    //清空验证码
    if ($sql) {
        printerror("AddMemberFeedbackSuccess", $_SERVER['HTTP_REFERER'], 1);
    } else {
        printerror("DbError", "history.go(-1)", 1);
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:45,代码来源:feedbackfun.php

示例10: CheckLoginNum

function CheckLoginNum($ip, $time)
{
    global $empire, $public_r, $dbtbpre;
    //COOKIE验证
    $loginnum = intval(getcvar('loginnum'));
    $lastlogintime = intval(getcvar('lastlogintime'));
    if ($lastlogintime) {
        if ($time - $lastlogintime < $public_r['logintime'] * 60) {
            if ($loginnum >= $public_r['loginnum']) {
                printerror("LoginOutNum", "history.go(-1)");
            }
        }
    }
    //数据库验证
    $chtime = $time - $public_r['logintime'] * 60;
    $num = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsloginfail where ip='{$ip}' and num>={$public_r['loginnum']} and lasttime>{$chtime} limit 1");
    if ($num) {
        printerror("LoginOutNum", "history.go(-1)");
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:20,代码来源:adminfun.php

示例11: AddMemberGbook

function AddMemberGbook($add)
{
    global $empire, $dbtbpre;
    //验证码
    $keyvname = 'checkspacegbkey';
    ecmsCheckShowKey($keyvname, $add['key'], 1);
    //用户
    $userid = intval($add['userid']);
    $ur = $empire->fetch1("select " . eReturnSelectMemberF('userid') . " from " . eReturnMemberTable() . " where " . egetmf('userid') . "='{$userid}' limit 1");
    if (empty($ur['userid'])) {
        printerror("NotUsername", "", 1);
    }
    //发表者
    $uid = (int) getcvar('mluserid');
    if ($uid) {
        $uname = RepPostVar(getcvar('mlusername'));
    } else {
        $uid = 0;
        $uname = trim($add['uname']);
    }
    $uname = RepPostStr($uname);
    $gbtext = RepPostStr($add['gbtext']);
    if (empty($uname) || !trim($gbtext)) {
        printerror("EmptyMemberGbook", "history.go(-1)", 1);
    }
    $isprivate = intval($add['isprivate']);
    $addtime = date("Y-m-d H:i:s");
    $ip = egetip();
    $eipport = egetipport();
    $sql = $empire->query("insert into {$dbtbpre}enewsmembergbook(userid,isprivate,uid,uname,ip,addtime,gbtext,retext,eipport) values({$userid},{$isprivate},{$uid},'{$uname}','{$ip}','{$addtime}','{$gbtext}','','{$eipport}');");
    ecmsEmptyShowKey($keyvname);
    //清空验证码
    if ($sql) {
        printerror("AddMemberGbookSuccess", $_SERVER['HTTP_REFERER'], 1);
    } else {
        printerror("DbError", "history.go(-1)", 1);
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:38,代码来源:gbookfun.php

示例12: login1

function login1($username, $password, $lifetime, $key, $location)
{
    global $empire, $user_tablename, $user_userid, $user_username, $user_password, $user_dopass, $user_group, $user_groupid, $user_rnd, $public_r, $user_salt, $user_saltnum, $dbtbpre, $eloginurl, $user_checked;
    if ($eloginurl) {
        Header("Location:{$eloginurl}");
        exit;
    }
    $dopr = 1;
    if ($_POST['prtype']) {
        $dopr = 9;
    }
    if (!trim($username) || !trim($password)) {
        printerror("EmptyLogin", "history.go(-1)", $dopr);
    }
    //验证码
    $keyvname = 'checkloginkey';
    if ($public_r['loginkey_ok']) {
        ecmsCheckShowKey($keyvname, $key, $dopr);
    }
    $username = RepPostVar($username);
    $password = RepPostVar($password);
    //编码转换
    $utfusername = doUtfAndGbk($username, 0);
    $password = doUtfAndGbk($password, 0);
    //密码
    if (empty($user_dopass)) {
        $password = md5($password);
    }
    if ($user_dopass == 3) {
        $password = substr(md5($password), 8, 16);
    }
    //双重md5
    $num = 0;
    if ($user_dopass == 2) {
        $ur = $empire->fetch1("select " . $user_userid . "," . $user_salt . "," . $user_password . " from " . $user_tablename . " where " . $user_username . "='{$utfusername}' limit 1");
        $password = md5(md5($password) . $ur[$user_salt]);
        $num = 0;
        if ($password == $ur[$user_password]) {
            $num = 1;
        }
        if (empty($ur[$user_userid])) {
            $num = 0;
        }
    } else {
        $num = $empire->gettotal("select count(*) as total from " . $user_tablename . " where " . $user_username . "='{$utfusername}' and " . $user_password . "='" . $password . "' limit 1");
    }
    if (!$num) {
        printerror("FailPassword", "history.go(-1)", $dopr);
    }
    $r = $empire->fetch1("select * from " . $user_tablename . " where " . $user_username . "='{$utfusername}' limit 1");
    if ($r[$user_checked] == 0) {
        if ($public_r['regacttype'] == 1) {
            printerror('NotCheckedUser', '../member/register/regsend.php', 1);
        } else {
            printerror('NotCheckedUser', '', 1);
        }
    }
    $time = date("Y-m-d H:i:s");
    $rnd = make_password(12);
    //取得随机密码
    //默认会员组
    if (empty($r[$user_group])) {
        $r[$user_group] = $user_groupid;
    }
    $r[$user_group] = (int) $r[$user_group];
    $usql = $empire->query("update " . $user_tablename . " set " . $user_rnd . "='{$rnd}'," . $user_group . "=" . $r[$user_group] . " where " . $user_userid . "='{$r[$user_userid]}'");
    //设置cookie
    $logincookie = 0;
    if ($lifetime) {
        $logincookie = time() + $lifetime;
    }
    $set1 = esetcookie("mlusername", $username, $logincookie);
    $set2 = esetcookie("mluserid", $r[$user_userid], $logincookie);
    $set3 = esetcookie("mlgroupid", $r[$user_group], $logincookie);
    $set4 = esetcookie("mlrnd", $rnd, $logincookie);
    //登录附加cookie
    AddLoginCookie($r);
    $location = "../member/cp/";
    $returnurl = getcvar('returnurl');
    if ($returnurl) {
        $location = $returnurl;
    }
    if (strstr($_SERVER['HTTP_REFERER'], "e/member/iframe")) {
        $location = "../member/iframe/";
    }
    if (strstr($location, "enews=exit") || strstr($location, "e/member/register") || strstr($_SERVER['HTTP_REFERER'], "e/member/register")) {
        $location = "../member/cp/";
        $_POST['ecmsfrom'] = '';
    }
    ecmsEmptyShowKey($keyvname);
    //清空验证码
    $set6 = esetcookie("returnurl", "");
    if ($set1 && $set2) {
        $location = DoingReturnUrl($location, $_POST['ecmsfrom']);
        printerror("LoginSuccess", $location, $dopr);
    } else {
        printerror("NotCookie", "history.go(-1)", $dopr);
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:99,代码来源:user.php

示例13: getcvar

    ?>
img.src="<?php 
    echo $noaddimgurl;
    ?>
";
	</script>
	<?php 
}
//网页标题
$thispagetitle = $public_diyr['pagetitle'] ? $public_diyr['pagetitle'] : '会员中心';
//会员信息
$tmgetuserid = (int) getcvar('mluserid');
//用户ID
$tmgetusername = RepPostVar(getcvar('mlusername'));
//用户名
$tmgetgroupid = (int) getcvar('mlgroupid');
//用户组ID
$tmgetgroupname = '游客';
//会员组名称
if ($tmgetgroupid) {
    $tmgetgroupname = $level_r[$tmgetgroupid]['groupname'];
    if (!$tmgetgroupname) {
        include_once ECMS_PATH . DASHBOARD . '/data/dbcache/MemberLevel.php';
        $tmgetgroupname = $level_r[$tmgetgroupid]['groupname'];
    }
}
//模型
$tgetmid = (int) $_GET['mid'];
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:header.php

示例14: ReturnBuycardd

function ReturnBuycardd()
{
    global $empire, $class_r, $dbtbpre;
    $buycar = getcvar('mybuycar');
    $record = "!";
    $field = "|";
    $r = explode($record, $buycar);
    $alltotal = 0;
    $return[0] = 0;
    //是否全部积分
    $return[1] = 0;
    //购买总积分
    $return[2] = 0;
    //购买总金额
    $return[3] = "";
    //存放格式
    $newbuycar = "";
    for ($i = 0; $i < count($r) - 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 = ReturnBuycarProductNum($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;
        $thistotal = $productr[price] * $num;
        $alltotal += $thistotal;
        //组成存放的格式
        $title = str_replace("!", "", $productr[title]);
        $title = str_replace("|", "", $title);
        $title = str_replace(",", "", $title);
        $newbuycar .= "|" . $classid . "," . $id . "|" . $num . "|" . $productr[price] . "|" . $productr[buyfen] . "|" . $title . "!";
    }
    $return[2] = $alltotal;
    $return[3] = $newbuycar;
    return $return;
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:54,代码来源:ShopSysFun.php

示例15: CheckShowNewsLevel

function CheckShowNewsLevel($infor)
{
    global $check_path, $level_r, $empire, $user_userfen, $user_userid, $user_tablename, $user_userdate, $gotourl, $toreturnurl, $public_r, $dbtbpre, $class_r;
    $groupid = $infor['groupid'];
    $userfen = $infor['userfen'];
    $id = $infor['id'];
    $classid = $infor['classid'];
    //是否登陆
    $user_r = ViewCheckLogin($infor);
    //验证权限
    if ($class_r[$infor[classid]]['cgtoinfo']) {
        $checkcr = $empire->fetch1("select cgroupid from {$dbtbpre}enewsclass where classid='{$infor['classid']}'");
        if ($checkcr['cgroupid']) {
            if (!strstr($checkcr[cgroupid], ',' . $user_r[groupid] . ',')) {
                $infor['eclass_cgroupid'] = $checkcr[cgroupid];
                if (!getcvar('returnurl')) {
                    esetcookie("returnurl", $toreturnurl, 0);
                }
                $msg = "您没有足够权限查看此信息! <a href='{$gotourl}'><u>点击这里</u></a>重新登陆;注册请<a href='" . $public_r['newsurl'] . "e/member/register/'><u>点击这里</u></a>。";
                ShowViewInfoMsg($infor, $msg);
            }
        }
    }
    if ($groupid) {
        if ($level_r[$groupid][level] > $level_r[$user_r[groupid]][level]) {
            if (!getcvar('returnurl')) {
                esetcookie("returnurl", $toreturnurl, 0);
            }
            $msg = "您的会员级别不足(您的当前级别:" . $level_r[$user_r[groupid]][groupname] . "),没有查看此信息的权限! <a href='{$gotourl}'><u>点击这里</u></a>重新登陆;注册请<a href='" . $public_r['newsurl'] . "e/member/register/'><u>点击这里</u></a>。";
            ShowViewInfoMsg($infor, $msg);
        }
    }
    //扣点
    if (!empty($userfen)) {
        //是否有历史记录
        $bakr = $empire->fetch1("select id,truetime from {$dbtbpre}enewsdownrecord where id='{$id}' and classid='{$classid}' and userid='{$user_r['userid']}' and online=2 order by truetime desc limit 1");
        if ($bakr['id'] && time() - $bakr['truetime'] <= $public_r['redoview'] * 3600) {
        } else {
            if ($user_r[userdate] - time() > 0) {
            } else {
                if ($user_r[userfen] < $userfen) {
                    if (!getcvar('returnurl')) {
                        esetcookie("returnurl", $toreturnurl, 0);
                    }
                    $msg = "您的点数不足(您当前拥有的点数 " . $user_r[userfen] . " 点),没有查看此信息的权限! <a href='{$gotourl}'><u>点击这里</u></a>重新登陆;注册请<a href='" . $public_r['newsurl'] . "e/member/register/'><u>点击这里</u></a>。";
                    ShowViewInfoMsg($infor, $msg);
                }
                //扣点
                $usql = $empire->query("update " . $user_tablename . " set " . $user_userfen . "=" . $user_userfen . "-" . $userfen . " where " . $user_userid . "='{$user_r['userid']}'");
            }
            //备份下载记录
            $utfusername = $user_r['username'];
            BakDown($classid, $id, 0, $user_r['userid'], $utfusername, $infor[title], $userfen, 2);
        }
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:56,代码来源:CheckLevel.php


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