| @@ 7-27 (lines=21) @@ | ||
| 4 | ||
| 5 | use Frames, Frames\Status, Modules, Request, Template; |
|
| 6 | ||
| 7 | abstract class Auth extends Frames\Admin\Section { |
|
| 8 | ||
| 9 | protected $layout = 'Form'; |
|
| 10 | ||
| 11 | # Auth area main method |
|
| 12 | ||
| 13 | protected function area() { |
|
| 14 | ||
| 15 | # Check auth |
|
| 16 | ||
| 17 | if (Modules\Auth::check()) Request::redirect(INSTALL_PATH . '/admin'); |
|
| 18 | ||
| 19 | # Handle request |
|
| 20 | ||
| 21 | if (Template::isBlock($result = $this->handle())) return $this->displayPage($result, STATUS_CODE_401); |
|
| 22 | ||
| 23 | # ------------------------ |
|
| 24 | ||
| 25 | return Status::error404(); |
|
| 26 | } |
|
| 27 | } |
|
| 28 | } |
|
| 29 | ||
| @@ 7-25 (lines=19) @@ | ||
| 4 | ||
| 5 | use Frames, Frames\Status, Modules, Request, Template; |
|
| 6 | ||
| 7 | abstract class Auth extends Frames\Site\Section { |
|
| 8 | ||
| 9 | # Auth area main method |
|
| 10 | ||
| 11 | protected function area() { |
|
| 12 | ||
| 13 | # Check auth |
|
| 14 | ||
| 15 | if (Modules\Auth::check()) Request::redirect(INSTALL_PATH . '/profile'); |
|
| 16 | ||
| 17 | # Handle request |
|
| 18 | ||
| 19 | if (Template::isBlock($result = $this->handle())) return $this->displayPage($result, STATUS_CODE_401); |
|
| 20 | ||
| 21 | # ------------------------ |
|
| 22 | ||
| 23 | return Status::error404(); |
|
| 24 | } |
|
| 25 | } |
|
| 26 | } |
|
| 27 | ||