Exemplo n.º 1
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_ini->FormValue)) {
         ew_AddMessage($gsFormError, $this->fecha_ini->FldErrMsg());
     }
     if (!$this->id_cliente->FldIsDetailKey && !is_null($this->id_cliente->FormValue) && $this->id_cliente->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->id_cliente->FldCaption(), $this->id_cliente->ReqErrMsg));
     }
     if (!$this->id_localidad_origen->FldIsDetailKey && !is_null($this->id_localidad_origen->FormValue) && $this->id_localidad_origen->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->id_localidad_origen->FldCaption(), $this->id_localidad_origen->ReqErrMsg));
     }
     if (!$this->Origen->FldIsDetailKey && !is_null($this->Origen->FormValue) && $this->Origen->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->Origen->FldCaption(), $this->Origen->ReqErrMsg));
     }
     if (!$this->id_localidad_destino->FldIsDetailKey && !is_null($this->id_localidad_destino->FormValue) && $this->id_localidad_destino->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->id_localidad_destino->FldCaption(), $this->id_localidad_destino->ReqErrMsg));
     }
     if (!$this->Destino->FldIsDetailKey && !is_null($this->Destino->FormValue) && $this->Destino->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->Destino->FldCaption(), $this->Destino->ReqErrMsg));
     }
     if (!ew_CheckInteger($this->Km_ini->FormValue)) {
         ew_AddMessage($gsFormError, $this->Km_ini->FldErrMsg());
     }
     if (!$this->id_vehiculo->FldIsDetailKey && !is_null($this->id_vehiculo->FormValue) && $this->id_vehiculo->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->id_vehiculo->FldCaption(), $this->id_vehiculo->ReqErrMsg));
     }
     if (!$this->id_tipo_carga->FldIsDetailKey && !is_null($this->id_tipo_carga->FormValue) && $this->id_tipo_carga->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->id_tipo_carga->FldCaption(), $this->id_tipo_carga->ReqErrMsg));
     }
     if (!ew_CheckInteger($this->km_fin->FormValue)) {
         ew_AddMessage($gsFormError, $this->km_fin->FldErrMsg());
     }
     if (!ew_CheckEuroDate($this->fecha_fin->FormValue)) {
         ew_AddMessage($gsFormError, $this->fecha_fin->FldErrMsg());
     }
     if (!ew_CheckNumber($this->adelanto->FormValue)) {
         ew_AddMessage($gsFormError, $this->adelanto->FldErrMsg());
     }
     if (!ew_CheckInteger($this->kg_carga->FormValue)) {
         ew_AddMessage($gsFormError, $this->kg_carga->FldErrMsg());
     }
     if (!$this->tarifa->FldIsDetailKey && !is_null($this->tarifa->FormValue) && $this->tarifa->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->tarifa->FldCaption(), $this->tarifa->ReqErrMsg));
     }
     if (!ew_CheckNumber($this->tarifa->FormValue)) {
         ew_AddMessage($gsFormError, $this->tarifa->FldErrMsg());
     }
     if (!$this->porcentaje->FldIsDetailKey && !is_null($this->porcentaje->FormValue) && $this->porcentaje->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->porcentaje->FldCaption(), $this->porcentaje->ReqErrMsg));
     }
     if (!ew_CheckNumber($this->porcentaje->FormValue)) {
         ew_AddMessage($gsFormError, $this->porcentaje->FldErrMsg());
     }
     // Validate detail grid
     $DetailTblVar = explode(",", $this->getCurrentDetailTable());
     if (in_array("gastos", $DetailTblVar) && $GLOBALS["gastos"]->DetailEdit) {
         if (!isset($GLOBALS["gastos_grid"])) {
             $GLOBALS["gastos_grid"] = new cgastos_grid();
         }
         // get detail page object
         $GLOBALS["gastos_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;
 }
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->idservicio_medico->FldIsDetailKey && !is_null($this->idservicio_medico->FormValue) && $this->idservicio_medico->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->idservicio_medico->FldCaption(), $this->idservicio_medico->ReqErrMsg));
     }
     if (!$this->costo->FldIsDetailKey && !is_null($this->costo->FormValue) && $this->costo->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->costo->FldCaption(), $this->costo->ReqErrMsg));
     }
     if (!ew_CheckNumber($this->costo->FormValue)) {
         ew_AddMessage($gsFormError, $this->costo->FldErrMsg());
     }
     // Validate detail grid
     $DetailTblVar = explode(",", $this->getCurrentDetailTable());
     if (in_array("doctor_servicio_medico_prestado", $DetailTblVar) && $GLOBALS["doctor_servicio_medico_prestado"]->DetailAdd) {
         if (!isset($GLOBALS["doctor_servicio_medico_prestado_grid"])) {
             $GLOBALS["doctor_servicio_medico_prestado_grid"] = new cdoctor_servicio_medico_prestado_grid();
         }
         // get detail page object
         $GLOBALS["doctor_servicio_medico_prestado_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;
 }
Exemplo n.º 3
0
 function setWarningMessage($v)
 {
     ew_AddMessage($_SESSION[EW_SESSION_WARNING_MESSAGE], $v);
 }
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!ew_CheckInteger($this->active->FormValue)) {
         ew_AddMessage($gsFormError, $this->active->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;
 }
Exemplo n.º 5
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     $lUpdateCnt = 0;
     if ($this->M_url->MultiUpdate == "1") {
         $lUpdateCnt++;
     }
     if ($lUpdateCnt == 0) {
         $gsFormError = $Language->Phrase("NoFieldSelected");
         return FALSE;
     }
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if ($this->M_url->MultiUpdate != "" && $this->M_url->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->M_url->FldCaption(), $this->M_url->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;
 }
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->id_tramite->FldIsDetailKey && !is_null($this->id_tramite->FormValue) && $this->id_tramite->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->id_tramite->FldCaption(), $this->id_tramite->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;
 }
