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


PHP System::load_app_class方法代码示例

本文整理汇总了PHP中System::load_app_class方法的典型用法代码示例。如果您正苦于以下问题:PHP System::load_app_class方法的具体用法?PHP System::load_app_class怎么用?PHP System::load_app_class使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System的用法示例。


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

示例1: insert

 public function insert()
 {
     $msg = array();
     $path = isset($_POST['path']) ? _encrypt($_POST['path'], 'DECODE') : '';
     $size = isset($_POST['size']) ? _encrypt($_POST['size'], 'DECODE') : 0;
     $type = isset($_POST['type']) ? _encrypt($_POST['type'], 'DECODE') : 'image';
     $type = explode(',', $this->getUPtype($type, true));
     $watermark = $_POST['iswatermark'] == "true" ? "yes" : "no";
     if (!is_dir(G_UPLOAD . $path)) {
         $msg['ok'] = 'no';
         $msg['text'] = $path . "文件夹不存在";
         echo json_encode($msg);
         exit;
     }
     System::load_app_class("admin", G_ADMIN_DIR, "no");
     $admincheck = admin::StaticCheckAdminInfo() ? 1 : 0;
     if (is_array($_FILES['Filedata'])) {
         System::load_sys_class('upload', 'sys', 'no');
         upload::upload_config($type, $size, $path);
         upload::go_upload($_FILES['Filedata'], $watermark);
         if (!upload::$ok) {
             $msg['ok'] = 'no';
             $msg['text'] = upload::$error;
         } else {
             $msg['ok'] = 'yes';
             $msg['text'] = $path . '/' . upload::$filedir . "/" . upload::$filename;
         }
         echo json_encode($msg);
     }
 }
开发者ID:think-css,项目名称:yungou,代码行数:30,代码来源:uploadify.action.php

