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


PHP System::load_sys_config方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     //调用其他数据库配置文件,操作其他数据库
     $this->db_config = System::load_sys_config('database');
     $this->db_setting = 'two';
     parent::__construct();
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:7,代码来源:admin_model.model.php

示例2: view

 protected final function view($module = '', $template = '', $StyleTheme = '')
 {
     if (empty($StyleTheme)) {
         $style = G_STYLE . DIRECTORY_SEPARATOR . G_STYLE_HTML;
     } else {
         $templates = System::load_sys_config('templates', $style);
         $style = $templates['dir'] . DIRECTORY_SEPARATOR . $templates['html'];
     }
     $FileTpl = G_CACHES . 'caches_template' . DIRECTORY_SEPARATOR . dirname($style) . DIRECTORY_SEPARATOR . md5($module . '.' . $template) . '.tpl.php';
     $FileHtml = G_TEMPLATES . $style . DIRECTORY_SEPARATOR . $module . '.' . $template . '.html';
     if (file_exists($FileHtml)) {
         if (file_exists($FileTpl) && @filemtime($FileTpl) >= @filemtime($FileHtml)) {
             return include $FileTpl;
         } else {
             $template_cache = System::load_sys_class('template_cache');
             if (!is_dir(dirname(dirname($FileTpl)))) {
                 mkdir(dirname(dirname($FileTpl)), 0777, true) or die("Not Dir");
                 chmod(dirname(dirname($FileTpl)), 0777);
             }
             if (!is_dir(dirname($FileTpl))) {
                 mkdir(dirname($FileTpl), 0777, true) or die("Not Dir");
                 chmod(dirname($FileTpl), 0777);
             }
             $PutFileTpl = $template_cache->template_init($FileTpl, $FileHtml, $module, $template);
             if ($PutFileTpl) {
                 return include $FileTpl;
             } else {
                 _error('template message', 'The "' . $module . '.' . $template . '" template file does not exist');
             }
         }
     }
     _error('template message', 'The "' . $module . '.' . $template . '" template file does not exist');
 }
开发者ID:think-css,项目名称:yungou,代码行数:33,代码来源:SystemAction.class.php