Exemplo n.º 7
0
 function ValidateForm($opwd, $npwd, $cpwd)
 {
     global $Language, $gsFormError;
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return TRUE;
     }
     // Initialize form error message
     $gsFormError = "";
     if ($opwd == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterOldPassword"));
     }
     if ($npwd == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterNewPassword"));
     }
     if ($npwd != $cpwd) {
         ew_AddMessage($gsFormError, $Language->Phrase("MismatchPassword"));
     }
     // Return validate result
     $valid = $gsFormError == "";
     // Call Form CustomValidate event
     $sFormCustomError = "";
     $valid = $valid && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsFormError, $sFormCustomError);
     }
     return $valid;
 }
Exemplo n.º 8
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if ($this->PATH->Upload->FileName == "" && !$this->PATH->Upload->KeepFile) {
         ew_AddMessage($gsFormError, str_replace("%s", $this->PATH->FldCaption(), $this->PATH->ReqErrMsg));
     }
     if (!$this->PROCESS->FldIsDetailKey && !is_null($this->PROCESS->FormValue) && $this->PROCESS->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->PROCESS->FldCaption(), $this->PROCESS->ReqErrMsg));
     }
     if (!ew_CheckInteger($this->PROCESS->FormValue)) {
         ew_AddMessage($gsFormError, $this->PROCESS->FldErrMsg());
     }
     if (!$this->BANK_ACCOUNT_ID->FldIsDetailKey && !is_null($this->BANK_ACCOUNT_ID->FormValue) && $this->BANK_ACCOUNT_ID->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->BANK_ACCOUNT_ID->FldCaption(), $this->BANK_ACCOUNT_ID->ReqErrMsg));
     }
     if (!ew_CheckInteger($this->BANK_ACCOUNT_ID->FormValue)) {
         ew_AddMessage($gsFormError, $this->BANK_ACCOUNT_ID->FldErrMsg());
     }
     if (!$this->UPLOAD_FILE_STATUS_ID->FldIsDetailKey && !is_null($this->UPLOAD_FILE_STATUS_ID->FormValue) && $this->UPLOAD_FILE_STATUS_ID->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->UPLOAD_FILE_STATUS_ID->FldCaption(), $this->UPLOAD_FILE_STATUS_ID->ReqErrMsg));
     }
     if (!ew_CheckInteger($this->UPLOAD_FILE_STATUS_ID->FormValue)) {
         ew_AddMessage($gsFormError, $this->UPLOAD_FILE_STATUS_ID->FldErrMsg());
     }
     if (!$this->DATETIME->FldIsDetailKey && !is_null($this->DATETIME->FormValue) && $this->DATETIME->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->DATETIME->FldCaption(), $this->DATETIME->ReqErrMsg));
     }
     if (!ew_CheckEuroDate($this->DATETIME->FormValue)) {
         ew_AddMessage($gsFormError, $this->DATETIME->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;
 }
 function ValidateForm()
 {
     global $Language, $gsFormError, $t_promotions_admin;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!is_null($t_promotions_admin->titre->FormValue) && $t_promotions_admin->titre->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $t_promotions_admin->titre->FldCaption());
     }
     if (!ew_CheckInteger($t_promotions_admin->id_cat_vin->FormValue)) {
         ew_AddMessage($gsFormError, $t_promotions_admin->id_cat_vin->FldErrMsg());
     }
     if (!ew_CheckInteger($t_promotions_admin->id_region_du_monde->FormValue)) {
         ew_AddMessage($gsFormError, $t_promotions_admin->id_region_du_monde->FldErrMsg());
     }
     if (!ew_CheckInteger($t_promotions_admin->id_pays->FormValue)) {
         ew_AddMessage($gsFormError, $t_promotions_admin->id_pays->FldErrMsg());
     }
     if (!ew_CheckInteger($t_promotions_admin->id_region->FormValue)) {
         ew_AddMessage($gsFormError, $t_promotions_admin->id_region->FldErrMsg());
     }
     if (!ew_CheckInteger($t_promotions_admin->id_sous_region->FormValue)) {
         ew_AddMessage($gsFormError, $t_promotions_admin->id_sous_region->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;
 }
Exemplo n.º 10
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->Code->FldIsDetailKey && !is_null($this->Code->FormValue) && $this->Code->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->Code->FldCaption());
     }
     if (!$this->Name->FldIsDetailKey && !is_null($this->Name->FormValue) && $this->Name->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->Name->FldCaption());
     }
     if (!$this->FullName->FldIsDetailKey && !is_null($this->FullName->FormValue) && $this->FullName->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->FullName->FldCaption());
     }
     if (!$this->ISO3->FldIsDetailKey && !is_null($this->ISO3->FormValue) && $this->ISO3->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->ISO3->FldCaption());
     }
     if (!$this->Number->FldIsDetailKey && !is_null($this->Number->FormValue) && $this->Number->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->Number->FldCaption());
     }
     if (!ew_CheckInteger($this->Number->FormValue)) {
         ew_AddMessage($gsFormError, $this->Number->FldErrMsg());
     }
     if (!$this->ContinentCode->FldIsDetailKey && !is_null($this->ContinentCode->FormValue) && $this->ContinentCode->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->ContinentCode->FldCaption());
     }
     if (!$this->DisplayOrder->FldIsDetailKey && !is_null($this->DisplayOrder->FormValue) && $this->DisplayOrder->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->DisplayOrder->FldCaption());
     }
     if (!ew_CheckInteger($this->DisplayOrder->FormValue)) {
         ew_AddMessage($gsFormError, $this->DisplayOrder->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;
 }
Exemplo n.º 11
0
function ew_ErrorFn($DbType, $ErrorType, $ErrorNo, $ErrorMsg, $Param1, $Param2, $Object)
{
    if ($ErrorType == 'CONNECT') {
        $msg = "Failed to connect to {$Param2} at {$Param1}. Error: " . $ErrorMsg;
    } elseif ($ErrorType == 'EXECUTE') {
        if (EW_DEBUG_ENABLED) {
            $msg = "Failed to execute SQL: {$Param1}. Error: " . $ErrorMsg;
        } else {
            $msg = "Failed to execute SQL. Error: " . $ErrorMsg;
        }
    }
    ew_AddMessage($_SESSION[EW_SESSION_FAILURE_MESSAGE], $msg);
}
Exemplo n.º 12
0
 function ValidateForm($usr, $pwd)
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return TRUE;
     }
     if (trim($usr) == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterUid"));
     }
     if (trim($pwd) == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterPwd"));
     }
     // 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;
 }
