UseTokenInUrl) $PageUrl .= "t=" . $this->TableVar . "&"; // Add page token return $PageUrl; } // Message function getMessage() { return @$_SESSION[EW_SESSION_MESSAGE]; } function setMessage($v) { ew_AddMessage($_SESSION[EW_SESSION_MESSAGE], $v); } function getFailureMessage() { return @$_SESSION[EW_SESSION_FAILURE_MESSAGE]; } function setFailureMessage($v) { ew_AddMessage($_SESSION[EW_SESSION_FAILURE_MESSAGE], $v); } function getSuccessMessage() { return @$_SESSION[EW_SESSION_SUCCESS_MESSAGE]; } function setSuccessMessage($v) { ew_AddMessage($_SESSION[EW_SESSION_SUCCESS_MESSAGE], $v); } function getWarningMessage() { return @$_SESSION[EW_SESSION_WARNING_MESSAGE]; } function setWarningMessage($v) { ew_AddMessage($_SESSION[EW_SESSION_WARNING_MESSAGE], $v); } // Methods to clear message function ClearMessage() { $_SESSION[EW_SESSION_MESSAGE] = ""; } function ClearFailureMessage() { $_SESSION[EW_SESSION_FAILURE_MESSAGE] = ""; } function ClearSuccessMessage() { $_SESSION[EW_SESSION_SUCCESS_MESSAGE] = ""; } function ClearWarningMessage() { $_SESSION[EW_SESSION_WARNING_MESSAGE] = ""; } function ClearMessages() { $_SESSION[EW_SESSION_MESSAGE] = ""; $_SESSION[EW_SESSION_FAILURE_MESSAGE] = ""; $_SESSION[EW_SESSION_SUCCESS_MESSAGE] = ""; $_SESSION[EW_SESSION_WARNING_MESSAGE] = ""; } // Show message function ShowMessage() { $hidden = FALSE; $html = ""; // Message $sMessage = $this->getMessage(); if (method_exists($this, "Message_Showing")) $this->Message_Showing($sMessage, ""); if ($sMessage <> "") { // Message in Session, display if (!$hidden) $sMessage = "" . $sMessage; $html .= "
" . $sMessage . "
"; $_SESSION[EW_SESSION_MESSAGE] = ""; // Clear message in Session } // Warning message $sWarningMessage = $this->getWarningMessage(); if (method_exists($this, "Message_Showing")) $this->Message_Showing($sWarningMessage, "warning"); if ($sWarningMessage <> "") { // Message in Session, display if (!$hidden) $sWarningMessage = "" . $sWarningMessage; $html .= "
" . $sWarningMessage . "
"; $_SESSION[EW_SESSION_WARNING_MESSAGE] = ""; // Clear message in Session } // Success message $sSuccessMessage = $this->getSuccessMessage(); if (method_exists($this, "Message_Showing")) $this->Message_Showing($sSuccessMessage, "success"); if ($sSuccessMessage <> "") { // Message in Session, display if (!$hidden) $sSuccessMessage = "" . $sSuccessMessage; $html .= "
" . $sSuccessMessage . "
"; $_SESSION[EW_SESSION_SUCCESS_MESSAGE] = ""; // Clear message in Session } // Failure message $sErrorMessage = $this->getFailureMessage(); if (method_exists($this, "Message_Showing")) $this->Message_Showing($sErrorMessage, "failure"); if ($sErrorMessage <> "") { // Message in Session, display if (!$hidden) $sErrorMessage = "" . $sErrorMessage; $html .= "
" . $sErrorMessage . "
"; $_SESSION[EW_SESSION_FAILURE_MESSAGE] = ""; // Clear message in Session } echo "
" . $html . "
"; } var $PageHeader; var $PageFooter; // Show Page Header function ShowPageHeader() { $sHeader = $this->PageHeader; $this->Page_DataRendering($sHeader); if ($sHeader <> "") { // Header exists, display echo "

" . $sHeader . "

"; } } // Show Page Footer function ShowPageFooter() { $sFooter = $this->PageFooter; $this->Page_DataRendered($sFooter); if ($sFooter <> "") { // Footer exists, display echo "

" . $sFooter . "

