當前位置: 首頁>>代碼示例>>PHP>>正文


PHP config::getInfo方法代碼示例

本文整理匯總了PHP中config::getInfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP config::getInfo方法的具體用法?PHP config::getInfo怎麽用?PHP config::getInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在config的用法示例。


在下文中一共展示了config::getInfo方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: checktoken

 function checktoken()
 {
     if ($this->shopid) {
         $config = new config("autorun_{$this->shopid}.php", hopedir);
     } else {
         $config = new config('autorun.php', hopedir);
     }
     $tempinfo = $config->getInfo();
     if (isset($tempinfo['access_token']) && isset($tempinfo['wx_time'])) {
         $btime = time() - $tempinfo['wx_time'];
         if ($btime < 7000) {
             $this->access_token = $tempinfo['access_token'];
             return true;
         }
     }
     //通過post方法獲取  當前token;
     $info = $this->vpost('https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=' . $this->wxappid . '&secret=' . $this->wxsecret);
     $info = json_decode($info, true);
     if (isset($info['access_token'])) {
         $test['access_token'] = $info['access_token'];
         $this->access_token = $info['access_token'];
         $test['wx_time'] = time();
         $config->write($test);
         return true;
     } else {
         $this->errId = $info['errcode'];
         return false;
     }
 }
開發者ID:snamper,項目名稱:xiaoshuhaochi,代碼行數:29,代碼來源:wx_s.php

示例2: findpwd

 function findpwd($uname)
 {
     if (!IValidate::email($uname)) {
         $this->error = '郵箱格式錯誤';
         return false;
     }
     $memberinfo = $this->mysql->select_one("select * from " . Mysite::$app->config['tablepre'] . "member where email='" . $uname . "' ");
     if (empty($memberinfo)) {
         $this->error = '獲取郵箱帳號失敗';
         return false;
     }
     $title = '找回' . Mysite::$app->config['sitename'] . '帳號密碼';
     $sign = $this->mymd5($memberinfo['password'], $memberinfo['username']);
     $emaildata['findpwdurl'] = IUrl::creatUrl("member/resetpwd/uid/" . $memberinfo['uid'] . "/username/" . urlencode($memberinfo['username']) . "/sign/" . $sign);
     $default_tpl = new config('tplset.php', hopedir);
     $tpllist = $default_tpl->getInfo();
     if (!isset($tpllist['emailfindtpl']) || empty($tpllist['emailfindtpl'])) {
         $this->error = '管理員未設置郵箱發送信息,請聯係客服';
         return false;
     }
     $emaildata['username'] = $memberinfo['username'];
     $emaildata['email'] = $memberinfo['email'];
     $emaildata['sitename'] = Mysite::$app->config['sitename'];
     $emaildata['siteurl'] = Mysite::$app->config['siteurl'];
     $smtp = new ISmtp(Mysite::$app->config['smpt'], 25, Mysite::$app->config['emailname'], Mysite::$app->config['emailpwd'], false);
     $content = Mysite::$app->statichtml($tpllist['emailfindtpl'], $emaildata);
     $info = $smtp->send($memberinfo['email'], Mysite::$app->config['emailname'], $title, $content, "", "HTML", "", "");
     return true;
 }
開發者ID:snamper,項目名稱:xiaoshuhaochi,代碼行數:29,代碼來源:memberclass.php

