-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhome.php
More file actions
101 lines (77 loc) · 2.19 KB
/
home.php
File metadata and controls
101 lines (77 loc) · 2.19 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
<?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['loggedIn'] !== TRUE){
header('Refresh: 0; URL=login.php?logout=true');
exit;
}
?>
<html>
<head>
<title>xTable</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>
<style>
#logout{
display:block;
position:absolute;
top:10px;
right:15px;
}
</style>
</head>
<body>
<a 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">
<a href="index.php?vertical=na" name="navXTable" id="navXTable" title="xTable">
<img alt="XTable" id="XTable" src="img/xtable.png" height="130px" width="130px" />
</a>
</div>
<div id="icon">
<a href="dashboard.html" name="navDashboard" id="navDashboard" >
<img alt="Dashboard" id="Dashboard" src="img/dashboard.png" height="130px" width="130px" title="Dashboard"/>
</a>
</div>
<div id="icon">
<a href="reportgen.php" name="navReporting" id="navReporting" title="Reporting">
<img alt="Reporting" id="Reporting" src="img/reports_icon.jpg" height="130px" width="130px" />
</a>
</div>
<?php
if( $_SESSSION['role'] < 3){
?>
<div id="icon">
<a href="admin.php" name="navAdministration" id="navAdministration">
<img alt="Administration" id="Administration" src="img/admin.png" height="130px" width="130px" title="Administration"/>
</a>
</div>
<?php
}
?>
</div>
<script>
$("#logout").click(function(){
$.ajax({
type: "POST",
url: "login_mod.php",
cache: false,
data: {"kill":"kill"}
}).done(function( msg ) {
if( msg ){
if (msg == "true"){
window.location.href ="login.php?logout=true";
}else{ alert("Error logging out, try again"); }
}
});
});
</script>
</body>
</html>