public function __construct() { parent::__construct(); if (empty($this->user_session)) { $this->error_tips('请先进行登录!', U('Login/index')); } }
public function __construct() { parent::__construct(); if (empty($this->user_session)) { $location_param = array(); if ($_SERVER['HTTP_REFERER']) { $location_param['referer'] = urlencode($_SERVER['HTTP_REFERER']); } redirect(U('Login/index', $location_param)); } $now_user = D('User')->get_user($this->user_session['uid']); if (empty($now_user)) { session('user', null); $this->error_tips('未获取到您的帐号信息,请重新登录!', U('Login/index')); } $now_user['now_money'] = floatval($now_user['now_money']); $this->now_user = $now_user; $this->assign('now_user', $now_user); $levelDb = M('User_level'); $tmparr = $levelDb->where('22=22')->order('id ASC')->select(); $levelarr = array(); if ($tmparr) { foreach ($tmparr as $vv) { $levelarr[$vv['level']] = $vv; } } $this->user_level = $levelarr; unset($tmparr, $levelarr); $this->assign('levelarr', $this->user_level); }
function __construct() { parent::__construct(); if (session('admin') == null) { redirect(U('Index/index')); } }
public function __construct() { parent::__construct(); $this->data['all_columns'] = D('CustomColumns')->getSchoolModuleColumns($this->login_user['team_id'], $this->login_user['manage_group_ids']); $this->data['list_views'] = D('CustomListViews')->getListView('Schools'); $this->data['selector'] = 'school/index'; }
public function __construct() { parent::__construct(); if (cookie('id') == null && cookie('username') == null) { $this->success('你未登陆,请登录后再操作', U('Home/Index/index')); } }
public function __construct() { parent::__construct(); $this->data['action_name'] = ACTION_NAME; $this->data['all_columns'] = D('CustomColumns')->getUserInfoModuleColumns(); $this->data['recommend_columns'] = D('CustomColumns')->getUserRecommendModuleColumns(); $this->data['status'] = $this->_get('status') ? $this->_get('status') : 'all'; $this->data['list_views'] = D('CustomListViews')->getListView('UserInfo', $this->data['status']); $this->status_count = D('UserRecommends')->getStatusCountMap($this->login_user); $this->user_statuses = D('UserStatuses')->getStatusIdNameMap(); foreach ($this->user_statuses as $key => $value) { $sub_types[$key] = $value . '(' . intval($this->status_count[$key]) . ')'; } $sub_types['all'] = '所有(' . array_sum(array_values($this->status_count)) . ')'; $this->sub_types = $sub_types; $this->data['selector'] = "user/" . ACTION_NAME; $this->audit_opinions = array(1 => '通过', 2 => '未通过进入备选', 3 => '待定'); // sorry hack $this->all_audit_opinions = array(1 => array('name' => '通过', 'label-class' => 'success'), 2 => array('name' => '未通过', 'label-class' => 'important'), 3 => array('name' => '待定', 'label-class' => 'warning'), 4 => array('name' => '申请表驳回修改', 'label-class' => 'inverse')); $this->user_classify_xedit_str = json_encode_for_xedit(explode(',', D("Options")->getOption("user_classifies"))); $this->could_edit = 1; $this->is_volunteer = $this->login_user['role'] == 'role_volunteer' ? 1 : 0; if ($this->is_volunteer) { $this->could_edit = 0; } $this->survey_users_xedit_str = json_encode_for_xedit(D("Users")->getField('id,realname')); }
public function __construct() { parent::__construct(); // 在此处加判断,如果是web 则用下述函数,如果是手机端,则另起一套身份难 // TODO $this->check_auth(); }
public function __construct() { $this->data = ""; $constraints = array(); $constraints[] = new ActionConstraint('no_redirect', true); parent::__construct($constraints); }
public function __construct(){ parent::__construct(); $this->token=session('token'); $this->Huisuo_photo=M('huisuo_photo'); // $this->token = $this->_get('token'); $this->assign('token',$this->token); $this->wecha_id = $this->_get('wecha_id'); if (!$this->wecha_id){ $this->wecha_id='null'; } $this->assign('wecha_id',$this->wecha_id); $this->Yuyue_model=M('yuyue'); $this->yuyue_order=M('yuyue_order'); $this->type='Huisuo'; $where['token']=$this->token; $kefu=M('Kefu')->where($where)->find(); $this->assign('kefu',$kefu); }
public function __construct(){ parent::__construct(); $where['token']=$this->token; $kefu=M('Kefu')->where($where)->find(); $this->assign('kefu',$kefu); $this->token=$this->_get('token'); $this->wecha_id = $this->_get('wecha_id'); if (!$this->wecha_id){ $this->wecha_id='null'; } $this->user_id = $this->_get('uid'); $this->diaoyan_id = $this->_get('id'); $this->diaoyan=M('diaoyan'); $this->diaoyan_timu=M('diaoyan_timu'); $this->diaoyan_user=M('diaoyan_user'); $this->urlarr =array( 'token'=>$this->token, 'wecha_id'=> $this->wecha_id, 'id'=> $this->diaoyan_id, 'uid'=> $this->user_id ); $this->assign('token',$this->token); $this->assign('wecha_id',$this->wecha_id); $this->assign('urlarr',$this->urlarr); $this->assign('diaoyan_id',$this->diaoyan_id); }
public function __construct() { parent::__construct(); $this->store_id = isset($_REQUEST['store_id']) ? intval($_REQUEST['store_id']) : 0; $this->assign('store_id', $this->store_id); /* 粉丝行为分析 */ D('Merchant_request')->add_request($this->mer_id, array('meal_hits' => 1)); //店铺详情 $merchant_store = M("Merchant_store")->where(array('store_id' => $this->store_id))->find(); $merchant_store['office_time'] = unserialize($merchant_store['office_time']); $store_image_class = new store_image(); $merchant_store['images'] = $store_image_class->get_allImage_by_path($merchant_store['pic_info']); $t = $merchant_store['images']; $merchant_store['image'] = array_shift($t); $merchant_store_meal = M("Merchant_store_meal")->where(array('store_id' => $this->store_id))->find(); if ($merchant_store_meal) { $merchant_store = array_merge($merchant_store, $merchant_store_meal); } $this->leveloff = !empty($merchant_store_meal['leveloff']) ? unserialize($merchant_store_meal['leveloff']) : ''; $this->_store = $merchant_store; $this->assign('store', $this->_store); $this->session_index = "session_foods{$this->store_id}_{$this->mer_id}"; $this->order_index = "order_id_{$this->store_id}_{$this->mer_id}"; if ($services = D('Customer_service')->where(array('mer_id' => $this->mer_id))->select()) { $key = $this->get_encrypt_key(array('app_id' => $this->config['im_appid'], 'openid' => $_SESSION['openid']), $this->config['im_appkey']); $kf_url = 'http://im-link.meihua.com/?app_id=' . $this->config['im_appid'] . '&openid=' . $_SESSION['openid'] . '&key=' . $key . '#serviceList_' . $this->mer_id; $this->assign('kf_url', $kf_url); } }
/** * 构造方法 */ public function __construct() { parent::__construct(); //重写父类构造方法 //初始化 $this->_init(); }
public function __construct() { parent::__construct(); if (!$this->isLogged()) { header('location: login.php'); } }
public function __construct() { parent::__construct(); $this->staff_session = session('staff_session'); $this->staff_session = !empty($this->staff_session) ? unserialize($this->staff_session) : false; if (ACTION_NAME != 'login') { if (empty($this->staff_session) && $this->is_wexin_browser && !empty($_SESSION['openid'])) { $tmpstaff = D('Merchant_store_staff')->field(true)->where(array('openid' => trim($_SESSION['openid'])))->find(); if (!empty($tmpstaff)) { session('staff_session', serialize($tmpstaff)); $this->staff_session = $tmpstaff; } } if (empty($this->staff_session)) { redirect(U('Storestaff/login', array('referer' => urlencode('http://' . $_SERVER['HTTP_HOST'] . (!empty($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']))))); exit; } else { $this->assign('staff_session', $this->staff_session); $database_merchant_store = D('Merchant_store'); $condition_merchant_store['store_id'] = $this->staff_session['store_id']; $this->store = $database_merchant_store->field(true)->where($condition_merchant_store)->find(); if (empty($this->store)) { $this->error_tips('店铺不存在!'); } } } $this->assign('merchantstatic_path', $this->config['site_url'] . '/tpl/Merchant/static/'); }
public function __construct(){ parent::__construct(); $this->token=session('token'); // $this->token = $this->_get('token'); $this->assign('token',$this->token); $this->wecha_id = $this->_get('wecha_id'); if (!$this->wecha_id){ $this->wecha_id='null'; } $this->assign('wecha_id',$this->wecha_id); $this->Yuyue_model=M('yuyue'); $this->yuyue_order=M('yuyue_order'); $this->type='Jiudian'; }
public function __construct() { parent::__construct(); $this->LOGIN_KEY = session('LOGIN_KEY'); $this->LOGIN_TIME = session('LOGIN_TIME'); $this->checkAdminSession(); }
public function __construct() { parent::__construct(); $this->servers = array(); $this->types = array(); $this->title = "Servers list"; }
public function __construct() { parent::__construct(); if (empty($this->config['live_service_type'])) { $this->error_tips('暂不支持生活缴费!'); } $this->liveServiceTypeArr = explode(',', $this->config['live_service_type']); }
public function __construct() { $constraints = array(); $constraints[] = new ActionConstraint("no_change_password", true); parent::__construct($constraints); $this->title = "Change your password"; $this->status = ChangePasswordAction::$ShowForm; }
public function __construct() { parent::__construct(); session('wapupload', 1); if (empty($this->user_session)) { $this->error_tips('请先进行登录!', U('Login/index')); } $this->wecha_id = $this->user_session['uid']; }
public function __construct() { parent::__construct(); $this->isUserLogin(); $this->user = session('WST_USER'); if ($GLOBALS['CONFIG']['isCloseFriendCenter'] == 1) { header("Location: " . U("Home/Index/index")); } }
public function __construct() { parent::__construct(); if (!empty($_POST)) { $this->_saveData(); $this->responseJson(200, '创建成功'); } SimpleView::display('task_create.html'); }
public function __construct() { parent::__construct(); $this->title = "Users Administration"; $this->view = UsersAdministrationAction::$BrowseUsers; $this->mustHavePermission('manage_users'); $this->users = array(); $this->pageUser = new User(); }
public function __construct() { parent::__construct(); $this->module_name = $this->_param('module'); //对应的contact_id,event_id等 $this->module_table_name = ucfirst($this->module_name) . 'Notes'; $this->module_object_id = $this->_param('object_id'); $this->module_object_id_name = $this->_param('module') . '_id'; }
public function __construct() { parent::__construct(); if (empty($this->user_session)) { $this->error_tips("请先进行登录!", U("Login/index")); } $this->wecha_id = $this->user_session["uid"]; $this->assign("wecha_id", $this->wecha_id); }
public function __construct() { parent::__construct(); if (!empty($_POST)) { $this->_ajaxPost($_POST['account'], $_POST['password']); $this->responseJson(1, 'login success'); } SimpleView::display('user_login.html'); }
public function __construct() { parent::__construct(); //装修公司才能操作 if ($this->oCom->type != 1) { $this->error('非法操作!'); } $this->model = D('User_designer'); }
public function __construct() { parent::__construct(); if (empty($this->user_session)) { $this->error_tips('请先进行登录!', U('Login/index')); } if (empty($_SESSION['openid'])) { // $this->error_tips('该功能只能在微信中使用!', U('Login/index')); } }
public function __construct() { parent::__construct(); $uniqid = $this->getUniqid(); $result = $this->_readLogData($uniqid); SimpleView::assign('info', $result['info']); SimpleView::assign('files', $result['files']); SimpleView::assign('log_dir', $this->Config['log_dir']); SimpleView::display('task_log.html'); }
public function __construct() { parent::__construct(); $this->groups = array(); $this->group = new Group(); $this->permission = new Permission(); $this->mustHavePermission('manage_groups'); $this->title = "Groups Administration"; $this->view = GroupsAdministrationAction::$BrowseGroups; }