-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog.php
More file actions
82 lines (76 loc) · 3.34 KB
/
log.php
File metadata and controls
82 lines (76 loc) · 3.34 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
74
75
76
77
78
79
80
81
<?php
/*------------------------------------------------------------------------*
* © 2010 University of Limerick. All rights reserved. This material may *
* not be reproduced, displayed, modified or distributed without the *
* express prior written permission of the copyright holder. *
*------------------------------------------------------------------------*/
require_once('./conf.php');
$id=$_GET["id"];
$db = new PDO('sqlite:'.BASE_DB_URL.'locTemp.sqlite');
$res = $db->query('select * from Project where ID="'.$id.'"');
$c=0;
foreach($res as $row)
{
$c=$c+1;
$currentstep=(int)$row['CurrentStep'];
$finishdate=$row['FinishDate'];
}
if ($c>0)
{
if ($currentstep>1 )
{
;?>
<h2 class="orange"> <?php print BASE_T_STO;?> </h2>
<table class="log" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="300px" style="text-decoration:underline; font-weight:bold; color:#000000;"><?php print BASE_T_COM;?> </td>
<td width="200px" style="text-decoration:underline; font-weight:bold;color:#000000;"><?php print BASE_T_PICKED;?></td>
<td width="200px" style="text-decoration:underline; font-weight:bold;color:#000000;"><?php print BASE_T_OUTON;?></td>
<td width="150px" style="text-decoration:underline; font-weight:bold;color:#000000;"><?php print BASE_T_OUTPUT;?></td>
</tr>
<?php
$result = $db->query('SELECT Com, PickDate, UpdatedDate, WOrder FROM Demo where Job="'.$id.'" and WOrder<'.(string)$currentstep.' order by WOrder ASC ');
foreach($result as $r)
{
print "<tr>\n";
print "<td>".$arr[$r['Com']]."</td>\n";
print "<td>".$r['PickDate']."</td>\n";
print "<td>".$r['UpdatedDate']."</td>\n";
print "<td> <a href='http://".$_SERVER['HTTP_HOST'].BASE_URL."/dxliff.php?id=".$id."&com=".$r['Com']."&order=".$r['WOrder']."'>".BASE_TP_DOWNLOAD."</a> <a target='_blank' href='http://".$_SERVER['HTTP_HOST'].BASE_URL."/xview.php?id=".$id."&com=".$r['Com']."&order=".$r['WOrder']."'>".BASE_T_VIEW."</a</td>\n";
print "</tr>\n";
}
} else
{
if ($currentstep!=1)
{
;?>
<h2 class="orange"> Status & Outputs </h2>
<table class="log" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="300px" style="text-decoration:underline; font-weight:bold; color:#000000;"><?php print BASE_T_COM;?> </td>
<td width="200px" style="text-decoration:underline; font-weight:bold;color:#000000;"><?php print BASE_T_PICKED;?></td>
<td width="200px" style="text-decoration:underline; font-weight:bold;color:#000000;"><?php print BASE_T_OUTON;?></td>
<td width="150px" style="text-decoration:underline; font-weight:bold;color:#000000;"><?php print BASE_T_OUTPUT;?></td>
</tr>
<?php
$result = $db->query('SELECT Com, PickDate, UpdatedDate, WOrder FROM Demo where Job="'.$id.'" order by WOrder ASC ');
foreach($result as $r)
{
print "<tr>\n";
print "<td>".$arr[$r['Com']]."</td>\n";
print "<td>".$r['PickDate']."</td>\n";
print "<td>".$r['UpdatedDate']."</td>\n";
print "<td> <a href='http://".$_SERVER['HTTP_HOST'].BASE_URL."/dxliff.php?id=".$id."&com=".$r['Com']."&order=".$r['WOrder']."'>".BASE_TP_DOWNLOAD."</a> <a target='_blank' href='http://".$_SERVER['HTTP_HOST'].BASE_URL."/xview.php?id=".$id."&com=".$r['Com']."&order=".$r['WOrder']."'>".BASE_T_VIEW."</a</td>\n";
print "</tr>\n";
}
}
;?>
<?php
}
} else die("Project Not Found.");
$db=NULL;
;?>
</tbody>
</table>