示例3: setphone

 function setphone()
 {
     $checksend = Mysite::$app->config['ordercheckphone'];
     if ($checksend == 1) {
         if (!empty($this->member['uid'])) {
             echo 'removesend()';
             exit;
         }
         $phone = IFilter::act(IReq::get('phone'));
         if (IValidate::suremobi($phone)) {
             $checkphone = $this->mysql->select_one("select * from " . Mysite::$app->config['tablepre'] . "mobile where phone ='" . $phone . "'   order by addtime desc limit 0,50");
             if (!empty($checkphone)) {
                 if ($checkphone['is_send'] == 1) {
                     echo 'removesend()';
                     exit;
                 }
                 $bijiaotime = time() - 180;
                 if ($checkphone['addtime'] > $bijiaotime) {
                     //驗證碼還有效
                     $backtime = 180 - (time() - $checkphone['addtime']);
                     ICookie::set('phonecode', $checkphone['code'], $backtime);
                     echo 'showsend(\'' . $phone . '\',' . $backtime . ')';
                     exit;
                 }
             }
             //重新發送驗證碼
             $data['code'] = mt_rand(10000, 99999);
             $data['phone'] = $phone;
             $data['addtime'] = time();
             $data['is_send'] = 0;
             ICookie::set('phonecode', $data['code'], 180);
             /*調用發送*/
             /* usercodetpl*/
             $default_tpl = new config('tplset.php', hopedir);
             $tpllist = $default_tpl->getInfo();
             if (!isset($tpllist['usercodetpl']) || empty($tpllist['usercodetpl'])) {
                 // logwrite('短信發送商家模板加載失敗');
                 echo 'alert(\'發送失敗,請聯係管理員設置模板\')';
                 exit;
             } else {
                 $sendmobile = new mobile();
                 $tempdata['code'] = $data['code'];
                 $tempdata['sitename'] = Mysite::$app->config['sitename'];
                 $contents = Mysite::$app->statichtml($tpllist['usercodetpl'], $tempdata);
                 if (Mysite::$app->config['smstype'] == 2) {
                     //139郵箱轉發短信
                     //使用sms10086cn發送/
                     $APIServer = 'http://www.sms-10086.cn/Service.asmx/sendsms?';
                     $weblink = $APIServer . 'zh=' . trim(Mysite::$app->config['sms86ac']) . '&mm=' . trim(Mysite::$app->config['sms86pd']) . '&hm=' . $phone . '&nr=' . urlencode($contents) . '&dxlbid=27';
                     $contentcccc = file_get_contents($weblink);
                     logwrite('驗證短信發送:' . $contentcccc);
                 } else {
                     //使用sms10086cn發送/
                     $phoneids = array();
                     $phoneids[] = $phone;
                     $chekcinfo = $sendmobile->sendsms($phoneids, $contents);
                     logwrite('驗證短信發送:' . $chekcinfo);
                 }
             }
             $this->mysql->insert(Mysite::$app->config['tablepre'] . 'mobile', $data);
             echo 'showsend(\'' . $phone . '\',180)';
             exit;
         } else {
             echo 'alert(\'不是手機號\')';
             exit;
         }
     } else {
         echo '';
         exit;
     }
 }
開發者ID:snamper,項目名稱:xiaoshuhaochi,代碼行數:71,代碼來源:method.php

