Ejemplo n.º 1
0
 function verifyVisitDate($strVisitDate)
 {
     if (!bValidVerifyDate($strVisitDate)) {
         $this->form_validation->set_message('verifyVisitDate', 'The <b>Visit Date</b> is not valid.');
         return false;
     }
     if (!bValidVerifyNotFuture($strVisitDate)) {
         $this->form_validation->set_message('verifyVisitDate', 'The <b>Visit Date</b> is in the future!.');
         return false;
     }
     return true;
 }
function verifyCustomFormDate($strFieldValue, $strOpts)
{
    //---------------------------------------------------------------------
    //       $this->load->helper('dl_util/time_date');
    //---------------------------------------------------------------------
    $strFieldValue = trim($strFieldValue);
    $opts = explode(',', $strOpts);
    $strFN = trim($opts[0]);
    $strLabel = trim($opts[1]);
    $bAllowFuture = $opts[2] == 'true';
    $bRequired = $opts[3] == 'true';
    if ($bRequired) {
        if ($strFieldValue == '') {
            //            $ErrMessages[$strFN] = '<div class="formError">'.'The '.$strLabel.' field is required.</div>';
            setCFormErrorMessage($strFN, 'The ' . $strLabel . ' field is required.');
            return false;
        }
    } elseif ($strFieldValue == '') {
        return true;
    }
    if (!bValidVerifyDate($strFieldValue)) {
        //         $ErrMessages[$strFN] = '<div class="formError">'.'The '.$strLabel.' field is not valid.</div>';
        setCFormErrorMessage($strFN, 'The ' . $strLabel . ' field is not valid.');
        return false;
    }
    if (!$bAllowFuture) {
        if (!bValidVerifyNotFuture($strFieldValue)) {
            //            $ErrMessages[$strFN] = '<div class="formError">'.'The '.$strLabel.' is in the future.</div>';
            setCFormErrorMessage($strFN, 'The ' . $strLabel . ' field is in the future.');
            return false;
        }
    }
    return true;
}
 function clientStatVerifyDatePast($strDate)
 {
     return bValidVerifyNotFuture($strDate);
 }
 function peopleRecVerifyBDatePast($strBDate)
 {
     if ($strBDate == '') {
         return true;
     }
     return bValidVerifyNotFuture($strBDate);
 }
Ejemplo n.º 5
0
 function patientRecVerifyBDatePast($strBDate)
 {
     if (!bValidVerifyNotFuture($strBDate)) {
         $this->form_validation->set_message('patientRecVerifyBDatePast', 'The <b>date of birth</b> is in the future!.');
         return false;
     } else {
         return true;
     }
 }
 function verifyDatePast($strDate)
 {
     return bValidVerifyNotFuture($strDate);
 }
 function verifyMultiDate($strFieldValue, $strOpts)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $gErrMessages, $gdteNow;
     $strFieldValue = trim($strFieldValue);
     $opts = explode(',', $strOpts);
     $strFN = trim($opts[0]);
     $strLabel = '<b>"' . trim($opts[1]) . '"</b>';
     $bAllowFuture = $opts[2] == 'true';
     $bRequired = $opts[3] == 'true';
     if (!isset($gErrMessages[$strFN])) {
         $gErrMessages[$strFN] = '';
     }
     if ($bRequired) {
         if ($strFieldValue == '') {
             $gErrMessages[$strFN] .= '<div class="formError">' . 'The ' . $strLabel . ' field is required.</div>';
             return false;
         }
     } elseif ($strFieldValue == '') {
         return true;
     }
     if (!bValidVerifyDate($strFieldValue)) {
         $gErrMessages[$strFN] .= '<div class="formError">' . 'The ' . $strLabel . ' field is not valid.</div>';
         return false;
     }
     if (!$bAllowFuture) {
         if (!bValidVerifyNotFuture($strFieldValue)) {
             $gErrMessages[$strFN] .= '<div class="formError">' . 'The ' . $strLabel . ' is in the future.</div>';
             return false;
         }
     }
     return true;
 }
 function clientRecVerifyEDatePast($strEDate)
 {
     return bValidVerifyNotFuture($strEDate);
 }
Ejemplo n.º 9
0
 function measRecVerifyDatePast($strDate)
 {
     if ($strDate == '') {
         $this->form_validation->set_message('measRecVerifyDatePast', 'A measurement date is required.');
         return false;
     }
     if (!bValidVerifyNotFuture($strDate)) {
         $this->form_validation->set_message('measRecVerifyDatePast', 'This date is in the future!');
         return false;
     } else {
         return true;
     }
 }