-
Notifications
You must be signed in to change notification settings - Fork 0
/
polls.php
190 lines (184 loc) · 11.2 KB
/
polls.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
<?php include("./session.php"); ?>
<?php include("./header.php"); ?>
<body>
<?php include("./nav.php"); ?>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-md-4" >
<form action="./vote.php" method="post" align="center">
<div class="container">
<br>
<!-- Right Winger Forward (RWF) -->
<div class="row">
<div class="col-lg-6">
<div class="card mb-lg-auto" align="center">
<h1 class="h4 card-header text-white bg-info">Candidates For Class Represntative Post</h1>
<div class="card-body">
<?php
include ("./config.php");
$query = $conn->query("SELECT * FROM `candidate` WHERE `position` = 'Class Representative(CR)'") or die(mysqli_errno());
while($fetch = $query->fetch_array()){
?>
<img class = "image-rounded" src = "admin/<?php echo $fetch['img']?>" style ="border-radius:6px;" height = "150px" width = "150px">
<p class="card-text"><b>NAME</b><br><?php echo $fetch["firstname"].' '.$fetch ["lastname"];?></p>
<p class="card-text"><b>INFO</b><br>
<b>About: </b><?php echo $fetch["country"];?><br>
<b>Active Club: </b><?php echo $fetch["club"];?></p>
<p class="card-text">
<button type="button" class="btn btn-info">
<input type="checkbox" name="rwf" class="rwf" value="<?php echo $fetch["candidate_id"];?>">
VOTE</button></p>
<br>
<hr>
<?php } ?>
</div>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-lg-6">
<div class="card mb-lg-auto" align="center">
<h1 class="h4 card-header text-white bg-info">Candidates For MOD-5 Secretary Post</h1>
<div class="card-body">
<?php
include ("./config.php");
$query = $conn->query("SELECT * FROM `candidate` WHERE `position` = 'MOD-5 Sec'") or die(mysqli_errno());
while($fetch = $query->fetch_array()){
?>
<img class = "image-rounded" src = "admin/<?php echo $fetch['img']?>" style ="border-radius:6px;" height = "150px" width = "150px">
<p class="card-text"><b>NAME</b><br><?php echo $fetch["firstname"].' '.$fetch ["lastname"];?></p>
<p class="card-text"><b>INFO</b><br>
<b>About: </b><?php echo $fetch["country"];?><br>
<b>Active Club: </b><?php echo $fetch["club"];?></p>
<p class="card-text">
<button type="button" class="btn btn-info">
<input type="checkbox" name="amf" class="amf" value="<?php echo $fetch["candidate_id"];?>">
VOTE</button></p>
<br>
<hr>
<?php } ?>
</div>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-lg-6">
<div class="card mb-lg-auto" align="center">
<h1 class="h4 card-header text-white bg-info">Candidates For Encore Secretary Post</h1>
<div class="card-body">
<?php
include ("./config.php");
$query = $conn->query("SELECT * FROM `candidate` WHERE `position` = 'Encore Sec'") or die(mysqli_errno());
while($fetch = $query->fetch_array()){
?>
<img class = "image-rounded" src = "admin/<?php echo $fetch['img']?>" style ="border-radius:6px;" height = "150px" width = "150px">
<p class="card-text"><b>NAME</b><br><?php echo $fetch["firstname"].' '.$fetch ["lastname"];?></p>
<p class="card-text"><b>INFO</b><br>
<b>About: </b><?php echo $fetch["country"];?><br>
<b>Active Club: </b><?php echo $fetch["club"];?></p>
<p class="card-text">
<button type="button" class="btn btn-info">
<input type="checkbox" name="cmf" class="cmf" value="<?php echo $fetch["candidate_id"];?>">
VOTE</button></p>
<br>
<hr>
<?php } ?>
</div>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-lg-6">
<div class="card mb-lg-auto" align="center">
<h1 class="h4 card-header text-white bg-info">Candidates For Masquarade Secretary Post</h1>
<div class="card-body">
<?php
include ("./config.php");
$query = $conn->query("SELECT * FROM `candidate` WHERE `position` = 'Masquarade Sec'") or die(mysqli_errno());
while($fetch = $query->fetch_array()){
?>
<img class = "image-rounded" src = "admin/<?php echo $fetch['img']?>" style ="border-radius:6px;" height = "150px" width = "150px">
<p class="card-text"><b>NAME</b><br><?php echo $fetch["firstname"].' '.$fetch ["lastname"];?></p>
<p class="card-text"><b>INFO</b><br>
<b>About: </b><?php echo $fetch["country"];?><br>
<b>Active Club: </b><?php echo $fetch["club"];?></p>
<p class="card-text">
<button type="button" class="btn btn-info">
<input type="checkbox" name="dmf" class="dmf" value="<?php echo $fetch["candidate_id"];?>">
VOTE</button></p>
<br>
<hr>
<?php } ?>
</div>
</div>
</div>
</div>
<br>
<!-- Center Back 1 (CB 1) -->
<div class="row">
<div class="col-lg-6">
<div class="card mb-lg-auto" align="center">
<h1 class="h4 card-header text-white bg-info">Candidates For Pensieve Secretary Post</h1>
<div class="card-body">
<?php
include ("./config.php");
$query = $conn->query("SELECT * FROM `candidate` WHERE `position` = 'Pensieve Sec'") or die(mysqli_errno());
while($fetch = $query->fetch_array()){
?>
<img class = "image-rounded" src = "admin/<?php echo $fetch['img']?>" style ="border-radius:6px;" height = "150px" width = "150px">
<p class="card-text"><b>NAME</b><br><?php echo $fetch["firstname"].' '.$fetch ["lastname"];?></p>
<p class="card-text"><b>INFO</b><br>
<b>About: </b><?php echo $fetch["country"];?><br>
<b>Active Club: </b><?php echo $fetch["club"];?></p>
<p class="card-text">
<button type="button" class="btn btn-info">
<input type="checkbox" name="cb_1" class="cb_1" value="<?php echo $fetch["candidate_id"];?>">
VOTE</button></p>
<br>
<hr>
<?php } ?>
</div>
</div>
</div>
</div>
<br>
<!-- Center Back 2 (CB 2) -->
<div class="row">
<div class="col-lg-6">
<div class="card mb-lg-auto" align="center">
<h1 class="h4 card-header text-white bg-info">Candidates For Obscura Secretary Post</h1>
<div class="card-body">
<?php
include ("./config.php");
$query = $conn->query("SELECT * FROM `candidate` WHERE `position` = 'Obscura Sec'") or die(mysqli_errno());
while($fetch = $query->fetch_array()){
?>
<img class = "image-rounded" src = "admin/<?php echo $fetch['img']?>" style ="border-radius:6px;" height = "150px" width = "150px">
<p class="card-text"><b>NAME</b><br><?php echo $fetch["firstname"].' '.$fetch ["lastname"];?></p>
<p class="card-text"><b>INFO</b><br>
<b>About: </b><?php echo $fetch["country"];?><br>
<b>Active Club: </b><?php echo $fetch["club"];?></p>
<p class="card-text">
<button type="button" class="btn btn-info">
<input type="checkbox" name="cb_2" class="cb_2" value="<?php echo $fetch["candidate_id"];?>">
VOTE</button></p>
<br>
<hr>
<?php } ?>
</div>
</div>
</div>
</div>
<br>
<div class="row" align="center">
<div class="col-lg-6">
<button class = "btn btn-success" type = "submit" name = "submitVote"> SUBMIT VOTE </button>
</div>
</div>
</div>
</form>
</main>
<script type="text/javascript" src="./assets/js/main.js"></script>
</body>
</html>