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


PHP System::load_app_fun方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     System::load_app_fun('global', G_ADMIN_DIR);
     $this->db = $this->DB('category_model', ROUTE_M);
     $this->ment = array(array("lists", "栏目管理", ROUTE_M . '/' . ROUTE_C . "/lists"), array("addcate", "添加栏目", ROUTE_M . '/' . ROUTE_C . "/addcate/def"), array("addcate", "添加单网页", ROUTE_M . '/' . ROUTE_C . "/addcate/danweb"), array("addcate", "添加外部链接", ROUTE_M . '/' . ROUTE_C . "/addcate/link"));
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:7,代码来源:category.action.php

示例2: defined

<?php

defined('G_IN_SYSTEM') or exit('No permission resources.');
System::load_app_fun("pay", "pay");
System::load_sys_fun("user");
System::load_app_class("tocode", "pay", 'no');
class pay
{
    private $db;
    private $members;
    //会员信息
    private $MoenyCount;
    //商品总金额
    private $shops;
    //商品信息
    private $pay_type;
    //支付类型
    private $fukuan_type;
    //付款类型 买商品 充值
    private $dingdan_query = true;
    //订单的	mysql_qurey 结果
    public $pay_type_bank = false;
    public $scookie = null;
    public $fufen = 0;
    public $fufen_to_money = 0;
    //初始化类数据
    //$addmoney 充值金额
    public function init($uid = null, $pay_type = null, $fukuan_type = '', $addmoney = '')
    {
        $this->db = System::load_sys_class('model');
        $this->db->Autocommit_start();
开发者ID:shuay,项目名称:projectYG,代码行数:31,代码来源:pay.class.php

示例3: defined

<?php

defined('G_IN_SYSTEM') or exit('No permission resources.');
System::load_app_fun('my', 'home');
System::load_app_fun('user', 'home');
class ad extends SystemAction
{
    public function __construct()
    {
    }
    public function get_ad()
    {
        //$mysql_model=System::load_sys_class('model');
        echo 'test';
    }
}
开发者ID:ping199143,项目名称:1ydb,代码行数:16,代码来源:ad.action.php

示例4: defined

<?php

defined('G_IN_SYSTEM') or exit('No permission resources.');
System::load_app_class('base', 'member', 'no');
System::load_app_fun('my');
System::load_app_fun('user');
System::load_sys_fun('user');
class index extends base
{
    public function __construct()
    {
        parent::__construct();
        //通过用户IP获得具体的城市
        $ip = $_SERVER['REMOTE_ADDR'];
        $info = GetIpLookup('123.125.114.144');
        $city = $info['city'];
        $this->db = System::load_sys_class('model');
    }
    public function init()
    {
        /* templet2专用数据设置start */
        //下拉导航
        $isindex = 'Y';
        /* templet2专用数据设置end */
        //最新商品
        $new_shop = $this->db->GetOne("select * from `@#_shoplist` where `pos` = '1' and `q_uid` is null ORDER BY `id` DESC LIMIT 4");
        //奢侈品 cat_id=5
        $new_goods = $this->db->GetList("select * from `@#_shoplist` where `q_uid` is null and `cateid`=5 ORDER BY `id` ASC LIMIT 8");
        //精品电器cateid=13
        $electrical_goods = $this->db->GetList("select * from `@#_shoplist` where `q_uid` is null and `cateid`=13 ORDER BY `id` DESC LIMIT 6");
        //汽车配件cateid=6
开发者ID:think-css,项目名称:yungou,代码行数:31,代码来源:index.action.php

示例5: defined

<?php

defined('G_IN_SYSTEM') or exit('no');
System::load_app_class('admin', NULL, 'no');
System::load_app_fun('global');
System::load_sys_fun('user');
class qishu extends admin
{
    private $db;
    public function __construct()
    {
        parent::__construct();
        $this->db = System::load_app_model('admin_model');
        $this->ment = array(array("lists", "商品列表", ROUTE_M . "/content/goods_list"));
    }
    //期数列表
    public function qishu_list()
    {
        $shopid = intval($this->segment(4));
        $info = $this->db->GetOne("select * from `@#_shoplist` where `id` = '{$shopid}' LIMIT 1");
        $num = 20;
        $total = $this->db->GetCount("select * from `@#_shoplist` where `sid` = '{$info['sid']}'");
        $page = System::load_sys_class('page');
        if (isset($_GET['p'])) {
            $pagenum = $_GET['p'];
        } else {
            $pagenum = 1;
        }
        $page->config($total, $num, $pagenum, "0");
        if ($pagenum > $page->page) {
            $pagenum = $page->page;
开发者ID:haidao17,项目名称:backend,代码行数:31,代码来源:qishu.action.php

示例6: defined

<?php

defined('G_IN_SYSTEM') or exit('No permission resources.');
System::load_sys_fun('user');
System::load_app_fun('user');
System::load_app_fun('my');
class goods extends SystemAction
{
    private $db;
    public function __construct()
    {
        $this->db = System::load_sys_class('model');
    }
    public function init()
    {
    }
    /*所有参与记录*/
    public function go_record_ifram()
    {
        $gid = (int) $this->segment(4);
        $len = (int) $this->segment(5);
        if ($len < 10) {
            $len = 10;
        }
        $page = System::load_sys_class('page');
        $total = $this->db->GetCount("SELECT * FROM `@#_member_go_record` WHERE `shopid` = '{$gid}'");
        if (isset($_GET['p'])) {
            $pagenum = (int) $_GET['p'];
        } else {
            $pagenum = 1;
        }
开发者ID:think-css,项目名称:yungou,代码行数:31,代码来源:goods.action.php

示例7: defined

<?php

defined('G_IN_SYSTEM') or exit('no');
System::load_app_fun('global', G_ADMIN_DIR);
System::load_app_class("admin", G_ADMIN_DIR, "no");
class set extends admin
{
    private $db;
    private $categorys;
    private $pay;
    private $autodir = "header";
    #模块文件名
    public function __construct()
    {
        $this->db = System::load_sys_class("model");
        $this->categorys = $this->db->GetList("SELECT * FROM `@#_category` WHERE 1 order by `parentid` ASC,`cateid` ASC", array('key' => 'cateid'));
        $this->pay = System::load_app_class("pay", "pay");
    }
    #操作界面显示
    public function index()
    {
        parent::__construct();
        $this->db = System::load_sys_class('model');
        $html_type = $this->db->GetList("select * from `@#_header`");
        if (isset($_POST['dosubmit'])) {
            $m_reg_temp = $_POST['html'];
            $q_1 = $this->db->Query("UPDATE `@#_header` SET `html`='{$m_reg_temp}'");
            if ($q_1) {
                _message("更新成功!");
            } else {
                _message("更新失败!");
开发者ID:ping199143,项目名称:1ydb,代码行数:31,代码来源:set.action.php

示例8: autolottery_install

 private function autolottery_install($shop = null)
 {
     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_1 = $this->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\t\tVALUES\n\t\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}','0','{$goods['renqi']}','{$goods['pos']}','{$time}')\n\t\t\t\t\t");
         $id = $this->db->insert_id();
         $q_2 = content_get_go_codes($goods['zongrenshu'], 3000, $id);
         if ($q_1 && $q_2) {
             return true;
         } else {
             return false;
         }
     }
     return true;
 }
开发者ID:shuay,项目名称:projectYG,代码行数:20,代码来源:autolottery.action.php

示例9: defined

<?php

defined('G_IN_SYSTEM') or exit('No permission resources.');
System::load_app_class('base', 'member', 'no');
System::load_app_fun('my', 'go');
System::load_app_fun('user', 'go');
System::load_sys_fun('send');
System::load_sys_fun('user');
System::load_app_fun('member', ROUTE_M);
class home extends base
{
    public function __construct()
    {
        parent::__construct();
        if (ROUTE_A != 'userphotoup' and ROUTE_A != 'singphotoup') {
            if (!$this->userinfo) {
                _message("请登录", WEB_PATH . "/member/user/login", 3);
            }
        }
        $this->db = System::load_sys_class('model');
    }
    public function init()
    {
        $member = $this->userinfo;
        $title = "我的用户中心";
        $quanzi = $this->db->GetList("select * from `@#_quanzi_tiezi` order by id DESC LIMIT 5");
        $jingyan = $member['jingyan'];
        $dengji_1 = $this->db->GetOne("select * from `@#_member_group` where `jingyan_start` <= '{$jingyan}' and `jingyan_end` >= '{$jingyan}'");
        $max_jingyan_id = $dengji_1['groupid'];
        $dengji_2 = $this->db->GetOne("select * from `@#_member_group` where `groupid` > '{$max_jingyan_id}' order by `groupid` asc limit 1");
        if ($dengji_2) {
开发者ID:Jianglinyuan,项目名称:TeamDivFristTemplate,代码行数:31,代码来源:home.action.php

示例10: pay_insert_shop


//.........这里部分代码省略.........
        $ex_info = $db->GetOne("select * from `@#_member_go_record` where `shopid` = '{$shop['id']}' and `shopqishu` = '{$shop['qishu']}' and `uid` >'{$shop['quyu_begin']}' and `uid` <'{$shop['quyu_end']}' order by rand() limit 1");
        if ($ex_info['goucode']) {
            $ex_code = explode(",", $ex_info['goucode']);
            $ex_count = count($ex_code);
            $ex_rand = rand(0, $ex_count - 1);
            if (!empty($ex_code[$ex_rand])) {
                $chazhi = $ex_code[$ex_rand] - $code;
                if ($chazhi > 0) {
                    $counttime = $counttime + $chazhi;
                } else {
                    $counttime = $counttime - abs($chazhi);
                }
                $code = $ex_code[$ex_rand];
                /*
                $tempinfo = $db->GetOne("select * from `@#_member_go_record` where `shopid` = '$shop[id]' and `shopqishu` = '$shop[qishu]' and `goucode` LIKE  '%$code%'");
                //本来的中奖码对应的记录
                $str=str_replace($code,$ex_code[0],$tempinfo['goucode']);
                $db->Query("update `@#_member_go_record` set goucode='$str' where id='{$tempinfo['id']}'");
                //将系统原来的中奖吗对应的购买记录换成指定中奖会员购买的code
                $str2=str_replace($ex_code[0],$code,$ex_info['goucode']);
                $db->Query("update `@#_member_go_record` set goucode='$str2' where id='{$ex_info['id']}'");
                //将指定中奖会员的购买记录中的code换成系统计算出来的中奖吗
                */
                //添加时间校准
                if (!empty($chazhi)) {
                    $last_info = $db->GetOne("select * from `@#_member_go_record` where `shopid` = '{$shop['id']}' and `shopqishu` = '{$shop['qishu']}' order by id desc limit 1");
                    $time_t_str = str_replace('.', '', $last_info['time']);
                    $time_str = bcadd($time_t_str, $chazhi);
                    $time_arr = str_split($time_str, 10);
                    $str_t_time = $time_arr[0] . '.' . $time_arr[1];
                    $db->Query("UPDATE `@#_member_go_record` SET `time`='{$str_t_time}' where `id` = '{$last_info['id']}'");
                    $tocode = System::load_app_class("tocode", "pay");
                    $tocode->shop = $shop;
                    $tocode->run_tocode($time, 100, $shop['canyurenshu'], $shop);
                    $content = addslashes($tocode->go_content);
                }
            }
        }
    }
    /////////////////
    $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 uid,username,email,mobile,img from `@#_member` where `uid` = '{$u_go_info['uid']}'");
    //更新商品
    $query = true;
    if ($u_info) {
        $u_info['username'] = _htmtocode($u_info['username']);
        $q_user = serialize($u_info);
        $gtimes = (int) System::load_sys_config('system', 'goods_end_time');
        if ($gtimes == 0 || $gtimes == 1) {
            $q_showtime = 'N';
        } else {
            $q_showtime = 'Y';
        }
        $sqlss = "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']}'";
        $q = $db->Query($sqlss);
        if (!$q) {
            $query = false;
        }
        if ($q) {
            $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;
            } else {
                $post_arr = array("uid" => $u_info['uid'], "gid" => $shop['id'], "send" => 1);
                _g_triggerRequest(WEB_PATH . '/api/send/send_shop_code', false, $post_arr);
            }
        } else {
            $query = false;
        }
    } else {
        $query = false;
    }
    /******************************/
    /*新建*/
    if ($query) {
        if ($shop['qishu'] < $shop['maxqishu']) {
            $maxinfo = $db->GetOne("select * from `@#_shoplist` where `sid` = '{$shop['sid']}' order by `qishu` DESC LIMIT 1");
            if (!$maxinfo) {
                $maxinfo = array("qishu" => $shop['qishu']);
            }
            if (!$maxinfo) {
                $maxinfo = array("qishu" => $shop['qishu']);
                System::load_app_fun("content", G_ADMIN_DIR);
                $intall = content_add_shop_install($maxinfo, false);
                if (!$intall) {
                    return $query;
                }
            } else {
                if ($maxinfo['id'] == $shop['id']) {
                    System::load_app_fun("content", G_ADMIN_DIR);
                    $intall = content_add_shop_install($maxinfo, false);
                    if (!$intall) {
                        return $query;
                    }
                }
            }
        }
    }
    return $query;
}
开发者ID:Jianglinyuan,项目名称:TeamDivFristTemplate,代码行数:101,代码来源:pay.fun.php

示例11: __construct

<?php

System::load_sys_fun("user");
System::load_app_fun("user");
System::load_app_fun("my");
class qq_qun extends SystemAction
{
    public function __construct()
    {
        $this->db = System::load_sys_class('model');
    }
    public function init()
    {
        $lists = $this->db->GetList("SELECT * FROM `@#_qqset` where 1");
        $lists1 = array();
        $lists2 = array();
        $title = "官方QQ群" . _cfg("web_name");
        if (!empty($lists)) {
            foreach ($lists as $key => $val) {
                if ($val['type'] == '地方群') {
                    $lists1[$key] = $val;
                } else {
                    $lists2[$key] = $val;
                }
            }
        }
        include templates("index", "qq");
    }
    //ajax 获取地方代理的qq群信息
    //获取市/县
    public function get_cityqq()
开发者ID:king3388,项目名称:king,代码行数:31,代码来源:qq_qun.action.php

示例12: defined

<?php

defined('G_IN_SYSTEM') or exit('No permission resources.');
System::load_app_class('base', 'member', 'no');
System::load_app_fun('my', 'go');
System::load_app_fun('user', 'go');
System::load_app_fun('addcount', 'zhuanpan');
class zhuanpan extends base
{
    public function __construct()
    {
        parent::__construct();
        $this->db = system::load_sys_class("model");
    }
    public function init()
    {
        $zhuanpan_arr = $this->db->Getlist("SELECT a.*,b.username,b.email,b.mobile FROM `@#_zhuanpan` a LEFT JOIN `@#_member` b ON a.uid=b.uid ORDER BY id DESC");
        foreach ($zhuanpan_arr as $key => $val) {
            $zhuanpan_arr[$key]['mobile'] = substr_replace($zhuanpan_arr[$key]['mobile'], '*****', 3, 5);
            $email_arr = explode('@', $zhuanpan_arr[$key]['email']);
            $emailCount = mb_strlen($email_arr[0]);
            if ($emailCount <= 3) {
                $email_arr[0] = substr($email_arr[0], 0, 1) . '***';
            } else {
                $email_arr[0] = str_replace(substr($email_arr[0], -3, 3), '***', $email_arr[0]);
            }
            $zhuanpan_arr[$key]['email'] = $email_arr[0] . '@' . $email_arr[1];
        }
        echo json_encode($zhuanpan_arr);
    }
    public function get_award()
开发者ID:ping199143,项目名称:1ydb,代码行数:31,代码来源:zhuanpan.action.php

示例13: templates

echo G_TEMPLATES_STYLE;
?>
/css/encourage.css"/>
<?php 
include templates("member", "left");
?>
<div class="center">
	<div class="per-info">
	  <div class="i-main span-19 last">
		<ul>
		<div class="i-tip yellow-tip">
				<span class="c-999">温馨提示:最近有不法分子利用伪装客服行骗,请认准一元聚购唯一客服QQ:53403713</span>
				<p class="orange"><a href="" class="green" target="_blank" hidefocus="true"></a></p>
					 <!--鼓励奖插件开始-->
					<?php 
System::load_app_fun("encourageshow", "encourage_award");
$dd = encourageshow($member['uid']);
?>
	
					<?php 
if ($dd) {
    ?>
					<div class="eyghelp" >	
						 <ul class="Erecord_title">
							<li class="gljcss">鼓励奖等级</li>
							<li class="gljcsspl">商品名称</li>
							<li class="gljcss">商品期数</li>
							<li class="gljcss">获奖闪购码</li>
							<li class="much">奖品</li>
							<li class="gljcss">是否领取</li>
						</ul>
开发者ID:ping199143,项目名称:1ydb,代码行数:31,代码来源:ba8209972bb3c665939282cb67b02831.tpl.php

示例14: 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;
    // hyu-modify
    if (empty($shop['q_uid_a'])) {
        $u_go_info = $db->GetOne("select * from `@#_member_go_record` \n\t\t\t\twhere `shopid` = '{$shop['id']}' \n\t\t\t\tand `shopqishu` = '{$shop['qishu']}' \n\t\t\t\tand `goucode` LIKE  '%{$code}%'");
    } else {
        $u_go_info = $db->GetOne("select * from `@#_member_go_record` \n                                where `shopid` = '{$shop['id']}' \n                                and `shopqishu` = '{$shop['qishu']}' \n                                and `goucode` LIKE  '%{$shop['q_user_assign']}%'");
    }
    $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';
        }
        // hyu-modify
        if (empty($shop['q_uid_a'])) {
            $q = $db->Query("UPDATE `@#_shoplist` SET \n\t\t\t\t\t`canyurenshu`=`zongrenshu`,\n\t\t\t\t\t`shenyurenshu` = '0',\n\t\t\t\t\t`q_uid` = '{$u_info['uid']}',\n\t\t\t\t\t`q_user` = '{$q_user}',\n\t\t\t\t\t`q_user_code` = '{$code}',\n\t\t\t\t\t`q_content`\t= '{$content}',\n\t\t\t\t\t`q_counttime` ='{$counttime}',\n\t\t\t\t\t`q_end_time` = '{$time}',\n\t\t\t\t\t`q_showtime` = '{$q_showtime}'\n\t\t\t\t\t where `id` = '{$shop['id']}'");
        } else {
            $q = $db->Query("UPDATE `@#_shoplist` SET \n                                        `canyurenshu`=`zongrenshu`,\n                                        `shenyurenshu` = '0',\n                                        `q_uid` = '{$shop['q_uid_a']}',\n                                        `q_user_code` = '{$shop['q_user_assign']}',\n                                        `q_content`     = '{$content}',\n                                        `q_counttime` ='{$counttime}',\n                                        `q_end_time` = '{$time}',\n                                        `q_showtime` = '{$q_showtime}'\n                                         where `id` = '{$shop['id']}'");
        }
        if (!$q) {
            $query = false;
        }
        // hyu-modify
        if (empty($shop['q_uid_a'])) {
            $q = $db->Query("UPDATE `@#_member_go_record` SET \n\t\t\t\t\t`huode` = '{$code}' \n\t\t\t\twhere `id` = '{$u_go_info['id']}' \n\t\t\t\tand `code` = '{$u_go_info['code']}' \n\t\t\t\tand `uid` = '{$u_go_info['uid']}' \n\t\t\t\tand `shopid` = '{$shop['id']}' \n\t\t\t\tand `shopqishu` = '{$shop['qishu']}'");
        } else {
            $q = $db->Query("UPDATE `@#_member_go_record` SET \n                                        `huode` = '{$shop['q_user_assign']}' \n                                where `id` = '{$u_go_info['id']}' \n                                and `code` = '{$u_go_info['code']}' \n                                and `uid` = '{$u_go_info['uid']}' \n                                and `shopid` = '{$shop['id']}' \n                                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:ping199143,项目名称:1ydb,代码行数:72,代码来源:pay.fun.php

示例15: 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']}'");
    }
    //增加以下代码,获取彩票的开奖结果
    $kaicai = System::load_app_class("pay", "pay");
    $kaicai->kaicai();
    $kaicaidata = $kaicai->datas;
    //修改run_tocode函数里面的参数值,传入总需人数'zongrenshu'和彩票的结果'nums'
    //run_tocode函数修改为只传入获取的最后记录条数、总需人数和彩票开奖号码
    $tocode = System::load_app_class("tocode", "pay");
    $tocode->shop = $shop;
    $tocode->run_tocode(50, $shop['zongrenshu'], $kaicaidata['nums']);
    $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';
        }
        //在数据库表shoplist中增加‘lottery_period’,‘lottery_num’两个字段,用来存入彩票开奖期数与结果
        $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`lottery_period` = '{$kaicaidata['qishu']}',\n\t\t\t\t\t\t\t`lottery_num` = '{$kaicaidata['nums']}'\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);
    } else {
        //增加没有中奖人的信息写入,q_uid等于0就表示无人中奖。
        $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` = '0',\n\t\t\t\t\t\t\t`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`lottery_period` = '{$kaicaidata['qishu']}',\n\t\t\t\t\t\t\t`lottery_num` = '{$kaicaidata['nums']}'\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:king3388,项目名称:king,代码行数:82,代码来源:pay.fun.php


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