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


PHP esetcookie函数代码示例

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


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

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

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

示例3: ShowKey

function ShowKey()
{
    $key = strtolower(domake_password(4));
    $set = esetcookie("checkkey", $key);
    //是否支持gd库
    if (function_exists("imagejpeg")) {
        header("Content-type: image/jpeg");
        $img = imagecreate(69, 20);
        $black = imagecolorallocate($img, 255, 255, 255);
        $gray = imagecolorallocate($img, 102, 102, 102);
        imagefill($img, 0, 0, $gray);
        imagestring($img, 3, 14, 3, $key, $black);
        imagejpeg($img);
        imagedestroy($img);
    } elseif (function_exists("imagegif")) {
        header("Content-type: image/gif");
        $img = imagecreate(69, 20);
        $black = imagecolorallocate($img, 255, 255, 255);
        $gray = imagecolorallocate($img, 102, 102, 102);
        imagefill($img, 0, 0, $gray);
        imagestring($img, 3, 14, 3, $key, $black);
        imagegif($img);
        imagedestroy($img);
    } elseif (function_exists("imagepng")) {
        header("Content-type: image/png");
        $img = imagecreate(69, 20);
        $black = imagecolorallocate($img, 255, 255, 255);
        $gray = imagecolorallocate($img, 102, 102, 102);
        imagefill($img, 0, 0, $gray);
        imagestring($img, 3, 14, 3, $key, $black);
        imagepng($img);
        imagedestroy($img);
    } elseif (function_exists("imagewbmp")) {
        header("Content-type: image/vnd.wap.wbmp");
        $img = imagecreate(69, 20);
        $black = imagecolorallocate($img, 255, 255, 255);
        $gray = imagecolorallocate($img, 102, 102, 102);
        imagefill($img, 0, 0, $gray);
        imagestring($img, 3, 14, 3, $key, $black);
        imagewbmp($img);
        imagedestroy($img);
    } else {
        $set = esetcookie("checkkey", "ebak");
        @(include "class/functions.php");
        echo ReadFiletext("images/ebak.jpg");
    }
}
开发者ID:ailingsen,项目名称:pigcms,代码行数:47,代码来源:ShowKey.php

示例4: islogin

    $user = islogin();
    //是否登陆
    $pr = $empire->fetch1("select paymoneytofen,payminmoney from {$dbtbpre}enewspublic limit 1");
    if ($money < $pr['payminmoney']) {
        printerror('金额不能小于 ' . $pr['payminmoney'] . ' 元', '', 1, 0, 1);
    }
} elseif ($phome == 'ShopPay') {
    $ddid = (int) getcvar('paymoneyddid');
    $ddr = PayApiShopDdMoney($ddid);
    if ($money != $ddr['tmoney']) {
        printerror('订单金额有误', '', 1, 0, 1);
    }
    $ddno = $ddr[ddno];
    $productname = "支付订单:" . $ddno;
}
esetcookie("payphome", $phome, 0);
//返回地址前缀
$PayReturnUrlQz = $public_r['newsurl'];
if (!stristr($public_r['newsurl'], '://')) {
    $PayReturnUrlQz = eReturnDomain() . $public_r['newsurl'];
}
//编码
if ($phome_ecms_charver != 'gb2312') {
    @(include_once "../class/doiconv.php");
    $iconv = new Chinese('');
    $char = $phome_ecms_charver == 'big5' ? 'BIG5' : 'UTF8';
    $targetchar = 'GB2312';
    $productname = $iconv->Convert($char, $targetchar, $productname);
    @header('Content-Type: text/html; charset=gb2312');
}
$file = $payr['paytype'] . '/to_pay.php';
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:pay.php

示例5: printerror

$payr = $empire->fetch1("select * from {$dbtbpre}enewspayapi where paytype='{$paytype}' and isclose=0 limit 1");
if (!$payr[payid]) {
    printerror('请选择支付平台', '', 1, 0, 1);
}
include 'payfun.php';
//订单信息
$ddid = (int) getcvar('paymoneyddid');
$ddr = PayApiShopDdMoney($ddid);
$money = $ddr['tmoney'];
if (!$money) {
    printerror('订单金额有误', '', 1, 0, 1);
}
$ddno = $ddr[ddno];
$productname = "支付订单号:" . $ddno;
$productsay = "订单号:" . $ddno;
esetcookie("payphome", "ShopPay", 0);
//返回地址前缀
$PayReturnUrlQz = $public_r['newsurl'];
if (!stristr($public_r['newsurl'], '://')) {
    $PayReturnUrlQz = eReturnDomain() . $public_r['newsurl'];
}
//char
if ($ecms_config['sets']['pagechar'] != 'gb2312') {
    @(include_once "../class/doiconv.php");
    $iconv = new Chinese('');
    $char = $ecms_config['sets']['pagechar'] == 'big5' ? 'BIG5' : 'UTF8';
    $targetchar = 'GB2312';
    $productname = $iconv->Convert($char, $targetchar, $productname);
    $productsay = $iconv->Convert($char, $targetchar, $productsay);
    @header('Content-Type: text/html; charset=gb2312');
}
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:ShopPay.php

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