"; } } // Validate page request function IsPageRequest() { global $objForm; if ($this->UseTokenInUrl) { if ($objForm) return ($this->TableVar == $objForm->GetValue("t")); if (@$_GET["t"] <> "") return ($this->TableVar == $_GET["t"]); } else { return TRUE; } } var $Token = ""; var $TokenTimeout = 0; var $CheckToken = EW_CHECK_TOKEN; var $CheckTokenFn = "ew_CheckToken"; var $CreateTokenFn = "ew_CreateToken"; // Valid Post function ValidPost() { if (!$this->CheckToken || !ew_IsHttpPost()) return TRUE; if (!isset($_POST[EW_TOKEN_NAME])) return FALSE; $fn = $this->CheckTokenFn; if (is_callable($fn)) return $fn($_POST[EW_TOKEN_NAME], $this->TokenTimeout); return FALSE; } // Create Token function CreateToken() { global $gsToken; if ($this->CheckToken) { $fn = $this->CreateTokenFn; if ($this->Token == "" && is_callable($fn)) // Create token $this->Token = $fn(); $gsToken = $this->Token; // Save to global variable } } // // Page class constructor // function __construct() { global $conn, $Language; global $UserTable, $UserTableConn; $GLOBALS["Page"] = &$this; $this->TokenTimeout = ew_SessionTimeoutTime(); // Language object if (!isset($Language)) $Language = new cLanguage(); // Parent constuctor parent::__construct(); // Table object (tospiti) if (!isset($GLOBALS["tospiti"]) || get_class($GLOBALS["tospiti"]) == "ctospiti") { $GLOBALS["tospiti"] = &$this; $GLOBALS["Table"] = &$GLOBALS["tospiti"]; } // Table object (users) if (!isset($GLOBALS['users'])) $GLOBALS['users'] = new cusers(); // Page ID if (!defined("EW_PAGE_ID")) define("EW_PAGE_ID", 'edit', TRUE); // Table name (for backward compatibility) if (!defined("EW_TABLE_NAME")) define("EW_TABLE_NAME", 'tospiti', TRUE); // Start timer if (!isset($GLOBALS["gTimer"])) $GLOBALS["gTimer"] = new cTimer(); // Open connection if (!isset($conn)) $conn = ew_Connect($this->DBID); // User table object (users) if (!isset($UserTable)) { $UserTable = new cusers(); $UserTableConn = Conn($UserTable->DBID); } } // // Page_Init // function Page_Init() { global $gsExport, $gsCustomExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm; // Security $Security = new cAdvancedSecurity(); if (!$Security->IsLoggedIn()) $Security->AutoLogin(); if ($Security->IsLoggedIn()) $Security->TablePermission_Loading(); $Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName); if ($Security->IsLoggedIn()) $Security->TablePermission_Loaded(); if (!$Security->CanEdit()) { $Security->SaveLastUrl(); $this->setFailureMessage(ew_DeniedMsg()); // Set no permission if ($Security->CanList()) $this->Page_Terminate(ew_GetUrl("tospitilist.php")); else $this->Page_Terminate(ew_GetUrl("login.php")); } // Create form object $objForm = new cFormObj(); $this->CurrentAction = (@$_GET["a"] <> "") ? $_GET["a"] : @$_POST["a_list"]; // Set up current action $this->Desk->SetVisibility(); $this->UNHCR_code->SetVisibility(); $this->Name->SetVisibility(); $this->Surname->SetVisibility(); $this->BirthDate->SetVisibility(); $this->BirthPlace->SetVisibility(); $this->Nationality->SetVisibility(); $this->Citizenship->SetVisibility(); $this->Sex->SetVisibility(); $this->Phone->SetVisibility(); $this->_Email->SetVisibility(); $this->Religion->SetVisibility(); $this->Place_of_Residence->SetVisibility(); $this->Address_of_Residence->SetVisibility(); $this->Town_of_residence->SetVisibility(); $this->Place_of_Transit->SetVisibility(); $this->Address_of_Transit->SetVisibility(); $this->Town_of_transit->SetVisibility(); $this->domicile_description->SetVisibility(); $this->Disabled->SetVisibility(); $this->Sick->SetVisibility(); $this->Alone->SetVisibility(); $this->Elderly->SetVisibility(); $this->Family->SetVisibility(); $this->Householder->SetVisibility(); $this->Householder_id->SetVisibility(); $this->Householder_reltype->SetVisibility(); $this->Ethnic_group->SetVisibility(); $this->Known_languages->SetVisibility(); $this->Title_of_study->SetVisibility(); $this->Poss_destination_country->SetVisibility(); $this->Document_type->SetVisibility(); $this->Document_number->SetVisibility(); $this->Document_release->SetVisibility(); $this->Document_expiry->SetVisibility(); $this->Document_nationality->SetVisibility(); $this->other_documents->SetVisibility(); $this->Final_evaluation->SetVisibility(); $this->photo->SetVisibility(); $this->doc_image->SetVisibility(); $this->Notes->SetVisibility(); $this->Interview_1->SetVisibility(); $this->interview1_date->SetVisibility(); $this->Interview_2->SetVisibility(); $this->interview_2_date->SetVisibility(); $this->Interview_3->SetVisibility(); $this->interview_3_date->SetVisibility(); $this->Zone_of_Transit->SetVisibility(); $this->Travel_number->SetVisibility(); $this->Travel_arrival_date->SetVisibility(); $this->Travel_arrival_time->SetVisibility(); $this->num_family->SetVisibility(); $this->speak_ENG->SetVisibility(); $this->speak_FRA->SetVisibility(); $this->speak_ARA->SetVisibility(); $this->speak_ITA->SetVisibility(); $this->lives_with->SetVisibility(); $this->family_know->SetVisibility(); $this->date_of_entry_transit->SetVisibility(); $this->marital_status->SetVisibility(); $this->consort_id->SetVisibility(); $this->consort_info->SetVisibility(); $this->other_fam_in_italy->SetVisibility(); $this->other_fam_in_europe->SetVisibility(); $this->where_lived->SetVisibility(); $this->medical_situation->SetVisibility(); $this->social_situation->SetVisibility(); $this->abuse_suffered->SetVisibility(); $this->abuse_description->SetVisibility(); $this->work_done->SetVisibility(); $this->military_service->SetVisibility(); $this->itinerary->SetVisibility(); $this->convictions->SetVisibility(); $this->requested_asylum->SetVisibility(); $this->resettlement_application->SetVisibility(); $this->resettlement_country->SetVisibility(); $this->reunion_application->SetVisibility(); $this->reunion_country->SetVisibility(); $this->belongs_to_organization->SetVisibility(); $this->organizations->SetVisibility(); $this->presentations->SetVisibility(); $this->report->SetVisibility(); // Global Page Loading event (in userfn*.php) Page_Loading(); // Page Load event $this->Page_Load(); // Check token if (!$this->ValidPost()) { echo $Language->Phrase("InvalidPostRequest"); $this->Page_Terminate(); exit(); } // Process auto fill if (@$_POST["ajax"] == "autofill") { // Process auto fill for detail table 'tassigment' if (@$_POST["grid"] == "ftassigmentgrid") { if (!isset($GLOBALS["tassigment_grid"])) $GLOBALS["tassigment_grid"] = new ctassigment_grid; $GLOBALS["tassigment_grid"]->Page_Init(); $this->Page_Terminate(); exit(); } $results = $this->GetAutoFill(@$_POST["name"], @$_POST["q"]); if ($results) { // Clean output buffer if (!EW_DEBUG_ENABLED && ob_get_length()) ob_end_clean(); echo $results; $this->Page_Terminate(); exit(); } } // Create Token $this->CreateToken(); } // // Page_Terminate // function Page_Terminate($url = "") { global $gsExportFile, $gTmpImages; // Page Unload event $this->Page_Unload(); // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); // Export global $EW_EXPORT, $tospiti; if ($this->CustomExport <> "" && $this->CustomExport == $this->Export && array_key_exists($this->CustomExport, $EW_EXPORT)) { $sContent = ob_get_contents(); if ($gsExportFile == "") $gsExportFile = $this->TableVar; $class = $EW_EXPORT[$this->CustomExport]; if (class_exists($class)) { $doc = new $class($tospiti); $doc->Text = $sContent; if ($this->Export == "email") echo $this->ExportEmail($doc->Text); else $doc->Export(); ew_DeleteTmpImages(); // Delete temp images exit(); } } $this->Page_Redirecting($url); // Close connection ew_CloseConn(); // Go to URL if specified if ($url <> "") { if (!EW_DEBUG_ENABLED && ob_get_length()) ob_end_clean(); // Handle modal response if ($this->IsModal) { $row = array(); $row["url"] = $url; echo ew_ArrayToJson(array($row)); } else { header("Location: " . $url); } } exit(); } var $FormClassName = "form-horizontal ewForm ewEditForm"; var $IsModal = FALSE; var $DbMasterFilter; var $DbDetailFilter; var $DisplayRecs = 1; var $StartRec; var $StopRec; var $TotalRecs = 0; var $RecRange = 10; var $Pager; var $RecCnt; var $RecKey = array(); var $Recordset; // // Page main // function Page_Main() { global $objForm, $Language, $gsFormError; global $gbSkipHeaderFooter; // Check modal $this->IsModal = (@$_GET["modal"] == "1" || @$_POST["modal"] == "1"); if ($this->IsModal) $gbSkipHeaderFooter = TRUE; // Load current record $bLoadCurrentRecord = FALSE; $sReturnUrl = ""; $bMatchRecord = FALSE; // Load key from QueryString if (@$_GET["idSeeker"] <> "") { $this->idSeeker->setQueryStringValue($_GET["idSeeker"]); $this->RecKey["idSeeker"] = $this->idSeeker->QueryStringValue; } else { $bLoadCurrentRecord = TRUE; } // Load recordset $this->StartRec = 1; // Initialize start position if ($this->Recordset = $this->LoadRecordset()) // Load records $this->TotalRecs = $this->Recordset->RecordCount(); // Get record count if ($this->TotalRecs <= 0) { // No record found if ($this->getSuccessMessage() == "" && $this->getFailureMessage() == "") $this->setFailureMessage($Language->Phrase("NoRecord")); // Set no record message $this->Page_Terminate("tospitilist.php"); // Return to list page } elseif ($bLoadCurrentRecord) { // Load current record position $this->SetUpStartRec(); // Set up start record position // Point to current record if (intval($this->StartRec) <= intval($this->TotalRecs)) { $bMatchRecord = TRUE; $this->Recordset->Move($this->StartRec-1); } } else { // Match key values while (!$this->Recordset->EOF) { if (strval($this->idSeeker->CurrentValue) == strval($this->Recordset->fields('idSeeker'))) { $this->setStartRecordNumber($this->StartRec); // Save record position $bMatchRecord = TRUE; break; } else { $this->StartRec++; $this->Recordset->MoveNext(); } } } // Process form if post back if (@$_POST["a_edit"] <> "") { $this->CurrentAction = $_POST["a_edit"]; // Get action code $this->LoadFormValues(); // Get form values // Set up detail parameters $this->SetUpDetailParms(); } else { $this->CurrentAction = "I"; // Default action is display } // Validate form if post back if (@$_POST["a_edit"] <> "") { if (!$this->ValidateForm()) { $this->CurrentAction = ""; // Form error, reset action $this->setFailureMessage($gsFormError); $this->EventCancelled = TRUE; // Event cancelled $this->RestoreFormValues(); } } switch ($this->CurrentAction) { case "I": // Get a record to display if (!$bMatchRecord) { if ($this->getSuccessMessage() == "" && $this->getFailureMessage() == "") $this->setFailureMessage($Language->Phrase("NoRecord")); // Set no record message $this->Page_Terminate("tospitilist.php"); // Return to list page } else { $this->LoadRowValues($this->Recordset); // Load row values } // Set up detail parameters $this->SetUpDetailParms(); break; Case "U": // Update $sReturnUrl = $this->GetViewUrl(); if (ew_GetPageName($sReturnUrl) == "tospitilist.php") $sReturnUrl = $this->AddMasterUrl($sReturnUrl); // List page, return to list page with correct master key if necessary $this->SendEmail = TRUE; // Send email on update success if ($this->EditRow()) { // Update record based on key if ($this->getSuccessMessage() == "") $this->setSuccessMessage($Language->Phrase("UpdateSuccess")); // Update success $this->Page_Terminate($sReturnUrl); // Return to caller } elseif ($this->getFailureMessage() == $Language->Phrase("NoRecord")) { $this->Page_Terminate($sReturnUrl); // Return to caller } else { $this->EventCancelled = TRUE; // Event cancelled $this->RestoreFormValues(); // Restore form values if update failed // Set up detail parameters $this->SetUpDetailParms(); } } // Set up Breadcrumb $this->SetupBreadcrumb(); // Render the record $this->RowType = EW_ROWTYPE_EDIT; // Render as Edit $this->ResetAttrs(); $this->RenderRow(); } // Set up starting record parameters function SetUpStartRec() { if ($this->DisplayRecs == 0) return; if ($this->IsPageRequest()) { // Validate request if (@$_GET[EW_TABLE_START_REC] <> "") { // Check for "start" parameter $this->StartRec = $_GET[EW_TABLE_START_REC]; $this->setStartRecordNumber($this->StartRec); } elseif (@$_GET[EW_TABLE_PAGE_NO] <> "") { $PageNo = $_GET[EW_TABLE_PAGE_NO]; if (is_numeric($PageNo)) { $this->StartRec = ($PageNo-1)*$this->DisplayRecs+1; if ($this->StartRec <= 0) { $this->StartRec = 1; } elseif ($this->StartRec >= intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1) { $this->StartRec = intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1; } $this->setStartRecordNumber($this->StartRec); } } } $this->StartRec = $this->getStartRecordNumber(); // Check if correct start record counter if (!is_numeric($this->StartRec) || $this->StartRec == "") { // Avoid invalid start record counter $this->StartRec = 1; // Reset start record counter $this->setStartRecordNumber($this->StartRec); } elseif (intval($this->StartRec) > intval($this->TotalRecs)) { // Avoid starting record > total records $this->StartRec = intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1; // Point to last page first record $this->setStartRecordNumber($this->StartRec); } elseif (($this->StartRec-1) % $this->DisplayRecs <> 0) { $this->StartRec = intval(($this->StartRec-1)/$this->DisplayRecs)*$this->DisplayRecs+1; // Point to page boundary $this->setStartRecordNumber($this->StartRec); } } // Get upload files function GetUploadFiles() { global $objForm, $Language; // Get upload data $this->photo->Upload->Index = $objForm->Index; $this->photo->Upload->UploadFile(); $this->photo->CurrentValue = $this->photo->Upload->FileName; $this->doc_image->Upload->Index = $objForm->Index; $this->doc_image->Upload->UploadFile(); $this->doc_image->CurrentValue = $this->doc_image->Upload->FileName; } // Load form values function LoadFormValues() { // Load from form global $objForm; $this->GetUploadFiles(); // Get upload files if (!$this->Desk->FldIsDetailKey) { $this->Desk->setFormValue($objForm->GetValue("x_Desk")); } if (!$this->UNHCR_code->FldIsDetailKey) { $this->UNHCR_code->setFormValue($objForm->GetValue("x_UNHCR_code")); } if (!$this->Name->FldIsDetailKey) { $this->Name->setFormValue($objForm->GetValue("x_Name")); } if (!$this->Surname->FldIsDetailKey) { $this->Surname->setFormValue($objForm->GetValue("x_Surname")); } if (!$this->BirthDate->FldIsDetailKey) { $this->BirthDate->setFormValue($objForm->GetValue("x_BirthDate")); $this->BirthDate->CurrentValue = ew_UnFormatDateTime($this->BirthDate->CurrentValue, 7); } if (!$this->BirthPlace->FldIsDetailKey) { $this->BirthPlace->setFormValue($objForm->GetValue("x_BirthPlace")); } if (!$this->Nationality->FldIsDetailKey) { $this->Nationality->setFormValue($objForm->GetValue("x_Nationality")); } if (!$this->Citizenship->FldIsDetailKey) { $this->Citizenship->setFormValue($objForm->GetValue("x_Citizenship")); } if (!$this->Sex->FldIsDetailKey) { $this->Sex->setFormValue($objForm->GetValue("x_Sex")); } if (!$this->Phone->FldIsDetailKey) { $this->Phone->setFormValue($objForm->GetValue("x_Phone")); } if (!$this->_Email->FldIsDetailKey) { $this->_Email->setFormValue($objForm->GetValue("x__Email")); } if (!$this->Religion->FldIsDetailKey) { $this->Religion->setFormValue($objForm->GetValue("x_Religion")); } if (!$this->Place_of_Residence->FldIsDetailKey) { $this->Place_of_Residence->setFormValue($objForm->GetValue("x_Place_of_Residence")); } if (!$this->Address_of_Residence->FldIsDetailKey) { $this->Address_of_Residence->setFormValue($objForm->GetValue("x_Address_of_Residence")); } if (!$this->Town_of_residence->FldIsDetailKey) { $this->Town_of_residence->setFormValue($objForm->GetValue("x_Town_of_residence")); } if (!$this->Place_of_Transit->FldIsDetailKey) { $this->Place_of_Transit->setFormValue($objForm->GetValue("x_Place_of_Transit")); } if (!$this->Address_of_Transit->FldIsDetailKey) { $this->Address_of_Transit->setFormValue($objForm->GetValue("x_Address_of_Transit")); } if (!$this->Town_of_transit->FldIsDetailKey) { $this->Town_of_transit->setFormValue($objForm->GetValue("x_Town_of_transit")); } if (!$this->domicile_description->FldIsDetailKey) { $this->domicile_description->setFormValue($objForm->GetValue("x_domicile_description")); } if (!$this->Disabled->FldIsDetailKey) { $this->Disabled->setFormValue($objForm->GetValue("x_Disabled")); } if (!$this->Sick->FldIsDetailKey) { $this->Sick->setFormValue($objForm->GetValue("x_Sick")); } if (!$this->Alone->FldIsDetailKey) { $this->Alone->setFormValue($objForm->GetValue("x_Alone")); } if (!$this->Elderly->FldIsDetailKey) { $this->Elderly->setFormValue($objForm->GetValue("x_Elderly")); } if (!$this->Family->FldIsDetailKey) { $this->Family->setFormValue($objForm->GetValue("x_Family")); } if (!$this->Householder->FldIsDetailKey) { $this->Householder->setFormValue($objForm->GetValue("x_Householder")); } if (!$this->Householder_id->FldIsDetailKey) { $this->Householder_id->setFormValue($objForm->GetValue("x_Householder_id")); } if (!$this->Householder_reltype->FldIsDetailKey) { $this->Householder_reltype->setFormValue($objForm->GetValue("x_Householder_reltype")); } if (!$this->Ethnic_group->FldIsDetailKey) { $this->Ethnic_group->setFormValue($objForm->GetValue("x_Ethnic_group")); } if (!$this->Known_languages->FldIsDetailKey) { $this->Known_languages->setFormValue($objForm->GetValue("x_Known_languages")); } if (!$this->Title_of_study->FldIsDetailKey) { $this->Title_of_study->setFormValue($objForm->GetValue("x_Title_of_study")); } if (!$this->Poss_destination_country->FldIsDetailKey) { $this->Poss_destination_country->setFormValue($objForm->GetValue("x_Poss_destination_country")); } if (!$this->Document_type->FldIsDetailKey) { $this->Document_type->setFormValue($objForm->GetValue("x_Document_type")); } if (!$this->Document_number->FldIsDetailKey) { $this->Document_number->setFormValue($objForm->GetValue("x_Document_number")); } if (!$this->Document_release->FldIsDetailKey) { $this->Document_release->setFormValue($objForm->GetValue("x_Document_release")); $this->Document_release->CurrentValue = ew_UnFormatDateTime($this->Document_release->CurrentValue, 7); } if (!$this->Document_expiry->FldIsDetailKey) { $this->Document_expiry->setFormValue($objForm->GetValue("x_Document_expiry")); $this->Document_expiry->CurrentValue = ew_UnFormatDateTime($this->Document_expiry->CurrentValue, 7); } if (!$this->Document_nationality->FldIsDetailKey) { $this->Document_nationality->setFormValue($objForm->GetValue("x_Document_nationality")); } if (!$this->other_documents->FldIsDetailKey) { $this->other_documents->setFormValue($objForm->GetValue("x_other_documents")); } if (!$this->Final_evaluation->FldIsDetailKey) { $this->Final_evaluation->setFormValue($objForm->GetValue("x_Final_evaluation")); } if (!$this->Notes->FldIsDetailKey) { $this->Notes->setFormValue($objForm->GetValue("x_Notes")); } if (!$this->Interview_1->FldIsDetailKey) { $this->Interview_1->setFormValue($objForm->GetValue("x_Interview_1")); } if (!$this->interview1_date->FldIsDetailKey) { $this->interview1_date->setFormValue($objForm->GetValue("x_interview1_date")); $this->interview1_date->CurrentValue = ew_UnFormatDateTime($this->interview1_date->CurrentValue, 0); } if (!$this->Interview_2->FldIsDetailKey) { $this->Interview_2->setFormValue($objForm->GetValue("x_Interview_2")); } if (!$this->interview_2_date->FldIsDetailKey) { $this->interview_2_date->setFormValue($objForm->GetValue("x_interview_2_date")); $this->interview_2_date->CurrentValue = ew_UnFormatDateTime($this->interview_2_date->CurrentValue, 0); } if (!$this->Interview_3->FldIsDetailKey) { $this->Interview_3->setFormValue($objForm->GetValue("x_Interview_3")); } if (!$this->interview_3_date->FldIsDetailKey) { $this->interview_3_date->setFormValue($objForm->GetValue("x_interview_3_date")); $this->interview_3_date->CurrentValue = ew_UnFormatDateTime($this->interview_3_date->CurrentValue, 0); } if (!$this->Zone_of_Transit->FldIsDetailKey) { $this->Zone_of_Transit->setFormValue($objForm->GetValue("x_Zone_of_Transit")); } if (!$this->Travel_number->FldIsDetailKey) { $this->Travel_number->setFormValue($objForm->GetValue("x_Travel_number")); } if (!$this->Travel_arrival_date->FldIsDetailKey) { $this->Travel_arrival_date->setFormValue($objForm->GetValue("x_Travel_arrival_date")); $this->Travel_arrival_date->CurrentValue = ew_UnFormatDateTime($this->Travel_arrival_date->CurrentValue, 0); } if (!$this->Travel_arrival_time->FldIsDetailKey) { $this->Travel_arrival_time->setFormValue($objForm->GetValue("x_Travel_arrival_time")); $this->Travel_arrival_time->CurrentValue = ew_UnFormatDateTime($this->Travel_arrival_time->CurrentValue, 4); } if (!$this->num_family->FldIsDetailKey) { $this->num_family->setFormValue($objForm->GetValue("x_num_family")); } if (!$this->speak_ENG->FldIsDetailKey) { $this->speak_ENG->setFormValue($objForm->GetValue("x_speak_ENG")); } if (!$this->speak_FRA->FldIsDetailKey) { $this->speak_FRA->setFormValue($objForm->GetValue("x_speak_FRA")); } if (!$this->speak_ARA->FldIsDetailKey) { $this->speak_ARA->setFormValue($objForm->GetValue("x_speak_ARA")); } if (!$this->speak_ITA->FldIsDetailKey) { $this->speak_ITA->setFormValue($objForm->GetValue("x_speak_ITA")); } if (!$this->lives_with->FldIsDetailKey) { $this->lives_with->setFormValue($objForm->GetValue("x_lives_with")); } if (!$this->family_know->FldIsDetailKey) { $this->family_know->setFormValue($objForm->GetValue("x_family_know")); } if (!$this->date_of_entry_transit->FldIsDetailKey) { $this->date_of_entry_transit->setFormValue($objForm->GetValue("x_date_of_entry_transit")); $this->date_of_entry_transit->CurrentValue = ew_UnFormatDateTime($this->date_of_entry_transit->CurrentValue, 0); } if (!$this->marital_status->FldIsDetailKey) { $this->marital_status->setFormValue($objForm->GetValue("x_marital_status")); } if (!$this->consort_id->FldIsDetailKey) { $this->consort_id->setFormValue($objForm->GetValue("x_consort_id")); } if (!$this->consort_info->FldIsDetailKey) { $this->consort_info->setFormValue($objForm->GetValue("x_consort_info")); } if (!$this->other_fam_in_italy->FldIsDetailKey) { $this->other_fam_in_italy->setFormValue($objForm->GetValue("x_other_fam_in_italy")); } if (!$this->other_fam_in_europe->FldIsDetailKey) { $this->other_fam_in_europe->setFormValue($objForm->GetValue("x_other_fam_in_europe")); } if (!$this->where_lived->FldIsDetailKey) { $this->where_lived->setFormValue($objForm->GetValue("x_where_lived")); } if (!$this->medical_situation->FldIsDetailKey) { $this->medical_situation->setFormValue($objForm->GetValue("x_medical_situation")); } if (!$this->social_situation->FldIsDetailKey) { $this->social_situation->setFormValue($objForm->GetValue("x_social_situation")); } if (!$this->abuse_suffered->FldIsDetailKey) { $this->abuse_suffered->setFormValue($objForm->GetValue("x_abuse_suffered")); } if (!$this->abuse_description->FldIsDetailKey) { $this->abuse_description->setFormValue($objForm->GetValue("x_abuse_description")); } if (!$this->work_done->FldIsDetailKey) { $this->work_done->setFormValue($objForm->GetValue("x_work_done")); } if (!$this->military_service->FldIsDetailKey) { $this->military_service->setFormValue($objForm->GetValue("x_military_service")); } if (!$this->itinerary->FldIsDetailKey) { $this->itinerary->setFormValue($objForm->GetValue("x_itinerary")); } if (!$this->convictions->FldIsDetailKey) { $this->convictions->setFormValue($objForm->GetValue("x_convictions")); } if (!$this->requested_asylum->FldIsDetailKey) { $this->requested_asylum->setFormValue($objForm->GetValue("x_requested_asylum")); } if (!$this->resettlement_application->FldIsDetailKey) { $this->resettlement_application->setFormValue($objForm->GetValue("x_resettlement_application")); } if (!$this->resettlement_country->FldIsDetailKey) { $this->resettlement_country->setFormValue($objForm->GetValue("x_resettlement_country")); } if (!$this->reunion_application->FldIsDetailKey) { $this->reunion_application->setFormValue($objForm->GetValue("x_reunion_application")); } if (!$this->reunion_country->FldIsDetailKey) { $this->reunion_country->setFormValue($objForm->GetValue("x_reunion_country")); } if (!$this->belongs_to_organization->FldIsDetailKey) { $this->belongs_to_organization->setFormValue($objForm->GetValue("x_belongs_to_organization")); } if (!$this->organizations->FldIsDetailKey) { $this->organizations->setFormValue($objForm->GetValue("x_organizations")); } if (!$this->presentations->FldIsDetailKey) { $this->presentations->setFormValue($objForm->GetValue("x_presentations")); } if (!$this->report->FldIsDetailKey) { $this->report->setFormValue($objForm->GetValue("x_report")); } if (!$this->idSeeker->FldIsDetailKey) $this->idSeeker->setFormValue($objForm->GetValue("x_idSeeker")); } // Restore form values function RestoreFormValues() { global $objForm; $this->LoadRow(); $this->idSeeker->CurrentValue = $this->idSeeker->FormValue; $this->Desk->CurrentValue = $this->Desk->FormValue; $this->UNHCR_code->CurrentValue = $this->UNHCR_code->FormValue; $this->Name->CurrentValue = $this->Name->FormValue; $this->Surname->CurrentValue = $this->Surname->FormValue; $this->BirthDate->CurrentValue = $this->BirthDate->FormValue; $this->BirthDate->CurrentValue = ew_UnFormatDateTime($this->BirthDate->CurrentValue, 7); $this->BirthPlace->CurrentValue = $this->BirthPlace->FormValue; $this->Nationality->CurrentValue = $this->Nationality->FormValue; $this->Citizenship->CurrentValue = $this->Citizenship->FormValue; $this->Sex->CurrentValue = $this->Sex->FormValue; $this->Phone->CurrentValue = $this->Phone->FormValue; $this->_Email->CurrentValue = $this->_Email->FormValue; $this->Religion->CurrentValue = $this->Religion->FormValue; $this->Place_of_Residence->CurrentValue = $this->Place_of_Residence->FormValue; $this->Address_of_Residence->CurrentValue = $this->Address_of_Residence->FormValue; $this->Town_of_residence->CurrentValue = $this->Town_of_residence->FormValue; $this->Place_of_Transit->CurrentValue = $this->Place_of_Transit->FormValue; $this->Address_of_Transit->CurrentValue = $this->Address_of_Transit->FormValue; $this->Town_of_transit->CurrentValue = $this->Town_of_transit->FormValue; $this->domicile_description->CurrentValue = $this->domicile_description->FormValue; $this->Disabled->CurrentValue = $this->Disabled->FormValue; $this->Sick->CurrentValue = $this->Sick->FormValue; $this->Alone->CurrentValue = $this->Alone->FormValue; $this->Elderly->CurrentValue = $this->Elderly->FormValue; $this->Family->CurrentValue = $this->Family->FormValue; $this->Householder->CurrentValue = $this->Householder->FormValue; $this->Householder_id->CurrentValue = $this->Householder_id->FormValue; $this->Householder_reltype->CurrentValue = $this->Householder_reltype->FormValue; $this->Ethnic_group->CurrentValue = $this->Ethnic_group->FormValue; $this->Known_languages->CurrentValue = $this->Known_languages->FormValue; $this->Title_of_study->CurrentValue = $this->Title_of_study->FormValue; $this->Poss_destination_country->CurrentValue = $this->Poss_destination_country->FormValue; $this->Document_type->CurrentValue = $this->Document_type->FormValue; $this->Document_number->CurrentValue = $this->Document_number->FormValue; $this->Document_release->CurrentValue = $this->Document_release->FormValue; $this->Document_release->CurrentValue = ew_UnFormatDateTime($this->Document_release->CurrentValue, 7); $this->Document_expiry->CurrentValue = $this->Document_expiry->FormValue; $this->Document_expiry->CurrentValue = ew_UnFormatDateTime($this->Document_expiry->CurrentValue, 7); $this->Document_nationality->CurrentValue = $this->Document_nationality->FormValue; $this->other_documents->CurrentValue = $this->other_documents->FormValue; $this->Final_evaluation->CurrentValue = $this->Final_evaluation->FormValue; $this->Notes->CurrentValue = $this->Notes->FormValue; $this->Interview_1->CurrentValue = $this->Interview_1->FormValue; $this->interview1_date->CurrentValue = $this->interview1_date->FormValue; $this->interview1_date->CurrentValue = ew_UnFormatDateTime($this->interview1_date->CurrentValue, 0); $this->Interview_2->CurrentValue = $this->Interview_2->FormValue; $this->interview_2_date->CurrentValue = $this->interview_2_date->FormValue; $this->interview_2_date->CurrentValue = ew_UnFormatDateTime($this->interview_2_date->CurrentValue, 0); $this->Interview_3->CurrentValue = $this->Interview_3->FormValue; $this->interview_3_date->CurrentValue = $this->interview_3_date->FormValue; $this->interview_3_date->CurrentValue = ew_UnFormatDateTime($this->interview_3_date->CurrentValue, 0); $this->Zone_of_Transit->CurrentValue = $this->Zone_of_Transit->FormValue; $this->Travel_number->CurrentValue = $this->Travel_number->FormValue; $this->Travel_arrival_date->CurrentValue = $this->Travel_arrival_date->FormValue; $this->Travel_arrival_date->CurrentValue = ew_UnFormatDateTime($this->Travel_arrival_date->CurrentValue, 0); $this->Travel_arrival_time->CurrentValue = $this->Travel_arrival_time->FormValue; $this->Travel_arrival_time->CurrentValue = ew_UnFormatDateTime($this->Travel_arrival_time->CurrentValue, 4); $this->num_family->CurrentValue = $this->num_family->FormValue; $this->speak_ENG->CurrentValue = $this->speak_ENG->FormValue; $this->speak_FRA->CurrentValue = $this->speak_FRA->FormValue; $this->speak_ARA->CurrentValue = $this->speak_ARA->FormValue; $this->speak_ITA->CurrentValue = $this->speak_ITA->FormValue; $this->lives_with->CurrentValue = $this->lives_with->FormValue; $this->family_know->CurrentValue = $this->family_know->FormValue; $this->date_of_entry_transit->CurrentValue = $this->date_of_entry_transit->FormValue; $this->date_of_entry_transit->CurrentValue = ew_UnFormatDateTime($this->date_of_entry_transit->CurrentValue, 0); $this->marital_status->CurrentValue = $this->marital_status->FormValue; $this->consort_id->CurrentValue = $this->consort_id->FormValue; $this->consort_info->CurrentValue = $this->consort_info->FormValue; $this->other_fam_in_italy->CurrentValue = $this->other_fam_in_italy->FormValue; $this->other_fam_in_europe->CurrentValue = $this->other_fam_in_europe->FormValue; $this->where_lived->CurrentValue = $this->where_lived->FormValue; $this->medical_situation->CurrentValue = $this->medical_situation->FormValue; $this->social_situation->CurrentValue = $this->social_situation->FormValue; $this->abuse_suffered->CurrentValue = $this->abuse_suffered->FormValue; $this->abuse_description->CurrentValue = $this->abuse_description->FormValue; $this->work_done->CurrentValue = $this->work_done->FormValue; $this->military_service->CurrentValue = $this->military_service->FormValue; $this->itinerary->CurrentValue = $this->itinerary->FormValue; $this->convictions->CurrentValue = $this->convictions->FormValue; $this->requested_asylum->CurrentValue = $this->requested_asylum->FormValue; $this->resettlement_application->CurrentValue = $this->resettlement_application->FormValue; $this->resettlement_country->CurrentValue = $this->resettlement_country->FormValue; $this->reunion_application->CurrentValue = $this->reunion_application->FormValue; $this->reunion_country->CurrentValue = $this->reunion_country->FormValue; $this->belongs_to_organization->CurrentValue = $this->belongs_to_organization->FormValue; $this->organizations->CurrentValue = $this->organizations->FormValue; $this->presentations->CurrentValue = $this->presentations->FormValue; $this->report->CurrentValue = $this->report->FormValue; } // Load recordset function LoadRecordset($offset = -1, $rowcnt = -1) { // Load List page SQL $sSql = $this->SelectSQL(); $conn = &$this->Connection(); // Load recordset $dbtype = ew_GetConnectionType($this->DBID); if ($this->UseSelectLimit) { $conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"]; if ($dbtype == "MSSQL") { $rs = $conn->SelectLimit($sSql, $rowcnt, $offset, array("_hasOrderBy" => trim($this->getOrderBy()) || trim($this->getSessionOrderByList()))); } else { $rs = $conn->SelectLimit($sSql, $rowcnt, $offset); } $conn->raiseErrorFn = ''; } else { $rs = ew_LoadRecordset($sSql, $conn); } // Call Recordset Selected event $this->Recordset_Selected($rs); return $rs; } // Load row based on key values function LoadRow() { global $Security, $Language; $sFilter = $this->KeyFilter(); // Call Row Selecting event $this->Row_Selecting($sFilter); // Load SQL based on filter $this->CurrentFilter = $sFilter; $sSql = $this->SQL(); $conn = &$this->Connection(); $res = FALSE; $rs = ew_LoadRecordset($sSql, $conn); if ($rs && !$rs->EOF) { $res = TRUE; $this->LoadRowValues($rs); // Load row values $rs->Close(); } return $res; } // Load row values from recordset function LoadRowValues(&$rs) { if (!$rs || $rs->EOF) return; // Call Row Selected event $row = &$rs->fields; $this->Row_Selected($row); $this->idSeeker->setDbValue($rs->fields('idSeeker')); $this->Desk->setDbValue($rs->fields('Desk')); $this->UNHCR_code->setDbValue($rs->fields('UNHCR_code')); $this->Name->setDbValue($rs->fields('Name')); $this->Surname->setDbValue($rs->fields('Surname')); $this->BirthDate->setDbValue($rs->fields('BirthDate')); $this->BirthPlace->setDbValue($rs->fields('BirthPlace')); $this->Nationality->setDbValue($rs->fields('Nationality')); if (array_key_exists('EV__Nationality', $rs->fields)) { $this->Nationality->VirtualValue = $rs->fields('EV__Nationality'); // Set up virtual field value } else { $this->Nationality->VirtualValue = ""; // Clear value } $this->Citizenship->setDbValue($rs->fields('Citizenship')); if (array_key_exists('EV__Citizenship', $rs->fields)) { $this->Citizenship->VirtualValue = $rs->fields('EV__Citizenship'); // Set up virtual field value } else { $this->Citizenship->VirtualValue = ""; // Clear value } $this->Sex->setDbValue($rs->fields('Sex')); $this->Phone->setDbValue($rs->fields('Phone')); $this->_Email->setDbValue($rs->fields('Email')); $this->Religion->setDbValue($rs->fields('Religion')); $this->Place_of_Residence->setDbValue($rs->fields('Place_of_Residence')); if (array_key_exists('EV__Place_of_Residence', $rs->fields)) { $this->Place_of_Residence->VirtualValue = $rs->fields('EV__Place_of_Residence'); // Set up virtual field value } else { $this->Place_of_Residence->VirtualValue = ""; // Clear value } $this->Address_of_Residence->setDbValue($rs->fields('Address_of_Residence')); $this->Town_of_residence->setDbValue($rs->fields('Town_of_residence')); $this->Place_of_Transit->setDbValue($rs->fields('Place_of_Transit')); if (array_key_exists('EV__Place_of_Transit', $rs->fields)) { $this->Place_of_Transit->VirtualValue = $rs->fields('EV__Place_of_Transit'); // Set up virtual field value } else { $this->Place_of_Transit->VirtualValue = ""; // Clear value } $this->Address_of_Transit->setDbValue($rs->fields('Address_of_Transit')); $this->Town_of_transit->setDbValue($rs->fields('Town_of_transit')); $this->domicile_description->setDbValue($rs->fields('domicile_description')); $this->Disabled->setDbValue($rs->fields('Disabled')); $this->Sick->setDbValue($rs->fields('Sick')); $this->Alone->setDbValue($rs->fields('Alone')); $this->Elderly->setDbValue($rs->fields('Elderly')); $this->Family->setDbValue($rs->fields('Family')); $this->Householder->setDbValue($rs->fields('Householder')); $this->Householder_id->setDbValue($rs->fields('Householder_id')); if (array_key_exists('EV__Householder_id', $rs->fields)) { $this->Householder_id->VirtualValue = $rs->fields('EV__Householder_id'); // Set up virtual field value } else { $this->Householder_id->VirtualValue = ""; // Clear value } $this->Householder_reltype->setDbValue($rs->fields('Householder_reltype')); $this->Ethnic_group->setDbValue($rs->fields('Ethnic_group')); $this->Known_languages->setDbValue($rs->fields('Known_languages')); $this->Title_of_study->setDbValue($rs->fields('Title_of_study')); $this->Poss_destination_country->setDbValue($rs->fields('Poss_destination_country')); $this->Document_type->setDbValue($rs->fields('Document_type')); $this->Document_number->setDbValue($rs->fields('Document_number')); $this->Document_release->setDbValue($rs->fields('Document_release')); $this->Document_expiry->setDbValue($rs->fields('Document_expiry')); $this->Document_nationality->setDbValue($rs->fields('Document_nationality')); if (array_key_exists('EV__Document_nationality', $rs->fields)) { $this->Document_nationality->VirtualValue = $rs->fields('EV__Document_nationality'); // Set up virtual field value } else { $this->Document_nationality->VirtualValue = ""; // Clear value } $this->other_documents->setDbValue($rs->fields('other_documents')); $this->Final_evaluation->setDbValue($rs->fields('Final_evaluation')); $this->photo->Upload->DbValue = $rs->fields('photo'); $this->photo->CurrentValue = $this->photo->Upload->DbValue; $this->doc_image->Upload->DbValue = $rs->fields('doc_image'); $this->doc_image->CurrentValue = $this->doc_image->Upload->DbValue; $this->Notes->setDbValue($rs->fields('Notes')); $this->Interview_1->setDbValue($rs->fields('Interview_1')); $this->interview1_date->setDbValue($rs->fields('interview1_date')); $this->Interview_2->setDbValue($rs->fields('Interview_2')); $this->interview_2_date->setDbValue($rs->fields('interview_2_date')); $this->Interview_3->setDbValue($rs->fields('Interview_3')); $this->interview_3_date->setDbValue($rs->fields('interview_3_date')); $this->Zone_of_Transit->setDbValue($rs->fields('Zone_of_Transit')); $this->Travel_number->setDbValue($rs->fields('Travel_number')); $this->Travel_arrival_date->setDbValue($rs->fields('Travel_arrival_date')); $this->Travel_arrival_time->setDbValue($rs->fields('Travel_arrival_time')); $this->num_family->setDbValue($rs->fields('num_family')); $this->speak_ENG->setDbValue($rs->fields('speak_ENG')); $this->speak_FRA->setDbValue($rs->fields('speak_FRA')); $this->speak_ARA->setDbValue($rs->fields('speak_ARA')); $this->speak_ITA->setDbValue($rs->fields('speak_ITA')); $this->lives_with->setDbValue($rs->fields('lives_with')); $this->family_know->setDbValue($rs->fields('family_know')); $this->date_of_entry_transit->setDbValue($rs->fields('date_of_entry_transit')); $this->marital_status->setDbValue($rs->fields('marital_status')); $this->consort_id->setDbValue($rs->fields('consort_id')); $this->consort_info->setDbValue($rs->fields('consort_info')); $this->other_fam_in_italy->setDbValue($rs->fields('other_fam_in_italy')); $this->other_fam_in_europe->setDbValue($rs->fields('other_fam_in_europe')); $this->where_lived->setDbValue($rs->fields('where_lived')); $this->medical_situation->setDbValue($rs->fields('medical_situation')); $this->social_situation->setDbValue($rs->fields('social_situation')); $this->abuse_suffered->setDbValue($rs->fields('abuse_suffered')); $this->abuse_description->setDbValue($rs->fields('abuse_description')); $this->work_done->setDbValue($rs->fields('work_done')); $this->military_service->setDbValue($rs->fields('military_service')); $this->itinerary->setDbValue($rs->fields('itinerary')); $this->convictions->setDbValue($rs->fields('convictions')); $this->requested_asylum->setDbValue($rs->fields('requested_asylum')); $this->resettlement_application->setDbValue($rs->fields('resettlement_application')); $this->resettlement_country->setDbValue($rs->fields('resettlement_country')); $this->reunion_application->setDbValue($rs->fields('reunion_application')); $this->reunion_country->setDbValue($rs->fields('reunion_country')); $this->belongs_to_organization->setDbValue($rs->fields('belongs_to_organization')); $this->organizations->setDbValue($rs->fields('organizations')); $this->presentations->setDbValue($rs->fields('presentations')); $this->report->setDbValue($rs->fields('report')); } // Load DbValue from recordset function LoadDbValues(&$rs) { if (!$rs || !is_array($rs) && $rs->EOF) return; $row = is_array($rs) ? $rs : $rs->fields; $this->idSeeker->DbValue = $row['idSeeker']; $this->Desk->DbValue = $row['Desk']; $this->UNHCR_code->DbValue = $row['UNHCR_code']; $this->Name->DbValue = $row['Name']; $this->Surname->DbValue = $row['Surname']; $this->BirthDate->DbValue = $row['BirthDate']; $this->BirthPlace->DbValue = $row['BirthPlace']; $this->Nationality->DbValue = $row['Nationality']; $this->Citizenship->DbValue = $row['Citizenship']; $this->Sex->DbValue = $row['Sex']; $this->Phone->DbValue = $row['Phone']; $this->_Email->DbValue = $row['Email']; $this->Religion->DbValue = $row['Religion']; $this->Place_of_Residence->DbValue = $row['Place_of_Residence']; $this->Address_of_Residence->DbValue = $row['Address_of_Residence']; $this->Town_of_residence->DbValue = $row['Town_of_residence']; $this->Place_of_Transit->DbValue = $row['Place_of_Transit']; $this->Address_of_Transit->DbValue = $row['Address_of_Transit']; $this->Town_of_transit->DbValue = $row['Town_of_transit']; $this->domicile_description->DbValue = $row['domicile_description']; $this->Disabled->DbValue = $row['Disabled']; $this->Sick->DbValue = $row['Sick']; $this->Alone->DbValue = $row['Alone']; $this->Elderly->DbValue = $row['Elderly']; $this->Family->DbValue = $row['Family']; $this->Householder->DbValue = $row['Householder']; $this->Householder_id->DbValue = $row['Householder_id']; $this->Householder_reltype->DbValue = $row['Householder_reltype']; $this->Ethnic_group->DbValue = $row['Ethnic_group']; $this->Known_languages->DbValue = $row['Known_languages']; $this->Title_of_study->DbValue = $row['Title_of_study']; $this->Poss_destination_country->DbValue = $row['Poss_destination_country']; $this->Document_type->DbValue = $row['Document_type']; $this->Document_number->DbValue = $row['Document_number']; $this->Document_release->DbValue = $row['Document_release']; $this->Document_expiry->DbValue = $row['Document_expiry']; $this->Document_nationality->DbValue = $row['Document_nationality']; $this->other_documents->DbValue = $row['other_documents']; $this->Final_evaluation->DbValue = $row['Final_evaluation']; $this->photo->Upload->DbValue = $row['photo']; $this->doc_image->Upload->DbValue = $row['doc_image']; $this->Notes->DbValue = $row['Notes']; $this->Interview_1->DbValue = $row['Interview_1']; $this->interview1_date->DbValue = $row['interview1_date']; $this->Interview_2->DbValue = $row['Interview_2']; $this->interview_2_date->DbValue = $row['interview_2_date']; $this->Interview_3->DbValue = $row['Interview_3']; $this->interview_3_date->DbValue = $row['interview_3_date']; $this->Zone_of_Transit->DbValue = $row['Zone_of_Transit']; $this->Travel_number->DbValue = $row['Travel_number']; $this->Travel_arrival_date->DbValue = $row['Travel_arrival_date']; $this->Travel_arrival_time->DbValue = $row['Travel_arrival_time']; $this->num_family->DbValue = $row['num_family']; $this->speak_ENG->DbValue = $row['speak_ENG']; $this->speak_FRA->DbValue = $row['speak_FRA']; $this->speak_ARA->DbValue = $row['speak_ARA']; $this->speak_ITA->DbValue = $row['speak_ITA']; $this->lives_with->DbValue = $row['lives_with']; $this->family_know->DbValue = $row['family_know']; $this->date_of_entry_transit->DbValue = $row['date_of_entry_transit']; $this->marital_status->DbValue = $row['marital_status']; $this->consort_id->DbValue = $row['consort_id']; $this->consort_info->DbValue = $row['consort_info']; $this->other_fam_in_italy->DbValue = $row['other_fam_in_italy']; $this->other_fam_in_europe->DbValue = $row['other_fam_in_europe']; $this->where_lived->DbValue = $row['where_lived']; $this->medical_situation->DbValue = $row['medical_situation']; $this->social_situation->DbValue = $row['social_situation']; $this->abuse_suffered->DbValue = $row['abuse_suffered']; $this->abuse_description->DbValue = $row['abuse_description']; $this->work_done->DbValue = $row['work_done']; $this->military_service->DbValue = $row['military_service']; $this->itinerary->DbValue = $row['itinerary']; $this->convictions->DbValue = $row['convictions']; $this->requested_asylum->DbValue = $row['requested_asylum']; $this->resettlement_application->DbValue = $row['resettlement_application']; $this->resettlement_country->DbValue = $row['resettlement_country']; $this->reunion_application->DbValue = $row['reunion_application']; $this->reunion_country->DbValue = $row['reunion_country']; $this->belongs_to_organization->DbValue = $row['belongs_to_organization']; $this->organizations->DbValue = $row['organizations']; $this->presentations->DbValue = $row['presentations']; $this->report->DbValue = $row['report']; } // Render row values based on field settings function RenderRow() { global $Security, $Language, $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // idSeeker // Desk // UNHCR_code // Name // Surname // BirthDate // BirthPlace // Nationality // Citizenship // Sex // Phone // Email // Religion // Place_of_Residence // Address_of_Residence // Town_of_residence // Place_of_Transit // Address_of_Transit // Town_of_transit // domicile_description // Disabled // Sick // Alone // Elderly // Family // Householder // Householder_id // Householder_reltype // Ethnic_group // Known_languages // Title_of_study // Poss_destination_country // Document_type // Document_number // Document_release // Document_expiry // Document_nationality // other_documents // Final_evaluation // photo // doc_image // Notes // Interview_1 // interview1_date // Interview_2 // interview_2_date // Interview_3 // interview_3_date // Zone_of_Transit // Travel_number // Travel_arrival_date // Travel_arrival_time // num_family // speak_ENG // speak_FRA // speak_ARA // speak_ITA // lives_with // family_know // date_of_entry_transit // marital_status // consort_id // consort_info // other_fam_in_italy // other_fam_in_europe // where_lived // medical_situation // social_situation // abuse_suffered // abuse_description // work_done // military_service // itinerary // convictions // requested_asylum // resettlement_application // resettlement_country // reunion_application // reunion_country // belongs_to_organization // organizations // presentations // report if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // idSeeker $this->idSeeker->ViewValue = $this->idSeeker->CurrentValue; $this->idSeeker->ViewCustomAttributes = ""; // Desk $this->Desk->ViewValue = $this->Desk->CurrentValue; $this->Desk->ViewCustomAttributes = ""; // UNHCR_code $this->UNHCR_code->ViewValue = $this->UNHCR_code->CurrentValue; $this->UNHCR_code->ViewCustomAttributes = ""; // Name $this->Name->ViewValue = $this->Name->CurrentValue; $this->Name->ViewCustomAttributes = ""; // Surname $this->Surname->ViewValue = $this->Surname->CurrentValue; $this->Surname->ViewCustomAttributes = ""; // BirthDate $this->BirthDate->ViewValue = $this->BirthDate->CurrentValue; $this->BirthDate->ViewValue = ew_FormatDateTime($this->BirthDate->ViewValue, 7); $this->BirthDate->ViewCustomAttributes = ""; // BirthPlace $this->BirthPlace->ViewValue = $this->BirthPlace->CurrentValue; $this->BirthPlace->ViewCustomAttributes = ""; // Nationality if ($this->Nationality->VirtualValue <> "") { $this->Nationality->ViewValue = $this->Nationality->VirtualValue; } else { $this->Nationality->ViewValue = $this->Nationality->CurrentValue; if (strval($this->Nationality->CurrentValue) <> "") { $sFilterWrk = "`id_nation`" . ew_SearchString("=", $this->Nationality->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Nationality->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Nationality->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Nationality->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Nationality, $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->Nationality->ViewValue = $this->Nationality->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Nationality->ViewValue = $this->Nationality->CurrentValue; } } else { $this->Nationality->ViewValue = NULL; } } $this->Nationality->ViewCustomAttributes = ""; // Citizenship if ($this->Citizenship->VirtualValue <> "") { $this->Citizenship->ViewValue = $this->Citizenship->VirtualValue; } else { $this->Citizenship->ViewValue = $this->Citizenship->CurrentValue; if (strval($this->Citizenship->CurrentValue) <> "") { $sFilterWrk = "`id_nation`" . ew_SearchString("=", $this->Citizenship->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Citizenship->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Citizenship->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Citizenship->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Citizenship, $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->Citizenship->ViewValue = $this->Citizenship->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Citizenship->ViewValue = $this->Citizenship->CurrentValue; } } else { $this->Citizenship->ViewValue = NULL; } } $this->Citizenship->ViewCustomAttributes = ""; // Sex if (strval($this->Sex->CurrentValue) <> "") { $this->Sex->ViewValue = $this->Sex->OptionCaption($this->Sex->CurrentValue); } else { $this->Sex->ViewValue = NULL; } $this->Sex->ViewCustomAttributes = ""; // Phone $this->Phone->ViewValue = $this->Phone->CurrentValue; $this->Phone->ViewCustomAttributes = ""; // Email $this->_Email->ViewValue = $this->_Email->CurrentValue; $this->_Email->ViewCustomAttributes = ""; // Religion if (strval($this->Religion->CurrentValue) <> "") { $sFilterWrk = "`Religion`" . ew_SearchString("=", $this->Religion->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Religion`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `treligion`"; $sWhereWrk = ""; $this->Religion->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Religion`, `Description_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `treligion`"; $sWhereWrk = ""; $this->Religion->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Religion`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `treligion`"; $sWhereWrk = ""; $this->Religion->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Religion, $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->Religion->ViewValue = $this->Religion->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Religion->ViewValue = $this->Religion->CurrentValue; } } else { $this->Religion->ViewValue = NULL; } $this->Religion->ViewCustomAttributes = ""; // Place_of_Residence if ($this->Place_of_Residence->VirtualValue <> "") { $this->Place_of_Residence->ViewValue = $this->Place_of_Residence->VirtualValue; } else { if (strval($this->Place_of_Residence->CurrentValue) <> "") { $sFilterWrk = "`id_nation`" . ew_SearchString("=", $this->Place_of_Residence->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Residence->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Residence->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Residence->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Place_of_Residence, $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->Place_of_Residence->ViewValue = $this->Place_of_Residence->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Place_of_Residence->ViewValue = $this->Place_of_Residence->CurrentValue; } } else { $this->Place_of_Residence->ViewValue = NULL; } } $this->Place_of_Residence->ViewCustomAttributes = ""; // Address_of_Residence $this->Address_of_Residence->ViewValue = $this->Address_of_Residence->CurrentValue; $this->Address_of_Residence->ViewCustomAttributes = ""; // Town_of_residence $this->Town_of_residence->ViewValue = $this->Town_of_residence->CurrentValue; $this->Town_of_residence->ViewCustomAttributes = ""; // Place_of_Transit if ($this->Place_of_Transit->VirtualValue <> "") { $this->Place_of_Transit->ViewValue = $this->Place_of_Transit->VirtualValue; } else { if (strval($this->Place_of_Transit->CurrentValue) <> "") { $sFilterWrk = "`id_nation`" . ew_SearchString("=", $this->Place_of_Transit->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Transit->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Transit->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Transit->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Place_of_Transit, $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->Place_of_Transit->ViewValue = $this->Place_of_Transit->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Place_of_Transit->ViewValue = $this->Place_of_Transit->CurrentValue; } } else { $this->Place_of_Transit->ViewValue = NULL; } } $this->Place_of_Transit->ViewCustomAttributes = ""; // Address_of_Transit $this->Address_of_Transit->ViewValue = $this->Address_of_Transit->CurrentValue; $this->Address_of_Transit->ViewCustomAttributes = ""; // Town_of_transit $this->Town_of_transit->ViewValue = $this->Town_of_transit->CurrentValue; $this->Town_of_transit->ViewCustomAttributes = ""; // domicile_description $this->domicile_description->ViewValue = $this->domicile_description->CurrentValue; $this->domicile_description->ViewCustomAttributes = ""; // Disabled if (ew_ConvertToBool($this->Disabled->CurrentValue)) { $this->Disabled->ViewValue = $this->Disabled->FldTagCaption(1) <> "" ? $this->Disabled->FldTagCaption(1) : "Y"; } else { $this->Disabled->ViewValue = $this->Disabled->FldTagCaption(2) <> "" ? $this->Disabled->FldTagCaption(2) : "N"; } $this->Disabled->ViewCustomAttributes = ""; // Sick if (ew_ConvertToBool($this->Sick->CurrentValue)) { $this->Sick->ViewValue = $this->Sick->FldTagCaption(1) <> "" ? $this->Sick->FldTagCaption(1) : "Y"; } else { $this->Sick->ViewValue = $this->Sick->FldTagCaption(2) <> "" ? $this->Sick->FldTagCaption(2) : "N"; } $this->Sick->ViewCustomAttributes = ""; // Alone if (ew_ConvertToBool($this->Alone->CurrentValue)) { $this->Alone->ViewValue = $this->Alone->FldTagCaption(1) <> "" ? $this->Alone->FldTagCaption(1) : "Y"; } else { $this->Alone->ViewValue = $this->Alone->FldTagCaption(2) <> "" ? $this->Alone->FldTagCaption(2) : "N"; } $this->Alone->ViewCustomAttributes = ""; // Elderly if (ew_ConvertToBool($this->Elderly->CurrentValue)) { $this->Elderly->ViewValue = $this->Elderly->FldTagCaption(1) <> "" ? $this->Elderly->FldTagCaption(1) : "Y"; } else { $this->Elderly->ViewValue = $this->Elderly->FldTagCaption(2) <> "" ? $this->Elderly->FldTagCaption(2) : "N"; } $this->Elderly->ViewCustomAttributes = ""; // Family if (ew_ConvertToBool($this->Family->CurrentValue)) { $this->Family->ViewValue = $this->Family->FldTagCaption(1) <> "" ? $this->Family->FldTagCaption(1) : "Y"; } else { $this->Family->ViewValue = $this->Family->FldTagCaption(2) <> "" ? $this->Family->FldTagCaption(2) : "N"; } $this->Family->ViewCustomAttributes = ""; // Householder if (ew_ConvertToBool($this->Householder->CurrentValue)) { $this->Householder->ViewValue = $this->Householder->FldTagCaption(1) <> "" ? $this->Householder->FldTagCaption(1) : "Y"; } else { $this->Householder->ViewValue = $this->Householder->FldTagCaption(2) <> "" ? $this->Householder->FldTagCaption(2) : "N"; } $this->Householder->ViewCustomAttributes = ""; // Householder_id if ($this->Householder_id->VirtualValue <> "") { $this->Householder_id->ViewValue = $this->Householder_id->VirtualValue; } else { $this->Householder_id->ViewValue = $this->Householder_id->CurrentValue; if (strval($this->Householder_id->CurrentValue) <> "") { $sFilterWrk = "`idSeeker`" . ew_SearchString("=", $this->Householder_id->CurrentValue, EW_DATATYPE_NUMBER, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `idSeeker`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `BirthDate` AS `Disp3Fld`, `BirthPlace` AS `Disp4Fld` FROM `vhouseholders`"; $sWhereWrk = ""; $this->Householder_id->LookupFilters = array("dx1" => '`Name`', "dx2" => '`Surname`', "df3" => "0", "dx3" => ew_CastDateFieldForLike('`BirthDate`', 0, "DB"), "dx4" => '`BirthPlace`'); break; case "it": $sSqlWrk = "SELECT `idSeeker`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `BirthDate` AS `Disp3Fld`, `BirthPlace` AS `Disp4Fld` FROM `vhouseholders`"; $sWhereWrk = ""; $this->Householder_id->LookupFilters = array("dx1" => '`Name`', "dx2" => '`Surname`', "df3" => "0", "dx3" => ew_CastDateFieldForLike('`BirthDate`', 0, "DB"), "dx4" => '`BirthPlace`'); break; default: $sSqlWrk = "SELECT `idSeeker`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `BirthDate` AS `Disp3Fld`, `BirthPlace` AS `Disp4Fld` FROM `vhouseholders`"; $sWhereWrk = ""; $this->Householder_id->LookupFilters = array("dx1" => '`Name`', "dx2" => '`Surname`', "df3" => "0", "dx3" => ew_CastDateFieldForLike('`BirthDate`', 0, "DB"), "dx4" => '`BirthPlace`'); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Householder_id, $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] = ew_FormatDateTime($rswrk->fields('Disp3Fld'), 0); $arwrk[4] = $rswrk->fields('Disp4Fld'); $this->Householder_id->ViewValue = $this->Householder_id->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Householder_id->ViewValue = $this->Householder_id->CurrentValue; } } else { $this->Householder_id->ViewValue = NULL; } } $this->Householder_id->ViewCustomAttributes = ""; // Householder_reltype if (strval($this->Householder_reltype->CurrentValue) <> "") { $sFilterWrk = "`family_rel`" . ew_SearchString("=", $this->Householder_reltype->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `family_rel`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tfamily_rel`"; $sWhereWrk = ""; $this->Householder_reltype->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `family_rel`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tfamily_rel`"; $sWhereWrk = ""; $this->Householder_reltype->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `family_rel`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tfamily_rel`"; $sWhereWrk = ""; $this->Householder_reltype->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Householder_reltype, $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->Householder_reltype->ViewValue = $this->Householder_reltype->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Householder_reltype->ViewValue = $this->Householder_reltype->CurrentValue; } } else { $this->Householder_reltype->ViewValue = NULL; } $this->Householder_reltype->ViewCustomAttributes = ""; // Ethnic_group $this->Ethnic_group->ViewValue = $this->Ethnic_group->CurrentValue; $this->Ethnic_group->ViewCustomAttributes = ""; // Known_languages $this->Known_languages->ViewValue = $this->Known_languages->CurrentValue; $this->Known_languages->ViewCustomAttributes = ""; // Title_of_study $this->Title_of_study->ViewValue = $this->Title_of_study->CurrentValue; $this->Title_of_study->ViewCustomAttributes = ""; // Poss_destination_country $this->Poss_destination_country->ViewValue = $this->Poss_destination_country->CurrentValue; $this->Poss_destination_country->ViewCustomAttributes = ""; // Document_type if (strval($this->Document_type->CurrentValue) <> "") { $sFilterWrk = "`Doc_type`" . ew_SearchString("=", $this->Document_type->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Doc_type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tdoc_type`"; $sWhereWrk = ""; $this->Document_type->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Doc_type`, `Description_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tdoc_type`"; $sWhereWrk = ""; $this->Document_type->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Doc_type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tdoc_type`"; $sWhereWrk = ""; $this->Document_type->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Document_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->Document_type->ViewValue = $this->Document_type->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Document_type->ViewValue = $this->Document_type->CurrentValue; } } else { $this->Document_type->ViewValue = NULL; } $this->Document_type->ViewCustomAttributes = ""; // Document_number $this->Document_number->ViewValue = $this->Document_number->CurrentValue; $this->Document_number->ViewCustomAttributes = ""; // Document_release $this->Document_release->ViewValue = $this->Document_release->CurrentValue; $this->Document_release->ViewValue = ew_FormatDateTime($this->Document_release->ViewValue, 7); $this->Document_release->ViewCustomAttributes = ""; // Document_expiry $this->Document_expiry->ViewValue = $this->Document_expiry->CurrentValue; $this->Document_expiry->ViewValue = ew_FormatDateTime($this->Document_expiry->ViewValue, 7); $this->Document_expiry->ViewCustomAttributes = ""; // Document_nationality if ($this->Document_nationality->VirtualValue <> "") { $this->Document_nationality->ViewValue = $this->Document_nationality->VirtualValue; } else { if (strval($this->Document_nationality->CurrentValue) <> "") { $sFilterWrk = "`id_nation`" . ew_SearchString("=", $this->Document_nationality->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Document_nationality->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Document_nationality->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Document_nationality->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Document_nationality, $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->Document_nationality->ViewValue = $this->Document_nationality->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Document_nationality->ViewValue = $this->Document_nationality->CurrentValue; } } else { $this->Document_nationality->ViewValue = NULL; } } $this->Document_nationality->ViewCustomAttributes = ""; // other_documents $this->other_documents->ViewValue = $this->other_documents->CurrentValue; $this->other_documents->ViewCustomAttributes = ""; // Final_evaluation if (strval($this->Final_evaluation->CurrentValue) <> "") { $sFilterWrk = "`Eval_type`" . ew_SearchString("=", $this->Final_evaluation->CurrentValue, EW_DATATYPE_STRING, ""); switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Eval_type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `teval_type`"; $sWhereWrk = ""; $this->Final_evaluation->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Eval_type`, `Description_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `teval_type`"; $sWhereWrk = ""; $this->Final_evaluation->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Eval_type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `teval_type`"; $sWhereWrk = ""; $this->Final_evaluation->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Final_evaluation, $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->Final_evaluation->ViewValue = $this->Final_evaluation->DisplayValue($arwrk); $rswrk->Close(); } else { $this->Final_evaluation->ViewValue = $this->Final_evaluation->CurrentValue; } } else { $this->Final_evaluation->ViewValue = NULL; } $this->Final_evaluation->ViewCustomAttributes = ""; // photo $this->photo->UploadPath = "uploads/ospiti/".$this->idSeeker->DbValue; if (!ew_Empty($this->photo->Upload->DbValue)) { $this->photo->ImageWidth = EW_THUMBNAIL_DEFAULT_WIDTH; $this->photo->ImageHeight = EW_THUMBNAIL_DEFAULT_HEIGHT; $this->photo->ImageAlt = $this->photo->FldAlt(); $this->photo->ViewValue = $this->photo->Upload->DbValue; } else { $this->photo->ViewValue = ""; } $this->photo->ViewCustomAttributes = ""; // doc_image $this->doc_image->UploadPath = "uploads/ospiti_doc/".$this->idSeeker->DbValue; if (!ew_Empty($this->doc_image->Upload->DbValue)) { $this->doc_image->ImageWidth = EW_THUMBNAIL_DEFAULT_WIDTH; $this->doc_image->ImageHeight = EW_THUMBNAIL_DEFAULT_HEIGHT; $this->doc_image->ImageAlt = $this->doc_image->FldAlt(); $this->doc_image->ViewValue = $this->doc_image->Upload->DbValue; } else { $this->doc_image->ViewValue = ""; } $this->doc_image->ViewCustomAttributes = ""; // Notes $this->Notes->ViewValue = $this->Notes->CurrentValue; $this->Notes->ViewCustomAttributes = ""; // Interview_1 if (ew_ConvertToBool($this->Interview_1->CurrentValue)) { $this->Interview_1->ViewValue = $this->Interview_1->FldTagCaption(1) <> "" ? $this->Interview_1->FldTagCaption(1) : "Y"; } else { $this->Interview_1->ViewValue = $this->Interview_1->FldTagCaption(2) <> "" ? $this->Interview_1->FldTagCaption(2) : "N"; } $this->Interview_1->ViewCustomAttributes = ""; // interview1_date $this->interview1_date->ViewValue = $this->interview1_date->CurrentValue; $this->interview1_date->ViewValue = ew_FormatDateTime($this->interview1_date->ViewValue, 0); $this->interview1_date->ViewCustomAttributes = ""; // Interview_2 if (ew_ConvertToBool($this->Interview_2->CurrentValue)) { $this->Interview_2->ViewValue = $this->Interview_2->FldTagCaption(1) <> "" ? $this->Interview_2->FldTagCaption(1) : "Y"; } else { $this->Interview_2->ViewValue = $this->Interview_2->FldTagCaption(2) <> "" ? $this->Interview_2->FldTagCaption(2) : "N"; } $this->Interview_2->ViewCustomAttributes = ""; // interview_2_date $this->interview_2_date->ViewValue = $this->interview_2_date->CurrentValue; $this->interview_2_date->ViewValue = ew_FormatDateTime($this->interview_2_date->ViewValue, 0); $this->interview_2_date->ViewCustomAttributes = ""; // Interview_3 if (ew_ConvertToBool($this->Interview_3->CurrentValue)) { $this->Interview_3->ViewValue = $this->Interview_3->FldTagCaption(1) <> "" ? $this->Interview_3->FldTagCaption(1) : "Y"; } else { $this->Interview_3->ViewValue = $this->Interview_3->FldTagCaption(2) <> "" ? $this->Interview_3->FldTagCaption(2) : "N"; } $this->Interview_3->ViewCustomAttributes = ""; // interview_3_date $this->interview_3_date->ViewValue = $this->interview_3_date->CurrentValue; $this->interview_3_date->ViewValue = ew_FormatDateTime($this->interview_3_date->ViewValue, 0); $this->interview_3_date->ViewCustomAttributes = ""; // Zone_of_Transit $this->Zone_of_Transit->ViewValue = $this->Zone_of_Transit->CurrentValue; $this->Zone_of_Transit->ViewCustomAttributes = ""; // Travel_number $this->Travel_number->ViewValue = $this->Travel_number->CurrentValue; $this->Travel_number->ViewCustomAttributes = ""; // Travel_arrival_date $this->Travel_arrival_date->ViewValue = $this->Travel_arrival_date->CurrentValue; $this->Travel_arrival_date->ViewValue = ew_FormatDateTime($this->Travel_arrival_date->ViewValue, 0); $this->Travel_arrival_date->ViewCustomAttributes = ""; // Travel_arrival_time $this->Travel_arrival_time->ViewValue = $this->Travel_arrival_time->CurrentValue; $this->Travel_arrival_time->ViewValue = ew_FormatDateTime($this->Travel_arrival_time->ViewValue, 4); $this->Travel_arrival_time->ViewCustomAttributes = ""; // num_family $this->num_family->ViewValue = $this->num_family->CurrentValue; $this->num_family->ViewCustomAttributes = ""; // speak_ENG if (ew_ConvertToBool($this->speak_ENG->CurrentValue)) { $this->speak_ENG->ViewValue = $this->speak_ENG->FldTagCaption(1) <> "" ? $this->speak_ENG->FldTagCaption(1) : "Y"; } else { $this->speak_ENG->ViewValue = $this->speak_ENG->FldTagCaption(2) <> "" ? $this->speak_ENG->FldTagCaption(2) : "N"; } $this->speak_ENG->ViewCustomAttributes = ""; // speak_FRA if (ew_ConvertToBool($this->speak_FRA->CurrentValue)) { $this->speak_FRA->ViewValue = $this->speak_FRA->FldTagCaption(1) <> "" ? $this->speak_FRA->FldTagCaption(1) : "Y"; } else { $this->speak_FRA->ViewValue = $this->speak_FRA->FldTagCaption(2) <> "" ? $this->speak_FRA->FldTagCaption(2) : "N"; } $this->speak_FRA->ViewCustomAttributes = ""; // speak_ARA if (ew_ConvertToBool($this->speak_ARA->CurrentValue)) { $this->speak_ARA->ViewValue = $this->speak_ARA->FldTagCaption(1) <> "" ? $this->speak_ARA->FldTagCaption(1) : "Y"; } else { $this->speak_ARA->ViewValue = $this->speak_ARA->FldTagCaption(2) <> "" ? $this->speak_ARA->FldTagCaption(2) : "N"; } $this->speak_ARA->ViewCustomAttributes = ""; // speak_ITA if (ew_ConvertToBool($this->speak_ITA->CurrentValue)) { $this->speak_ITA->ViewValue = $this->speak_ITA->FldTagCaption(1) <> "" ? $this->speak_ITA->FldTagCaption(1) : "Y"; } else { $this->speak_ITA->ViewValue = $this->speak_ITA->FldTagCaption(2) <> "" ? $this->speak_ITA->FldTagCaption(2) : "N"; } $this->speak_ITA->ViewCustomAttributes = ""; // lives_with $this->lives_with->ViewValue = $this->lives_with->CurrentValue; $this->lives_with->ViewCustomAttributes = ""; // family_know if (ew_ConvertToBool($this->family_know->CurrentValue)) { $this->family_know->ViewValue = $this->family_know->FldTagCaption(1) <> "" ? $this->family_know->FldTagCaption(1) : "Y"; } else { $this->family_know->ViewValue = $this->family_know->FldTagCaption(2) <> "" ? $this->family_know->FldTagCaption(2) : "N"; } $this->family_know->ViewCustomAttributes = ""; // date_of_entry_transit $this->date_of_entry_transit->ViewValue = $this->date_of_entry_transit->CurrentValue; $this->date_of_entry_transit->ViewValue = ew_FormatDateTime($this->date_of_entry_transit->ViewValue, 0); $this->date_of_entry_transit->ViewCustomAttributes = ""; // marital_status $this->marital_status->ViewValue = $this->marital_status->CurrentValue; $this->marital_status->ViewCustomAttributes = ""; // consort_id $this->consort_id->ViewValue = $this->consort_id->CurrentValue; $this->consort_id->ViewCustomAttributes = ""; // consort_info $this->consort_info->ViewValue = $this->consort_info->CurrentValue; $this->consort_info->ViewCustomAttributes = ""; // other_fam_in_italy $this->other_fam_in_italy->ViewValue = $this->other_fam_in_italy->CurrentValue; $this->other_fam_in_italy->ViewCustomAttributes = ""; // other_fam_in_europe $this->other_fam_in_europe->ViewValue = $this->other_fam_in_europe->CurrentValue; $this->other_fam_in_europe->ViewCustomAttributes = ""; // where_lived $this->where_lived->ViewValue = $this->where_lived->CurrentValue; $this->where_lived->ViewCustomAttributes = ""; // medical_situation $this->medical_situation->ViewValue = $this->medical_situation->CurrentValue; $this->medical_situation->ViewCustomAttributes = ""; // social_situation $this->social_situation->ViewValue = $this->social_situation->CurrentValue; $this->social_situation->ViewCustomAttributes = ""; // abuse_suffered if (ew_ConvertToBool($this->abuse_suffered->CurrentValue)) { $this->abuse_suffered->ViewValue = $this->abuse_suffered->FldTagCaption(1) <> "" ? $this->abuse_suffered->FldTagCaption(1) : "Y"; } else { $this->abuse_suffered->ViewValue = $this->abuse_suffered->FldTagCaption(2) <> "" ? $this->abuse_suffered->FldTagCaption(2) : "N"; } $this->abuse_suffered->ViewCustomAttributes = ""; // abuse_description $this->abuse_description->ViewValue = $this->abuse_description->CurrentValue; $this->abuse_description->ViewCustomAttributes = ""; // work_done $this->work_done->ViewValue = $this->work_done->CurrentValue; $this->work_done->ViewCustomAttributes = ""; // military_service $this->military_service->ViewValue = $this->military_service->CurrentValue; $this->military_service->ViewCustomAttributes = ""; // itinerary $this->itinerary->ViewValue = $this->itinerary->CurrentValue; $this->itinerary->ViewCustomAttributes = ""; // convictions if (ew_ConvertToBool($this->convictions->CurrentValue)) { $this->convictions->ViewValue = $this->convictions->FldTagCaption(1) <> "" ? $this->convictions->FldTagCaption(1) : "Y"; } else { $this->convictions->ViewValue = $this->convictions->FldTagCaption(2) <> "" ? $this->convictions->FldTagCaption(2) : "N"; } $this->convictions->ViewCustomAttributes = ""; // requested_asylum $this->requested_asylum->ViewValue = $this->requested_asylum->CurrentValue; $this->requested_asylum->ViewCustomAttributes = ""; // resettlement_application if (ew_ConvertToBool($this->resettlement_application->CurrentValue)) { $this->resettlement_application->ViewValue = $this->resettlement_application->FldTagCaption(1) <> "" ? $this->resettlement_application->FldTagCaption(1) : "Y"; } else { $this->resettlement_application->ViewValue = $this->resettlement_application->FldTagCaption(2) <> "" ? $this->resettlement_application->FldTagCaption(2) : "N"; } $this->resettlement_application->ViewCustomAttributes = ""; // resettlement_country $this->resettlement_country->ViewValue = $this->resettlement_country->CurrentValue; $this->resettlement_country->ViewCustomAttributes = ""; // reunion_application if (ew_ConvertToBool($this->reunion_application->CurrentValue)) { $this->reunion_application->ViewValue = $this->reunion_application->FldTagCaption(1) <> "" ? $this->reunion_application->FldTagCaption(1) : "Y"; } else { $this->reunion_application->ViewValue = $this->reunion_application->FldTagCaption(2) <> "" ? $this->reunion_application->FldTagCaption(2) : "N"; } $this->reunion_application->ViewCustomAttributes = ""; // reunion_country $this->reunion_country->ViewValue = $this->reunion_country->CurrentValue; $this->reunion_country->ViewCustomAttributes = ""; // belongs_to_organization if (ew_ConvertToBool($this->belongs_to_organization->CurrentValue)) { $this->belongs_to_organization->ViewValue = $this->belongs_to_organization->FldTagCaption(1) <> "" ? $this->belongs_to_organization->FldTagCaption(1) : "Y"; } else { $this->belongs_to_organization->ViewValue = $this->belongs_to_organization->FldTagCaption(2) <> "" ? $this->belongs_to_organization->FldTagCaption(2) : "N"; } $this->belongs_to_organization->ViewCustomAttributes = ""; // organizations $this->organizations->ViewValue = $this->organizations->CurrentValue; $this->organizations->ViewCustomAttributes = ""; // presentations $this->presentations->ViewValue = $this->presentations->CurrentValue; $this->presentations->ViewCustomAttributes = ""; // report $this->report->ViewValue = $this->report->CurrentValue; $this->report->ViewCustomAttributes = ""; // Desk $this->Desk->LinkCustomAttributes = ""; $this->Desk->HrefValue = ""; $this->Desk->TooltipValue = ""; // UNHCR_code $this->UNHCR_code->LinkCustomAttributes = ""; $this->UNHCR_code->HrefValue = ""; $this->UNHCR_code->TooltipValue = ""; // Name $this->Name->LinkCustomAttributes = ""; $this->Name->HrefValue = ""; $this->Name->TooltipValue = ""; // Surname $this->Surname->LinkCustomAttributes = ""; $this->Surname->HrefValue = ""; $this->Surname->TooltipValue = ""; // BirthDate $this->BirthDate->LinkCustomAttributes = ""; $this->BirthDate->HrefValue = ""; $this->BirthDate->TooltipValue = ""; // BirthPlace $this->BirthPlace->LinkCustomAttributes = ""; $this->BirthPlace->HrefValue = ""; $this->BirthPlace->TooltipValue = ""; // Nationality $this->Nationality->LinkCustomAttributes = ""; $this->Nationality->HrefValue = ""; $this->Nationality->TooltipValue = ""; // Citizenship $this->Citizenship->LinkCustomAttributes = ""; $this->Citizenship->HrefValue = ""; $this->Citizenship->TooltipValue = ""; // Sex $this->Sex->LinkCustomAttributes = ""; $this->Sex->HrefValue = ""; $this->Sex->TooltipValue = ""; // Phone $this->Phone->LinkCustomAttributes = ""; $this->Phone->HrefValue = ""; $this->Phone->TooltipValue = ""; // Email $this->_Email->LinkCustomAttributes = ""; $this->_Email->HrefValue = ""; $this->_Email->TooltipValue = ""; // Religion $this->Religion->LinkCustomAttributes = ""; $this->Religion->HrefValue = ""; $this->Religion->TooltipValue = ""; // Place_of_Residence $this->Place_of_Residence->LinkCustomAttributes = ""; $this->Place_of_Residence->HrefValue = ""; $this->Place_of_Residence->TooltipValue = ""; // Address_of_Residence $this->Address_of_Residence->LinkCustomAttributes = ""; $this->Address_of_Residence->HrefValue = ""; $this->Address_of_Residence->TooltipValue = ""; // Town_of_residence $this->Town_of_residence->LinkCustomAttributes = ""; $this->Town_of_residence->HrefValue = ""; $this->Town_of_residence->TooltipValue = ""; // Place_of_Transit $this->Place_of_Transit->LinkCustomAttributes = ""; $this->Place_of_Transit->HrefValue = ""; $this->Place_of_Transit->TooltipValue = ""; // Address_of_Transit $this->Address_of_Transit->LinkCustomAttributes = ""; $this->Address_of_Transit->HrefValue = ""; $this->Address_of_Transit->TooltipValue = ""; // Town_of_transit $this->Town_of_transit->LinkCustomAttributes = ""; $this->Town_of_transit->HrefValue = ""; $this->Town_of_transit->TooltipValue = ""; // domicile_description $this->domicile_description->LinkCustomAttributes = ""; $this->domicile_description->HrefValue = ""; $this->domicile_description->TooltipValue = ""; // Disabled $this->Disabled->LinkCustomAttributes = ""; $this->Disabled->HrefValue = ""; $this->Disabled->TooltipValue = ""; // Sick $this->Sick->LinkCustomAttributes = ""; $this->Sick->HrefValue = ""; $this->Sick->TooltipValue = ""; // Alone $this->Alone->LinkCustomAttributes = ""; $this->Alone->HrefValue = ""; $this->Alone->TooltipValue = ""; // Elderly $this->Elderly->LinkCustomAttributes = ""; $this->Elderly->HrefValue = ""; $this->Elderly->TooltipValue = ""; // Family $this->Family->LinkCustomAttributes = ""; $this->Family->HrefValue = ""; $this->Family->TooltipValue = ""; // Householder $this->Householder->LinkCustomAttributes = ""; $this->Householder->HrefValue = ""; $this->Householder->TooltipValue = ""; // Householder_id $this->Householder_id->LinkCustomAttributes = ""; $this->Householder_id->HrefValue = ""; $this->Householder_id->TooltipValue = ""; // Householder_reltype $this->Householder_reltype->LinkCustomAttributes = ""; $this->Householder_reltype->HrefValue = ""; $this->Householder_reltype->TooltipValue = ""; // Ethnic_group $this->Ethnic_group->LinkCustomAttributes = ""; $this->Ethnic_group->HrefValue = ""; $this->Ethnic_group->TooltipValue = ""; // Known_languages $this->Known_languages->LinkCustomAttributes = ""; $this->Known_languages->HrefValue = ""; $this->Known_languages->TooltipValue = ""; // Title_of_study $this->Title_of_study->LinkCustomAttributes = ""; $this->Title_of_study->HrefValue = ""; $this->Title_of_study->TooltipValue = ""; // Poss_destination_country $this->Poss_destination_country->LinkCustomAttributes = ""; $this->Poss_destination_country->HrefValue = ""; $this->Poss_destination_country->TooltipValue = ""; // Document_type $this->Document_type->LinkCustomAttributes = ""; $this->Document_type->HrefValue = ""; $this->Document_type->TooltipValue = ""; // Document_number $this->Document_number->LinkCustomAttributes = ""; $this->Document_number->HrefValue = ""; $this->Document_number->TooltipValue = ""; // Document_release $this->Document_release->LinkCustomAttributes = ""; $this->Document_release->HrefValue = ""; $this->Document_release->TooltipValue = ""; // Document_expiry $this->Document_expiry->LinkCustomAttributes = ""; $this->Document_expiry->HrefValue = ""; $this->Document_expiry->TooltipValue = ""; // Document_nationality $this->Document_nationality->LinkCustomAttributes = ""; $this->Document_nationality->HrefValue = ""; $this->Document_nationality->TooltipValue = ""; // other_documents $this->other_documents->LinkCustomAttributes = ""; $this->other_documents->HrefValue = ""; $this->other_documents->TooltipValue = ""; // Final_evaluation $this->Final_evaluation->LinkCustomAttributes = ""; $this->Final_evaluation->HrefValue = ""; $this->Final_evaluation->TooltipValue = ""; // photo $this->photo->LinkCustomAttributes = ""; $this->photo->UploadPath = "uploads/ospiti/".$this->idSeeker->DbValue; if (!ew_Empty($this->photo->Upload->DbValue)) { $this->photo->HrefValue = ew_GetFileUploadUrl($this->photo, $this->photo->Upload->DbValue); // Add prefix/suffix $this->photo->LinkAttrs["target"] = ""; // Add target if ($this->Export <> "") $this->photo->HrefValue = ew_ConvertFullUrl($this->photo->HrefValue); } else { $this->photo->HrefValue = ""; } $this->photo->HrefValue2 = $this->photo->UploadPath . $this->photo->Upload->DbValue; $this->photo->TooltipValue = ""; if ($this->photo->UseColorbox) { if (ew_Empty($this->photo->TooltipValue)) $this->photo->LinkAttrs["title"] = $Language->Phrase("ViewImageGallery"); $this->photo->LinkAttrs["data-rel"] = "tospiti_x_photo"; ew_AppendClass($this->photo->LinkAttrs["class"], "ewLightbox"); } // doc_image $this->doc_image->LinkCustomAttributes = ""; $this->doc_image->UploadPath = "uploads/ospiti_doc/".$this->idSeeker->DbValue; if (!ew_Empty($this->doc_image->Upload->DbValue)) { $this->doc_image->HrefValue = ew_GetFileUploadUrl($this->doc_image, $this->doc_image->Upload->DbValue); // Add prefix/suffix $this->doc_image->LinkAttrs["target"] = ""; // Add target if ($this->Export <> "") $this->doc_image->HrefValue = ew_ConvertFullUrl($this->doc_image->HrefValue); } else { $this->doc_image->HrefValue = ""; } $this->doc_image->HrefValue2 = $this->doc_image->UploadPath . $this->doc_image->Upload->DbValue; $this->doc_image->TooltipValue = ""; if ($this->doc_image->UseColorbox) { if (ew_Empty($this->doc_image->TooltipValue)) $this->doc_image->LinkAttrs["title"] = $Language->Phrase("ViewImageGallery"); $this->doc_image->LinkAttrs["data-rel"] = "tospiti_x_doc_image"; ew_AppendClass($this->doc_image->LinkAttrs["class"], "ewLightbox"); } // Notes $this->Notes->LinkCustomAttributes = ""; $this->Notes->HrefValue = ""; $this->Notes->TooltipValue = ""; // Interview_1 $this->Interview_1->LinkCustomAttributes = ""; $this->Interview_1->HrefValue = ""; $this->Interview_1->TooltipValue = ""; // interview1_date $this->interview1_date->LinkCustomAttributes = ""; $this->interview1_date->HrefValue = ""; $this->interview1_date->TooltipValue = ""; // Interview_2 $this->Interview_2->LinkCustomAttributes = ""; $this->Interview_2->HrefValue = ""; $this->Interview_2->TooltipValue = ""; // interview_2_date $this->interview_2_date->LinkCustomAttributes = ""; $this->interview_2_date->HrefValue = ""; $this->interview_2_date->TooltipValue = ""; // Interview_3 $this->Interview_3->LinkCustomAttributes = ""; $this->Interview_3->HrefValue = ""; $this->Interview_3->TooltipValue = ""; // interview_3_date $this->interview_3_date->LinkCustomAttributes = ""; $this->interview_3_date->HrefValue = ""; $this->interview_3_date->TooltipValue = ""; // Zone_of_Transit $this->Zone_of_Transit->LinkCustomAttributes = ""; $this->Zone_of_Transit->HrefValue = ""; $this->Zone_of_Transit->TooltipValue = ""; // Travel_number $this->Travel_number->LinkCustomAttributes = ""; $this->Travel_number->HrefValue = ""; $this->Travel_number->TooltipValue = ""; // Travel_arrival_date $this->Travel_arrival_date->LinkCustomAttributes = ""; $this->Travel_arrival_date->HrefValue = ""; $this->Travel_arrival_date->TooltipValue = ""; // Travel_arrival_time $this->Travel_arrival_time->LinkCustomAttributes = ""; $this->Travel_arrival_time->HrefValue = ""; $this->Travel_arrival_time->TooltipValue = ""; // num_family $this->num_family->LinkCustomAttributes = ""; $this->num_family->HrefValue = ""; $this->num_family->TooltipValue = ""; // speak_ENG $this->speak_ENG->LinkCustomAttributes = ""; $this->speak_ENG->HrefValue = ""; $this->speak_ENG->TooltipValue = ""; // speak_FRA $this->speak_FRA->LinkCustomAttributes = ""; $this->speak_FRA->HrefValue = ""; $this->speak_FRA->TooltipValue = ""; // speak_ARA $this->speak_ARA->LinkCustomAttributes = ""; $this->speak_ARA->HrefValue = ""; $this->speak_ARA->TooltipValue = ""; // speak_ITA $this->speak_ITA->LinkCustomAttributes = ""; $this->speak_ITA->HrefValue = ""; $this->speak_ITA->TooltipValue = ""; // lives_with $this->lives_with->LinkCustomAttributes = ""; $this->lives_with->HrefValue = ""; $this->lives_with->TooltipValue = ""; // family_know $this->family_know->LinkCustomAttributes = ""; $this->family_know->HrefValue = ""; $this->family_know->TooltipValue = ""; // date_of_entry_transit $this->date_of_entry_transit->LinkCustomAttributes = ""; $this->date_of_entry_transit->HrefValue = ""; $this->date_of_entry_transit->TooltipValue = ""; // marital_status $this->marital_status->LinkCustomAttributes = ""; $this->marital_status->HrefValue = ""; $this->marital_status->TooltipValue = ""; // consort_id $this->consort_id->LinkCustomAttributes = ""; $this->consort_id->HrefValue = ""; $this->consort_id->TooltipValue = ""; // consort_info $this->consort_info->LinkCustomAttributes = ""; $this->consort_info->HrefValue = ""; $this->consort_info->TooltipValue = ""; // other_fam_in_italy $this->other_fam_in_italy->LinkCustomAttributes = ""; $this->other_fam_in_italy->HrefValue = ""; $this->other_fam_in_italy->TooltipValue = ""; // other_fam_in_europe $this->other_fam_in_europe->LinkCustomAttributes = ""; $this->other_fam_in_europe->HrefValue = ""; $this->other_fam_in_europe->TooltipValue = ""; // where_lived $this->where_lived->LinkCustomAttributes = ""; $this->where_lived->HrefValue = ""; $this->where_lived->TooltipValue = ""; // medical_situation $this->medical_situation->LinkCustomAttributes = ""; $this->medical_situation->HrefValue = ""; $this->medical_situation->TooltipValue = ""; // social_situation $this->social_situation->LinkCustomAttributes = ""; $this->social_situation->HrefValue = ""; $this->social_situation->TooltipValue = ""; // abuse_suffered $this->abuse_suffered->LinkCustomAttributes = ""; $this->abuse_suffered->HrefValue = ""; $this->abuse_suffered->TooltipValue = ""; // abuse_description $this->abuse_description->LinkCustomAttributes = ""; $this->abuse_description->HrefValue = ""; $this->abuse_description->TooltipValue = ""; // work_done $this->work_done->LinkCustomAttributes = ""; $this->work_done->HrefValue = ""; $this->work_done->TooltipValue = ""; // military_service $this->military_service->LinkCustomAttributes = ""; $this->military_service->HrefValue = ""; $this->military_service->TooltipValue = ""; // itinerary $this->itinerary->LinkCustomAttributes = ""; $this->itinerary->HrefValue = ""; $this->itinerary->TooltipValue = ""; // convictions $this->convictions->LinkCustomAttributes = ""; $this->convictions->HrefValue = ""; $this->convictions->TooltipValue = ""; // requested_asylum $this->requested_asylum->LinkCustomAttributes = ""; $this->requested_asylum->HrefValue = ""; $this->requested_asylum->TooltipValue = ""; // resettlement_application $this->resettlement_application->LinkCustomAttributes = ""; $this->resettlement_application->HrefValue = ""; $this->resettlement_application->TooltipValue = ""; // resettlement_country $this->resettlement_country->LinkCustomAttributes = ""; $this->resettlement_country->HrefValue = ""; $this->resettlement_country->TooltipValue = ""; // reunion_application $this->reunion_application->LinkCustomAttributes = ""; $this->reunion_application->HrefValue = ""; $this->reunion_application->TooltipValue = ""; // reunion_country $this->reunion_country->LinkCustomAttributes = ""; $this->reunion_country->HrefValue = ""; $this->reunion_country->TooltipValue = ""; // belongs_to_organization $this->belongs_to_organization->LinkCustomAttributes = ""; $this->belongs_to_organization->HrefValue = ""; $this->belongs_to_organization->TooltipValue = ""; // organizations $this->organizations->LinkCustomAttributes = ""; $this->organizations->HrefValue = ""; $this->organizations->TooltipValue = ""; // presentations $this->presentations->LinkCustomAttributes = ""; $this->presentations->HrefValue = ""; $this->presentations->TooltipValue = ""; // report $this->report->LinkCustomAttributes = ""; $this->report->HrefValue = ""; $this->report->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // Desk $this->Desk->EditAttrs["class"] = "form-control"; $this->Desk->EditCustomAttributes = ""; $this->Desk->EditValue = ew_HtmlEncode($this->Desk->CurrentValue); $this->Desk->PlaceHolder = ew_RemoveHtml($this->Desk->FldCaption()); // UNHCR_code $this->UNHCR_code->EditAttrs["class"] = "form-control"; $this->UNHCR_code->EditCustomAttributes = ""; $this->UNHCR_code->EditValue = ew_HtmlEncode($this->UNHCR_code->CurrentValue); $this->UNHCR_code->PlaceHolder = ew_RemoveHtml($this->UNHCR_code->FldCaption()); // Name $this->Name->EditAttrs["class"] = "form-control"; $this->Name->EditCustomAttributes = ""; $this->Name->EditValue = ew_HtmlEncode($this->Name->CurrentValue); $this->Name->PlaceHolder = ew_RemoveHtml($this->Name->FldCaption()); // Surname $this->Surname->EditAttrs["class"] = "form-control"; $this->Surname->EditCustomAttributes = ""; $this->Surname->EditValue = ew_HtmlEncode($this->Surname->CurrentValue); $this->Surname->PlaceHolder = ew_RemoveHtml($this->Surname->FldCaption()); // BirthDate $this->BirthDate->EditAttrs["class"] = "form-control"; $this->BirthDate->EditCustomAttributes = ""; $this->BirthDate->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->BirthDate->CurrentValue, 7)); $this->BirthDate->PlaceHolder = ew_RemoveHtml($this->BirthDate->FldCaption()); // BirthPlace $this->BirthPlace->EditAttrs["class"] = "form-control"; $this->BirthPlace->EditCustomAttributes = ""; $this->BirthPlace->EditValue = ew_HtmlEncode($this->BirthPlace->CurrentValue); $this->BirthPlace->PlaceHolder = ew_RemoveHtml($this->BirthPlace->FldCaption()); // Nationality $this->Nationality->EditAttrs["class"] = "form-control"; $this->Nationality->EditCustomAttributes = ""; $this->Nationality->EditValue = ew_HtmlEncode($this->Nationality->CurrentValue); $this->Nationality->PlaceHolder = ew_RemoveHtml($this->Nationality->FldCaption()); // Citizenship $this->Citizenship->EditAttrs["class"] = "form-control"; $this->Citizenship->EditCustomAttributes = ""; $this->Citizenship->EditValue = ew_HtmlEncode($this->Citizenship->CurrentValue); $this->Citizenship->PlaceHolder = ew_RemoveHtml($this->Citizenship->FldCaption()); // Sex $this->Sex->EditAttrs["class"] = "form-control"; $this->Sex->EditCustomAttributes = ""; $this->Sex->EditValue = $this->Sex->Options(TRUE); // Phone $this->Phone->EditAttrs["class"] = "form-control"; $this->Phone->EditCustomAttributes = ""; $this->Phone->EditValue = ew_HtmlEncode($this->Phone->CurrentValue); $this->Phone->PlaceHolder = ew_RemoveHtml($this->Phone->FldCaption()); // Email $this->_Email->EditAttrs["class"] = "form-control"; $this->_Email->EditCustomAttributes = ""; $this->_Email->EditValue = ew_HtmlEncode($this->_Email->CurrentValue); $this->_Email->PlaceHolder = ew_RemoveHtml($this->_Email->FldCaption()); // Religion $this->Religion->EditAttrs["class"] = "form-control"; $this->Religion->EditCustomAttributes = ""; if (trim(strval($this->Religion->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`Religion`" . ew_SearchString("=", $this->Religion->CurrentValue, EW_DATATYPE_STRING, ""); } switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Religion`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `treligion`"; $sWhereWrk = ""; $this->Religion->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Religion`, `Description_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `treligion`"; $sWhereWrk = ""; $this->Religion->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Religion`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `treligion`"; $sWhereWrk = ""; $this->Religion->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Religion, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); $arwrk = ($rswrk) ? $rswrk->GetRows() : array(); if ($rswrk) $rswrk->Close(); $this->Religion->EditValue = $arwrk; // Place_of_Residence $this->Place_of_Residence->EditAttrs["class"] = "form-control"; $this->Place_of_Residence->EditCustomAttributes = ""; if (trim(strval($this->Place_of_Residence->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`id_nation`" . ew_SearchString("=", $this->Place_of_Residence->CurrentValue, EW_DATATYPE_STRING, ""); } switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Residence->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Residence->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Residence->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Place_of_Residence, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); $arwrk = ($rswrk) ? $rswrk->GetRows() : array(); if ($rswrk) $rswrk->Close(); $this->Place_of_Residence->EditValue = $arwrk; // Address_of_Residence $this->Address_of_Residence->EditAttrs["class"] = "form-control"; $this->Address_of_Residence->EditCustomAttributes = ""; $this->Address_of_Residence->EditValue = ew_HtmlEncode($this->Address_of_Residence->CurrentValue); $this->Address_of_Residence->PlaceHolder = ew_RemoveHtml($this->Address_of_Residence->FldCaption()); // Town_of_residence $this->Town_of_residence->EditAttrs["class"] = "form-control"; $this->Town_of_residence->EditCustomAttributes = ""; $this->Town_of_residence->EditValue = ew_HtmlEncode($this->Town_of_residence->CurrentValue); $this->Town_of_residence->PlaceHolder = ew_RemoveHtml($this->Town_of_residence->FldCaption()); // Place_of_Transit $this->Place_of_Transit->EditAttrs["class"] = "form-control"; $this->Place_of_Transit->EditCustomAttributes = ""; if (trim(strval($this->Place_of_Transit->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`id_nation`" . ew_SearchString("=", $this->Place_of_Transit->CurrentValue, EW_DATATYPE_STRING, ""); } switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Transit->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Transit->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Transit->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Place_of_Transit, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); $arwrk = ($rswrk) ? $rswrk->GetRows() : array(); if ($rswrk) $rswrk->Close(); $this->Place_of_Transit->EditValue = $arwrk; // Address_of_Transit $this->Address_of_Transit->EditAttrs["class"] = "form-control"; $this->Address_of_Transit->EditCustomAttributes = ""; $this->Address_of_Transit->EditValue = ew_HtmlEncode($this->Address_of_Transit->CurrentValue); $this->Address_of_Transit->PlaceHolder = ew_RemoveHtml($this->Address_of_Transit->FldCaption()); // Town_of_transit $this->Town_of_transit->EditAttrs["class"] = "form-control"; $this->Town_of_transit->EditCustomAttributes = ""; $this->Town_of_transit->EditValue = ew_HtmlEncode($this->Town_of_transit->CurrentValue); $this->Town_of_transit->PlaceHolder = ew_RemoveHtml($this->Town_of_transit->FldCaption()); // domicile_description $this->domicile_description->EditAttrs["class"] = "form-control"; $this->domicile_description->EditCustomAttributes = ""; $this->domicile_description->EditValue = ew_HtmlEncode($this->domicile_description->CurrentValue); $this->domicile_description->PlaceHolder = ew_RemoveHtml($this->domicile_description->FldCaption()); // Disabled $this->Disabled->EditCustomAttributes = ""; $this->Disabled->EditValue = $this->Disabled->Options(FALSE); // Sick $this->Sick->EditCustomAttributes = ""; $this->Sick->EditValue = $this->Sick->Options(FALSE); // Alone $this->Alone->EditCustomAttributes = ""; $this->Alone->EditValue = $this->Alone->Options(FALSE); // Elderly $this->Elderly->EditCustomAttributes = ""; $this->Elderly->EditValue = $this->Elderly->Options(FALSE); // Family $this->Family->EditCustomAttributes = ""; $this->Family->EditValue = $this->Family->Options(FALSE); // Householder $this->Householder->EditCustomAttributes = ""; $this->Householder->EditValue = $this->Householder->Options(FALSE); // Householder_id $this->Householder_id->EditAttrs["class"] = "form-control"; $this->Householder_id->EditCustomAttributes = ""; $this->Householder_id->EditValue = ew_HtmlEncode($this->Householder_id->CurrentValue); $this->Householder_id->PlaceHolder = ew_RemoveHtml($this->Householder_id->FldCaption()); // Householder_reltype $this->Householder_reltype->EditAttrs["class"] = "form-control"; $this->Householder_reltype->EditCustomAttributes = ""; if (trim(strval($this->Householder_reltype->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`family_rel`" . ew_SearchString("=", $this->Householder_reltype->CurrentValue, EW_DATATYPE_STRING, ""); } switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `family_rel`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tfamily_rel`"; $sWhereWrk = ""; $this->Householder_reltype->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `family_rel`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tfamily_rel`"; $sWhereWrk = ""; $this->Householder_reltype->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `family_rel`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tfamily_rel`"; $sWhereWrk = ""; $this->Householder_reltype->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Householder_reltype, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); $arwrk = ($rswrk) ? $rswrk->GetRows() : array(); if ($rswrk) $rswrk->Close(); $this->Householder_reltype->EditValue = $arwrk; // Ethnic_group $this->Ethnic_group->EditAttrs["class"] = "form-control"; $this->Ethnic_group->EditCustomAttributes = ""; $this->Ethnic_group->EditValue = ew_HtmlEncode($this->Ethnic_group->CurrentValue); $this->Ethnic_group->PlaceHolder = ew_RemoveHtml($this->Ethnic_group->FldCaption()); // Known_languages $this->Known_languages->EditAttrs["class"] = "form-control"; $this->Known_languages->EditCustomAttributes = ""; $this->Known_languages->EditValue = ew_HtmlEncode($this->Known_languages->CurrentValue); $this->Known_languages->PlaceHolder = ew_RemoveHtml($this->Known_languages->FldCaption()); // Title_of_study $this->Title_of_study->EditAttrs["class"] = "form-control"; $this->Title_of_study->EditCustomAttributes = ""; $this->Title_of_study->EditValue = ew_HtmlEncode($this->Title_of_study->CurrentValue); $this->Title_of_study->PlaceHolder = ew_RemoveHtml($this->Title_of_study->FldCaption()); // Poss_destination_country $this->Poss_destination_country->EditAttrs["class"] = "form-control"; $this->Poss_destination_country->EditCustomAttributes = ""; $this->Poss_destination_country->EditValue = ew_HtmlEncode($this->Poss_destination_country->CurrentValue); $this->Poss_destination_country->PlaceHolder = ew_RemoveHtml($this->Poss_destination_country->FldCaption()); // Document_type $this->Document_type->EditAttrs["class"] = "form-control"; $this->Document_type->EditCustomAttributes = ""; if (trim(strval($this->Document_type->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`Doc_type`" . ew_SearchString("=", $this->Document_type->CurrentValue, EW_DATATYPE_STRING, ""); } switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Doc_type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tdoc_type`"; $sWhereWrk = ""; $this->Document_type->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Doc_type`, `Description_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tdoc_type`"; $sWhereWrk = ""; $this->Document_type->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Doc_type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tdoc_type`"; $sWhereWrk = ""; $this->Document_type->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Document_type, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); $arwrk = ($rswrk) ? $rswrk->GetRows() : array(); if ($rswrk) $rswrk->Close(); $this->Document_type->EditValue = $arwrk; // Document_number $this->Document_number->EditAttrs["class"] = "form-control"; $this->Document_number->EditCustomAttributes = ""; $this->Document_number->EditValue = ew_HtmlEncode($this->Document_number->CurrentValue); $this->Document_number->PlaceHolder = ew_RemoveHtml($this->Document_number->FldCaption()); // Document_release $this->Document_release->EditAttrs["class"] = "form-control"; $this->Document_release->EditCustomAttributes = ""; $this->Document_release->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->Document_release->CurrentValue, 7)); $this->Document_release->PlaceHolder = ew_RemoveHtml($this->Document_release->FldCaption()); // Document_expiry $this->Document_expiry->EditAttrs["class"] = "form-control"; $this->Document_expiry->EditCustomAttributes = ""; $this->Document_expiry->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->Document_expiry->CurrentValue, 7)); $this->Document_expiry->PlaceHolder = ew_RemoveHtml($this->Document_expiry->FldCaption()); // Document_nationality $this->Document_nationality->EditAttrs["class"] = "form-control"; $this->Document_nationality->EditCustomAttributes = ""; if (trim(strval($this->Document_nationality->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`id_nation`" . ew_SearchString("=", $this->Document_nationality->CurrentValue, EW_DATATYPE_STRING, ""); } switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tnations`"; $sWhereWrk = ""; $this->Document_nationality->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tnations`"; $sWhereWrk = ""; $this->Document_nationality->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tnations`"; $sWhereWrk = ""; $this->Document_nationality->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Document_nationality, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); $arwrk = ($rswrk) ? $rswrk->GetRows() : array(); if ($rswrk) $rswrk->Close(); $this->Document_nationality->EditValue = $arwrk; // other_documents $this->other_documents->EditAttrs["class"] = "form-control"; $this->other_documents->EditCustomAttributes = ""; $this->other_documents->EditValue = ew_HtmlEncode($this->other_documents->CurrentValue); $this->other_documents->PlaceHolder = ew_RemoveHtml($this->other_documents->FldCaption()); // Final_evaluation $this->Final_evaluation->EditAttrs["class"] = "form-control"; $this->Final_evaluation->EditCustomAttributes = ""; if (trim(strval($this->Final_evaluation->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`Eval_type`" . ew_SearchString("=", $this->Final_evaluation->CurrentValue, EW_DATATYPE_STRING, ""); } switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Eval_type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `teval_type`"; $sWhereWrk = ""; $this->Final_evaluation->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Eval_type`, `Description_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `teval_type`"; $sWhereWrk = ""; $this->Final_evaluation->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Eval_type`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `teval_type`"; $sWhereWrk = ""; $this->Final_evaluation->LookupFilters = array(); break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->Final_evaluation, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $rswrk = Conn()->Execute($sSqlWrk); $arwrk = ($rswrk) ? $rswrk->GetRows() : array(); if ($rswrk) $rswrk->Close(); $this->Final_evaluation->EditValue = $arwrk; // photo $this->photo->EditAttrs["class"] = "form-control"; $this->photo->EditCustomAttributes = ""; $this->photo->UploadPath = "uploads/ospiti/".$this->idSeeker->DbValue; if (!ew_Empty($this->photo->Upload->DbValue)) { $this->photo->ImageWidth = EW_THUMBNAIL_DEFAULT_WIDTH; $this->photo->ImageHeight = EW_THUMBNAIL_DEFAULT_HEIGHT; $this->photo->ImageAlt = $this->photo->FldAlt(); $this->photo->EditValue = $this->photo->Upload->DbValue; } else { $this->photo->EditValue = ""; } if (!ew_Empty($this->photo->CurrentValue)) $this->photo->Upload->FileName = $this->photo->CurrentValue; if ($this->CurrentAction == "I" && !$this->EventCancelled) ew_RenderUploadField($this->photo); // doc_image $this->doc_image->EditAttrs["class"] = "form-control"; $this->doc_image->EditCustomAttributes = ""; $this->doc_image->UploadPath = "uploads/ospiti_doc/".$this->idSeeker->DbValue; if (!ew_Empty($this->doc_image->Upload->DbValue)) { $this->doc_image->ImageWidth = EW_THUMBNAIL_DEFAULT_WIDTH; $this->doc_image->ImageHeight = EW_THUMBNAIL_DEFAULT_HEIGHT; $this->doc_image->ImageAlt = $this->doc_image->FldAlt(); $this->doc_image->EditValue = $this->doc_image->Upload->DbValue; } else { $this->doc_image->EditValue = ""; } if (!ew_Empty($this->doc_image->CurrentValue)) $this->doc_image->Upload->FileName = $this->doc_image->CurrentValue; if ($this->CurrentAction == "I" && !$this->EventCancelled) ew_RenderUploadField($this->doc_image); // Notes $this->Notes->EditAttrs["class"] = "form-control"; $this->Notes->EditCustomAttributes = ""; $this->Notes->EditValue = ew_HtmlEncode($this->Notes->CurrentValue); $this->Notes->PlaceHolder = ew_RemoveHtml($this->Notes->FldCaption()); // Interview_1 $this->Interview_1->EditCustomAttributes = ""; $this->Interview_1->EditValue = $this->Interview_1->Options(FALSE); // interview1_date $this->interview1_date->EditAttrs["class"] = "form-control"; $this->interview1_date->EditCustomAttributes = ""; $this->interview1_date->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->interview1_date->CurrentValue, 8)); $this->interview1_date->PlaceHolder = ew_RemoveHtml($this->interview1_date->FldCaption()); // Interview_2 $this->Interview_2->EditCustomAttributes = ""; $this->Interview_2->EditValue = $this->Interview_2->Options(FALSE); // interview_2_date $this->interview_2_date->EditAttrs["class"] = "form-control"; $this->interview_2_date->EditCustomAttributes = ""; $this->interview_2_date->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->interview_2_date->CurrentValue, 8)); $this->interview_2_date->PlaceHolder = ew_RemoveHtml($this->interview_2_date->FldCaption()); // Interview_3 $this->Interview_3->EditCustomAttributes = ""; $this->Interview_3->EditValue = $this->Interview_3->Options(FALSE); // interview_3_date $this->interview_3_date->EditAttrs["class"] = "form-control"; $this->interview_3_date->EditCustomAttributes = ""; $this->interview_3_date->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->interview_3_date->CurrentValue, 8)); $this->interview_3_date->PlaceHolder = ew_RemoveHtml($this->interview_3_date->FldCaption()); // Zone_of_Transit $this->Zone_of_Transit->EditAttrs["class"] = "form-control"; $this->Zone_of_Transit->EditCustomAttributes = ""; $this->Zone_of_Transit->EditValue = ew_HtmlEncode($this->Zone_of_Transit->CurrentValue); $this->Zone_of_Transit->PlaceHolder = ew_RemoveHtml($this->Zone_of_Transit->FldCaption()); // Travel_number $this->Travel_number->EditAttrs["class"] = "form-control"; $this->Travel_number->EditCustomAttributes = ""; $this->Travel_number->EditValue = ew_HtmlEncode($this->Travel_number->CurrentValue); $this->Travel_number->PlaceHolder = ew_RemoveHtml($this->Travel_number->FldCaption()); // Travel_arrival_date $this->Travel_arrival_date->EditAttrs["class"] = "form-control"; $this->Travel_arrival_date->EditCustomAttributes = ""; $this->Travel_arrival_date->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->Travel_arrival_date->CurrentValue, 8)); $this->Travel_arrival_date->PlaceHolder = ew_RemoveHtml($this->Travel_arrival_date->FldCaption()); // Travel_arrival_time $this->Travel_arrival_time->EditAttrs["class"] = "form-control"; $this->Travel_arrival_time->EditCustomAttributes = ""; $this->Travel_arrival_time->EditValue = ew_HtmlEncode($this->Travel_arrival_time->CurrentValue); $this->Travel_arrival_time->PlaceHolder = ew_RemoveHtml($this->Travel_arrival_time->FldCaption()); // num_family $this->num_family->EditAttrs["class"] = "form-control"; $this->num_family->EditCustomAttributes = ""; $this->num_family->EditValue = ew_HtmlEncode($this->num_family->CurrentValue); $this->num_family->PlaceHolder = ew_RemoveHtml($this->num_family->FldCaption()); // speak_ENG $this->speak_ENG->EditCustomAttributes = ""; $this->speak_ENG->EditValue = $this->speak_ENG->Options(FALSE); // speak_FRA $this->speak_FRA->EditCustomAttributes = ""; $this->speak_FRA->EditValue = $this->speak_FRA->Options(FALSE); // speak_ARA $this->speak_ARA->EditCustomAttributes = ""; $this->speak_ARA->EditValue = $this->speak_ARA->Options(FALSE); // speak_ITA $this->speak_ITA->EditCustomAttributes = ""; $this->speak_ITA->EditValue = $this->speak_ITA->Options(FALSE); // lives_with $this->lives_with->EditAttrs["class"] = "form-control"; $this->lives_with->EditCustomAttributes = ""; $this->lives_with->EditValue = ew_HtmlEncode($this->lives_with->CurrentValue); $this->lives_with->PlaceHolder = ew_RemoveHtml($this->lives_with->FldCaption()); // family_know $this->family_know->EditCustomAttributes = ""; $this->family_know->EditValue = $this->family_know->Options(FALSE); // date_of_entry_transit $this->date_of_entry_transit->EditAttrs["class"] = "form-control"; $this->date_of_entry_transit->EditCustomAttributes = ""; $this->date_of_entry_transit->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->date_of_entry_transit->CurrentValue, 8)); $this->date_of_entry_transit->PlaceHolder = ew_RemoveHtml($this->date_of_entry_transit->FldCaption()); // marital_status $this->marital_status->EditAttrs["class"] = "form-control"; $this->marital_status->EditCustomAttributes = ""; $this->marital_status->EditValue = ew_HtmlEncode($this->marital_status->CurrentValue); $this->marital_status->PlaceHolder = ew_RemoveHtml($this->marital_status->FldCaption()); // consort_id $this->consort_id->EditAttrs["class"] = "form-control"; $this->consort_id->EditCustomAttributes = ""; $this->consort_id->EditValue = ew_HtmlEncode($this->consort_id->CurrentValue); $this->consort_id->PlaceHolder = ew_RemoveHtml($this->consort_id->FldCaption()); // consort_info $this->consort_info->EditAttrs["class"] = "form-control"; $this->consort_info->EditCustomAttributes = ""; $this->consort_info->EditValue = ew_HtmlEncode($this->consort_info->CurrentValue); $this->consort_info->PlaceHolder = ew_RemoveHtml($this->consort_info->FldCaption()); // other_fam_in_italy $this->other_fam_in_italy->EditAttrs["class"] = "form-control"; $this->other_fam_in_italy->EditCustomAttributes = ""; $this->other_fam_in_italy->EditValue = ew_HtmlEncode($this->other_fam_in_italy->CurrentValue); $this->other_fam_in_italy->PlaceHolder = ew_RemoveHtml($this->other_fam_in_italy->FldCaption()); // other_fam_in_europe $this->other_fam_in_europe->EditAttrs["class"] = "form-control"; $this->other_fam_in_europe->EditCustomAttributes = ""; $this->other_fam_in_europe->EditValue = ew_HtmlEncode($this->other_fam_in_europe->CurrentValue); $this->other_fam_in_europe->PlaceHolder = ew_RemoveHtml($this->other_fam_in_europe->FldCaption()); // where_lived $this->where_lived->EditAttrs["class"] = "form-control"; $this->where_lived->EditCustomAttributes = ""; $this->where_lived->EditValue = ew_HtmlEncode($this->where_lived->CurrentValue); $this->where_lived->PlaceHolder = ew_RemoveHtml($this->where_lived->FldCaption()); // medical_situation $this->medical_situation->EditAttrs["class"] = "form-control"; $this->medical_situation->EditCustomAttributes = ""; $this->medical_situation->EditValue = ew_HtmlEncode($this->medical_situation->CurrentValue); $this->medical_situation->PlaceHolder = ew_RemoveHtml($this->medical_situation->FldCaption()); // social_situation $this->social_situation->EditAttrs["class"] = "form-control"; $this->social_situation->EditCustomAttributes = ""; $this->social_situation->EditValue = ew_HtmlEncode($this->social_situation->CurrentValue); $this->social_situation->PlaceHolder = ew_RemoveHtml($this->social_situation->FldCaption()); // abuse_suffered $this->abuse_suffered->EditCustomAttributes = ""; $this->abuse_suffered->EditValue = $this->abuse_suffered->Options(FALSE); // abuse_description $this->abuse_description->EditAttrs["class"] = "form-control"; $this->abuse_description->EditCustomAttributes = ""; $this->abuse_description->EditValue = ew_HtmlEncode($this->abuse_description->CurrentValue); $this->abuse_description->PlaceHolder = ew_RemoveHtml($this->abuse_description->FldCaption()); // work_done $this->work_done->EditAttrs["class"] = "form-control"; $this->work_done->EditCustomAttributes = ""; $this->work_done->EditValue = ew_HtmlEncode($this->work_done->CurrentValue); $this->work_done->PlaceHolder = ew_RemoveHtml($this->work_done->FldCaption()); // military_service $this->military_service->EditAttrs["class"] = "form-control"; $this->military_service->EditCustomAttributes = ""; $this->military_service->EditValue = ew_HtmlEncode($this->military_service->CurrentValue); $this->military_service->PlaceHolder = ew_RemoveHtml($this->military_service->FldCaption()); // itinerary $this->itinerary->EditAttrs["class"] = "form-control"; $this->itinerary->EditCustomAttributes = ""; $this->itinerary->EditValue = ew_HtmlEncode($this->itinerary->CurrentValue); $this->itinerary->PlaceHolder = ew_RemoveHtml($this->itinerary->FldCaption()); // convictions $this->convictions->EditCustomAttributes = ""; $this->convictions->EditValue = $this->convictions->Options(FALSE); // requested_asylum $this->requested_asylum->EditAttrs["class"] = "form-control"; $this->requested_asylum->EditCustomAttributes = ""; $this->requested_asylum->EditValue = ew_HtmlEncode($this->requested_asylum->CurrentValue); $this->requested_asylum->PlaceHolder = ew_RemoveHtml($this->requested_asylum->FldCaption()); // resettlement_application $this->resettlement_application->EditCustomAttributes = ""; $this->resettlement_application->EditValue = $this->resettlement_application->Options(FALSE); // resettlement_country $this->resettlement_country->EditAttrs["class"] = "form-control"; $this->resettlement_country->EditCustomAttributes = ""; $this->resettlement_country->EditValue = ew_HtmlEncode($this->resettlement_country->CurrentValue); $this->resettlement_country->PlaceHolder = ew_RemoveHtml($this->resettlement_country->FldCaption()); // reunion_application $this->reunion_application->EditCustomAttributes = ""; $this->reunion_application->EditValue = $this->reunion_application->Options(FALSE); // reunion_country $this->reunion_country->EditAttrs["class"] = "form-control"; $this->reunion_country->EditCustomAttributes = ""; $this->reunion_country->EditValue = ew_HtmlEncode($this->reunion_country->CurrentValue); $this->reunion_country->PlaceHolder = ew_RemoveHtml($this->reunion_country->FldCaption()); // belongs_to_organization $this->belongs_to_organization->EditCustomAttributes = ""; $this->belongs_to_organization->EditValue = $this->belongs_to_organization->Options(FALSE); // organizations $this->organizations->EditAttrs["class"] = "form-control"; $this->organizations->EditCustomAttributes = ""; $this->organizations->EditValue = ew_HtmlEncode($this->organizations->CurrentValue); $this->organizations->PlaceHolder = ew_RemoveHtml($this->organizations->FldCaption()); // presentations $this->presentations->EditAttrs["class"] = "form-control"; $this->presentations->EditCustomAttributes = ""; $this->presentations->EditValue = ew_HtmlEncode($this->presentations->CurrentValue); $this->presentations->PlaceHolder = ew_RemoveHtml($this->presentations->FldCaption()); // report $this->report->EditAttrs["class"] = "form-control"; $this->report->EditCustomAttributes = ""; $this->report->EditValue = ew_HtmlEncode($this->report->CurrentValue); $this->report->PlaceHolder = ew_RemoveHtml($this->report->FldCaption()); // Edit refer script // Desk $this->Desk->LinkCustomAttributes = ""; $this->Desk->HrefValue = ""; // UNHCR_code $this->UNHCR_code->LinkCustomAttributes = ""; $this->UNHCR_code->HrefValue = ""; // Name $this->Name->LinkCustomAttributes = ""; $this->Name->HrefValue = ""; // Surname $this->Surname->LinkCustomAttributes = ""; $this->Surname->HrefValue = ""; // BirthDate $this->BirthDate->LinkCustomAttributes = ""; $this->BirthDate->HrefValue = ""; // BirthPlace $this->BirthPlace->LinkCustomAttributes = ""; $this->BirthPlace->HrefValue = ""; // Nationality $this->Nationality->LinkCustomAttributes = ""; $this->Nationality->HrefValue = ""; // Citizenship $this->Citizenship->LinkCustomAttributes = ""; $this->Citizenship->HrefValue = ""; // Sex $this->Sex->LinkCustomAttributes = ""; $this->Sex->HrefValue = ""; // Phone $this->Phone->LinkCustomAttributes = ""; $this->Phone->HrefValue = ""; // Email $this->_Email->LinkCustomAttributes = ""; $this->_Email->HrefValue = ""; // Religion $this->Religion->LinkCustomAttributes = ""; $this->Religion->HrefValue = ""; // Place_of_Residence $this->Place_of_Residence->LinkCustomAttributes = ""; $this->Place_of_Residence->HrefValue = ""; // Address_of_Residence $this->Address_of_Residence->LinkCustomAttributes = ""; $this->Address_of_Residence->HrefValue = ""; // Town_of_residence $this->Town_of_residence->LinkCustomAttributes = ""; $this->Town_of_residence->HrefValue = ""; // Place_of_Transit $this->Place_of_Transit->LinkCustomAttributes = ""; $this->Place_of_Transit->HrefValue = ""; // Address_of_Transit $this->Address_of_Transit->LinkCustomAttributes = ""; $this->Address_of_Transit->HrefValue = ""; // Town_of_transit $this->Town_of_transit->LinkCustomAttributes = ""; $this->Town_of_transit->HrefValue = ""; // domicile_description $this->domicile_description->LinkCustomAttributes = ""; $this->domicile_description->HrefValue = ""; // Disabled $this->Disabled->LinkCustomAttributes = ""; $this->Disabled->HrefValue = ""; // Sick $this->Sick->LinkCustomAttributes = ""; $this->Sick->HrefValue = ""; // Alone $this->Alone->LinkCustomAttributes = ""; $this->Alone->HrefValue = ""; // Elderly $this->Elderly->LinkCustomAttributes = ""; $this->Elderly->HrefValue = ""; // Family $this->Family->LinkCustomAttributes = ""; $this->Family->HrefValue = ""; // Householder $this->Householder->LinkCustomAttributes = ""; $this->Householder->HrefValue = ""; // Householder_id $this->Householder_id->LinkCustomAttributes = ""; $this->Householder_id->HrefValue = ""; // Householder_reltype $this->Householder_reltype->LinkCustomAttributes = ""; $this->Householder_reltype->HrefValue = ""; // Ethnic_group $this->Ethnic_group->LinkCustomAttributes = ""; $this->Ethnic_group->HrefValue = ""; // Known_languages $this->Known_languages->LinkCustomAttributes = ""; $this->Known_languages->HrefValue = ""; // Title_of_study $this->Title_of_study->LinkCustomAttributes = ""; $this->Title_of_study->HrefValue = ""; // Poss_destination_country $this->Poss_destination_country->LinkCustomAttributes = ""; $this->Poss_destination_country->HrefValue = ""; // Document_type $this->Document_type->LinkCustomAttributes = ""; $this->Document_type->HrefValue = ""; // Document_number $this->Document_number->LinkCustomAttributes = ""; $this->Document_number->HrefValue = ""; // Document_release $this->Document_release->LinkCustomAttributes = ""; $this->Document_release->HrefValue = ""; // Document_expiry $this->Document_expiry->LinkCustomAttributes = ""; $this->Document_expiry->HrefValue = ""; // Document_nationality $this->Document_nationality->LinkCustomAttributes = ""; $this->Document_nationality->HrefValue = ""; // other_documents $this->other_documents->LinkCustomAttributes = ""; $this->other_documents->HrefValue = ""; // Final_evaluation $this->Final_evaluation->LinkCustomAttributes = ""; $this->Final_evaluation->HrefValue = ""; // photo $this->photo->LinkCustomAttributes = ""; $this->photo->UploadPath = "uploads/ospiti/".$this->idSeeker->DbValue; if (!ew_Empty($this->photo->Upload->DbValue)) { $this->photo->HrefValue = ew_GetFileUploadUrl($this->photo, $this->photo->Upload->DbValue); // Add prefix/suffix $this->photo->LinkAttrs["target"] = ""; // Add target if ($this->Export <> "") $this->photo->HrefValue = ew_ConvertFullUrl($this->photo->HrefValue); } else { $this->photo->HrefValue = ""; } $this->photo->HrefValue2 = $this->photo->UploadPath . $this->photo->Upload->DbValue; // doc_image $this->doc_image->LinkCustomAttributes = ""; $this->doc_image->UploadPath = "uploads/ospiti_doc/".$this->idSeeker->DbValue; if (!ew_Empty($this->doc_image->Upload->DbValue)) { $this->doc_image->HrefValue = ew_GetFileUploadUrl($this->doc_image, $this->doc_image->Upload->DbValue); // Add prefix/suffix $this->doc_image->LinkAttrs["target"] = ""; // Add target if ($this->Export <> "") $this->doc_image->HrefValue = ew_ConvertFullUrl($this->doc_image->HrefValue); } else { $this->doc_image->HrefValue = ""; } $this->doc_image->HrefValue2 = $this->doc_image->UploadPath . $this->doc_image->Upload->DbValue; // Notes $this->Notes->LinkCustomAttributes = ""; $this->Notes->HrefValue = ""; // Interview_1 $this->Interview_1->LinkCustomAttributes = ""; $this->Interview_1->HrefValue = ""; // interview1_date $this->interview1_date->LinkCustomAttributes = ""; $this->interview1_date->HrefValue = ""; // Interview_2 $this->Interview_2->LinkCustomAttributes = ""; $this->Interview_2->HrefValue = ""; // interview_2_date $this->interview_2_date->LinkCustomAttributes = ""; $this->interview_2_date->HrefValue = ""; // Interview_3 $this->Interview_3->LinkCustomAttributes = ""; $this->Interview_3->HrefValue = ""; // interview_3_date $this->interview_3_date->LinkCustomAttributes = ""; $this->interview_3_date->HrefValue = ""; // Zone_of_Transit $this->Zone_of_Transit->LinkCustomAttributes = ""; $this->Zone_of_Transit->HrefValue = ""; // Travel_number $this->Travel_number->LinkCustomAttributes = ""; $this->Travel_number->HrefValue = ""; // Travel_arrival_date $this->Travel_arrival_date->LinkCustomAttributes = ""; $this->Travel_arrival_date->HrefValue = ""; // Travel_arrival_time $this->Travel_arrival_time->LinkCustomAttributes = ""; $this->Travel_arrival_time->HrefValue = ""; // num_family $this->num_family->LinkCustomAttributes = ""; $this->num_family->HrefValue = ""; // speak_ENG $this->speak_ENG->LinkCustomAttributes = ""; $this->speak_ENG->HrefValue = ""; // speak_FRA $this->speak_FRA->LinkCustomAttributes = ""; $this->speak_FRA->HrefValue = ""; // speak_ARA $this->speak_ARA->LinkCustomAttributes = ""; $this->speak_ARA->HrefValue = ""; // speak_ITA $this->speak_ITA->LinkCustomAttributes = ""; $this->speak_ITA->HrefValue = ""; // lives_with $this->lives_with->LinkCustomAttributes = ""; $this->lives_with->HrefValue = ""; // family_know $this->family_know->LinkCustomAttributes = ""; $this->family_know->HrefValue = ""; // date_of_entry_transit $this->date_of_entry_transit->LinkCustomAttributes = ""; $this->date_of_entry_transit->HrefValue = ""; // marital_status $this->marital_status->LinkCustomAttributes = ""; $this->marital_status->HrefValue = ""; // consort_id $this->consort_id->LinkCustomAttributes = ""; $this->consort_id->HrefValue = ""; // consort_info $this->consort_info->LinkCustomAttributes = ""; $this->consort_info->HrefValue = ""; // other_fam_in_italy $this->other_fam_in_italy->LinkCustomAttributes = ""; $this->other_fam_in_italy->HrefValue = ""; // other_fam_in_europe $this->other_fam_in_europe->LinkCustomAttributes = ""; $this->other_fam_in_europe->HrefValue = ""; // where_lived $this->where_lived->LinkCustomAttributes = ""; $this->where_lived->HrefValue = ""; // medical_situation $this->medical_situation->LinkCustomAttributes = ""; $this->medical_situation->HrefValue = ""; // social_situation $this->social_situation->LinkCustomAttributes = ""; $this->social_situation->HrefValue = ""; // abuse_suffered $this->abuse_suffered->LinkCustomAttributes = ""; $this->abuse_suffered->HrefValue = ""; // abuse_description $this->abuse_description->LinkCustomAttributes = ""; $this->abuse_description->HrefValue = ""; // work_done $this->work_done->LinkCustomAttributes = ""; $this->work_done->HrefValue = ""; // military_service $this->military_service->LinkCustomAttributes = ""; $this->military_service->HrefValue = ""; // itinerary $this->itinerary->LinkCustomAttributes = ""; $this->itinerary->HrefValue = ""; // convictions $this->convictions->LinkCustomAttributes = ""; $this->convictions->HrefValue = ""; // requested_asylum $this->requested_asylum->LinkCustomAttributes = ""; $this->requested_asylum->HrefValue = ""; // resettlement_application $this->resettlement_application->LinkCustomAttributes = ""; $this->resettlement_application->HrefValue = ""; // resettlement_country $this->resettlement_country->LinkCustomAttributes = ""; $this->resettlement_country->HrefValue = ""; // reunion_application $this->reunion_application->LinkCustomAttributes = ""; $this->reunion_application->HrefValue = ""; // reunion_country $this->reunion_country->LinkCustomAttributes = ""; $this->reunion_country->HrefValue = ""; // belongs_to_organization $this->belongs_to_organization->LinkCustomAttributes = ""; $this->belongs_to_organization->HrefValue = ""; // organizations $this->organizations->LinkCustomAttributes = ""; $this->organizations->HrefValue = ""; // presentations $this->presentations->LinkCustomAttributes = ""; $this->presentations->HrefValue = ""; // report $this->report->LinkCustomAttributes = ""; $this->report->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT) $this->Row_Rendered(); } // Validate form function ValidateForm() { global $Language, $gsFormError; // Initialize form error message $gsFormError = ""; // Check if validation required if (!EW_SERVER_VALIDATE) return ($gsFormError == ""); if (!ew_CheckEuroDate($this->BirthDate->FormValue)) { ew_AddMessage($gsFormError, $this->BirthDate->FldErrMsg()); } if (!ew_CheckEuroDate($this->Document_release->FormValue)) { ew_AddMessage($gsFormError, $this->Document_release->FldErrMsg()); } if (!ew_CheckEuroDate($this->Document_expiry->FormValue)) { ew_AddMessage($gsFormError, $this->Document_expiry->FldErrMsg()); } if (!ew_CheckDateDef($this->interview1_date->FormValue)) { ew_AddMessage($gsFormError, $this->interview1_date->FldErrMsg()); } if (!ew_CheckDateDef($this->interview_2_date->FormValue)) { ew_AddMessage($gsFormError, $this->interview_2_date->FldErrMsg()); } if (!ew_CheckDateDef($this->interview_3_date->FormValue)) { ew_AddMessage($gsFormError, $this->interview_3_date->FldErrMsg()); } if (!ew_CheckDateDef($this->Travel_arrival_date->FormValue)) { ew_AddMessage($gsFormError, $this->Travel_arrival_date->FldErrMsg()); } if (!ew_CheckTime($this->Travel_arrival_time->FormValue)) { ew_AddMessage($gsFormError, $this->Travel_arrival_time->FldErrMsg()); } if (!ew_CheckInteger($this->num_family->FormValue)) { ew_AddMessage($gsFormError, $this->num_family->FldErrMsg()); } if (!ew_CheckDateDef($this->date_of_entry_transit->FormValue)) { ew_AddMessage($gsFormError, $this->date_of_entry_transit->FldErrMsg()); } if (!ew_CheckInteger($this->consort_id->FormValue)) { ew_AddMessage($gsFormError, $this->consort_id->FldErrMsg()); } // Validate detail grid $DetailTblVar = explode(",", $this->getCurrentDetailTable()); if (in_array("tassigment", $DetailTblVar) && $GLOBALS["tassigment"]->DetailEdit) { if (!isset($GLOBALS["tassigment_grid"])) $GLOBALS["tassigment_grid"] = new ctassigment_grid(); // get detail page object $GLOBALS["tassigment_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; } // Update record based on key values function EditRow() { global $Security, $Language; $sFilter = $this->KeyFilter(); $sFilter = $this->ApplyUserIDFilters($sFilter); $conn = &$this->Connection(); $this->CurrentFilter = $sFilter; $sSql = $this->SQL(); $conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"]; $rs = $conn->Execute($sSql); $conn->raiseErrorFn = ''; if ($rs === FALSE) return FALSE; if ($rs->EOF) { $this->setFailureMessage($Language->Phrase("NoRecord")); // Set no record message $EditRow = FALSE; // Update Failed } else { // Begin transaction if ($this->getCurrentDetailTable() <> "") $conn->BeginTrans(); // Save old values $rsold = &$rs->fields; $this->LoadDbValues($rsold); $this->photo->OldUploadPath = "uploads/ospiti/".$this->idSeeker->DbValue; $this->photo->UploadPath = $this->photo->OldUploadPath; $this->doc_image->OldUploadPath = "uploads/ospiti_doc/".$this->idSeeker->DbValue; $this->doc_image->UploadPath = $this->doc_image->OldUploadPath; $rsnew = array(); // Desk $this->Desk->SetDbValueDef($rsnew, $this->Desk->CurrentValue, NULL, $this->Desk->ReadOnly); // UNHCR_code $this->UNHCR_code->SetDbValueDef($rsnew, $this->UNHCR_code->CurrentValue, NULL, $this->UNHCR_code->ReadOnly); // Name $this->Name->SetDbValueDef($rsnew, $this->Name->CurrentValue, NULL, $this->Name->ReadOnly); // Surname $this->Surname->SetDbValueDef($rsnew, $this->Surname->CurrentValue, NULL, $this->Surname->ReadOnly); // BirthDate $this->BirthDate->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->BirthDate->CurrentValue, 7), NULL, $this->BirthDate->ReadOnly); // BirthPlace $this->BirthPlace->SetDbValueDef($rsnew, $this->BirthPlace->CurrentValue, NULL, $this->BirthPlace->ReadOnly); // Nationality $this->Nationality->SetDbValueDef($rsnew, $this->Nationality->CurrentValue, NULL, $this->Nationality->ReadOnly); // Citizenship $this->Citizenship->SetDbValueDef($rsnew, $this->Citizenship->CurrentValue, NULL, $this->Citizenship->ReadOnly); // Sex $this->Sex->SetDbValueDef($rsnew, $this->Sex->CurrentValue, NULL, $this->Sex->ReadOnly); // Phone $this->Phone->SetDbValueDef($rsnew, $this->Phone->CurrentValue, NULL, $this->Phone->ReadOnly); // Email $this->_Email->SetDbValueDef($rsnew, $this->_Email->CurrentValue, NULL, $this->_Email->ReadOnly); // Religion $this->Religion->SetDbValueDef($rsnew, $this->Religion->CurrentValue, NULL, $this->Religion->ReadOnly); // Place_of_Residence $this->Place_of_Residence->SetDbValueDef($rsnew, $this->Place_of_Residence->CurrentValue, NULL, $this->Place_of_Residence->ReadOnly); // Address_of_Residence $this->Address_of_Residence->SetDbValueDef($rsnew, $this->Address_of_Residence->CurrentValue, NULL, $this->Address_of_Residence->ReadOnly); // Town_of_residence $this->Town_of_residence->SetDbValueDef($rsnew, $this->Town_of_residence->CurrentValue, NULL, $this->Town_of_residence->ReadOnly); // Place_of_Transit $this->Place_of_Transit->SetDbValueDef($rsnew, $this->Place_of_Transit->CurrentValue, NULL, $this->Place_of_Transit->ReadOnly); // Address_of_Transit $this->Address_of_Transit->SetDbValueDef($rsnew, $this->Address_of_Transit->CurrentValue, NULL, $this->Address_of_Transit->ReadOnly); // Town_of_transit $this->Town_of_transit->SetDbValueDef($rsnew, $this->Town_of_transit->CurrentValue, NULL, $this->Town_of_transit->ReadOnly); // domicile_description $this->domicile_description->SetDbValueDef($rsnew, $this->domicile_description->CurrentValue, NULL, $this->domicile_description->ReadOnly); // Disabled $this->Disabled->SetDbValueDef($rsnew, ((strval($this->Disabled->CurrentValue) == "Y") ? "Y" : "N"), NULL, $this->Disabled->ReadOnly); // Sick $this->Sick->SetDbValueDef($rsnew, ((strval($this->Sick->CurrentValue) == "Y") ? "Y" : "N"), NULL, $this->Sick->ReadOnly); // Alone $this->Alone->SetDbValueDef($rsnew, ((strval($this->Alone->CurrentValue) == "Y") ? "Y" : "N"), NULL, $this->Alone->ReadOnly); // Elderly $this->Elderly->SetDbValueDef($rsnew, ((strval($this->Elderly->CurrentValue) == "Y") ? "Y" : "N"), NULL, $this->Elderly->ReadOnly); // Family $this->Family->SetDbValueDef($rsnew, ((strval($this->Family->CurrentValue) == "Y") ? "Y" : "N"), NULL, $this->Family->ReadOnly); // Householder $this->Householder->SetDbValueDef($rsnew, ((strval($this->Householder->CurrentValue) == "Y") ? "Y" : "N"), NULL, $this->Householder->ReadOnly); // Householder_id $this->Householder_id->SetDbValueDef($rsnew, $this->Householder_id->CurrentValue, NULL, $this->Householder_id->ReadOnly); // Householder_reltype $this->Householder_reltype->SetDbValueDef($rsnew, $this->Householder_reltype->CurrentValue, NULL, $this->Householder_reltype->ReadOnly); // Ethnic_group $this->Ethnic_group->SetDbValueDef($rsnew, $this->Ethnic_group->CurrentValue, NULL, $this->Ethnic_group->ReadOnly); // Known_languages $this->Known_languages->SetDbValueDef($rsnew, $this->Known_languages->CurrentValue, NULL, $this->Known_languages->ReadOnly); // Title_of_study $this->Title_of_study->SetDbValueDef($rsnew, $this->Title_of_study->CurrentValue, NULL, $this->Title_of_study->ReadOnly); // Poss_destination_country $this->Poss_destination_country->SetDbValueDef($rsnew, $this->Poss_destination_country->CurrentValue, NULL, $this->Poss_destination_country->ReadOnly); // Document_type $this->Document_type->SetDbValueDef($rsnew, $this->Document_type->CurrentValue, NULL, $this->Document_type->ReadOnly); // Document_number $this->Document_number->SetDbValueDef($rsnew, $this->Document_number->CurrentValue, NULL, $this->Document_number->ReadOnly); // Document_release $this->Document_release->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->Document_release->CurrentValue, 7), NULL, $this->Document_release->ReadOnly); // Document_expiry $this->Document_expiry->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->Document_expiry->CurrentValue, 7), NULL, $this->Document_expiry->ReadOnly); // Document_nationality $this->Document_nationality->SetDbValueDef($rsnew, $this->Document_nationality->CurrentValue, NULL, $this->Document_nationality->ReadOnly); // other_documents $this->other_documents->SetDbValueDef($rsnew, $this->other_documents->CurrentValue, NULL, $this->other_documents->ReadOnly); // Final_evaluation $this->Final_evaluation->SetDbValueDef($rsnew, $this->Final_evaluation->CurrentValue, NULL, $this->Final_evaluation->ReadOnly); // photo if ($this->photo->Visible && !$this->photo->ReadOnly && !$this->photo->Upload->KeepFile) { $this->photo->Upload->DbValue = $rsold['photo']; // Get original value if ($this->photo->Upload->FileName == "") { $rsnew['photo'] = NULL; } else { $rsnew['photo'] = $this->photo->Upload->FileName; } } // doc_image if ($this->doc_image->Visible && !$this->doc_image->ReadOnly && !$this->doc_image->Upload->KeepFile) { $this->doc_image->Upload->DbValue = $rsold['doc_image']; // Get original value if ($this->doc_image->Upload->FileName == "") { $rsnew['doc_image'] = NULL; } else { $rsnew['doc_image'] = $this->doc_image->Upload->FileName; } } // Notes $this->Notes->SetDbValueDef($rsnew, $this->Notes->CurrentValue, NULL, $this->Notes->ReadOnly); // Interview_1 $tmpBool = $this->Interview_1->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->Interview_1->SetDbValueDef($rsnew, $tmpBool, NULL, $this->Interview_1->ReadOnly); // interview1_date $this->interview1_date->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->interview1_date->CurrentValue, 0), NULL, $this->interview1_date->ReadOnly); // Interview_2 $tmpBool = $this->Interview_2->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->Interview_2->SetDbValueDef($rsnew, $tmpBool, NULL, $this->Interview_2->ReadOnly); // interview_2_date $this->interview_2_date->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->interview_2_date->CurrentValue, 0), NULL, $this->interview_2_date->ReadOnly); // Interview_3 $tmpBool = $this->Interview_3->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->Interview_3->SetDbValueDef($rsnew, $tmpBool, NULL, $this->Interview_3->ReadOnly); // interview_3_date $this->interview_3_date->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->interview_3_date->CurrentValue, 0), NULL, $this->interview_3_date->ReadOnly); // Zone_of_Transit $this->Zone_of_Transit->SetDbValueDef($rsnew, $this->Zone_of_Transit->CurrentValue, NULL, $this->Zone_of_Transit->ReadOnly); // Travel_number $this->Travel_number->SetDbValueDef($rsnew, $this->Travel_number->CurrentValue, NULL, $this->Travel_number->ReadOnly); // Travel_arrival_date $this->Travel_arrival_date->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->Travel_arrival_date->CurrentValue, 0), NULL, $this->Travel_arrival_date->ReadOnly); // Travel_arrival_time $this->Travel_arrival_time->SetDbValueDef($rsnew, $this->Travel_arrival_time->CurrentValue, NULL, $this->Travel_arrival_time->ReadOnly); // num_family $this->num_family->SetDbValueDef($rsnew, $this->num_family->CurrentValue, NULL, $this->num_family->ReadOnly); // speak_ENG $tmpBool = $this->speak_ENG->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->speak_ENG->SetDbValueDef($rsnew, $tmpBool, NULL, $this->speak_ENG->ReadOnly); // speak_FRA $tmpBool = $this->speak_FRA->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->speak_FRA->SetDbValueDef($rsnew, $tmpBool, NULL, $this->speak_FRA->ReadOnly); // speak_ARA $tmpBool = $this->speak_ARA->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->speak_ARA->SetDbValueDef($rsnew, $tmpBool, NULL, $this->speak_ARA->ReadOnly); // speak_ITA $tmpBool = $this->speak_ITA->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->speak_ITA->SetDbValueDef($rsnew, $tmpBool, NULL, $this->speak_ITA->ReadOnly); // lives_with $this->lives_with->SetDbValueDef($rsnew, $this->lives_with->CurrentValue, NULL, $this->lives_with->ReadOnly); // family_know $tmpBool = $this->family_know->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->family_know->SetDbValueDef($rsnew, $tmpBool, NULL, $this->family_know->ReadOnly); // date_of_entry_transit $this->date_of_entry_transit->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->date_of_entry_transit->CurrentValue, 0), NULL, $this->date_of_entry_transit->ReadOnly); // marital_status $this->marital_status->SetDbValueDef($rsnew, $this->marital_status->CurrentValue, NULL, $this->marital_status->ReadOnly); // consort_id $this->consort_id->SetDbValueDef($rsnew, $this->consort_id->CurrentValue, NULL, $this->consort_id->ReadOnly); // consort_info $this->consort_info->SetDbValueDef($rsnew, $this->consort_info->CurrentValue, NULL, $this->consort_info->ReadOnly); // other_fam_in_italy $this->other_fam_in_italy->SetDbValueDef($rsnew, $this->other_fam_in_italy->CurrentValue, NULL, $this->other_fam_in_italy->ReadOnly); // other_fam_in_europe $this->other_fam_in_europe->SetDbValueDef($rsnew, $this->other_fam_in_europe->CurrentValue, NULL, $this->other_fam_in_europe->ReadOnly); // where_lived $this->where_lived->SetDbValueDef($rsnew, $this->where_lived->CurrentValue, NULL, $this->where_lived->ReadOnly); // medical_situation $this->medical_situation->SetDbValueDef($rsnew, $this->medical_situation->CurrentValue, NULL, $this->medical_situation->ReadOnly); // social_situation $this->social_situation->SetDbValueDef($rsnew, $this->social_situation->CurrentValue, NULL, $this->social_situation->ReadOnly); // abuse_suffered $tmpBool = $this->abuse_suffered->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->abuse_suffered->SetDbValueDef($rsnew, $tmpBool, NULL, $this->abuse_suffered->ReadOnly); // abuse_description $this->abuse_description->SetDbValueDef($rsnew, $this->abuse_description->CurrentValue, NULL, $this->abuse_description->ReadOnly); // work_done $this->work_done->SetDbValueDef($rsnew, $this->work_done->CurrentValue, NULL, $this->work_done->ReadOnly); // military_service $this->military_service->SetDbValueDef($rsnew, $this->military_service->CurrentValue, NULL, $this->military_service->ReadOnly); // itinerary $this->itinerary->SetDbValueDef($rsnew, $this->itinerary->CurrentValue, NULL, $this->itinerary->ReadOnly); // convictions $tmpBool = $this->convictions->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->convictions->SetDbValueDef($rsnew, $tmpBool, NULL, $this->convictions->ReadOnly); // requested_asylum $this->requested_asylum->SetDbValueDef($rsnew, $this->requested_asylum->CurrentValue, NULL, $this->requested_asylum->ReadOnly); // resettlement_application $tmpBool = $this->resettlement_application->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->resettlement_application->SetDbValueDef($rsnew, $tmpBool, NULL, $this->resettlement_application->ReadOnly); // resettlement_country $this->resettlement_country->SetDbValueDef($rsnew, $this->resettlement_country->CurrentValue, NULL, $this->resettlement_country->ReadOnly); // reunion_application $tmpBool = $this->reunion_application->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->reunion_application->SetDbValueDef($rsnew, $tmpBool, NULL, $this->reunion_application->ReadOnly); // reunion_country $this->reunion_country->SetDbValueDef($rsnew, $this->reunion_country->CurrentValue, NULL, $this->reunion_country->ReadOnly); // belongs_to_organization $tmpBool = $this->belongs_to_organization->CurrentValue; if ($tmpBool <> "Y" && $tmpBool <> "N") $tmpBool = (!empty($tmpBool)) ? "Y" : "N"; $this->belongs_to_organization->SetDbValueDef($rsnew, $tmpBool, NULL, $this->belongs_to_organization->ReadOnly); // organizations $this->organizations->SetDbValueDef($rsnew, $this->organizations->CurrentValue, NULL, $this->organizations->ReadOnly); // presentations $this->presentations->SetDbValueDef($rsnew, $this->presentations->CurrentValue, NULL, $this->presentations->ReadOnly); // report $this->report->SetDbValueDef($rsnew, $this->report->CurrentValue, NULL, $this->report->ReadOnly); if ($this->photo->Visible && !$this->photo->Upload->KeepFile) { $this->photo->UploadPath = "uploads/ospiti/".$this->idSeeker->DbValue; if (!ew_Empty($this->photo->Upload->Value)) { $rsnew['photo'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $this->photo->UploadPath), $rsnew['photo']); // Get new file name } } if ($this->doc_image->Visible && !$this->doc_image->Upload->KeepFile) { $this->doc_image->UploadPath = "uploads/ospiti_doc/".$this->idSeeker->DbValue; if (!ew_Empty($this->doc_image->Upload->Value)) { $rsnew['doc_image'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $this->doc_image->UploadPath), $rsnew['doc_image']); // Get new file name } } // Call Row Updating event $bUpdateRow = $this->Row_Updating($rsold, $rsnew); if ($bUpdateRow) { $conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"]; if (count($rsnew) > 0) $EditRow = $this->Update($rsnew, "", $rsold); else $EditRow = TRUE; // No field to update $conn->raiseErrorFn = ''; if ($EditRow) { if ($this->photo->Visible && !$this->photo->Upload->KeepFile) { if (!ew_Empty($this->photo->Upload->Value)) { if (!$this->photo->Upload->SaveToFile($this->photo->UploadPath, $rsnew['photo'], TRUE)) { $this->setFailureMessage($Language->Phrase("UploadErrMsg7")); return FALSE; } } } if ($this->doc_image->Visible && !$this->doc_image->Upload->KeepFile) { if (!ew_Empty($this->doc_image->Upload->Value)) { if (!$this->doc_image->Upload->SaveToFile($this->doc_image->UploadPath, $rsnew['doc_image'], TRUE)) { $this->setFailureMessage($Language->Phrase("UploadErrMsg7")); return FALSE; } } } } // Update detail records $DetailTblVar = explode(",", $this->getCurrentDetailTable()); if ($EditRow) { if (in_array("tassigment", $DetailTblVar) && $GLOBALS["tassigment"]->DetailEdit) { if (!isset($GLOBALS["tassigment_grid"])) $GLOBALS["tassigment_grid"] = new ctassigment_grid(); // Get detail page object $Security->LoadCurrentUserLevel($this->ProjectID . "tassigment"); // Load user level of detail table $EditRow = $GLOBALS["tassigment_grid"]->GridUpdate(); $Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName); // Restore user level of master table } } // Commit/Rollback transaction if ($this->getCurrentDetailTable() <> "") { if ($EditRow) { $conn->CommitTrans(); // Commit transaction } else { $conn->RollbackTrans(); // Rollback transaction } } } else { if ($this->getSuccessMessage() <> "" || $this->getFailureMessage() <> "") { // Use the message, do nothing } elseif ($this->CancelMessage <> "") { $this->setFailureMessage($this->CancelMessage); $this->CancelMessage = ""; } else { $this->setFailureMessage($Language->Phrase("UpdateCancelled")); } $EditRow = FALSE; } } // Call Row_Updated event if ($EditRow) $this->Row_Updated($rsold, $rsnew); $rs->Close(); // photo ew_CleanUploadTempPath($this->photo, $this->photo->Upload->Index); // doc_image ew_CleanUploadTempPath($this->doc_image, $this->doc_image->Upload->Index); return $EditRow; } // Set up detail parms based on QueryString function SetUpDetailParms() { // Get the keys for master table if (isset($_GET[EW_TABLE_SHOW_DETAIL])) { $sDetailTblVar = $_GET[EW_TABLE_SHOW_DETAIL]; $this->setCurrentDetailTable($sDetailTblVar); } else { $sDetailTblVar = $this->getCurrentDetailTable(); } if ($sDetailTblVar <> "") { $DetailTblVar = explode(",", $sDetailTblVar); if (in_array("tassigment", $DetailTblVar)) { if (!isset($GLOBALS["tassigment_grid"])) $GLOBALS["tassigment_grid"] = new ctassigment_grid; if ($GLOBALS["tassigment_grid"]->DetailEdit) { $GLOBALS["tassigment_grid"]->CurrentMode = "edit"; $GLOBALS["tassigment_grid"]->CurrentAction = "gridedit"; // Save current master table to detail table $GLOBALS["tassigment_grid"]->setCurrentMasterTable($this->TableVar); $GLOBALS["tassigment_grid"]->setStartRecordNumber(1); $GLOBALS["tassigment_grid"]->idkSeeker->FldIsDetailKey = TRUE; $GLOBALS["tassigment_grid"]->idkSeeker->CurrentValue = $this->idSeeker->CurrentValue; $GLOBALS["tassigment_grid"]->idkSeeker->setSessionValue($GLOBALS["tassigment_grid"]->idkSeeker->CurrentValue); } } } } // Set up Breadcrumb function SetupBreadcrumb() { global $Breadcrumb, $Language; $Breadcrumb = new cBreadcrumb(); $url = substr(ew_CurrentUrl(), strrpos(ew_CurrentUrl(), "/")+1); $Breadcrumb->Add("list", $this->TableVar, $this->AddMasterUrl("tospitilist.php"), "", $this->TableVar, TRUE); $PageId = "edit"; $Breadcrumb->Add("edit", $PageId, $url); } // Setup lookup filters of a field function SetupLookupFilters($fld, $pageId = null) { global $gsLanguage; $pageId = $pageId ?: $this->PageID; switch ($fld->FldVar) { case "x_Nationality": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = "{filter}"; $this->Nationality->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = "{filter}"; $this->Nationality->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = "{filter}"; $this->Nationality->LookupFilters = array(); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => "", "f0" => '`id_nation` = {filter_value}', "t0" => "200", "fn0" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Nationality, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; case "x_Citizenship": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = "{filter}"; $this->Citizenship->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = "{filter}"; $this->Citizenship->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = "{filter}"; $this->Citizenship->LookupFilters = array(); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => "", "f0" => '`id_nation` = {filter_value}', "t0" => "200", "fn0" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Citizenship, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; case "x_Religion": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Religion` AS `LinkFld`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `treligion`"; $sWhereWrk = ""; $this->Religion->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Religion` AS `LinkFld`, `Description_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `treligion`"; $sWhereWrk = ""; $this->Religion->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Religion` AS `LinkFld`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `treligion`"; $sWhereWrk = ""; $this->Religion->LookupFilters = array(); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => "", "f0" => '`Religion` = {filter_value}', "t0" => "200", "fn0" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Religion, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; case "x_Place_of_Residence": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Residence->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Residence->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Residence->LookupFilters = array(); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => "", "f0" => '`id_nation` = {filter_value}', "t0" => "200", "fn0" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Place_of_Residence, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; case "x_Place_of_Transit": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Transit->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Transit->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Place_of_Transit->LookupFilters = array(); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => "", "f0" => '`id_nation` = {filter_value}', "t0" => "200", "fn0" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Place_of_Transit, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; case "x_Householder_id": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `idSeeker` AS `LinkFld`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `BirthDate` AS `Disp3Fld`, `BirthPlace` AS `Disp4Fld` FROM `vhouseholders`"; $sWhereWrk = "{filter}"; $this->Householder_id->LookupFilters = array("dx1" => '`Name`', "dx2" => '`Surname`', "df3" => "0", "dx3" => ew_CastDateFieldForLike('`BirthDate`', 0, "DB"), "dx4" => '`BirthPlace`'); break; case "it": $sSqlWrk = "SELECT `idSeeker` AS `LinkFld`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `BirthDate` AS `Disp3Fld`, `BirthPlace` AS `Disp4Fld` FROM `vhouseholders`"; $sWhereWrk = "{filter}"; $this->Householder_id->LookupFilters = array("dx1" => '`Name`', "dx2" => '`Surname`', "df3" => "0", "dx3" => ew_CastDateFieldForLike('`BirthDate`', 0, "DB"), "dx4" => '`BirthPlace`'); break; default: $sSqlWrk = "SELECT `idSeeker` AS `LinkFld`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `BirthDate` AS `Disp3Fld`, `BirthPlace` AS `Disp4Fld` FROM `vhouseholders`"; $sWhereWrk = "{filter}"; $this->Householder_id->LookupFilters = array("dx1" => '`Name`', "dx2" => '`Surname`', "df3" => "0", "dx3" => ew_CastDateFieldForLike('`BirthDate`', 0, "DB"), "dx4" => '`BirthPlace`'); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => "", "f0" => '`idSeeker` = {filter_value}', "t0" => "19", "fn0" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Householder_id, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; case "x_Householder_reltype": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `family_rel` AS `LinkFld`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tfamily_rel`"; $sWhereWrk = ""; $this->Householder_reltype->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `family_rel` AS `LinkFld`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tfamily_rel`"; $sWhereWrk = ""; $this->Householder_reltype->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `family_rel` AS `LinkFld`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tfamily_rel`"; $sWhereWrk = ""; $this->Householder_reltype->LookupFilters = array(); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => "", "f0" => '`family_rel` = {filter_value}', "t0" => "200", "fn0" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Householder_reltype, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; case "x_Document_type": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Doc_type` AS `LinkFld`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tdoc_type`"; $sWhereWrk = ""; $this->Document_type->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Doc_type` AS `LinkFld`, `Description_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tdoc_type`"; $sWhereWrk = ""; $this->Document_type->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Doc_type` AS `LinkFld`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tdoc_type`"; $sWhereWrk = ""; $this->Document_type->LookupFilters = array(); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => "", "f0" => '`Doc_type` = {filter_value}', "t0" => "200", "fn0" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Document_type, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; case "x_Document_nationality": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Document_nationality->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Document_nationality->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation` AS `LinkFld`, `desc_en` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tnations`"; $sWhereWrk = ""; $this->Document_nationality->LookupFilters = array(); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => "", "f0" => '`id_nation` = {filter_value}', "t0" => "200", "fn0" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Document_nationality, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; case "x_Final_evaluation": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `Eval_type` AS `LinkFld`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `teval_type`"; $sWhereWrk = ""; $this->Final_evaluation->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `Eval_type` AS `LinkFld`, `Description_it` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `teval_type`"; $sWhereWrk = ""; $this->Final_evaluation->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `Eval_type` AS `LinkFld`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `teval_type`"; $sWhereWrk = ""; $this->Final_evaluation->LookupFilters = array(); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => "", "f0" => '`Eval_type` = {filter_value}', "t0" => "200", "fn0" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Final_evaluation, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; } } // Setup AutoSuggest filters of a field function SetupAutoSuggestFilters($fld, $pageId = null) { global $gsLanguage; $pageId = $pageId ?: $this->PageID; switch ($fld->FldVar) { case "x_Nationality": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld` FROM `tnations`"; $sWhereWrk = "`desc_en` LIKE '{query_value}%'"; $this->Nationality->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation`, `desc_it` AS `DispFld` FROM `tnations`"; $sWhereWrk = "`desc_it` LIKE '{query_value}%'"; $this->Nationality->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld` FROM `tnations`"; $sWhereWrk = "`desc_en` LIKE '{query_value}%'"; $this->Nationality->LookupFilters = array(); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Nationality, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $sSqlWrk .= " LIMIT " . EW_AUTO_SUGGEST_MAX_ENTRIES; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; case "x_Citizenship": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld` FROM `tnations`"; $sWhereWrk = "`desc_en` LIKE '{query_value}%'"; $this->Citizenship->LookupFilters = array(); break; case "it": $sSqlWrk = "SELECT `id_nation`, `desc_it` AS `DispFld` FROM `tnations`"; $sWhereWrk = "`desc_it` LIKE '{query_value}%'"; $this->Citizenship->LookupFilters = array(); break; default: $sSqlWrk = "SELECT `id_nation`, `desc_en` AS `DispFld` FROM `tnations`"; $sWhereWrk = "`desc_en` LIKE '{query_value}%'"; $this->Citizenship->LookupFilters = array(); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Citizenship, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $sSqlWrk .= " LIMIT " . EW_AUTO_SUGGEST_MAX_ENTRIES; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; case "x_Householder_id": $sSqlWrk = ""; switch (@$gsLanguage) { case "en": $sSqlWrk = "SELECT `idSeeker`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `BirthDate` AS `Disp3Fld`, `BirthPlace` AS `Disp4Fld` FROM `vhouseholders`"; $sWhereWrk = "`Name` LIKE '{query_value}%' OR CONCAT(`Name`,'" . ew_ValueSeparator(1, $this->Householder_id) . "',`Surname`,'" . ew_ValueSeparator(2, $this->Householder_id) . "'," . ew_CastDateFieldForLike('`BirthDate`', 0, "DB") . ",'" . ew_ValueSeparator(3, $this->Householder_id) . "',`BirthPlace`) LIKE '{query_value}%'"; $this->Householder_id->LookupFilters = array("dx1" => '`Name`', "dx2" => '`Surname`', "df3" => "0", "dx3" => ew_CastDateFieldForLike('`BirthDate`', 0, "DB"), "dx4" => '`BirthPlace`'); break; case "it": $sSqlWrk = "SELECT `idSeeker`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `BirthDate` AS `Disp3Fld`, `BirthPlace` AS `Disp4Fld` FROM `vhouseholders`"; $sWhereWrk = "`Name` LIKE '{query_value}%' OR CONCAT(`Name`,'" . ew_ValueSeparator(1, $this->Householder_id) . "',`Surname`,'" . ew_ValueSeparator(2, $this->Householder_id) . "'," . ew_CastDateFieldForLike('`BirthDate`', 0, "DB") . ",'" . ew_ValueSeparator(3, $this->Householder_id) . "',`BirthPlace`) LIKE '{query_value}%'"; $this->Householder_id->LookupFilters = array("dx1" => '`Name`', "dx2" => '`Surname`', "df3" => "0", "dx3" => ew_CastDateFieldForLike('`BirthDate`', 0, "DB"), "dx4" => '`BirthPlace`'); break; default: $sSqlWrk = "SELECT `idSeeker`, `Name` AS `DispFld`, `Surname` AS `Disp2Fld`, `BirthDate` AS `Disp3Fld`, `BirthPlace` AS `Disp4Fld` FROM `vhouseholders`"; $sWhereWrk = "`Name` LIKE '{query_value}%' OR CONCAT(`Name`,'" . ew_ValueSeparator(1, $this->Householder_id) . "',`Surname`,'" . ew_ValueSeparator(2, $this->Householder_id) . "'," . ew_CastDateFieldForLike('`BirthDate`', 0, "DB") . ",'" . ew_ValueSeparator(3, $this->Householder_id) . "',`BirthPlace`) LIKE '{query_value}%'"; $this->Householder_id->LookupFilters = array("dx1" => '`Name`', "dx2" => '`Surname`', "df3" => "0", "dx3" => ew_CastDateFieldForLike('`BirthDate`', 0, "DB"), "dx4" => '`BirthPlace`'); break; } $fld->LookupFilters += array("s" => $sSqlWrk, "d" => ""); $sSqlWrk = ""; $this->Lookup_Selecting($this->Householder_id, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk; $sSqlWrk .= " LIMIT " . EW_AUTO_SUGGEST_MAX_ENTRIES; if ($sSqlWrk <> "") $fld->LookupFilters["s"] .= $sSqlWrk; break; } } // Page Load event function Page_Load() { //echo "Page Load"; } // Page Unload event function Page_Unload() { //echo "Page Unload"; } // Page Redirecting event function Page_Redirecting(&$url) { // Example: //$url = "your URL"; } // Message Showing event // $type = ''|'success'|'failure'|'warning' function Message_Showing(&$msg, $type) { if ($type == 'success') { //$msg = "your success message"; } elseif ($type == 'failure') { //$msg = "your failure message"; } elseif ($type == 'warning') { //$msg = "your warning message"; } else { //$msg = "your message"; } } // Page Render event function Page_Render() { //echo "Page Render"; } // Page Data Rendering event function Page_DataRendering(&$header) { // Example: //$header = "your header"; } // Page Data Rendered event function Page_DataRendered(&$footer) { // Example: //$footer = "your footer"; } // Form Custom Validate event function Form_CustomValidate(&$CustomError) { // Return error message in CustomError return TRUE; } } ?> Page_Init(); // Page main $tospiti_edit->Page_Main(); // Global Page Rendering event (in userfn*.php) Page_Rendering(); // Page Rendering event $tospiti_edit->Page_Render(); ?> IsModal) { ?>
Render(); ?> SelectionForm(); ?>
ShowPageHeader(); ?> ShowMessage(); ?> IsModal) { ?>
Pager)) $tospiti_edit->Pager = new cNumericPager($tospiti_edit->StartRec, $tospiti_edit->DisplayRecs, $tospiti_edit->TotalRecs, $tospiti_edit->RecRange) ?> Pager->RecordCount > 0 && $tospiti_edit->Pager->Visible) { ?>
CheckToken) { ?> IsModal) { ?>
Desk->Visible) { // Desk ?>
Desk->CellAttributes() ?>> Desk->EditAttributes() ?>> Desk->CustomMsg ?>
UNHCR_code->Visible) { // UNHCR_code ?>
UNHCR_code->CellAttributes() ?>> UNHCR_code->EditAttributes() ?>> UNHCR_code->CustomMsg ?>
Name->Visible) { // Name ?>
Name->CellAttributes() ?>> Name->EditAttributes() ?>> Name->CustomMsg ?>
Surname->Visible) { // Surname ?>
Surname->CellAttributes() ?>> Surname->EditAttributes() ?>> Surname->CustomMsg ?>
BirthDate->Visible) { // BirthDate ?>
BirthDate->CellAttributes() ?>> BirthDate->EditAttributes() ?>> BirthDate->CustomMsg ?>
BirthPlace->Visible) { // BirthPlace ?>
BirthPlace->CellAttributes() ?>> BirthPlace->EditAttributes() ?>> BirthPlace->CustomMsg ?>
Nationality->Visible) { // Nationality ?>
Nationality->CellAttributes() ?>> Nationality->EditAttrs["onchange"]); if ($wrkonchange <> "") $wrkonchange = " onchange=\"" . ew_JsEncode2($wrkonchange) . "\""; $tospiti->Nationality->EditAttrs["onchange"] = ""; ?> Nationality->EditAttributes() ?>> > Nationality->CustomMsg ?>
Citizenship->Visible) { // Citizenship ?>
Citizenship->CellAttributes() ?>> Citizenship->EditAttrs["onchange"]); if ($wrkonchange <> "") $wrkonchange = " onchange=\"" . ew_JsEncode2($wrkonchange) . "\""; $tospiti->Citizenship->EditAttrs["onchange"] = ""; ?> Citizenship->EditAttributes() ?>> > Citizenship->CustomMsg ?>
Sex->Visible) { // Sex ?>
Sex->CellAttributes() ?>> Sex->CustomMsg ?>
Phone->Visible) { // Phone ?>
Phone->CellAttributes() ?>> Phone->EditAttributes() ?>> Phone->CustomMsg ?>
_Email->Visible) { // Email ?>
_Email->CellAttributes() ?>> _Email->EditAttributes() ?>> _Email->CustomMsg ?>
Religion->Visible) { // Religion ?>
Religion->CellAttributes() ?>> Religion->CustomMsg ?>
Place_of_Residence->Visible) { // Place_of_Residence ?>
Place_of_Residence->CellAttributes() ?>> Place_of_Residence->CustomMsg ?>
Address_of_Residence->Visible) { // Address_of_Residence ?>
Address_of_Residence->CellAttributes() ?>> Address_of_Residence->EditAttributes() ?>> Address_of_Residence->CustomMsg ?>
Town_of_residence->Visible) { // Town_of_residence ?>
Town_of_residence->CellAttributes() ?>> Town_of_residence->EditAttributes() ?>> Town_of_residence->CustomMsg ?>
Place_of_Transit->Visible) { // Place_of_Transit ?>
Place_of_Transit->CellAttributes() ?>> Place_of_Transit->CustomMsg ?>
Address_of_Transit->Visible) { // Address_of_Transit ?>
Address_of_Transit->CellAttributes() ?>> Address_of_Transit->EditAttributes() ?>> Address_of_Transit->CustomMsg ?>
Town_of_transit->Visible) { // Town_of_transit ?>
Town_of_transit->CellAttributes() ?>> Town_of_transit->EditAttributes() ?>> Town_of_transit->CustomMsg ?>
domicile_description->Visible) { // domicile_description ?>
domicile_description->CellAttributes() ?>> domicile_description->EditAttributes() ?>> domicile_description->CustomMsg ?>
Disabled->Visible) { // Disabled ?>
Disabled->CellAttributes() ?>>
Disabled->EditAttributes() ?>>
Disabled->CustomMsg ?>
Sick->Visible) { // Sick ?>
Sick->CellAttributes() ?>>
Sick->EditAttributes() ?>>
Sick->CustomMsg ?>
Alone->Visible) { // Alone ?>
Alone->CellAttributes() ?>>
Alone->EditAttributes() ?>>
Alone->CustomMsg ?>
Elderly->Visible) { // Elderly ?>
Elderly->CellAttributes() ?>>
Elderly->EditAttributes() ?>>
Elderly->CustomMsg ?>
Family->Visible) { // Family ?>
Family->CellAttributes() ?>>
Family->EditAttributes() ?>>
Family->CustomMsg ?>
Householder->Visible) { // Householder ?>
Householder->CellAttributes() ?>>
Householder->EditAttributes() ?>>
Householder->CustomMsg ?>
Householder_id->Visible) { // Householder_id ?>
Householder_id->CellAttributes() ?>> Householder_id->EditAttrs["onchange"]); if ($wrkonchange <> "") $wrkonchange = " onchange=\"" . ew_JsEncode2($wrkonchange) . "\""; $tospiti->Householder_id->EditAttrs["onchange"] = ""; ?> Householder_id->EditAttributes() ?>> > Householder_id->CustomMsg ?>
Householder_reltype->Visible) { // Householder_reltype ?>
Householder_reltype->CellAttributes() ?>> Householder_reltype->CustomMsg ?>
Ethnic_group->Visible) { // Ethnic_group ?>
Ethnic_group->CellAttributes() ?>> Ethnic_group->EditAttributes() ?>> Ethnic_group->CustomMsg ?>
Known_languages->Visible) { // Known_languages ?>
Known_languages->CellAttributes() ?>> Known_languages->EditAttributes() ?>> Known_languages->CustomMsg ?>
Title_of_study->Visible) { // Title_of_study ?>
Title_of_study->CellAttributes() ?>> Title_of_study->EditAttributes() ?>> Title_of_study->CustomMsg ?>
Poss_destination_country->Visible) { // Poss_destination_country ?>
Poss_destination_country->CellAttributes() ?>> Poss_destination_country->EditAttributes() ?>> Poss_destination_country->CustomMsg ?>
Document_type->Visible) { // Document_type ?>
Document_type->CellAttributes() ?>> Document_type->CustomMsg ?>
Document_number->Visible) { // Document_number ?>
Document_number->CellAttributes() ?>> Document_number->EditAttributes() ?>> Document_number->CustomMsg ?>
Document_release->Visible) { // Document_release ?>
Document_release->CellAttributes() ?>> Document_release->EditAttributes() ?>> Document_release->CustomMsg ?>
Document_expiry->Visible) { // Document_expiry ?>
Document_expiry->CellAttributes() ?>> Document_expiry->EditAttributes() ?>> Document_expiry->CustomMsg ?>
Document_nationality->Visible) { // Document_nationality ?>
Document_nationality->CellAttributes() ?>> Document_nationality->CustomMsg ?>
other_documents->Visible) { // other_documents ?>
other_documents->CellAttributes() ?>> other_documents->EditAttributes() ?>> other_documents->CustomMsg ?>
Final_evaluation->Visible) { // Final_evaluation ?>
Final_evaluation->CellAttributes() ?>> Final_evaluation->CustomMsg ?>
photo->Visible) { // photo ?>
photo->CellAttributes() ?>>
" class="btn btn-default btn-sm fileinput-button ewTooltipphoto->ReadOnly || $tospiti->photo->Disabled) echo " hide"; ?>"> Phrase("ChooseFileBtn") ?> photo->EditAttributes() ?>>
photo->CustomMsg ?>
doc_image->Visible) { // doc_image ?>
doc_image->CellAttributes() ?>>
" class="btn btn-default btn-sm fileinput-button ewTooltipdoc_image->ReadOnly || $tospiti->doc_image->Disabled) echo " hide"; ?>"> Phrase("ChooseFileBtn") ?> doc_image->EditAttributes() ?>>
doc_image->CustomMsg ?>
Notes->Visible) { // Notes ?>
Notes->CellAttributes() ?>> Notes->CustomMsg ?>
Interview_1->Visible) { // Interview_1 ?>
Interview_1->CellAttributes() ?>> Interview_1->CurrentValue)) ? " checked" : ""; ?> Interview_1->EditAttributes() ?>> Interview_1->CustomMsg ?>
interview1_date->Visible) { // interview1_date ?>
interview1_date->CellAttributes() ?>> interview1_date->EditAttributes() ?>> interview1_date->CustomMsg ?>
Interview_2->Visible) { // Interview_2 ?>
Interview_2->CellAttributes() ?>> Interview_2->CurrentValue)) ? " checked" : ""; ?> Interview_2->EditAttributes() ?>> Interview_2->CustomMsg ?>
interview_2_date->Visible) { // interview_2_date ?>
interview_2_date->CellAttributes() ?>> interview_2_date->EditAttributes() ?>> interview_2_date->CustomMsg ?>
Interview_3->Visible) { // Interview_3 ?>
Interview_3->CellAttributes() ?>> Interview_3->CurrentValue)) ? " checked" : ""; ?> Interview_3->EditAttributes() ?>> Interview_3->CustomMsg ?>
interview_3_date->Visible) { // interview_3_date ?>
interview_3_date->CellAttributes() ?>> interview_3_date->EditAttributes() ?>> interview_3_date->CustomMsg ?>
Zone_of_Transit->Visible) { // Zone_of_Transit ?>
Zone_of_Transit->CellAttributes() ?>> Zone_of_Transit->EditAttributes() ?>> Zone_of_Transit->CustomMsg ?>
Travel_number->Visible) { // Travel_number ?>
Travel_number->CellAttributes() ?>> Travel_number->EditAttributes() ?>> Travel_number->CustomMsg ?>
Travel_arrival_date->Visible) { // Travel_arrival_date ?>
Travel_arrival_date->CellAttributes() ?>> Travel_arrival_date->EditAttributes() ?>> Travel_arrival_date->CustomMsg ?>
Travel_arrival_time->Visible) { // Travel_arrival_time ?>
Travel_arrival_time->CellAttributes() ?>> Travel_arrival_time->EditAttributes() ?>> Travel_arrival_time->CustomMsg ?>
num_family->Visible) { // num_family ?>
num_family->CellAttributes() ?>> num_family->EditAttributes() ?>> num_family->CustomMsg ?>
speak_ENG->Visible) { // speak_ENG ?>
speak_ENG->CellAttributes() ?>> speak_ENG->CurrentValue)) ? " checked" : ""; ?> speak_ENG->EditAttributes() ?>> speak_ENG->CustomMsg ?>
speak_FRA->Visible) { // speak_FRA ?>
speak_FRA->CellAttributes() ?>> speak_FRA->CurrentValue)) ? " checked" : ""; ?> speak_FRA->EditAttributes() ?>> speak_FRA->CustomMsg ?>
speak_ARA->Visible) { // speak_ARA ?>
speak_ARA->CellAttributes() ?>> speak_ARA->CurrentValue)) ? " checked" : ""; ?> speak_ARA->EditAttributes() ?>> speak_ARA->CustomMsg ?>
speak_ITA->Visible) { // speak_ITA ?>
speak_ITA->CellAttributes() ?>> speak_ITA->CurrentValue)) ? " checked" : ""; ?> speak_ITA->EditAttributes() ?>> speak_ITA->CustomMsg ?>
lives_with->Visible) { // lives_with ?>
lives_with->CellAttributes() ?>> lives_with->EditAttributes() ?>> lives_with->CustomMsg ?>
family_know->Visible) { // family_know ?>
family_know->CellAttributes() ?>> family_know->CurrentValue)) ? " checked" : ""; ?> family_know->EditAttributes() ?>> family_know->CustomMsg ?>
date_of_entry_transit->Visible) { // date_of_entry_transit ?>
date_of_entry_transit->CellAttributes() ?>> date_of_entry_transit->EditAttributes() ?>> date_of_entry_transit->CustomMsg ?>
marital_status->Visible) { // marital_status ?>
marital_status->CellAttributes() ?>> marital_status->EditAttributes() ?>> marital_status->CustomMsg ?>
consort_id->Visible) { // consort_id ?>
consort_id->CellAttributes() ?>> consort_id->EditAttributes() ?>> consort_id->CustomMsg ?>
consort_info->Visible) { // consort_info ?>
consort_info->CellAttributes() ?>> consort_info->CustomMsg ?>
other_fam_in_italy->Visible) { // other_fam_in_italy ?>
other_fam_in_italy->CellAttributes() ?>> other_fam_in_italy->CustomMsg ?>
other_fam_in_europe->Visible) { // other_fam_in_europe ?>
other_fam_in_europe->CellAttributes() ?>> other_fam_in_europe->CustomMsg ?>
where_lived->Visible) { // where_lived ?>
where_lived->CellAttributes() ?>> where_lived->CustomMsg ?>
medical_situation->Visible) { // medical_situation ?>
medical_situation->CellAttributes() ?>> medical_situation->CustomMsg ?>
social_situation->Visible) { // social_situation ?>
social_situation->CellAttributes() ?>> social_situation->CustomMsg ?>
abuse_suffered->Visible) { // abuse_suffered ?>
abuse_suffered->CellAttributes() ?>> abuse_suffered->CurrentValue)) ? " checked" : ""; ?> abuse_suffered->EditAttributes() ?>> abuse_suffered->CustomMsg ?>
abuse_description->Visible) { // abuse_description ?>
abuse_description->CellAttributes() ?>> abuse_description->CustomMsg ?>
work_done->Visible) { // work_done ?>
work_done->CellAttributes() ?>> work_done->CustomMsg ?>
military_service->Visible) { // military_service ?>
military_service->CellAttributes() ?>> military_service->EditAttributes() ?>> military_service->CustomMsg ?>
itinerary->Visible) { // itinerary ?>
itinerary->CellAttributes() ?>> itinerary->CustomMsg ?>
convictions->Visible) { // convictions ?>
convictions->CellAttributes() ?>> convictions->CurrentValue)) ? " checked" : ""; ?> convictions->EditAttributes() ?>> convictions->CustomMsg ?>
requested_asylum->Visible) { // requested_asylum ?>
requested_asylum->CellAttributes() ?>> requested_asylum->CustomMsg ?>
resettlement_application->Visible) { // resettlement_application ?>
resettlement_application->CellAttributes() ?>> resettlement_application->CurrentValue)) ? " checked" : ""; ?> resettlement_application->EditAttributes() ?>> resettlement_application->CustomMsg ?>
resettlement_country->Visible) { // resettlement_country ?>
resettlement_country->CellAttributes() ?>> resettlement_country->EditAttributes() ?>> resettlement_country->CustomMsg ?>
reunion_application->Visible) { // reunion_application ?>
reunion_application->CellAttributes() ?>> reunion_application->CurrentValue)) ? " checked" : ""; ?> reunion_application->EditAttributes() ?>> reunion_application->CustomMsg ?>
reunion_country->Visible) { // reunion_country ?>
reunion_country->CellAttributes() ?>> reunion_country->EditAttributes() ?>> reunion_country->CustomMsg ?>
belongs_to_organization->Visible) { // belongs_to_organization ?>
belongs_to_organization->CellAttributes() ?>> belongs_to_organization->CurrentValue)) ? " checked" : ""; ?> belongs_to_organization->EditAttributes() ?>> belongs_to_organization->CustomMsg ?>
organizations->Visible) { // organizations ?>
organizations->CellAttributes() ?>> organizations->EditAttributes() ?>> organizations->CustomMsg ?>
presentations->Visible) { // presentations ?>
presentations->CellAttributes() ?>> presentations->CustomMsg ?>
report->Visible) { // report ?>
report->CellAttributes() ?>> report->CustomMsg ?>
getCurrentDetailTable())) && $tassigment->DetailEdit) { ?> getCurrentDetailTable() <> "") { ?>

TablePhrase("tassigment", "TblCaption") ?>

IsModal) { ?>
Pager)) $tospiti_edit->Pager = new cNumericPager($tospiti_edit->StartRec, $tospiti_edit->DisplayRecs, $tospiti_edit->TotalRecs, $tospiti_edit->RecRange) ?> Pager->RecordCount > 0 && $tospiti_edit->Pager->Visible) { ?>
ShowPageFooter(); if (EW_DEBUG_ENABLED) echo ew_DebugMsg(); ?> Page_Terminate(); ?>