function Update() { $_POST["config"] = serialize($_POST["config"]); $map['type'] = 0; $this->country = D('Region')->where($map)->findall(); parent::Update(); }
function _initialize() { parent::_initialize(); // 获取数据库对象实例 $this->db = Db::getInstance(); $this->dbName = C('DB_NAME'); }
public function Update() { if (!$_POST['type'] && $_POST['type2']) { $_POST['type'] = $_POST['type2']; } $return[] = array('text' => '添加新广告', 'link' => U('Ad/add')); $return[] = array('text' => '继续编辑该广告', 'link' => U('Ad/edit', array('id' => $_POST['id']))); $this->assign('return', $return); parent::Update(); }
function _initialize() { parent::_initialize(); import("ORG.Io.Dir"); import("ORG.Util.Image"); set_time_limit(0); $this->products_image_path = "./Public/Uploads/Products"; $this->products_temp_path = "./Public/Uploads/Temp"; header("Content-Type:text/html; charset=utf-8"); }
function _initialize() { header("Content-Type:text/html; charset=utf-8"); $this->roletree = get_roletree_arr(); $this->nodetree = get_nodetree_arr(); $this->brandtree = get_brand_tree(); //setcookie('think_template','default',time()+3600,'/'); self::$Model = D("Cate"); $this->catetree = self::$Model->get_catetree_arr(); self::$Model = D("Type_cate"); $this->type_id = self::$Model->where("status=1")->order("id")->findall(); self::$Model = D("Countries"); $this->countries = self::$Model->getlist(); //定义模型 if (in_array(MODULE_NAME, array('Brand', 'Cate', 'Node', 'Products', 'Role', 'Setting', 'User', 'Ad', 'Currencies', 'Members', 'Orders', 'Article', 'Article_cate', 'Down', 'Down_cate', 'Products_ask', 'Shipping', 'Shipping_area', 'Fee', 'Coupon'))) { $this->dao = D(MODULE_NAME); } $this->userName = Session::get('loginUserName'); //echo APP_NAME; // 用户权限检查 if (C('USER_AUTH_ON') && !in_array(MODULE_NAME, explode(',', C('NOT_AUTH_MODULE')))) { import('@.ORG.RBAC'); if (!RBAC::AccessDecision(GROUP_NAME)) { //检查认证识别号 if (!$_SESSION[C('USER_AUTH_KEY')]) { //跳转到认证网关 redirect(PHP_FILE . C('USER_AUTH_GATEWAY')); } // 没有权限 抛出错误 if (C('RBAC_ERROR_PAGE')) { // 定义权限错误页面 redirect(C('RBAC_ERROR_PAGE')); } else { if (C('GUEST_AUTH_ON')) { $this->assign('jumpUrl', PHP_FILE . C('USER_AUTH_GATEWAY')); } // 提示错误信息 $this->error(L('_VALID_ACCESS_')); } } } }
function _initialize() { parent::_initialize(); $this->virtual_catelist = get_virtualcat_arr(); }
function Delete() { $map['orders_id'] = array('in', $_GET['id']); $dao = D("Orders_products"); $dao->where($map)->delete(); parent::Delete(); }
function _initialize() { parent::_initialize(); $dao = D('Article'); $this->article_list = $dao->select(); }
function setimg_empty() { $this->dao = D("Payment"); parent::setimg_empty(); }
function __construct() { parent::__construct(); $this->xmlpath = __ROOT__ . './sitemap.xml'; }
function discountdel() { $map['id'] = $_GET['id']; self::$Model = D("Discount"); self::$Model->where($map)->delete(); parent::Delete(); }