-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
78 lines (69 loc) · 2.99 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
69
70
71
72
73
74
75
76
77
78
<?php
include_once ("inc/classes/session.php");
include ("inc/classes/View.php");
$userSession = new Session();
if ($userSession->getSession('login') != true) {
header('Location: login.php');
}
$userSession->destroy();
$view = new View();
$viewCandidates = $view->viewCandidate();
//var_dump($viewCandidates);
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>View all Candidates</title>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
</head>
<body>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<?php include ('nav.php'); ?>
<div id="signupbox" style=" margin-top:10px" class="mainbox col-md-12 col-sm-8 ">
<div class="panel panel-info">
<div class="panel-heading">
<div class="panel-title">View All Candidates</div>
</div>
<div class="panel-body" >
<table class="table table-bordered" style="width: 100%; table-layout: auto;">
<thead>
<tr>
<th style="width: 15%;">Candidate Name</th>
<th style="width: 10%;">Candidate Email</th>
<th style="width: 5%;">Contact</th>
<th style="width: 30%;">Candidate Qualification</th>
<th style="width: 5%;">Age</th>
<th style="width: 25%;">Candidate Address</th>
<th style="width: 10%;">Action</th>
</tr>
</thead>
<tbody>
<?php foreach ($viewCandidates as $viewCandidate): ?>
<tr>
<td><?php echo $viewCandidate['cand_name']; ?></td>
<td><?php echo $viewCandidate['cand_email']; ?></td>
<td><?php echo $viewCandidate['cand_phone']; ?></td>
<td><?php echo $viewCandidate['cand_qualification']; ?></td>
<td><?php echo $viewCandidate['cand_age']; ?></td>
<td><?php echo $viewCandidate['cand_address']; ?></td>
<td>
<a href="takeExam.php?id=<?php echo $viewCandidate['cand_id']; ?>" style="width: 100px;" class="btn btn-primary">Take Exam</a>
<a href="viewReport.php?id=<?php echo $viewCandidate['cand_id']; ?>" style="width: 100px; margin-top: 5px;" class="btn btn-success">View Report</a>
<a style="width: 100px; margin-top: 5px;" class="btn btn-danger">Remove</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<p class="text-center top_spac"> <a href="?action=logout">Logout</a> </p>