diff --git a/app/Controllers/AdminController.php b/app/Controllers/AdminController.php new file mode 100644 index 0000000..e69de29 diff --git a/app/Controllers/MainController.php b/app/Controllers/MainController.php index 782b392..361a3d5 100644 --- a/app/Controllers/MainController.php +++ b/app/Controllers/MainController.php @@ -15,6 +15,7 @@ class MainController public static function i() { Page::set('Main'); + } public static function logout() diff --git a/app/Services/Router.php b/app/Services/Router.php index 14c7c7f..4ad11ba 100644 --- a/app/Services/Router.php +++ b/app/Services/Router.php @@ -45,7 +45,6 @@ class Router } public static function route($route, $path_to_include) { - // Определение корневой директории $root = $_SERVER['DOCUMENT_ROOT']; // Обработка случая, когда маршрут - 404 diff --git a/ngallery-example.yaml b/ngallery-example.yaml index 2ba6c80..2f1150f 100644 --- a/ngallery-example.yaml +++ b/ngallery-example.yaml @@ -2,6 +2,8 @@ ngallery: root: title: "NativeGallery" logo: "/static/img/logosmall.png" + description: "" + keywords: "" maintenance: false debug: true botkey: '' diff --git a/views/components/Navbar.php b/views/components/Navbar.php index 13bd6bc..9610aa4 100644 --- a/views/components/Navbar.php +++ b/views/components/Navbar.php @@ -68,7 +68,7 @@ if (NGALLERY['root']['title'] != null) { + if (Auth::userid() <= 0) { ?>
  • Войти
  • Регистрация
  • diff --git a/views/pages/Login.php b/views/pages/Login.php index 231db1e..636dbe9 100644 --- a/views/pages/Login.php +++ b/views/pages/Login.php @@ -1,3 +1,9 @@ + 0) { + Router::redirect('/'); +} +?> diff --git a/views/pages/Photo.php b/views/pages/Photo.php index f174ab5..6719bb6 100644 --- a/views/pages/Photo.php +++ b/views/pages/Photo.php @@ -14,7 +14,12 @@ $photouser = new \App\Models\User($photo->i('user_id')); - + + + + + + diff --git a/views/pages/Register.php b/views/pages/Register.php index 1cf229b..0433a1f 100644 --- a/views/pages/Register.php +++ b/views/pages/Register.php @@ -1,3 +1,9 @@ + 0) { + Router::redirect('/'); +} +?> @@ -14,6 +20,8 @@ +

    Регистрация

    @@ -80,6 +88,11 @@ });
    + +
    +

    К сожалению, регистрация на сервере запрещена.

    +