Exemplo n.º 13
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!ew_CheckRange($this->mes->FormValue, 1, 12)) {
         ew_AddMessage($gsFormError, $this->mes->FldErrMsg());
     }
     if (!ew_CheckRange($this->anio->FormValue, 2012, 2100)) {
         ew_AddMessage($gsFormError, $this->anio->FldErrMsg());
     }
     if (!ew_CheckEuroDate($this->fecha->FormValue)) {
         ew_AddMessage($gsFormError, $this->fecha->FldErrMsg());
     }
     if (!ew_CheckNumber($this->monto->FormValue)) {
         ew_AddMessage($gsFormError, $this->monto->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;
 }
Exemplo n.º 14
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->category_id->FldIsDetailKey && !is_null($this->category_id->FormValue) && $this->category_id->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->category_id->FldCaption(), $this->category_id->ReqErrMsg));
     }
     if (!$this->scat_name->FldIsDetailKey && !is_null($this->scat_name->FormValue) && $this->scat_name->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->scat_name->FldCaption(), $this->scat_name->ReqErrMsg));
     }
     if (!$this->scat_description->FldIsDetailKey && !is_null($this->scat_description->FormValue) && $this->scat_description->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->scat_description->FldCaption(), $this->scat_description->ReqErrMsg));
     }
     if ($this->scat_picture->Upload->FileName == "" && !$this->scat_picture->Upload->KeepFile) {
         ew_AddMessage($gsFormError, str_replace("%s", $this->scat_picture->FldCaption(), $this->scat_picture->ReqErrMsg));
     }
     // Validate detail grid
     $DetailTblVar = explode(",", $this->getCurrentDetailTable());
     if (in_array("products", $DetailTblVar) && $GLOBALS["products"]->DetailAdd) {
         if (!isset($GLOBALS["products_grid"])) {
             $GLOBALS["products_grid"] = new cproducts_grid();
         }
         // get detail page object
         $GLOBALS["products_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;
 }
Exemplo n.º 15
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->CODE->FldIsDetailKey && !is_null($this->CODE->FormValue) && $this->CODE->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->CODE->FldCaption(), $this->CODE->ReqErrMsg));
     }
     if (!$this->AIRPLANE_ID->FldIsDetailKey && !is_null($this->AIRPLANE_ID->FormValue) && $this->AIRPLANE_ID->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->AIRPLANE_ID->FldCaption(), $this->AIRPLANE_ID->ReqErrMsg));
     }
     if (!ew_CheckInteger($this->AIRPLANE_ID->FormValue)) {
         ew_AddMessage($gsFormError, $this->AIRPLANE_ID->FldErrMsg());
     }
     if (!$this->AIR_PORT_ID_DEPARTURE->FldIsDetailKey && !is_null($this->AIR_PORT_ID_DEPARTURE->FormValue) && $this->AIR_PORT_ID_DEPARTURE->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->AIR_PORT_ID_DEPARTURE->FldCaption(), $this->AIR_PORT_ID_DEPARTURE->ReqErrMsg));
     }
     if (!ew_CheckInteger($this->AIR_PORT_ID_DEPARTURE->FormValue)) {
         ew_AddMessage($gsFormError, $this->AIR_PORT_ID_DEPARTURE->FldErrMsg());
     }
     if (!$this->AIR_PORT_ID_ARRIVAL->FldIsDetailKey && !is_null($this->AIR_PORT_ID_ARRIVAL->FormValue) && $this->AIR_PORT_ID_ARRIVAL->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->AIR_PORT_ID_ARRIVAL->FldCaption(), $this->AIR_PORT_ID_ARRIVAL->ReqErrMsg));
     }
     if (!ew_CheckInteger($this->AIR_PORT_ID_ARRIVAL->FormValue)) {
         ew_AddMessage($gsFormError, $this->AIR_PORT_ID_ARRIVAL->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;
 }
Exemplo n.º 16
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->doc_type->FormValue)) {
         ew_AddMessage($gsFormError, $this->doc_type->FldErrMsg());
     }
     if (!is_null($this->subject_general_faculty_id->FormValue) && $this->subject_general_faculty_id->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->subject_general_faculty_id->FldCaption());
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsFormError, $sFormCustomError);
     }
     return $ValidateForm;
 }
