public function EditProduct($productId) { $model["title"] = "Thêm mới sản phẩm"; $model["content_view"] = "Admin/AdminProduct/ProductDetail"; $content = null; if (isset($productId)) { $content = $productId; } $data = new AdminMasterModel(); $data->Init($content, adminParentMenuEnum::Product, adminChildMenuEnum::ListManagement); $model["data"] = $data; $this->load->view("Admin/Shared/_Layout", $model); }
public function Index() { $checkLogin = new UserLoginModel(); if (!$checkLogin->checkUserIsLogined()) { $this->load->helper('url'); redirect(site_url(array('AdminLogin'))); } $temp['title'] = "Trang chủ quản trị"; $temp['content_view'] = 'Admin/AdminHome/Index'; $data = new AdminMasterModel(); $data->Init(null, adminParentMenuEnum::Home, null); $temp['data'] = $data; $this->load->view("Admin/Shared/_Layout", $temp); }
public function AddBanner() { $checkLogin = new UserLoginModel(); if (!$checkLogin->checkUserIsLogined()) { $this->load->helper('url'); redirect(site_url(array('AdminLogin'))); } $temp['title'] = "Thêm mới banner"; $temp['content_view'] = 'Admin/AdminBanner/AddBanner'; $content = null; $data = new AdminMasterModel(); $data->Init($content, adminParentMenuEnum::Banner, adminChildMenuEnum::Add); $temp['data'] = $data; $this->load->view("Admin/Shared/_Layout", $temp); }
public function Index() { //check admin login $checkLogin = new UserLoginModel(); if (!$checkLogin->checkUserIsLogined()) { $this->load->helper('url'); redirect(site_url(array('AdminLogin'))); } //end check $temp['title'] = "Danh sách thuộc tính"; $temp['content_view'] = 'Admin/AdminAttribute/Index'; $data = new AdminMasterModel(); $content = null; $data->Init($content, adminParentMenuEnum::Attribute, adminChildMenuEnum::ListManagement); $temp['data'] = $data; $this->load->view("Admin/Shared/_Layout", $temp); }
public function EditProvider($proId) { $checkLogin = new UserLoginModel(); if (!$checkLogin->checkUserIsLogined()) { $this->load->helper('url'); redirect(site_url(array('AdminLogin'))); } $temp['title'] = "Sửa thông tin nhà cung cấp sản phẩm"; $temp['content_view'] = 'Admin/AdminProvider/EditProvider'; $data = new AdminMasterModel(); $content = $proId; $data->Init($content, null, adminChildMenuEnum::ListManagement); $temp['data'] = $data; $this->load->view("Admin/Shared/_Layout", $temp); }
public function EditCategory($id) { $data = new AdminMasterModel(); $content = new EditingCategoryModel(); $content->Init($id); $data->Init($content, adminParentMenuEnum::User, adminChildMenuEnum::ListManagement); $temp['data'] = $data; $this->load->view("Admin/AdminCategory/EditingCategory", $temp); }
public function AddingProcess() { // $name = $this->input->post("username", true); $email = $this->input->post("email", true); $password = md5($this->input->post("password", true)); $confirmPassword = md5($this->input->post("passwordConfirm", true)); if ($password != $confirmPassword) { return null; } else { $model = new AddingUserModel(); $model->SetUserInfo($name, $email, $password); $id = $model->addingUser->Id; $result = $model->Insert2Db(); if ($result == 0) { echo -1; } else { $data = new AdminMasterModel(); $content = $model; $data->Init($content, adminParentMenuEnum::User, adminChildMenuEnum::ListManagement); $temp['data'] = $data; $this->load->view("Admin/AdminUser/UpdateUserList", $temp); } } }