-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_new_special.php
74 lines (55 loc) · 2.05 KB
/
create_new_special.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
<?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>';
$link=get_link($GLOBALS['main_user'],$GLOBALS['main_pass']);
main_menu($link);
$tok=explode("|",$_POST['action']);
if($tok[0]=='ex_list')
{
get_data_specific($link,$tok[1]);
}
elseif($_POST['action']=='insert')
{
$sample_id_array=save_insert_specific($link);
if(count($sample_id_array)==0){echo '<h3>No sample required // Nothing to be done</h3>';}
foreach($sample_id_array as $sample_id)
{
view_sample($link,$sample_id);
}
}
function get_data_specific($link,$ex_list)
{
echo '<form method=post class="bg-light jumbotron">';
echo '<input type=hidden name=session_name value=\''.session_name().'\'>';
echo '<ul class="nav nav-pills nav-justified">
<li class="active" ><button class="btn btn-secondary" type=button data-toggle="tab" href="#basic">Basic</button></li>
<li><button class="btn btn-secondary" type=button data-toggle="tab" href="#examination">Examinations</button></li>
<li><button class="btn btn-secondary" type=button data-toggle="tab" href="#profile">Profiles</button></li>
<li><button class="btn btn-secondary" type=button data-toggle="tab" href="#super_profile">SuperProfiles</button></li>
<li><button type=submit class="btn btn-primary form-control" name=action value=insert>Save</button></li>
</ul>';
echo '<div class="tab-content">';
echo '<div id=basic class="tab-pane active">';
//get_one_field_for_insert($link,1001);
get_basic_specific();
$tok=explode(",",$ex_list);
foreach($tok as $value)
{
get_one_field_for_insert($link,$value);
}
echo '</div>';
get_examination_data($link);
get_profile_data($link);
get_super_profile_data($link);
echo '</div>';
echo '</form>';
}
//////////////user code ends////////////////
tail();
echo '<pre>';print_r($_POST);echo '</pre>';
//////////////Functions///////////////////////
?>