Exemplo n.º 17
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!ew_CheckNumber($this->importe->FormValue)) {
         ew_AddMessage($gsFormError, $this->importe->FldErrMsg());
     }
     if (!ew_CheckEuroDate($this->fecha_creacion->FormValue)) {
         ew_AddMessage($gsFormError, $this->fecha_creacion->FldErrMsg());
     }
     // Validate detail grid
     $DetailTblVar = explode(",", $this->getCurrentDetailTable());
     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();
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsFormError, $sFormCustomError);
     }
     return $ValidateForm;
 }
Exemplo n.º 18
0
 function ValidateSearch()
 {
     global $gsSearchError;
     // Initialize
     $gsSearchError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return TRUE;
     }
     if (!ew_CheckInteger($this->id->AdvancedSearch->SearchValue)) {
         ew_AddMessage($gsSearchError, $this->id->FldErrMsg());
     }
     if (!ew_CheckNumber($this->importe->AdvancedSearch->SearchValue)) {
         ew_AddMessage($gsSearchError, $this->importe->FldErrMsg());
     }
     if (!ew_CheckEuroDate($this->fecha_creacion->AdvancedSearch->SearchValue)) {
         ew_AddMessage($gsSearchError, $this->fecha_creacion->FldErrMsg());
     }
     // Return validate result
     $ValidateSearch = $gsSearchError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateSearch = $ValidateSearch && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsSearchError, $sFormCustomError);
     }
     return $ValidateSearch;
 }
