-
Notifications
You must be signed in to change notification settings - Fork 2
/
autoverify_action.php
executable file
·98 lines (79 loc) · 2.8 KB
/
autoverify_action.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
<?php
session_start();
echo '<html>';
echo '<head>';
echo '</head>';
echo '<body>';
/*
echo '<pre>';
print_r($GLOBALS);
echo '</pre>';
*/
include 'common.php';
if(!login_varify())
{
exit();
}
main_menu();
if(isset($_POST['sample_id']) && isset($_POST['action']))
{
if($_POST['action']=='1')
{
edit_sample($_POST['sample_id'],'autoverify_action.php ','disabled','No');
edit_examination($_POST['sample_id'],'autoverify_action.php ','');
}
elseif($_POST['action']=='save_examination')
{
save_examination($_POST);
edit_sample($_POST['sample_id'],'autoverify_action.php ','disabled','No');
edit_examination($_POST['sample_id'],'autoverify_action.php ','disabled');
}
elseif($_POST['action']=='2')
{
echo '<a href="import_results_XL_640.php">Import results from XL-640</a><br>';
echo '<a href="import_results_miura.php">Import results from Miura-300</a>';
}
elseif($_POST['action']=='3')
{
save_single_examination_code($_POST['sample_id'],$_POST['code'],'Result awaited');
edit_sample($_POST['sample_id'],'autoverify_action.php ','disabled','No');
edit_examination($_POST['sample_id'],'autoverify_action.php ','');
}
elseif($_POST['action']=='5')
{
save_single_examination_code($_POST['sample_id'],$_POST['code'],'not done');
insert_single_examination($_POST['sample_id'],1002);
append_single_examination($_POST['sample_id'],1002,$_POST['code'].' NOT DONE done because sample inadequate.');
edit_sample($_POST['sample_id'],'autoverify_action.php ','disabled','No');
edit_examination($_POST['sample_id'],'autoverify_action.php ','');
}
elseif($_POST['action']=='6')
{
save_single_examination_code($_POST['sample_id'],$_POST['code'],'not done');
insert_single_examination($_POST['sample_id'],1002);
append_single_examination($_POST['sample_id'],1002,$_POST['code'].' NOT DONE done because lab. resources inadequate.');
edit_sample($_POST['sample_id'],'autoverify_action.php ','disabled','No');
edit_examination($_POST['sample_id'],'autoverify_action.php ','');
}
elseif($_POST['action']=='7') //same as action=1(edit manually)
{
edit_sample($_POST['sample_id'],'autoverify_action.php ','disabled','No');
edit_examination($_POST['sample_id'],'autoverify_action.php ','');
}
/*
elseif($_POST['action']=='delete_examination')
{
if(isset($_POST['code']))
{
$link=start_nchsls();
$sql='delete from examination where sample_id=\''.$_POST['sample_id'].'\' and code=\''.$_POST['code'].'\'';
echo $sql;
$result=mysql_query($sql,$link);
echo 'deleted '.mysql_affected_rows($link).' examination<br>';
}
edit_sample($_POST['sample_id'],'autoverify_action.php ','disabled','No');
edit_examination($_POST['sample_id'],'autoverify_action.php ','disabled');
}
*/
}
?>