-
Notifications
You must be signed in to change notification settings - Fork 0
/
completeJob.admin.php
105 lines (77 loc) · 2.4 KB
/
completeJob.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
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Completed Jobs</title>
</head>
<body>
<?php include_once("inc/Header.php"); ?>
<link rel="stylesheet" href="css/newJobs.css">
<script src="inc/searchBar.js"></script>
<?php
error_reporting(E_ALL);
require_once 'controller/adminJob.ctrl.php';
//$loginId=$_SESSION['loginID'];
$adctrll=new adminTableControl();
$var="completed";
$result=$adctrll-> requestHistory($var);
if ($adctrll->hasJobsSubmitted($result)) {?>
<div class="row">
<div class="col-sm-8"> </div>
<div class="col-sm-4">
<div class="search-bar"><input type="text" id="searchBar" placeholder="Search Keyword..."></div>
</div>
</div>
<div>
<div class='table-responsive'>
<!--Table-->
<table id="tablePreview" class="table table-hover table-striped">
<!--Table head-->
<thead>
<tr>
<th>Request #</th>
<th>Request Type</th>
<th>User ID</th>
<th>Description</th>
<th></th>
</tr>
</thead>
<!--Table head-->
<!--Table body-->
<tbody id="requestTable">
<?php
while ($row=$adctrll->fetchData($result)){
$rowdata= "<tr><td class='column1'>" .$row["requestNo"]
."</td><td class='column1'>".$row["details"]
."</td><td class='column1'>".$row["userId"]
."</td><td class='column1'>".$row["description"]."</td>";
$finishButton='<td> <form method="post">
<input type="hidden" name="requestNo" value='.$row["requestNo"].'>
<input type="submit" name="Finish"
class="btn btn-success" value="Finish" /> </form></td></tr>';
echo $rowdata,$finishButton;
}
?>
</tbody>
<!--Table body-->
</table>
<!--Table-->
</div>
</div>
</div>
<?php
}
else {require_once 'inc/alert.view.php';
$alertView=new alert();
echo $alertView->showAlert('No Jobs Available','info');}
?>
<?php
$adButtonCtrl= new adButtonControl();
if(array_key_exists('Finish', $_POST)) {
$adButtonCtrl->FinishButton($_POST["requestNo"]);
}
?>
<?php include_once('inc/Footer.php'); ?>
</body>
</html>