From 4aae0ec50ed7be0fdfcf741dac58c84fcf243409 Mon Sep 17 00:00:00 2001 From: themohooks <81331307+themohooks@users.noreply.github.com> Date: Thu, 18 Jul 2024 14:24:19 +0300 Subject: [PATCH] add rules support --- app/Controllers/MainController.php | 5 ++++ app/Core/Routes.php | 1 + rules.txt | 1 + views/pages/Register.php | 3 +- views/pages/Rules.php | 45 ++++++++++++++++++++++++++++++ 5 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 rules.txt create mode 100644 views/pages/Rules.php diff --git a/app/Controllers/MainController.php b/app/Controllers/MainController.php index b9ce584..da4e03d 100644 --- a/app/Controllers/MainController.php +++ b/app/Controllers/MainController.php @@ -21,6 +21,11 @@ class MainController { Page::set('About'); + } + public static function rules() + { + Page::set('Rules'); + } public static function logout() diff --git a/app/Core/Routes.php b/app/Core/Routes.php index 99f320b..fabcd62 100644 --- a/app/Core/Routes.php +++ b/app/Core/Routes.php @@ -20,6 +20,7 @@ class Routes Router::post('/api/login', 'ApiController@login'); Router::post('/api/register', 'ApiController@register'); Router::get('/about', 'MainController@about'); + Router::get('/rules', 'MainController@rules'); diff --git a/rules.txt b/rules.txt new file mode 100644 index 0000000..8071f28 --- /dev/null +++ b/rules.txt @@ -0,0 +1 @@ +Основные правила сайта. \ No newline at end of file diff --git a/views/pages/Register.php b/views/pages/Register.php index 9ed0558..2b7b7e6 100644 --- a/views/pages/Register.php +++ b/views/pages/Register.php @@ -36,6 +36,7 @@ if (Auth::userid() > 0) {
+Регистрируясь на сервере =NGALLERY['root']['title']?>, вы принимаете его правила.
+ Правила сайта+ +
+
+
+
+ |
+
+
+