-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeactivate-job.php
More file actions
73 lines (36 loc) · 1.79 KB
/
deactivate-job.php
File metadata and controls
73 lines (36 loc) · 1.79 KB
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
<?php
include_once('mysql-fix.php');
include ('include/dashboard.php');
$job_id = isset($_POST['job']) ? $_POST['job'] : die('Error');
$sql = "UPDATE `print_job` SET `stauts`='Deleted' WHERE `job_id` =" . $job_id."";
if (mysql_query($sql)) {
echo $sql = "SELECT job_id, number_of_pages, stauts, date FROM print_job WHERE user_id = '". $_SESSION['user_id'] ."' AND `stauts` != 'Deleted'";
$result = mysql_query($sql) or die("Error");
echo '<table id="large" class="tablesorter" style="width: 100%;">';
echo '<thead><tr><th style="text-align: left;">Job ID</th><th style="width: 50px; text-align: left;">Page</th><th style="width: 150px; text-align: left;">Status</th><th style="width: 200px; text-align: left;">Date</th><th style="width: 70px; text-align: left;">Option</th></tr></thead>';
$i=1;
while ($row = mysql_fetch_array($result)) {
if ($i++ % 2 == 0) {
echo '<tr class="tr-even">';
echo '<td>'.$row['job_id'].'</td>';
echo '<td>'.$row['number_of_pages'].'</td>';
echo '<td class="'.$row['job_id'].'">'.$row['stauts'].'</td>';
echo '<td>'.$row['date'].'</td>';
echo '<td><a id="'.$row['job_id'].'" class="lnk">Delete</a></td>';
echo '</tr>';
} else {
echo '<tr class="tr-odd">';
echo '<td>'.$row['job_id'].'</td>';
echo '<td>'.$row['number_of_pages'].'</td>';
echo '<td class="'.$row['job_id'].'">'.$row['stauts'].'</td>';
echo '<td>'.$row['date'].'</td>';
echo '<td><a id="'.$row['job_id'].'" class="lnk">Delete</a></td>';
echo '</tr>';
}
}
echo '</table>';
}
else{
echo "Error";
}
?>