forked from userfrosting/UserFrosting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard_admin.php
396 lines (361 loc) · 15.4 KB
/
dashboard_admin.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
<?php
/*
UserFrosting Version: 0.1
By Alex Weissman
Copyright (c) 2014
Based on the UserCake user management system, v2.0.2.
Copyright (c) 2009-2012
UserFrosting, like UserCake, is 100% free and open-source.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
// UserCake authentication
require_once("./models/config.php");
if (!securePage($_SERVER['PHP_SELF'])){
// Forward to 404 page
addAlert("danger", "Whoops, looks like you don't have permission to view that page.");
header("Location: 404.php");
die();
}
setReferralPage($_SERVER['PHP_SELF']);
// Admin page
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>UserFrosting Admin - Admin Dashboard</title>
<?php require_once("includes.php"); ?>
<!-- Page-specific CSS -->
<link rel="stylesheet" href="css/typeahead.css" type="text/css" />
<link rel="stylesheet" href="css/bootstrap-switch.min.css" type="text/css" />
<!-- Page Specific Plugins -->
<script src="js/jquery.tablesorter.js"></script>
<script src="js/tables.js"></script>
<script src="js/bootstrap-switch.min.js"></script>
</head>
<body>
<div id="wrapper">
<!-- Sidebar -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
</nav>
<div id="page-wrapper">
<div class="row">
<div id='display-alerts' class="col-lg-12">
</div>
</div>
<div class="row">
<div class="col-lg-12">
<h1>Dashboard <small>Statistics Overview</small></h1>
<ol class="breadcrumb">
<li class="active"><i class="fa fa-dashboard"></i> Dashboard</li>
</ol>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
Welcome to UserFrosting! The back end account management system is derived from <a class="alert-link" href="http://usercake.com">UserCake 2.0.2</a>, while the dashboard and admin account features are based on the SB Admin Template by <a class="alert-link" href="http://startbootstrap.com">Start Bootstrap</a>. Other key frameworks and plugins used in this system are:
<br><a class="alert-link" href='http://http://jquery.com/'>jQuery 1.10.2</a>
<br><a class="alert-link" href='http://getbootstrap.com/'>Twitter Bootstrap 3.0</a>
<br><a class="alert-link" href='http://fontawesome.io/'>Font Awesome</a>
<br><a class="alert-link" href='http://tablesorter.com/docs/'>Tablesorter 2.0</a>
<br>The <a class="alert-link" href='http://www.bootstrap-switch.org/'>Bootstrap Switch</a> component by Mattia Larentis,Peter Stein, and Emanuele Marchi
<br>All components are copyright of their respective creators.
</div>
</div>
</div><!-- /.row -->
<div class="row">
<div class="col-lg-3">
<div class="panel panel-info">
<div class="panel-heading">
<div class="row">
<div class="col-xs-6">
<i class="fa fa-comments fa-5x"></i>
</div>
<div class="col-xs-6 text-right">
<p class="announcement-heading">456</p>
<p class="announcement-text">New Mentions!</p>
</div>
</div>
</div>
<a href="#">
<div class="panel-footer announcement-bottom">
<div class="row">
<div class="col-xs-6">
View Mentions
</div>
<div class="col-xs-6 text-right">
<i class="fa fa-arrow-circle-right"></i>
</div>
</div>
</div>
</a>
</div>
</div>
<div class="col-lg-3">
<div class="panel panel-warning">
<div class="panel-heading">
<div class="row">
<div class="col-xs-6">
<i class="fa fa-check fa-5x"></i>
</div>
<div class="col-xs-6 text-right">
<p class="announcement-heading">12</p>
<p class="announcement-text">To-Do Items</p>
</div>
</div>
</div>
<a href="#">
<div class="panel-footer announcement-bottom">
<div class="row">
<div class="col-xs-6">
Complete Tasks
</div>
<div class="col-xs-6 text-right">
<i class="fa fa-arrow-circle-right"></i>
</div>
</div>
</div>
</a>
</div>
</div>
<div class="col-lg-3">
<div class="panel panel-danger">
<div class="panel-heading">
<div class="row">
<div class="col-xs-6">
<i class="fa fa-tasks fa-5x"></i>
</div>
<div class="col-xs-6 text-right">
<p class="announcement-heading">18</p>
<p class="announcement-text">Crawl Errors</p>
</div>
</div>
</div>
<a href="#">
<div class="panel-footer announcement-bottom">
<div class="row">
<div class="col-xs-6">
Fix Issues
</div>
<div class="col-xs-6 text-right">
<i class="fa fa-arrow-circle-right"></i>
</div>
</div>
</div>
</a>
</div>
</div>
<div class="col-lg-3">
<div class="panel panel-success">
<div class="panel-heading">
<div class="row">
<div class="col-xs-6">
<i class="fa fa-comments fa-5x"></i>
</div>
<div class="col-xs-6 text-right">
<p class="announcement-heading">56</p>
<p class="announcement-text">New Orders!</p>
</div>
</div>
</div>
<a href="#">
<div class="panel-footer announcement-bottom">
<div class="row">
<div class="col-xs-6">
Complete Orders
</div>
<div class="col-xs-6 text-right">
<i class="fa fa-arrow-circle-right"></i>
</div>
</div>
</div>
</a>
</div>
</div>
</div><!-- /.row -->
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-bar-chart-o"></i> Traffic Statistics: October 1, 2013 - October 31, 2013</h3>
</div>
<div class="panel-body">
<div id="morris-chart-area"></div>
</div>
</div>
</div>
</div><!-- /.row -->
<div class="row">
<div class="col-lg-4">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> Traffic Sources: October 1, 2013 - October 31, 2013</h3>
</div>
<div class="panel-body">
<div id="morris-chart-donut"></div>
<div class="text-right">
<a href="#">View Details <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-clock-o"></i> Recent Activity</h3>
</div>
<div class="panel-body">
<div class="list-group">
<a href="#" class="list-group-item">
<span class="badge">just now</span>
<i class="fa fa-calendar"></i> Calendar updated
</a>
<a href="#" class="list-group-item">
<span class="badge">4 minutes ago</span>
<i class="fa fa-comment"></i> Commented on a post
</a>
<a href="#" class="list-group-item">
<span class="badge">23 minutes ago</span>
<i class="fa fa-truck"></i> Order 392 shipped
</a>
<a href="#" class="list-group-item">
<span class="badge">46 minutes ago</span>
<i class="fa fa-money"></i> Invoice 653 has been paid
</a>
<a href="#" class="list-group-item">
<span class="badge">1 hour ago</span>
<i class="fa fa-user"></i> A new user has been added
</a>
<a href="#" class="list-group-item">
<span class="badge">2 hours ago</span>
<i class="fa fa-check"></i> Completed task: "pick up dry cleaning"
</a>
<a href="#" class="list-group-item">
<span class="badge">yesterday</span>
<i class="fa fa-globe"></i> Saved the world
</a>
<a href="#" class="list-group-item">
<span class="badge">two days ago</span>
<i class="fa fa-check"></i> Completed task: "fix error on sales page"
</a>
</div>
<div class="text-right">
<a href="#">View All Activity <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-money"></i> Recent Transactions</h3>
</div>
<div class="panel-body">
<div id="transactions" class="table-responsive">
<table class="table table-bordered table-hover table-striped tablesorter">
<thead>
<tr>
<th>Order # <i class="fa fa-sort"></i></th>
<th>Order Date <i class="fa fa-sort"></i></th>
<th>Order Time <i class="fa fa-sort"></i></th>
<th>Amount (USD) <i class="fa fa-sort"></i></th>
</tr>
</thead>
<tbody>
<tr>
<td>3326</td>
<td>10/21/2013</td>
<td>3:29 PM</td>
<td>$321.33</td>
</tr>
<tr>
<td>3325</td>
<td>10/21/2013</td>
<td>3:20 PM</td>
<td>$234.34</td>
</tr>
<tr>
<td>3324</td>
<td>10/21/2013</td>
<td>3:03 PM</td>
<td>$724.17</td>
</tr>
<tr>
<td>3323</td>
<td>10/21/2013</td>
<td>3:00 PM</td>
<td>$23.71</td>
</tr>
<tr>
<td>3322</td>
<td>10/21/2013</td>
<td>2:49 PM</td>
<td>$8345.23</td>
</tr>
<tr>
<td>3321</td>
<td>10/21/2013</td>
<td>2:23 PM</td>
<td>$245.12</td>
</tr>
<tr>
<td>3320</td>
<td>10/21/2013</td>
<td>2:15 PM</td>
<td>$5663.54</td>
</tr>
<tr>
<td>3319</td>
<td>10/21/2013</td>
<td>2:13 PM</td>
<td>$943.45</td>
</tr>
</tbody>
</table>
</div>
<div class="text-right">
<a href="#">View All Transactions <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
</div>
</div>
</div><!-- /.row -->
</div><!-- /#page-wrapper -->
</div><!-- /#wrapper -->
<script src="js/raphael/2.1.0/raphael-min.js"></script>
<script src="js/morris/morris-0.4.3.js"></script>
<script src="js/morris/chart-data-morris.js"></script>
<script>
$(document).ready(function() {
// Get id of the logged in user to determine how to render this page.
var user = loadCurrentUser();
var user_id = user['id'];
// Load the header
$('.navbar').load('header.php', function() {
$('#user_logged_in_name').html('<i class="fa fa-user"></i> ' + user['user_name'] + ' <b class="caret"></b>');
$('.navitem-dashboard-admin').addClass('active');
});
alertWidget('display-alerts');
// Initialize the transactions tablesorter
$('#transactions .table').tablesorter({
debug: false
});
});
</script>
</body>
</html>