function _initialize() { parent::_initialize(); $this->posts_obj = D("Posts"); $this->terms_obj = D("Terms"); $this->terms_relationship = D("TermRelationships"); }
function _initialize() { parent::_initialize(); $this->filepath = YOURPHP_PATH . 'Template/' . $this->sysConfig['DEFAULT_THEME'] . '/'; $_GET['folder'] = str_replace('../', "", $_GET['folder']); $_REQUEST['file'] = str_replace('./', "", $_REQUEST['file']); }
protected function _initialize() { parent::_initialize(); $this->Role = D("Role"); $this->Role_user = M("Role_user"); $this->User = D("User"); //判断是否是门店用户登录 $singleMendian = false; $this->role_id = session("roleid"); $this->mendian = 0; if ($this->role_id != 1) { $condition['id'] = $this->role_id; $thisRole = $this->Role->where($condition)->find(); $newMendian = $thisRole['mendian']; if ($newMendian != 0) { $this->mendian = $newMendian; $this->singleMendian = true; $this->isMendianAdmin = $thisRole['role_type'] == 1 ? true : false; } } if ($this->singleMendian && !$this->isMendianAdmin) { $this->error("您没有权限审核!"); } if ($this->isMendianAdmin) { $role = $this->Role->where(array('mendian' => $this->mendian))->select(); $role_id_list = array(); foreach ($role as $key => $value) { $role_id_list[] = $value['id']; } $user = $this->User->where(array('role_id' => array('IN', $role_id_list)))->select(); foreach ($user as $key => $value) { $this->mendian_user_id[] = $value['id']; } } }
function _initialize() { parent::_initialize(); $this->modelfield = D("Model_field"); //字段类型存放目录 $this->fields = C("SHUIPF_FIELDS_PATH"); }
function _initialize() { parent::_initialize(); $this->Tplpath = TMPL_PATH . '/Home/' . $this->sysConfig['DEFAULT_THEME'] . '/'; //$this->Flashpath = TMPL_PATH.$this->sysConfig['DEFAULT_THEME'].'/Public/flash/'; $this->Xmlpath = TMPL_PATH . '/Home/' . $this->sysConfig['DEFAULT_THEME'] . '/Public/xml/'; }
public function _initialize() { parent::_initialize(); //取得分类信息 $typedata = M("Terms")->where(array("module" => "censor"))->select(); $this->assign("typedata", $typedata); }
function _initialize() { parent::_initialize(); $this->filepath = TMPL_PATH . 'Home/' . $this->sysConfig['DEFAULT_THEME'] . '/'; $this->publicpath = TMPL_PATH . 'Home/' . $this->sysConfig['DEFAULT_THEME'] . '/Public/'; $this->tplpath = TMPL_PATH . 'Home/'; }
function _initialize() { parent::_initialize(); $this->dao = D('User'); $this->usergroup = F('Role'); $this->assign('usergroup', $this->usergroup); }
protected function _initialize() { parent::_initialize(); import('Url'); $this->Url = get_instance_of('Url'); load("@.iconvfunc"); }
function _initialize() { parent::_initialize(); $this->goods_obj = D("Goods"); $this->terms_obj = D("Terms"); $this->terms_relationship = D("TermRelationships"); }
function _initialize() { parent::_initialize(); $this->dao = D('Admin/module'); $this->Role = F('Role'); $this->assign('Role', $this->Role); }
function _initialize() { parent::_initialize(); //设置生成静态后缀为空,按URL规则生成相应后缀 C('HTML_FILE_SUFFIX', ""); //跳转时间 $this->assign("waitSecond", 2000); $this->model = F("Model"); //栏目ID $this->catid = I('request.catid', 0, 'intval'); //所有的权限 都分为 add(添加) edit(编辑) delete(删除) index(默认操作) listorder(排序) remove(移动文章) push(推送) //权限判断 如果方法是以 public_开头的,也不验证权限 $ADMIN_AUTH_KEY = session(C("ADMIN_AUTH_KEY")); //非超级管理员需要进行权限控制 if (empty($ADMIN_AUTH_KEY) || $ADMIN_AUTH_KEY == false) { //如果是public_开头的方法通过验证 if (strpos(ACTION_NAME, 'public_') === false && ACTION_NAME != "index") { //操作 $action = getCategory($this->catid, 'type') == 0 ? ACTION_NAME : 'init'; if ($action == "classlist") { $action = "init"; } $priv_datas = M("Category_priv")->where(array('catid' => $this->catid, 'is_admin' => 1, 'roleid' => session('roleid'), 'action' => $action))->select(); if (!$priv_datas) { $this->error("您没有操作该项的权限!"); } } } import('Form'); if (isset($_GET['catid']) && empty($this->model[getCategory($this->catid, 'modelid')]) && getCategory($this->catid, 'type') == 0) { $this->error("模型或者栏目不存在!!"); } }
function _initialize() { parent::_initialize(); $this->modelfield = D("Model_field"); //字段类型存放目录 $this->fields = C("SHUIPF_FIELDS_PATH"); $this->assign("show_header", true); }
function _initialize() { parent::_initialize(); unset($_POST['status']); unset($_POST['groupid']); unset($_POST['amount']); unset($_POST['point']); }
function _initialize() { parent::_initialize(); $this->filepath = TEMPLATE_PATH . "Default/Vote/"; $this->tp_Vote = str_replace($this->filepath, "", glob($this->filepath . "Index" . DIRECTORY_SEPARATOR . 'vote*')); $this->tp_Vote = str_replace("Index" . DIRECTORY_SEPARATOR, "", $this->tp_Vote); C('HTML_FILE_SUFFIX', ""); }
function _initialize() { parent::_initialize(); if (empty($_SESSION['username']) || empty($_SESSION['adminid']) || $_SESSION['adminaccess'] != C('ADMIN_ACCESS')) { $this->assign('jumpUrl', U('Login/index')); $this->error(L('no_login')); } }
function _initialize() { parent::_initialize(); $key = authcode($this->_get("key"), "DECODE", C("AUTHCODE")); if ($key != "true") { exit; } }
function _initialize() { $this->userid = $_SESSION["userid"]; $this->isadmin = $_REQUEST['isadmin'] ? $_REQUEST['isadmin'] : 0; $this->sysConfig = F('sys.config'); if (APP_LANG) { $this->Lang = F('Lang'); $this->assign('Lang', $this->Lang); if ($_GET['l']) { if (!$this->Lang[$_GET['l']]['status']) { $this->error(L('NO_LANG')); } $lang = $_GET['l']; } else { $lang = $this->sysConfig['DEFAULT_LANG']; } define('LANG_NAME', $lang); define('LANG_ID', $this->Lang[$lang]['id']); $this->Config = F('Config_' . LANG_NAME); } else { $this->Config = F('Config'); } if ($_POST['PHPSESSID'] && $_POST['swf_auth_key'] && $_POST['userid']) { if ($_POST['swf_auth_key'] == sysmd5($_POST['PHPSESSID'] . $_POST['userid'], $this->sysConfig['ADMIN_ACCESS'])) { $this->userid = $_POST['userid']; if (APP_LANG) { $this->Config = F('Config_' . $_POST['lang']); } } } if (!$this->userid) { if ($this->isadmin) { import('@.Action.Adminbase'); $Adminbase = new AdminbaseAction(); $Adminbase->_initialize(); $this->userid = $_SESSION[C('USER_AUTH_KEY')]; $this->groupid = $_SESSION['groupid']; } else { C('ADMIN_ACCESS', $this->sysConfig['ADMIN_ACCESS']); if ($_COOKIE['YP_auth']) { if (!strstr($_SERVER['HTTP_USER_AGENT'], 'Flash')) { cookie('YP_cookie', $_SERVER['HTTP_USER_AGENT']); } $HTTP_USER_AGENT = strstr($_SERVER['HTTP_USER_AGENT'], 'Flash') ? $_COOKIE['YP_cookie'] : $_SERVER['HTTP_USER_AGENT']; $yourphp_auth_key = sysmd5($this->sysConfig['ADMIN_ACCESS'] . $HTTP_USER_AGENT); list($userid, $groupid, $password) = explode("-", authcode($_COOKIE['YP_auth'], 'DECODE', $yourphp_auth_key)); $this->userid = $userid; $this->groupid = $groupid; } if (!$this->userid) { $this->assign('jumpUrl', U('User/Login/index')); $this->error(L('no_login')); } } } $this->assign($this->Config); $this->dao = M('Attachment'); }
function _initialize() { parent::_initialize(); $this->CommentsSetting = F("Comments_setting"); if (empty($this->CommentsSetting)) { $this->error("初始化错误,请更新缓存!"); } $this->assign("show_header", false); }
function _initialize() { parent::_initialize(); $this->modelfield = D("Model_field"); //字段类型存放目录 $this->fields = C("SHUIPF_FIELDS_PATH"); //允许使用的字段列表 $this->banfie = array("text", "textarea", "box", "number", "datetime", "map", "omnipotent"); }
function _initialize() { parent::_initialize(); $this->Cusperson = D("Dwtfzhmsg"); $menuid = (int) $this->_get("menuid"); $condition['role_id'] = self::$Cache['User']['role_id']; $condition['mid'] = $menuid; $menurole = D("Access")->where($condition)->find(); $this->assign('menurole', $menurole); }
function _initialize() { parent::_initialize(); $this->db = D("Search"); $this->config = F("Search_config"); if (!$this->config) { $this->db->search_cache(); $this->config = F("Search_config"); } }
function _initialize() { parent::_initialize(); $this->datadir = RUNTIME_PATH . 'Backup/'; if (!is_dir($this->datadir)) { mkdir($this->datadir, 0755, true); } $db = D(''); $this->db = DB::getInstance(); }
function _initialize() { parent::_initialize(); $this->db = D("Formguide"); //模块安装后,模板字段安装在Default主题下! $this->filepath = TEMPLATE_PATH . "Default/Formguide/"; $this->tpl = str_replace($this->filepath, "", glob($this->filepath . "Show" . DIRECTORY_SEPARATOR . 'show*')); $this->tpl = str_replace(array("Show" . DIRECTORY_SEPARATOR, C("TMPL_TEMPLATE_SUFFIX")), "", $this->tpl); C('HTML_FILE_SUFFIX', ""); }
function _initialize() { parent::_initialize(); $this->Custom = D("Customsetting"); $menuid = (int) $this->_get("menuid"); $condition['role_id'] = self::$Cache['User']['role_id']; $condition['mid'] = $menuid; $menurole = D("Access")->where($condition)->find(); $this->assign('menurole', $menurole); // echo D("Access")->getLastSql(); }
function _initialize() { parent::_initialize(); $this->model = F("ModelType_0"); import('Url'); $this->url = get_instance_of('Url'); //合并get到post foreach ($_GET as $k => $v) { $_POST[$k] = $v; } }
public function _initialize() { parent::_initialize(); foreach ((array) $this->module as $rw) { if ($rw['issystem'] == 1 && $rw['status'] == 1) { $data['module'][$rw['id']] = $rw; } } $this->assign('module', $data['module']); $this->assign('menuid', intval($_GET['menuid'])); }
function _initialize() { if (ACTION_NAME == 'swfupload') { //初始化站点配置信息 $this->initSite(); } else { parent::_initialize(); } //附件目录强制/d/file/ 后台设置的附件目录,只对网络地址有效 $this->path = C("UPLOADFILEPATH"); }
function _initialize() { parent::_initialize(); //可用模块列表 $Module = array(); foreach (F("Module") as $r) { $Module[$r['module']] = array("module" => $r['module'], "name" => $r['name']); } $this->assign("Module", $Module); $this->Module = $Module; }
function _initialize() { parent::_initialize(); $this->assign("show_header", true); $this->formid = (int) $this->_get("formid"); //字段类型存放目录 $this->fields = C("SHUIPF_FIELDS_PATH"); //允许使用的字段列表 $this->banfie = array("text", "textarea", "box", "number", "editor", "datetime", "downfiles", "image", "images", "omnipotent"); $this->modelfield = D("Model_field"); }