示例3: init

 public function init()
 {
     $mobile = System::load_sys_config("mobile");
     if (!isset($mobile['cfg_mobile_2']) || !isset($mobile['cfg_mobile_on'])) {
         $mobiles = array();
         $mobiles['cfg_mobile_1'] = $mobiles['cfg_mobile_2'] = array();
         $mobiles['cfg_mobile_2']['mid'] = $mobile['mid'];
         $mobiles['cfg_mobile_2']['mpass'] = $mobile['mpass'];
         $mobiles['cfg_mobile_2']['mqianming'] = $mobile['mqianming'];
         $mobiles['cfg_mobile_1']['mid'] = '';
         $mobiles['cfg_mobile_1']['mpass'] = '';
         $mobiles['cfg_mobile_on'] = 2;
         if (!is_writable(G_CONFIG . 'mobile.inc.php')) {
             _message('Please chmod  mobile.ini.php  to 0777 !');
         }
         $html = var_export($mobiles, true);
         $html = "<?php \n return " . $html . "; \n?>";
         $ok = file_put_contents(G_CONFIG . 'mobile.inc.php', $html);
         if ($ok) {
             _message("升级成功!");
         }
     } else {
         @unlink(__FILE__);
         _message("无需升级!");
     }
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:26,代码来源:up_file_140306.action.php

示例4: Tdefault

 public function Tdefault()
 {
     $info = $this->AdminInfo;
     $SysInfo = GetSysInfo();
     $SysInfo['MysqlVersion'] = $this->db->GetVersion();
     $versions = System::load_sys_config("version");
     $banben_arr = explode(",", _encrypt(G_BANBEN_TYPE, "DECODE", "G_BANBEN_TYPE"));
     $banben_num = G_BANBEN_NUMBER;
     if (isset($banben_arr[$banben_num])) {
         $banben_txt = $banben_arr[$banben_num];
     } else {
         if (G_BANBEN_NUMBER == -1) {
             $banben_txt = base64_decode("5pyq5o6I5p2D");
         } else {
             if (G_BANBEN_NUMBER == -2) {
                 $banben_txt = base64_decode("5o6I5p2D5Yiw5pyf");
             } else {
                 $banben_txt = base64_decode("5pyq5o6I5p2D");
             }
         }
     }
     $yungou_alert = file_get_contents("http://www.baidu.com");
     $text = $banben_txt;
     //$catelen = $this->db->count();
     include $this->tpl(ROUTE_M, 'admin.default');
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:26,代码来源:index.action.php

示例5: send_shop_code

 public function send_shop_code()
 {
     if (!isset($_POST['send']) && !isset($_POST['uid']) && !isset($_POST['gid'])) {
         exit(0);
     }
     $uid = abs($_POST['uid']);
     $gid = abs($_POST['gid']);
     $db = System::load_sys_class("model");
     $sendinfo = $db->GetOne("SELECT id,send_type FROM `@#_send` WHERE `gid` = '{$gid}' and `uid` = '{$uid}'");
     if ($sendinfo) {
         exit(0);
     }
     $member = $db->GetOne("SELECT * FROM `@#_member` WHERE `uid` = '{$uid}'");
     if (!$member) {
         exit(0);
     }
     $info = $db->GetOne("SELECT id,q_user_code,q_end_time,title,q_user FROM `@#_shoplist` WHERE `id` = '{$gid}' and `q_uid` = '{$uid}'");
     if (!$info) {
         exit(0);
     }
     $username = get_user_name($member, 'username', 'all');
     $this->send_insert($uid, $gid, $username, $info['title'], '-1');
     $type = System::load_sys_config("send", "type");
     if (!$type) {
         exit(0);
     }
     $q_time = abs(substr($info['q_end_time'], 0, 10));
     while (time() < $q_time) {
         sleep(5);
     }
     $ret_send = false;
     if ($type == '1') {
         if (!empty($member['email'])) {
             send_email_code($member['email'], $username, $uid, $info['q_user_code'], $info['title']);
             $ret_send = true;
         }
     }
     if ($type == '2') {
         if (!empty($member['mobile'])) {
             send_mobile_shop_code($member['mobile'], $uid, $info['q_user_code']);
             $ret_send = true;
         }
     }
     if ($type == '3') {
         if (!empty($member['email'])) {
             send_email_code($member['email'], $username, $uid, $info['q_user_code'], $info['title']);
             $ret_send = true;
         }
         if (!empty($member['mobile'])) {
             send_mobile_shop_code($member['mobile'], $uid, $info['q_user_code']);
             $ret_send = true;
         }
     }
     if ($ret_send) {
         $this->send_insert($uid, $gid, $username, $info['title'], $type);
     }
     exit(0);
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:58,代码来源:send.action.php

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

示例7: global_start

 private function global_start()
 {
     if (!System::load_sys_config('system', 'web_off')) {
         $admin_dir = System::load_sys_config('system', 'admindir');
         if ($admin_dir !== ROUTE_M) {
             echo htmlspecialchars_decode(System::load_sys_config('system', 'web_off_text'));
             exit;
         }
     }
 }
开发者ID:think-css,项目名称:yungou,代码行数:10,代码来源:application.class.php

示例8: __construct

 public function __construct()
 {
     $this->route_config = System::load_sys_config('param');
     $this->domain = System::load_sys_config('domain');
     $this->expstr = System::load_sys_config('system', 'expstr');
     $this->prourl();
     $this->sub_addslashes();
     System::load_sys_class('SystemAction', 'sys', 'no');
     SystemAction::set_route_url($this->route_url);
     global $_cfg;
     $_cfg['param_arr'] = $this->route_url;
     $_cfg['param_arr']['url'] = $this->param_url;
 }
开发者ID:king3388,项目名称:king,代码行数:13,代码来源:param.class.php

示例9: __construct

 public function __construct()
 {
     if (empty($this->db_config)) {
         $this->db_config = System::load_sys_config('database');
     }
     if (!isset($this->db_config[$this->db_setting])) {
         $this->db_setting = 'default';
     }
     self::$strtablepre = System::load_sys_config('system', 'tablepre');
     self::$strtablepre = base64_decode(self::$strtablepre);
     self::$db_tablepre = $this->db_config[$this->db_setting]['tablepre'];
     $this->table_name = $this->db_config[$this->db_setting]['database'];
     $this->db = mysql::GetObject($this->db_config[$this->db_setting]);
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:14,代码来源:model.class.php

示例10: init

 public function init()
 {
     $db = System::load_sys_class("model");
     $version = System::load_sys_config('version');
     $v_time = $version['release'];
     $v_version = $version['version'];
     $ret = $db->GetOne("Describe `@#_shaidan_hueifu` sdhf_username");
     if (!$ret) {
         return;
     }
     $hflist = $db->GetList("select * from `@#_shaidan_hueifu` where `sdhf_img` is null or `sdhf_img` = ''");
     foreach ($hflist as $key => $val) {
         $user = $db->GetOne("select uid,username,email,mobile,img from `@#_member` where `uid` = '{$val['sdhf_userid']}'");
         $username = get_user_name($user);
         $db->Query("UPDATE `@#_shaidan_hueifu` SET `sdhf_img` = '{$user['img']}',`sdhf_username` = '{$username}' where `id` = '{$val['id']}'");
     }
     unlink(__FILE__);
     _message("数据库升级成功", G_WEB_PATH);
 }
开发者ID:king3388,项目名称:king,代码行数:19,代码来源:go_upfile.action.php

示例11: __construct

 public function __construct()
 {
     if (empty($this->db_config)) {
         $this->db_config = System::load_sys_config('database');
     }
     if (!isset($this->db_config[$this->db_setting])) {
         $this->db_setting = 'default';
     }
     $DBTYPE = $this->db_config[$this->db_setting]['type'];
     System::load_sys_class($DBTYPE, 'sys', 'no');
     self::$strtablepre = System::load_sys_config('system', 'tablepre');
     self::$strtablepre = base64_decode(self::$strtablepre);
     self::$db_tablepre = $this->db_config[$this->db_setting]['tablepre'];
     $this->table_name = $this->db_config[$this->db_setting]['database'];
     //PHP5.2
     $this->db = call_user_func_array("{$DBTYPE}::GetObject", array($this->db_config[$this->db_setting]));
     //PHP5.3
     //$this->db = $DBTYPE::GetObject($this->db_config[$this->db_setting]);
 }
开发者ID:shuay,项目名称:projectYG,代码行数:19,代码来源:model.class.php

示例12: get_cityqq

 public function get_cityqq()
 {
     $prov = urldecode(trim($this->segment(4)));
     $cityv = urldecode(trim($this->segment(5)));
     $couv = urldecode(trim($this->segment(6)));
     $prov = safe_replace($prov);
     $cityv = safe_replace($cityv);
     $couv = safe_replace($couv);
     if (!_is_utf8($prov)) {
         $prov = iconv("GBK", "UTF-8", $prov);
     }
     if (!_is_utf8($cityv)) {
         $cityv = iconv("GBK", "UTF-8", $cityv);
     }
     if (!_is_utf8($couv)) {
         $couv = iconv("GBK", "UTF-8", $couv);
     }
     $str = '----请选择----';
     if ($prov != $str && $cityv == $str && $couv == $str) {
         $res = $this->db->GetList("SELECT * FROM `@#_qqset` where `province`='{$prov}'");
     }
     if ($prov != $str && $cityv != $str && $couv == $str) {
         $res = $this->db->GetList("SELECT * FROM `@#_qqset` where `province`='{$prov}' and `city`='{$cityv}'");
     }
     if ($prov != $str && $cityv != $str && $couv != $str) {
         $res = $this->db->GetList("SELECT * FROM `@#_qqset` where `province`='{$prov}' and `city`='{$cityv}' and `county`='{$couv}'");
     }
     if (!empty($res)) {
         $str = '<ul>';
         foreach ($res as $v) {
             $str .= '<li><dt><img border="0" alt="' . $v['name'] . '" src="' . G_TEMPLATES_IMAGE . '/logo.jpg"></dt><dt>' . $v['name'];
             if ($v['full'] == '已满') {
                 $str .= '<img src="' . G_TEMPLATES_IMAGE . '/qqhot.gif"/>';
             }
             $str .= '</dt><dd><a href="' . $v['qqurl'] . '">' . $v['qq'] . '</a></dd></li>';
         }
         $str .= '</ul>';
     } else {
         $email = System::load_sys_config('email', 'user');
         $str = "<div class='nothing'>该地区暂无QQ群加盟," . _cfg("web_name_two") . "诚邀您加盟,详情请咨询Email:<a href='mailto:" . $email . "' target='_blank' >" . $email . "</div>";
     }
     echo $str;
 }
开发者ID:think-css,项目名称:yungou,代码行数:43,代码来源:qq_qun.action.php

示例13: register

 public function register()
 {
     $config_email = System::load_sys_config("email");
     $config_mobile = System::load_sys_config("mobile");
     if (isset($_POST['submit'])) {
         $name = isset($_POST['name']) ? $_POST['name'] : "";
         $userpassword = isset($_POST['userpassword']) ? $_POST['userpassword'] : "";
         $userpassword2 = isset($_POST['userpassword2']) ? $_POST['userpassword2'] : "";
         if ($name == null or $userpassword == null or $userpassword2 == null) {
             _message("帐号密码不能为空", null, 3);
         }
         if (!(_checkmobile($name) or _checkemail($name))) {
             _message("帐号不是手机或邮箱", null, 3);
         }
         if (strlen($userpassword) < 6 || strlen($userpassword) > 20) {
             _message("密码小于6位或大于20位", null, 3);
         }
         if ($userpassword != $userpassword2) {
             _message("两次密码不一致", null, 3);
         }
         $regtype = null;
         if (_checkmobile($name)) {
             $regtype = 'mobile';
             $cfg_mobile_type = 'cfg_mobile_' . $config_mobile['cfg_mobile_on'];
             $config_mobile = $config_mobile[$cfg_mobile_type];
             if (empty($config_mobile['mid']) && empty($config_email['mpass'])) {
                 _message("系统短信配置不正确!");
             }
         }
         if (_checkemail($name)) {
             $regtype = 'email';
             if (empty($config_email['user']) && empty($config_email['pass'])) {
                 _message("系统邮箱配置不正确!");
             }
         }
         if ($regtype == null) {
             _message("注册类型不正确!", null, 3);
         }
         $member = $this->db->GetOne("SELECT * FROM `@#_member` WHERE `{$regtype}` = '{$name}' or `reg_key` = '{$name}' LIMIT 1");
         if (is_array($member)) {
             _message("该账号已被注册!", WEB_PATH . '/register');
         }
         $time = time();
         $userpassword = md5($userpassword);
         $codetype = $regtype . 'code';
         $decode = _encrypt($this->segment(4), "DECODE");
         $decode = intval($decode);
         //邮箱验证 -1 代表未验证, 1 验证成功 都不等代表等待验证
         $sql = "INSERT INTO `@#_member`(password,img,emailcode,mobilecode,reg_key,yaoqing,time)VALUES('{$userpassword}','photo/member.jpg','-1','-1','{$name}','{$decode}','{$time}')";
         if ($this->db->Query($sql)) {
             $check_code = serialize(array("name" => $name, "time" => $time));
             $check_code = _encrypt($check_code, "ENCODE", '', 3600 * 24);
             header("location:" . WEB_PATH . "/member/user/" . $regtype . "check" . "/" . $check_code);
             exit;
         } else {
             _message("注册失败!", WEB_PATH . '/register');
         }
     }
     $title = "注册" . _cfg("web_name");
     include templates("user", "register");
 }
开发者ID:king3388,项目名称:king,代码行数:61,代码来源:user.action.php

示例14: checkname

 public function checkname()
 {
     $config_email = System::load_sys_config("email");
     $config_mobile = System::load_sys_config("mobile");
     $user = array();
     $name = $this->segment(4);
     $regtype = null;
     if (_checkmobile($name)) {
         $regtype = 'mobile';
         $cfg_mobile_type = 'cfg_mobile_' . $config_mobile['cfg_mobile_on'];
         $config_mobile = $config_mobile[$cfg_mobile_type];
         if (empty($config_mobile['mid']) && empty($config_email['mpass'])) {
             $user['state'] = 2;
             //_message("系统短息配置不正确!");
             echo json_encode($user);
             exit;
         }
     }
     $member = $this->db->GetOne("SELECT * FROM `@#_member` WHERE `mobile` = '{$name}' LIMIT 1");
     if (is_array($member)) {
         if ($member['mobilecode'] == 1 || $member['emailcode'] == 1) {
             $user['state'] = 1;
             //_message("该账号已被注册");
         } else {
             $sql = "DELETE from`@#_member` WHERE `mobile` = '{$name}'";
             $this->db->Query($sql);
             $user['state'] = 0;
         }
     } else {
         $user['state'] = 0;
         //表示数据库里没有该帐号
     }
     echo json_encode($user);
 }
开发者ID:think-css,项目名称:yungou,代码行数:34,代码来源:ajax.action.php

示例15: lottery_shop_set

 public function lottery_shop_set()
 {
     if (isset($_POST['lottery_sub'])) {
         $db = System::load_sys_class('model');
         $times = (int) System::load_sys_config('system', 'goods_end_time');
         $gid = isset($_POST['gid']) ? abs(intval($_POST['gid'])) : exit;
         $info = $db->GetOne("select id,xsjx_time,thumb,title,q_uid,q_user,q_end_time from `@#_shoplist` where `id` ='{$gid}'");
         if (!$info || empty($info['q_end_time'])) {
             echo '0';
             exit;
         }
         if ($info['xsjx_time']) {
             $info['q_end_time'] = $info['q_end_time'] + $times;
         }
         $times = str_ireplace(".", "", $info['q_end_time']);
         $q_time = substr($info['q_end_time'], 0, 10);
         $q = false;
         if (time() >= $q_time) {
             $q = $db->Query("update `@#_shoplist` SET `q_showtime` = 'N' where `id` = '{$gid}' and `q_showtime` = 'Y' and `q_uid` is not null");
         }
         if ($q) {
             echo '1';
         } else {
             echo '0';
         }
     }
 }
开发者ID:think-css,项目名称:yungou,代码行数:27,代码来源:getshop.action.php


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