function patientRecVerifyBDateValid($strBDate) { if (!bValidVerifyDate($strBDate)) { $this->form_validation->set_message('patientRecVerifyBDateValid', 'The <b>date of birth</b> is not valid.'); return false; } else { return true; } }
function verifyRecurring($strStart) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- if (!bValidVerifyDate($strStart)) { $this->form_validation->set_message('verifyRecurring', 'Please enter a valid event start date.'); return false; } $lNumRecur = (int) $_POST['ddlRecur']; if ($lNumRecur == 1) { return true; } $strRecur = trim($_POST['rdoRecur']); $bFailed = false; $strErr = ''; switch ($strRecur) { case 'daily': break; case 'weekly': if (!(@$_POST['chkWkSun'] == 'TRUE' || @$_POST['chkWkMon'] == 'TRUE' || @$_POST['chkWkTue'] == 'TRUE' || @$_POST['chkWkWed'] == 'TRUE' || @$_POST['chkWkThu'] == 'TRUE' || @$_POST['chkWkFri'] == 'TRUE' || @$_POST['chkWkSat'] == 'TRUE')) { $bFailed = true; $strErr = 'For weekly recurrence, please select the recurring day(s) of the week.'; } break; case 'monthly': $strFL = trim(@$_POST['rdoFixedLoose']); switch ($strFL) { case 'FL': $bFound = false; $idx = 1; while (!$bFound && $idx <= 31) { $bFound = @$_POST['chkFixed' . $idx] == 'on'; ++$idx; } if (!$bFound) { $bFailed = true; $strErr = 'For fixed monthly recurrence, please select one or more dates.'; } break; case 'RM': $bFound1 = @$_POST['chkRel_1st'] == 'TRUE' || @$_POST['chkRel_2nd'] == 'TRUE' || @$_POST['chkRel_3rd'] == 'TRUE' || @$_POST['chkRel_4th'] == 'TRUE' || @$_POST['chkRel_5th'] == 'TRUE' || @$_POST['chkRel_last'] == 'TRUE'; $bFound2 = @$_POST['chkRelSun'] == 'on' || @$_POST['chkRelMon'] == 'on' || @$_POST['chkRelTue'] == 'on' || @$_POST['chkRelWed'] == 'on' || @$_POST['chkRelThu'] == 'on' || @$_POST['chkRelFri'] == 'on' || @$_POST['chkRelSat'] == 'on'; if (!($bFound1 && $bFound2)) { $bFailed = true; $strErr = 'For relative monthly recurrence, please select one or more entries from each row.'; } break; default: $bFailed = true; $strErr = 'For monthly recurrence, please select either "Fixed monthly dates" or "Relative monthly dates".'; break; } break; } if ($bFailed) { $this->form_validation->set_message('verifyRecurring', $strErr); return false; } else { return true; } }
function measRecVerifyDateValid($strDate) { if ($strDate == '') { $this->form_validation->set_message('measRecVerifyDateValid', 'A measurement date is required.'); return false; } if (!bValidVerifyDate($strDate)) { $this->form_validation->set_message('measRecVerifyDateValid', 'This date is not valid.'); return false; } elseif (!bValidVerifyUnixRange($strDate)) { $this->form_validation->set_message('measRecVerifyDateValid', 'This date is out of range.'); return false; } else { return true; } }
function clientImageUploadVerifyBDateValid($strDate) { return bValidVerifyDate($strDate); }
function clientRecVerifyEffDateValid($strEDate) { return bValidVerifyDate($strEDate); }
function peopleRecVerifyBDateValid($strBDate) { if ($strBDate == '') { return true; } return bValidVerifyDate($strBDate); }
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 sponPaymentAddEditDateValid($strDate) { return bValidVerifyDate($strDate); }
function verifyBatchInput($dummy) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $bFormOkay = true; if (!isset($_REQUEST['txtAmount'])) { return true; } foreach ($_REQUEST['txtAmount'] as $lSponID => $txtAmount) { $this->validation->paymentType[$lSponID] = $this->validation->paymentDate[$lSponID] = $this->validation->amount[$lSponID] = ''; $txtAmount = $this->stripCommas(trim($txtAmount)); if ($txtAmount == '') { $this->validation->requiresVerification[$lSponID] = false; } elseif (is_numeric($txtAmount) && abs((double) $txtAmount) < 0.01) { $this->validation->requiresVerification[$lSponID] = false; } else { $this->validation->requiresVerification[$lSponID] = true; } } foreach ($_REQUEST['txtAmount'] as $lSponID => $txtAmount) { if ($this->validation->requiresVerification[$lSponID]) { $txtAmount = $this->stripCommas(trim($txtAmount)); $txtPayDate = trim($_POST['txtPayDate' . $lSponID]); $lPayTypeID = (int) $_REQUEST['ddlPayType'][$lSponID]; if (!is_numeric($txtAmount)) { $this->validation->amount[$lSponID] = '<br><div class="formError" style="width: 170px;">The <b>Payment Amount</b> field must contain only numbers.</div>'; $bFormOkay = false; } $sngAmount = (double) $txtAmount; if ($sngAmount < 0.0) { $this->validation->amount[$lSponID] = '<br><div class="formError" style="width: 170px;">The <b>Payment Amount</b> can not be a negative number.</div>'; $bFormOkay = false; } if ($lPayTypeID <= 0) { $this->validation->paymentType[$lSponID] = '<br><div class="formError" style="width: 170px;">Please select a <b>Payment Type</b>.</div>'; $bFormOkay = false; } if ($txtPayDate == '') { $this->validation->paymentDate[$lSponID] = '<br><div class="formError" style="width: 170px;">Please enter a <b>Payment Date</b>.</div>'; $bFormOkay = false; } elseif (!bValidVerifyDate($txtPayDate)) { $this->validation->paymentDate[$lSponID] = '<br><div class="formError" style="width: 170px;">The <b>Payment Date</b> is not valid.</div>'; $bFormOkay = false; } } } return $bFormOkay; }
function giftVerifyDDateValid($strDate) { return bValidVerifyDate($strDate); }
function itemVerifyDateAcquiredValid($strAcquiredDate) { if (bValidVerifyDate($strAcquiredDate)) { return true; } else { $this->form_validation->set_message('itemVerifyDateAcquiredValid', 'Please enter a valid acquisistion date.'); return false; } }
function obtainedDateValid($strDate) { return bValidVerifyDate($strDate); }
function ufFieldVerifyDateValid($strDate) { if ($strDate == '') { return true; } else { return bValidVerifyDate($strDate); } }
function edateVerifyDateValid($strEDate) { return bValidVerifyDate($strEDate); }
function clientStatVerifyDateValid($strDate) { return bValidVerifyDate($strDate); }
function verifySearchDate($strDate) { if (!bValidVerifyDate($strDate)) { $this->form_validation->set_message('verifySearchDate', 'The <b>Comparison Date</b> is not valid.'); return false; } else { return true; } }
function verifyDateValid($strDate) { if (!bValidVerifyDate($strDate)) { $this->form_validation->set_message('verifyDateValid', 'The <b>training date</b> is not valid.'); return false; } else { return true; } }
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 pledgeVerifyDateValid($strDate) { if (!bValidVerifyDate($strDate)) { $this->form_validation->set_message('pledgeVerifyDateValid', 'The date you entered is not valid.'); return false; } else { return true; } }
function bidVerifyFDateValid($strDate) { return bValidVerifyDate($strDate); }
function rptEnd($strEDate, $strRadioFN) { if ($_REQUEST[$strRadioFN] != 'User') { return true; } if (bValidVerifyDate($strEDate)) { return true; } else { $this->form_validation->set_message('rptEnd', 'The report end date is not valid'); return false; } }
function itemVerifyDateCICOValid($strCICODate, $strParms) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $parms = explode(',', $strParms); $bVerifyAfterCO = $parms[0] == 'true'; $dteCO = (int) $parms[1]; if (!bValidVerifyDate($strCICODate)) { $this->form_validation->set_message('itemVerifyDateCICOValid', 'Please enter a valid date.'); return false; } else { if ($bVerifyAfterCO) { // CBH: cart before horse if (!bVerifyCartBeforeHorse(date($genumDateFormat, $dteCO), $strCICODate)) { $this->form_validation->set_message('itemVerifyDateCICOValid', 'Your check-in date is <b>before</b> the check-out date!.'); return false; } } } return true; }
function verifyUnDateValid($strDate) { return bValidVerifyDate($strDate); }
function verifyDateValid($strDate) { if (bValidVerifyDate($strDate)) { return true; } else { $this->form_validation->set_message('verifyDateValid', 'Bad date.... been there'); return false; } }
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 depositVerifyEDateValid($strEDate) { return bValidVerifyDate($strEDate); }
function sponDeactivateDateValid($strDate) { return bValidVerifyDate($strDate); }
function sponChargeAddEditDateValid($strDate) { return bValidVerifyDate($strDate); }