-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome.php
More file actions
223 lines (190 loc) · 8.91 KB
/
home.php
File metadata and controls
223 lines (190 loc) · 8.91 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
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
<?php
require_once("time_check.php");
require_once("db_connect.php");
$page_title="Home";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title><?php echo $page_title; ?> :: C.A Tracker</title>
<!-- InstanceEndEditable -->
<script language="javascript" src="scripts/jquery-1.4.2.min.js"></script>
<script language="javascript" src="functions.js"></script>
<link href="mystyles.css" rel="stylesheet" type="text/css" />
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<body>
<div id="heading">
C.A Tracker
</div>
<div id="content">
<?php
if(isset($_SESSION['current_user_full_name'],$_SESSION['current_session'],$_SESSION['current_term']) && ( $page_title!="You're almost done" || $page_title!="Congratulations" || $page_title!="Sign In" || $page_title!="Admin/User Sign In"))
{
?>
<p id="information_display" align="right" style="font-size:12px"><b>Signed In:</b><?php echo $_SESSION['current_user_full_name'] ?> (<a href="sign_out.php">Sign Out</a>)<br />
<?php echo $_SESSION['current_term']; ?>,<?php echo $_SESSION['current_session']; ?> <br />
<?php if(isset($_SESSION['current_user_category']) && ($_SESSION['current_user_category'])=="Student")
{
?>
<b>Target:</b> <?php echo $_SESSION['current_user_target']; ?>
<?php
}
?>
</p>
<?php
}
?>
<h1>
<?php echo $page_title; ?>
</h1>
<?php
if(isset($_SESSION['message']))
{
?>
<p class="<?php echo $_SESSION['messagetype']; ?>"><?php echo $_SESSION['message']; ?></p>
<?php
unset($_SESSION['message'], $_SESSION['messagetype']);
}
?>
<!-- InstanceBeginEditable name="mycontents" -->
<h2 id="welcome_message">WELCOME <b><?php if(isset($_SESSION['current_user_full_name'])) { echo $_SESSION['current_user_full_name']; } ?>!</b></h2>
<p>
<?php
$select_page_visited=mysql_query("select * from `page_visited` where registration_id='".$_SESSION['current_user_reg_no']."'");
if($select_page_visited==FALSE)
{
?>
<p align="center" class="error">Error encountered selecting page record! <?php echo mysql_error(); ?></p>
<?php
die();
}
$row_selected_page=mysql_fetch_assoc($select_page_visited);
$visited=$row_selected_page['visited'];
?>
<script language="javascript">
$(document).ready(
function()
{
shade_input_table("data_table")
}
);
</script>
<?php
if(isset($_SESSION['message']))
{
?>
<p class="<?php echo $_SESSION['messagetype']; ?>"><?php echo $_SESSION['message']; ?></p>
<?php
unset($_SESSION['message'], $_SESSION['messagetype']);
}
?>
<table align="center" cellpadding="40px" cellspacing="10px" id="data_table">
<?php
if(isset($_SESSION['current_user_category']) && $_SESSION['current_user_category']=="Administrative")
{
?>
<tr>
<td><a href="manage_users.php?status=Active"><img src="images/user too.jpg" width="30" /></a>
<a href="manage_users.php?status=Active">Manage Users</a></td>
<td><a href="manage_students.php?status=Active"><img src="images/mstu .jpg" width="30" /></a>
<a href="manage_students.php?status=Active">Manage Students</a></td>
<td><a href="manage_subjects.php?status=Active"><img src="images/mstud.jpg" width="30" /></a>
<a href="manage_subjects.php?status=Active">Manage Subjects</a></td>
</tr>
<tr>
<td><a href="manage_session.php"><img src="images/mt.jpg" width="30" /></a>
<a href="manage_session.php">Manage Session</a></td>
<td><a href="manage_term.php"><img src="images/mplan .jpg" width="30" />
Manage Term</a></td>
<td><a href="manage_class.php?status=Active"><img src="images/mclass .jpg" width="30" /></a>
<a href="manage_class.php?status=Active">Manage Class</a></td>
</tr>
<tr>
<td><a href="manage_school.php?status=Active"><img src="images/mschool .jpg" width="30" /></a>
<a href="manage_school.php?status=Active">Manage School</a></td>
<td><a href="admin_change_password.php"><img src="images/mses.jpg" width="30" />
Change Password</a></td>
<td><a href="sign_out.php"><img src="images/exit .jpg" width="30" />
sign Out</a></td>
</tr>
<?php
}
?>
<?php
if(isset($_SESSION['current_user_category']) && $_SESSION['current_user_category']=="User")
{
?>
<tr>
<td><a href="manage_students.php?status=Active"><img src="images/mstu .jpg" width="30" /></a>
<a href="manage_students.php?status=Active">Manage Students</a></td>
<td><a href="manage_subjects.php?status=Active"><img src="images/mstud.jpg" width="30" /></a>
<a href="manage_subjects.php?status=Active">Manage Subjects</a></td>
<td><a href="manage_class.php?status=Active"><img src="images/mclass .jpg" width="30" /></a>
<a href="manage_class.php?status=Active">Manage Class</a></td>
</tr>
<tr>
<td><a href="manage_school.php?status=Active"><img src="images/mschool .jpg" width="30" /></a>
<a href="manage_school.php?status=Active">Manage School</a></td>
<td><a href="admin_change_password.php"><img src="images/mses.jpg" width="30" />
Change Password</a></td>
<td><a href="sign_out.php"><img src="images/exit .jpg" width="30" />
sign Out</a></td>
</tr>
<?php
}
?>
<?php
if(isset($_SESSION['current_user_category']) && $_SESSION['current_user_category']=="Student")
{
?>
<tr align="center">
<td bgcolor="#F7F7F7">
</td>
<td align="center"><a href="view_profile.php"><img src="images/eke.jpg" width="30" />
View Profile</a></td>
</tr>
<tr>
<td><?php
if($visited=="no")
{
?>
<a href="manage_ca.php"><img src="images/ca3.jpg" width="30" />
Manage C.A</a>
<?php
}
else
{
?>
<a href="view_classwork.php"><img src="images/ca3.jpg" width="30" />
Manage C.A</a><?php
}
?>
</td>
<td><a href="inbox.php"><img src="images/image3s.jpg" width="30" />
Message Hub</a></td>
<td><a href="my_friends.php"><img src="images/buddy.jpg" width="30" />
C.A Buddies</a></td>
</tr>
<tr>
<td><a href="interactive_center.php"><img src="images/images.jpg" width="30" />
Interactive Center</a></td>
<td><a href="change_password.php"><img src="images/mses.jpg" width="30" />
Change Password</a></td>
<td><a href="sign_out.php"><img src="images/exit .jpg" width="30" />
sign Out</a></td>
</tr>
<?php
}
?>
</table>
</p>
<!-- InstanceEndEditable --></div>
<div id="footer">
© <?php echo date("Y"); ?> I-corporation LTD
</div>
</body>
<!-- InstanceEnd --></html>