Exemplo n.º 19
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->name->FldIsDetailKey && !is_null($this->name->FormValue) && $this->name->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->name->FldCaption(), $this->name->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 (!$this->birthday->FldIsDetailKey && !is_null($this->birthday->FormValue) && $this->birthday->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->birthday->FldCaption(), $this->birthday->ReqErrMsg));
     }
     if (!ew_CheckEuroDate($this->birthday->FormValue)) {
         ew_AddMessage($gsFormError, $this->birthday->FldErrMsg());
     }
     if ($this->profession->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->profession->FldCaption(), $this->profession->ReqErrMsg));
     }
     if ($this->game_type->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->game_type->FldCaption(), $this->game_type->ReqErrMsg));
     }
     if (!$this->has_expansion->FldIsDetailKey && !is_null($this->has_expansion->FormValue) && $this->has_expansion->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->has_expansion->FldCaption(), $this->has_expansion->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;
 }
Exemplo n.º 20
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->NAME_IN_CARD->FldIsDetailKey && !is_null($this->NAME_IN_CARD->FormValue) && $this->NAME_IN_CARD->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->NAME_IN_CARD->FldCaption(), $this->NAME_IN_CARD->ReqErrMsg));
     }
     if (!$this->NUMBER->FldIsDetailKey && !is_null($this->NUMBER->FormValue) && $this->NUMBER->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->NUMBER->FldCaption(), $this->NUMBER->ReqErrMsg));
     }
     if (!ew_CheckCreditCard($this->NUMBER->FormValue)) {
         ew_AddMessage($gsFormError, $this->NUMBER->FldErrMsg());
     }
     if (!$this->CARD_TYPE_ID->FldIsDetailKey && !is_null($this->CARD_TYPE_ID->FormValue) && $this->CARD_TYPE_ID->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->CARD_TYPE_ID->FldCaption(), $this->CARD_TYPE_ID->ReqErrMsg));
     }
     if (!$this->BANK_ID->FldIsDetailKey && !is_null($this->BANK_ID->FormValue) && $this->BANK_ID->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->BANK_ID->FldCaption(), $this->BANK_ID->ReqErrMsg));
     }
     if (!$this->VALID_THRU_MONTH->FldIsDetailKey && !is_null($this->VALID_THRU_MONTH->FormValue) && $this->VALID_THRU_MONTH->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->VALID_THRU_MONTH->FldCaption(), $this->VALID_THRU_MONTH->ReqErrMsg));
     }
     if (!ew_CheckRange($this->VALID_THRU_MONTH->FormValue, 1, 12)) {
         ew_AddMessage($gsFormError, $this->VALID_THRU_MONTH->FldErrMsg());
     }
     if (!$this->VALID_THRU_YEAR->FldIsDetailKey && !is_null($this->VALID_THRU_YEAR->FormValue) && $this->VALID_THRU_YEAR->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->VALID_THRU_YEAR->FldCaption(), $this->VALID_THRU_YEAR->ReqErrMsg));
     }
     if (!ew_CheckRange($this->VALID_THRU_YEAR->FormValue, 15, 50)) {
         ew_AddMessage($gsFormError, $this->VALID_THRU_YEAR->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;
 }
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!is_null($this->accountId->FormValue) && $this->accountId->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->accountId->FldCaption());
     }
     if (!is_null($this->permissionId->FormValue) && $this->permissionId->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->permissionId->FldCaption());
     }
     if (!is_null($this->granted->FormValue) && $this->granted->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->granted->FldCaption());
     }
     if (!is_null($this->realmId->FormValue) && $this->realmId->FormValue == "") {
         ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->realmId->FldCaption());
     }
     // Return validate result
     $ValidateForm = $gsFormError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsFormError, $sFormCustomError);
     }
     return $ValidateForm;
 }
