function ValidateForm()
 {
     global $gsFormError, $GiftCertificates;
     // Initialize
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if ($GiftCertificates->CustomerID->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Customer";
     }
     if (!ew_CheckInteger($GiftCertificates->CustomerID->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect integer - Customer";
     }
     if (!ew_CheckEmail($GiftCertificates->GiftEmail->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect email - Recipient Email";
     }
     if ($GiftCertificates->GiftFirstName->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Recipient First Name";
     }
     if ($GiftCertificates->GiftLastName->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Recipient Last Name";
     }
     if ($GiftCertificates->GiftAmount->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Gift Amount";
     }
     if (!ew_CheckNumber($GiftCertificates->GiftAmount->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect floating point number - Gift Amount";
     }
     if (!ew_CheckInteger($GiftCertificates->PromoCodeID->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect integer - Promo Code ID";
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= $sFormCustomError;
     }
     return $ValidateForm;
 }
Пример #2
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->id_actividad->FldIsDetailKey && !is_null($this->id_actividad->FormValue) && $this->id_actividad->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->id_actividad->FldCaption());
     }
     if (!ew_CheckEmail($this->mail->FormValue)) {
         ew_AddMessage($gsFormError, $this->mail->FldErrMsg());
     }
     if (!ew_CheckPhone($this->tel->FormValue)) {
         ew_AddMessage($gsFormError, $this->tel->FldErrMsg());
     }
     if (!ew_CheckPhone($this->cel->FormValue)) {
         ew_AddMessage($gsFormError, $this->cel->FldErrMsg());
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsFormError, $sFormCustomError);
     }
     return $ValidateForm;
 }
Пример #3
0
 function ValidateForm($email)
 {
     global $gsFormError, $Language;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return TRUE;
     }
     if ($email == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterValidEmail"));
     }
     if (!ew_CheckEmail($email)) {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterValidEmail"));
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form Custom Validate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsFormError, $sFormCustomError);
     }
     return $ValidateForm;
 }
Пример #4
0
 function ExportEmail($EmailContent)
 {
     global $gTmpImages, $Language;
     $sSender = @$_GET["sender"];
     $sRecipient = @$_GET["recipient"];
     $sCc = @$_GET["cc"];
     $sBcc = @$_GET["bcc"];
     $sContentType = @$_GET["contenttype"];
     // Subject
     $sSubject = ew_StripSlashes(@$_GET["subject"]);
     $sEmailSubject = $sSubject;
     // Message
     $sContent = ew_StripSlashes(@$_GET["message"]);
     $sEmailMessage = $sContent;
     // Check sender
     if ($sSender == "") {
         return "<p class=\"text-error\">" . $Language->Phrase("EnterSenderEmail") . "</p>";
     }
     if (!ew_CheckEmail($sSender)) {
         return "<p class=\"text-error\">" . $Language->Phrase("EnterProperSenderEmail") . "</p>";
     }
     // Check recipient
     if (!ew_CheckEmailList($sRecipient, EW_MAX_EMAIL_RECIPIENT)) {
         return "<p class=\"text-error\">" . $Language->Phrase("EnterProperRecipientEmail") . "</p>";
     }
     // Check cc
     if (!ew_CheckEmailList($sCc, EW_MAX_EMAIL_RECIPIENT)) {
         return "<p class=\"text-error\">" . $Language->Phrase("EnterProperCcEmail") . "</p>";
     }
     // Check bcc
     if (!ew_CheckEmailList($sBcc, EW_MAX_EMAIL_RECIPIENT)) {
         return "<p class=\"text-error\">" . $Language->Phrase("EnterProperBccEmail") . "</p>";
     }
     // Check email sent count
     if (!isset($_SESSION[EW_EXPORT_EMAIL_COUNTER])) {
         $_SESSION[EW_EXPORT_EMAIL_COUNTER] = 0;
     }
     if (intval($_SESSION[EW_EXPORT_EMAIL_COUNTER]) > EW_MAX_EMAIL_SENT_COUNT) {
         return "<p class=\"text-error\">" . $Language->Phrase("ExceedMaxEmailExport") . "</p>";
     }
     // Send email
     $Email = new cEmail();
     $Email->Sender = $sSender;
     // Sender
     $Email->Recipient = $sRecipient;
     // Recipient
     $Email->Cc = $sCc;
     // Cc
     $Email->Bcc = $sBcc;
     // Bcc
     $Email->Subject = $sEmailSubject;
     // Subject
     $Email->Format = $sContentType == "url" ? "text" : "html";
     $Email->Charset = EW_EMAIL_CHARSET;
     if ($sEmailMessage != "") {
         $sEmailMessage = ew_RemoveXSS($sEmailMessage);
         $sEmailMessage .= $sContentType == "url" ? "\r\n\r\n" : "<br><br>";
     }
     if ($sContentType == "url") {
         $sUrl = ew_ConvertFullUrl(ew_CurrentPage() . "?" . $this->ExportQueryString());
         $sEmailMessage .= $sUrl;
         // Send URL only
     } else {
         foreach ($gTmpImages as $tmpimage) {
             $Email->AddEmbeddedImage($tmpimage);
         }
         $sEmailMessage .= $EmailContent;
         // Send HTML
     }
     $Email->Content = $sEmailMessage;
     // Content
     $EventArgs = array();
     $bEmailSent = FALSE;
     if ($this->Email_Sending($Email, $EventArgs)) {
         $bEmailSent = $Email->Send();
     }
     // Check email sent status
     if ($bEmailSent) {
         // Update email sent count
         $_SESSION[EW_EXPORT_EMAIL_COUNTER]++;
         // Sent email success
         return "<p class=\"text-success\">" . $Language->Phrase("SendEmailSuccess") . "</p>";
         // Set up success message
     } else {
         // Sent email failure
         return "<p class=\"text-error\">" . $Email->SendErrDescription . "</p>";
     }
 }
