-
Notifications
You must be signed in to change notification settings - Fork 7
/
UCanDetails.php
250 lines (196 loc) · 5.34 KB
/
UCanDetails.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
<?php session_start(); ?>
<?php
$Server="localhost";
$username="root";
$psrd="";
$dbname = "Election";
$connection= mysqli_connect($Server,$username,$psrd,$dbname);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Home Page</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<script src="bootstrap/js/bootstrap.min.js"></script>
<style>
body {
font-family: Agency FB;
}
table {
margin: auto;
font-family: "Lucida Sans Unicode", "Lucida Grande", "Segoe Ui";
font-size: 12px;
}
h1 {
margin: 25px auto 0;
text-align: center;
text-transform: uppercase;
font-size: 17px;
}
table td {
transition: all .5s;
}
/* Table */
.data-table {
border-collapse: collapse;
font-size: 14px;
min-width: 537px;
}
.data-table th,
.data-table td {
border: 1px solid #e1edff;
padding: 7px 17px;
}
.data-table caption {
margin: 7px;
}
/* Table Header */
.data-table thead th {
background-color: #508abb;
color: #FFFFFF;
border-color: #6ea1cc !important;
text-transform: uppercase;
}
/* Table Body */
.data-table tbody td {
color: #353535;
}
.data-table tbody td:first-child,
.data-table tbody td:nth-child(4),
.data-table tbody td:last-child {
text-align: right;
}
.data-table tbody tr:nth-child(odd) td {
background-color: #f4fbff;
}
.data-table tbody tr:hover td {
background-color: #008080;
border-color: #ffff0f;
}
/* Table Footer */
.data-table tfoot th {
background-color: #e5f5ff;
text-align: right;
}
.data-table tfoot th:first-child {
text-align: left;
}
.data-table tbody td:empty
{
background-color: #ffcccc;
}
</style>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Election.Com</a>
</div>
<ul class="nav navbar-nav">
<li><a href="UserAccount.php"><b>     Home</b></a></li>
<li><a href="UserUpdate.php"><b>Update Profile</b></a></li>
<li class="active"><a href="UViewElection.php"><b>View Election</b></a></li>
<li><a href="UViewResult.php"><b>View Result</b></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="UserLogout.php"><span class="glyphicon glyphicon-user"></span> <b>Logout</b></a></li>
</ul>
</div>
</nav>
<table class="data-table">
<thead>
<tr>
<th>Photo</th>
<th>Name</th>
<th>Email</th>
<th>Phone</th>
<th>Address</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<?php
$title=$_SESSION['election'];
$Cand="select Cand1,Cand2,Cand3 from SetEC where ElectionName='$title'";
$Result=mysqli_query($connection,$Cand);
$Rows=mysqli_fetch_array($Result);
$cand1=$Rows['Cand1'];
$cand2=$Rows['Cand2'];
$cand3=$Rows['Cand3'];
$q1="select * from Candidate where CandidateName='$cand1'";
$cand1details=mysqli_query($connection,$q1);
$row = mysqli_fetch_array($cand1details);
echo "<tr>";
echo "<td>";
echo "<img style='width:100px;height:100px' src='".$row['Photo']."'>";
echo "</td>";
echo "<td>";
echo $row['CandidateName'];
echo "</td>";
echo "<td>";
echo $row['Email'];
echo "</td>";
echo "<td>";
echo $row['Mobile'];
echo "</td>";
echo "<td>";
echo $row['Address'];
echo "</td>";
echo "<td>";
echo $row['Description'];
echo "</td>";
echo "</tr>";
$q2="select * from Candidate where CandidateName='$cand2'";
$cand2details=mysqli_query($connection,$q2);
$row2 = mysqli_fetch_array($cand2details);
echo "<tr>";
echo "<td>";
echo "<img style='width:100px;height:100px' src='".$row2['Photo']."'>";
echo "</td>";
echo "<td>";
echo $row2['CandidateName'];
echo "</td>";
echo "<td>";
echo $row2['Email'];
echo "</td>";
echo "<td>";
echo $row2['Mobile'];
echo "</td>";
echo "<td>";
echo $row2['Address'];
echo "</td>";
echo "<td>";
echo $row2['Description'];
echo "</td>";
echo "</tr>";
$q3="select * from Candidate where CandidateName='$cand3'";
$cand3details=mysqli_query($connection,$q3);
$row3 = mysqli_fetch_array($cand3details);
echo "<tr>";
echo "<td>";
echo "<img style='width:100px;height:100px' src='".$row3['Photo']."'>";
echo "</td>";
echo "<td>";
echo $row3['CandidateName'];
echo "</td>";
echo "<td>";
echo $row3['Email'];
echo "</td>";
echo "<td>";
echo $row3['Mobile'];
echo "</td>";
echo "<td>";
echo $row3['Address'];
echo "</td>";
echo "<td>";
echo $row3['Description'];
echo "</td>";
echo "</tr>";
?>
</tbody>
</table>
</body>
</html>