-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocation_report.php
68 lines (55 loc) · 1.68 KB
/
location_report.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
<?php
// $GLOBALS['nojunk']='';
require_once 'project_common.php';
require_once 'base/verify_login.php';
////////User code below/////////////////////
echo ' <link rel="stylesheet" href="project_common.css">
<script src="project_common.js"></script>';
main_menu($link);
$link=get_link($GLOBALS['main_user'],$GLOBALS['main_pass']);
if($_POST['action']=='get_location_list')
{
echo '<h3>Search and print Sample IDs</h3>';
get_location_list($link);
}
elseif($_POST['action']=='search')
{
echo '<h3 class="text-success" >Samples from '.$_POST['__ex__1006'].' on '.$_POST['__ex__1017'].'</h3>';
$search_sql='select loc_r.sample_id
from result loc_r, result rec_r
where
loc_r.examination_id=1006
and
rec_r.examination_id=1017
and
loc_r.sample_id=rec_r.sample_id
and
(
loc_r.result=\''.$_POST['__ex__1006'].'\'
and
rec_r.result=\''.$_POST['__ex__1017'].'\'
)
';
//print($search_sql);
$result=run_query($link,$GLOBALS['database'],$search_sql);
while($ar=get_single_row($result))
{
//echo $ar['sample_id'];
show_sid_button_release_status_and_pid($link,$ar['sample_id']);
echo '<br>';
}
}
//////////////user code ends////////////////
tail();
//echo '<pre>';print_r($_POST);echo '</pre>';
//////////////Functions///////////////////////
function get_location_list($link)
{
echo '<form method=post>';
get_one_field_for_insert($link,1006);
get_one_field_for_insert($link,1017);
echo '<button type=submit class="btn btn-primary form-control m-1" name=action value=search>Search</button>';
echo '<input type=hidden name=session_name value=\''.session_name().'\'>';
echo '</form>';
}
?>