- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / medocs / include / save_admission_data.inc.php
blob52651f0ed73cf77d4e3bd768b3cb9e3dbf4cd757
1 <?php
2 /*------begin------ This protection code was suggested by Luki R. luki@karet.org ---- */
3 if (eregi('save_admission_data.inc.php',$PHP_SELF))
4 die('<meta http-equiv="refresh" content="0; url=../">');
7 $obj->setDataArray($HTTP_POST_VARS);
9 switch($mode)
11 case 'create':
12 if($obj->insertDataFromInternalArray()) {
13 if(isset($redirect)&&$redirect){
14 header("location:".$thisfile.URL_REDIRECT_APPEND."&target=$target&mode=details&encounter_nr=".$HTTP_SESSION_VARS['sess_en']."&nr=".$HTTP_POST_VARS['ref_notes_nr']);
15 exit;
17 } else echo "$obj->sql<br>$LDDbNoSave";
18 break;
19 case 'update':
20 $obj->where=' nr='.$nr;
21 if($obj->updateDataFromInternalArray($nr)) {
22 if($redirect){
23 header("location:".$thisfile.URL_REDIRECT_APPEND."&target=$target&encounter_nr=".$HTTP_SESSION_VARS['sess_en']);
24 echo "$obj->sql<br>$LDDbNoUpdate";
25 exit;
27 } else echo "$obj->sql<br>$LDDbNoUpdate";
28 break;
29 }// end of switch