2023-12-20 08:38:13 +05:30
|
|
|
<?php
|
|
|
|
// Main page
|
|
|
|
|
2024-01-13 05:54:42 +05:30
|
|
|
|
|
|
|
|
2023-12-20 08:38:13 +05:30
|
|
|
$IS_FRONTEND = true;
|
|
|
|
|
|
|
|
// Includes
|
|
|
|
require_once("api/_auth.php");
|
|
|
|
require_once("api/user/index.php");
|
2024-01-13 05:54:42 +05:30
|
|
|
require_once("front/notifications.php");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$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
|
|
|
|
|
|
|
|
|
2023-12-20 08:38:13 +05:30
|
|
|
|
2024-01-13 05:54:42 +05:30
|
|
|
$PICKED_PAGE = null;
|
|
|
|
if (isset($_GET["do"]))
|
|
|
|
$PICKED_PAGE = $_GET["do"];
|
|
|
|
else
|
|
|
|
$PICKED_PAGE = "";
|
2023-12-20 08:38:13 +05:30
|
|
|
|
2024-01-13 05:54:42 +05:30
|
|
|
// Picking current page
|
|
|
|
switch ($PICKED_PAGE) {
|
2024-02-09 02:43:23 +05:30
|
|
|
// Available-on-login pages
|
|
|
|
// Post creation page
|
|
|
|
case "new_post":
|
|
|
|
$PAGE_TITLE = "Create new post";
|
|
|
|
$PAGE_STYLE = "front/styles/main.css";
|
|
|
|
$PAGE_FILE = "front/pages/new_post/page.php";
|
|
|
|
break;
|
2024-02-01 15:50:39 +05:30
|
|
|
// Navigable pages
|
|
|
|
// Common instance statistics
|
|
|
|
case "view_stats":
|
|
|
|
$PAGE_TITLE = "Instance statistics";
|
|
|
|
$PAGE_STYLE = "front/styles/main.css";
|
|
|
|
$PAGE_FILE = "front/pages/stats/page.php";
|
|
|
|
break;
|
2024-01-27 04:13:27 +05:30
|
|
|
// Approved tags viewer
|
|
|
|
case "view_tags":
|
|
|
|
$PAGE_TITLE = "Approved tags list";
|
|
|
|
$PAGE_STYLE = "front/styles/main.css";
|
|
|
|
$PAGE_FILE = "front/pages/tags_viewer/page.php";
|
|
|
|
break;
|
2024-01-15 07:28:29 +05:30
|
|
|
// Registration page
|
|
|
|
case "register":
|
|
|
|
$PAGE_TITLE = "Register";
|
|
|
|
$PAGE_STYLE = "front/styles/main.css";
|
|
|
|
$PAGE_FILE = "front/pages/register/page.php";
|
|
|
|
break;
|
2024-01-13 05:54:42 +05:30
|
|
|
// Login page
|
|
|
|
case "login":
|
|
|
|
$PAGE_TITLE = "Login";
|
|
|
|
$PAGE_STYLE = "front/styles/main.css";
|
|
|
|
$PAGE_FILE = "front/pages/login/page.php";
|
|
|
|
break;
|
|
|
|
// Main page
|
|
|
|
case "index":
|
|
|
|
case "main":
|
|
|
|
default:
|
|
|
|
$PAGE_TITLE = "Index";
|
|
|
|
$PAGE_STYLE = "front/styles/index.css";
|
|
|
|
$PAGE_FILE = "front/pages/index/page.php";
|
|
|
|
}
|
2023-12-20 08:38:13 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<?php require_once("front/head.php"); ?>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="wrapper">
|
|
|
|
<?php
|
2024-01-13 05:54:42 +05:30
|
|
|
require_once($PAGE_FILE);
|
2023-12-22 08:40:49 +05:30
|
|
|
require_once("front/footer.php");
|
2023-12-20 08:38:13 +05:30
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|