Пример #5
0
function ew_CheckEmailList($value, $email_cnt)
{
    if (strval($value) == "") {
        return TRUE;
    }
    $emailList = str_replace(",", ";", $value);
    $arEmails = explode(";", $emailList);
    $cnt = count($arEmails);
    if ($cnt > $email_cnt && $email_cnt > 0) {
        return FALSE;
    }
    foreach ($arEmails as $email) {
        if (!ew_CheckEmail($email)) {
            return FALSE;
        }
    }
    return TRUE;
}
Пример #6
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!ew_CheckEuroDate($this->fecha_nacimiento->FormValue)) {
         ew_AddMessage($gsFormError, $this->fecha_nacimiento->FldErrMsg());
     }
     if (!ew_CheckEmail($this->_email->FormValue)) {
         ew_AddMessage($gsFormError, $this->_email->FldErrMsg());
     }
     if (!ew_CheckEuroDate($this->fecha_inicio->FormValue)) {
         ew_AddMessage($gsFormError, $this->fecha_inicio->FldErrMsg());
     }
     if (!ew_CheckInteger($this->cetegoria->FormValue)) {
         ew_AddMessage($gsFormError, $this->cetegoria->FldErrMsg());
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsFormError, $sFormCustomError);
     }
     return $ValidateForm;
 }
