diff --git a/app/Controllers/MainController.php b/app/Controllers/MainController.php index 3796fa0..e0192f4 100644 --- a/app/Controllers/MainController.php +++ b/app/Controllers/MainController.php @@ -24,8 +24,27 @@ class MainController } public static function rules() { + $_GLOBAL['rules'] = '/config/rules.html'; + $_GLOBAL['title'] = 'Правила сайта'; + Page::set('Rules'); + } + public static function publicationRules() + { + $_GLOBAL['rules'] = '/config/publicationRules.html'; + $_GLOBAL['title'] = 'Правила отбора фотографий'; + Page::set('Rules'); + } + public static function photoRules() + { + $_GLOBAL['rules'] = '/config/photoRules.html'; + $_GLOBAL['title'] = 'Правила подписи фотографий'; + Page::set('Rules'); + } + public static function videoRules() + { + $_GLOBAL['rules'] = '/config/videoRules.html'; + $_GLOBAL['title'] = 'Правила видеотеки'; Page::set('Rules'); - } public static function update() { diff --git a/app/Core/Routes.php b/app/Core/Routes.php index 5f662a3..4e662f0 100644 --- a/app/Core/Routes.php +++ b/app/Core/Routes.php @@ -20,6 +20,9 @@ class Routes Router::post('/api/register', 'ApiController@register'); Router::get('/about', 'MainController@about'); Router::get('/rules', 'MainController@rules'); + Router::get('/rules/pub', 'MainController@publicationRules'); + Router::get('/rules/photo', 'MainController@photoRules'); + Router::get('/rules/video', 'MainController@videoRules'); Router::get('/update', 'MainController@update'); Router::get('/top30', 'MainController@top30'); diff --git a/config/photoRules.html b/config/photoRules.html new file mode 100644 index 0000000..1ad44c6 --- /dev/null +++ b/config/photoRules.html @@ -0,0 +1 @@ +Правила подписи фотографий \ No newline at end of file diff --git a/config/publicationRules.html b/config/publicationRules.html new file mode 100644 index 0000000..4079089 --- /dev/null +++ b/config/publicationRules.html @@ -0,0 +1 @@ +Правила публикации фотографий \ No newline at end of file diff --git a/config/rules.html b/config/rules.html new file mode 100644 index 0000000..a7c0202 --- /dev/null +++ b/config/rules.html @@ -0,0 +1 @@ +Основные правила сайта. \ No newline at end of file diff --git a/config/videoRules.html b/config/videoRules.html new file mode 100644 index 0000000..23b02e6 --- /dev/null +++ b/config/videoRules.html @@ -0,0 +1 @@ +Правила видеокаталога \ No newline at end of file diff --git a/rules.txt b/rules.txt deleted file mode 100644 index 8071f28..0000000 --- a/rules.txt +++ /dev/null @@ -1 +0,0 @@ -Основные правила сайта. \ No newline at end of file diff --git a/views/components/Footer.php b/views/components/Footer.php index b4c28ea..42399ab 100644 --- a/views/components/Footer.php +++ b/views/components/Footer.php @@ -1,9 +1,19 @@
Aloha, Hawaii! | PHP =phpversion()?> | MySQL =DB::query('SELECT VERSION()')[0]['VERSION()']?>
+Aloha, Hawaii! | PHP =phpversion()?> | MySQL =DB::query('SELECT VERSION()')[0]['VERSION()']?> | Версия =get_current_git_commit ()?>
Главная Личный кабинет Правила О сервере
- Правила сайта+= $_GLOBAL['title'] ?> |