This repository has been archived by the owner on Feb 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
112 lines (106 loc) · 2.8 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
<?php
include("include/session.php");
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
?>
<html>
<title>Logged in</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<head style="background-color:#fffd12">
</head>
<style>
#exam{
height:64px;
width:64px;
background: url(images/exam.png) no-repeat 0px 0px;
padding-top:15px;
padding-left:64px;
padding-bottom:35px;
color:#000;
text-decoration:none;}
#results{
height:64px;
width:64px;
background: url(images/results.png) no-repeat 0px 0px;
padding-top:15px;
padding-left:64px;
padding-bottom:35px;
color:#000;
text-decoration:none;}
#editacc{height:64px;
width:64px;
background: url(images/editaccount.png) no-repeat 0px 0px;
padding-top:15px;
padding-left:64px;
padding-bottom:35px;
color:#000;
text-decoration:none;}
#admin{
height:64px;
width:128px;
background: url(images/administration.png) no-repeat 0px 0px;
padding-top:15px;
padding-left:64px;
padding-bottom:35px;
color:#fff;
text-decoration:none;}
#ban{height:64px;
width:180px;
background: url(images/banuser.png) no-repeat 0px 0px;
padding-top:15px;
padding-left:64px;
padding-bottom:35px;
color:#000;
text-decoration:none;}
#logout{height:64px;
width:64px;
background: url(images/logout.png) no-repeat 0px 0px;
padding-top:15px;
padding-left:64px;
padding-bottom:35px;
color:#000;
text-decoration:none;
}
#myacc{height:64px;
width:64px;
background: url(images/myaccount.png) no-repeat 0px 0px;
padding-top:15px;
padding-left:64px;
padding-bottom:35px;
color:#000;
text-decoration:none;}
#lnks{ margin-top: 130px;}
body{ background:#123456 ;color:#fff margin-top: 0px;margin-left: 0px;}
</style>
<body align="center">
<div id="head" >
<img src="images/banner.jpg" height="200px" width="1080px">
</div>
<div id="lnks" align="center">
<?php
echo "Welcome <b>$session->username</b> <br><br><br><br>";
?>
<table>
<tr><td>
<?php
echo "<td><a href=\"userinfo.php?user=$session->username\" id=\"myacc\">My Account</a> </td>";
if(!$session->isAdmin()){
echo "<td><a href=\"exam.php\" id=\"exam\">Exam</a> </td>"
."<td><a href=\"results.php?user=$session->username\" id=\"results\">Results</a> </td>";
}
echo "<td><a href=\"useredit.php\" id=\"editacc\">Edit Account</a> </td>";
if($session->isAdmin()){
echo "<td><a href=\"results.php?admin=1\" id=\"results\">Results</a> </td>";
echo "<td><a href=\"admin/admin.php\" id=\"admin\">Administration</a> </td>";
echo "<td><a href=\"admin/banuser.php\" id=\"ban\">ban users & active users</a> </td>";
}
echo "<td><a href=\"process.php\" id=\"logout\">Logout</a></td>";
echo "</tr></table></div></body></html>";
}
else{
include("login.php");
} ?>