Реструктура стилей, страница логина, уведомления
This commit is contained in:
45
index.php
45
index.php
@@ -1,16 +1,52 @@
|
||||
<?php
|
||||
// Main page
|
||||
|
||||
|
||||
|
||||
$IS_FRONTEND = true;
|
||||
|
||||
// Includes
|
||||
require_once("api/_auth.php");
|
||||
require_once("api/user/index.php");
|
||||
require_once("api/post/index.php");
|
||||
require_once("front/notifications.php");
|
||||
|
||||
|
||||
|
||||
$PAGE_TITLE = "Index"; // TODO
|
||||
$PAGE_TITLE = null; // String that will be showed as "E949: $PAGE_TITLE"
|
||||
$PAGE_STYLE = null; // Path to file with style that will be included
|
||||
$PAGE_FILE = null; // Path to main body file that will be included
|
||||
|
||||
|
||||
|
||||
$PICKED_PAGE = null;
|
||||
if (isset($_GET["do"]))
|
||||
$PICKED_PAGE = $_GET["do"];
|
||||
else
|
||||
$PICKED_PAGE = "";
|
||||
|
||||
$WHAT_PAGE_IS_CURRENT = array(
|
||||
"main" => false,
|
||||
"login" => false
|
||||
);
|
||||
|
||||
// Picking current page
|
||||
switch ($PICKED_PAGE) {
|
||||
// Login page
|
||||
case "login":
|
||||
$WHAT_PAGE_IS_CURRENT["login"] = true;
|
||||
$PAGE_TITLE = "Login";
|
||||
$PAGE_STYLE = "front/styles/main.css";
|
||||
$PAGE_FILE = "front/pages/login/page.php";
|
||||
break;
|
||||
// Main page
|
||||
case "index":
|
||||
case "main":
|
||||
default:
|
||||
$WHAT_PAGE_IS_CURRENT["main"] = true;
|
||||
$PAGE_TITLE = "Index";
|
||||
$PAGE_STYLE = "front/styles/index.css";
|
||||
$PAGE_FILE = "front/pages/index/page.php";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,10 +59,7 @@ $PAGE_TITLE = "Index"; // TODO
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<?php
|
||||
// TODO: different pages
|
||||
require_once("front/pages/index/random_meme.php");
|
||||
require_once("front/pages/index/searchbox.php");
|
||||
require_once("front/pages/index/counter.php");
|
||||
require_once($PAGE_FILE);
|
||||
require_once("front/footer.php");
|
||||
?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user