Exemplo n.º 22
0
 function ew_ErrorFn($DbType, $ErrorType, $ErrorNo, $ErrorMsg, $Param1, $Param2, $Object)
 {
     if ($ErrorType == 'CONNECT') {
         if ($DbType == "ado_access" || $DbType == "ado_mssql") {
             $msg = "Failed to connect to database. Error: " . $ErrorMsg;
         } else {
             $msg = "Failed to connect to {$Param2} at {$Param1}. Error: " . $ErrorMsg;
         }
     } elseif ($ErrorType == 'EXECUTE') {
         if (defined("EW_DEBUG_ENABLED") && EW_DEBUG_ENABLED) {
             $msg = "Failed to execute SQL: {$Param1}. Error: " . $ErrorMsg;
         } else {
             $msg = "Failed to execute SQL. Error: " . $ErrorMsg;
         }
     }
     if (function_exists("ew_AddMessage") && defined("EW_SESSION_FAILURE_MESSAGE")) {
         ew_AddMessage($_SESSION[EW_SESSION_FAILURE_MESSAGE], $msg);
     } else {
         echo "<div class=\"alert alert-danger ewError\">" . $msg . "</div>";
     }
 }
Exemplo n.º 23
0
 function setSuccessMessage($v)
 {
     ew_AddMessage($_SESSION[EW_SESSION_SUCCESS_MESSAGE], $v);
 }
Exemplo n.º 24
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!ew_CheckEuroDate($this->fecha->FormValue)) {
         ew_AddMessage($gsFormError, $this->fecha->FldErrMsg());
     }
     if (!ew_CheckNumber($this->iva->FormValue)) {
         ew_AddMessage($gsFormError, $this->iva->FldErrMsg());
     }
     if (!ew_CheckNumber($this->Importe->FormValue)) {
         ew_AddMessage($gsFormError, $this->Importe->FldErrMsg());
     }
     if (!ew_CheckInteger($this->id_hoja_mantenimiento->FormValue)) {
         ew_AddMessage($gsFormError, $this->id_hoja_mantenimiento->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;
 }
Exemplo n.º 25
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->DESCRIPTION->FldIsDetailKey && !is_null($this->DESCRIPTION->FormValue) && $this->DESCRIPTION->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->DESCRIPTION->FldCaption(), $this->DESCRIPTION->ReqErrMsg));
     }
     if (!$this->ACCOUNT_NUMBER->FldIsDetailKey && !is_null($this->ACCOUNT_NUMBER->FormValue) && $this->ACCOUNT_NUMBER->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->ACCOUNT_NUMBER->FldCaption(), $this->ACCOUNT_NUMBER->ReqErrMsg));
     }
     if (!ew_CheckNumber($this->ACCOUNT_NUMBER->FormValue)) {
         ew_AddMessage($gsFormError, $this->ACCOUNT_NUMBER->FldErrMsg());
     }
     if (!$this->BANK_ID->FldIsDetailKey && !is_null($this->BANK_ID->FormValue) && $this->BANK_ID->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->BANK_ID->FldCaption(), $this->BANK_ID->ReqErrMsg));
     }
     if (!$this->ACTIVE->FldIsDetailKey && !is_null($this->ACTIVE->FormValue) && $this->ACTIVE->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->ACTIVE->FldCaption(), $this->ACTIVE->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;
 }
 function ValidateSearch()
 {
     global $gsSearchError;
     // Initialize
     $gsSearchError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return TRUE;
     }
     // Return validate result
     $ValidateSearch = $gsSearchError == "";
     // Call Form_CustomValidate event
     $sFormCustomError = "";
     $ValidateSearch = $ValidateSearch && $this->Form_CustomValidate($sFormCustomError);
     if ($sFormCustomError != "") {
         ew_AddMessage($gsSearchError, $sFormCustomError);
     }
     return $ValidateSearch;
 }
