forked from srijanshetty/by-elections
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
62 lines (59 loc) · 1.82 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
<?php
session_start();
session_destroy();
include('dbconnect.php');
$sql="SELECT votecount from votes";
$result=mysql_query($sql) or die(mysql_error());
$row=mysql_fetch_assoc($result);
$count=$row['votecount'];
?>
<html>
<head>
<style type="text/css">
#votecount {
position: absolute;
bottom:40px;
right:40px;
}
</style>
<script type="text/javascript">
function start() {
document.getElementById('batch').focus();
}
</script>
</head>
<body align="center" onload="start()">
<?php
//echo $_SERVER['REMOTE_ADDR'];
if($_SERVER['REMOTE_ADDR']!="::1") {
//die("Invalid Access");
}
?>
<br/>
<h1>FEAT-V</h1>
<br/><br/><br/>
<form action="chkpass.php" method="POST" />
Select Batch:
<select name="batch" id="batch">
<!-- <option value="Senator, UG Y10">UG Y10</option> -->
<!-- <option value="Senator, UG Y10 (Dual)">UG Y10 (Dual)</option> -->
<option value="Senator, UG Y11">UG Y11</option>
<!-- <option value="Senator, UG Y12">UG Y12</option> -->
<!-- <option value="Senator, UG Y13">UG Y13</option> -->
<option value="Senator, UG Y14">UG Y14</option>
<!-- <option value="Senator, M.Tech. Y12">M.Tech Y12</option> -->
<!-- <option value="Senator, M.Tech. Y13">M.Tech Y13</option> -->
<!-- <option value="Senator, MBA + M.Des. Y12">MBA + M.Des. Y12</option> -->
<!-- <option value="Senator, MBA + M.Des. Y13">MBA + M.Des. Y13</option> -->
<!-- <option value="Senator, M.Sc. Y12">M.Sc. Y12</option> -->
<!-- <option value="Senator, M.Sc. Y13">M.Sc. Y13</option> -->
<!-- <option value="Senator, PhD">PhD</option> -->
</select><br/><br/>
Enter Key: <input type="password" name="key" /><br/><br/>
<input type="submit" value="Proceed to vote" />
</form>
<div id="votecount">
<i>Total No. of votes:</i> <b><?php echo $count; ?></b>
</div>
</body>
</html>