-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadmin.php
More file actions
107 lines (70 loc) · 2.29 KB
/
admin.php
File metadata and controls
107 lines (70 loc) · 2.29 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
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
<?php
header("Content-type: text/html; charset=utf-8");
error_reporting(E_ALL ^ E_NOTICE);
require "includes/config.php";
require "includes/sess.php";
session_start();
if( !$_SESSION['fname'] || $_SESSION['role'] > 2 ){
header('Refresh: 0; URL=login.php');
exit;
}
?>
<style>
#logout{
display:block;
position:absolute;
top:10px;
right:15px;
}
</style>
<html>
<head>
<title>UsableX</title>
<link href="css/home-style.css" rel="stylesheet" type="text/css" media="all" /><br/>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/jqueryUI/js/jqueryui.js"></script>
</head>
<body>
<a onClick="window.location.href ='login.php?logout=true'" style="text-decoration:none">
<button name="logout" id="logout" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false">
<span class="ui-button-text">Logout</span></button>
</a>
<div id="main">
<div id="icon">
</div>
<div id="icon">
<a href="user_admin.php" name="navuserAdmin" id="navuserAdmin" >
<img alt="userAdmin" id="userAdmin" src="img/user_Admin.png" height="130px" width="130px" title="User Admin"/>
</a>
</div>
<div id="icon">
<a href="device_admin.php" name="navdeviceAdmin" id="navdeviceAdmin" >
<img alt="deviceAdmin" id="deviceAdmin" src="img/device_Admin.png" height="130px" width="130px" title="Device Admin"/>
</a>
</div>
<div id="icon">
</div>
</div>
</body>
<script charset="UTF-8">
///////////////////////////////////LOGOUT FUNCTION///////////////////////////////////////////////////////////////////////
$("#logout").click(function(){
window.location.reload();
window.location.href ="login.php?logout=true";
$.ajax({
type: "GET",
url: "login_mod.php",
cache: false,
data: "kill=kill",
}).done(function( msg ) {
if( is_loggedin(msg) ){
if (msg == "true"){
window.location.href ="login.php?logout=true";
}else{
alert("Error logging out, try again");
}
}
});
});// END LOGOUT
</script>
</html>