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);
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']);
17 } else echo "$obj->sql<br>$LDDbNoSave";
20 $obj->where
=' nr='.$nr;
21 if($obj->updateDataFromInternalArray($nr)) {
23 header("location:".$thisfile.URL_REDIRECT_APPEND
."&target=$target&encounter_nr=".$HTTP_SESSION_VARS['sess_en']);
24 echo "$obj->sql<br>$LDDbNoUpdate";
27 } else echo "$obj->sql<br>$LDDbNoUpdate";