当前位置: 首页>>代码示例>>PHP>>正文


PHP HomeController::getLogout方法代码示例

本文整理汇总了PHP中HomeController::getLogout方法的典型用法代码示例。如果您正苦于以下问题:PHP HomeController::getLogout方法的具体用法?PHP HomeController::getLogout怎么用?PHP HomeController::getLogout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HomeController的用法示例。


在下文中一共展示了HomeController::getLogout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index


//.........这里部分代码省略.........
             return View::make('guest.traders.kienthuc')->with('contacts', $contacts)->with('kienthuc', $kienthuc)->with('viewsthreads', $viewsthreads)->with("title", "Chiến lược giao dịch");
         case "sangd":
             $sangd = TinTuc::Select(5, $this->perpage);
             //ajax pagingation sàn giao dịch
             $floortraders['noidung'] = $sangd;
             $floortraders['phantrang'] = $sangd->links();
             if (Request::ajax() && Input::get("type") == "sangd") {
                 $html = View::make("guest.floortrader.ajaxpagination", $floortraders)->render();
                 return Response::json(array('html' => $html));
             }
             //end ajax pagingation sàn giao dịch
             //bv xem nhieu
             $viewsthreads = TinTuc::SelectRelate("views", "", null, 5);
             //ajax pagingation bv xem nhieu
             $xemnhieu['noidung'] = $viewsthreads;
             $xemnhieu['phantrang'] = $viewsthreads->links();
             if (Request::ajax() && Input::get("type") == "xemnhieu") {
                 $html = View::make("guest.relations.ajaxpagination_views", $xemnhieu)->render();
                 return Response::json(array('html' => $html));
             }
             //end ajax pagingation bv xem nhieu
             return View::make('guest.floortrader.index')->with('contacts', $contacts)->with('sangd', $sangd)->with('viewsthreads', $viewsthreads)->with("title", "Sàn giao dịch");
         case "contact":
             $supportContact = Contact::Select(1);
             return View::make('guest.contacts.index')->with('contacts', $contacts)->with("supportContact", $supportContact)->with("title", "Gửi liên hệ");
         case "login":
             if (!Auth::check()) {
                 return View::make('guest.login.index')->with('contacts', $contacts)->with("title", "Trang login");
             } else {
                 return $this->index();
             }
         case "logout":
             if (Auth::check()) {
                 $logout = new HomeController();
                 return $logout->getLogout();
             } else {
                 return $this->index("login");
                 //neu chua login
             }
         case "admin":
             if (Auth::check() && Auth::user()->roles == 1) {
                 return View::make('admin.index')->with("title", "Trang chủ quản lý");
             } else {
                 if (Auth::check() && Auth::user()->roles != 1) {
                     return Redirect::to('/')->with('message_error', 'Vui lòng đăng nhập bằng tài khoản với nhóm quyền phù hợp!');
                 } else {
                     return Redirect::to('login')->with('message_error', 'Vui lòng đăng nhập bằng tài khoản với nhóm quyền phù hợp!');
                 }
             }
         default:
             $forex = TinTuc::Select(1, $this->perpage);
             //ajax pagingation forex
             $tintuc['noidung'] = $forex;
             $tintuc['phantrang'] = $forex->links();
             if (Request::ajax() && Input::get("type") == "forex") {
                 $html = View::make("guest.chienluoc.forex.ajaxpagination", $tintuc)->render();
                 return Response::json(array('html' => $html));
             }
             //end ajax pagingation forex
             $kimloaiquy = TinTuc::Select(2, $this->perpage);
             //ajax pagingation kim loai quy
             $klq['noidung'] = $kimloaiquy;
             $klq['phantrang'] = $kimloaiquy->links();
             if (Request::ajax() && Input::get("type") == "kimloaiquy") {
                 $html = View::make("guest.chienluoc.chienluocvang.ajaxpagination_klq", $klq)->render();
                 return Response::json(array('html' => $html));
             }
             //end ajax pagination kim loai quy
             $hanghoa = TinTuc::Select(3, $this->perpage);
             //ajax pagingation hang hoa
             $hh['noidung'] = $hanghoa;
             $hh['phantrang'] = $hanghoa->links();
             if (Request::ajax() && Input::get("type") == "hanghoa") {
                 $html = View::make("guest.chienluoc.chienluocvang.ajaxpagination_hh", $hh)->render();
                 return Response::json(array('html' => $html));
             }
             //end ajax pagingation hang hoa
             $cophieu = TinTuc::Select(4, $this->perpage);
             //ajax pagingation co phieu
             $cp['noidung'] = $cophieu;
             $cp['phantrang'] = $cophieu->links();
             if (Request::ajax() && Input::get("type") == "cophieu") {
                 $html = View::make("guest.chienluoc.chienluocvang.ajaxpagination_cp", $cp)->render();
                 return Response::json(array('html' => $html));
             }
             //end ajax pagingation co phieu
             $chienLuoc = TinTuc::Select(0);
             //bv moi nhat
             $newthreads = TinTuc::SelectRelate("new", "", null, 5);
             //ajax pagingation bv moi nhat
             $bvm['noidung'] = $newthreads;
             $bvm['phantrang'] = $newthreads->links();
             if (Request::ajax() && Input::get("type") == "baivietmoi") {
                 $html = View::make("guest.relations.ajaxpagination_new", $bvm)->render();
                 return Response::json(array('html' => $html));
             }
             //end ajax pagingation bv moi nhat
             return View::make('guest.index')->with('contacts', $contacts)->with('chienLuoc', $chienLuoc)->with('forex', $forex)->with('kimloaiquy', $kimloaiquy)->with('hanghoa', $hanghoa)->with('cophieu', $cophieu)->with('newthreads', $newthreads)->with("title", "Trang chủ Forex");
     }
 }
开发者ID:destryanto,项目名称:forex-web,代码行数:101,代码来源:GuestController.php


注:本文中的HomeController::getLogout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。