mirror of
https://github.com/claradex/nativegallery.git
synced 2024-12-22 16:41:04 +03:00
Правила теперь в 4 новых файлах
Макс у тебя очень крутая MVC система!!!!!!!!!!!!
This commit is contained in:
parent
87c7fa537b
commit
2c5f42d4d3
5 changed files with 137 additions and 11 deletions
|
@ -24,21 +24,15 @@ 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');
|
||||
Page::set('PublicationRules');
|
||||
}
|
||||
public static function photoRules()
|
||||
{
|
||||
$_GLOBAL['rules'] = '/config/photoRules.html';
|
||||
$_GLOBAL['title'] = 'Правила подписи фотографий';
|
||||
Page::set('Rules');
|
||||
Page::set('PhotoRules');
|
||||
}
|
||||
public static function videoRules()
|
||||
{
|
||||
|
|
44
views/pages/PhotoRules.php
Normal file
44
views/pages/PhotoRules.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
use \App\Services\{Auth, DB, Date};
|
||||
use \App\Models\User;
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
|
||||
<head>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div id="backgr"></div>
|
||||
<table class="tmain">
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Navbar.php'); ?>
|
||||
<td class="main">
|
||||
<h1>Правила подписи фотографий</h1>
|
||||
|
||||
<div class="p20" style="padding:20px">
|
||||
<?php
|
||||
$myfile = fopen($_SERVER['DOCUMENT_ROOT'].'/config/photoRules.html', "r") or die("Unable to open file!");
|
||||
echo fread($myfile,filesize($_SERVER['DOCUMENT_ROOT'].'/config/photoRules.html'));
|
||||
fclose($myfile);
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Footer.php'); ?>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
44
views/pages/PublicationRules.php
Normal file
44
views/pages/PublicationRules.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
use \App\Services\{Auth, DB, Date};
|
||||
use \App\Models\User;
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
|
||||
<head>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div id="backgr"></div>
|
||||
<table class="tmain">
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Navbar.php'); ?>
|
||||
<td class="main">
|
||||
<h1>Правила отбора фотографий</h1>
|
||||
|
||||
<div class="p20" style="padding:20px">
|
||||
<?php
|
||||
$myfile = fopen($_SERVER['DOCUMENT_ROOT'].'/config/publicationRules.html', "r") or die("Unable to open file!");
|
||||
echo fread($myfile,filesize($_SERVER['DOCUMENT_ROOT'].'/config/publicationRules.html'));
|
||||
fclose($myfile);
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Footer.php'); ?>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -19,12 +19,12 @@ use \App\Models\User;
|
|||
<table class="tmain">
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Navbar.php'); ?>
|
||||
<td class="main">
|
||||
<h1><?= $_GLOBAL['title'] ?></h1>
|
||||
<h1>Правила сайта</h1>
|
||||
|
||||
<div class="p20" style="padding:20px">
|
||||
<?php
|
||||
$myfile = fopen($_SERVER['DOCUMENT_ROOT'].$_GLOBAL['rules'], "r") or die("Unable to open file!");
|
||||
echo fread($myfile,filesize($_SERVER['DOCUMENT_ROOT'].$_GLOBAL['rules']));
|
||||
$myfile = fopen($_SERVER['DOCUMENT_ROOT'].'/config/rules.html', "r") or die("Unable to open file!");
|
||||
echo fread($myfile,filesize($_SERVER['DOCUMENT_ROOT'].'/config/rules.html'));
|
||||
fclose($myfile);
|
||||
?>
|
||||
</div>
|
||||
|
|
44
views/pages/VideoRules.php
Normal file
44
views/pages/VideoRules.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
use \App\Services\{Auth, DB, Date};
|
||||
use \App\Models\User;
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
|
||||
<head>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div id="backgr"></div>
|
||||
<table class="tmain">
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Navbar.php'); ?>
|
||||
<td class="main">
|
||||
<h1>Правила видеотеки</h1>
|
||||
|
||||
<div class="p20" style="padding:20px">
|
||||
<?php
|
||||
$myfile = fopen($_SERVER['DOCUMENT_ROOT'].'/config/videoRules.html', "r") or die("Unable to open file!");
|
||||
echo fread($myfile,filesize($_SERVER['DOCUMENT_ROOT'].'/config/videoRules.html'));
|
||||
fclose($myfile);
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Footer.php'); ?>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in a new issue