Inheritance: extends think\Controller
Example #1
0
 public function _initialize()
 {
     parent::_initialize();
     $this->db = D('Zone');
     $this->rdb = D('Region');
     $_REQUEST['_sort'] = 1;
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->db = D('OrderDelivery');
     $this->odb = D('Order');
     $this->otdb = D('OrderTrack');
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->db = D(CONTROLLER_NAME);
     $this->pdb = D('Product');
     $this->ppldb = D('ProductPmList');
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->db = D('ShippingRegion');
     $this->region_db = D('Region');
     //$_REQUEST['_sort'] = 1;
 }
Example #5
0
 public function _initialize()
 {
     parent::_initialize();
     Vendor('qiniu.autoload');
     $this->config = C('QINIU_CONFIG');
     $this->auth = new \Qiniu\Auth($this->config['ACCESSKEY'], $this->config['SECRETKEY']);
     $this->user = session('userID');
 }
 function _initialize()
 {
     parent::_initialize();
     $this->session = $_SESSION['user'];
     // 		if (empty ( $this->session ['session_id'] )) {
     // 			$this->error ( '请登录!', "/", 2 );
     // 		}
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->db = D('Shipping');
     $this->srdb = D('Shipping_region');
     $this->sdb = D('Region');
     $_REQUEST['_sort'] = 1;
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->session = $_SESSION['user'];
     if (empty($this->session['mer_session_id'])) {
         $this->error('请登录!', "/", 2);
     }
 }
Example #9
0
 public function _initialize()
 {
     parent::_initialize();
     $this->db = D('Product');
     $this->pdb = D('productPm');
     $this->pldb = D('Pm_list');
     $this->ppldb = D('ProductPmList');
 }
Example #10
0
 public function _initialize()
 {
     parent::_initialize();
     $this->db = D('Order');
     $this->oddb = D('Order_detail');
     $this->otdb = D('Order_track');
     $this->rdb = D('Record');
 }
 public function __construct()
 {
     parent::__construct();
     $this->title_add = '添加预订退订单';
     $this->title = '预订退订列表';
     $this->reserveType = array('1' => '预订', '2' => '退订');
     $this->selected_apply_user_id = I('get.apply_user_id');
     $this->selected_type = I('get.type');
 }
 public function __construct()
 {
     parent::__construct();
     $this->title_index = "用户列表";
     $this->title_add = "添加用户";
     $this->levels = array('1' => '一级', '2' => '二级', '3' => '三级');
     $this->roleNames = D('Role')->getRoleNames();
     //print_r($roles);exit;
 }
Example #13
0
 /**
  * 初始化,限定页面,及登录检测
  * @author  gongfei
  *
  * @access  protected
  *
  * @return 跳转页面
  */
 public function _initialize()
 {
     parent::_initialize();
     $loginInfo = is_login();
     // 登录后不可访问的action
     $filterAction = array('login', 'register', 'forgetPwd');
     if (in_array(ACTION_NAME, $filterAction) && $loginInfo) {
         $this->redirect('Ucenter/Index/index');
     }
 }
Example #14
0
 public function _initialize()
 {
     parent::_initialize();
     $this->rdb = D('Record');
     $this->odb = D('Order');
     $this->oddb = D('order_detail');
     $this->mdb = D('Member');
     $this->pdb = D('Product');
     $this->fdb = D('Feedback');
     $this->cdb = D('Member_coupon');
 }
    function __construct()
    {
        parent::__construct();
        $this->colors = array('num_s' => '255,255,0', 'num_xs' => '255,0,0', 'num_m' => '0,0,128', 'num_l' => '0,100,0', 'num_xl' => '144,238,144', 'num_xxl' => '28,28,28');
        $this->templates = '{
			fillColor : "rgba(%s,0.5)",
			strokeColor : "rgba(220,220,220,0.8)",
			highlightFill: "rgba(%s,0.75)",
			highlightStroke: "rgba(220,220,220,1)",
			data : [%s]
		}';
    }
