-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
67 lines (57 loc) · 1.44 KB
/
search.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
<?php
//$GLOBALS['nojunk']='';
require_once 'project_common.php';
require_once 'base/verify_login.php';
//echo '<link rel="stylesheet" type="text/css" media="print" href="bootstrap/css/bootstrap.min.css">';
////////User code below/////////////////////
echo ' <link rel="stylesheet" href="project_common.css">
<script src="project_common.js"></script>';
$link=get_link($GLOBALS['main_user'],$GLOBALS['main_pass']);
main_menu($link);
//echo '<pre>';print_r($_POST);
//echo '</pre>';
echo '<div id=response></div>';
if($_POST['action']=='get_search_condition')
{
get_search_condition($link);
}
elseif($_POST['action']=='set_search')
{
set_search($link);
}
elseif($_POST['action']=='search')
{
$search_array=prepare_search_array($link);
//print_r($_POST);
//print_r($search_array);
$first=TRUE;
$temp=array();
foreach ($search_array as $sk=>$sv)
{
//print_r($temp);
$temp=get_sample_with_condition($link,$sk,$sv,$temp,$first);
//print_r($temp);
$first=FALSE;
}
//print_r($temp);
if(count($temp)>0)
{
//$sample_id_csv = implode(',', $temp);
//echo_export_button($sample_id_csv);
//echo_class_button($link,'OGDC') ;
foreach ($temp as $sid)
{
view_sample($link,$sid);
echo '<br>';
}
}
else
{
echo '<h3>No Sample matching // Nothing meaningful provided!!</h3>';
}
}
//////////////user code ends////////////////
tail();
//echo '<pre>';print_r($_POST);echo '</pre>';
//////////////Functions///////////////////////
?>