-
Notifications
You must be signed in to change notification settings - Fork 0
/
newJobs.admin.php
113 lines (84 loc) · 2.56 KB
/
newJobs.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
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>New 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="new";
$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>Uploads</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>";
$num=$row["requestNo"];
$files=scandir("./files/jobFiles/".$num);
$filesum="<td>";
foreach($files as $file){
if ($file!="." and $file!=".."){
$filesum=$filesum.'<a href="./files/jobFiles/'.$num.'/'.$file.'">'.$file.'</a><br>';
}}
$filesum=$filesum."</td>";
$proceedButton='<td> <form method="post">
<input type="hidden" name="requestNo" value='.$row["requestNo"].'>
<input type="submit" name="Proceed"
class="btn btn-success" value="Proceed" /> </form></td></tr>';
echo $rowdata,$filesum,$proceedButton;
}
?>
</tbody>
<!--Table body-->
</table>
<!--Table-->
</div>
</div>
</div>
<?php
}
else {require_once 'inc/alert.view.php';
$alertView=new alert();
echo $alertView->showAlert('No New Jobs Submitted Yet','info');}
?>
<?php
$adButtonCtrl= new adButtonControl();
if(array_key_exists('Proceed', $_POST)) {
$adButtonCtrl->proceedButton1($_POST["requestNo"]);
}
?>
<?php include_once('inc/Footer.php'); ?>
</body>
</html>