forked from smuwanga/ViralLoad
/
tpl.samples.php
65 lines (65 loc) · 1.8 KB
/
tpl.samples.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
<?
//security check
if(!$GLOBALS['vlDC'] || !$_SESSION["VLEMAIL"]) {
die("<font face=arial size=2>You must be logged in to view this page.</font>");
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="border-bottom: 1px solid #e7e7e7; padding:0px 0px 15px 0px">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="vl">
<tr>
<td width="80%">
<div><strong>MANAGE SAMPLES</strong></div>
<div class="vls_grey" style="padding:5px 0px 0px 0px">Samples</div>
</td>
<td width="20%" align="right"><img src="/images/icon.samples.small.gif" border="0"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:20px 30px 30px 0px">
<?
switch($sub) {
case modifypatients:
include "tpl.samples.patients.modify.php";
break;
case managepatients:
include "tpl.samples.patients.manage.php";
break;
case modify:
include "tpl.samples.modify.php";
break;
case findedit:
//validate
if($encryptedSample) {
$sample=validate(vlDecrypt($encryptedSample));
} elseif($envelopeNumberFrom && $envelopeNumberTo) {
$sample=0;
$sample=validate(vlDecrypt($envelopeNumberFrom));
/*
$sampleTo=0;
$sampleTo=validate(vlDecrypt($envelopeNumberTo));
*/
} else {
$sample=validate($sample);
}
if(getDetailedTableInfo2("vl_samples","formNumber='$sample' or formNumber='".($sample/1)."' or vlSampleID='$sample' or concat(lrCategory,lrEnvelopeNumber,'/',lrNumericID)='$sample' limit 1","id")) {
include "tpl.samples.modify.php";
} else {
//redirect accordingly
go("/samples/incorrect/");
}
break;
case capture:
include "tpl.samples.capture.php";
break;
default:
include "tpl.samples.default.php";
break;
}
?>
</td>
</tr>
</table>