示例2: image

 public function image()
 {
     $style = $this->segment(4);
     $cun_type = $this->segment(5);
     if ($cun_type == 'cookie' || $cun_type == 'session') {
         $cun_type = $this->segment(5);
     } else {
         $cun_type = 'cookie';
     }
     $style = explode("_", $style);
     $width = isset($style[0]) ? intval($style[0]) : '';
     $height = isset($style[1]) ? intval($style[1]) : '';
     $color = isset($style[2]) ? $style[2] : '';
     $bgcolor = isset($style[3]) ? $style[3] : '';
     $lenght = isset($style[4]) ? intval($style[4]) : '';
     $type = isset($style[5]) ? intval($style[5]) : '';
     $checkcode = System::load_app_class("checkcodeimg");
     $checkcode->config($width, $height, $color, $bgcolor, $lenght, $type);
     if (isset($_GET['dian'])) {
         $checkcode->dian(50, $color);
     }
     if ($cun_type == 'cookie') {
         _setcookie("checkcode", md5($checkcode->code));
     }
     if ($cun_type == 'session') {
         _session_start();
         $_SESSION['checkcode'] = md5($checkcode->code);
     }
     $checkcode->image();
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:30,代码来源:checkcode.action.php

示例3: goods_user_go

 private function goods_user_go($uid = null, $gid = null, $num = null)
 {
     System::load_sys_fun('user');
     $good_info = $gid;
     $gid = $good_info['id'];
     $uinfo = $uid;
     $uid = $uinfo['uid'];
     $gtitle = $good_info['title'];
     $utitle = get_user_name($uinfo);
     $paydb = System::load_app_class('pay', 'pay');
     $number = $num;
     $reg = $paydb->pay_user_go_shop($uid, $gid, $number);
     if ($reg) {
         $specify = $this->db->GetOne("select * from `@#_goodspecify` where `gid` = '{$gid}' and `uid` = '{$uid}'");
         if ($specify) {
             $number = $specify['num'] + $number;
             $this->db->Query("UPDATE `@#_goodspecify` SET `num` = '{$number}' where `id` = '{$specify['id']}'");
         } else {
             $inster = $this->db->Query("INSERT INTO `@#_goodspecify` (`uid`,`gid`,`num`,`utitle`,`gtitle`) VALUES ('{$uid}','{$gid}','{$number}','{$utitle}','{$gtitle}')");
             if (!$inster) {
                 _message("商品购买成功但准备会员插入失败!");
             }
         }
     }
     return $reg;
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:26,代码来源:goodspecify.action.php

示例4: get_user_go_code

 private function get_user_go_code()
 {
     if (file_exists(G_SYSTEM . 'modules/goodspecify/lib/' . 'itocode.class.php')) {
         $itocode = System::load_app_class("itocode", "goodspecify");
         $itocode->go_itocode($this->shop, $this->go_code, $this->go_content, $this->count_time);
     }
     $this->get_code_user_html();
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:8,代码来源:tocode.class.php

示例5: pay_insert_shop

function pay_insert_shop($shop = '', $type = '')
{
    $time = sprintf("%.3f", microtime(true) + (int) System::load_sys_config('system', 'goods_end_time'));
    $db = System::load_sys_class("model");
    if ($shop['xsjx_time'] != '0') {
        return $db->Query("UPDATE `@#_shoplist` SET `canyurenshu`=`zongrenshu`,\t`shenyurenshu` = '0' where `id` = '{$shop['id']}'");
    }
    $tocode = System::load_app_class("tocode", "pay");
    $tocode->shop = $shop;
    $tocode->run_tocode($time, 100, $shop['canyurenshu'], $shop);
    $code = $tocode->go_code;
    $content = $tocode->go_content;
    $counttime = $tocode->count_time;
    $u_go_info = $db->GetOne("select * from `@#_member_go_record` where `shopid` = '{$shop['id']}' and `shopqishu` = '{$shop['qishu']}' and `goucode` LIKE  '%{$code}%'");
    $u_info = $db->GetOne("select * from `@#_member` where `uid` = '{$u_go_info['uid']}'");
    $q_user = serialize($u_info);
    //更新商品
    $query = true;
    if ($u_info) {
        $gtimes = (int) System::load_sys_config('system', 'goods_end_time');
        if ($gtimes == 0 || $gtimes == 1) {
            $q_showtime = 'N';
        } else {
            $q_showtime = 'Y';
        }
        $q = $db->Query("UPDATE `@#_shoplist` SET \n\t\t\t\t\t\t\t`canyurenshu`=`zongrenshu`,\n\t\t\t\t\t\t\t`shenyurenshu` = '0',\n\t\t\t\t\t\t\t`q_uid` = '{$u_info['uid']}',\n\t\t\t\t\t\t\t`q_user` = '{$q_user}',\n\t\t\t\t\t\t\t`q_user_code` = '{$code}',\n\t\t\t\t\t\t\t`q_content`\t= '{$content}',\n\t\t\t\t\t\t\t`q_counttime` ='{$counttime}',\n\t\t\t\t\t\t\t`q_end_time` = '{$time}',\n\t\t\t\t\t\t\t`q_showtime` = '{$q_showtime}'\n\t\t\t\t\t\t\t where `id` = '{$shop['id']}'");
        if (!$q) {
            $query = false;
        }
        $q = $db->Query("UPDATE `@#_member_go_record` SET `huode` = '{$code}' where `id` = '{$u_go_info['id']}' and `code` = '{$u_go_info['code']}' and `uid` = '{$u_go_info['uid']}' and `shopid` = '{$shop['id']}' and `shopqishu` = '{$shop['qishu']}'");
        if (!$q) {
            $query = false;
        }
        $post_arr = array("uid" => $u_info['uid'], "gid" => $shop['id'], "send" => 1);
        _g_triggerRequest(WEB_PATH . '/api/send/send_shop_code', false, $post_arr);
    }
    /******************************/
    //新建
    if ($shop['qishu'] < $shop['maxqishu']) {
        $time = time();
        System::load_app_fun("content", G_ADMIN_DIR);
        $goods = $shop;
        $qishu = $goods['qishu'] + 1;
        $shenyurenshu = $goods['zongrenshu'] - $goods['def_renshu'];
        $query_table = content_get_codes_table();
        $q = $db->Query("INSERT INTO `@#_shoplist` (`sid`,`cateid`, `brandid`, `title`, `title_style`, `title2`, `keywords`, `description`, `money`, `yunjiage`, `zongrenshu`, `canyurenshu`,`shenyurenshu`,`def_renshu`, `qishu`,`maxqishu`,`thumb`, `picarr`, `content`,`codes_table`,`xsjx_time`,`renqi`,`pos`, `time`)\n\t\t\t\tVALUES\n\t\t\t\t('{$goods['sid']}','{$goods['cateid']}','{$goods['brandid']}','{$goods['title']}','{$goods['title_style']}','{$goods['title2']}','{$goods['keywords']}','{$goods['description']}','{$goods['money']}','{$goods['yunjiage']}','{$goods['zongrenshu']}','{$goods['def_renshu']}','{$shenyurenshu}','{$goods['def_renshu']}','{$qishu}','{$goods['maxqishu']}','{$goods['thumb']}','{$goods['picarr']}','{$goods['content']}','{$query_table}','{$goods['xsjx_time']}','{$goods['renqi']}','{$goods['pos']}','{$time}')\n\t\t\t\t");
        if (!$q) {
            return $query;
        }
        $id = $db->insert_id();
        $q = content_get_go_codes($goods['zongrenshu'], 3000, $id);
        if (!$q) {
            return $query;
        }
    }
    return $query;
}
开发者ID:kevins1022,项目名称:YunGouCMS,代码行数:57,代码来源:pay.fun.php

示例6: __construct

 public function __construct()
 {
     #                      奖项     说明     红包价格   概率
     $this->prize[] = array('七等奖', '5元红包', 5, array(800, 1000));
     $this->prize[] = array('六等奖', '10元红包', 10, array(180, 1000));
     $this->prize[] = array('五等奖', '20元红包', 20, array(10, 1000));
     $this->prize[] = array('四等奖', '50元红包', 50, array(7, 1000));
     $this->prize[] = array('三等奖', '100元红包', 100, array(2, 1000));
     $this->prize[] = array('二等奖', '150元红包', 150, array(1, 1000));
     $this->prize[] = array('一等奖', '1111元红包', 1111, array(0, 0));
     $this->db = System::load_sys_class("model");
     $this->userinfo = System::load_app_class('base', 'member')->get_user_info();
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:13,代码来源:lottery.action.php

示例7: uidcookie

function uidcookie($get_name = null)
{
    $member = System::load_app_class("base", "member");
    $member = $member->get_user_info();
    if (!$member) {
        return false;
    }
    if (isset($member[$get_name])) {
        return $member[$get_name];
    } else {
        return null;
    }
}
开发者ID:ping199143,项目名称:1ydb,代码行数:13,代码来源:user.fun.php

示例8: ekepay_chuli

 private function ekepay_chuli()
 {
     $pay_type = $this->db->GetOne("SELECT * from `@#_pay` where `pay_class` = 'ekepay' and `pay_start` = '1'");
     $out_trade_no = $this->out_trade_no;
     $this->db->Autocommit_start();
     $dingdaninfo = $this->db->GetOne("select * from `@#_member_addmoney_record` where `code` = '{$out_trade_no}' for update");
     if (!$dingdaninfo) {
         return false;
     }
     //没有该订单,失败
     if ($dingdaninfo['status'] == '已付款') {
         return '已付款';
     }
     $c_money = intval($dingdaninfo['money']);
     $uid = $dingdaninfo['uid'];
     $time = time();
     $up_q1 = $this->db->Query("UPDATE `@#_member_addmoney_record` SET `pay_type` = '点卡支付', `status` = '已付款' where `id` = '{$dingdaninfo['id']}' and `code` = '{$dingdaninfo['code']}'");
     $up_q2 = $this->db->Query("UPDATE `@#_member` SET `money` = `money` + {$c_money} where (`uid` = '{$uid}')");
     $up_q3 = $this->db->Query("INSERT INTO `@#_member_account` (`uid`, `type`, `pay`, `content`, `money`, `time`) VALUES ('{$uid}', '1', '账户', '充值', '{$c_money}', '{$time}')");
     if ($up_q1 && $up_q2 && $up_q3) {
         $this->db->Autocommit_commit();
     } else {
         $this->db->Autocommit_rollback();
         return '充值失败';
     }
     if (empty($dingdaninfo['scookies'])) {
         return "充值完成";
         //充值完成
     }
     $scookies = unserialize($dingdaninfo['scookies']);
     $pay = System::load_app_class('pay', 'pay');
     $pay->scookie = $scookies;
     $ok = $pay->init($uid, $pay_type['pay_id'], 'go_record');
     //闪购商品
     if ($ok != 'ok') {
         $_COOKIE['Cartlist'] = '';
         _setcookie('Cartlist', NULL);
         return '商品购买失败';
         //商品购买失败
     }
     $check = $pay->go_pay(1);
     if ($check) {
         $this->db->Query("UPDATE `@#_member_addmoney_record` SET `scookies` = '1' where `code` = '{$out_trade_no}' and `status` = '已付款'");
         $_COOKIE['Cartlist'] = '';
         _setcookie('Cartlist', NULL);
         return "商品购买成功";
     } else {
         return '商品购买失败';
     }
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:50,代码来源:ekepay_url.action.php

示例9: image

 public function image()
 {
     $style = $this->segment(4);
     $style = explode("_", $style);
     $width = isset($style[0]) ? intval($style[0]) : '';
     $height = isset($style[1]) ? intval($style[1]) : '';
     $color = isset($style[2]) ? $style[2] : '';
     $bgcolor = isset($style[3]) ? $style[3] : '';
     $lenght = isset($style[4]) ? intval($style[4]) : '';
     $type = isset($style[5]) ? intval($style[5]) : '';
     $checkcode = System::load_app_class("checkcodeimg");
     $checkcode->config($width, $height, $color, $bgcolor, $lenght, $type);
     if (isset($_GET['dian'])) {
         $checkcode->dian(50, $color);
     }
     _setcookie("checkcode", md5($checkcode->code));
     $checkcode->image();
 }
开发者ID:king3388,项目名称:king,代码行数:18,代码来源:checkcode.action.php

示例10: defined

<?php

defined('G_IN_SYSTEM') or exit('No permission resources.');
System::load_app_class('base', null, 'no');
System::load_app_fun('user', 'go');
System::load_app_fun('my', 'go');
class finduser extends SystemAction
{
    public function __construct()
    {
    }
    //找回密码
    public function findpassword()
    {
        if (isset($_POST['submit'])) {
            $name = isset($_POST['name']) ? $_POST['name'] : "";
            $txtRegSN = strtoupper($_POST['txtRegSN']);
            if (md5($txtRegSN) != _getcookie('checkcode')) {
                _message("验证码错误");
            }
            $regtype = null;
            if (_checkmobile($name)) {
                $regtype = 'mobile';
            }
            if (_checkemail($name)) {
                $regtype = 'email';
            }
            if ($regtype == null) {
                _message("帐号类型不正确!", null, 3);
            }
            $info = $this->DB()->GetOne("SELECT * FROM `@#_member` WHERE {$regtype} = '{$name}' LIMIT 1");
开发者ID:king3388,项目名称:king,代码行数:31,代码来源:finduser.action.php

示例11: defined

<?php

defined('G_IN_SYSTEM') or exit('no');
System::load_app_class('admin', '', 'no');
class brand extends admin
{
    private $db;
    public function __construct()
    {
        parent::__construct();
        $this->db = System::load_sys_class("model");
        $this->ment = array(array("lists", "品牌管理", ROUTE_M . '/' . ROUTE_C . "/lists"), array("insert", "添加品牌", ROUTE_M . '/' . ROUTE_C . "/insert"));
    }
    //品牌管理
    public function lists()
    {
        $page = System::load_sys_class("page");
        $num = 20;
        $total = $this->db->GetCount("select * from `@#_brand` where 1");
        if (isset($_GET['p'])) {
            $pagenum = intval($_GET['p']);
        } else {
            $pagenum = 1;
        }
        $page->config($total, $num, $pagenum);
        $brands = $this->db->GetPage("select * from `@#_brand` where 1 order by `order` DESC", array('key' => 'id', 'num' => $num, "page" => $pagenum));
        $categorys = $this->db->GetList("SELECT * FROM `@#_category` WHERE 1 order by `parentid` ASC,`cateid` ASC", array('key' => 'cateid'));
        include $this->tpl(ROUTE_M, 'brand.list');
    }
    //品牌管理入库
    public function insert()
开发者ID:haidao17,项目名称:backend,代码行数:31,代码来源:brand.action.php

示例12: houtai

 public function houtai()
 {
     $pay_type = $this->db->GetOne("SELECT * from `@#_pay` where `pay_class` = 'ecpss' and `pay_start` = '1'");
     $pay_type_key = unserialize($pay_type['pay_key']);
     $MD5key = $pay_type_key['key']['val'];
     //订单号
     $BillNo = $out_trade_no = $_POST["BillNo"];
     //金额
     $Amount = $_POST["Amount"];
     //支付状态
     $Succeed = $_POST["Succeed"];
     //支付结果
     $Result = $_POST["Result"];
     //取得的MD5校验信息
     $MD5info = $_POST["MD5info"];
     //校验源字符串
     $md5src = $BillNo . $Amount . $Succeed . $MD5key;
     //MD5检验结果
     $md5sign = strtoupper(md5($md5src));
     if ($MD5info == $md5sign) {
         if ($Succeed == 88) {
             $dingdaninfo = $this->db->GetOne("select * from `@#_member_addmoney_record` where `code` = '{$out_trade_no}' and `status` = '未付款'");
             if (!$dingdaninfo) {
                 echo "fail";
                 exit;
             }
             //没有该订单,失败
             $c_money = intval($dingdaninfo['money']);
             $uid = $dingdaninfo['uid'];
             $time = time();
             $this->db->Autocommit_start();
             $up_q1 = $this->db->Query("UPDATE `@#_member_addmoney_record` SET `pay_type` = '汇潮支付', `status` = '已付款' where `id` = '{$dingdaninfo['id']}' and `code` = '{$dingdaninfo['code']}'");
             $up_q2 = $this->db->Query("UPDATE `@#_member` SET `money` = `money` + {$c_money} where (`uid` = '{$uid}')");
             $up_q3 = $this->db->Query("INSERT INTO `@#_member_account` (`uid`, `type`, `pay`, `content`, `money`, `time`) VALUES ('{$uid}', '1', '账户', '充值', '{$c_money}', '{$time}')");
             if ($up_q1 && $up_q2 && $up_q3) {
                 $this->db->Autocommit_commit();
             } else {
                 $this->db->Autocommit_rollback();
                 echo "fail";
                 exit;
             }
             if (empty($dingdaninfo['scookies'])) {
                 echo "success";
                 exit;
                 //充值完成
             }
             $scookies = unserialize($dingdaninfo['scookies']);
             $pay = System::load_app_class('pay', 'pay');
             $pay->scookie = $scookies;
             $ok = $pay->init($uid, $pay_type['pay_id'], 'go_record');
             //V购商品
             if ($ok != 'ok') {
                 _setcookie('Cartlist', NULL);
                 echo "fail";
                 exit;
                 //商品购买失败
             }
             $check = $pay->go_pay(1);
             if ($check) {
                 $this->db->Query("UPDATE `@#_member_addmoney_record` SET `scookies` = '1' where `code` = '{$out_trade_no}' and `status` = '已付款'");
                 _setcookie('Cartlist', NULL);
                 echo "ok";
                 exit;
             } else {
                 echo "fail";
                 exit;
             }
         }
     } else {
         echo "交易信息被篡改";
     }
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:72,代码来源:ecpss_url.action.php

示例13: addmoney_record

 private function addmoney_record($money = null, $data = null)
 {
     $uid = $this->members['uid'];
     $dingdancode = pay_get_dingdan_code('C');
     //订单号
     if (!is_array($this->pay_type)) {
         return 'not_pay';
     }
     $pay_type = $this->pay_type['pay_name'];
     $time = time();
     if (!empty($data)) {
         $scookies = $data;
     } else {
         $scookies = '0';
     }
     $score = $this->fufen;
     $query = $this->db->Query("INSERT INTO `@#_member_addmoney_record` (`uid`, `code`, `money`, `pay_type`, `status`,`time`,`score`,`scookies`) VALUES ('{$uid}', '{$dingdancode}', '{$money}', '{$pay_type}','未付款', '{$time}','{$score}','{$scookies}')");
     if ($query) {
         $this->db->Autocommit_commit();
     } else {
         $this->db->Autocommit_rollback();
         return false;
     }
     $pay_type = $this->pay_type;
     $paydb = System::load_app_class($pay_type['pay_class'], 'pay');
     $pay_type['pay_key'] = unserialize($pay_type['pay_key']);
     $config = array();
     $config['id'] = $pay_type['pay_key']['id']['val'];
     //支付合作ID
     $config['key'] = $pay_type['pay_key']['key']['val'];
     //支付KEY
     $config['shouname'] = _cfg('web_name');
     //收款方
     $config['title'] = _cfg('web_name');
     //付款项目
     $config['money'] = $money;
     //付款金额$money
     $config['type'] = $pay_type['pay_type'];
     //支付方式:	即时到帐1   中介担保2
     $config['ReturnUrl'] = G_WEB_PATH . '/index.php/pay/' . $pay_type['pay_class'] . '_url/qiantai/';
     //前台回调
     $config['NotifyUrl'] = G_WEB_PATH . '/index.php/pay/' . $pay_type['pay_class'] . '_url/houtai/';
     //后台回调
     $config['pay_bank'] = $this->pay_type['pay_bank'];
     $config['code'] = $dingdancode;
     $config['pay_type_data'] = $pay_type['pay_key'];
     $paydb->config($config);
     $paydb->send_pay();
     return true;
 }
开发者ID:shuay,项目名称:projectYG,代码行数:50,代码来源:pay.class.php

示例14: houtai

 public function houtai()
 {
     $pay_type = $this->db->GetOne("SELECT * from `@#_pay` where `pay_class` = 'tenpay' and `pay_start` = '1'");
     $pay_type_key = unserialize($pay_type['pay_key']);
     $key = $pay_type_key['key']['val'];
     //支付KEY
     $partner = $pay_type_key['id']['val'];
     //支付商号ID
     /* 创建支付应答对象 */
     $resHandler = new ResponseHandler();
     $resHandler->setKey($key);
     //判断签名
     if (!$resHandler->isTenpaySign()) {
         echo "认证签名失败";
         exit;
     }
     //通知ID
     $notify_id = $resHandler->getParameter("notify_id");
     //通过通知ID查询,确保通知来至财付通
     //创建查询请求
     $queryReq = new RequestHandler();
     $queryReq->init();
     $queryReq->setKey($key);
     $queryReq->setGateUrl("https://gw.tenpay.com/gateway/simpleverifynotifyid.xml");
     $queryReq->setParameter("partner", $partner);
     $queryReq->setParameter("notify_id", $notify_id);
     //通信对象
     $httpClient = new TenpayHttpClient();
     $httpClient->setTimeOut(5);
     //设置请求内容
     $httpClient->setReqContent($queryReq->getRequestURL());
     //后台调用
     if ($httpClient->call()) {
         //设置结果参数
         $queryRes = new ClientResponseHandler();
         $queryRes->setContent($httpClient->getResContent());
         $queryRes->setKey($key);
     } else {
         echo "通信失败";
         exit;
     }
     //及时到账
     if ($resHandler->getParameter("trade_mode") == "1") {
         //只有签名正确,retcode为0,trade_state为0才是支付成功
         if ($queryRes->isTenpaySign() && $queryRes->getParameter("retcode") == "0" && $resHandler->getParameter("trade_state") == "0") {
             //log_result("即时到帐验签ID成功");
             //取结果参数做业务处理
             $out_trade_no = $resHandler->getParameter("out_trade_no");
             //财付通订单号
             $transaction_id = $resHandler->getParameter("transaction_id");
             //金额,以分为单位
             $total_fee = $resHandler->getParameter("total_fee");
             //如果有使用折扣券,discount有值,total_fee+discount=原请求的total_fee
             $discount = $resHandler->getParameter("discount");
             //------------------------------
             //处理业务开始
             //------------------------------
             //处理数据库逻辑
             //注意交易单不要重复处理
             //注意判断返回金额
             $total_fee_t = $total_fee / 100;
             $this->db->Autocommit_start();
             $dingdaninfo = $this->db->GetOne("select * from `@#_member_addmoney_record` where `code` = '{$out_trade_no}' and `money` = '{$total_fee_t}' and `status` = '未付款' for update");
             if (!$dingdaninfo) {
                 echo "fail";
                 exit;
             }
             $time = time();
             $up_q1 = $this->db->Query("UPDATE `@#_member_addmoney_record` SET `pay_type` = '财付通', `status` = '已付款' where `id` = '{$dingdaninfo['id']}' and `code` = '{$dingdaninfo['code']}'");
             $up_q2 = $this->db->Query("UPDATE `@#_member` SET `money` = `money` + {$total_fee_t} where (`uid` = '{$dingdaninfo['uid']}')");
             $up_q3 = $this->db->Query("INSERT INTO `@#_member_account` (`uid`, `type`, `pay`, `content`, `money`, `time`) VALUES ('{$dingdaninfo['uid']}', '1', '账户', '充值', '{$total_fee_t}', '{$time}')");
             if ($up_q1 && $up_q2 && $up_q3) {
                 $this->db->Autocommit_commit();
             } else {
                 $this->db->Autocommit_rollback();
                 echo "fail";
                 exit;
             }
             if (empty($dingdaninfo['scookies'])) {
                 echo "success";
                 exit;
             }
             $uid = $dingdaninfo['uid'];
             $scookies = unserialize($dingdaninfo['scookies']);
             $pay = System::load_app_class('pay', 'pay');
             $pay->scookie = $scookies;
             $ok = $pay->init($uid, $pay_type['pay_id'], 'go_record');
             //闪购商品
             if ($ok != 'ok') {
                 _setcookie('Cartlist', NULL);
                 echo "fail";
                 exit;
                 //商品购买失败
             }
             $check = $pay->go_pay(1);
             if ($check) {
                 $this->db->Query("UPDATE `@#_member_addmoney_record` SET `scookies` = '1' where `code` = '{$out_trade_no}' and `status` = '已付款'");
                 _setcookie('Cartlist', NULL);
                 echo "success";
                 exit;
//.........这里部分代码省略.........
开发者ID:ping199143,项目名称:1ydb,代码行数:101,代码来源:tenpay_url.action.php

示例15: defined

<?php

defined('G_IN_SYSTEM') or exit('no');
System::load_app_class('admin', G_ADMIN_DIR, 'no');
class user extends admin
{
    private $db;
    protected $ment;
    public function __construct()
    {
        parent::__construct();
        $this->db = System::load_sys_class("model");
        $this->ment = array(array("lists", "管理员管理", ROUTE_M . '/' . ROUTE_C . "/lists"), array("reg", "添加管理员", ROUTE_M . '/' . ROUTE_C . "/reg"), array("edit", "修改管理员", ROUTE_M . '/' . ROUTE_C . "/reg", 'hide'));
    }
    public function reg()
    {
        function randomkeys($length)
        {
            $pattern = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLOMNOPQRSTUVWXYZ';
            for ($i = 0; $i < $length; $i++) {
                $key .= $pattern[mt_rand(0, 35)];
                //生成php随机数
            }
            return $key;
        }
        if (isset($_POST['submit-1'])) {
            $username = safe_replace($_POST['username']);
            if ($username != $_POST['username'] || empty($username)) {
                _message("用户名格式错误!");
            }
            if (_strlen($username) > 15) {
开发者ID:ping199143,项目名称:1ydb,代码行数:31,代码来源:user.action.php


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