|
|
|
|
@ -64,45 +64,17 @@ class HomeController extends BaseController
|
|
|
|
|
|
|
|
|
|
public function page404($request, $response, $args)
|
|
|
|
|
{
|
|
|
|
|
$pics=scandir(BASE_PATH."/public/theme/".(Auth::getUser()->isLogin==false?Config::get("theme"):Auth::getUser()->theme)."/images/error/404/");
|
|
|
|
|
|
|
|
|
|
if (count($pics)>2) {
|
|
|
|
|
$pic=$pics[rand(2, count($pics)-1)];
|
|
|
|
|
} else {
|
|
|
|
|
$pic="4041.png";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$newResponse = $response->withStatus(404);
|
|
|
|
|
$newResponse->getBody()->write($this->view()->assign("pic", "/theme/".(Auth::getUser()->isLogin==false?Config::get("theme"):Auth::getUser()->theme)."/images/error/404/".$pic)->display('404.tpl'));
|
|
|
|
|
return $newResponse;
|
|
|
|
|
return $this->view()->display('404.tpl');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function page405($request, $response, $args)
|
|
|
|
|
{
|
|
|
|
|
$pics=scandir(BASE_PATH."/public/theme/".(Auth::getUser()->isLogin==false?Config::get("theme"):Auth::getUser()->theme)."/images/error/405/");
|
|
|
|
|
if (count($pics)>2) {
|
|
|
|
|
$pic=$pics[rand(2, count($pics)-1)];
|
|
|
|
|
} else {
|
|
|
|
|
$pic="4051.png";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$newResponse = $response->withStatus(405);
|
|
|
|
|
$newResponse->getBody()->write($this->view()->assign("pic", "/theme/".(Auth::getUser()->isLogin==false?Config::get("theme"):Auth::getUser()->theme)."/images/error/405/".$pic)->display('405.tpl'));
|
|
|
|
|
return $newResponse;
|
|
|
|
|
return $this->view()->display('4405.tpl');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function page500($request, $response, $args)
|
|
|
|
|
{
|
|
|
|
|
$pics=scandir(BASE_PATH."/public/theme/".(Auth::getUser()->isLogin==false?Config::get("theme"):Auth::getUser()->theme)."/images/error/500/");
|
|
|
|
|
if (count($pics)>2) {
|
|
|
|
|
$pic=$pics[rand(2, count($pics)-1)];
|
|
|
|
|
} else {
|
|
|
|
|
$pic="5001.png";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$newResponse = $response->withStatus(500);
|
|
|
|
|
$newResponse->getBody()->write($this->view()->assign("pic", "/theme/".(Auth::getUser()->isLogin==false?Config::get("theme"):Auth::getUser()->theme)."/images/error/500/".$pic)->display('500.tpl'));
|
|
|
|
|
return $newResponse;
|
|
|
|
|
return $this->view()->display('500.tpl');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function codepay_callback($request, $response, $args)
|
|
|
|
|
|