Exemplo n.º 27
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;
 }
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->idpaciente->FldIsDetailKey && !is_null($this->idpaciente->FormValue) && $this->idpaciente->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->idpaciente->FldCaption(), $this->idpaciente->ReqErrMsg));
     }
     if (!ew_CheckEuroDate($this->fecha_inicio->FormValue)) {
         ew_AddMessage($gsFormError, $this->fecha_inicio->FldErrMsg());
     }
     if (!ew_CheckEuroDate($this->fecha_final->FormValue)) {
         ew_AddMessage($gsFormError, $this->fecha_final->FldErrMsg());
     }
     if ($this->estado->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->estado->FldCaption(), $this->estado->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;
 }
Exemplo n.º 29
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;
 }
Exemplo n.º 30
0
 function ValidateForm()
 {
     global $Language, $gsFormError;
     // Initialize form error message
     $gsFormError = "";
     // Check if validation required
     if (!EW_SERVER_VALIDATE) {
         return $gsFormError == "";
     }
     if (!$this->PASSANGER_ID->FldIsDetailKey && !is_null($this->PASSANGER_ID->FormValue) && $this->PASSANGER_ID->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->PASSANGER_ID->FldCaption(), $this->PASSANGER_ID->ReqErrMsg));
     }
     if (!ew_CheckInteger($this->PASSANGER_ID->FormValue)) {
         ew_AddMessage($gsFormError, $this->PASSANGER_ID->FldErrMsg());
     }
     if (!$this->FLIGHT_ID->FldIsDetailKey && !is_null($this->FLIGHT_ID->FormValue) && $this->FLIGHT_ID->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->FLIGHT_ID->FldCaption(), $this->FLIGHT_ID->ReqErrMsg));
     }
     if (!ew_CheckInteger($this->FLIGHT_ID->FormValue)) {
         ew_AddMessage($gsFormError, $this->FLIGHT_ID->FldErrMsg());
     }
     if (!$this->GATE->FldIsDetailKey && !is_null($this->GATE->FormValue) && $this->GATE->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->GATE->FldCaption(), $this->GATE->ReqErrMsg));
     }
     if (!ew_CheckNumber($this->GATE->FormValue)) {
         ew_AddMessage($gsFormError, $this->GATE->FldErrMsg());
     }
     if (!$this->SEAT->FldIsDetailKey && !is_null($this->SEAT->FormValue) && $this->SEAT->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->SEAT->FldCaption(), $this->SEAT->ReqErrMsg));
     }
     if (!$this->DATETIME->FldIsDetailKey && !is_null($this->DATETIME->FormValue) && $this->DATETIME->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->DATETIME->FldCaption(), $this->DATETIME->ReqErrMsg));
     }
     if (!ew_CheckEuroDate($this->DATETIME->FormValue)) {
         ew_AddMessage($gsFormError, $this->DATETIME->FldErrMsg());
     }
     if (!$this->RESERVATION_ID->FldIsDetailKey && !is_null($this->RESERVATION_ID->FormValue) && $this->RESERVATION_ID->FormValue == "") {
         ew_AddMessage($gsFormError, str_replace("%s", $this->RESERVATION_ID->FldCaption(), $this->RESERVATION_ID->ReqErrMsg));
     }
     if (!ew_CheckInteger($this->RESERVATION_ID->FormValue)) {
         ew_AddMessage($gsFormError, $this->RESERVATION_ID->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;
 }