forked from LobbyOS/lobby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·68 lines (67 loc) · 1.78 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
<?php
include APP_DIR . "/src/Inc/load.php";
$this->addStyle("style.css");
$this->addScript("election.js");
$_SESSION['election-validated'] = "false";
?>
<script>
(function(){
lobby.app.config = <?php echo json_encode($this->config);?>;
})(lobby);
</script>
<div class="content">
<form action="info.php" id="voterForm">
<h2>Class</h2>
<select name="class">
<?php
foreach($this->config['classes'] as $class){
echo "<option name='$class'>$class</option>";
}
?>
</select>
<h2>Division</h2>
<select name="division">
<?php
$divs = $this->config['divisions'];
foreach($divs as $div){
echo "<option name='$div'>$div</option>";
}
?>
</select>
<h2>Roll Number</h2>
<input name="roll" type="number" placeholder="Roll Number" autocomplete="off" />
<h2>Password</h2>
<input name="password" type="password" placeholder="Password" autocomplete="off" />
<div style="margin-top: 20px;">
<button name="submit">Login To Vote</button>
</div>
</form>
<form action="vote.php" id="voteForm">
<div class="candidates">
<?php $ELEC->showCandidates();?>
</div>
<button class="vote" name="vote" value="vote">Cast Your Vote</button>
<div id="username"></div>
</form>
<div class='thankyou'>
<h1>Thank You</h1>
<p>Your vote was entered successfully.</p>
</div>
</div>
<div class="quote">
Democracy is tolerance. It is the tolerance not only towards
<div style="margin-left:90px;">
those who agree with us, but also towards those who disagree.
</div>
<p style="text-align:right;display:inline-block;">
- Jawarhalal Nehru
</p>
</div>
<style>
body{
-webkit-user-select: none;
-moz-user-select: -moz-none;
-ms-user-select: none;
user-select: none;
}
</style>