Пример #7
0
 function ValidateForm()
 {
     global $gsFormError, $Notifications;
     // Initialize
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if ($Notifications->ZipCode->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Zip Code";
     }
     if (!ew_CheckZip($Notifications->ZipCode->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect ZIP code - Zip Code";
     }
     if ($Notifications->zEmail->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Email";
     }
     if (!ew_CheckEmail($Notifications->zEmail->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect email - Email";
     }
     if ($Notifications->Timestamp->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Timestamp";
     }
     if (!ew_CheckUSDate($Notifications->Timestamp->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect date, format = mm/dd/yyyy - Timestamp";
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= $sFormCustomError;
     }
     return $ValidateForm;
 }
Пример #8
0
 function ValidateForm()
 {
     global $Language, $gsFormError, $tbl_user;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!is_null($tbl_user->username->FormValue) && $tbl_user->username->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= $Language->Phrase("EnterRequiredField") . " - " . $tbl_user->username->FldCaption();
     }
     if (!ew_CheckEmail($tbl_user->username->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= $tbl_user->username->FldErrMsg();
     }
     if (!is_null($tbl_user->passwd->FormValue) && $tbl_user->passwd->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= $Language->Phrase("EnterRequiredField") . " - " . $tbl_user->passwd->FldCaption();
     }
     if (!is_null($tbl_user->id_userlevel->FormValue) && $tbl_user->id_userlevel->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= $Language->Phrase("EnterRequiredField") . " - " . $tbl_user->id_userlevel->FldCaption();
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= $sFormCustomError;
     }
     return $ValidateForm;
 }
Пример #9
0
 function ValidateForm()
 {
     global $gsFormError, $Customers;
     // Initialize
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!ew_CheckEmail($Customers->zEmail->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect email - Email";
     }
     if ($Customers->Password->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Password";
     }
     if ($Customers->FirstName->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - First Name";
     }
     if ($Customers->LastName->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Last Name";
     }
     if (!ew_CheckPhone($Customers->ContactPhone->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect phone number - Contact Phone";
     }
     if (!ew_CheckZip($Customers->DeliveryZip->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect ZIP code - Delivery Zip";
     }
     if (!ew_CheckZip($Customers->BillingZip->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect ZIP code - Billing Zip";
     }
     if (!ew_CheckPhone($Customers->BillingPhone->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect phone number - Billing Phone";
     }
     if (!ew_CheckInteger($Customers->BillingCardNumber->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect integer - Billing Card Number";
     }
     if (!ew_CheckInteger($Customers->CIMCustID->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect integer - Authorize.net Customer Profile ID";
     }
     if (!ew_CheckInteger($Customers->CIMPymtProfID->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect integer - Authorize.net Payment Profile ID";
     }
     if (!ew_CheckUSDate($Customers->First_Order_Date->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect date, format = mm/dd/yyyy - First Order Date";
     }
     if (!ew_CheckEuroDate($Customers->Last_Order_Date->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect date, format = dd/mm/yyyy - Last Order Date";
     }
     if ($Customers->Total_Orders->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Total Orders";
     }
     if (!ew_CheckInteger($Customers->Total_Orders->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect integer - Total Orders";
     }
     if ($Customers->WeeklyMeals->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Subscription Weekly Meals";
     }
     if (!ew_CheckRange($Customers->WeeklyMeals->FormValue, 0, 255)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Number must be between 0 and 255 - Subscription Weekly Meals";
     }
     if ($Customers->WeeklyReg->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Subscription Regular Meals";
     }
     if (!ew_CheckRange($Customers->WeeklyReg->FormValue, 0, 255)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Number must be between 0 and 255 - Subscription Regular Meals";
     }
     if ($Customers->WeeklyVeg->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Subscription vegetarian Meals";
     }
     if (!ew_CheckRange($Customers->WeeklyVeg->FormValue, 0, 255)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Number must be between 0 and 255 - Subscription vegetarian Meals";
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= $sFormCustomError;
     }
     return $ValidateForm;
 }
Пример #10
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->cuit_cuil->FldIsDetailKey && !is_null($this->cuit_cuil->FormValue) && $this->cuit_cuil->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->cuit_cuil->FldCaption(), $this->cuit_cuil->ReqErrMsg));
     }
     if (!$this->id_actividad->FldIsDetailKey && !is_null($this->id_actividad->FormValue) && $this->id_actividad->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->id_actividad->FldCaption(), $this->id_actividad->ReqErrMsg));
     }
     if (!$this->propietario->FldIsDetailKey && !is_null($this->propietario->FormValue) && $this->propietario->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->propietario->FldCaption(), $this->propietario->ReqErrMsg));
     }
     if (!$this->comercio->FldIsDetailKey && !is_null($this->comercio->FormValue) && $this->comercio->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->comercio->FldCaption(), $this->comercio->ReqErrMsg));
     }
     if (!$this->direccion_comercio->FldIsDetailKey && !is_null($this->direccion_comercio->FormValue) && $this->direccion_comercio->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->direccion_comercio->FldCaption(), $this->direccion_comercio->ReqErrMsg));
     }
     if (!ew_CheckEmail($this->mail->FormValue)) {
         ew_AddMessage($gsFormError, $this->mail->FldErrMsg());
     }
     if (!$this->cel->FldIsDetailKey && !is_null($this->cel->FormValue) && $this->cel->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->cel->FldCaption(), $this->cel->ReqErrMsg));
     }
     // Validate detail grid
     $DetailTblVar = explode(",", $this->getCurrentDetailTable());
     if (in_array("socios_detalles", $DetailTblVar) && $GLOBALS["socios_detalles"]->DetailAdd) {
         if (!isset($GLOBALS["socios_detalles_grid"])) {
             $GLOBALS["socios_detalles_grid"] = new csocios_detalles_grid();
         }
         // get detail page object
         $GLOBALS["socios_detalles_grid"]->ValidateGridForm();
     }
     if (in_array("socios_cuotas", $DetailTblVar) && $GLOBALS["socios_cuotas"]->DetailAdd) {
         if (!isset($GLOBALS["socios_cuotas_grid"])) {
             $GLOBALS["socios_cuotas_grid"] = new csocios_cuotas_grid();
         }
         // get detail page object
         $GLOBALS["socios_cuotas_grid"]->ValidateGridForm();
     }
     if (in_array("deudas", $DetailTblVar) && $GLOBALS["deudas"]->DetailAdd) {
         if (!isset($GLOBALS["deudas_grid"])) {
             $GLOBALS["deudas_grid"] = new cdeudas_grid();
         }
         // get detail page object
         $GLOBALS["deudas_grid"]->ValidateGridForm();
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsFormError, $sFormCustomError);
     }
     return $ValidateForm;
 }
