-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcandidate_regtr_admin.php
94 lines (81 loc) · 2.84 KB
/
candidate_regtr_admin.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
<!DOCTYPE html>
<html>
<?php
include('session3.php');
?>
<head>
<title>Online Election</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="css/login.css" type="text/css">
<link href="css/head.css" rel="stylesheet">
<link href="css/registration_admin.css" >
<script>
$(document).ready(function() {
$('#data').dataTable();
});
</script>
</head>
<body>
<div class="head">
<div class="container-fluid">
<div class="navbar-header">
<b>Online Election System</b>
</div>
<div>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="AdminHome.php">Home</a>
</li>
<li>
<a href="candidate_regtr_admin.php">Candidate Register</a>
</li>
<li>
<a href="registration_admin.php">Voter Register</a>
</li>
<li>
<a href="ALogout.php">Log Out</a>
</li>
</ul>
</div>
</div>
</div>
<br>
<h4 align="center"> <b> Candidate Register Form <b></h4>
<br>
<br>
<?php
require'database.php';
echo "<form name='rform' action='candidate_regtr_admin.php' method='post'>";
$sql = "SELECT `candidate_registr_no`,`frist_name`,`middle_name`,`last_name`,`request_date`,`status` FROM candidate ORDER BY `candidate_registr_no` DESC";
$result = $con->query($sql);
if ($result->num_rows > 0) {
echo " <table id='data' border='2' class='table table-striped custab' style='text-align:center'>
<thead><tr class='info'>
<th style='text-align:center'>Candidate Registr No </th>
<th style='text-align:center'>Frist Name </th>
<th style='text-align:center'>Middle Name </th>
<th style='text-align:center'>Last Name </th>
<th style='text-align:center'>Request Date</th>
<th style='text-align:center'>Status </th>
<th style='text-align:center'>Action </th>
</tr></thead>";
// output data of each row
while($row = $result->fetch_assoc()) {
$myid=$row["candidate_registr_no"];
echo "<tr><td>" . $row["candidate_registr_no"]. "</td><td>" . $row["frist_name"]. "</td><td>" . $row["middle_name"]. "</td><td>" . $row["last_name"].
"</td><td>" . $row["request_date"]. "</td>";
if($row['status']=='Pending')
echo "<td><font color='red'>".$row['status']."</font></td>";
else
echo "<td>".$row['status']."</td>";
echo'<td><button type="button" class="btn btn-info" onClick=location.href="form1.php?id='.$myid.'">View</button></td></tr>';
}
echo "</table>";
} else {
echo "0 results";
}
$con->close();
?>
</div>
</body>
</html>