-
Notifications
You must be signed in to change notification settings - Fork 1
/
stud_page.php
503 lines (385 loc) · 10.6 KB
/
stud_page.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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to your Loggedin page</title>
<link rel="stylesheet" href="styles/layout.css" type="text/css" />
<script type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="scripts/jquery.slidepanel.setup.js"></script>
<script type="text/javascript" src="scripts/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="scripts/jquery.tabs.setup.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="styles/style.css">
</head>
<body style="background-color:#F8F7DF;">
<?php
session_start();
include 'include/connect.php';
@$a1=$_SESSION['email'];
@$b="select * from stud_reg where l_email='$a1'";
@$query=mysql_query($b);
while($result=mysql_fetch_array($query))
{
@$c=$result['leader name'];
}
if(!isset($_SESSION['email']))
{
echo "<script> alert('Login First!!');</script>";
echo "<script> window.location='index.php'</script>";
}
else
{
?>
<div class="wrapper col1">
<div id="header">
<div id="logo">
<h1><a href="#">SPAM</a></h1>
<p>Student Project Allocation Management</p>
</div>
<div class="fl_right">
<h2>Welcome <?php echo $c ;?></h2>
<ul>
<li class="last"><a href="#">Search</a></li>
<li><a href="www.google.com">Online Support</a></li>
<li><a href="www.ecajmer.ac.in">College Board</a></li>
</ul>
<p>Tel: +91-0145-267 1800 |</p><p> Mail: [email protected]</p>
</div>
<br class="clear" />
</div>
</div>
<!-- ####################################################################################################### -->
<div class="wrapper col2" style="padding-left:175px; width:auto;">
<div id="cssmenu">
<ul>
</li>
<li class="has-sub"><a href="#">Co-ordinator List</a>
<ul>
<li><a href="co-it.php">Information Technology</a></li>
<li><a href="co-cs.php">Computer Science</a></li>
<li><a href="co-ec.php">Electronics & communication</a></li>
<li><a href="co-eic.php">EIC</a></li>
<li><a href="co-e.php">Electrical</a></li>
<li><a href="co-m.php">mechanical</a></li>
</ul>
</li>
<li class="has-sub"><a href="#">Guide List</a>
<ul>
<li><a href="gu-it.php">Information Technology</a></li>
<li><a href="gu-cs.php">Computer Science</a></li>
<li><a href="gu-ec.php">Electronics & communication</a></li>
<li><a href="gu-eic.php">EIC</a></li>
<li><a href="gu-e.php">Electrical</a></li>
<li><a href="gu-m.php">mechanical</a></li>
</ul>
</li>
<li class="has-sub"><a href="#">Student List</a>
<ul>
<li><a href="st-it.php">Information Technology</a></li>
<li><a href="st-cs.php">Computer Science</a></li>
<li><a href="st-ec.php">Electronics & communication</a></li>
<li><a href="st-eic.php">EIC</a></li>
<li><a href="st-e.php">Electrical</a></li>
<li><a href="st-m.php">mechanical</a></li> </ul></li>
<li class="has-sub"><a href="#">Projects</a>
<ul>
<li><a href="cs.php">Computer Science</a></li>
<li><a href="eee.php">Electrical</a></li>
<li><a href="ec.php">Electronics & Communication</a></li>
<li><a href="eic.php">EIC</a></li>
<li><a href="it.php">Information Technology</a></li>
<li><a href="mech.php">Mechanical</a></li>
<li><a href="civil.php">Civil</a></li>
</ul>
</li>
<li class="last"><a href="change_pass.php">Change Password</a></li>
<li class="last"><a href="logout.php">Logout</a></li>
</ul>
</div>
</div>
<div id="c" style="height:350px;">
<table align="center" border="1" style="width:auto; border-width:3px; border-color:#8080FF; height:auto;">
<tr>
<th height="20px" align="center"> Student's names</th>
<th height="20px" align="center">College ID</th>
<th height="20px" align="center">Contact No.</th>
<th height="20px" align="center">Email Id</th>
<th height="20px" align="center">Branch(Batch)</th>
</tr>
<?php
$f= $_SESSION['email'];
$q= "select * from stud_reg where l_email='$f' ";
$sql=mysql_query($q);
$count=1;
while($result=mysql_fetch_array($sql))
{
@$c=$result['leader name'];
?>
<tr>
<td style="padding-left:15px;" >
<?php
echo $c;
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["l_cid"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["l_contact"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["l_email"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["branch"];
?>
</td>
</tr>
<tr>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem2_name"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem2_c_id"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem2_contact"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem2_email"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["branch"];
?>
</td>
</tr>
<tr>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem3_name"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem3_c_id"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem3_contact"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem3_email"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["branch"];
?>
</td>
</tr>
<?php
if($result["mem4_c_id"]==0)
{
}
else
{
?>
<tr>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem4_name"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem4_c_id"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem4_contact"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem4_email"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["branch"];
?>
</td>
</tr>
<?php
if($result["mem5_c_id"]==0)
{
}
else
{
?>
<tr>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem5_name"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem5_c_id"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem5_contact"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["mem5_email"];
?>
</td>
<td style="padding-left:15px;" >
<?php
echo $result["branch"];
}}
?>
</td>
</tr>
<?php
}
?>
<?php
}
?>
</table>
<!--<form method="post" action="weeklyreport.php">
<div align="center">
<b style="color:#F00; font-size:14px;"><u>NOTE:</u></b>Only upload pdf files,any other file format will not be accepted.<hr color="#F8F7DF"/>
<b style="color:#306; font-size:14px;">Upload Synopsis»</b>
<input type="file" name="file" accept="application/pdf" value="synophsis" />
<input type="submit" name="submit" value="submit" />
</div>
</form>-->
<form action="#" method="post">
<input type="text" name="text1" id="text1" />
<input type="text" name="text2" id="text2" />
<input type="text" name="text3" id="text3" />
<input type="text" name="text4" id="text4" />
<input type="submit">
</form>
<span id="countdown"></span>
<script>
// set the date we're counting down to
var target_date = new Date("June 04, 2014 02:05:30").getTime();
// variables for time units
var days, hours, minutes, seconds;
// get tag element
var countdown = document.getElementById("countdown");
// update the tag with id "countdown" every 1 second
setInterval(function () {
// find the amount of "seconds" between now and target
var current_date = new Date().getTime();
var seconds_left = (target_date - current_date) / 1000;
// do some time calculations
days = parseInt(seconds_left / 86400);
seconds_left = seconds_left % 86400;
hours = parseInt(seconds_left / 3600);
seconds_left = seconds_left % 3600;
minutes = parseInt(seconds_left / 60);
seconds = parseInt(seconds_left % 60);
var s1=days;
var s2=hours;
var s3=minutes;
var s4=seconds;
document.getElementById("text1").value=s1;
document.getElementById("text2").value=s2;
document.getElementById("text3").value=s3;
document.getElementById("text4").value=s4;
// format countdown string + set tag value
if(hours>0 || minutes>0 || seconds>0)
{
countdown.innerHTML = days + "d, " + hours + "h, "
+ minutes + "m, " + seconds + "s" + "<input type='button' value='Click Here to Proceed' disabled></button>";
}
if(hours<=0 && minutes<=0 && seconds<=0)
{
countdown.innerHTML = "0d, 0h, 0m, 0s <a href='stud_page2.php'><input type='button' value='Click Here to Proceed' ></button></a>";
}
}, 1000);
</script>
<?php
$a1=$_POST['text1'];
$a2=$_POST['text2'];
$a3=$_POST['text3'];
$a4=$_POST['text4'];
if($a4<0)
{
?>
<form action='#' method='POST' enctype='multipart/form-data'>
<input type='file' name='uploadedfile'><br>
<input type='submit' value='upload' disabled >
</form>
<?php
}
if($a1>0 || $a2>0 || $a3>0 || $a4>0)
{
?>
<form action='#' method='POST' enctype='multipart/form-data'>
<input type='file' name='uploadedfile'><br>
<input type='submit' value='upload' >
</form>
<?php
}
?>
<?php
include 'include/connect.php';
$temp = explode(".", $_FILES['uploadedfile']['name']);
$extension = end($temp);
if($extension=='pdf')
{
$target_path = "Documents/synopsis/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "<script> alert('The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded') </script>";
} else{
echo "<script> alert('There was an error uploading the file, please try again!')</script>";
}
}
$xyz=$_FILES['uploadedfile']['name'];
$x1="update stud_reg set synopsis='$xyz' where l_email='$f'";
$x2=mysql_query($x1);
?>
<body style="background-color:#EDEDED" >
</div>
<div class="wrapper col6">
<div id="copyright">
<p class="fl_left" align="center">Copyright © 2013 - All Rights Reserved - <a href="#">SPAM</a></p>
<br class="clear" />
</div>
</div>
</body>
</html>