示例7: db_connect

<?php

require "../../class/connect.php";
require "../../class/db_sql.php";
require "../../class/q_functions.php";
require "../../member/class/user.php";
$link = db_connect();
$empire = new mysqlquery();
$editor = 1;
//订单号
if (!getcvar('checkpaysession')) {
    printerror('非法操作', '../../../', 1, 0, 1);
} else {
    esetcookie("checkpaysession", "", 0);
}
//操作事件
$phome = getcvar('payphome');
if ($phome == 'PayToFen') {
} elseif ($phome == 'PayToMoney') {
} elseif ($phome == 'ShopPay') {
} elseif ($phome == 'BuyGroupPay') {
} else {
    printerror('您来自的链接不存在', '', 1, 0, 1);
}
$user = array();
if ($phome == 'PayToFen' || $phome == 'PayToMoney' || $phome == 'BuyGroupPay') {
    $user = islogin();
    //是否登陆
}
$paytype = 'chinabank';
$payr = $empire->fetch1("select * from {$dbtbpre}enewspayapi where paytype='{$paytype}' limit 1");
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:payend.php

示例8: Ebak_ChangeLanguage

function Ebak_ChangeLanguage($add){
	global $langcharr;
	$l=(int)$add['l'];
	if($langcharr[$l])
	{
		$lifetime=time()+365*24*3600;
		esetcookie('loginlangid',$l,$lifetime);
	}
	if(!$add['from'])
	{
		$add['from']='index.php';
	}
	echo"<script>parent.location.href='$add[from]';</script>";
	exit();
}
开发者ID:jinjing1989,项目名称:wei,代码行数:15,代码来源:functions.php

示例9: RepPostVar

$add[startid] = RepPostVar($add[startid]);
$add[endid] = RepPostVar($add[endid]);
$tbname = $add['tbname'];
$count = count($tbname);
//刷新所有表
if (!$count) {
    $j = 0;
    $tsql = $empire->query("select tbname from {$dbtbpre}enewstable where intb=0 order by tid");
    while ($tr = $empire->fetch($tsql)) {
        $tbname[$j] = $tr[tbname];
        $j++;
    }
    $count = count($tbname);
}
esetcookie("retablenum", $count, 0, 1);
esetcookie("rechecktablenum", 0, 0, 1);
$url = "../ecmschtml.php?enews=ReNewsHtml&classid={$add['classid']}&from=" . urlencode($add[from]) . "&retype={$add['retype']}&startday={$add['startday']}&endday={$add['endday']}&startid={$add['startid']}&endid={$add['endid']}&havehtml={$havehtml}&reallinfotime=" . time() . $ecms_hashur['href'];
echo "<link href='../adminstyle/" . $loginadminstyleid . "/adminstyle.css' rel='stylesheet' type='text/css'><center>要刷新的表的总个数为:<font color=red>{$count}</font>个</center><br>";
for ($i = 0; $i < $count; $i++) {
    $tbname[$i] = RepPostVar($tbname[$i]);
    $trueurl = $url . "&tbname=" . $tbname[$i];
    echo "<table width='100%' border=0 align=center cellpadding=3 cellspacing=1 class=tableborder><tr class=header><td>刷新数据表:" . $tbname[$i] . "</td></tr><tr><td bgcolor='#ffffff'><iframe frameborder=0 height=35 id='" . $tbname[$i] . "' scrolling=no \n            src=\"" . $trueurl . "\" \n            width=\"100%\"></iframe></td></tr></table>";
}
db_close();
$empire = null;
?>
<iframe frameborder=0 height=35 id="checkrehtml" scrolling=no 
            src="CheckRehtml.php?first=1&from=<?php 
echo urlencode($add[from]);
echo $ecms_hashur['href'];
?>
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:DoRehtml.php

示例10: hReturnEcmsHashStrAll

$loginin = $lur['username'];
$loginrnd = $lur['rnd'];
$loginlevel = $lur['groupid'];
$loginadminstyleid = $lur['adminstyleid'];
//ehash
$ecms_hashur = hReturnEcmsHashStrAll();
//验证权限
CheckLevel($logininid, $loginin, $classid, "cj");
$add = $_GET;
$classid = $add['classid'];
$count = count($classid);
if (!$count) {
    printerror("NotChangeCjid", "history.go(-1)");
}
$add['from'] = ehtmlspecialchars($add['from']);
esetcookie("recjnum", $count, 0, 1);
$url = "ecmscj.php?enews=CjUrl" . $ecms_hashur['href'];
echo "<center>采集节点的总个数为:<font color=red>{$count}</font>个</center><br>";
for ($i = 0; $i < $count; $i++) {
    $classid[$i] = (int) $classid[$i];
    $trueurl = $url . "&from={$add['from']}&classid=" . $classid[$i];
    echo "<iframe frameborder=0 height=35 name='class" . $classid[$i] . "' scrolling=no \n            src=\"" . $trueurl . "\" \n            width=\"100%\"></iframe><br>";
}
db_close();
$empire = null;
?>
<iframe frameborder=0 height=35 name="checkrecj" scrolling=no 
            src="CheckReCj.php?first=1&from=<?php 