示例4: saveset

 function saveset()
 {
     $sitename = IReq::get('sitename');
     $description = IReq::get('description');
     $keywords = IReq::get('keywords');
     $beian = IReq::get('beian');
     $yjin = intval(IReq::get('yjin'));
     $cityname = trim(IReq::get('cityname'));
     $shoplogo = trim(IReq::get('shoplogo'));
     $userlogo = trim(IReq::get('userlogo'));
     $notice = trim(IReq::get('notice'));
     $sitelogo = trim(IReq::get('sitelogo'));
     $area_grade = intval(IReq::get('area_grade'));
     $metadata = trim(IReq::get('metadata'));
     $footerdata = trim(IReq::get('footerdata'));
     $guidetype = intval(IReq::get('guidetype'));
     $html5logo = trim(IReq::get('html5logo'));
     $baidumapkey = trim(IReq::get('baidumapkey'));
     $baidumapsecret = trim(IReq::get('baidumapsecret'));
     $siteinfo['baidulng'] = trim(IReq::get('baidulng'));
     $siteinfo['baidulat'] = trim(IReq::get('baidulat'));
     //提成設置
     if (empty($sitename)) {
         $this->message('網站標題不能為空');
     }
     if (empty($description)) {
         $this->message('網站描述不能為空');
     }
     if (empty($keywords)) {
         $this->message('SEO關鍵字不能為空');
     }
     if (empty($cityname)) {
         $this->message('默認城市名稱不能為空');
     }
     $siteinfo['litel'] = IReq::get('litel');
     $siteinfo['sitename'] = $sitename;
     $siteinfo['description'] = $description;
     $siteinfo['keywords'] = $keywords;
     $siteinfo['beian'] = $beian;
     $siteinfo['yjin'] = $yjin;
     $siteinfo['cityname'] = $cityname;
     $siteinfo['shoplogo'] = $shoplogo;
     $siteinfo['userlogo'] = $userlogo;
     $siteinfo['notice'] = $notice;
     $siteinfo['sitelogo'] = $sitelogo;
     //$siteinfo['area_grade'] = $area_grade;
     $siteinfo['metadata'] = $metadata;
     $siteinfo['footerdata'] = $footerdata;
     $siteinfo['guidetype'] = $guidetype;
     $siteinfo['html5logo'] = $html5logo;
     $siteinfo['baidumapkey'] = $baidumapkey;
     $siteinfo['baidumapsecret'] = $baidumapsecret;
     $config = new config('hopeconfig.php', hopedir);
     $config->write($siteinfo);
     $configs = new config('hopeconfig.php', hopedir);
     $tests = $config->getInfo();
     /*生成偽JS文件*/
     /*
     	    $savejsinfo = ' var siteurl =  \''.$tests['siteurl'].'\';	  var sitename = \''.$tests['sitename'].'\';   var sitelogo = \''.$tests['sitelogo'].'\'; var beian = \''.$tests['beian'].'\';';
     
     	     $fp = fopen(hopedir.'/html5/config.js', 'w');
     	      fwrite($fp, $savejsinfo);
             fclose($fp); */
     $this->success('操作成功');
 }
開發者ID:snamper,項目名稱:xiaoshuhaochi,代碼行數:65,代碼來源:adminmethod.php

示例5: edittpl

 function edittpl()
 {
     $tplname = IReq::get('tplname');
     $default_tpl = new config('tplset.php', hopedir);
     $tpllist = $default_tpl->getInfo();
     $list = array('emailfindtpl' => '找回密碼郵箱模板', 'shopphonetpl' => '下單通知商家模版', 'userbuytpl' => '下單通知用戶模版', 'usercodetpl' => '用戶驗證碼模版', 'emailorder' => '商家郵件模版', 'phoneunorder' => '後台關閉訂單短信通知模板', 'usercodetpl' => '用戶驗證碼模版', 'noticeunback' => '退款失敗通知', 'noticeback' => '退款成功通知', 'noticemake' => '商家製作訂單通知', 'noticeunmake' => '商家不製作訂單通知', 'noticesend' => '發貨通知');
     $info = array_keys($list);
     if (!in_array($tplname, $info)) {
         header("Content-Type:text/html;charset=utf-8");
         echo '編輯模板錯誤';
         exit;
     }
     $data['tplname'] = $tplname;
     if (isset($tpllist[$tplname])) {
         $data['tplcontent'] = htmlspecialchars_decode($tpllist[$tplname]);
     }
     Mysite::$app->setdata($data);
 }
開發者ID:snamper,項目名稱:xiaoshuhaochi,代碼行數:18,代碼來源:adminmethod.php

