This repository was archived by the owner on Jul 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathindex.php
More file actions
73 lines (73 loc) · 2.45 KB
/
Copy pathindex.php
File metadata and controls
73 lines (73 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
// [未知表白墙]
// Copyright (C) 2021, 吴先森
// 本程序是一个自由软件,你可以重新分发它,可以修改它,但要遵守GPL 2.0版本或者后续其他版本。
// 我们希望本程序是有用的,但是我们不保证它能用,不保证它好用,我们不提供任何保证。
// 更多请见GPL全文,如果理解不了,找人话版看看。
// 按道理你在得到本软件时,应该已经得到一份GPL,如果你没找到,写信给自由软件基金会(FSF):
// 51 Franklin Street, Fifth Floor, Boston, MA 02110‐1301, USA
// i@mr-wu.top
error_reporting(0);
include('./config.php');
include('./includes/function.php');
if ($REWRITE) {
$pageName = explode("/", $_GET['uri'])[1];
$cardID = explode("/", $_GET['uri'])[2];
parse_str($_GET['args'], $QueryArr);
} else {
$pageName = $_GET['page'];
}
if (empty($QueryArr) && empty($_GET['uri'])) {
$QueryArr = $_GET;
$cardID = $QueryArr['id'];
}
$templateMode = empty($QueryArr['_pjax']);
$siteTitle = getInfo('title');
switch ($pageName) {
case "":
include('./pages/homepage.php');
listActive('home');
break;
case "submit":
include('./pages/submit.php');
listActive('submit');
break;
case "more":
include('./pages/more.php');
listActive('more');
break;
case "about":
include('./pages/about.php');
listActive('about');
break;
case "card":
include('./pages/card.php');
break;
case "admin":
if ($_COOKIE['loveway_token'] == md5($ADMIN_USER . $ADMIN_PASS . 'KAGAMINE WORLD!' . date('Y-m-d', time()))) {
switch ($cardID) {
case '':
include('./pages/admin/homepage.php');
break;
case 'general':
include('./pages/admin/general.php');
break;
case 'confession':
include('./pages/admin/confession.php');
break;
default:
$templateMode = false;
include('./pages/404.php');
}
} else {
include('./pages/login.php');
}
break;
default:
$templateMode = false;
include('./pages/404.php');
}
echo titleChange();
if ($templateMode) {
include('./includes/footer.php');
}