-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
150 lines (137 loc) · 6.16 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?php
//Initialise variables
$header = $link = "";
$header_err = $link_err = "";
// Initialize the session
session_start();
// If session variable is not set it will redirect to login page
if(!isset($_SESSION['username']) || empty($_SESSION['username'])){
header("location: login.php");
exit;
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>Desktop</title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<!-- Fonts and icons -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" />
<!-- Favicon -->
<link rel="icon" type="image/png" href="logo.png">
<!-- <link rel="icon" href="logo.ico" type="image/x-icon" /> -->
<!-- CSS Files -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" />
<link href="assets/css/material-kit.css" rel="stylesheet"/>
<link href="assets/css/main.css" rel="stylesheet"/>
</head>
<body>
<p class="name-display lead">Welcome, <?php echo $_SESSION['username'] ?></p>
<!-- Navbar will come here -->
<nav class="navbar navbar-default navbar-transparent" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- <a class="navbar-brand" href="#">jOS</a> -->
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="material-icons navIcons">settings</i>Settings <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#" data-toggle="modal" data-target="#addIconModal"><i class="material-icons navIcons">add_box</i>Add</a></li>
<li><a id="edit-icons"><i class="material-icons navIcons">mode_edit</i>Edit</a></li>
<li class="divider"></li>
<li><a href="#"><i class="material-icons navIcons">person</i>Profile Settings</a></li>
<li class="divider"></li>
<li><a href="logout.php"><i class="material-icons navIcons">exit_to_app</i>Logout</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<!-- end navbar -->
<div class="wrapper">
<!-- you can use the class main-raised if you want the main area to be as a page with shadows -->
<div class="main">
<!-- <div class="container"> -->
<!-- here you can add your content -->
<div id="iconCarousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner" role="listbox">
</div>
<ol class="carousel-indicators">
</ol>
<a class="carousel-control-prev" href="#iconCarousel" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#iconCarousel" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<!-- </div> -->
</div>
<!-- Add Icon Modal -->
<div class="modal fade" id="addIconModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Add an icon</h4>
</div>
<div class="modal-body" style="height: 250px;">
<iframe src="addIcon.php" height="100%" width="100%" seamless='seamless' frameBorder="0" scrolling="no"></iframe>
</div>
</div>
</div>
</div>
<div class="modal fade" id="editIconModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Edit an icon</h4>
</div>
<div class="modal-body">
<form> <!--action="editIcon.php" method="post"-->
<p>
<label for="firstName">Header:<sup>*</sup></label>
<input type="text" class="form-control" name="header" id="editHeader">
</p>
<p>
<label for="lastName">Link:</label>
<input type="text" class="form-control" name="icon_link" id="editIcon_link">
</p>
<input class="btn btn-primary editSave-icon" value="Save">
</form>
</div>
</div>
</div>
</div>
</body>
<!-- Core JS Files -->
<script src="assets/js/jquery.min.js" type="text/javascript"></script>
<script src="assets/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/js/material.min.js"></script>
<!-- Plugin for the Sliders, full documentation here: http://refreshless.com/nouislider/ -->
<script src="assets/js/nouislider.min.js" type="text/javascript"></script>
<!-- Plugin for the Datepicker, full documentation here: http://www.eyecon.ro/bootstrap-datepicker/ -->
<script src="assets/js/bootstrap-datepicker.js" type="text/javascript"></script>
<!-- Control Center for Material Kit: activating the ripples, parallax effects, scripts from the example pages etc -->
<script src="assets/js/material-kit.js" type="text/javascript"></script>
<!-- jOS JS Files -->
<script src="assets/js/update.js"></script>
<!-- <script src="assets/js/editIcon.js"></script> -->
</html>