コード例 #1
0
ファイル: add_entry.php プロジェクト: purdue-epics-wise/AMBI
             $error_message .= _("Please enter urine saturation") . "<br />";
         }
     } elseif ($_REQUEST['out_s_color'] || $_REQUEST['out_s_consistency']) {
         if (!$_REQUEST['out_s_color']) {
             $error_message .= _("Please enter stool color") . "<br />";
         }
         if (!$_REQUEST['out_s_consistency']) {
             $error_message .= _("Please enter stool consistency") . "<br />";
         }
     }
     if (!$_REQUEST['out_u_color'] && !$_REQUEST['out_u_saturation'] && !$_REQUEST["out_s_color"] && !$_REQUEST["out_s_consistency"]) {
         $error_message .= "Please enter output color and saturation or consitency<br />";
     }
     if (empty($error_message)) {
         // insert the entry into the database.
         if (addOutputEntry($_SESSION['mid'], $_REQUEST['out_u_color'], $_REQUEST['out_u_saturation'], $_REQUEST['out_s_color'], $_REQUEST['out_s_consistency'], $_REQUEST['NumberDiapers'], $entryDate)) {
             $success_message = _("Output entry added successfully");
         } else {
             $error_message = _("An error ocurred while processing your submission. Please contact the site administrator.");
         }
     }
 } elseif (@$_REQUEST['weight']) {
     $active_tab = "health";
     // insert the entry into the database.
     $ounces = $_REQUEST['weight-lbs'] * 16 + $_REQUEST['weight-oz'];
     if (addWeightEntry($_SESSION['mid'], $ounces, $entryDate)) {
         $success_message = _("Infant weight entry added successfully");
     } else {
         $error_message = _("An error ocurred while processing your submission. Please contact the site administrator.");
     }
 } elseif (@$_REQUEST['morb']) {
コード例 #2
0
             $error_message .= _("Please enter urine saturation");
         }
     } elseif ($_POST['out_s_color'] || $_POST['out_s_consistency']) {
         if (!$_POST['out_s_color']) {
             $error_message .= _("Please enter stool color");
         }
         if (!$_POST['out_s_consistency']) {
             $error_message .= _("Please enter stool consistency");
         }
     }
     if (!$_POST['out_u_color'] && !$_POST['out_u_saturation'] && !$_POST["out_s_color"] && !$_POST["out_s_consistency"]) {
         $error_message .= "Please enter output color and saturation or consitency";
     }
     if (empty($error_message)) {
         // insert the entry into the database.
         if (addOutputEntry($_SESSION['mid'], $_POST['out_u_color'], $_POST['out_u_color'], $_POST['out_s_color'], $_POST['out_s_consistency'], $_POST['NumberDiapers'], $entryDate)) {
             $success_message = "Output entry added successfully";
             unset($_POST, $hour, $minute, $ampm);
         } else {
             $error_message = _("An error ocurred while processing your submission. Please contact the site administrator.");
         }
     }
 } elseif ($_POST['morb_type']) {
     $active_tab = "morbidity";
     // insert the entry into the database.
     if (addMorbidityEntry($_SESSION['mid'], $_POST['morb_type'], $entryDate)) {
         $success_message = _("Health issue entry added successfully");
         unset($_POST, $hour, $minute, $ampm);
     } else {
         $error_message = _("An error ocurred while processing your submission. Please contact the site administrator.");
     }