-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
68 lines (64 loc) 路 2.01 KB
/
index.php
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="dist/app.css">
<script type="module" src="dist/app.js" defer></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet">
<title>Noteuniv</title>
</head>
<body class="bg-nu-gray-100">
<?php
function getSVG($file)
{
$path = "./src/assets/images/";
$fullpath = $path . $file;
if (file_exists($fullpath)) {
echo file_get_contents($fullpath);
} else {
echo 'File not found';
}
}
if (!empty($_GET)) {
$page = $_GET['p'];
if ($page) {
?>
<div class="flex w-full overflow-hidden">
<?php
include("./views/parts/sidebar.php");
?>
<div class="h-screen max-h-screen flex flex-col flex-grow min-w-0 overflow-x-hidden overflow-y-auto">
<div class="flex-grow">
<?php
include("./views/parts/header.php");
$file = "./views/" . $page . ".php";
if (file_exists($file)) {
?>
<div class="flex-grow">
<?php
include($file);
?>
</div>
</div>
<?php
} else {
echo '404';
}
include("./views/parts/footer.php");
return;
?>
</div>
</div>
<?php
}
}
include("./views/login.php");
?>
</body>
</html>