本文整理匯總了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");
}
}