示例6: sendmess

    function sendmess($orderid)
    {
        $smtp = new ISmtp(Mysite::$app->config['smpt'], 25, Mysite::$app->config['emailname'], Mysite::$app->config['emailpwd'], false);
        $sendmobile = new mobile();
        $wx_s = new wx_s();
        $orderinfo = $this->mysql->select_one("select *  from " . Mysite::$app->config['tablepre'] . "order  where id= '" . $orderid . "'   ");
        $orderdet = $this->mysql->getarr("select *  from " . Mysite::$app->config['tablepre'] . "orderdet  where order_id= '" . $orderid . "'   ");
        $shopinfo = $this->mysql->select_one("select *  from " . Mysite::$app->config['tablepre'] . "shop  where id= '" . $orderinfo['shopid'] . "'   ");
        $tempdata = array('orderinfo' => $orderinfo, 'orderdet' => $orderdet, 'sitename' => Mysite::$app->config['sitename']);
        $contents = '';
        $checknotice = isset($shopinfo['noticetype']) ? explode(',', $shopinfo['noticetype']) : array();
        $contents = '';
        $appcheck = $this->mysql->select_one("select *  from " . Mysite::$app->config['tablepre'] . "applogin where uid = '" . $orderinfo['shopuid'] . "'   ");
        if (!empty($appcheck)) {
            /* $appCls = new appclass();
               $backinfo = $appCls->sendmsg($appcheck['userid'],$appcheck['channelid'],Mysite::$app->config['sitename'].'訂單提醒','您有新的訂單,單號:'.$orderinfo['dno'],$messagetype=1);
               logwrite('APP發送:'.$backinfo);*/
        }
        if (in_array(1, $checknotice)) {
            if (Mysite::$app->config['allowedsendshop'] == 1) {
                if (IValidate::suremobi($orderinfo['shopphone'])) {
                    $default_tpl = new config('tplset.php', hopedir);
                    $tpllist = $default_tpl->getInfo();
                    if (!isset($tpllist['shopphonetpl']) || empty($tpllist['shopphonetpl'])) {
                        // logwrite('短信發送商家模板加載失敗');
                    } else {
                        $contents = Mysite::$app->statichtml($tpllist['shopphonetpl'], $tempdata);
                        if (Mysite::$app->config['smstype'] == 2) {
                            //139郵箱轉發短信
                            //使用sms10086cn發送/
                            $APIServer = 'http://www.sms-10086.cn/Service.asmx/sendsms?';
                            $weblink = $APIServer . 'zh=' . trim(Mysite::$app->config['sms86ac']) . '&mm=' . trim(Mysite::$app->config['sms86pd']) . '&hm=' . $orderinfo['shopphone'] . '&nr=' . urlencode($contents) . '&dxlbid=27';
                            $contentcccc = file_get_contents($weblink);
                            logwrite('短信sms10086cn發送結果:' . $contentcccc);
                        } else {
                            //使用sms10086cn發送/
                            $phoneids = array();
                            $phoneids[] = $orderinfo['shopphone'];
                            $chekcinfo = $sendmobile->sendsms($phoneids, $contents);
                            logwrite('億美短信接口發送結果:' . $chekcinfo);
                        }
                    }
                } else {
                    logwrite('短信發送商家' . $shopinfo['shopname'] . '聯係電話錯誤');
                }
            }
        }
        if (in_array(3, $checknotice)) {
            $wechat = $this->mysql->select_one("select * from " . Mysite::$app->config['tablepre'] . "shop_wechat where shopid=" . $orderinfo['shopid']);
            $wx_s = array();
            if (!empty($wechat)) {
                $wx_s = new wx_s($wechat['token'], $wechat['appid'], $wechat['secret'], $orderinfo['shopid']);
            }
            if (!empty($orderinfo['shopuid']) && !empty($wechat)) {
                $wechat = $this->mysql->select_one("select * from " . Mysite::$app->config['tablepre'] . "shop_wechat where shopid=" . $orderinfo['shopid']);
                //if (!empty($wechat)) {
                //$wx_s = new wx_s($wechat['token'], $wechat['appid'], $wechat['secret'],$orderinfo['shopid']);
                //找到要發送的商戶微信openid
                $openid_list = $this->mysql->getarr("select openid from " . Mysite::$app->config['tablepre'] . "shop_wxuser where shopid=" . $orderinfo['shopid'] . " and is_merchant=1");
                $payarrr = array('outpay' => '到付', 'open_acout' => '餘額支付');
                $orderpastatus = $orderinfo['paystatus'] == 1 ? '已支付' : '未支付';
                $orderpaytype = isset($payarrr[$orderinfo['paytype']]) ? $payarrr[$orderinfo['paytype']] : '在線支付';
                $tempdata = array('orderinfo' => $orderinfo, 'orderdet' => $orderdet, 'sitename' => Mysite::$app->config['sitename']);
                $temp_content = $orderinfo['buyername'] . '在' . Mysite::$app->config['sitename'] . '下單成功' . '\\n';
                $temp_content .= '下單時間:' . date('m-d H:i', $orderinfo['addtime']) . '\\n';
                $temp_content .= '配送時間:' . date('m-d H:i', $orderinfo['posttime']) . '\\n';
                $temp_content .= '支付方式' . $orderpaytype . ',' . $orderpastatus . ' ' . '\\n';
                $temp_content .= '收貨人:' . $orderinfo['buyername'] . '\\n';
                $temp_content .= '地址:' . $orderinfo['buyeraddress'] . '\\n';
                $temp_content .= '聯係電話:' . $orderinfo['buyerphone'] . '\\n';
                $temp_content .= '單號:' . $orderinfo['dno'] . '\\n';
                $temp_content .= '總價:' . $orderinfo['allcost'] . '元,配送費:' . $orderinfo['shopps'] . '元\\n';
                $temp_content .= '備注:' . $orderinfo['content'] . '\\n';
                foreach ($orderdet as $km => $vc) {
                    $temp_content .= $vc['goodsname'] . '(' . $vc['goodscount'] . '份)\\n';
                }
                if (!empty($openid_list)) {
                    if (!empty($temp_content)) {
                        foreach ($openid_list as $key => $value) {
                            if ($wx_s->sendmsg($temp_content, $value['openid'])) {
                            } else {
                                logwrite('微信客服發送錯誤:' . $wx_s->err());
                            }
                        }
                    }
                }
                //}
                //$wxshop = $this->mysql->select_one("select *  from ".Mysite::$app->config['tablepre']."wxuser  where uid= '".$orderinfo['shopuid']."'   ");
                /*if(!empty($wxshop)){
                
                                       $payarrr = array('outpay'=>'到付','open_acout'=>'餘額支付');
                                       $orderpastatus = $orderinfo['paystatus'] == 1?'已支付':'未支付';
                                       $orderpaytype = isset($payarrr[$orderinfo['paytype']])?$payarrr[$orderinfo['paytype']]:'在線支付';
                                       $tempdata = array('orderinfo'=>$orderinfo,'orderdet'=>$orderdet,'sitename'=>Mysite::$app->config['sitename']);
                                       $temp_content = $orderinfo['buyername'].'在'.Mysite::$app->config['sitename'].'下單成功'.'\n';
                                       $temp_content .='下單時間:'.date('m-d H:i',$orderinfo['addtime']).'\n';
                                       $temp_content .='配送時間:'.date('m-d H:i',$orderinfo['posttime']).'\n';
                                       $temp_content .='支付方式'.$orderpaytype.','.$orderpastatus.' '.'\n';
                                       $temp_content .='收貨人:'.$orderinfo['buyername'].'\n';
                                       $temp_content .='地址:'.$orderinfo['buyeraddress'].'\n';
//.........這裏部分代碼省略.........
開發者ID:snamper,項目名稱:xiaoshuhaochi,代碼行數:101,代碼來源:orderclass.php

示例7: siteset

 public function siteset()
 {
     $config = new config('hopeconfig.php', hopedir);
     $this->setdata($config->getInfo());
 }
開發者ID:snamper,項目名稱:xiaoshuhaochi,代碼行數:5,代碼來源:application_class.php

示例8: gradeinstro

 public function gradeinstro()
 {
     $configs = new config('membergrade.php', hopedir);
     $data['membergrade'] = $configs->getInfo();
     $data['perlong'] = intval(900 / count($data['membergrade']));
     Mysite::$app->setdata($data);
 }
開發者ID:snamper,項目名稱:xiaoshuhaochi,代碼行數:7,代碼來源:adminmethod.php


注:本文中的config::getInfo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。