Пример #11
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->usuario->FldIsDetailKey && !is_null($this->usuario->FormValue) && $this->usuario->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->usuario->FldCaption(), $this->usuario->ReqErrMsg));
     }
     if (!$this->nombre->FldIsDetailKey && !is_null($this->nombre->FormValue) && $this->nombre->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->nombre->FldCaption(), $this->nombre->ReqErrMsg));
     }
     if (!$this->_email->FldIsDetailKey && !is_null($this->_email->FormValue) && $this->_email->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->_email->FldCaption(), $this->_email->ReqErrMsg));
     }
     if (!ew_CheckEmail($this->_email->FormValue)) {
         ew_AddMessage($gsFormError, $this->_email->FldErrMsg());
     }
     if (!ew_CheckPhone($this->cel->FormValue)) {
         ew_AddMessage($gsFormError, $this->cel->FldErrMsg());
     }
     if ($this->activo->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->activo->FldCaption(), $this->activo->ReqErrMsg));
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsFormError, $sFormCustomError);
     }
     return $ValidateForm;
 }
Пример #12
0
 function ValidateForm()
 {
     global $gsFormError, $Contact;
     // Initialize
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if ($Contact->zEmail->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Email";
     }
     if (!ew_CheckEmail($Contact->zEmail->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect email - Email";
     }
     if ($Contact->Received->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Received";
     }
     if (!ew_CheckUSDate($Contact->Received->FormValue)) {
         if ($gsFormError != "") {
             $gsFormError .= "<br>";
         }
         $gsFormError .= "Incorrect date, format = mm/dd/yyyy - Received";
     }
     if ($Contact->Message->FormValue == "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= "Please enter required field - Message";
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         $gsFormError .= $gsFormError != "" ? "<br>" : "";
         $gsFormError .= $sFormCustomError;
     }
     return $ValidateForm;
 }
Пример #13
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!ew_CheckInteger($this->codigo->FormValue)) {
         ew_AddMessage($gsFormError, $this->codigo->FldErrMsg());
     }
     if (!$this->usuario->FldIsDetailKey && !is_null($this->usuario->FormValue) && $this->usuario->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterUserName"));
     }
     if (!$this->contrasenia->FldIsDetailKey && !is_null($this->contrasenia->FormValue) && $this->contrasenia->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterPassword"));
     }
     if ($this->contrasenia->ConfirmValue != $this->contrasenia->FormValue) {
         ew_AddMessage($gsFormError, $Language->Phrase("MismatchPassword"));
     }
     if (!$this->_email->FldIsDetailKey && !is_null($this->_email->FormValue) && $this->_email->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->_email->FldCaption(), $this->_email->ReqErrMsg));
     }
     if (!ew_CheckEmail($this->_email->FormValue)) {
         ew_AddMessage($gsFormError, $this->_email->FldErrMsg());
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsFormError, $sFormCustomError);
     }
     return $ValidateForm;
 }