echo $add[from];
echo $ecms_hashur['href'];
?>
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:DoCj.php

示例11: esetcookie

            $newips = $ipr['ips'] ? $ipr['ips'] . $ip . ',' : ',' . $ip . ',';
            $usql = $empire->query("update {$dbtbpre}enewsdiggips set ips='{$newips}' where id='{$id}' and classid='{$classid}' limit 1");
        }
    }
    $dotop = (int) $_GET['dotop'];
    $f = 'diggtop';
    $n = '+1';
    if ($dotop) {
        $mess = 'DoDiggGSuccess';
    } else {
        if ($fnum == 2) {
            $f = 'diggdown';
        } else {
            $n = '-1';
        }
        $mess = 'DoDiggBSuccess';
    }
    $sql = $empire->query("update {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " set " . $f . "=" . $f . $n . " where id='{$id}'");
    if ($sql) {
        esetcookie('lastdiggid', $checkid, $checktime);
        //最后发布
        if ($doajax == 1) {
            $nr = $empire->fetch1("select " . $f . " from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}'");
            ajax_printerror($nr[$f], $_GET['ajaxarea'], $mess, 1);
        } else {
            printerror($mess, $_SERVER['HTTP_REFERER'], 1);
        }
    } else {
        $doajax == 1 ? ajax_printerror('', '', 'DbError', 1) : printerror('DbError', '', 1);
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:index.php

示例12: DoECookieRnd

function DoECookieRnd($userid, $username, $rnd, $dbdata, $groupid, $adminstyle, $truelogintime)
{
    global $do_ecookiernd, $do_ckhloginip, $do_ckhloginfile;
    $ip = $do_ckhloginip == 0 ? '127.0.0.1' : egetip();
    $ecmsckpass = md5(md5($rnd . $do_ecookiernd) . '-' . $ip . '-' . $userid . '-' . $username . '-' . $dbdata . $rnd . $groupid . '-' . $adminstyle);
    esetcookie("loginecmsckpass", $ecmsckpass, 0, 1);
    if (empty($do_ckhloginfile)) {
        DoECreatFileRnd($userid, $username, $rnd, $dbdata, $groupid, $adminstyle, $truelogintime, $ip);
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:10,代码来源:functions.php

示例13: eCheckOnclickCookie

function eCheckOnclickCookie($var, $val)
{
    $doupdate = 1;
    $onclickrecord = getcvar($var);
    if (strstr($onclickrecord, ',' . $val . ',')) {
        $doupdate = 0;
    } else {
        $newval = empty($onclickrecord) ? ',' . $val . ',' : $onclickrecord . $val . ',';
        esetcookie($var, $newval);
    }
    if (empty($_COOKIE)) {
        $doupdate = 0;
    }
    return $doupdate;
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:15,代码来源:onclickfun.php

示例14: loginout

function loginout($userid, $username, $rnd)
{
    global $empire, $dbtbpre, $do_ckhloginfile;
    $userid = (int) $userid;
    if (!$userid || !$username) {
        printerror("NotLogin", "history.go(-1)");
    }
    $set1 = esetcookie("loginuserid", "", 0, 1);
    $set2 = esetcookie("loginusername", "", 0, 1);
    $set3 = esetcookie("loginrnd", "", 0, 1);
    $set4 = esetcookie("loginlevel", "", 0, 1);
    //FireWall
    FWEmptyPassword();
    //取得随机密码
    $rnd = make_password(20);
    $sql = $empire->query("update {$dbtbpre}enewsuser set rnd='{$rnd}' where userid='{$userid}'");
    if (empty($do_ckhloginfile)) {
        DoEDelFileRnd($userid);
    }
    //操作日志
    insert_dolog("");
    printerror("ExitSuccess", "index.php");
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:23,代码来源:adminfun.php

示例15: date

//------------------ 参数开始 ------------------
//商户号
$v_mid = $payr['payuser'];
//密钥
$key = $payr['paykey'];
//返回地址
$v_url = $PayReturnUrlQz . "e/payapi/chinabank/payend.php";
//币种
$v_moneytype = "CNY";
//------------------ 参数结束 ------------------
$v_amount = $money;
//产生定单号
$v_oid = date("Ymd") . "-" . $v_mid . "-" . date("His");
$ddno = $ddno ? $ddno : time();
//订单号
esetcookie("checkpaysession", $ddno, 0);
//设置定单号
//md5
$text = $v_amount . $v_moneytype . $v_oid . $v_mid . $v_url . $key;
$v_md5info = strtoupper(md5($text));
$remark1 = $ddno;
//备注字段1
$remark2 = $productname;
//备注字段2
?>
<html>
<title>在线支付</title>
<meta http-equiv="Cache-Control" content="no-cache"/>
<body>
<form method="post" name="dopaypost" id="dopaypost" action="https://pay3.chinabank.com.cn/PayGate">
	<input type="hidden" name="v_mid"    value="<?php 
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:to_pay.php


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