• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_global_setting函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: doEdit

 public function doEdit()
 {
     $data = $_POST;
     //都 变更后台访问路径,自动生成后台路径的Action 开始  2014-04-04
     $datag = get_global_setting();
     $url = $datag['admin_url'];
     $dir = 'App/Lib/Action/Home/';
     if (is_dir($dir)) {
         $path = $dir . 'SdjufengActionAction.class.php';
         if ($data[100] && $data[100] != $url) {
             unlink($path);
             $url = $data[100];
             $file = fopen($path, 'wb');
         }
         if (isset($file)) {
             $text = "<?php class rongtianxiaAction extends HCommonAction {\n\t\t\t\t\t\tpublic function " . $url . "(){\n\t\t\t\t\t\t\trequire('App/Tpl/Admin/default/Index/login.html');\n\t\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t?>";
             fwrite($file, $text);
             fclose($file);
         }
     }
     //都 变更后台访问路径,自动生成后台路径的Action 结束  2014-04-04
     foreach ($data as $key => $v) {
         if (is_numeric($key)) {
             M('global')->where("id = '{$key}'")->setField('text', EnHtml($v));
         }
     }
     $this->success('更新成功');
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:28,代码来源:GlobalAction.class.php


示例2: promotion

 public function promotion()
 {
     $_P_fee = get_global_setting();
     $this->assign("reward", $_P_fee);
     $data['html'] = $this->fetch();
     exit(json_encode($data));
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:7,代码来源:PromotionController.class.php


示例3: postdata

 public function postdata()
 {
     $this->glob = get_global_setting();
     $user_money = M("member_money")->where("uid = {$this->uid}")->find();
     //判断是否满足免费体验资格
     $quota_map['status'] = array("not in", "1,4");
     $quota_map['uid'] = $this->uid;
     $quata_num = D("shares_apply")->where("(status not in(1,4) AND uid = {$this->uid}) OR (status = 1 AND type_id = 4 AND uid = {$this->uid})")->count();
     //$quata_num = D("shares_apply")->where(" uid = {$this->uid}")->count();
     //dump($quata_num);die;
     if ($quata_num != 0) {
         echo jsonmsg('很抱歉,您不具备免费体验配资资格!', 0);
         exit;
     }
     //当天范围
     $today_start = strtotime(date("Y-m-d 00:00:00", time()));
     $today_end = strtotime(date("Y-m-d 23:59:59", time()));
     $free_map = array();
     $free_map['type_id'] = 4;
     $free_map['status'] = array("in", "1,2,3");
     $free_map['add_time'] = array("between", array($today_start, $today_end));
     $free_num = D("shares_apply")->where($free_map)->count();
     //判断是否满足免费体验名额
     if ($free_num >= $this->glob['free_num']) {
         echo jsonmsg('今日免费体验名额已满,请明天再来!', 0);
         exit;
     }
     //判断用户是否登录
     if (session('u_id') == null) {
         echo jsonmsg('您还没有登录,请先登录!', 2);
         exit;
     }
     //判断是否实名认证
     /*$ids = M('members_status')->getFieldByUid($this->uid,'id_status');
     		if($ids!=1){
     			echo jsonmsg('您还未完成身份验证,请先进行实名认证!',2);exit;
     		}*/
     //判断是否手机认证
     /*$phones = M('members_status')->getFieldByUid($this->uid,'phone_status');
     		if($phones!=1){
     			echo jsonmsg('您还未手机认证,请先进行手机认证!',3);exit;
     		}*/
     $uid = $this->uid;
     $count = getMoneylimit($this->uid);
     $all_money = $count + 1;
     if ($all_money > $user_money['account_money'] + $user_money['back_money']) {
         echo jsonmsg('您的可用余额不足以支付您所有的配资申请费用,请等待审核完成或进行充值!', 4);
         exit;
     }
     //执行添加
     $_POST['uid'] = $this->uid;
     $ret = D("SharesApply")->addFreeStock();
     if ($ret) {
         echo jsonmsg('恭喜配资成功!', 1);
         exit;
     } else {
         echo jsonmsg('恭喜配资失败!', 0);
         exit;
     }
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:60,代码来源:FreestockAction.class.php


示例4: _initialize

 function _initialize()
 {
     $this->pre = C('DB_PREFIX');
     $query_string = explode("/", $_SERVER['REQUEST_URI']);
     $code = strtolower(MODULE_NAME);
     !isset($this->justlogin) ? $this->justlogin = false : ($this->justlogin = $this->justlogin);
     if (session('admin')) {
         //dump(session('adminname'));exit;
         $this->admin_id = session("admin");
         $this->assign('adminname', session('adminname'));
     } elseif (strtolower(ACTION_NAME) != 'verify' && strtolower(ACTION_NAME) != 'login' && strtolower(ACTION_NAME) != 'logincheck') {
         // 			redirect(__ROOT__."/index.php/admin/index/logincheck?code=".$query_string[2]);
         redirect(__ROOT__ . "/index.php/admin/index/logincheck?code=" . $code);
         exit;
     }
     if (!get_user_acl(session('admin')) && !$this->justlogin) {
         $this->error('对不起,权限不足');
         exit;
     }
     if (method_exists($this, '_MyInit')) {
         $this->_MyInit();
     }
     $datag = get_global_setting();
     $this->glo = $datag;
     //供PHP里面使用
     $this->assign("glo", $datag);
     $bconf = get_bconf_setting();
     $this->gloconf = $bconf;
     //供PHP里面使用
     $this->assign("gloconf", $bconf);
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:31,代码来源:ACommonController.class.php


示例5: _initialize

 public function _initialize()
 {
     //赋值UID
     if (session("u_user_name")) {
         $this->uid = session("u_id");
     }
     $this->glob = get_global_setting();
     $this->assign("glo", $this->glob);
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:9,代码来源:IndexAction.class.php


示例6: dowithdraw

 public function dowithdraw()
 {
     var_dump($_POST);
     die;
     $blackPhone = M('blacklist')->field('telephone')->select();
     foreach ($blackPhone as $v) {
         $blackData[] = $v['telephone'];
     }
     if (in_array($_SESSION['u_user_name'], $blackData)) {
         echo '该账号暂时禁止提现,详情请联系财来网';
         exit;
     }
     $transamt = $_POST['money'];
     //提现金额
     $cashChl = $_POST['cashChl'];
     //提现方式zh&hgq
     $totalinvestor = M("borrow_investor")->where("investor_uid=" . $this->uid)->sum("investor_capital");
     //充值资金池的投资金额
     $borrow_cap = M("borrow_info")->where("borrow_uid=" . $this->uid)->sum("borrow_money");
     //累计借款金额
     $totalpay = M("member_paylog")->where("uid=" . $this->uid)->sum("transamt");
     //累计充值金额
     $totalwithdraw = M("member_withdrawlog")->where("uid=" . $this->uid)->sum("transamt");
     $account = M("member_money")->field("account_money,back_money")->where("uid=" . $this->uid)->find();
     $accountmoney = $account['account_money'] + $account['back_money'];
     //充值资金池可用余额+回款资金池可用余额
     if ($transamt > $accountmoney) {
         echo "余额不足,不允许提现!";
         exit;
     } else {
         if ($totalinvestor + $borrow_cap < $totalwithdraw) {
             $datag = get_global_setting();
             $fee_tqtx = $datag['fee_tqtx'];
             $feerate = explode('|', $fee_tqtx);
             $fee = $transamt * $feerate[0] / 100;
         } else {
             $datag = get_global_setting();
             $fee_tqtx = $datag['fee_tqtx'];
             $feerate = explode('|', $fee_tqtx);
             $cae = $totalinvestor + $borrow_cap - $totalwithdraw;
             if ($cae >= $transamt) {
                 $fee = $transamt * $feerate[1] / 100;
             } else {
                 $fee = ($cae * $feerate[1] + ($transamt - $cae) * $feerate[0]) / 100;
             }
         }
     }
     //echo $fee;exit;
     $info = M("members")->field("usrid")->where("id=" . $this->uid)->find();
     $usrid = intval($info['usrid']);
     import("ORG.Huifu.Huifu");
     $huifu = new Huifu();
     $huifu->cash($usrid, $transamt, $fee, $cashChl);
     //增加$cashChl参数zh&hgq
 }
开发者ID:GStepOne,项目名称:CI,代码行数:55,代码来源:WithdrawAction.class.php


示例7: promotion

 public function promotion()
 {
     $_P_fee = get_global_setting();
     Vendor('Qrcode.phpqrcode');
     //判断是否有二维码 有就不用在二次生成了
     // $icon='http://my.cailai.com/Style/H/images/erwei/qrcodeicon'.$this->uid.'.png';
     $icon = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . '/Style/H/images/erwei/qrcodeicon' . $this->uid . '.png';
     // dump($icon);
     $is_exists = get_headers($icon);
     //dump($is_exists);
     if ($is_exists[0] != 'HTTP/1.1 200 OK') {
         //设置二维码的内容 查询电话号码
         $res = M('members')->getFieldById($this->uid, 'user_name');
         $value = "http://m.cailai.com/index/register?p=" . $res;
         $pos = 'Style/H/images/erwei/qrcode' . $this->uid . '.png';
         //dump(get_headers($pos));
         $errorCorrectionLevel = 'L';
         //容错级别
         $matrixPointSize = 6;
         //生成图片大小
         //生成二维码图片
         QRcode::png($value, $pos, $errorCorrectionLevel, $matrixPointSize, 2);
         $logo = 'Style/H/img/cutlogo.png';
         //准备好的logo图片
         $QR = $pos;
         //已经生成的原始二维码图
         if ($logo) {
             $QR = imagecreatefromstring(file_get_contents($QR));
             $logo = imagecreatefromstring(file_get_contents($logo));
             $QR_width = imagesx($QR);
             //二维码图片宽度
             $QR_height = imagesy($QR);
             //二维码图片高度
             $logo_width = imagesx($logo);
             //logo图片宽度
             $logo_height = imagesy($logo);
             //logo图片高度
             $logo_qr_width = $QR_width / 5;
             $scale = $logo_width / $logo_qr_width;
             $logo_qr_height = $logo_height / $scale;
             $from_width = ($QR_width - $logo_qr_width) / 2;
             //重新组合图片并调整大小
             imagecopyresampled($QR, $logo, $from_width, $from_width, 0, 0, $logo_qr_width, $logo_qr_height, $logo_width, $logo_height);
             //$logo_qr_width, $logo_qr_height,
             //bool imagecopyresampled ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h )
         }
         //输出图片
         $newicon = "Style/H/images/erwei/qrcodeicon" . $this->uid . '.png';
         imagepng($QR, $newicon);
     }
     //exists 结束
     $this->myid = $this->uid;
     $this->assign("reward", $_P_fee);
     $this->display();
 }
开发者ID:GStepOne,项目名称:CI,代码行数:55,代码来源:PromotionAction.class.php


示例8: logincheck

 public function logincheck()
 {
     $code = $_GET["code"];
     $datag = get_global_setting();
     $codecheck = $datag['admin_url'];
     if ($code != $codecheck) {
         $this->assign('jumpUrl', '/');
         $this->error("非法请求");
     } else {
         $this->redirect('login');
     }
 }
开发者ID:GStepOne,项目名称:CI,代码行数:12,代码来源:IndexAction.class.php


示例9: promotion

 public function promotion()
 {
     //自动生成推广码
     $expand_num = getExpandCode($this->uid);
     $this->assign("expand_num", $expand_num);
     $_P_fee = get_global_setting();
     $this->assign("reward", $_P_fee);
     $active = active_flag(2);
     $this->assign("active", $active);
     $data['html'] = $this->fetch();
     exit(json_encode($data));
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:12,代码来源:PromotionAction.class.php


示例10: cellphone

 public function cellphone()
 {
     $isid = M('members_status')->getFieldByUid($this->uid, 'phone_status');
     $phone = M('members')->getFieldById($this->uid, 'user_phone');
     $this->assign("phone", $phone);
     $sq = M('member_safequestion')->find($this->uid);
     $this->assign("sq", $sq);
     $this->assign("phone_status", $isid);
     $datag = get_global_setting();
     $is_manual = $datag['is_manual'];
     $this->assign("is_manual", $is_manual);
     $this->display();
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:13,代码来源:VerifyAction.class.php


示例11: doEdit

 public function doEdit()
 {
     $data = $_POST;
     //都 变更后台访问路径,自动生成后台路径的Action 开始  2014-04-04
     $datag = get_global_setting();
     $url = $datag['admin_url'];
     foreach ($data as $key => $v) {
         if (is_numeric($key)) {
             M('global')->where("id = '{$key}'")->setField('text', EnHtml($v));
         }
     }
     $this->success('更新成功');
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:13,代码来源:GlobalController.class.php


示例12: sellhtml

 public function sellhtml()
 {
     $invest_id = isset($_GET['id']) ? intval($_GET['id']) : 0;
     !$invest_id && ajaxmsg(L('parameter_error'), 0);
     $info = $this->Debt->countDebt($invest_id);
     $this->assign('info', $info);
     $datag = get_global_setting();
     $this->assign('debt_fee', $datag['debt_fee']);
     $this->assign('invest_id', $invest_id);
     $borrow = M('borrow_investor i')->join(C('DB_PREFIX') . "borrow_info b ON i.borrow_id = b.id")->field("borrow_name")->where("i.id=" . $invest_id)->find();
     $this->assign("borrow_name", $borrow['borrow_name']);
     $d['content'] = $this->fetch();
     echo json_encode($d);
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:14,代码来源:DebtAction.class.php


示例13: _initialize

 function _initialize()
 {
     if (session('u_id')) {
         $this->uid = session('u_id');
         $this->uname = session('u_user_name');
         $this->assign('uname', $this->uname);
         $datag = get_global_setting();
         $this->glo = $datag;
         //供PHP里面使用
         $this->assign("glo", $datag);
         //公共参数
     } else {
         $this->redirect('M/Pub/login');
     }
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:15,代码来源:MobileAction.class.php


示例14: _initialize

 function _initialize()
 {
     if (session('u_id')) {
         $this->uid = session('u_id');
         $this->uname = session('u_user_name');
         $this->assign('uname', $this->uname);
         $datag = get_global_setting();
         $this->glo = $datag;
         //供PHP里面使用
         $this->assign("glo", $datag);
         //公共参数
     } else {
         $this->redirect('M/Pub/login');
     }
     $hetong = M('hetong')->field('name,dizhi,tel')->find();
     $this->assign("web", $hetong);
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:17,代码来源:MobileController.class.php


示例15: _initialize

 function _initialize()
 {
     //友情链接
     $parm['is_show'] = 1;
     $yqList = M('friend')->where($map)->order('link_order')->select();
     $this->assign("yqList", $yqList);
     judgeHttps($this->isAjax());
     $datag = get_global_setting();
     $this->glo = $datag;
     //供PHP里面使用
     $this->assign("glo", $datag);
     //分站
     $this->assign("subsite", getSubSite());
     $this->siteInfo = getLocalhost();
     $this->assign("siteInfo", $this->siteInfo);
     //分站
     if (session("u_user_name")) {
         $this->uid = session("u_id");
         $unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id');
         $this->assign('unread', $unread);
         $this->assign('UID', $this->uid);
     } else {
         $loginconfig = FS("Webconfig/loginconfig");
         $de_val = $this->_authcode(cookie('UKey'), 'DECODE', $loginconfig['cookie']['key']);
         if (substr(md5($loginconfig['cookie']['key'] . $de_val), 14, 10) == cookie('Ukey2')) {
             $vo = M('members')->field("id,user_name")->find($de_val);
             if (is_array($vo)) {
                 foreach ($vo as $key => $v) {
                     session("u_{$key}", $v);
                 }
                 $this->uid = session("u_id");
                 $this->assign('UID', $this->uid);
                 $unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id');
                 $this->assign('unread', $unread);
             } else {
                 cookie("Ukey", NULL);
                 cookie("Ukey2", NULL);
             }
         }
     }
     if (method_exists($this, '_MyInit')) {
         $this->_MyInit();
     }
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:44,代码来源:HCommonAction.class.php


示例16: _initialize

 function _initialize()
 {
     $datag = get_global_setting();
     $this->glo = $datag;
     //供PHP里面使用
     $this->assign("glo", $datag);
     $bconf = get_bconf_setting();
     $this->gloconf = $bconf;
     //供PHP里面使用
     $this->assign("gloconf", $bconf);
     $hetong = M('hetong')->field('name,dizhi,tel')->find();
     $this->assign("web", $hetong);
     if (session("u_user_name")) {
         $this->uid = session("u_id");
         $unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id');
         $this->assign('unread', $unread);
         $this->assign('UID', $this->uid);
     } else {
         $loginconfig = FS("Webconfig/loginconfig");
         $de_val = $this->_authcode(cookie('UKey'), 'DECODE', $loginconfig['cookie']['key']);
         if (substr(md5($loginconfig['cookie']['key'] . $de_val), 14, 10) == cookie('Ukey2')) {
             $vo = M('members')->field("id,user_name")->find($de_val);
             if (is_array($vo)) {
                 foreach ($vo as $key => $v) {
                     session("u_{$key}", $v);
                 }
                 $this->uid = session("u_id");
                 $this->assign('UID', $this->uid);
                 $unread = M("inner_msg")->where("uid={$this->uid} AND status=0")->count('id');
                 $this->assign('unread', $unread);
             } else {
                 cookie("Ukey", NULL);
                 cookie("Ukey2", NULL);
             }
         }
     }
     if (method_exists($this, '_MyInit')) {
         $this->_MyInit();
     }
 }
开发者ID:kinglong366,项目名称:p2p,代码行数:40,代码来源:HCommonController.class.php


示例17: apply

 public function apply()
 {
     $mmdata = M('member_money')->where("uid={$this->uid}")->find();
     $datag = get_global_setting();
     $mmpd = $mmdata['account_money'] + $mmdata['back_money'] - $datag['fee_vip'];
     if ($mmpd < 0) {
         ajaxmsg("您的余额不足,请充值后再申请", 0);
     }
     $kfid = intval($_POST['kfid']);
     $des = text($_POST['des']);
     $savedata['kfid'] = $kfid;
     $savedata['uid'] = $this->uid;
     $savedata['des'] = $des;
     $savedata['add_time'] = time();
     $savedata['status'] = 0;
     $newid = M('vip_apply')->add($savedata);
     if ($newid) {
         ajaxmsg();
     } else {
         ajaxmsg("保存失败,请重试", 0);
     }
 }
开发者ID:GStepOne,项目名称:CI,代码行数:22,代码来源:VipAction.class.php


示例18: _initialize

 function _initialize()
 {
     forceHttp();
     $this->pre = C('DB_PREFIX');
     !isset($this->justlogin) ? $this->justlogin = false : ($this->justlogin = $this->justlogin);
     $this->saveRule = date("YmdHis", time()) . rand(0, 1000);
     if (strtolower(MODULE_NAME) == 'index' && (strtolower(ACTION_NAME) == 'login' || strtolower(ACTION_NAME) == 'index' && !session('admin')) && $_SERVER['PATH_INFO'] != '/' . SAFE_ADMIN) {
         echo 'The page can\'t been found';
         header('HTTP/1.0 404 Not Found');
         exit;
     }
     if (session('admin')) {
         $this->admin_id = session("admin_id");
         $this->assign('adminname', session('adminname'));
     } elseif (strtolower(ACTION_NAME) != 'verify' && strtolower(ACTION_NAME) != 'login' && strtolower(ACTION_NAME) != 'getsmscode') {
         if ($_SERVER['PATH_INFO'] != '/' . SAFE_ADMIN) {
             echo 'The page can\'t been found.';
             header('HTTP/1.0 404 Not Found');
         } else {
             redirect(__ROOT__ . '/' . SAFE_ADMIN);
         }
         exit;
     }
     if (!get_user_acl(session('admin')) && !$this->justlogin) {
         $this->error('对不起,权限不足');
         exit;
     }
     if (method_exists($this, '_MyInit')) {
         $this->_MyInit();
     }
     $this->logOpType = C("LOG_OPERATION_TYPE");
     $this->assign("logOpType", $this->logOpType);
     $this->logUserType = C("LOG_USER_TYPE");
     $datag = get_global_setting();
     $this->glo = $datag;
     //供PHP里面使用
     $this->assign("glo", $datag);
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:38,代码来源:ACommonAction.class.php


示例19: promotion

 public function promotion()
 {
     $_P_fee = get_global_setting();
     $lilv['lilv'] = $_P_fee['award_invest'];
     ajaxmsg($lilv);
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:6,代码来源:VerifyAction.class.php


示例20: getDefaultSeoInfo

function getDefaultSeoInfo($content, $type)
{
    $ret = $content;
    switch ($type) {
        case 1:
            //keyword
            if (empty($ret)) {
                $datag = get_global_setting();
                $ret = $datag["web_keywords"];
            }
            break;
        case 2:
            //description
            if (empty($ret)) {
                $datag = get_global_setting();
                $ret = $datag["web_descript"];
            }
            break;
    }
    return $ret;
}
开发者ID:hutao1004,项目名称:yintt,代码行数:21,代码来源:Lib.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_gmt_from_date函数代码示例发布时间:2022-05-15
下一篇:
PHP get_global_params函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap