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


PHP front::__construct方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('model_base');
     $this->load->model('model_comment');
     $this->load->helper('download_helper');
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:7,代码来源:Base.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     /***********uid*******************/
     $uid = isset($_GET['uid']) && intval($_GET['uid']) > 0 ? intval($_GET['uid']) : 0;
     //设置uid为request的数值
     $uid = $uid > 0 ? $uid : $this->uid;
     $this->assign('uid', $uid);
     if (!$uid) {
         header('Location:/');
         exit;
     }
     $thisUser = $this->user;
     $this->assign('user', $thisUser);
     /**********************************************************/
     if ($this->uid == $uid) {
         $sub = '我';
         $my = 1;
     } else {
         $sub = '他(她)';
         $my = 0;
     }
     $this->uid = $uid;
     $this->assign('sub', $sub);
     $this->assign('my', $my);
     /*********************判断是不是各种经销商***************************/
     $storeUserIndependent = 0;
     //经销商用户是否单独建表存储
     if (intval(loadConfig('store', 'storeUserIndependent'))) {
         $storeUserIndependent = 1;
         //经销商用户是否单独建表存储
     }
     if ($uid == $this->uid) {
         $this->assign('canManage', 1);
     }
     if ($uid == $this->uid && !$storeUserIndependent) {
         $store_db = bpBase::loadModel('store_model');
         $is4sStore = 0;
         if ($store_db->select(array('storetype' => 1, 'uid' => $this->uid))) {
             $is4sStore = 1;
         }
         $this->assign('is4sStore', $is4sStore);
         //carRental
         $isRentalStore = 0;
         if ($store_db->select(array('storetype' => 3, 'uid' => $this->uid))) {
             $isRentalStore = 1;
         }
         $this->assign('isRentalStore', $isRentalStore);
         //ucar
         $ucar_store_db = bpBase::loadModel('usedcar_store_model');
         $thisUcarStore = $ucar_store_db->select(array('uid' => $this->uid));
         $this->assign('isUcarStore', $thisUcarStore ? 1 : 0);
     }
 }
开发者ID:ailingsen,项目名称:pigcms,代码行数:54,代码来源:userPageInfo.class.php

示例3:

 function __construct()
 {
     parent::__construct();
 }
开发者ID:ailingsen,项目名称:pigcms,代码行数:4,代码来源:widget.php

示例4: M

 function __construct()
 {
     parent::__construct();
     $this->site_db = M('site');
     $this->channel_db = M('channel');
     $this->article_db = M('article');
     //wechat_id
     $this->wechat_id = $_GET['wecha_id'];
     //
     if (isset($_GET['token'])) {
         $this->token = $_GET['token'];
         $this->site = $this->site_db->getSiteByToken($this->token);
         $this->siteid = $this->site['id'];
     }
     if (isset($_GET['channelid'])) {
         $this->channel = $this->channel_db->get_one(array('id' => intval($_GET['channelid'])));
         $this->token = $this->channel['token'];
         if ($this->token) {
             $this->site = $this->site_db->getSiteByToken($this->token);
             $this->siteid = $this->site['id'];
         }
         $this->assign('channel', $this->channel);
     }
     if (isset($_GET['contentid'])) {
         $this->article = $this->article_db->getContentByID($_GET['contentid']);
         $thisContent = array();
         $thisContent['title'] = $this->article->title;
         $thisContent['content'] = convertToMobile($this->article->content);
         $this->assign('content', $thisContent);
         //
         $this->channel = $this->channel_db->get_one(array('id' => $this->article->channel_id));
         $this->token = $this->channel['token'];
         if ($this->token) {
             $this->site = $this->site_db->getSiteByToken($this->token);
             $this->siteid = $this->site['id'];
         }
         $this->assign('channel', $this->channel);
     }
     if (!$this->site) {
         exit('no site');
     }
     //
     $this->navChannels = $this->channel_db->navChannels($this->siteid);
     $this->ys = intval($this->siteid % 10);
     if (!isset($_SESSION['previewSkin'])) {
         $this->smartyDir = $this->ys . '/' . $this->token . '/';
         $cssDir = 'smarty/templates/' . $this->ys . '/' . $this->token;
     } else {
         //预览状态
         $this->smartyDir = 'tpls/' . $_SESSION['previewSkin'] . '/';
         $cssDir = 'smarty/templates/tpls/' . $_SESSION['previewSkin'];
         $this->site['template'] = $_SESSION['previewSkin'];
     }
     $this->assign('cssdir', $cssDir);
     $this->assign('ys', $this->ys);
     //头部和底部
     $this->assign('header', $this->smartyDir . 'header.html');
     $this->assign('footer', $this->smartyDir . 'footer.html');
     //
     $this->site['plugmenucolor'] = '#f60';
     $this->assign('site', $this->site);
     $this->navChannels = $this->convertLinks($this->navChannels);
     $this->assign('navChannels', $this->navChannels);
     $this->assign('homeUrl', 'index.php?token=' . $this->token);
     $this->assign('homeurl', 'index.php?token=' . $this->token);
     $this->assign('token', $this->token);
     //rand
     $randNum = rand(1, 9999);
     $this->assign('rand', $randNum);
     //company
     $this->company = M('company')->getCompany($this->token);
     $this->assign('company', $this->company);
     //plug menu
     $showPlugMenu = 0;
     $plugMenus = $this->_getPlugMenu();
     if (count($plugMenus)) {
         $showPlugMenu = 1;
     }
     $this->assign('showPlugMenu', $showPlugMenu);
     $this->assign('plugmenus', $plugMenus);
 }
开发者ID:royalwang,项目名称:saivi,代码行数:81,代码来源:sitePage.class.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('model_user');
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:5,代码来源:User.php

示例6:

 function __construct()
 {
     parent::__construct();
     $this->special_cat_db = bpBase::loadModel('special_cat_model');
     $this->special_db = bpBase::loadModel('special_model');
 }
开发者ID:ailingsen,项目名称:pigcms,代码行数:6,代码来源:special.php


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