Inheritance: extends Common\Controller\CommonController
示例#1
0
 public function __construct()
 {
     parent::__construct();
     $this->seo_set();
     $this->casesModel = D('Cases');
     $this->classModel = M('CasesClass');
 }
 public function _initialize()
 {
     parent::_initialize();
     if (!$this->isLogin()) {
         $this->redirect('Login/login');
     }
 }
 public function __construct()
 {
     parent::__construct();
     R('Tool/Tool/checkLogin');
     $html['open'] = MODULE_NAME;
     $this->assign('html', $html);
 }
 public function _initialize()
 {
     parent::_initialize();
     self::$user = session("user");
     //如果是用户登录
     if (self::$user['type'] == "seeker") {
         self::$db = M('user_seeker');
     } elseif (self::$user['type'] == "company") {
         self::$db = M('user_company');
     } elseif (self::$user['type'] == "school") {
         self::$db = M('user_school');
     }
     $where['id'] = self::$user['id'];
     $re = self::$db->where($where)->find();
     if ($re) {
         //var_dump($re);exit();
         $this->assign("user", $re);
     } else {
     }
     //判断账号审核状态
     if (self::$user['state'] != 1) {
         if (self::$user['state'] == 2) {
             //$this->error("您的信息目前正在审核中,请耐心等待!");
         }
         if (self::$user['state'] == 0) {
             $this->error("您的信息未通过审核!");
         }
     }
     self::$p = I('get.p', I('post.p', 1));
     self::$limit = I('get.limit', I('post.limit', 10));
 }
 public function __construct()
 {
     parent::__construct();
     $this->ArticleModel = D('Article');
     $this->ArticleFaceModel = M('article_faceimg');
     $this->ArticleTagObject = new TagController();
 }
 public function __construct()
 {
     parent::__construct();
     $this->check_login();
     $this->model = D('Repair');
     $this->member_type = M('Member')->where(array('member_id' => $this->mid))->getField('member_type');
 }
 public function __construct()
 {
     parent::__construct();
     $this->ArticleCateModel = M('articlecate');
     $this->ArticleModel = M('article');
     $this->AriticleTagModel = M("articletag");
 }
示例#8
0
 public function __construct()
 {
     parent::__construct();
     $this->seo_set();
     $this->artModel = M('Article');
     $this->classModel = D('ArticleClass');
 }
 public function __construct()
 {
     parent::__construct();
     if (!session('?user')) {
         header('location:' . __APP__);
     }
 }
示例#10
0
 public function __construct()
 {
     parent::__construct();
     if (!session('?user')) {
         $this->error('登录后才能查看简历哦^^', __APP__, 3);
     }
 }
 public function _initialize()
 {
     if (ACTION_NAME == 'userinfo') {
     } else {
         parent::_initialize();
     }
 }
 public function _initialize()
 {
     parent::_initialize();
     if (!isLogin()) {
         cookie('__login_return_url__', $_SERVER['REQUEST_URI']);
         $this->error('请登录', U('Member/login'));
     }
 }
示例#13
0
 public function __construct()
 {
     parent::__construct();
     $this->h1_title = '推广赚金';
     $this->model = D('SpreadLog');
     $this->listRows = 10;
     $this->order = 'spread_time desc';
 }
示例#14
0
 public function __construct()
 {
     parent::__construct();
     $this->seo_set();
     $this->goodsModel = D('Goods');
     $this->tagClassModel = D('TagClass');
     $this->tagModel = D('GoodsTag');
 }
 public function __construct()
 {
     parent::__construct();
     $this->h1_title = '意见反馈';
     $this->model = D('SellerMessage');
     $this->listRows = 10;
     $this->order = 'has_reply desc,addtime desc';
 }
示例#16
0
 public function __construct()
 {
     parent::__construct();
     $this->h1_title = '帮助中心';
     $this->model = D('SystemArticle');
     $this->listRows = 10;
     $this->order = 'article_sort desc,article_time desc';
 }