Example #16
0
 public function _initialize()
 {
     parent::_initialize();
     $this->db = D('Datas');
     $this->rdb = D('Record');
     $this->odb = D('Order');
     $this->oddb = D('order_detail');
     $this->mdb = D('Member');
     $this->mcdb = D('Member_coupon');
     $this->cdb = D('Collect');
     $this->pdb = D('Product');
     $this->adb = D('Article');
     $datas_menu = array(0 => array('name' => '销售数据', 'action' => 'index'), 1 => array('name' => '订单数据', 'action' => 'order'), 2 => array('name' => '会员数据', 'action' => 'member'), 3 => array('name' => '其他数据', 'action' => 'other'));
     $this->assign('datas_menu', $datas_menu);
 }
Example #17
0
 public function __construct()
 {
     parent::__construct();
     // 用户信息
     $User = D('User');
     $Cole = D('Collectless');
     $Copl = D('Collectplan');
     $inf = $User->where('id=' . $this->user_id)->deimg();
     // 我的课程数
     $lenum = $Cole->where('user_id=' . $this->user_id)->getNum();
     $plnum = $Copl->where('user_id=' . $this->user_id)->getNum();
     $this->assign('inf', $inf);
     $this->assign('lenum', $lenum);
     $this->assign('plnum', $plnum);
 }
Example #18
0
 public function __construct()
 {
     parent::__construct();
     $this->db = M('article');
     $this->content = M('article_content');
     $this->article_cate = M('article_cate');
     $this->img_upload = M('upload');
     $this->comment = M('comment');
     $click = $this->db->order('countclick desc')->limit(9)->select();
     $this->assign('click', $click);
     $tuijian = $this->db->where(array('hot' => '1'))->order('addtime desc')->limit(8)->select();
     $this->assign('tuijian', $tuijian);
     $cate = $this->article_cate->select();
     $this->assign('cates', $cate);
 }
 /**
  * 入口函数,  所有页面都要经过这个方法
  * @return [type] [description]
  */
 public function _initialize()
 {
     CommonController::recordip();
     // if( !isset($_SESSION['tip']) )
     // {
     // 	echo "<br>"."<h1 style='color:grey' >非常抱歉给大家带来困扰</h1>"."<br>";
     // 	echo "<h2 style='color:#666' >4月5日网站遭到黑客攻击,部分数据被摧毁,具体原因正在查明</h2>";
     // 	echo "<h2 style='color:#666' >即日起网站已经停止功能服务,我们会全力挽救...</h2>";
     // 	echo "<h2 style='color:#666' >...</h2>";
     // 	echo "<h2 style='color:#666' >...谢谢大家的陪伴..再见</h2>";
     // 	// echo "<h2 style='color:#666' >...</h2>";
     // 	echo "<h2 style='color:#666' >...是为了下一次的相遇</h2>"."<br>";
     // 	echo "<br>"."<a href='/' style='color:#EF2026;font-weight:bold' >继续访问网站</a>"."<br>";
     // 	echo "<br>"."<span style='color:#EF2026;font-weight:bold' >联系:hackerjieson@gmail.com</span>"."<br>";
     // 	session("tip",'tip');
     // 	die;
     // }
 }
 public function index()
 {
     if (!IS_POST) {
         $this->display('login');
     } else {
         $content['username'] = I("username");
         $content['_logic'] = 'and';
         $content['password'] = I("password", "", "md5");
         $user = D("Common/user");
         // dump($admin->where($content)->find());
         $result = $user->where($content)->find();
         //             var_dump( $result);
         if ($result) {
             CommonController::updateSession($result['id']);
             $this->success('登陆成功', U('Index/index'));
         } else {
             $this->error($user->getError(), 'Login/index', 1);
         }
     }
 }
 public function _initialize()
 {
     parent::_initialize();
     Vendor('Pingpp.init');
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->db = D('ProductCategory');
 }
 public function __construct()
 {
     $this->cid = I('get.cid', 'intval');
     $this->category_model = D('Category');
     parent::__construct();
 }
 public function _initialize()
 {
     parent::_initialize();
     $this->db = D('OrderTrack');
 }
Example #25
0
 public function _initialize()
 {
     parent::_initialize();
 }
Example #26
0
 public function _initialize()
 {
     parent::_initialize();
     $this->db = D(CONTROLLER_NAME);
 }
 public function __construct()
 {
     parent::__construct();
     $this->title = '出货记录列表';
 }
Example #28
0
  public function _initialize() {
	parent::_initialize();
	$this->db = D('Zone');
  }
 public function __construct()
 {
     parent::__construct();
 }
Example #30
0
 public function _initialize()
 {
     parent::_initialize();
     $this->db = D('Classify');
 }