Пример #14
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     $lUpdateCnt = 0;
     if ($this->codigo->MultiUpdate == "1") {
         $lUpdateCnt++;
     }
     if ($this->usuario->MultiUpdate == "1") {
         $lUpdateCnt++;
     }
     if ($this->contrasenia->MultiUpdate == "1") {
         $lUpdateCnt++;
     }
     if ($this->nombre->MultiUpdate == "1") {
         $lUpdateCnt++;
     }
     if ($this->_email->MultiUpdate == "1") {
         $lUpdateCnt++;
     }
     if ($this->activo->MultiUpdate == "1") {
         $lUpdateCnt++;
     }
     if ($lUpdateCnt == 0) {
         $gsFormError = $Language->Phrase("NoFieldSelected");
         return FALSE;
     }
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if ($this->codigo->MultiUpdate != "") {
         if (!ew_CheckInteger($this->codigo->FormValue)) {
             ew_AddMessage($gsFormError, $this->codigo->FldErrMsg());
         }
     }
     if ($this->usuario->MultiUpdate != "" && !$this->usuario->FldIsDetailKey && !is_null($this->usuario->FormValue) && $this->usuario->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->usuario->FldCaption(), $this->usuario->ReqErrMsg));
     }
     if ($this->contrasenia->MultiUpdate != "" && !$this->contrasenia->FldIsDetailKey && !is_null($this->contrasenia->FormValue) && $this->contrasenia->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->contrasenia->FldCaption(), $this->contrasenia->ReqErrMsg));
     }
     if ($this->_email->MultiUpdate != "" && !$this->_email->FldIsDetailKey && !is_null($this->_email->FormValue) && $this->_email->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->_email->FldCaption(), $this->_email->ReqErrMsg));
     }
     if ($this->_email->MultiUpdate != "") {
         if (!ew_CheckEmail($this->_email->FormValue)) {
             ew_AddMessage($gsFormError, $this->_email->FldErrMsg());
         }
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsFormError, $sFormCustomError);
     }
     return $ValidateForm;
 }
Пример #15
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!ew_CheckInteger($this->socio_nro->FormValue)) {
         ew_AddMessage($gsFormError, $this->socio_nro->FldErrMsg());
     }
     if (!$this->cuit_cuil->FldIsDetailKey && !is_null($this->cuit_cuil->FormValue) && $this->cuit_cuil->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->cuit_cuil->FldCaption(), $this->cuit_cuil->ReqErrMsg));
     }
     if (!$this->propietario->FldIsDetailKey && !is_null($this->propietario->FormValue) && $this->propietario->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->propietario->FldCaption(), $this->propietario->ReqErrMsg));
     }
     if (!$this->comercio->FldIsDetailKey && !is_null($this->comercio->FormValue) && $this->comercio->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->comercio->FldCaption(), $this->comercio->ReqErrMsg));
     }
     if (!$this->direccion_comercio->FldIsDetailKey && !is_null($this->direccion_comercio->FormValue) && $this->direccion_comercio->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->direccion_comercio->FldCaption(), $this->direccion_comercio->ReqErrMsg));
     }
     if (!ew_CheckEmail($this->mail->FormValue)) {
         ew_AddMessage($gsFormError, $this->mail->FldErrMsg());
     }
     if (!$this->cel->FldIsDetailKey && !is_null($this->cel->FormValue) && $this->cel->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->cel->FldCaption(), $this->cel->ReqErrMsg));
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsFormError, $sFormCustomError);
     }
     return $ValidateForm;
 }