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


PHP egetip函数代码示例

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


在下文中一共展示了egetip函数的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: 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

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

示例4: login

function login($username, $password, $key, $post)
{
    global $empire, $public_r, $dbtbpre, $do_loginauth, $do_ckhloginfile;
    $username = RepPostVar($username);
    $password = RepPostVar($password);
    if (!$username || !$password) {
        printerror("EmptyKey", "index.php");
    }
    //验证码
    $keyvname = 'checkkey';
    if (!$public_r['adminloginkey']) {
        ecmsCheckShowKey($keyvname, $key, 0, 0);
    }
    if (strlen($username) > 30 || strlen($password) > 30) {
        printerror("EmptyKey", "index.php");
    }
    $loginip = egetip();
    $logintime = time();
    CheckLoginNum($loginip, $logintime);
    //认证码
    if ($do_loginauth && $do_loginauth != $post['loginauth']) {
        InsertErrorLoginNum($username, $password, 1, $loginip, $logintime);
        printerror("ErrorLoginAuth", "index.php");
    }
    $user_r = $empire->fetch1("select userid,password,salt,lasttime,lastip from {$dbtbpre}enewsuser where username='" . $username . "' and checked=0 limit 1");
    if (!$user_r['userid']) {
        InsertErrorLoginNum($username, $password, 0, $loginip, $logintime);
        printerror("LoginFail", "index.php");
    }
    $ch_password = md5(md5($password) . $user_r['salt']);
    if ($user_r['password'] != $ch_password) {
        InsertErrorLoginNum($username, $password, 0, $loginip, $logintime);
        printerror("LoginFail", "index.php");
    }
    //安全问答
    $user_addr = $empire->fetch1("select userid,equestion,eanswer from {$dbtbpre}enewsuseradd where userid='{$user_r['userid']}'");
    if (!$user_addr['userid']) {
        InsertErrorLoginNum($username, $password, 0, $loginip, $logintime);
        printerror("LoginFail", "index.php");
    }
    if ($user_addr['equestion']) {
        $equestion = (int) $post['equestion'];
        $eanswer = $post['eanswer'];
        if ($user_addr['equestion'] != $equestion) {
            InsertErrorLoginNum($username, $password, 0, $loginip, $logintime);
            printerror("LoginFail", "index.php");
        }
        $ckeanswer = ReturnHLoginQuestionStr($user_r['userid'], $username, $user_addr['equestion'], $eanswer);
        if ($ckeanswer != $user_addr['eanswer']) {
            InsertErrorLoginNum($username, $password, 0, $loginip, $logintime);
            printerror("LoginFail", "index.php");
        }
    }
    //取得随机密码
    $rnd = make_password(20);
    $sql = $empire->query("update {$dbtbpre}enewsuser set rnd='{$rnd}',loginnum=loginnum+1,lastip='{$loginip}',lasttime='{$logintime}',pretime='{$user_r['lasttime']}',preip='" . RepPostVar($user_r[lastip]) . "' where username='{$username}' limit 1");
    $r = $empire->fetch1("select groupid,userid,styleid from {$dbtbpre}enewsuser where username='{$username}' limit 1");
    //样式
    if (empty($r[styleid])) {
        $stylepath = $public_r['defadminstyle'] ? $public_r['defadminstyle'] : 1;
    } else {
        $styler = $empire->fetch1("select path,styleid from {$dbtbpre}enewsadminstyle where styleid='{$r['styleid']}'");
        if (empty($styler[styleid])) {
            $stylepath = $public_r['defadminstyle'] ? $public_r['defadminstyle'] : 1;
        } else {
            $stylepath = $styler['path'];
        }
    }
    //设置备份
    $cdbdata = 0;
    $bnum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsgroup where groupid='{$r['groupid']}' and dodbdata=1");
    if ($bnum) {
        $cdbdata = 1;
        $set5 = esetcookie("ecmsdodbdata", "empirecms", 0, 1);
    } else {
        $set5 = esetcookie("ecmsdodbdata", "", 0, 1);
    }
    ecmsEmptyShowKey($keyvname, 0);
    //清空验证码
    $set4 = esetcookie("loginuserid", $r[userid], 0, 1);
    $set1 = esetcookie("loginusername", $username, 0, 1);
    $set2 = esetcookie("loginrnd", $rnd, 0, 1);
    $set3 = esetcookie("loginlevel", $r[groupid], 0, 1);
    $set5 = esetcookie("eloginlic", "empirecmslic", 0, 1);
    $set6 = esetcookie("loginadminstyleid", $stylepath, 0, 1);
    //COOKIE加密验证
    if (empty($do_ckhloginfile)) {
        DoEDelFileRnd($r[userid]);
    }
    DoECookieRnd($r[userid], $username, $rnd, $cdbdata, $r[groupid], intval($stylepath), $logintime);
    //最后登陆时间
    $set4 = esetcookie("logintime", $logintime, 0, 1);
    $set5 = esetcookie("truelogintime", $logintime, 0, 1);
    //写入日志
    insert_log($username, '', 1, $loginip, 0);
    //FireWall
    FWSetPassword();
    if ($set1 && $set2 && $set3) {
        //操作日志
        insert_dolog("");
//.........这里部分代码省略.........
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:101,代码来源:adminfun.php

示例5: ReturnAddF

function ReturnAddF($add, $modid, $userid, $username, $do = 0, $rdata = 0, $ch = 0)
{
    global $empire, $public_r, $dbtbpre, $emod_r;
    if ($do == 0 || $do == 1) {
        //导入gd处理文件
        if ($add['mark'] || $add['getfirsttitlespic'] || $add['mcreatespic']) {
            include_once ECMS_PATH . 'e/class/gd.php';
        }
    }
    $ret_r['tb'] = $emod_r[$modid]['deftb'];
    $r = explode(',', $emod_r[$modid][enter]);
    $count = count($r) - 1;
    if (empty($do)) {
        //数据库操作
        for ($i = 1; $i < $count; $i++) {
            $f = $r[$i];
            if ($f == 'special.field' || !strstr($emod_r[$modid]['canaddf'], ',' . $f . ',')) {
                continue;
            }
            $add[$f] = ReturnCheckboxAddF($add[$f], $modid, $f);
            //复选框
            $value = RepPhpAspJspcodeText($add[$f]);
            if ($f == 'newstime') {
                $value = empty($value) ? time() : to_time($value);
            } elseif ($f == "morepic") {
                $value = ReturnMorepicpath($add['msmallpic'], $add['mbigpic'], $add['mpicname'], $add['mdelpicid'], $add['mpicid'], $add, $add['mpicurl_qz'], 0);
            } elseif ($f == "downpath") {
                $value = ReturnDownpath($add['downname'], $add['downpath'], $add['delpathid'], $add['pathid'], $add['downuser'], $add['fen'], $add['thedownqz'], $add, $add['foruser'], $add['downurl_qz'], 0);
            } elseif ($f == "onlinepath") {
                $value = ReturnDownpath($add['odownname'], $add['odownpath'], $add['odelpathid'], $add['opathid'], $add['odownuser'], $add['ofen'], $add['othedownqz'], $add, $add['oforuser'], $add['onlineurl_qz'], 0);
            } elseif ($f == "smalltext") {
                if (!trim($value)) {
                    $value = SubSmalltextVal($add[newstext], $public_r[smalltextlen]);
                    //截取新闻内容
                }
            } elseif ($f == 'infoip') {
                $value = egetip();
            } elseif ($f == 'infozm') {
                $value = $value ? $value : GetInfoZm($add[title]);
            }
            //处理函数
            $value = DoFFun($modid, $f, $value, 1, 0);
            //检测必填字段
            if ($ch == 1 && empty($add['titleurl'])) {
                ChMustAddF($modid, $f, $value);
                ChIsOnlyAddF($modid, 0, $f, $value, 0);
                //唯一值
            }
            //编辑器
            if ($f == "newstext") {
                //远程保存
                $value = addslashes(CopyImg(stripSlashes($value), $add[copyimg], $add[copyflash], $add[classid], $add[qz_url], $username, $add['id'], $add['filepass'], $add['mark']));
                //替换关键字和字符
                $value = DoReplaceKeyAndWord($value, $add['dokey']);
                //自动分页
                if ($add[autopage] && !strstr($value, "[!--empirenews.page--]")) {
                    if (empty($add[autosize])) {
                        $add[autosize] = 5000;
                    }
                    $value = AutoDoPage($value, $add[autosize]);
                }
            }
            //存文本
            if ($emod_r[$modid]['savetxtf'] && $f == $emod_r[$modid]['savetxtf']) {
                //建立目录
                $thetxtfile = GetFileMd5();
                $truevalue = MkDirTxtFile(date("Y/md"), $thetxtfile);
                //写放文件
                EditTxtFieldText($truevalue, $value);
                $value = $truevalue;
            }
            if (strstr($emod_r[$modid]['tbdataf'], ',' . $f . ',')) {
                $ret_r['datafields'] .= "," . $f;
                $ret_r['datavalues'] .= ",'" . addslashes($value) . "'";
            } else {
                $ret_r['fields'] .= "," . $f;
                $ret_r['values'] .= ",'" . addslashes($value) . "'";
            }
        }
    } elseif ($do == 1) {
        //数据库操作
        for ($i = 1; $i < $count; $i++) {
            $f = $r[$i];
            if ($f == "special.field" || !strstr($emod_r[$modid]['caneditf'], ',' . $f . ',')) {
                continue;
            }
            $add[$f] = ReturnCheckboxAddF($add[$f], $modid, $f);
            //复选框
            $value = RepPhpAspJspcodeText($add[$f]);
            if ($f == 'newstime') {
                $value = empty($value) ? time() : to_time($value);
            } elseif ($f == "morepic") {
                $value = ReturnMorepicpath($add['msmallpic'], $add['mbigpic'], $add['mpicname'], $add['mdelpicid'], $add['mpicid'], $add, $add['mpicurl_qz'], 1);
            } elseif ($f == "downpath") {
                $value = ReturnDownpath($add['downname'], $add['downpath'], $add['delpathid'], $add['pathid'], $add['downuser'], $add['fen'], $add['thedownqz'], $add, $add['foruser'], $add['downurl_qz'], 1);
            } elseif ($f == "onlinepath") {
                $value = ReturnDownpath($add['odownname'], $add['odownpath'], $add['odelpathid'], $add['opathid'], $add['odownuser'], $add['ofen'], $add['othedownqz'], $add, $add['oforuser'], $add['onlineurl_qz'], 1);
            } elseif ($f == "smalltext") {
                if (!trim($value)) {
                    $value = SubSmalltextVal($add[newstext], $public_r[smalltextlen]);
//.........这里部分代码省略.........
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:101,代码来源:functions.php

示例6: ReturnDownSysCheckIp

function ReturnDownSysCheckIp()
{
    global $DownSys_CheckIp;
    $ip = $DownSys_CheckIp ? egetip() : '127.0.0.1';
    return $ip;
}
开发者ID:novnan,项目名称:meiju,代码行数:6,代码来源:DownSysFun.php

示例7: qCheckLoginAuthstr

$rechangeclass = '';
//验证会员信息
$mloginauthr = qCheckLoginAuthstr();
//取得登陆会员资料
if ($muserid && $mloginauthr['islogin']) {
    $memberinfor = $empire->fetch1("select " . eReturnSelectMemberF('*', 'u.') . ",ui.* from " . eReturnMemberTable() . " u LEFT JOIN {$dbtbpre}enewsmemberadd ui ON u." . egetmf('userid') . "=ui.userid where u." . egetmf('userid') . "='{$muserid}' limit 1");
}
//增加
if ($enews == "MAddInfo") {
    $cr = DoQCheckAddLevel($classid, $muserid, $musername, $mrnd, 0, 1);
    $mr = $empire->fetch1("select qenter,qmname from {$dbtbpre}enewsmod where mid='{$cr['modid']}'");
    if (empty($mr['qenter'])) {
        printerror("NotOpenCQInfo", "history.go(-1)", 1);
    }
    //IP发布数限制
    $check_ip = egetip();
    $check_checked = $cr['wfid'] ? 0 : $cr['checkqadd'];
    eCheckIpAddInfoNum($check_ip, $cr['tbname'], $cr['modid'], $check_checked);
    //初始变量
    $word = "增加信息";
    $ecmsfirstpost = 1;
    $rechangeclass = "&nbsp;[<a href='ChangeClass.php?mid=" . $mid . "'>重新选择</a>]";
    //验证码
    if ($cr['qaddshowkey']) {
        $showkey = "<tr bgcolor=\"#FFFFFF\">\n      <td width=\"11%\" height=\"25\">验证码</td>\n      <td height=\"25\"><input name=\"key\" type=\"text\" size=\"6\">\n        <img src=\"../ShowKey/?v=info\" name=\"infoKeyImg\" id=\"infoKeyImg\" onclick=\"infoKeyImg.src='../ShowKey/?v=info&t='+Math.random()\" title=\"看不清楚,点击刷新\"></td></tr>";
    }
    //图片
    $imgwidth = 0;
    $imgheight = 0;
    //文件验证码
    $filepass = time();
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:AddInfo.php

示例8: date

$strCmdNo = "1";
//财付通支付为"1" (当前只支持 cmdno=1)
$strBillDate = date('Ymd');
//交易日期 (yyyymmdd)
$desc = $productname;
//商品名称
$strBuyerId = "";
//QQ号码
$strSpBillNo = $ddno ? $ddno : time();
//订单号
esetcookie("checkpaysession", $strSpBillNo, 0);
//设置定单号
$strTransactionId = $bargainor_id . $strBillDate . $strSpBillNo;
//交易订单号
$attach = $strSpBillNo;
$spbill_create_ip = egetip();
//md5
$strSignText = "cmdno=" . $strCmdNo . "&date=" . $strBillDate . "&bargainor_id=" . $bargainor_id . "&transaction_id=" . $strTransactionId . "&sp_billno=" . $strSpBillNo . "&total_fee=" . $total_fee . "&fee_type=" . $fee_type . "&return_url=" . $return_url . "&attach=" . $attach . "&spbill_create_ip=" . $spbill_create_ip . "&key=" . $key;
$strSign = strtoupper(md5($strSignText));
?>
<html>
<title>财付通支付</title>
<meta http-equiv="Cache-Control" content="no-cache"/>
<body>
<form action="https://www.tenpay.com/cgi-bin/v1.0/pay_gate.cgi" name="dopaypost" id="dopaypost">
<input type=hidden name="cmdno" value="<?php 
echo $strCmdNo;
?>
">
<input type=hidden name="date" value="<?php 
echo $strBillDate;
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:to_pay.php

示例9: AddUser

function AddUser($username, $password, $repassword, $groupid, $adminclass, $checked, $styleid, $loginuserid, $loginusername)
{
    global $empire, $class_r, $dbtbpre;
    if (!$username || !$password || !$repassword) {
        printerror("EmptyUsername", "history.go(-1)");
    }
    if ($password != $repassword) {
        printerror("NotRepassword", "history.go(-1)");
    }
    if (strlen($password) < 6) {
        printerror("LessPassword", "history.go(-1)");
    }
    //操作权限
    CheckLevel($loginuserid, $loginusername, $classid, "user");
    $num = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsuser where username='{$username}' limit 1");
    if ($num) {
        printerror("ReUsername", "history.go(-1)");
    }
    //管理目录
    for ($i = 0; $i < count($adminclass); $i++) {
        //大栏目
        if (empty($class_r[$adminclass[$i]][islast])) {
            if (empty($class_r[$adminclass[$i]][sonclass]) || $class_r[$adminclass[$i]][sonclass] == "|") {
                continue;
            } else {
                $andclass = substr($class_r[$adminclass[$i]][sonclass], 1);
            }
            $insert_class .= $andclass;
        } else {
            $insert_class .= $adminclass[$i] . "|";
        }
    }
    $insert_class = "|" . $insert_class;
    $styleid = (int) $styleid;
    $groupid = (int) $groupid;
    $checked = (int) $checked;
    $filelevel = (int) $_POST['filelevel'];
    $classid = (int) $_POST['classid'];
    $rnd = make_password(20);
    $salt = make_password(8);
    $salt2 = make_password(20);
    $password = DoEmpireCMSAdminPassword($password, $salt, $salt2);
    $truename = ehtmlspecialchars($_POST['truename']);
    $email = ehtmlspecialchars($_POST['email']);
    $openip = ehtmlspecialchars($_POST['openip']);
    $addtime = time();
    $addip = egetip();
    $addipport = egetipport();
    $userprikey = make_password(48);
    $sql = $empire->query("insert into {$dbtbpre}enewsuser(username,password,rnd,groupid,adminclass,checked,styleid,filelevel,salt,loginnum,lasttime,lastip,truename,email,classid,addtime,addip,userprikey,salt2,lastipport,preipport,addipport) values('{$username}','{$password}','{$rnd}',{$groupid},'{$insert_class}',{$checked},{$styleid},'{$filelevel}','{$salt}',0,0,'','{$truename}','{$email}','{$classid}','{$addtime}','{$addip}','{$userprikey}','{$salt2}','{$addipport}','{$addipport}','{$addipport}');");
    $userid = $empire->lastid();
    //安全提问
    $equestion = (int) $_POST['equestion'];
    $eanswer = $_POST['eanswer'];
    if ($equestion) {
        if (!$eanswer) {
            printerror('EmptyEAnswer', '');
        }
        $eanswer = ReturnHLoginQuestionStr($userid, $username, $equestion, $eanswer);
    } else {
        $equestion = 0;
        $eanswer = '';
    }
    $empire->query("insert into {$dbtbpre}enewsuseradd(userid,equestion,eanswer,openip) values('{$userid}','{$equestion}','{$eanswer}','{$openip}');");
    if ($sql) {
        $cache_enews = 'douserinfo';
        $cache_ecmstourl = urlencode('user/AddUser.php?enews=AddUser' . hReturnEcmsHashStrHref2(0));
        $cache_mess = 'AddUserSuccess';
        $cache_uid = $userid;
        $cache_url = "../CreateCache.php?enews={$cache_enews}&uid={$cache_uid}&ecmstourl={$cache_ecmstourl}&mess={$cache_mess}" . hReturnEcmsHashStrHref2(0);
        //操作日志
        insert_dolog("userid=" . $userid . "<br>username=" . $username);
        //printerror("AddUserSuccess","AddUser.php?enews=AddUser".hReturnEcmsHashStrHref2(0));
        echo '<meta http-equiv="refresh" content="0;url=' . $cache_url . '">';
        db_close();
        $empire = null;
        exit;
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:81,代码来源:ListUser.php

示例10: PayApiBuyGroupPay

function PayApiBuyGroupPay($bgid, $money, $orderid, $userid, $username, $groupid, $ecms_paytype)
{
    global $empire, $dbtbpre, $level_r;
    $bgid = (int) $bgid;
    $userid = (int) $userid;
    $username = RepPostVar($username);
    $groupid = (int) $groupid;
    $ecms_paytype = RepPostVar($ecms_paytype);
    //验证是否重复提交
    $orderid = RepPostVar($orderid);
    $num = $empire->gettotal("select count(*) as total from {$dbtbpre}enewspayrecord where orderid='{$orderid}' limit 1");
    if ($num) {
        printerror('您已成功充值', '../../../', 1, 0, 1);
    }
    $buyr = $empire->fetch1("select * from {$dbtbpre}enewsbuygroup where id='{$bgid}'");
    if ($buyr['id'] && $money == $buyr['gmoney'] && $level_r[$buyr[buygroupid]][level] <= $level_r[$groupid][level]) {
        $money = (double) $money;
        //充值
        $user = $empire->fetch1("select " . eReturnSelectMemberF('userdate,userid,username') . " from " . eReturnMemberTable() . " where " . egetmf('userid') . "='{$userid}'");
        eAddFenToUser($buyr['gfen'], $buyr['gdate'], $buyr['ggroupid'], $buyr['gzgroupid'], $user);
        $posttime = date("Y-m-d H:i:s");
        $payip = egetip();
        $paybz = "充值类型:" . addslashes($buyr['gname']);
        $paybz = RepPostStr($paybz);
        $empire->query("insert into {$dbtbpre}enewspayrecord(id,userid,username,orderid,money,posttime,paybz,type,payip) values(NULL,'{$userid}','{$username}','{$orderid}','{$money}','{$posttime}','{$paybz}','{$ecms_paytype}','{$payip}');");
        //备份充值记录
        BakBuy($userid, $username, $buyr['gname'], $buyr['gfen'], $money, $buyr['gdate'], 1);
    }
    printerror('您已成功充值', '../../../', 1, 0, 1);
}
开发者ID:novnan,项目名称:meiju,代码行数:30,代码来源:payfun.php

示例11: egetip

                <td><a href="member/ListMember.php?sear=1&schecked=1"><?php 
echo $nomembernum;
?>
</a> 人</td>
              </tr>
              <tr> 
                <td height="23">过期广告:</td>
                <td><a href="tool/ListAd.php?time=1"><?php 
echo $outtimeadnum;
?>
</a> 个</td>
              </tr>
              <tr> 
                <td height="23">登陆者IP:</td>
                <td><?php 
echo egetip();
?>
</td>
              </tr>
              <tr> 
                <td height="23">程序版本:</td>
                <td> <a href="http://www.phome.net" target="_blank"><strong>EmpireCMS 
                  v<?php 
echo EmpireCMS_VERSION;
?>
</strong></a> <font color="#666666">(<?php 
echo EmpireCMS_LASTTIME;
?>
)</font></td>
              </tr>
              <tr>
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:main.php

示例12: DodoInfo

function DodoInfo($add, $ecms = 0)
{
    global $empire, $public_r, $emod_r, $level_r, $class_r, $dbtbpre, $fun_r;
    //验证来源
    if ($ecms == 0 || $ecms == 1) {
        CheckCanPostUrl();
    }
    //开启投稿
    if ($public_r['addnews_ok']) {
        printerror("CloseQAdd", "", 1);
    }
    //验证本时间允许操作
    eCheckTimeCloseDo('info');
    $classid = (int) $add['classid'];
    $mid = (int) $class_r[$classid]['modid'];
    if (!$mid || !$classid) {
        printerror("EmptyQinfoCid", "", 1);
    }
    $tbname = $emod_r[$mid]['tbname'];
    $qenter = $emod_r[$mid]['qenter'];
    if (!$tbname || !$qenter || $qenter == ',') {
        printerror("ErrorUrl", "history.go(-1)", 1);
    }
    $muserid = (int) getcvar('mluserid');
    $musername = RepPostVar(getcvar('mlusername'));
    $mrnd = RepPostVar(getcvar('mlrnd'));
    //取得栏目信息
    $isadd = 0;
    if ($ecms == 0) {
        $isadd = 1;
    }
    $setuserday = '';
    $cr = DoQCheckAddLevel($classid, $muserid, $musername, $mrnd, $ecms, $isadd);
    $setuserday = $cr['checkaddnumquery'];
    $filepass = (int) $add['filepass'];
    $id = (int) $add['id'];
    $infor = array();
    //组合标题属性
    $titlecolor = RepPostStr(RepPhpAspJspcodeText($add[titlecolor]));
    $titlefont = TitleFont($add[titlefont], $titlecolor);
    $titlecolor = "";
    $titlefont = "";
    $ttid = (int) $add['ttid'];
    $keyboard = addslashes(RepPostStr(trim(DoReplaceQjDh($add[keyboard]))));
    $keyid = '';
    //返回关键字组合
    if ($keyboard && strstr($qenter, ',special.field,')) {
        $keyboard = str_replace('[!--f--!]', 'ecms', $keyboard);
        $keyid = GetKeyid($keyboard, $classid, $id, $class_r[$classid][link_num]);
    }
    //验证码
    $keyvname = 'checkinfokey';
    //moreport
    if (Moreport_ReturnMustDt()) {
        define('ECMS_SELFPATH', eReturnEcmsMainPortPath());
        Moreport_ResetMainTempGid();
    }
    //-----------------增加
    if ($ecms == 0) {
        //时间
        $lasttime = getcvar('lastaddinfotime');
        if ($lasttime) {
            if (time() - $lasttime < $public_r['readdinfotime']) {
                printerror("QAddInfoOutTime", "", 1);
            }
        }
        //验证码
        if ($cr['qaddshowkey']) {
            ecmsCheckShowKey($keyvname, $add['key'], 1);
        }
        //IP发布数限制
        $check_ip = egetip();
        $check_checked = $cr['wfid'] ? 0 : $cr['checkqadd'];
        eCheckIpAddInfoNum($check_ip, $tbname, $mid, $check_checked);
        //返回字段
        $ret_r = ReturnQAddinfoF($mid, $add, $infor, $classid, $filepass, $muserid, $musername, 0);
        $checked = $cr['checkqadd'];
        $havehtml = 0;
        $newspath = date($cr['newspath']);
        $truetime = time();
        $newstime = $truetime;
        $newstempid = $cr['newstempid'];
        $haveaddfen = 0;
        //强制签发
        $isqf = 0;
        if ($cr['wfid']) {
            $checked = 0;
            $isqf = 1;
        }
        //增扣点
        if ($checked && $muserid) {
            AddInfoFen($cr['addinfofen'], $muserid);
            $haveaddfen = 1;
        }
        if (empty($muserid)) {
            $musername = $fun_r['guest'];
        }
        //会员投稿数更新
        if ($setuserday) {
            $empire->query($setuserday);
//.........这里部分代码省略.........
开发者ID:novnan,项目名称:meiju,代码行数:101,代码来源:qinfofun.php

示例13: AddPl


//.........这里部分代码省略.........
        if (!$r['ztid']) {
            printerror("ErrorUrl", "history.go(-1)", 1);
        }
        if ($r['closepl']) {
            printerror("CloseClassPl", "history.go(-1)", 1);
        }
        //审核
        if ($r['checkpl']) {
            $checked = 1;
        } else {
            $checked = 0;
        }
        $restb = $r['restb'];
        $pubid = '-' . $classid;
        $id = 0;
        $pagefunr = eReturnRewritePlUrl($classid, $id, 'dozt', 0, 0, 1);
        $returl = $pagefunr['pageurl'];
    } else {
        if (!trim($saytext) || !$id || !$classid) {
            printerror("EmptyPl", "history.go(-1)", 1);
        }
        //表存在
        if (empty($class_r[$classid][tbname])) {
            printerror("ErrorUrl", "history.go(-1)", 1);
        }
        //是否关闭评论
        $r = $empire->fetch1("select classid,stb,restb from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}' limit 1");
        if (!$r['classid'] || $r['classid'] != $classid) {
            printerror("ErrorUrl", "history.go(-1)", 1);
        }
        if ($class_r[$r[classid]][openpl]) {
            printerror("CloseClassPl", "history.go(-1)", 1);
        }
        //单信息关闭评论
        $pubid = ReturnInfoPubid($classid, $id);
        $finfor = $empire->fetch1("select closepl from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . "_data_" . $r['stb'] . " where id='{$id}' limit 1");
        if ($finfor['closepl']) {
            printerror("CloseInfoPl", "history.go(-1)", 1);
        }
        //审核
        if ($class_r[$classid][checkpl]) {
            $checked = 1;
        } else {
            $checked = 0;
        }
        $restb = $r['restb'];
        $pagefunr = eReturnRewritePlUrl($classid, $id, 'doinfo', 0, 0, 1);
        $returl = $pagefunr['pageurl'];
    }
    //设置参数
    $plsetr = $empire->fetch1("select pltime,plsize,plincludesize,plclosewords,plmustf,plf,plmaxfloor,plquotetemp from {$dbtbpre}enewspl_set limit 1");
    if (strlen($saytext) > $plsetr['plsize']) {
        $GLOBALS['setplsize'] = $plsetr['plsize'];
        printerror("PlSizeTobig", "history.go(-1)", 1);
    }
    $time = time();
    $saytime = $time;
    $pltime = getcvar('lastpltime');
    if ($pltime) {
        if ($time - $pltime < $plsetr['pltime']) {
            $GLOBALS['setpltime'] = $plsetr['pltime'];
            printerror("PlOutTime", "history.go(-1)", 1);
        }
    }
    $sayip = egetip();
    $eipport = egetipport();
    $username = str_replace("\r\n", "", $username);
    $username = RepPostStr($username);
    $saytext = nl2br(RepFieldtextNbsp(RepPostStr($saytext)));
    if ($repid) {
        $saytext = RepPlTextQuote($repid, $saytext, $plsetr, $restb);
        CkPlQuoteFloor($plsetr['plmaxfloor'], $saytext);
        //验证楼层
    }
    //过滤字符
    $saytext = ReplacePlWord($plsetr['plclosewords'], $saytext);
    if ($level_r[$mgroupid]['plchecked']) {
        $checked = 0;
    }
    $ret_r = ReturnPlAddF($add, $plsetr, 0);
    //主表
    $sql = $empire->query("insert into {$dbtbpre}enewspl_" . $restb . "(pubid,username,sayip,saytime,id,classid,checked,zcnum,fdnum,userid,isgood,saytext,eipport" . $ret_r['fields'] . ") values('{$pubid}','" . $username . "','{$sayip}','{$saytime}','{$id}','{$classid}','{$checked}',0,0,'{$muserid}',0,'" . addslashes($saytext) . "','{$eipport}'" . $ret_r['values'] . ");");
    $plid = $empire->lastid();
    if ($doaction != 'dozt') {
        //信息表加1
        $usql = $empire->query("update {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " set plnum=plnum+1 where id='{$id}' limit 1");
    }
    //更新新评论数
    DoUpdateAddDataNum('pl', $restb, 1);
    //设置最后发表时间
    $set1 = esetcookie("lastpltime", time(), time() + 3600 * 24);
    ecmsEmptyShowKey($keyvname);
    //清空验证码
    if ($sql) {
        $reurl = DoingReturnUrl($returl, $_POST['ecmsfrom']);
        printerror("AddPlSuccess", $reurl, 1);
    } else {
        printerror("DbError", "history.go(-1)", 1);
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:101,代码来源:plfun.php

示例14: egetip

?>
</a> 人</td>
              </tr>
              <tr> 
                <td height="23">过期广告:</td>
                <td><a href="tool/ListAd.php?time=1<?php 
echo $ecms_hashur['ehref'];
?>
"><?php 
echo $outtimeadnum;
?>
</a> 个</td>
              </tr>
              <tr> 
                <td height="23">登陆者IP:</td>
                <td><? echo egetip();?></td>
              </tr>
              <tr> 
                <td height="23">程序版本:</td>
                <td> <a href="http://www.phome.net" target="_blank"><strong>EmpireCMS 
                  v<?php 
echo EmpireCMS_VERSION;
?>
 Free</strong></a> <font color="#666666">(<?php 
echo EmpireCMS_LASTTIME;
?>
)</font></td>
              </tr>
              <tr>
                <td height="23">程序编码:</td>
                <td><?php 
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:main.php

示例15: AddPl


//.........这里部分代码省略.........
                    $cuser = 1;
                }
                if (empty($ur[$user_userid])) {
                    $cuser = 0;
                }
            } else {
                $ur = $empire->fetch1("select " . $user_userid . "," . $user_checked . "," . $user_group . " from " . $user_tablename . " where " . $user_username . "='{$utfusername}' and " . $user_password . "='{$password}' limit 1");
                $cuser = 0;
                if ($ur[$user_userid]) {
                    $cuser = 1;
                }
            }
            if (empty($cuser)) {
                printerror("FailPassword", "history.go(-1)", 1);
            }
            if ($ur[$user_checked] == 0) {
                printerror("NotCheckedUser", '', 1);
            }
            $muserid = $ur[$user_userid];
            $mgroupid = $ur[$user_group];
        } else {
            $muserid = 0;
        }
    }
    if ($public_r['plgroupid']) {
        if (!$muserid) {
            printerror("GuestNotToPl", "history.go(-1)", 1);
        }
        if ($level_r[$mgroupid][level] < $level_r[$public_r['plgroupid']][level]) {
            printerror("NotLevelToPl", "history.go(-1)", 1);
        }
    }
    if (!trim($saytext) || !$id || !$classid) {
        printerror("EmptyPl", "history.go(-1)", 1);
    }
    //表存在
    if (empty($class_r[$classid][tbname])) {
        printerror("ErrorUrl", "history.go(-1)", 1);
    }
    if (strlen($saytext) > $public_r[plsize]) {
        printerror("PlSizeTobig", "history.go(-1)", 1);
    }
    $saytime = date("Y-m-d H:i:s");
    $time = time();
    $pltime = getcvar('lastpltime');
    if ($pltime) {
        if ($time - $pltime < $public_r[pltime]) {
            printerror("PlOutTime", "history.go(-1)", 1);
        }
    }
    //是否关闭评论
    $r = $empire->fetch1("select classid,closepl from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " where id='{$id}' and classid='{$classid}'");
    if (empty($r[classid])) {
        printerror("ErrorUrl", "history.go(-1)", 1);
    }
    if ($class_r[$r[classid]][openpl]) {
        printerror("CloseClassPl", "history.go(-1)", 1);
    }
    //单信息关闭评论
    if ($r['closepl']) {
        printerror("CloseInfoPl", "history.go(-1)", 1);
    }
    $sayip = egetip();
    $username = RepPostStr($username);
    $username = str_replace("\r\n", "", $username);
    $saytext = nl2br(RepFieldtextNbsp(RepPostStr($saytext)));
    $pr = $empire->fetch1("select plclosewords,plf,plmustf,pldeftb from {$dbtbpre}enewspublic limit 1");
    if ($repid) {
        if (trim($saytext) == "[quote]" . $repid . "[/quote]") {
            printerror("EmptyPl", "history.go(-1)", 1);
        }
        $saytext = RepPlTextQuote($repid, $saytext, $pr);
    }
    //过滤字符
    $saytext = ReplacePlWord($pr['plclosewords'], $saytext);
    //审核
    if ($class_r[$classid][checkpl]) {
        $checked = 1;
    } else {
        $checked = 0;
    }
    $ret_r = ReturnPlAddF($add, $pr, 0);
    //主表
    $sql = $empire->query("insert into {$dbtbpre}enewspl(username,sayip,saytime,id,classid,checked,zcnum,fdnum,userid,isgood,stb) values('" . $username . "','{$sayip}','{$saytime}','{$id}','{$classid}','{$checked}',0,0,'{$muserid}',0,'{$pr['pldeftb']}');");
    $plid = $empire->lastid();
    //副表
    $fsql = $empire->query("insert into {$dbtbpre}enewspl_data_" . $pr['pldeftb'] . "(plid,classid,id,saytext" . $ret_r['fields'] . ") values('{$plid}','{$classid}','{$id}','" . addslashes($saytext) . "'" . $ret_r['values'] . ");");
    //信息表加1
    $usql = $empire->query("update {$dbtbpre}ecms_" . $class_r[$classid][tbname] . " set plnum=plnum+1 where id='{$id}'");
    //设置最后发表时间
    $set1 = esetcookie("lastpltime", time(), time() + 3600 * 24);
    ecmsEmptyShowKey($keyvname);
    //清空验证码
    if ($sql) {
        $reurl = DoingReturnUrl("../pl/?classid={$classid}&id={$id}", $_POST['ecmsfrom']);
        printerror("AddPlSuccess", $reurl, 1);
    } else {
        printerror("DbError", "history.go(-1)", 1);
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:101,代码来源:plfun.php


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