示例#17
0
 public function __construct()
 {
     parent::__construct();
     $this->h1_title = '申诉中心';
     $this->model = D('Report');
     $this->classModel = D('ReportClass');
     $this->listRows = 10;
 }
 public final function _initialize()
 {
     parent::_initialize();
     if (!is_choose_site()) {
         $this->redirect('Website/Index');
     }
     $this->site_info = session("site_info");
 }
 /**
  * 初始化完善来访者信息页面
  * 1. 如果没有登录,则跳转到登录页面
  * 2. 如果用户已经完善过信息,则跳转到个人中心
  */
 public function __construct()
 {
     parent::__construct();
     if (!($this->is_login() && $this->login_type())) {
         // not login
         $this->redirect('Login/index', '', 0);
     }
 }
 public function __construct()
 {
     parent::__construct();
     if (session('userId') != 1) {
         R('Tool/Tool/show404');
     }
     $this->Android = M('android');
 }
 public function __construct()
 {
     parent::__construct();
     R('Tool/Tool/checkLogin');
     //  R('Public/checkAcess', array('actName' => ACTION_NAME));
     $html['open'] = MODULE_NAME;
     $this->assign('html', $html);
 }
 public function __construct()
 {
     parent::__construct();
     R('Tool/Tool/checkLogin');
     if (isset($_GET['id']) && !empty($_GET['rid'])) {
         $this->Public->haveJsd(I('get.id', ''));
     }
 }
示例#23
0
 public function _initialize()
 {
     parent::_initialize();
     if (!$this->isLogin()) {
         $this->redirect('Login/login');
     }
     //        $this->assign('controllerName', $this->getCurrentControllerName(CONTROLLER_NAME));
     //        $this->assign('actionName', $this->getCurrentActionName(ACTION_NAME, CONTROLLER_NAME));
 }
示例#24
0
 /**
  * 初始化,限定页面,及登录检测
  *
  * @author liuxiaolin
  * @access protected
  * @return 跳转页面
  */
 public function _initialize()
 {
     parent::_initialize();
     $loginInfo = $this->isLogin();
     // 登录后不可访问的action
     $filterAction = array('login', 'register', 'forgotPasswd');
     if (in_array(ACTION_NAME, $filterAction) && $loginInfo) {
         $this->redirect('Home/Index/index');
     }
 }
示例#25
0
 public function __construct()
 {
     parent::__construct();
     $this->h1_title = '商家信息';
     $this->model = D('Seller');
     $this->accountModel = D('SellerAccount');
     $this->orderModel = D('SellerOrder');
     $this->billModel = D('SellerBill');
     $this->listRows = 10;
 }
 public function __construct()
 {
     parent::__construct();
     $this->IndexObject = new IndexController();
     $this->ViewId = I('get.id');
     if (!is_numeric($this->ViewId) || intval($this->ViewId) <= 0) {
         die;
     }
     //监听
     $this->ArticleViewListenEvent();
 }
示例#27
0
 protected function _initialize()
 {
     parent::_initialize();
     $function = ACTION_NAME;
     $uid = session('uid');
     if (empty($uid)) {
         if ($function == 'ajaxPopLayer' || $function == "applyInfoAction") {
             return true;
         }
         $this->redirect('User/login', 0);
     }
 }
示例#28
0
 /**
  * goods_type_id 0未知 1普通任务 2特殊任务 3分享购任务 
  */
 public function __construct()
 {
     parent::__construct();
     $this->h1_title = '任务管理';
     $this->model = D('Goods');
     $this->listRows = 5;
     $this->platModel = D('Platform');
     $this->optionModel = D('VipOption');
     $this->accountModel = D('SellerAccount');
     $this->order = 'sort desc';
     $this->predeposit = M('Seller')->where(array('seller_id' => $this->mid))->getField('predeposit');
 }
示例#29
0
  /**
   * 前期执行
   */
  public function _initialize(){
	parent::_initialize();
	if(!$this->user){
		if(IS_AJAX){
			ajaxErrReturn('请先登录',1001);
		}else{
			$this->error('请先登录');
		}
	}
	if(!IS_AJAX){
	  Cookie( '_redirectURL_', __SELF__ );
	}
  }
示例#30
0
 protected static function stripslashesRecursive(array $array)
 {
     foreach ($array as $k => $v) {
         if (is_string($v)) {
             $array[$k] = stripslashes($v);
         } else {
             if (is_array($v)) {
                 $array[$k] = BaseController::stripslashesRecursive($v);
             }
         }
     }
     return $array;
 }