forked from smuwanga/ViralLoad
/
tpl.preview.status.php
110 lines (100 loc) · 4.01 KB
/
tpl.preview.status.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
<?
//register a globals variable for security
$GLOBALS['vlDC']=true;
include "conf.php";
//get variables
$id=getValidatedVariable("id");
$status=getValidatedVariable("status");
$outcome=0;
$outcome=getDetailedTableInfo2("vl_samples_verify","sampleID='$id' limit 1","outcome");
$outcomeReasonsID=0;
$outcomeReasonsID=getDetailedTableInfo2("vl_samples_verify","sampleID='$id' limit 1","outcomeReasonsID");
$outcomeReasons=0;
$outcomeReasons=getDetailedTableInfo2("vl_appendix_samplerejectionreason","id='$outcomeReasonsID' limit 1","appendix");
$comments=0;
$comments=getDetailedTableInfo2("vl_samples_verify","sampleID='$id' limit 1","comments");
$created=0;
$created=getDetailedTableInfo2("vl_samples_verify","sampleID='$id' limit 1","created");
$createdby=0;
$createdby=getDetailedTableInfo2("vl_samples_verify","sampleID='$id' limit 1","createdby");
$other_rejection_reasons=getData(
"GROUP_CONCAT(appendix SEPARATOR '<br>') AS other_reasons",
"vl_samples_verify_reasons AS r",
"LEFT JOIN vl_appendix_samplerejectionreason AS a ON r.reasonID=a.id WHERE sampleID=$id");
$other_reasons=mysqlresult($other_rejection_reasons,0,"other_reasons");
?>
<style type="text/css">
.cell_styl{
padding:4px 0px;
border-bottom: 1px dashed #dfe6e6;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" cellspacing="0" cellpadding="0" class="vl">
<tr>
<td class="tab_active"><?=getDetailedTableInfo2("vl_samples","id='$id'","formNumber")?> (<?=$status?>)</td>
</tr>
</table></td>
</tr>
<tr>
<td style="border:1px solid #CCCCFF; padding:20px">
<table width="100%" border="0" class="vl">
<tr>
<td>
<div style="height: 280px; overflow: auto; padding:3px">
<table width="92%" border="0" class="vl">
<tr>
<td>
<fieldset style="width: 100%">
<legend><strong>SAMPLE STATUS</strong></legend>
<div style="padding:5px 0px 0px 0px">
<table width="100%" border="0" class="vl">
<tr>
<td width="30%" class="cell_styl">Received Status</td>
<td width="70%" class="cell_styl"> <?=$outcome?></td>
</tr>
<? if($outcomeReasons) { ?>
<tr>
<td class="cell_styl">Reason</td>
<td class="cell_styl"><?=$outcomeReasons?></td>
</tr>
<? } ?>
<? if($other_reasons) { ?>
<tr>
<td class="cell_styl" valign='top'>More Reasons</td>
<td class="cell_styl"><?=$other_reasons?></td>
</tr>
<? } ?>
<? ?>
<tr>
<td class="cell_styl">Lab Comments</td>
<td class="cell_styl"><?=$comments?></td>
</tr>
<tr>
<td class="cell_styl">Changed on</td>
<td class="cell_styl"><?=getFormattedDate($created)?></td>
</tr>
<tr>
<td style="padding:4px 0px">By</td>
<td style="padding:4px 0px"><?=$createdby?></td>
</tr>
</table>
</div>
</fieldset>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td><img src="/images/spacer.gif" width="10" height="10" /></td>
</tr>
<tr>
<td style="padding: 10px 0px 0px 0px; border-top: 1px solid #999999;"><a href="#rnd" onclick="closeMessage()" class="trailanalyticss">Close!</a></td>
</tr>
</table>
</td>
</tr>
</table>