TableVar = 'taccomodations'; $this->TableName = 'taccomodations'; $this->TableType = 'TABLE'; // Update Table $this->UpdateTable = "`taccomodations`"; $this->DBID = 'DB'; $this->ExportAll = TRUE; $this->ExportPageBreakCount = 0; // Page break per every n record (PDF only) $this->ExportPageOrientation = "portrait"; // Page orientation (PDF only) $this->ExportPageSize = "a4"; // Page size (PDF only) $this->ExportExcelPageOrientation = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT; // Page orientation (PHPExcel only) $this->ExportExcelPageSize = PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4; // Page size (PHPExcel only) $this->DetailAdd = FALSE; // Allow detail add $this->DetailEdit = FALSE; // Allow detail edit $this->DetailView = FALSE; // Allow detail view $this->ShowMultipleDetails = FALSE; // Show multiple details $this->GridAddRowCount = 5; $this->AllowAddDeleteRow = ew_AllowAddDeleteRow(); // Allow add/delete row $this->UserIDAllowSecurity = 0; // User ID Allow $this->BasicSearch = new cBasicSearch($this->TableVar); // idAccomodation $this->idAccomodation = new cField('taccomodations', 'taccomodations', 'x_idAccomodation', 'idAccomodation', '`idAccomodation`', '`idAccomodation`', 19, -1, FALSE, '`idAccomodation`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'NO'); $this->idAccomodation->Sortable = TRUE; // Allow sort $this->idAccomodation->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger"); $this->fields['idAccomodation'] = &$this->idAccomodation; // idOfferer $this->idOfferer = new cField('taccomodations', 'taccomodations', 'x_idOfferer', 'idOfferer', '`idOfferer`', '`idOfferer`', 19, -1, FALSE, '`idOfferer`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->idOfferer->Sortable = TRUE; // Allow sort $this->idOfferer->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger"); $this->fields['idOfferer'] = &$this->idOfferer; // Accom_Type $this->Accom_Type = new cField('taccomodations', 'taccomodations', 'x_Accom_Type', 'Accom_Type', '`Accom_Type`', '`Accom_Type`', 200, -1, FALSE, '`Accom_Type`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'SELECT'); $this->Accom_Type->Sortable = TRUE; // Allow sort $this->Accom_Type->UsePleaseSelect = TRUE; // Use PleaseSelect by default $this->Accom_Type->PleaseSelectText = $Language->Phrase("PleaseSelect"); // PleaseSelect text $this->fields['Accom_Type'] = &$this->Accom_Type; // Address $this->Address = new cField('taccomodations', 'taccomodations', 'x_Address', 'Address', '`Address`', '`Address`', 200, -1, FALSE, '`Address`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->Address->Sortable = TRUE; // Allow sort $this->fields['Address'] = &$this->Address; // Town $this->Town = new cField('taccomodations', 'taccomodations', 'x_Town', 'Town', '`Town`', '`Town`', 200, -1, FALSE, '`Town`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->Town->Sortable = TRUE; // Allow sort $this->fields['Town'] = &$this->Town; // District $this->District = new cField('taccomodations', 'taccomodations', 'x_District', 'District', '`District`', '`District`', 200, -1, FALSE, '`District`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->District->Sortable = TRUE; // Allow sort $this->fields['District'] = &$this->District; // Region $this->Region = new cField('taccomodations', 'taccomodations', 'x_Region', 'Region', '`Region`', '`Region`', 200, -1, FALSE, '`Region`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->Region->Sortable = TRUE; // Allow sort $this->fields['Region'] = &$this->Region; // Beds $this->Beds = new cField('taccomodations', 'taccomodations', 'x_Beds', 'Beds', '`Beds`', '`Beds`', 19, -1, FALSE, '`Beds`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->Beds->Sortable = TRUE; // Allow sort $this->Beds->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger"); $this->fields['Beds'] = &$this->Beds; // Rooms $this->Rooms = new cField('taccomodations', 'taccomodations', 'x_Rooms', 'Rooms', '`Rooms`', '`Rooms`', 19, -1, FALSE, '`Rooms`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->Rooms->Sortable = TRUE; // Allow sort $this->Rooms->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger"); $this->fields['Rooms'] = &$this->Rooms; // Bathrooms $this->Bathrooms = new cField('taccomodations', 'taccomodations', 'x_Bathrooms', 'Bathrooms', '`Bathrooms`', '`Bathrooms`', 19, -1, FALSE, '`Bathrooms`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->Bathrooms->Sortable = TRUE; // Allow sort $this->Bathrooms->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger"); $this->fields['Bathrooms'] = &$this->Bathrooms; // Private_Kitchen $this->Private_Kitchen = new cField('taccomodations', 'taccomodations', 'x_Private_Kitchen', 'Private_Kitchen', '`Private_Kitchen`', '`Private_Kitchen`', 202, -1, FALSE, '`Private_Kitchen`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->Private_Kitchen->Sortable = TRUE; // Allow sort $this->Private_Kitchen->FldDataType = EW_DATATYPE_BOOLEAN; $this->Private_Kitchen->TrueValue = 'Y'; $this->Private_Kitchen->FalseValue = 'N'; $this->Private_Kitchen->OptionCount = 2; $this->fields['Private_Kitchen'] = &$this->Private_Kitchen; // Auton_heating $this->Auton_heating = new cField('taccomodations', 'taccomodations', 'x_Auton_heating', 'Auton_heating', '`Auton_heating`', '`Auton_heating`', 202, -1, FALSE, '`Auton_heating`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->Auton_heating->Sortable = TRUE; // Allow sort $this->Auton_heating->FldDataType = EW_DATATYPE_BOOLEAN; $this->Auton_heating->TrueValue = 'Y'; $this->Auton_heating->FalseValue = 'N'; $this->Auton_heating->OptionCount = 2; $this->fields['Auton_heating'] = &$this->Auton_heating; // Arch_barriers $this->Arch_barriers = new cField('taccomodations', 'taccomodations', 'x_Arch_barriers', 'Arch_barriers', '`Arch_barriers`', '`Arch_barriers`', 202, -1, FALSE, '`Arch_barriers`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->Arch_barriers->Sortable = TRUE; // Allow sort $this->Arch_barriers->FldDataType = EW_DATATYPE_BOOLEAN; $this->Arch_barriers->TrueValue = 'Y'; $this->Arch_barriers->FalseValue = 'N'; $this->Arch_barriers->OptionCount = 2; $this->fields['Arch_barriers'] = &$this->Arch_barriers; // Furnisched $this->Furnisched = new cField('taccomodations', 'taccomodations', 'x_Furnisched', 'Furnisched', '`Furnisched`', '`Furnisched`', 202, -1, FALSE, '`Furnisched`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->Furnisched->Sortable = TRUE; // Allow sort $this->Furnisched->FldDataType = EW_DATATYPE_BOOLEAN; $this->Furnisched->TrueValue = 'Y'; $this->Furnisched->FalseValue = 'N'; $this->Furnisched->OptionCount = 2; $this->fields['Furnisched'] = &$this->Furnisched; // Private_entrance $this->Private_entrance = new cField('taccomodations', 'taccomodations', 'x_Private_entrance', 'Private_entrance', '`Private_entrance`', '`Private_entrance`', 202, -1, FALSE, '`Private_entrance`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->Private_entrance->Sortable = TRUE; // Allow sort $this->Private_entrance->FldDataType = EW_DATATYPE_BOOLEAN; $this->Private_entrance->TrueValue = 'Y'; $this->Private_entrance->FalseValue = 'N'; $this->Private_entrance->OptionCount = 2; $this->fields['Private_entrance'] = &$this->Private_entrance; // Time_restrictions $this->Time_restrictions = new cField('taccomodations', 'taccomodations', 'x_Time_restrictions', 'Time_restrictions', '`Time_restrictions`', '`Time_restrictions`', 202, -1, FALSE, '`Time_restrictions`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->Time_restrictions->Sortable = TRUE; // Allow sort $this->Time_restrictions->FldDataType = EW_DATATYPE_BOOLEAN; $this->Time_restrictions->TrueValue = 'Y'; $this->Time_restrictions->FalseValue = 'N'; $this->Time_restrictions->OptionCount = 2; $this->fields['Time_restrictions'] = &$this->Time_restrictions; // Time_restr_from $this->Time_restr_from = new cField('taccomodations', 'taccomodations', 'x_Time_restr_from', 'Time_restr_from', '`Time_restr_from`', ew_CastDateFieldForLike('`Time_restr_from`', 4, "DB"), 134, 4, FALSE, '`Time_restr_from`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->Time_restr_from->Sortable = TRUE; // Allow sort $this->Time_restr_from->FldDefaultErrMsg = str_replace("%s", $GLOBALS["EW_TIME_SEPARATOR"], $Language->Phrase("IncorrectTime")); $this->fields['Time_restr_from'] = &$this->Time_restr_from; // Time_restr_to $this->Time_restr_to = new cField('taccomodations', 'taccomodations', 'x_Time_restr_to', 'Time_restr_to', '`Time_restr_to`', ew_CastDateFieldForLike('`Time_restr_to`', 4, "DB"), 134, 4, FALSE, '`Time_restr_to`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->Time_restr_to->Sortable = TRUE; // Allow sort $this->Time_restr_to->FldDefaultErrMsg = str_replace("%s", $GLOBALS["EW_TIME_SEPARATOR"], $Language->Phrase("IncorrectTime")); $this->fields['Time_restr_to'] = &$this->Time_restr_to; // Services_access $this->Services_access = new cField('taccomodations', 'taccomodations', 'x_Services_access', 'Services_access', '`Services_access`', '`Services_access`', 202, -1, FALSE, '`Services_access`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->Services_access->Sortable = TRUE; // Allow sort $this->Services_access->FldDataType = EW_DATATYPE_BOOLEAN; $this->Services_access->TrueValue = 'Y'; $this->Services_access->FalseValue = 'N'; $this->Services_access->OptionCount = 2; $this->fields['Services_access'] = &$this->Services_access; // Available_from $this->Available_from = new cField('taccomodations', 'taccomodations', 'x_Available_from', 'Available_from', '`Available_from`', ew_CastDateFieldForLike('`Available_from`', 7, "DB"), 133, 7, FALSE, '`Available_from`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->Available_from->Sortable = TRUE; // Allow sort $this->Available_from->FldDefaultErrMsg = str_replace("%s", $GLOBALS["EW_DATE_SEPARATOR"], $Language->Phrase("IncorrectDateDMY")); $this->fields['Available_from'] = &$this->Available_from; // Available_to $this->Available_to = new cField('taccomodations', 'taccomodations', 'x_Available_to', 'Available_to', '`Available_to`', ew_CastDateFieldForLike('`Available_to`', 7, "DB"), 133, 7, FALSE, '`Available_to`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->Available_to->Sortable = TRUE; // Allow sort $this->Available_to->FldDefaultErrMsg = str_replace("%s", $GLOBALS["EW_DATE_SEPARATOR"], $Language->Phrase("IncorrectDateDMY")); $this->fields['Available_to'] = &$this->Available_to; // Rel_type $this->Rel_type = new cField('taccomodations', 'taccomodations', 'x_Rel_type', 'Rel_type', '`Rel_type`', '`Rel_type`', 200, -1, FALSE, '`Rel_type`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'SELECT'); $this->Rel_type->Sortable = TRUE; // Allow sort $this->Rel_type->UsePleaseSelect = TRUE; // Use PleaseSelect by default $this->Rel_type->PleaseSelectText = $Language->Phrase("PleaseSelect"); // PleaseSelect text $this->fields['Rel_type'] = &$this->Rel_type; // offer_woman $this->offer_woman = new cField('taccomodations', 'taccomodations', 'x_offer_woman', 'offer_woman', '`offer_woman`', '`offer_woman`', 202, -1, FALSE, '`offer_woman`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->offer_woman->Sortable = TRUE; // Allow sort $this->offer_woman->FldDataType = EW_DATATYPE_BOOLEAN; $this->offer_woman->TrueValue = 'Y'; $this->offer_woman->FalseValue = 'N'; $this->offer_woman->OptionCount = 2; $this->fields['offer_woman'] = &$this->offer_woman; // offer_children $this->offer_children = new cField('taccomodations', 'taccomodations', 'x_offer_children', 'offer_children', '`offer_children`', '`offer_children`', 202, -1, FALSE, '`offer_children`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->offer_children->Sortable = TRUE; // Allow sort $this->offer_children->FldDataType = EW_DATATYPE_BOOLEAN; $this->offer_children->TrueValue = 'Y'; $this->offer_children->FalseValue = 'N'; $this->offer_children->OptionCount = 2; $this->fields['offer_children'] = &$this->offer_children; // offer_family $this->offer_family = new cField('taccomodations', 'taccomodations', 'x_offer_family', 'offer_family', '`offer_family`', '`offer_family`', 202, -1, FALSE, '`offer_family`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->offer_family->Sortable = TRUE; // Allow sort $this->offer_family->FldDataType = EW_DATATYPE_BOOLEAN; $this->offer_family->TrueValue = 'Y'; $this->offer_family->FalseValue = 'N'; $this->offer_family->OptionCount = 2; $this->fields['offer_family'] = &$this->offer_family; // offer_man $this->offer_man = new cField('taccomodations', 'taccomodations', 'x_offer_man', 'offer_man', '`offer_man`', '`offer_man`', 202, -1, FALSE, '`offer_man`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->offer_man->Sortable = TRUE; // Allow sort $this->offer_man->FldDataType = EW_DATATYPE_BOOLEAN; $this->offer_man->TrueValue = 'Y'; $this->offer_man->FalseValue = 'N'; $this->offer_man->OptionCount = 2; $this->fields['offer_man'] = &$this->offer_man; // offer_elderly $this->offer_elderly = new cField('taccomodations', 'taccomodations', 'x_offer_elderly', 'offer_elderly', '`offer_elderly`', '`offer_elderly`', 202, -1, FALSE, '`offer_elderly`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->offer_elderly->Sortable = TRUE; // Allow sort $this->offer_elderly->FldDataType = EW_DATATYPE_BOOLEAN; $this->offer_elderly->TrueValue = 'Y'; $this->offer_elderly->FalseValue = 'N'; $this->offer_elderly->OptionCount = 2; $this->fields['offer_elderly'] = &$this->offer_elderly; // offer_disabled $this->offer_disabled = new cField('taccomodations', 'taccomodations', 'x_offer_disabled', 'offer_disabled', '`offer_disabled`', '`offer_disabled`', 202, -1, FALSE, '`offer_disabled`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->offer_disabled->Sortable = TRUE; // Allow sort $this->offer_disabled->FldDataType = EW_DATATYPE_BOOLEAN; $this->offer_disabled->TrueValue = 'Y'; $this->offer_disabled->FalseValue = 'N'; $this->offer_disabled->OptionCount = 2; $this->fields['offer_disabled'] = &$this->offer_disabled; // offer_sick $this->offer_sick = new cField('taccomodations', 'taccomodations', 'x_offer_sick', 'offer_sick', '`offer_sick`', '`offer_sick`', 202, -1, FALSE, '`offer_sick`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->offer_sick->Sortable = TRUE; // Allow sort $this->offer_sick->FldDataType = EW_DATATYPE_BOOLEAN; $this->offer_sick->TrueValue = 'Y'; $this->offer_sick->FalseValue = 'N'; $this->offer_sick->OptionCount = 2; $this->fields['offer_sick'] = &$this->offer_sick; // offer_christian $this->offer_christian = new cField('taccomodations', 'taccomodations', 'x_offer_christian', 'offer_christian', '`offer_christian`', '`offer_christian`', 202, -1, FALSE, '`offer_christian`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->offer_christian->Sortable = TRUE; // Allow sort $this->offer_christian->FldDataType = EW_DATATYPE_BOOLEAN; $this->offer_christian->TrueValue = 'Y'; $this->offer_christian->FalseValue = 'N'; $this->offer_christian->OptionCount = 2; $this->fields['offer_christian'] = &$this->offer_christian; // offer_muslim $this->offer_muslim = new cField('taccomodations', 'taccomodations', 'x_offer_muslim', 'offer_muslim', '`offer_muslim`', '`offer_muslim`', 202, -1, FALSE, '`offer_muslim`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'RADIO'); $this->offer_muslim->Sortable = TRUE; // Allow sort $this->offer_muslim->FldDataType = EW_DATATYPE_BOOLEAN; $this->offer_muslim->TrueValue = 'Y'; $this->offer_muslim->FalseValue = 'N'; $this->offer_muslim->OptionCount = 2; $this->fields['offer_muslim'] = &$this->offer_muslim; // offer_other $this->offer_other = new cField('taccomodations', 'taccomodations', 'x_offer_other', 'offer_other', '`offer_other`', '`offer_other`', 200, -1, FALSE, '`offer_other`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->offer_other->Sortable = TRUE; // Allow sort $this->fields['offer_other'] = &$this->offer_other; // verify_date $this->verify_date = new cField('taccomodations', 'taccomodations', 'x_verify_date', 'verify_date', '`verify_date`', ew_CastDateFieldForLike('`verify_date`', 7, "DB"), 133, 7, FALSE, '`verify_date`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->verify_date->Sortable = TRUE; // Allow sort $this->verify_date->FldDefaultErrMsg = str_replace("%s", $GLOBALS["EW_DATE_SEPARATOR"], $Language->Phrase("IncorrectDateDMY")); $this->fields['verify_date'] = &$this->verify_date; // verify_by $this->verify_by = new cField('taccomodations', 'taccomodations', 'x_verify_by', 'verify_by', '`verify_by`', '`verify_by`', 200, -1, FALSE, '`verify_by`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->verify_by->Sortable = TRUE; // Allow sort $this->fields['verify_by'] = &$this->verify_by; // verify_phone $this->verify_phone = new cField('taccomodations', 'taccomodations', 'x_verify_phone', 'verify_phone', '`verify_phone`', '`verify_phone`', 200, -1, FALSE, '`verify_phone`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->verify_phone->Sortable = TRUE; // Allow sort $this->fields['verify_phone'] = &$this->verify_phone; // verify_email $this->verify_email = new cField('taccomodations', 'taccomodations', 'x_verify_email', 'verify_email', '`verify_email`', '`verify_email`', 200, -1, FALSE, '`verify_email`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->verify_email->Sortable = TRUE; // Allow sort $this->fields['verify_email'] = &$this->verify_email; // Outcome $this->Outcome = new cField('taccomodations', 'taccomodations', 'x_Outcome', 'Outcome', '`Outcome`', '`Outcome`', 200, -1, FALSE, '`Outcome`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'SELECT'); $this->Outcome->Sortable = TRUE; // Allow sort $this->Outcome->UsePleaseSelect = TRUE; // Use PleaseSelect by default $this->Outcome->PleaseSelectText = $Language->Phrase("PleaseSelect"); // PleaseSelect text $this->fields['Outcome'] = &$this->Outcome; // Outcome_type $this->Outcome_type = new cField('taccomodations', 'taccomodations', 'x_Outcome_type', 'Outcome_type', '`Outcome_type`', '`Outcome_type`', 200, -1, FALSE, '`Outcome_type`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'SELECT'); $this->Outcome_type->Sortable = TRUE; // Allow sort $this->Outcome_type->UsePleaseSelect = TRUE; // Use PleaseSelect by default $this->Outcome_type->PleaseSelectText = $Language->Phrase("PleaseSelect"); // PleaseSelect text $this->fields['Outcome_type'] = &$this->Outcome_type; // Rel_doc $this->Rel_doc = new cField('taccomodations', 'taccomodations', 'x_Rel_doc', 'Rel_doc', '`Rel_doc`', '`Rel_doc`', 201, -1, TRUE, '`Rel_doc`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'FILE'); $this->Rel_doc->Sortable = TRUE; // Allow sort $this->Rel_doc->UploadMultiple = TRUE; $this->Rel_doc->Upload->UploadMultiple = TRUE; $this->Rel_doc->UploadMaxFileCount = 0; $this->fields['Rel_doc'] = &$this->Rel_doc; // Rel_doc_type $this->Rel_doc_type = new cField('taccomodations', 'taccomodations', 'x_Rel_doc_type', 'Rel_doc_type', '`Rel_doc_type`', '`Rel_doc_type`', 200, -1, FALSE, '`Rel_doc_type`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->Rel_doc_type->Sortable = FALSE; // Allow sort $this->fields['Rel_doc_type'] = &$this->Rel_doc_type; // Rel_doc_size $this->Rel_doc_size = new cField('taccomodations', 'taccomodations', 'x_Rel_doc_size', 'Rel_doc_size', '`Rel_doc_size`', '`Rel_doc_size`', 3, -1, FALSE, '`Rel_doc_size`', FALSE, FALSE, FALSE, 'FORMATTED TEXT', 'TEXT'); $this->Rel_doc_size->Sortable = FALSE; // Allow sort $this->Rel_doc_size->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger"); $this->fields['Rel_doc_size'] = &$this->Rel_doc_size; } // Set Field Visibility function SetFieldVisibility($fldparm) { global $Security; return $this->$fldparm->Visible; // Returns original value } // Single column sort function UpdateSort(&$ofld) { if ($this->CurrentOrder == $ofld->FldName) { $sSortField = $ofld->FldExpression; $sLastSort = $ofld->getSort(); if ($this->CurrentOrderType == "ASC" || $this->CurrentOrderType == "DESC") { $sThisSort = $this->CurrentOrderType; } else { $sThisSort = ($sLastSort == "ASC") ? "DESC" : "ASC"; } $ofld->setSort($sThisSort); $this->setSessionOrderBy($sSortField . " " . $sThisSort); // Save to Session } else { $ofld->setSort(""); } } // Current master table name function getCurrentMasterTable() { return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_MASTER_TABLE]; } function setCurrentMasterTable($v) { $_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_MASTER_TABLE] = $v; } // Session master WHERE clause function GetMasterFilter() { // Master filter $sMasterFilter = ""; if ($this->getCurrentMasterTable() == "tofferers") { if ($this->idOfferer->getSessionValue() <> "") $sMasterFilter .= "`idOfferer`=" . ew_QuotedValue($this->idOfferer->getSessionValue(), EW_DATATYPE_NUMBER, "DB"); else return ""; } return $sMasterFilter; } // Session detail WHERE clause function GetDetailFilter() { // Detail filter $sDetailFilter = ""; if ($this->getCurrentMasterTable() == "tofferers") { if ($this->idOfferer->getSessionValue() <> "") $sDetailFilter .= "`idOfferer`=" . ew_QuotedValue($this->idOfferer->getSessionValue(), EW_DATATYPE_NUMBER, "DB"); else return ""; } return $sDetailFilter; } // Master filter function SqlMasterFilter_tofferers() { return "`idOfferer`=@idOfferer@"; } // Detail filter function SqlDetailFilter_tofferers() { return "`idOfferer`=@idOfferer@"; } // Current detail table name function getCurrentDetailTable() { return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_DETAIL_TABLE]; } function setCurrentDetailTable($v) { $_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_DETAIL_TABLE] = $v; } // Get detail url function GetDetailUrl() { // Detail url $sDetailUrl = ""; if ($this->getCurrentDetailTable() == "tassigment") { $sDetailUrl = $GLOBALS["tassigment"]->GetListUrl() . "?" . EW_TABLE_SHOW_MASTER . "=" . $this->TableVar; $sDetailUrl .= "&fk_idAccomodation=" . urlencode($this->idAccomodation->CurrentValue); } if ($sDetailUrl == "") { $sDetailUrl = "taccomodationslist.php"; } return $sDetailUrl; } // Table level SQL var $_SqlFrom = ""; function getSqlFrom() { // From return ($this->_SqlFrom <> "") ? $this->_SqlFrom : "`taccomodations`"; } function SqlFrom() { // For backward compatibility return $this->getSqlFrom(); } function setSqlFrom($v) { $this->_SqlFrom = $v; } var $_SqlSelect = ""; function getSqlSelect() { // Select return ($this->_SqlSelect <> "") ? $this->_SqlSelect : "SELECT * FROM " . $this->getSqlFrom(); } function SqlSelect() { // For backward compatibility return $this->getSqlSelect(); } function setSqlSelect($v) { $this->_SqlSelect = $v; } var $_SqlWhere = ""; function getSqlWhere() { // Where $sWhere = ($this->_SqlWhere <> "") ? $this->_SqlWhere : ""; $this->TableFilter = ""; ew_AddFilter($sWhere, $this->TableFilter); return $sWhere; } function SqlWhere() { // For backward compatibility return $this->getSqlWhere(); } function setSqlWhere($v) { $this->_SqlWhere = $v; } var $_SqlGroupBy = ""; function getSqlGroupBy() { // Group By return ($this->_SqlGroupBy <> "") ? $this->_SqlGroupBy : ""; } function SqlGroupBy() { // For backward compatibility return $this->getSqlGroupBy(); } function setSqlGroupBy($v) { $this->_SqlGroupBy = $v; } var $_SqlHaving = ""; function getSqlHaving() { // Having return ($this->_SqlHaving <> "") ? $this->_SqlHaving : ""; } function SqlHaving() { // For backward compatibility return $this->getSqlHaving(); } function setSqlHaving($v) { $this->_SqlHaving = $v; } var $_SqlOrderBy = ""; function getSqlOrderBy() { // Order By return ($this->_SqlOrderBy <> "") ? $this->_SqlOrderBy : ""; } function SqlOrderBy() { // For backward compatibility return $this->getSqlOrderBy(); } function setSqlOrderBy($v) { $this->_SqlOrderBy = $v; } // Apply User ID filters function ApplyUserIDFilters($sFilter) { return $sFilter; } // Check if User ID security allows view all function UserIDAllow($id = "") { $allow = EW_USER_ID_ALLOW; switch ($id) { case "add": case "copy": case "gridadd": case "register": case "addopt": return (($allow & 1) == 1); case "edit": case "gridedit": case "update": case "changepwd": case "forgotpwd": return (($allow & 4) == 4); case "delete": return (($allow & 2) == 2); case "view": return (($allow & 32) == 32); case "search": return (($allow & 64) == 64); default: return (($allow & 8) == 8); } } // Get SQL function GetSQL($where, $orderby) { return ew_BuildSelectSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(), $this->getSqlHaving(), $this->getSqlOrderBy(), $where, $orderby); } // Table SQL function SQL() { $sFilter = $this->CurrentFilter; $sFilter = $this->ApplyUserIDFilters($sFilter); $sSort = $this->getSessionOrderBy(); return ew_BuildSelectSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(), $this->getSqlHaving(), $this->getSqlOrderBy(), $sFilter, $sSort); } // Table SQL with List page filter function SelectSQL() { $sFilter = $this->getSessionWhere(); ew_AddFilter($sFilter, $this->CurrentFilter); $sFilter = $this->ApplyUserIDFilters($sFilter); $this->Recordset_Selecting($sFilter); $sSort = $this->getSessionOrderBy(); return ew_BuildSelectSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(), $this->getSqlHaving(), $this->getSqlOrderBy(), $sFilter, $sSort); } // Get ORDER BY clause function GetOrderBy() { $sSort = $this->getSessionOrderBy(); return ew_BuildSelectSql("", "", "", "", $this->getSqlOrderBy(), "", $sSort); } // Try to get record count function TryGetRecordCount($sSql) { $cnt = -1; if (($this->TableType == 'TABLE' || $this->TableType == 'VIEW' || $this->TableType == 'LINKTABLE') && preg_match("/^SELECT \* FROM/i", $sSql)) { $sSql = "SELECT COUNT(*) FROM" . preg_replace('/^SELECT\s([\s\S]+)?\*\sFROM/i', "", $sSql); $sOrderBy = $this->GetOrderBy(); if (substr($sSql, strlen($sOrderBy) * -1) == $sOrderBy) $sSql = substr($sSql, 0, strlen($sSql) - strlen($sOrderBy)); // Remove ORDER BY clause } else { $sSql = "SELECT COUNT(*) FROM (" . $sSql . ") EW_COUNT_TABLE"; } $conn = &$this->Connection(); if ($rs = $conn->Execute($sSql)) { if (!$rs->EOF && $rs->FieldCount() > 0) { $cnt = $rs->fields[0]; $rs->Close(); } } return intval($cnt); } // Get record count based on filter (for detail record count in master table pages) function LoadRecordCount($sFilter) { $origFilter = $this->CurrentFilter; $this->CurrentFilter = $sFilter; $this->Recordset_Selecting($this->CurrentFilter); //$sSql = $this->SQL(); $sSql = $this->GetSQL($this->CurrentFilter, ""); $cnt = $this->TryGetRecordCount($sSql); if ($cnt == -1) { if ($rs = $this->LoadRs($this->CurrentFilter)) { $cnt = $rs->RecordCount(); $rs->Close(); } } $this->CurrentFilter = $origFilter; return intval($cnt); } // Get record count (for current List page) function SelectRecordCount() { $sSql = $this->SelectSQL(); $cnt = $this->TryGetRecordCount($sSql); if ($cnt == -1) { $conn = &$this->Connection(); if ($rs = $conn->Execute($sSql)) { $cnt = $rs->RecordCount(); $rs->Close(); } } return intval($cnt); } // INSERT statement function InsertSQL(&$rs) { $names = ""; $values = ""; foreach ($rs as $name => $value) { if (!isset($this->fields[$name]) || $this->fields[$name]->FldIsCustom) continue; $names .= $this->fields[$name]->FldExpression . ","; $values .= ew_QuotedValue($value, $this->fields[$name]->FldDataType, $this->DBID) . ","; } while (substr($names, -1) == ",") $names = substr($names, 0, -1); while (substr($values, -1) == ",") $values = substr($values, 0, -1); return "INSERT INTO " . $this->UpdateTable . " ($names) VALUES ($values)"; } // Insert function Insert(&$rs) { $conn = &$this->Connection(); $bInsert = $conn->Execute($this->InsertSQL($rs)); if ($bInsert) { // Get insert id if necessary $this->idAccomodation->setDbValue($conn->Insert_ID()); $rs['idAccomodation'] = $this->idAccomodation->DbValue; } return $bInsert; } // UPDATE statement function UpdateSQL(&$rs, $where = "", $curfilter = TRUE) { $sql = "UPDATE " . $this->UpdateTable . " SET "; foreach ($rs as $name => $value) { if (!isset($this->fields[$name]) || $this->fields[$name]->FldIsCustom) continue; $sql .= $this->fields[$name]->FldExpression . "="; $sql .= ew_QuotedValue($value, $this->fields[$name]->FldDataType, $this->DBID) . ","; } while (substr($sql, -1) == ",") $sql = substr($sql, 0, -1); $filter = ($curfilter) ? $this->CurrentFilter : ""; if (is_array($where)) $where = $this->ArrayToFilter($where); ew_AddFilter($filter, $where); if ($filter <> "") $sql .= " WHERE " . $filter; return $sql; } // Update function Update(&$rs, $where = "", $rsold = NULL, $curfilter = TRUE) { $conn = &$this->Connection(); $bUpdate = $conn->Execute($this->UpdateSQL($rs, $where, $curfilter)); return $bUpdate; } // DELETE statement function DeleteSQL(&$rs, $where = "", $curfilter = TRUE) { $sql = "DELETE FROM " . $this->UpdateTable . " WHERE "; if (is_array($where)) $where = $this->ArrayToFilter($where); if ($rs) { if (array_key_exists('idAccomodation', $rs)) ew_AddFilter($where, ew_QuotedName('idAccomodation', $this->DBID) . '=' . ew_QuotedValue($rs['idAccomodation'], $this->idAccomodation->FldDataType, $this->DBID)); } $filter = ($curfilter) ? $this->CurrentFilter : ""; ew_AddFilter($filter, $where); if ($filter <> "") $sql .= $filter; else $sql .= "0=1"; // Avoid delete return $sql; } // Delete function Delete(&$rs, $where = "", $curfilter = TRUE) { $conn = &$this->Connection(); // Cascade delete detail table 'tassigment' if (!isset($GLOBALS["tassigment"])) $GLOBALS["tassigment"] = new ctassigment(); $rscascade = $GLOBALS["tassigment"]->LoadRs("`idkAccomodation` = " . ew_QuotedValue($rs['idAccomodation'], EW_DATATYPE_NUMBER, "DB")); while ($rscascade && !$rscascade->EOF) { $GLOBALS["tassigment"]->Delete($rscascade->fields); $rscascade->MoveNext(); } $bDelete = $conn->Execute($this->DeleteSQL($rs, $where, $curfilter)); return $bDelete; } // Key filter WHERE clause function SqlKeyFilter() { return "`idAccomodation` = @idAccomodation@"; } // Key filter function KeyFilter() { $sKeyFilter = $this->SqlKeyFilter(); if (!is_numeric($this->idAccomodation->CurrentValue)) $sKeyFilter = "0=1"; // Invalid key $sKeyFilter = str_replace("@idAccomodation@", ew_AdjustSql($this->idAccomodation->CurrentValue, $this->DBID), $sKeyFilter); // Replace key value return $sKeyFilter; } // Return page URL function getReturnUrl() { $name = EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL; // Get referer URL automatically if (ew_ServerVar("HTTP_REFERER") <> "" && ew_ReferPage() <> ew_CurrentPage() && ew_ReferPage() <> "login.php") // Referer not same page or login page $_SESSION[$name] = ew_ServerVar("HTTP_REFERER"); // Save to Session if (@$_SESSION[$name] <> "") { return $_SESSION[$name]; } else { return "taccomodationslist.php"; } } function setReturnUrl($v) { $_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL] = $v; } // List URL function GetListUrl() { return "taccomodationslist.php"; } // View URL function GetViewUrl($parm = "") { if ($parm <> "") $url = $this->KeyUrl("taccomodationsview.php", $this->UrlParm($parm)); else $url = $this->KeyUrl("taccomodationsview.php", $this->UrlParm(EW_TABLE_SHOW_DETAIL . "=")); return $this->AddMasterUrl($url); } // Add URL function GetAddUrl($parm = "") { if ($parm <> "") $url = "taccomodationsadd.php?" . $this->UrlParm($parm); else $url = "taccomodationsadd.php"; return $this->AddMasterUrl($url); } // Edit URL function GetEditUrl($parm = "") { if ($parm <> "") $url = $this->KeyUrl("taccomodationsedit.php", $this->UrlParm($parm)); else $url = $this->KeyUrl("taccomodationsedit.php", $this->UrlParm(EW_TABLE_SHOW_DETAIL . "=")); return $this->AddMasterUrl($url); } // Inline edit URL function GetInlineEditUrl() { $url = $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=edit")); return $this->AddMasterUrl($url); } // Copy URL function GetCopyUrl($parm = "") { if ($parm <> "") $url = $this->KeyUrl("taccomodationsadd.php", $this->UrlParm($parm)); else $url = $this->KeyUrl("taccomodationsadd.php", $this->UrlParm(EW_TABLE_SHOW_DETAIL . "=")); return $this->AddMasterUrl($url); } // Inline copy URL function GetInlineCopyUrl() { $url = $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=copy")); return $this->AddMasterUrl($url); } // Delete URL function GetDeleteUrl() { return $this->KeyUrl("taccomodationsdelete.php", $this->UrlParm()); } // Add master url function AddMasterUrl($url) { if ($this->getCurrentMasterTable() == "tofferers" && strpos($url, EW_TABLE_SHOW_MASTER . "=") === FALSE) { $url .= (strpos($url, "?") !== FALSE ? "&" : "?") . EW_TABLE_SHOW_MASTER . "=" . $this->getCurrentMasterTable(); $url .= "&fk_idOfferer=" . urlencode($this->idOfferer->CurrentValue); } return $url; } function KeyToJson() { $json = ""; $json .= "idAccomodation:" . ew_VarToJson($this->idAccomodation->CurrentValue, "number", "'"); return "{" . $json . "}"; } // Add key value to URL function KeyUrl($url, $parm = "") { $sUrl = $url . "?"; if ($parm <> "") $sUrl .= $parm . "&"; if (!is_null($this->idAccomodation->CurrentValue)) { $sUrl .= "idAccomodation=" . urlencode($this->idAccomodation->CurrentValue); } else { return "javascript:ew_Alert(ewLanguage.Phrase('InvalidRecord'));"; } return $sUrl; } // Sort URL function SortUrl(&$fld) { if ($this->CurrentAction <> "" || $this->Export <> "" || in_array($fld->FldType, array(128, 204, 205))) { // Unsortable data type return ""; } elseif ($fld->Sortable) { $sUrlParm = $this->UrlParm("order=" . urlencode($fld->FldName) . "&ordertype=" . $fld->ReverseSort()); return $this->AddMasterUrl(ew_CurrentPage() . "?" . $sUrlParm); } else { return ""; } } // Get record keys from $_POST/$_GET/$_SESSION function GetRecordKeys() { global $EW_COMPOSITE_KEY_SEPARATOR; $arKeys = array(); $arKey = array(); if (isset($_POST["key_m"])) { $arKeys = ew_StripSlashes($_POST["key_m"]); $cnt = count($arKeys); } elseif (isset($_GET["key_m"])) { $arKeys = ew_StripSlashes($_GET["key_m"]); $cnt = count($arKeys); } elseif (!empty($_GET) || !empty($_POST)) { $isPost = ew_IsHttpPost(); if ($isPost && isset($_POST["idAccomodation"])) $arKeys[] = ew_StripSlashes($_POST["idAccomodation"]); elseif (isset($_GET["idAccomodation"])) $arKeys[] = ew_StripSlashes($_GET["idAccomodation"]); else $arKeys = NULL; // Do not setup //return $arKeys; // Do not return yet, so the values will also be checked by the following code } // Check keys $ar = array(); if (is_array($arKeys)) { foreach ($arKeys as $key) { if (!is_numeric($key)) continue; $ar[] = $key; } } return $ar; } // Get key filter function GetKeyFilter() { $arKeys = $this->GetRecordKeys(); $sKeyFilter = ""; foreach ($arKeys as $key) { if ($sKeyFilter <> "") $sKeyFilter .= " OR "; $this->idAccomodation->CurrentValue = $key; $sKeyFilter .= "(" . $this->KeyFilter() . ")"; } return $sKeyFilter; } // Load rows based on filter function &LoadRs($sFilter) { // Set up filter (SQL WHERE clause) and get return SQL //$this->CurrentFilter = $sFilter; //$sSql = $this->SQL(); $sSql = $this->GetSQL($sFilter, ""); $conn = &$this->Connection(); $rs = $conn->Execute($sSql); return $rs; } // Load row values from recordset function LoadListRowValues(&$rs) { $this->idAccomodation->setDbValue($rs->fields('idAccomodation')); $this->idOfferer->setDbValue($rs->fields('idOfferer')); $this->Accom_Type->setDbValue($rs->fields('Accom_Type')); $this->Address->setDbValue($rs->fields('Address')); $this->Town->setDbValue($rs->fields('Town')); $this->District->setDbValue($rs->fields('District')); $this->Region->setDbValue($rs->fields('Region')); $this->Beds->setDbValue($rs->fields('Beds')); $this->Rooms->setDbValue($rs->fields('Rooms')); $this->Bathrooms->setDbValue($rs->fields('Bathrooms')); $this->Private_Kitchen->setDbValue($rs->fields('Private_Kitchen')); $this->Auton_heating->setDbValue($rs->fields('Auton_heating')); $this->Arch_barriers->setDbValue($rs->fields('Arch_barriers')); $this->Furnisched->setDbValue($rs->fields('Furnisched')); $this->Private_entrance->setDbValue($rs->fields('Private_entrance')); $this->Time_restrictions->setDbValue($rs->fields('Time_restrictions')); $this->Time_restr_from->setDbValue($rs->fields('Time_restr_from')); $this->Time_restr_to->setDbValue($rs->fields('Time_restr_to')); $this->Services_access->setDbValue($rs->fields('Services_access')); $this->Available_from->setDbValue($rs->fields('Available_from')); $this->Available_to->setDbValue($rs->fields('Available_to')); $this->Rel_type->setDbValue($rs->fields('Rel_type')); $this->offer_woman->setDbValue($rs->fields('offer_woman')); $this->offer_children->setDbValue($rs->fields('offer_children')); $this->offer_family->setDbValue($rs->fields('offer_family')); $this->offer_man->setDbValue($rs->fields('offer_man')); $this->offer_elderly->setDbValue($rs->fields('offer_elderly')); $this->offer_disabled->setDbValue($rs->fields('offer_disabled')); $this->offer_sick->setDbValue($rs->fields('offer_sick')); $this->offer_christian->setDbValue($rs->fields('offer_christian')); $this->offer_muslim->setDbValue($rs->fields('offer_muslim')); $this->offer_other->setDbValue($rs->fields('offer_other')); $this->verify_date->setDbValue($rs->fields('verify_date')); $this->verify_by->setDbValue($rs->fields('verify_by')); $this->verify_phone->setDbValue($rs->fields('verify_phone')); $this->verify_email->setDbValue($rs->fields('verify_email')); $this->Outcome->setDbValue($rs->fields('Outcome')); $this->Outcome_type->setDbValue($rs->fields('Outcome_type')); $this->Rel_doc->Upload->DbValue = $rs->fields('Rel_doc'); $this->Rel_doc_type->setDbValue($rs->fields('Rel_doc_type')); $this->Rel_doc_size->setDbValue($rs->fields('Rel_doc_size')); } // Render list row values function RenderListRow() { global $Security, $gsLanguage, $Language; // Call Row Rendering event $this->Row_Rendering(); // Common render codes // idAccomodation // idOfferer // Accom_Type // Address // Town // District // Region // Beds // Rooms // Bathrooms // Private_Kitchen // Auton_heating // Arch_barriers // Furnisched // Private_entrance // Time_restrictions // Time_restr_from // Time_restr_to // Services_access // Available_from // Available_to // Rel_type // offer_woman // offer_children // offer_family // offer_man // offer_elderly // offer_disabled // offer_sick // offer_christian // offer_muslim // offer_other // verify_date // verify_by // verify_phone // verify_email // Outcome // Outcome_type // Rel_doc // Rel_doc_type $this->Rel_doc_type->CellCssStyle = "white-space: nowrap;"; // Rel_doc_size $this->Rel_doc_size->CellCssStyle = "white-space: nowrap;"; // idAccomodation $this->idAccomodation->ViewValue = $this->idAccomodation->CurrentValue; $this->idAccomodation->ViewCustomAttributes = ""; // idOfferer $this->idOfferer->ViewValue = $this->idOfferer->CurrentValue; if (strval($this->idOfferer->CurrentValue) <> "") { $sFilterWrk = "`idOfferer`" . ew_SearchString("=", $this->idOfferer->CurrentValue, EW_DATATYPE_NUMBER, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `idOfferer`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `Institution_Name` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tofferers`"; $sWhereWrk = ""; $this->idOfferer->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `idOfferer`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `Institution_Name` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tofferers`"; $sWhereWrk = ""; $this->idOfferer->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `idOfferer`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `Institution_Name` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tofferers`"; $sWhereWrk = ""; $this->idOfferer->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->idOfferer, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $arwrk[2] = $rswrk->fields('Disp2Fld'); $arwrk[3] = $rswrk->fields('Disp3Fld'); $this->idOfferer->ViewValue = $this->idOfferer->DisplayValue($arwrk); $rswrk->Close(); } else { $this->idOfferer->ViewValue = $this->idOfferer->CurrentValue; } } else { $this->idOfferer->ViewValue = NULL; } $this->idOfferer->ViewCustomAttributes = ""; // Accom_Type if (strval($this->Accom_Type->CurrentValue) <> "") { $sFilterWrk = "`Accom_Type`" . ew_SearchString("=", $this->Accom_Type->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Accom_Type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `taccom_type`"; $sWhereWrk = ""; $this->Accom_Type->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Accom_Type`, `Description_IT` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `taccom_type`"; $sWhereWrk = ""; $this->Accom_Type->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Accom_Type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `taccom_type`"; $sWhereWrk = ""; $this->Accom_Type->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Accom_Type, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->Accom_Type->ViewValue = $this->Accom_Type->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Accom_Type->ViewValue = $this->Accom_Type->CurrentValue; } } else { $this->Accom_Type->ViewValue = NULL; } $this->Accom_Type->ViewCustomAttributes = ""; // Address $this->Address->ViewValue = $this->Address->CurrentValue; $this->Address->ViewCustomAttributes = ""; // Town $this->Town->ViewValue = $this->Town->CurrentValue; $this->Town->ViewCustomAttributes = ""; // District $this->District->ViewValue = $this->District->CurrentValue; $this->District->ViewCustomAttributes = ""; // Region $this->Region->ViewValue = $this->Region->CurrentValue; $this->Region->ViewCustomAttributes = ""; // Beds $this->Beds->ViewValue = $this->Beds->CurrentValue; $this->Beds->ViewCustomAttributes = ""; // Rooms $this->Rooms->ViewValue = $this->Rooms->CurrentValue; $this->Rooms->ViewCustomAttributes = ""; // Bathrooms $this->Bathrooms->ViewValue = $this->Bathrooms->CurrentValue; $this->Bathrooms->ViewCustomAttributes = ""; // Private_Kitchen if (ew_ConvertToBool($this->Private_Kitchen->CurrentValue)) { $this->Private_Kitchen->ViewValue = $this->Private_Kitchen->FldTagCaption(1) <> "" ? $this->Private_Kitchen->FldTagCaption(1) : "Y"; } else { $this->Private_Kitchen->ViewValue = $this->Private_Kitchen->FldTagCaption(2) <> "" ? $this->Private_Kitchen->FldTagCaption(2) : "N"; } $this->Private_Kitchen->ViewCustomAttributes = ""; // Auton_heating if (ew_ConvertToBool($this->Auton_heating->CurrentValue)) { $this->Auton_heating->ViewValue = $this->Auton_heating->FldTagCaption(1) <> "" ? $this->Auton_heating->FldTagCaption(1) : "Y"; } else { $this->Auton_heating->ViewValue = $this->Auton_heating->FldTagCaption(2) <> "" ? $this->Auton_heating->FldTagCaption(2) : "N"; } $this->Auton_heating->ViewCustomAttributes = ""; // Arch_barriers if (ew_ConvertToBool($this->Arch_barriers->CurrentValue)) { $this->Arch_barriers->ViewValue = $this->Arch_barriers->FldTagCaption(1) <> "" ? $this->Arch_barriers->FldTagCaption(1) : "Y"; } else { $this->Arch_barriers->ViewValue = $this->Arch_barriers->FldTagCaption(2) <> "" ? $this->Arch_barriers->FldTagCaption(2) : "N"; } $this->Arch_barriers->ViewCustomAttributes = ""; // Furnisched if (ew_ConvertToBool($this->Furnisched->CurrentValue)) { $this->Furnisched->ViewValue = $this->Furnisched->FldTagCaption(1) <> "" ? $this->Furnisched->FldTagCaption(1) : "Y"; } else { $this->Furnisched->ViewValue = $this->Furnisched->FldTagCaption(2) <> "" ? $this->Furnisched->FldTagCaption(2) : "N"; } $this->Furnisched->ViewCustomAttributes = ""; // Private_entrance if (ew_ConvertToBool($this->Private_entrance->CurrentValue)) { $this->Private_entrance->ViewValue = $this->Private_entrance->FldTagCaption(1) <> "" ? $this->Private_entrance->FldTagCaption(1) : "Y"; } else { $this->Private_entrance->ViewValue = $this->Private_entrance->FldTagCaption(2) <> "" ? $this->Private_entrance->FldTagCaption(2) : "N"; } $this->Private_entrance->ViewCustomAttributes = ""; // Time_restrictions if (ew_ConvertToBool($this->Time_restrictions->CurrentValue)) { $this->Time_restrictions->ViewValue = $this->Time_restrictions->FldTagCaption(1) <> "" ? $this->Time_restrictions->FldTagCaption(1) : "Y"; } else { $this->Time_restrictions->ViewValue = $this->Time_restrictions->FldTagCaption(2) <> "" ? $this->Time_restrictions->FldTagCaption(2) : "N"; } $this->Time_restrictions->ViewCustomAttributes = ""; // Time_restr_from $this->Time_restr_from->ViewValue = $this->Time_restr_from->CurrentValue; $this->Time_restr_from->ViewValue = ew_FormatDateTime($this->Time_restr_from->ViewValue, 4); $this->Time_restr_from->ViewCustomAttributes = ""; // Time_restr_to $this->Time_restr_to->ViewValue = $this->Time_restr_to->CurrentValue; $this->Time_restr_to->ViewValue = ew_FormatDateTime($this->Time_restr_to->ViewValue, 4); $this->Time_restr_to->ViewCustomAttributes = ""; // Services_access if (ew_ConvertToBool($this->Services_access->CurrentValue)) { $this->Services_access->ViewValue = $this->Services_access->FldTagCaption(1) <> "" ? $this->Services_access->FldTagCaption(1) : "Y"; } else { $this->Services_access->ViewValue = $this->Services_access->FldTagCaption(2) <> "" ? $this->Services_access->FldTagCaption(2) : "N"; } $this->Services_access->ViewCustomAttributes = ""; // Available_from $this->Available_from->ViewValue = $this->Available_from->CurrentValue; $this->Available_from->ViewValue = ew_FormatDateTime($this->Available_from->ViewValue, 7); $this->Available_from->ViewCustomAttributes = ""; // Available_to $this->Available_to->ViewValue = $this->Available_to->CurrentValue; $this->Available_to->ViewValue = ew_FormatDateTime($this->Available_to->ViewValue, 7); $this->Available_to->ViewCustomAttributes = ""; // Rel_type if (strval($this->Rel_type->CurrentValue) <> "") { $sFilterWrk = "`Rel_type`" . ew_SearchString("=", $this->Rel_type->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Rel_type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `trel_type`"; $sWhereWrk = ""; $this->Rel_type->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Rel_type`, `Description_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `trel_type`"; $sWhereWrk = ""; $this->Rel_type->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Rel_type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `trel_type`"; $sWhereWrk = ""; $this->Rel_type->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Rel_type, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->Rel_type->ViewValue = $this->Rel_type->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Rel_type->ViewValue = $this->Rel_type->CurrentValue; } } else { $this->Rel_type->ViewValue = NULL; } $this->Rel_type->ViewCustomAttributes = ""; // offer_woman if (ew_ConvertToBool($this->offer_woman->CurrentValue)) { $this->offer_woman->ViewValue = $this->offer_woman->FldTagCaption(1) <> "" ? $this->offer_woman->FldTagCaption(1) : "Y"; } else { $this->offer_woman->ViewValue = $this->offer_woman->FldTagCaption(2) <> "" ? $this->offer_woman->FldTagCaption(2) : "N"; } $this->offer_woman->ViewCustomAttributes = ""; // offer_children if (ew_ConvertToBool($this->offer_children->CurrentValue)) { $this->offer_children->ViewValue = $this->offer_children->FldTagCaption(1) <> "" ? $this->offer_children->FldTagCaption(1) : "Y"; } else { $this->offer_children->ViewValue = $this->offer_children->FldTagCaption(2) <> "" ? $this->offer_children->FldTagCaption(2) : "N"; } $this->offer_children->ViewCustomAttributes = ""; // offer_family if (ew_ConvertToBool($this->offer_family->CurrentValue)) { $this->offer_family->ViewValue = $this->offer_family->FldTagCaption(1) <> "" ? $this->offer_family->FldTagCaption(1) : "Y"; } else { $this->offer_family->ViewValue = $this->offer_family->FldTagCaption(2) <> "" ? $this->offer_family->FldTagCaption(2) : "N"; } $this->offer_family->ViewCustomAttributes = ""; // offer_man if (ew_ConvertToBool($this->offer_man->CurrentValue)) { $this->offer_man->ViewValue = $this->offer_man->FldTagCaption(1) <> "" ? $this->offer_man->FldTagCaption(1) : "Y"; } else { $this->offer_man->ViewValue = $this->offer_man->FldTagCaption(2) <> "" ? $this->offer_man->FldTagCaption(2) : "N"; } $this->offer_man->ViewCustomAttributes = ""; // offer_elderly if (ew_ConvertToBool($this->offer_elderly->CurrentValue)) { $this->offer_elderly->ViewValue = $this->offer_elderly->FldTagCaption(1) <> "" ? $this->offer_elderly->FldTagCaption(1) : "Y"; } else { $this->offer_elderly->ViewValue = $this->offer_elderly->FldTagCaption(2) <> "" ? $this->offer_elderly->FldTagCaption(2) : "N"; } $this->offer_elderly->ViewCustomAttributes = ""; // offer_disabled if (ew_ConvertToBool($this->offer_disabled->CurrentValue)) { $this->offer_disabled->ViewValue = $this->offer_disabled->FldTagCaption(1) <> "" ? $this->offer_disabled->FldTagCaption(1) : "Y"; } else { $this->offer_disabled->ViewValue = $this->offer_disabled->FldTagCaption(2) <> "" ? $this->offer_disabled->FldTagCaption(2) : "N"; } $this->offer_disabled->ViewCustomAttributes = ""; // offer_sick if (ew_ConvertToBool($this->offer_sick->CurrentValue)) { $this->offer_sick->ViewValue = $this->offer_sick->FldTagCaption(1) <> "" ? $this->offer_sick->FldTagCaption(1) : "Y"; } else { $this->offer_sick->ViewValue = $this->offer_sick->FldTagCaption(2) <> "" ? $this->offer_sick->FldTagCaption(2) : "N"; } $this->offer_sick->ViewCustomAttributes = ""; // offer_christian if (ew_ConvertToBool($this->offer_christian->CurrentValue)) { $this->offer_christian->ViewValue = $this->offer_christian->FldTagCaption(1) <> "" ? $this->offer_christian->FldTagCaption(1) : "Y"; } else { $this->offer_christian->ViewValue = $this->offer_christian->FldTagCaption(2) <> "" ? $this->offer_christian->FldTagCaption(2) : "N"; } $this->offer_christian->ViewCustomAttributes = ""; // offer_muslim if (ew_ConvertToBool($this->offer_muslim->CurrentValue)) { $this->offer_muslim->ViewValue = $this->offer_muslim->FldTagCaption(1) <> "" ? $this->offer_muslim->FldTagCaption(1) : "Y"; } else { $this->offer_muslim->ViewValue = $this->offer_muslim->FldTagCaption(2) <> "" ? $this->offer_muslim->FldTagCaption(2) : "N"; } $this->offer_muslim->ViewCustomAttributes = ""; // offer_other $this->offer_other->ViewValue = $this->offer_other->CurrentValue; $this->offer_other->ViewCustomAttributes = ""; // verify_date $this->verify_date->ViewValue = $this->verify_date->CurrentValue; $this->verify_date->ViewValue = ew_FormatDateTime($this->verify_date->ViewValue, 7); $this->verify_date->ViewCustomAttributes = ""; // verify_by $this->verify_by->ViewValue = $this->verify_by->CurrentValue; $this->verify_by->ViewCustomAttributes = ""; // verify_phone $this->verify_phone->ViewValue = $this->verify_phone->CurrentValue; $this->verify_phone->ViewCustomAttributes = ""; // verify_email $this->verify_email->ViewValue = $this->verify_email->CurrentValue; $this->verify_email->ViewCustomAttributes = ""; // Outcome if (strval($this->Outcome->CurrentValue) <> "") { $sFilterWrk = "`Outcome`" . ew_SearchString("=", $this->Outcome->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Outcome`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `toutcome`"; $sWhereWrk = ""; $this->Outcome->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Outcome`, `Description_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `toutcome`"; $sWhereWrk = ""; $this->Outcome->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Outcome`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `toutcome`"; $sWhereWrk = ""; $this->Outcome->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Outcome, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->Outcome->ViewValue = $this->Outcome->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Outcome->ViewValue = $this->Outcome->CurrentValue; } } else { $this->Outcome->ViewValue = NULL; } $this->Outcome->ViewCustomAttributes = ""; // Outcome_type if (strval($this->Outcome_type->CurrentValue) <> "") { $sFilterWrk = "`Outcome_type`" . ew_SearchString("=", $this->Outcome_type->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Outcome_type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `toutcometype`"; $sWhereWrk = ""; $this->Outcome_type->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Outcome_type`, `Description_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `toutcometype`"; $sWhereWrk = ""; $this->Outcome_type->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Outcome_type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `toutcometype`"; $sWhereWrk = ""; $this->Outcome_type->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Outcome_type, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->Outcome_type->ViewValue = $this->Outcome_type->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Outcome_type->ViewValue = $this->Outcome_type->CurrentValue; } } else { $this->Outcome_type->ViewValue = NULL; } $this->Outcome_type->ViewCustomAttributes = ""; // Rel_doc $this->Rel_doc->UploadPath = "uploads/accom/".$this->idAccomodation->DbValue; if (!ew_Empty($this->Rel_doc->Upload->DbValue)) { $this->Rel_doc->ViewValue = $this->Rel_doc->Upload->DbValue; } else { $this->Rel_doc->ViewValue = ""; } $this->Rel_doc->ViewCustomAttributes = ""; // Rel_doc_type $this->Rel_doc_type->ViewValue = $this->Rel_doc_type->CurrentValue; $this->Rel_doc_type->ViewCustomAttributes = ""; // Rel_doc_size $this->Rel_doc_size->ViewValue = $this->Rel_doc_size->CurrentValue; $this->Rel_doc_size->ViewCustomAttributes = ""; // idAccomodation $this->idAccomodation->LinkCustomAttributes = ""; $this->idAccomodation->HrefValue = ""; $this->idAccomodation->TooltipValue = ""; // idOfferer $this->idOfferer->LinkCustomAttributes = ""; if (!ew_Empty($this->idOfferer->CurrentValue)) { $this->idOfferer->HrefValue = "tofferersview.php?showdetail=&idOfferer=" . $this->idOfferer->CurrentValue; // Add prefix/suffix $this->idOfferer->LinkAttrs["target"] = ""; // Add target if ($this->Export <> "") $this->idOfferer->HrefValue = ew_ConvertFullUrl($this->idOfferer->HrefValue); } else { $this->idOfferer->HrefValue = ""; } $this->idOfferer->TooltipValue = ""; // Accom_Type $this->Accom_Type->LinkCustomAttributes = ""; $this->Accom_Type->HrefValue = ""; $this->Accom_Type->TooltipValue = ""; // Address $this->Address->LinkCustomAttributes = ""; $this->Address->HrefValue = ""; $this->Address->TooltipValue = ""; // Town $this->Town->LinkCustomAttributes = ""; $this->Town->HrefValue = ""; $this->Town->TooltipValue = ""; // District $this->District->LinkCustomAttributes = ""; $this->District->HrefValue = ""; $this->District->TooltipValue = ""; // Region $this->Region->LinkCustomAttributes = ""; $this->Region->HrefValue = ""; $this->Region->TooltipValue = ""; // Beds $this->Beds->LinkCustomAttributes = ""; $this->Beds->HrefValue = ""; $this->Beds->TooltipValue = ""; // Rooms $this->Rooms->LinkCustomAttributes = ""; $this->Rooms->HrefValue = ""; $this->Rooms->TooltipValue = ""; // Bathrooms $this->Bathrooms->LinkCustomAttributes = ""; $this->Bathrooms->HrefValue = ""; $this->Bathrooms->TooltipValue = ""; // Private_Kitchen $this->Private_Kitchen->LinkCustomAttributes = ""; $this->Private_Kitchen->HrefValue = ""; $this->Private_Kitchen->TooltipValue = ""; // Auton_heating $this->Auton_heating->LinkCustomAttributes = ""; $this->Auton_heating->HrefValue = ""; $this->Auton_heating->TooltipValue = ""; // Arch_barriers $this->Arch_barriers->LinkCustomAttributes = ""; $this->Arch_barriers->HrefValue = ""; $this->Arch_barriers->TooltipValue = ""; // Furnisched $this->Furnisched->LinkCustomAttributes = ""; $this->Furnisched->HrefValue = ""; $this->Furnisched->TooltipValue = ""; // Private_entrance $this->Private_entrance->LinkCustomAttributes = ""; $this->Private_entrance->HrefValue = ""; $this->Private_entrance->TooltipValue = ""; // Time_restrictions $this->Time_restrictions->LinkCustomAttributes = ""; $this->Time_restrictions->HrefValue = ""; $this->Time_restrictions->TooltipValue = ""; // Time_restr_from $this->Time_restr_from->LinkCustomAttributes = ""; $this->Time_restr_from->HrefValue = ""; $this->Time_restr_from->TooltipValue = ""; // Time_restr_to $this->Time_restr_to->LinkCustomAttributes = ""; $this->Time_restr_to->HrefValue = ""; $this->Time_restr_to->TooltipValue = ""; // Services_access $this->Services_access->LinkCustomAttributes = ""; $this->Services_access->HrefValue = ""; $this->Services_access->TooltipValue = ""; // Available_from $this->Available_from->LinkCustomAttributes = ""; $this->Available_from->HrefValue = ""; $this->Available_from->TooltipValue = ""; // Available_to $this->Available_to->LinkCustomAttributes = ""; $this->Available_to->HrefValue = ""; $this->Available_to->TooltipValue = ""; // Rel_type $this->Rel_type->LinkCustomAttributes = ""; $this->Rel_type->HrefValue = ""; $this->Rel_type->TooltipValue = ""; // offer_woman $this->offer_woman->LinkCustomAttributes = ""; $this->offer_woman->HrefValue = ""; $this->offer_woman->TooltipValue = ""; // offer_children $this->offer_children->LinkCustomAttributes = ""; $this->offer_children->HrefValue = ""; $this->offer_children->TooltipValue = ""; // offer_family $this->offer_family->LinkCustomAttributes = ""; $this->offer_family->HrefValue = ""; $this->offer_family->TooltipValue = ""; // offer_man $this->offer_man->LinkCustomAttributes = ""; $this->offer_man->HrefValue = ""; $this->offer_man->TooltipValue = ""; // offer_elderly $this->offer_elderly->LinkCustomAttributes = ""; $this->offer_elderly->HrefValue = ""; $this->offer_elderly->TooltipValue = ""; // offer_disabled $this->offer_disabled->LinkCustomAttributes = ""; $this->offer_disabled->HrefValue = ""; $this->offer_disabled->TooltipValue = ""; // offer_sick $this->offer_sick->LinkCustomAttributes = ""; $this->offer_sick->HrefValue = ""; $this->offer_sick->TooltipValue = ""; // offer_christian $this->offer_christian->LinkCustomAttributes = ""; $this->offer_christian->HrefValue = ""; $this->offer_christian->TooltipValue = ""; // offer_muslim $this->offer_muslim->LinkCustomAttributes = ""; $this->offer_muslim->HrefValue = ""; $this->offer_muslim->TooltipValue = ""; // offer_other $this->offer_other->LinkCustomAttributes = ""; $this->offer_other->HrefValue = ""; $this->offer_other->TooltipValue = ""; // verify_date $this->verify_date->LinkCustomAttributes = ""; $this->verify_date->HrefValue = ""; $this->verify_date->TooltipValue = ""; // verify_by $this->verify_by->LinkCustomAttributes = ""; $this->verify_by->HrefValue = ""; $this->verify_by->TooltipValue = ""; // verify_phone $this->verify_phone->LinkCustomAttributes = ""; $this->verify_phone->HrefValue = ""; $this->verify_phone->TooltipValue = ""; // verify_email $this->verify_email->LinkCustomAttributes = ""; $this->verify_email->HrefValue = ""; $this->verify_email->TooltipValue = ""; // Outcome $this->Outcome->LinkCustomAttributes = ""; $this->Outcome->HrefValue = ""; $this->Outcome->TooltipValue = ""; // Outcome_type $this->Outcome_type->LinkCustomAttributes = ""; $this->Outcome_type->HrefValue = ""; $this->Outcome_type->TooltipValue = ""; // Rel_doc $this->Rel_doc->LinkCustomAttributes = ""; $this->Rel_doc->UploadPath = "uploads/accom/".$this->idAccomodation->DbValue; if (!ew_Empty($this->Rel_doc->Upload->DbValue)) { $this->Rel_doc->HrefValue = "%u"; // Add prefix/suffix $this->Rel_doc->LinkAttrs["target"] = ""; // Add target if ($this->Export <> "") $this->Rel_doc->HrefValue = ew_ConvertFullUrl($this->Rel_doc->HrefValue); } else { $this->Rel_doc->HrefValue = ""; } $this->Rel_doc->HrefValue2 = $this->Rel_doc->UploadPath . $this->Rel_doc->Upload->DbValue; $this->Rel_doc->TooltipValue = ""; // Rel_doc_type $this->Rel_doc_type->LinkCustomAttributes = ""; $this->Rel_doc_type->HrefValue = ""; $this->Rel_doc_type->TooltipValue = ""; // Rel_doc_size $this->Rel_doc_size->LinkCustomAttributes = ""; $this->Rel_doc_size->HrefValue = ""; $this->Rel_doc_size->TooltipValue = ""; // Call Row Rendered event $this->Row_Rendered(); } // Render edit row values function RenderEditRow() { global $Security, $gsLanguage, $Language; // Call Row Rendering event $this->Row_Rendering(); // idAccomodation $this->idAccomodation->EditAttrs["class"] = "form-control"; $this->idAccomodation->EditCustomAttributes = ""; $this->idAccomodation->EditValue = $this->idAccomodation->CurrentValue; $this->idAccomodation->ViewCustomAttributes = ""; // idOfferer $this->idOfferer->EditAttrs["class"] = "form-control"; $this->idOfferer->EditCustomAttributes = ""; if ($this->idOfferer->getSessionValue() <> "") { $this->idOfferer->CurrentValue = $this->idOfferer->getSessionValue(); $this->idOfferer->ViewValue = $this->idOfferer->CurrentValue; if (strval($this->idOfferer->CurrentValue) <> "") { $sFilterWrk = "`idOfferer`" . ew_SearchString("=", $this->idOfferer->CurrentValue, EW_DATATYPE_NUMBER, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `idOfferer`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `Institution_Name` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tofferers`"; $sWhereWrk = ""; $this->idOfferer->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `idOfferer`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `Institution_Name` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tofferers`"; $sWhereWrk = ""; $this->idOfferer->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `idOfferer`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `Institution_Name` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tofferers`"; $sWhereWrk = ""; $this->idOfferer->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->idOfferer, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $arwrk[2] = $rswrk->fields('Disp2Fld'); $arwrk[3] = $rswrk->fields('Disp3Fld'); $this->idOfferer->ViewValue = $this->idOfferer->DisplayValue($arwrk); $rswrk->Close(); } else { $this->idOfferer->ViewValue = $this->idOfferer->CurrentValue; } } else { $this->idOfferer->ViewValue = NULL; } $this->idOfferer->ViewCustomAttributes = ""; } else { $this->idOfferer->EditValue = $this->idOfferer->CurrentValue; $this->idOfferer->PlaceHolder = ew_RemoveHtml($this->idOfferer->FldCaption()); } // Accom_Type $this->Accom_Type->EditAttrs["class"] = "form-control"; $this->Accom_Type->EditCustomAttributes = ""; // Address $this->Address->EditAttrs["class"] = "form-control"; $this->Address->EditCustomAttributes = ""; $this->Address->EditValue = $this->Address->CurrentValue; $this->Address->PlaceHolder = ew_RemoveHtml($this->Address->FldCaption()); // Town $this->Town->EditAttrs["class"] = "form-control"; $this->Town->EditCustomAttributes = ""; $this->Town->EditValue = $this->Town->CurrentValue; $this->Town->PlaceHolder = ew_RemoveHtml($this->Town->FldCaption()); // District $this->District->EditAttrs["class"] = "form-control"; $this->District->EditCustomAttributes = ""; $this->District->EditValue = $this->District->CurrentValue; $this->District->PlaceHolder = ew_RemoveHtml($this->District->FldCaption()); // Region $this->Region->EditAttrs["class"] = "form-control"; $this->Region->EditCustomAttributes = ""; $this->Region->EditValue = $this->Region->CurrentValue; $this->Region->PlaceHolder = ew_RemoveHtml($this->Region->FldCaption()); // Beds $this->Beds->EditAttrs["class"] = "form-control"; $this->Beds->EditCustomAttributes = ""; $this->Beds->EditValue = $this->Beds->CurrentValue; $this->Beds->PlaceHolder = ew_RemoveHtml($this->Beds->FldCaption()); // Rooms $this->Rooms->EditAttrs["class"] = "form-control"; $this->Rooms->EditCustomAttributes = ""; $this->Rooms->EditValue = $this->Rooms->CurrentValue; $this->Rooms->PlaceHolder = ew_RemoveHtml($this->Rooms->FldCaption()); // Bathrooms $this->Bathrooms->EditAttrs["class"] = "form-control"; $this->Bathrooms->EditCustomAttributes = ""; $this->Bathrooms->EditValue = $this->Bathrooms->CurrentValue; $this->Bathrooms->PlaceHolder = ew_RemoveHtml($this->Bathrooms->FldCaption()); // Private_Kitchen $this->Private_Kitchen->EditCustomAttributes = ""; $this->Private_Kitchen->EditValue = $this->Private_Kitchen->Options(FALSE); // Auton_heating $this->Auton_heating->EditCustomAttributes = ""; $this->Auton_heating->EditValue = $this->Auton_heating->Options(FALSE); // Arch_barriers $this->Arch_barriers->EditCustomAttributes = ""; $this->Arch_barriers->EditValue = $this->Arch_barriers->Options(FALSE); // Furnisched $this->Furnisched->EditCustomAttributes = ""; $this->Furnisched->EditValue = $this->Furnisched->Options(FALSE); // Private_entrance $this->Private_entrance->EditCustomAttributes = ""; $this->Private_entrance->EditValue = $this->Private_entrance->Options(FALSE); // Time_restrictions $this->Time_restrictions->EditCustomAttributes = ""; $this->Time_restrictions->EditValue = $this->Time_restrictions->Options(FALSE); // Time_restr_from $this->Time_restr_from->EditAttrs["class"] = "form-control"; $this->Time_restr_from->EditCustomAttributes = ""; $this->Time_restr_from->EditValue = $this->Time_restr_from->CurrentValue; $this->Time_restr_from->PlaceHolder = ew_RemoveHtml($this->Time_restr_from->FldCaption()); // Time_restr_to $this->Time_restr_to->EditAttrs["class"] = "form-control"; $this->Time_restr_to->EditCustomAttributes = ""; $this->Time_restr_to->EditValue = $this->Time_restr_to->CurrentValue; $this->Time_restr_to->PlaceHolder = ew_RemoveHtml($this->Time_restr_to->FldCaption()); // Services_access $this->Services_access->EditCustomAttributes = ""; $this->Services_access->EditValue = $this->Services_access->Options(FALSE); // Available_from $this->Available_from->EditAttrs["class"] = "form-control"; $this->Available_from->EditCustomAttributes = ""; $this->Available_from->EditValue = ew_FormatDateTime($this->Available_from->CurrentValue, 7); $this->Available_from->PlaceHolder = ew_RemoveHtml($this->Available_from->FldCaption()); // Available_to $this->Available_to->EditAttrs["class"] = "form-control"; $this->Available_to->EditCustomAttributes = ""; $this->Available_to->EditValue = ew_FormatDateTime($this->Available_to->CurrentValue, 7); $this->Available_to->PlaceHolder = ew_RemoveHtml($this->Available_to->FldCaption()); // Rel_type $this->Rel_type->EditAttrs["class"] = "form-control"; $this->Rel_type->EditCustomAttributes = ""; // offer_woman $this->offer_woman->EditCustomAttributes = ""; $this->offer_woman->EditValue = $this->offer_woman->Options(FALSE); // offer_children $this->offer_children->EditCustomAttributes = ""; $this->offer_children->EditValue = $this->offer_children->Options(FALSE); // offer_family $this->offer_family->EditCustomAttributes = ""; $this->offer_family->EditValue = $this->offer_family->Options(FALSE); // offer_man $this->offer_man->EditCustomAttributes = ""; $this->offer_man->EditValue = $this->offer_man->Options(FALSE); // offer_elderly $this->offer_elderly->EditCustomAttributes = ""; $this->offer_elderly->EditValue = $this->offer_elderly->Options(FALSE); // offer_disabled $this->offer_disabled->EditCustomAttributes = ""; $this->offer_disabled->EditValue = $this->offer_disabled->Options(FALSE); // offer_sick $this->offer_sick->EditCustomAttributes = ""; $this->offer_sick->EditValue = $this->offer_sick->Options(FALSE); // offer_christian $this->offer_christian->EditCustomAttributes = ""; $this->offer_christian->EditValue = $this->offer_christian->Options(FALSE); // offer_muslim $this->offer_muslim->EditCustomAttributes = ""; $this->offer_muslim->EditValue = $this->offer_muslim->Options(FALSE); // offer_other $this->offer_other->EditAttrs["class"] = "form-control"; $this->offer_other->EditCustomAttributes = ""; $this->offer_other->EditValue = $this->offer_other->CurrentValue; $this->offer_other->PlaceHolder = ew_RemoveHtml($this->offer_other->FldCaption()); // verify_date $this->verify_date->EditAttrs["class"] = "form-control"; $this->verify_date->EditCustomAttributes = ""; $this->verify_date->EditValue = ew_FormatDateTime($this->verify_date->CurrentValue, 7); $this->verify_date->PlaceHolder = ew_RemoveHtml($this->verify_date->FldCaption()); // verify_by $this->verify_by->EditAttrs["class"] = "form-control"; $this->verify_by->EditCustomAttributes = ""; $this->verify_by->EditValue = $this->verify_by->CurrentValue; $this->verify_by->PlaceHolder = ew_RemoveHtml($this->verify_by->FldCaption()); // verify_phone $this->verify_phone->EditAttrs["class"] = "form-control"; $this->verify_phone->EditCustomAttributes = ""; $this->verify_phone->EditValue = $this->verify_phone->CurrentValue; $this->verify_phone->PlaceHolder = ew_RemoveHtml($this->verify_phone->FldCaption()); // verify_email $this->verify_email->EditAttrs["class"] = "form-control"; $this->verify_email->EditCustomAttributes = ""; $this->verify_email->EditValue = $this->verify_email->CurrentValue; $this->verify_email->PlaceHolder = ew_RemoveHtml($this->verify_email->FldCaption()); // Outcome $this->Outcome->EditAttrs["class"] = "form-control"; $this->Outcome->EditCustomAttributes = ""; // Outcome_type $this->Outcome_type->EditAttrs["class"] = "form-control"; $this->Outcome_type->EditCustomAttributes = ""; // Rel_doc $this->Rel_doc->EditAttrs["class"] = "form-control"; $this->Rel_doc->EditCustomAttributes = ""; $this->Rel_doc->UploadPath = "uploads/accom/".$this->idAccomodation->DbValue; if (!ew_Empty($this->Rel_doc->Upload->DbValue)) { $this->Rel_doc->EditValue = $this->Rel_doc->Upload->DbValue; } else { $this->Rel_doc->EditValue = ""; } if (!ew_Empty($this->Rel_doc->CurrentValue)) $this->Rel_doc->Upload->FileName = $this->Rel_doc->CurrentValue; // Rel_doc_type $this->Rel_doc_type->EditAttrs["class"] = "form-control"; $this->Rel_doc_type->EditCustomAttributes = ""; $this->Rel_doc_type->EditValue = $this->Rel_doc_type->CurrentValue; $this->Rel_doc_type->PlaceHolder = ew_RemoveHtml($this->Rel_doc_type->FldCaption()); // Rel_doc_size $this->Rel_doc_size->EditAttrs["class"] = "form-control"; $this->Rel_doc_size->EditCustomAttributes = ""; $this->Rel_doc_size->EditValue = $this->Rel_doc_size->CurrentValue; $this->Rel_doc_size->PlaceHolder = ew_RemoveHtml($this->Rel_doc_size->FldCaption()); // Call Row Rendered event $this->Row_Rendered(); } // Aggregate list row values function AggregateListRowValues() { } // Aggregate list row (for rendering) function AggregateListRow() { // Call Row Rendered event $this->Row_Rendered(); } var $ExportDoc; // Export data in HTML/CSV/Word/Excel/Email/PDF format function ExportDocument(&$Doc, &$Recordset, $StartRec, $StopRec, $ExportPageType = "") { if (!$Recordset || !$Doc) return; if (!$Doc->ExportCustom) { // Write header $Doc->ExportTableHeader(); if ($Doc->Horizontal) { // Horizontal format, write header $Doc->BeginExportRow(); if ($ExportPageType == "view") { if ($this->idAccomodation->Exportable) $Doc->ExportCaption($this->idAccomodation); if ($this->idOfferer->Exportable) $Doc->ExportCaption($this->idOfferer); if ($this->Accom_Type->Exportable) $Doc->ExportCaption($this->Accom_Type); if ($this->Address->Exportable) $Doc->ExportCaption($this->Address); if ($this->Town->Exportable) $Doc->ExportCaption($this->Town); if ($this->District->Exportable) $Doc->ExportCaption($this->District); if ($this->Region->Exportable) $Doc->ExportCaption($this->Region); if ($this->Beds->Exportable) $Doc->ExportCaption($this->Beds); if ($this->Rooms->Exportable) $Doc->ExportCaption($this->Rooms); if ($this->Bathrooms->Exportable) $Doc->ExportCaption($this->Bathrooms); if ($this->Private_Kitchen->Exportable) $Doc->ExportCaption($this->Private_Kitchen); if ($this->Auton_heating->Exportable) $Doc->ExportCaption($this->Auton_heating); if ($this->Arch_barriers->Exportable) $Doc->ExportCaption($this->Arch_barriers); if ($this->Furnisched->Exportable) $Doc->ExportCaption($this->Furnisched); if ($this->Private_entrance->Exportable) $Doc->ExportCaption($this->Private_entrance); if ($this->Time_restrictions->Exportable) $Doc->ExportCaption($this->Time_restrictions); if ($this->Time_restr_from->Exportable) $Doc->ExportCaption($this->Time_restr_from); if ($this->Time_restr_to->Exportable) $Doc->ExportCaption($this->Time_restr_to); if ($this->Services_access->Exportable) $Doc->ExportCaption($this->Services_access); if ($this->Available_from->Exportable) $Doc->ExportCaption($this->Available_from); if ($this->Available_to->Exportable) $Doc->ExportCaption($this->Available_to); if ($this->Rel_type->Exportable) $Doc->ExportCaption($this->Rel_type); if ($this->offer_woman->Exportable) $Doc->ExportCaption($this->offer_woman); if ($this->offer_children->Exportable) $Doc->ExportCaption($this->offer_children); if ($this->offer_family->Exportable) $Doc->ExportCaption($this->offer_family); if ($this->offer_man->Exportable) $Doc->ExportCaption($this->offer_man); if ($this->offer_elderly->Exportable) $Doc->ExportCaption($this->offer_elderly); if ($this->offer_disabled->Exportable) $Doc->ExportCaption($this->offer_disabled); if ($this->offer_sick->Exportable) $Doc->ExportCaption($this->offer_sick); if ($this->offer_christian->Exportable) $Doc->ExportCaption($this->offer_christian); if ($this->offer_muslim->Exportable) $Doc->ExportCaption($this->offer_muslim); if ($this->offer_other->Exportable) $Doc->ExportCaption($this->offer_other); if ($this->verify_date->Exportable) $Doc->ExportCaption($this->verify_date); if ($this->verify_by->Exportable) $Doc->ExportCaption($this->verify_by); if ($this->verify_phone->Exportable) $Doc->ExportCaption($this->verify_phone); if ($this->verify_email->Exportable) $Doc->ExportCaption($this->verify_email); if ($this->Outcome->Exportable) $Doc->ExportCaption($this->Outcome); if ($this->Outcome_type->Exportable) $Doc->ExportCaption($this->Outcome_type); if ($this->Rel_doc->Exportable) $Doc->ExportCaption($this->Rel_doc); } else { if ($this->idAccomodation->Exportable) $Doc->ExportCaption($this->idAccomodation); if ($this->idOfferer->Exportable) $Doc->ExportCaption($this->idOfferer); if ($this->Accom_Type->Exportable) $Doc->ExportCaption($this->Accom_Type); if ($this->Address->Exportable) $Doc->ExportCaption($this->Address); if ($this->Town->Exportable) $Doc->ExportCaption($this->Town); if ($this->District->Exportable) $Doc->ExportCaption($this->District); if ($this->Region->Exportable) $Doc->ExportCaption($this->Region); if ($this->Beds->Exportable) $Doc->ExportCaption($this->Beds); if ($this->Rooms->Exportable) $Doc->ExportCaption($this->Rooms); if ($this->Bathrooms->Exportable) $Doc->ExportCaption($this->Bathrooms); if ($this->Private_Kitchen->Exportable) $Doc->ExportCaption($this->Private_Kitchen); if ($this->Auton_heating->Exportable) $Doc->ExportCaption($this->Auton_heating); if ($this->Arch_barriers->Exportable) $Doc->ExportCaption($this->Arch_barriers); if ($this->Furnisched->Exportable) $Doc->ExportCaption($this->Furnisched); if ($this->Private_entrance->Exportable) $Doc->ExportCaption($this->Private_entrance); if ($this->Time_restrictions->Exportable) $Doc->ExportCaption($this->Time_restrictions); if ($this->Time_restr_from->Exportable) $Doc->ExportCaption($this->Time_restr_from); if ($this->Time_restr_to->Exportable) $Doc->ExportCaption($this->Time_restr_to); if ($this->Services_access->Exportable) $Doc->ExportCaption($this->Services_access); if ($this->Available_from->Exportable) $Doc->ExportCaption($this->Available_from); if ($this->Available_to->Exportable) $Doc->ExportCaption($this->Available_to); if ($this->Rel_type->Exportable) $Doc->ExportCaption($this->Rel_type); if ($this->offer_woman->Exportable) $Doc->ExportCaption($this->offer_woman); if ($this->offer_children->Exportable) $Doc->ExportCaption($this->offer_children); if ($this->offer_family->Exportable) $Doc->ExportCaption($this->offer_family); if ($this->offer_man->Exportable) $Doc->ExportCaption($this->offer_man); if ($this->offer_elderly->Exportable) $Doc->ExportCaption($this->offer_elderly); if ($this->offer_disabled->Exportable) $Doc->ExportCaption($this->offer_disabled); if ($this->offer_sick->Exportable) $Doc->ExportCaption($this->offer_sick); if ($this->offer_christian->Exportable) $Doc->ExportCaption($this->offer_christian); if ($this->offer_muslim->Exportable) $Doc->ExportCaption($this->offer_muslim); if ($this->offer_other->Exportable) $Doc->ExportCaption($this->offer_other); if ($this->verify_date->Exportable) $Doc->ExportCaption($this->verify_date); if ($this->verify_by->Exportable) $Doc->ExportCaption($this->verify_by); if ($this->verify_phone->Exportable) $Doc->ExportCaption($this->verify_phone); if ($this->verify_email->Exportable) $Doc->ExportCaption($this->verify_email); if ($this->Outcome->Exportable) $Doc->ExportCaption($this->Outcome); if ($this->Outcome_type->Exportable) $Doc->ExportCaption($this->Outcome_type); } $Doc->EndExportRow(); } } // Move to first record $RecCnt = $StartRec - 1; if (!$Recordset->EOF) { $Recordset->MoveFirst(); if ($StartRec > 1) $Recordset->Move($StartRec - 1); } while (!$Recordset->EOF && $RecCnt < $StopRec) { $RecCnt++; if (intval($RecCnt) >= intval($StartRec)) { $RowCnt = intval($RecCnt) - intval($StartRec) + 1; // Page break if ($this->ExportPageBreakCount > 0) { if ($RowCnt > 1 && ($RowCnt - 1) % $this->ExportPageBreakCount == 0) $Doc->ExportPageBreak(); } $this->LoadListRowValues($Recordset); // Render row $this->RowType = EW_ROWTYPE_VIEW; // Render view $this->ResetAttrs(); $this->RenderListRow(); if (!$Doc->ExportCustom) { $Doc->BeginExportRow($RowCnt); // Allow CSS styles if enabled if ($ExportPageType == "view") { if ($this->idAccomodation->Exportable) $Doc->ExportField($this->idAccomodation); if ($this->idOfferer->Exportable) $Doc->ExportField($this->idOfferer); if ($this->Accom_Type->Exportable) $Doc->ExportField($this->Accom_Type); if ($this->Address->Exportable) $Doc->ExportField($this->Address); if ($this->Town->Exportable) $Doc->ExportField($this->Town); if ($this->District->Exportable) $Doc->ExportField($this->District); if ($this->Region->Exportable) $Doc->ExportField($this->Region); if ($this->Beds->Exportable) $Doc->ExportField($this->Beds); if ($this->Rooms->Exportable) $Doc->ExportField($this->Rooms); if ($this->Bathrooms->Exportable) $Doc->ExportField($this->Bathrooms); if ($this->Private_Kitchen->Exportable) $Doc->ExportField($this->Private_Kitchen); if ($this->Auton_heating->Exportable) $Doc->ExportField($this->Auton_heating); if ($this->Arch_barriers->Exportable) $Doc->ExportField($this->Arch_barriers); if ($this->Furnisched->Exportable) $Doc->ExportField($this->Furnisched); if ($this->Private_entrance->Exportable) $Doc->ExportField($this->Private_entrance); if ($this->Time_restrictions->Exportable) $Doc->ExportField($this->Time_restrictions); if ($this->Time_restr_from->Exportable) $Doc->ExportField($this->Time_restr_from); if ($this->Time_restr_to->Exportable) $Doc->ExportField($this->Time_restr_to); if ($this->Services_access->Exportable) $Doc->ExportField($this->Services_access); if ($this->Available_from->Exportable) $Doc->ExportField($this->Available_from); if ($this->Available_to->Exportable) $Doc->ExportField($this->Available_to); if ($this->Rel_type->Exportable) $Doc->ExportField($this->Rel_type); if ($this->offer_woman->Exportable) $Doc->ExportField($this->offer_woman); if ($this->offer_children->Exportable) $Doc->ExportField($this->offer_children); if ($this->offer_family->Exportable) $Doc->ExportField($this->offer_family); if ($this->offer_man->Exportable) $Doc->ExportField($this->offer_man); if ($this->offer_elderly->Exportable) $Doc->ExportField($this->offer_elderly); if ($this->offer_disabled->Exportable) $Doc->ExportField($this->offer_disabled); if ($this->offer_sick->Exportable) $Doc->ExportField($this->offer_sick); if ($this->offer_christian->Exportable) $Doc->ExportField($this->offer_christian); if ($this->offer_muslim->Exportable) $Doc->ExportField($this->offer_muslim); if ($this->offer_other->Exportable) $Doc->ExportField($this->offer_other); if ($this->verify_date->Exportable) $Doc->ExportField($this->verify_date); if ($this->verify_by->Exportable) $Doc->ExportField($this->verify_by); if ($this->verify_phone->Exportable) $Doc->ExportField($this->verify_phone); if ($this->verify_email->Exportable) $Doc->ExportField($this->verify_email); if ($this->Outcome->Exportable) $Doc->ExportField($this->Outcome); if ($this->Outcome_type->Exportable) $Doc->ExportField($this->Outcome_type); if ($this->Rel_doc->Exportable) $Doc->ExportField($this->Rel_doc); } else { if ($this->idAccomodation->Exportable) $Doc->ExportField($this->idAccomodation); if ($this->idOfferer->Exportable) $Doc->ExportField($this->idOfferer); if ($this->Accom_Type->Exportable) $Doc->ExportField($this->Accom_Type); if ($this->Address->Exportable) $Doc->ExportField($this->Address); if ($this->Town->Exportable) $Doc->ExportField($this->Town); if ($this->District->Exportable) $Doc->ExportField($this->District); if ($this->Region->Exportable) $Doc->ExportField($this->Region); if ($this->Beds->Exportable) $Doc->ExportField($this->Beds); if ($this->Rooms->Exportable) $Doc->ExportField($this->Rooms); if ($this->Bathrooms->Exportable) $Doc->ExportField($this->Bathrooms); if ($this->Private_Kitchen->Exportable) $Doc->ExportField($this->Private_Kitchen); if ($this->Auton_heating->Exportable) $Doc->ExportField($this->Auton_heating); if ($this->Arch_barriers->Exportable) $Doc->ExportField($this->Arch_barriers); if ($this->Furnisched->Exportable) $Doc->ExportField($this->Furnisched); if ($this->Private_entrance->Exportable) $Doc->ExportField($this->Private_entrance); if ($this->Time_restrictions->Exportable) $Doc->ExportField($this->Time_restrictions); if ($this->Time_restr_from->Exportable) $Doc->ExportField($this->Time_restr_from); if ($this->Time_restr_to->Exportable) $Doc->ExportField($this->Time_restr_to); if ($this->Services_access->Exportable) $Doc->ExportField($this->Services_access); if ($this->Available_from->Exportable) $Doc->ExportField($this->Available_from); if ($this->Available_to->Exportable) $Doc->ExportField($this->Available_to); if ($this->Rel_type->Exportable) $Doc->ExportField($this->Rel_type); if ($this->offer_woman->Exportable) $Doc->ExportField($this->offer_woman); if ($this->offer_children->Exportable) $Doc->ExportField($this->offer_children); if ($this->offer_family->Exportable) $Doc->ExportField($this->offer_family); if ($this->offer_man->Exportable) $Doc->ExportField($this->offer_man); if ($this->offer_elderly->Exportable) $Doc->ExportField($this->offer_elderly); if ($this->offer_disabled->Exportable) $Doc->ExportField($this->offer_disabled); if ($this->offer_sick->Exportable) $Doc->ExportField($this->offer_sick); if ($this->offer_christian->Exportable) $Doc->ExportField($this->offer_christian); if ($this->offer_muslim->Exportable) $Doc->ExportField($this->offer_muslim); if ($this->offer_other->Exportable) $Doc->ExportField($this->offer_other); if ($this->verify_date->Exportable) $Doc->ExportField($this->verify_date); if ($this->verify_by->Exportable) $Doc->ExportField($this->verify_by); if ($this->verify_phone->Exportable) $Doc->ExportField($this->verify_phone); if ($this->verify_email->Exportable) $Doc->ExportField($this->verify_email); if ($this->Outcome->Exportable) $Doc->ExportField($this->Outcome); if ($this->Outcome_type->Exportable) $Doc->ExportField($this->Outcome_type); } $Doc->EndExportRow(); } } // Call Row Export server event if ($Doc->ExportCustom) $this->Row_Export($Recordset->fields); $Recordset->MoveNext(); } if (!$Doc->ExportCustom) { $Doc->ExportTableFooter(); } } // Get auto fill value function GetAutoFill($id, $val) { $rsarr = array(); $rowcnt = 0; // Output if (is_array($rsarr) && $rowcnt > 0) { $fldcnt = count($rsarr[0]); for ($i = 0; $i < $rowcnt; $i++) { for ($j = 0; $j < $fldcnt; $j++) { $str = strval($rsarr[$i][$j]); $str = ew_ConvertToUtf8($str); if (isset($post["keepCRLF"])) { $str = str_replace(array("\r", "\n"), array("\\r", "\\n"), $str); } else { $str = str_replace(array("\r", "\n"), array(" ", " "), $str); } $rsarr[$i][$j] = $str; } } return ew_ArrayToJson($rsarr); } else { return FALSE; } } // Table level events // Recordset Selecting event function Recordset_Selecting(&$filter) { // Enter your code here } // Recordset Selected event function Recordset_Selected(&$rs) { //echo "Recordset Selected"; } // Recordset Search Validated event function Recordset_SearchValidated() { // Example: //$this->MyField1->AdvancedSearch->SearchValue = "your search criteria"; // Search value } // Recordset Searching event function Recordset_Searching(&$filter) { // Enter your code here } // Row_Selecting event function Row_Selecting(&$filter) { // Enter your code here } // Row Selected event function Row_Selected(&$rs) { //echo "Row Selected"; } // Row Inserting event function Row_Inserting($rsold, &$rsnew) { // Enter your code here // To cancel, set return value to FALSE //$rsnew["Rel_doc"] = $rsnew["idAccomodation"]."-".$rsnew["Rel_doc"] return TRUE; } // Row Inserted event function Row_Inserted($rsold, &$rsnew) { //echo "Row Inserted" } // Row Updating event function Row_Updating($rsold, &$rsnew) { // Enter your code here // To cancel, set return value to FALSE return TRUE; } // Row Updated event function Row_Updated($rsold, &$rsnew) { //echo "Row Updated"; } // Row Update Conflict event function Row_UpdateConflict($rsold, &$rsnew) { // Enter your code here // To ignore conflict, set return value to FALSE return TRUE; } // Grid Inserting event function Grid_Inserting() { // Enter your code here // To reject grid insert, set return value to FALSE return TRUE; } // Grid Inserted event function Grid_Inserted($rsnew) { //echo "Grid Inserted"; } // Grid Updating event function Grid_Updating($rsold) { // Enter your code here // To reject grid update, set return value to FALSE return TRUE; } // Grid Updated event function Grid_Updated($rsold, $rsnew) { //echo "Grid Updated"; } // Row Deleting event function Row_Deleting(&$rs) { // Enter your code here // To cancel, set return value to False return TRUE; } // Row Deleted event function Row_Deleted(&$rs) { //echo "Row Deleted"; } // Email Sending event function Email_Sending(&$Email, &$Args) { //var_dump($Email); var_dump($Args); exit(); return TRUE; } // Lookup Selecting event function Lookup_Selecting($fld, &$filter) { //var_dump($fld->FldName, $fld->LookupFilters, $filter); // Uncomment to view the filter // Enter your code here } // Row Rendering event function Row_Rendering() { // Enter your code here } // Row Rendered event function Row_Rendered() { // To view properties of field class, use: //var_dump($this->); } // User ID Filtering event function UserID_Filtering(&$filter) { // Enter your code here } } ?>