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


PHP Common::getSysPara方法代碼示例

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


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

示例1: action_index

 public function action_index()
 {
     $seotitle = Common::getSysPara('cfg_indextitle');
     $keyword = Common::getSysPara('cfg_keywords');
     $description = Common::getSysPara('cfg_description');
     $this->assign('seotitle', $seotitle);
     $this->assign('keyword', $keyword);
     $this->assign('description', $description);
     $this->display('index');
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:10,代碼來源:index.php

示例2: action_pay

 public function action_pay()
 {
     $orderid = $this->params['orderid'];
     $model = new Model_Member_Order();
     $info = $model->getOrderDetail($orderid);
     $totalprice = $info['price'] * $info['dingnum'] + $info['childprice'] * $info['childnum'] + $info['oldprice'] * $info['oldnum'];
     $info['depoist'] = $info['dingjin'] * ($info['dingnum'] + $info['childnum'] + $info['oldnum']);
     $info['totalprice'] = $totalprice;
     $cfg_pay_type = Common::getSysPara('cfg_pay_type');
     $pay_arr = explode(',', $cfg_pay_type);
     if (in_array(6, $pay_arr)) {
         $this->assign('isXianxia', 1);
     }
     $this->assign('paytypes', $pay_arr);
     $this->assign('info', $info);
     $this->display('public/fukuan');
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:17,代碼來源:page.php

示例3: action_show

 public function action_show()
 {
     $id = $this->params['id'];
     $tel = Common::getSysPara('cfg_phone');
     //詳細信息
     $row = ORM::factory('visa')->where("id={$id}")->find()->as_array();
     if (empty($row['litpic'])) {
         $row['litpic'] = Common::getDefaultImage();
     }
     //簽證國家
     if (!empty($row['nationid'])) {
         $area = ORM::factory('visa_area')->where("id=" . $row['nationid'])->find()->as_array();
         $row['country'] = $area['kindname'];
     }
     //簽證類型
     if (!empty($row['visatype'])) {
         $visatype = ORM::factory('visa_kind')->where("id=" . $row['visatype'])->find()->as_array();
         $row['kindname'] = $visatype['kindname'];
     }
     //簽發城市
     if (!empty($row['cityid'])) {
         $visacity = ORM::factory('visa_city')->where("id=" . $row['cityid'])->find()->as_array();
         $row['cityname'] = $visacity['kindname'];
     }
     $this->assign('row', $row);
     $this->assign('phone', $tel);
     $this->display('visa/show');
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:28,代碼來源:visa.php

示例4: before

 public function before()
 {
     $params = $this->request->param('params');
     $this->params = $this->analyze_param($params);
     $this->assign('cmsurl', URL::site());
     //手機版相對地址
     $this->assign('computerurl', $GLOBALS['cfg_deskurl']);
     //電腦版地址
     $this->assign('weburl', $GLOBALS['cfg_basehost']);
     //當前域名
     $this->assign('publicurl', $GLOBALS['cfg_public_url']);
     //公共資源css,images地址
     $this->assign('webname', Common::getSysConf('value', 'cfg_webname', 0));
     //當前站點名.
     $this->assign('logo', Common::getSysPara('cfg_m_logo'));
     $this->assign('cmscontroller', $this->request->controller());
     //$controller = $this->request->controller();
     //用戶是否登陸
     $session_mobile = Session::instance()->get('mobile');
     $cookie_mobile = Cookie::get('mobile');
     if (!empty($session_mobile)) {
         $GLOBALS['userinfo'] = Common::checkLogin($session_mobile);
     } else {
         if (!empty($cookie_mobile)) {
             $GLOBALS['userinfo'] = Common::checkLogin($session_mobile);
         }
     }
     $this->assign('user', $GLOBALS['userinfo']);
     /*if($controller != 'login')
            {
     
                $needCheck=1;//uplodify檢測
                if ($_SERVER['HTTP_USER_AGENT'] == 'Shockwave Flash')
                {
                    $needCheck=0; // avoid uplodify check.
                }
                if($needCheck)
                {
                    $session = Session::instance();
                    $session_username = $session->get('username');
                    $cookie_username = Cookie::get('username');
                    if(!isset($session_username) && !isset($cookie_username))
                    {
                        $this->request->redirect('login/index');
                    }
                    else if(isset($cookie_username)&&!isset($session_username))
                    {
                        $sql="select * from sline_admin where username='{$cookie_username}'";
     
                        $curuser=DB::query(1,$sql)->execute()->as_array();
     
                        if(empty($curuser[0]['id']))
                        {
                            $this->request->redirect('login/index');
                        }
     
                        $session = Session::instance();
                        $session->set('username',$curuser[0]['username']);
                        $session->set('userid',$curuser[0]['id']);
                        $session->set('roleid',$curuser[0]['roleid']);
                        $rolemodule=ORM::factory('role_module')->where("roleid='{$curuser[0]['roleid']}'")->as_array();
                        $session->set('rolemodule',$rolemodule);
     
                    }
                   /* if(empty($username))
                    {
                        $this->request->redirect('login/index');
                    }
     
                }
     
            }*/
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:73,代碼來源:controller.php

示例5: action_show

 public function action_show()
 {
     $tel = Common::getSysPara('cfg_phone');
     $lineid = $this->params['id'];
     if (empty($lineid)) {
         echo "產品信息錯誤!";
         exit;
     }
     //產品信息
     $row = ORM::factory('line')->where("id={$lineid}")->find()->as_array();
     $row['lineprice'] = Model_Line::getMinPrice($lineid);
     if (empty($row['litpic'])) {
         $row['litpic'] = Common::getDefaultImage();
     }
     $row['lineseries'] = Common::getSeries($row['id'], '01');
     //線路編號
     $row['satisfyscore'] = empty($row['satisfyscore']) ? $row['satisfyscore'] : $row['satisfyscore'] . '%';
     //如果行程類型為2
     if ($row['isstyle'] == '2') {
         $temjeishao = ORM::factory('line_jieshao')->where("lineid=" . $row['id'])->order_by("day", 'asc')->limit($row['lineday'])->get_all();
         /*foreach ($temjeishao as $key => $value) {
         			//$value['jieshao'] = strip_tags($value['jieshao']);
         			//$value['jieshao'] = Common::clearHtml($value['jieshao']);
         			$temjeishao[$key]['jieshao'] = $value['jieshao'];
         		}*/
         $row['linejieshao_arr'] = $temjeishao;
     } else {
     }
     //產品圖片
     if (!empty($row['piclist'])) {
         $temarr = explode(",", $row['piclist']);
         foreach ($temarr as $key => $value) {
             $row['pic_arr'][$key] = explode("||", $value);
         }
     }
     $this->assign('linedisc', ORM::factory('line_content')->where("webid=0 and isopen=1 and isline=0 and columnname<>'linespot'")->order_by("displayorder", 'asc')->get_all());
     $this->assign('row', $row);
     $this->assign('phone', $tel);
     $this->display('lines/show');
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:40,代碼來源:lines.php

示例6: action_show

 public function action_show()
 {
     $id = $this->params['id'];
     $tel = Common::getSysPara('cfg_phone');
     //詳細信息
     $row = ORM::factory('tuan')->where("id={$id}")->find()->as_array();
     $row['picturelist'] = Model_Tuan::handlePicture($row['piclist']);
     $row['score'] = Model_Comment::getScore($row['id'], 13);
     $this->assign('tuan', $row);
     $this->assign('phone', $tel);
     $this->display('tuan/show');
 }
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:12,代碼來源:tuan.php


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