This repository has been archived by the owner on May 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
109 lines (100 loc) · 3.25 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
require_once 'php/include/functs.php';
if($user = test_login()) {
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="Chih-Yung Liang">
<title>Flight-managing System</title>
<link rel="stylesheet" href="css/lib/jquery.sidr.<?=$user->power == 1 ? "dark" : "light"?>.css">
<link rel="stylesheet" href="css/lib/bootstrap.min.css">
<link rel="stylesheet" href="css/lib/jquery.remodal.css">
<link rel="stylesheet" href="css/lib/highlight/shCoreMidnight.css">
<link rel="stylesheet" href="css/lib/highlight/shThemeMidnight.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/lib/custom-theme/jquery-ui-1.10.4.custom.min.css">
</head>
<body><div class="remodal-bg">
<div id="sidr">
<h1>Flight-managing System</h1>
<ul>
<li>
<a href="#" data-target="flight">Flights</a>
<ul>
<li><a href="#" data-target="airport">Airports</a></li>
<li><a href="#" data-target="city">Citys</a></li>
<li><a href="#" data-target="country">Countrys</a></li>
</ul>
</li>
<?php if($user->power == 1) { ?>
<li><a href="#" data-target="user">Users management</a></li>
<?php } ?>
<li>
<a>Account management</a>
<ul>
<li><a href="#" data-target="profile">Profile setting</a></li>
<?php if($user->power != 1) { ?>
<li><a href="#">Account upgrading</a></li>
<?php } ?>
</ul>
</li>
<li><a href="#" data-target="logout">Logout</a></li>
</ul>
<h2>Ticket</h2>
<ul>
<li><a href="#" data-target="ticket">Ticket searching</a></li>
<li><a href="#" data-target="track">Tracked tickets</a></li>
</ul>
<h2>Login as</h2>
<p>Name: <?=filter_var($user->Name, FILTER_SANITIZE_SPECIAL_CHARS)?></p>
<p>Email: <?=filter_var($user->email, FILTER_SANITIZE_SPECIAL_CHARS)?></p>
<p>Identity: <?=$user->power == 1 ? "Administrator" : "User"?></p>
</div>
<div class="container">
<h1 class="text-center">
Flight-managing System<br>
<small class="funct">Welcome</small>
</h1>
<hr>
<div id="main"></div>
<br><a href="#" id="sql_button" class="btn btn-default" data-toggle="modal" data-target="#modal-sql">Show SQL</a>
</div>
<div class="modal fade" id="modal-sql">
<div class="modal-dialog modal-lg">
<div class="modal-content" style="background-color: #0f192a">
<div class="modal-header" style="color: white">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">SQL</h4>
</div>
<div class="modal-body" id="sql">
</div>
</div>
</div>
</div>
<script>
var user = <?=json_encode($user)?>;
</script>
<script src="js/lib/jquery-1.11.1.min.js"></script>
<script src="js/lib/jquery-ui-1.10.4.custom.min.js"></script>
<script src="js/lib/jquery.sidr.min.js"></script>
<script src="js/lib/jquery.remodal.min.js"></script>
<script src="js/lib/bootstrap.min.js"></script>
<script src="js/lib/highlight/shCore.js"></script>
<script src="js/lib/highlight/shBrushSql.js"></script>
<script src="js/jquery-table.js"></script>
<script src="js/jquery-ticket.js"></script>
<script src="js/jquery-airport.js"></script>
<script src="js/airport-table.js"></script>
<script src="js/flight-table.js"></script>
<script src="js/user-table.js"></script>
<script src="js/menu.js"></script>
<script src="js/abPost.js"></script>
</div></body>
</html>
<?php
} else {
include 'pages/intro.php';
}
?>