-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathqc.php
executable file
·84 lines (76 loc) · 1.38 KB
/
qc.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
<?php
session_start();
echo '<pre>';
print_r($GLOBALS);
echo '</pre>';
include 'common.php';
if(!login_varify())
{
exit();
}
/*
Array
(
[0] => Sr #
[1] => Pat ID
[2] => Sample ID
[3] => Patient Name
[4] => Test
[5] => Result
[6] => Unit
[7] => Flag
[8] => Result Date
[9] => Curve #
[10] => Mean
[11] => SD
[12] =>
)
Array
(
[0] => 1
[1] =>
[2] => 511070609
[3] =>
[4] => Na
[5] => 151.00
[6] => mmol/l
[7] =>
[8] => 07/06/2011 09:41:27
[9] => 0
[10] => -
[11] => -
[12] =>
[13] =>
)
*/
function get_field_detail($equipment_name)
{
}
main_menu();
if(!isset($_POST['import']))
{
echo '<table><tr>';
echo '<td colspan=10><h1>Import QC data from file</h1></td></tr>';
echo '<form method=post enctype="multipart/form-data">';
echo '<tr><td>FileName:</td><td><input type=file name=import_file ></td></tr>';
echo '</tr><td>Equipment:</td><td><input type=submit name=import value=Erba_XL_640><td></tr>';
echo '</form>';
echo '</table>';
}
else
{
$link=start_nchsls();
$uploaddir = '/';
$uploadfile = $uploaddir . basename($_FILES['import_file']['name']);
echo 'uploading from:'.$uploadfile.'<br>';
echo '<pre>';
if($handle = fopen($_FILES['import_file']['tmp_name'], "r"))
{
while (($data = fgetcsv($handle, 0, chr(9))) !== FALSE)
{
print_r($data);
}
}
echo '</pre>';
}
?>