-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.php
265 lines (182 loc) · 6.64 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
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
if(!isset($_SESSION)){
session_start();
}
require_once("databaseConnect.php");
if(isset($_SESSION['logged'])){
if($_SESSION['logged']=='1'){
header("location:adminPage/adminLogin.php");
}
}
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml: lang="en" lang="en">
<head><title>ELIMS::E-Library Information Management System</title>
<link rel="shortcut icon" href="images/icon.ico" />
<link rel="stylesheet" type="text/css" href="css/divs.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/my_code.js"></script>
<link href="css/js-image-slider.css" rel="stylesheet" type="text/css" />
<script src="js/js-image-slider.js" type="text/javascript"></script>
<link href="generic.css" rel="stylesheet" type="text/css" />
<style>
#login{
margin-left:60px;
}
</style>
</head>
<body>
<div class="body1">
<div class="menubox">
<h4 class ="loginh4" align="center">ELIMS Login</h4>
<form action="checkLogin.php" method="post">
<p class="error">
<?php
if(isset($_SESSION['complain'])){
$complain=$_SESSION['complain'];
echo $complain;
$_SESSION['complain']='';
}
?></p>
<input type="text" name="username" id="username1" placeholder="User Name" />
<input type="password" name="password" id="password1" placeholder="Password" />
<input type="submit" class="btn btn-success" id="login" value="login"/>
</form>
</div>
<div class="banner">
<h1>ELIMS<br></h1>
<h2>E-Library Information Management System</h2>
</div>
<?php
/*Adds the locations in the sub menu*/
$edr=mysql_query("SELECT * FROM districtdr WHERE DR='EDR' ORDER BY district ASC") or die(mysql_error());
$cdr=mysql_query("SELECT * FROM districtdr WHERE DR='CDR' ORDER BY district ASC") or die(mysql_error());
$wdr=mysql_query("SELECT * FROM districtdr WHERE DR='WDR' ORDER BY district ASC") or die(mysql_error());
$mwdr=mysql_query("SELECT * FROM districtdr WHERE DR='MWDR' ORDER BY district ASC") or die(mysql_error());
$fwdr=mysql_query("SELECT * FROM districtdr WHERE DR='FWDR' ORDER BY district ASC") or die(mysql_error());
?>
<ul id="menu">
<li><a href="index.php">Home</a></li>
<li>
<a href="site.php">Site</a>
<ul>
<li><a href="#">Eastern DR</a>
<ul>
<?php
while($row = mysql_fetch_array($edr)) {
$district1=$row['district'];
$siteEDR=mysql_query("SELECT * FROM site_maps WHERE district='$district1'") or die(mysql_error());
while($rowEDR = mysql_fetch_array($siteEDR)) {
echo '<li><a href="site.php?action='.$rowEDR['name'].'">'.$rowEDR['name'].'</a></li>';
}
}
?>
</ul>
</li>
<li><a href="#">Central DR</a>
<ul>
<?php
while($row = mysql_fetch_array($cdr)) {
$district1=$row['district'];
$siteCDR=mysql_query("SELECT * FROM site_maps WHERE district='$district1'") or die(mysql_error());
while($rowCDR = mysql_fetch_array($siteCDR)) {
$siteName1=$rowCDR['name'];
echo '<li><a href="site.php?action='.$siteName1.'">'.$siteName1.'</a></li>';
}
}
?>
</ul>
</li>
<li><a href="#">Western DR</a>
<ul>
<?php
while($row = mysql_fetch_array($wdr)) {
$district1=$row['district'];
$siteWDR=mysql_query("SELECT * FROM site_maps WHERE district='$district1'") or die(mysql_error());
while($rowWDR = mysql_fetch_array($siteWDR)) {
$siteName1=$rowWDR['name'];
echo '<li><a href="site.php?action='.$siteName1.'">'.$siteName1.'</a></li>';
}
}
?>
</ul>
</li>
<li><a href="#">Mid Western DR</a>
<ul>
<?php
while($row = mysql_fetch_array($mwdr)) {
$district1=$row['district'];
$siteMWDR=mysql_query("SELECT * FROM site_maps WHERE district='$district1'") or die(mysql_error());
while($rowMWDR = mysql_fetch_array($siteMWDR)) {
$siteName1=$rowMWDR['name'];
echo '<li><a href="site.php?action='.$siteName1.'">'.$siteName1.'</a></li>';
}
}
?>
</ul>
</li>
<li><a href="#">Far Western DR</a>
<ul>
<?php
while($row = mysql_fetch_array($fwdr)) {
$district1=$row['district'];
$siteFWDR=mysql_query("SELECT * FROM site_maps WHERE district='$district1'") or die(mysql_error());
while($rowFWDR = mysql_fetch_array($siteFWDR)) {
$siteName1=$rowFWDR['name'];
echo '<li><a href="site.php?action='.$siteName1.'">'.$siteName1.'</a></li>';
}
}
?>
</ul>
</li>
</ul>
</li>
<li><a href="#">Work</a>
<ul>
<li><a href="#">Community</a></li>
<li><a href="#">School Development</a></li>
<li><a href="#">Computer Destributions</a></li>
<li><a href="#">LTSP</a></li>
</ul>
</li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
<?php /*End of the drop down menu*/
?>
<div class="contentBox">
<?php /* Slider Part*/?>
<div id="sliderFrame">
<div id="ribbon"></div>
<div id="slider">
<a href="#">
<img src="images/1.jpg" alt="ELIMS" />
</a>
<a class="lazyImage" href="images/2.jpg" title="Helping">Customizable Transition Effects</a>
<a href="#">
<b data-src="images/3.jpg" data-alt="Serving">Image Slider</b>
</a>
<a class="lazyImage" href="images/4.jpg" title="Changing Lives">Plain Javascript Slider</a>
</div>
<div style="display: none;">
</div>
<!--thumbnails-->
<div id="thumbs">
<div class="thumb"><img src="images/thumb_1.jpg" /></div>
<div class="thumb"><img src="images/thumb_2.jpg" /></div>
<div class="thumb"><img src="images/thumb_3.jpg" /></div>
<div class="thumb"><img src="images/thumb_4.jpg" /></div>
</div>
</div>
</div>
<?php /*---------Slider Part ends----------*/?>
</div>
<div class="footer">
HeNN(Help Nepal Network)<br>
GPO Box No.: 1794, Kathmandu | Ph.: 977 1 5003060 | Fax: 977 1 5003131<br>
Copyright © 2014 Dhulikhel. All rights reserved<br>
</div>
</body>
</html>