コード例 #1
0
 public function infoaccount()
 {
     if (Session::has("login_userID")) {
         $menu = MenuController::getMenu();
         $categorys = CategoryController::getCategory();
         $info = InfoController::getInfo();
         $convert = new convertString();
         //if(Session::has("login_userID")){
         //Session::get("login_userID")
         $user = UserController::getuser(Session::get("login_userID"));
         $header = array("title" => "Thông tin tài khoản - phụ kiện thời trang", "keyword" => "Thông tin tài khoản-phụ kiện thời trang", "description" => "Thông tin tài khoản-phụ kiện thời trang");
         foreach ($info as $values) {
             if ($values->name == "keyword" && $values->contents != "") {
                 $header["keyword"] = $values->contents;
             }
             if ($values->name == "description" && $values->contents != "") {
                 $header["description"] = $values->contents;
             }
         }
         if (count($menu) > 0) {
             $menu = $this->ConvertMenuToArray($menu);
         }
         return view::make("info-account", array('menu' => $menu, "categorys" => $categorys, "info" => $info, "convert" => $convert, "header" => $header, "user" => $user));
     } else {
         return Redirect::to("registration.html");
     }
     //}
     //else
     //return $this->registration();
 }