version = 2; $layout->blocks["top"] = array(); $layout->containers["all"] = array(); $layout->containers["all"][] = array("name"=>"wrapper", "block"=>"", "substyle"=>1 , "container"=>"edit" ); $layout->containers["edit"] = array(); $layout->containers["edit"][] = array("name"=>"editheader", "block"=>"editheader", "substyle"=>2 ); $layout->containers["edit"][] = array("name"=>"message", "block"=>"message_block", "substyle"=>1 ); $layout->containers["edit"][] = array("name"=>"wrapper", "block"=>"", "substyle"=>1 , "container"=>"fields" ); $layout->containers["fields"] = array(); $layout->containers["fields"][] = array("name"=>"editfields", "block"=>"", "substyle"=>1 ); $layout->containers["fields"][] = array("name"=>"editbuttons", "block"=>"editbuttons", "substyle"=>2 ); $layout->skins["fields"] = "fields"; $layout->skins["edit"] = "1"; $layout->skins["all"] = "empty"; $layout->blocks["top"][] = "all"; $page_layouts["Individual_Account_edit"] = $layout; $layout->skinsparams = array(); $layout->skinsparams["empty"] = array("button"=>"button2"); $layout->skinsparams["menu"] = array("button"=>"button1"); $layout->skinsparams["hmenu"] = array("button"=>"button1"); $layout->skinsparams["undermenu"] = array("button"=>"button1"); $layout->skinsparams["fields"] = array("button"=>"button1"); $layout->skinsparams["form"] = array("button"=>"button1"); $layout->skinsparams["1"] = array("button"=>"button1"); $layout->skinsparams["2"] = array("button"=>"button1"); $layout->skinsparams["3"] = array("button"=>"button1"); $returnJSON = array(); if( sizeof($_POST) == 0 && postvalue('ferror') && !postvalue("editid1") ) { $returnJSON['success'] = false; $returnJSON['message'] = mlang_message("INLINE_ERROR"); $returnJSON['fatalError'] = true; echo printJSON($returnJSON); exit(); } if( sizeof($_POST) == 0 && postvalue('ferror') && postvalue("editid1") ) { if( postvalue('fly') ) { echo -1; exit(); } else $_SESSION["message_edit"] = "<< ".mlang_message("INLINE_ERROR")." >>"; } ///////////////////////////////////////////////////////////// //init variables ///////////////////////////////////////////////////////////// if(postvalue("editType")=="inline") $inlineedit = EDIT_INLINE; elseif(postvalue("editType")==EDIT_POPUP) $inlineedit = EDIT_POPUP; else $inlineedit = EDIT_SIMPLE; $xt = new Xtempl(); $id = postvalue("id"); if(intval($id)==0) $id = 1; // assign an id $xt->assign("id", $id); $templatefile = GetTemplateName("Individual_Account", "edit"); $keys = array(); $savedKeys = array(); $keysChanged = false; $keys["UID"] = postvalue("editid1"); $savedKeys["UID"] = postvalue("editid1"); //array of params for classes $params = array("pageType" => PAGE_EDIT); $params["id"] = $id; $params["keys"] = $keys; $params['tName'] = $strTableName; $params['xt'] = &$xt; $params['mode'] = $inlineedit; $params['locale_info'] = $locale_info; $params['templatefile'] = $templatefile; $params['pageEditLikeInline'] = $inlineedit == EDIT_INLINE; //Get array of tabs for edit page $params['useTabsOnEdit'] = $gSettings->useTabsOnEdit(); if($params['useTabsOnEdit']) $params['arrEditTabs'] = $gSettings->getEditTabs(); $pageObject = new EditPage($params); $pageObject->init(); // For ajax request if($_REQUEST["action"] != "") { if($pageObject->lockingObj) { $arrkeys = explode("&",urldecode(refine($_REQUEST["keys"]))); foreach($arrkeys as $ind=>$val) $arrkeys[$ind]=urldecode($val); if($_REQUEST["action"]=="unlock") { $pageObject->lockingObj->UnlockRecord($strTableName,$arrkeys,$_REQUEST["sid"]); exit(); } else if($_REQUEST["action"]=="lockadmin" && (IsAdmin() || $_SESSION["AccessLevel"] == ACCESS_LEVEL_ADMINGROUP)) { $pageObject->lockingObj->UnlockAdmin($strTableName,$arrkeys,$_REQUEST["startEdit"]=="yes"); if($_REQUEST["startEdit"]=="no") echo "unlock"; else if($_REQUEST["startEdit"]=="yes") echo "lock"; exit(); } else if($_REQUEST["action"]=="confirm") { $lockMessage = ""; if(!$pageObject->lockingObj->ConfirmLock($strTableName, $arrkeys, $lockMessage)) echo $lockMessage; exit(); } } else exit(); } $status = ""; $message = ""; $mesClass = "rnr-error"; $usermessage = ""; $strWhereClause = ""; $showValues = array(); $showRawValues = array(); $showFields = array(); $showDetailKeys = array(); $next = array(); $prev = array(); $enableCtrlsForEditing = true; $error_happened = false; $readevalues = false; $IsSaved = false; $auditObj = GetAuditObject($strTableName); // SearchClause class stuff $_SESSION[$strTableName.'_advsearch'] = serialize($pageObject->searchClauseObj); //Get detail table keys $detailKeys = $pageObject->detailKeysByM; if($pageObject->lockingObj) { $system_attrs = "style='display:none;'"; $system_message = ""; } if ($inlineedit!=EDIT_INLINE) { // add button events if exist $pageObject->addButtonHandlers(); } // Before Process event if($eventObj->exists("BeforeProcessEdit")) $eventObj->BeforeProcessEdit($conn, $pageObject); //For show detail tables on master page edit if($inlineedit!=EDIT_INLINE) { $dpParams = array(); if($pageObject->isShowDetailTables && !isMobile()) { $ids = $id; $pageObject->jsSettings['tableSettings'][$strTableName]['dpParams'] = array('tableNames'=>$dpParams['strTableNames'], 'ids'=>$dpParams['ids']); } } ///////////////////////////////////////////////////////////// // process entered data, read and save ///////////////////////////////////////////////////////////// // proccess captcha if ($inlineedit!=EDIT_INLINE) if($pageObject->captchaExists()) $pageObject->doCaptchaCode(); if(@$_POST["a"] == "edited") { $strWhereClause = whereAdd($strWhereClause,KeyWhere($keys)); $hasDenyDuplicatesFields = $pageObject->pSet->editPageHasDenyDuplicatesFields(); $oldValuesRead = false; if($eventObj->exists("AfterEdit") || $eventObj->exists("BeforeEdit") || $auditObj || $pageObject->isTableGeoUpdatable() || $globalEvents->exists("IsRecordEditable", $strTableName) || $hasDenyDuplicatesFields) { // read old values $rsold = db_query($gQuery->gSQLWhere($strWhereClause), $conn); $dataold = $pageObject->cipherer->DecryptFetchedArray($rsold); $oldValuesRead = true; } if($globalEvents->exists("IsRecordEditable", $strTableName)) { if(!$globalEvents->IsRecordEditable($dataold, true, $strTableName)) return SecurityRedirect($inlineedit); } $evalues = array(); $efilename_values = array(); $blobfields = array(); // processing UID - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_UID = $pageObject->getControl("UID", $id); $control_UID->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); // update key value if($control_UID->getWebValue()!==false) $keys["UID"] = $control_UID->getWebValue(); } // processing UID - end // processing Title - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Title = $pageObject->getControl("Title", $id); $control_Title->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Title - end // processing English name - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_English_name = $pageObject->getControl("English name", $id); $control_English_name->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing English name - end // processing Chinese name - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Chinese_name = $pageObject->getControl("Chinese name", $id); $control_Chinese_name->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Chinese name - end // processing Tel - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Tel = $pageObject->getControl("Tel", $id); $control_Tel->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Tel - end // processing E-mail - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_E_mail = $pageObject->getControl("E-mail", $id); $control_E_mail->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing E-mail - end // processing Account Type - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Account_Type = $pageObject->getControl("Account Type", $id); $control_Account_Type->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Account Type - end // processing ID card no - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_ID_card_no = $pageObject->getControl("ID card no", $id); $control_ID_card_no->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing ID card no - end // processing Passport no - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Passport_no = $pageObject->getControl("Passport no", $id); $control_Passport_no->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Passport no - end // processing Issue Country - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Issue_Country = $pageObject->getControl("Issue Country", $id); $control_Issue_Country->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Issue Country - end // processing Nationality - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Nationality = $pageObject->getControl("Nationality", $id); $control_Nationality->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Nationality - end // processing Date of Birth - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Date_of_Birth = $pageObject->getControl("Date of Birth", $id); $control_Date_of_Birth->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Date of Birth - end // processing sex - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_sex = $pageObject->getControl("sex", $id); $control_sex->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing sex - end // processing Residential Address - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Residential_Address = $pageObject->getControl("Residential Address", $id); $control_Residential_Address->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Residential Address - end // processing correspondence address - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_correspondence_address = $pageObject->getControl("correspondence address", $id); $control_correspondence_address->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing correspondence address - end // processing Residential Tel - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Residential_Tel = $pageObject->getControl("Residential Tel", $id); $control_Residential_Tel->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Residential Tel - end // processing Date of Birth (day) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Date_of_Birth__day_ = $pageObject->getControl("Date of Birth (day)", $id); $control_Date_of_Birth__day_->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Date of Birth (day) - end // processing Date of Birth (Month) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Date_of_Birth__Month_ = $pageObject->getControl("Date of Birth (Month)", $id); $control_Date_of_Birth__Month_->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Date of Birth (Month) - end // processing Date of Birth (Year) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Date_of_Birth__Year_ = $pageObject->getControl("Date of Birth (Year)", $id); $control_Date_of_Birth__Year_->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Date of Birth (Year) - end // processing Employ status - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Employ_status = $pageObject->getControl("Employ status", $id); $control_Employ_status->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Employ status - end // processing Company post - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Company_post = $pageObject->getControl("Company post", $id); $control_Company_post->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Company post - end // processing Company name - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Company_name = $pageObject->getControl("Company name", $id); $control_Company_name->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Company name - end // processing Business nature - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Business_nature = $pageObject->getControl("Business nature", $id); $control_Business_nature->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Business nature - end // processing 香港證券現金帳戶 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_________ = $pageObject->getControl("香港證券現金帳戶", $id); $control_________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 香港證券現金帳戶 - end // processing 香港證券保證金帳戶 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________ = $pageObject->getControl("香港證券保證金帳戶", $id); $control__________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 香港證券保證金帳戶 - end // processing 環球證券保證金帳戶 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________ = $pageObject->getControl("環球證券保證金帳戶", $id); $control__________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 環球證券保證金帳戶 - end // processing 貴金屬帳戶 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control______ = $pageObject->getControl("貴金屬帳戶", $id); $control______->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 貴金屬帳戶 - end // processing 期貨帳戶 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____ = $pageObject->getControl("期貨帳戶", $id); $control_____->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 期貨帳戶 - end // processing Statement post method - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Statement_post_method = $pageObject->getControl("Statement post method", $id); $control_Statement_post_method->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Statement post method - end // processing 主要入帳銀行 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_______ = $pageObject->getControl("主要入帳銀行", $id); $control_______->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 主要入帳銀行 - end // processing 帳戶號碼 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____ = $pageObject->getControl("帳戶號碼", $id); $control_____->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 帳戶號碼 - end // processing 貨幣 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control___ = $pageObject->getControl("貨幣", $id); $control___->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 貨幣 - end // processing 入帳銀行帳戶持有人 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________ = $pageObject->getControl("入帳銀行帳戶持有人", $id); $control__________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 入帳銀行帳戶持有人 - end // processing SWIFT編號 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_SWIFT__ = $pageObject->getControl("SWIFT編號", $id); $control_SWIFT__->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing SWIFT編號 - end // processing 每年收入 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____ = $pageObject->getControl("每年收入", $id); $control_____->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 每年收入 - end // processing 淨資產值 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____ = $pageObject->getControl("淨資產值", $id); $control_____->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 淨資產值 - end // processing 流動產值 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____ = $pageObject->getControl("流動產值", $id); $control_____->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 流動產值 - end // processing 香港上市証券 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_______ = $pageObject->getControl("香港上市証券", $id); $control_______->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 香港上市証券 - end // processing 海外上市證券 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_______ = $pageObject->getControl("海外上市證券", $id); $control_______->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 海外上市證券 - end // processing 香港期貨及期權 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________ = $pageObject->getControl("香港期貨及期權", $id); $control________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 香港期貨及期權 - end // processing 海外期貨及期權 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________ = $pageObject->getControl("海外期貨及期權", $id); $control________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 海外期貨及期權 - end // processing 投資目的 (收入) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________ = $pageObject->getControl("投資目的 (收入)", $id); $control__________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 投資目的 (收入) - end // processing 投資目的 (對沖) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________ = $pageObject->getControl("投資目的 (對沖)", $id); $control__________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 投資目的 (對沖) - end // processing 投資目的 (資本增值) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control____________ = $pageObject->getControl("投資目的 (資本增值)", $id); $control____________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 投資目的 (資本增值) - end // processing 投資目的 (投機) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________ = $pageObject->getControl("投資目的 (投機)", $id); $control__________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 投資目的 (投機) - end // processing 閣下自己、閣下之配偶、父母、及/或子女是否富泰中順的公司帳戶的董事及/或股東? - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________________________________________ = $pageObject->getControl("閣下自己、閣下之配偶、父母、及/或子女是否富泰中順的公司帳戶的董事及/或股東?", $id); $control________________________________________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 閣下自己、閣下之配偶、父母、及/或子女是否富泰中順的公司帳戶的董事及/或股東? - end // processing 閣下的配偶、及/或子女是否富泰中順的客戶? - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control______________________ = $pageObject->getControl("閣下的配偶、及/或子女是否富泰中順的客戶?", $id); $control______________________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 閣下的配偶、及/或子女是否富泰中順的客戶? - end // processing 閣下是否個人或與閣下之配偶共同控制任何富泰中順的公司客戶35%或以上的投票權? - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____________________________35_________ = $pageObject->getControl("閣下是否個人或與閣下之配偶共同控制任何富泰中順的公司客戶35%或以上的投票權?", $id); $control_____________________________35_________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 閣下是否個人或與閣下之配偶共同控制任何富泰中順的公司客戶35%或以上的投票權? - end // processing 閣下是否與富泰中順任何顧員有親屬關係? - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control____________________ = $pageObject->getControl("閣下是否與富泰中順任何顧員有親屬關係?", $id); $control____________________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 閣下是否與富泰中順任何顧員有親屬關係? - end // processing 閣下是否香港證監會持牌人或註冊人的顧員? - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____________________ = $pageObject->getControl("閣下是否香港證監會持牌人或註冊人的顧員?", $id); $control_____________________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 閣下是否香港證監會持牌人或註冊人的顧員? - end // processing 閣下是否此帳戶之最終受益人? - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_______________ = $pageObject->getControl("閣下是否此帳戶之最終受益人?", $id); $control_______________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 閣下是否此帳戶之最終受益人? - end // processing (請註明詳情) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________ = $pageObject->getControl("(請註明詳情)", $id); $control________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing (請註明詳情) - end // processing (請註明詳情)1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________1 = $pageObject->getControl("(請註明詳情)1", $id); $control________1->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing (請註明詳情)1 - end // processing (請註明詳情)2 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________2 = $pageObject->getControl("(請註明詳情)2", $id); $control________2->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing (請註明詳情)2 - end // processing (請註明詳情) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_________ = $pageObject->getControl("(請註明詳情) ", $id); $control_________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing (請註明詳情) - end // processing (請註明詳情)3 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________3 = $pageObject->getControl("(請註明詳情)3", $id); $control________3->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing (請註明詳情)3 - end // processing (請註明詳情)4 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________4 = $pageObject->getControl("(請註明詳情)4", $id); $control________4->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing (請註明詳情)4 - end // processing 閣下於過去三年,曾執行五次或以上有關衍生產品的交易 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________________________ = $pageObject->getControl("閣下於過去三年,曾執行五次或以上有關衍生產品的交易", $id); $control__________________________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 閣下於過去三年,曾執行五次或以上有關衍生產品的交易 - end // processing 閣下現時或過去擁有與衍生產品有關的工作經驗 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control______________________ = $pageObject->getControl("閣下現時或過去擁有與衍生產品有關的工作經驗", $id); $control______________________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 閣下現時或過去擁有與衍生產品有關的工作經驗 - end // processing 職位 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control___ = $pageObject->getControl("職位", $id); $control___->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 職位 - end // processing 公司名稱 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____ = $pageObject->getControl("公司名稱", $id); $control_____->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 公司名稱 - end // processing 工作年期 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____ = $pageObject->getControl("工作年期", $id); $control_____->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 工作年期 - end // processing 有關工作經驗詳情 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_________ = $pageObject->getControl("有關工作經驗詳情", $id); $control_________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 有關工作經驗詳情 - end // processing 閣下曾接受有關衍生產品的培訓或修讀相關課程 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control______________________ = $pageObject->getControl("閣下曾接受有關衍生產品的培訓或修讀相關課程", $id); $control______________________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 閣下曾接受有關衍生產品的培訓或修讀相關課程 - end // processing 詳情 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control___ = $pageObject->getControl("詳情", $id); $control___->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 詳情 - end // processing 風險披露聲明或就在交易所買賣的衍生產品所附帶的風險作出解釋」 。 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_________________________________ = $pageObject->getControl("風險披露聲明或就在交易所買賣的衍生產品所附帶的風險作出解釋」 。", $id); $control_________________________________->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing 風險披露聲明或就在交易所買賣的衍生產品所附帶的風險作出解釋」 。 - end // processing Employ status1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Employ_status1 = $pageObject->getControl("Employ status1", $id); $control_Employ_status1->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Employ status1 - end // processing Company post1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Company_post1 = $pageObject->getControl("Company post1", $id); $control_Company_post1->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Company post1 - end // processing Company name1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Company_name1 = $pageObject->getControl("Company name1", $id); $control_Company_name1->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Company name1 - end // processing Business nature1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Business_nature1 = $pageObject->getControl("Business nature1", $id); $control_Business_nature1->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Business nature1 - end // processing QQ - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_QQ = $pageObject->getControl("QQ", $id); $control_QQ->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing QQ - end // processing WeChat - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_WeChat = $pageObject->getControl("WeChat", $id); $control_WeChat->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing WeChat - end // processing QQ1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_QQ1 = $pageObject->getControl("QQ1", $id); $control_QQ1->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing QQ1 - end // processing WeChat1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_WeChat1 = $pageObject->getControl("WeChat1", $id); $control_WeChat1->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing WeChat1 - end // processing Create Date - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Create_Date = $pageObject->getControl("Create Date", $id); $control_Create_Date->readWebValue($evalues, $blobfields, $strWhereClause, $oldValuesRead, $efilename_values); } // processing Create Date - end foreach($keys as $i=>$key) { if($key != $savedKeys[$i]) { $keysChanged = true; break; } } foreach($efilename_values as $ekey=>$value) $evalues[$ekey] = $value; // handle locking stuff before saving the record if($pageObject->lockingObj) { $lockmessage = ""; if( $keysChanged ) { $lockResult = $pageObject->lockingObj->ConfirmLock($strTableName,$savedKeys,$lockmessage); if( $lockResult ) $lockResult = $pageObject->lockingObj->LockRecord($strTableName, $keys ); } else { $lockResult = $pageObject->lockingObj->ConfirmLock($strTableName,$savedKeys,$lockmessage); } if( !$lockResult ) { $enableCtrlsForEditing = false; $system_attrs = "style='display:block;'"; if($inlineedit == EDIT_INLINE) { if(IsAdmin() || $_SESSION["AccessLevel"] == ACCESS_LEVEL_ADMINGROUP) $lockmessage = $pageObject->lockingObj->GetLockInfo($strTableName,$savedKeys,false,$id); $returnJSON['success'] = false; $returnJSON['message'] = $lockmessage; $returnJSON['enableCtrls'] = $enableCtrlsForEditing; $returnJSON['confirmTime'] = $pageObject->lockingObj->ConfirmTime; echo printJSON($returnJSON); exit(); } else { if(IsAdmin() || $_SESSION["AccessLevel"] == ACCESS_LEVEL_ADMINGROUP) $system_message = $pageObject->lockingObj->GetLockInfo($strTableName,$savedKeys,true,$id); else $system_message = $lockmessage; } $status = "DECLINED"; $readevalues = true; } } if($readevalues==false) { // do event $retval = true; if($eventObj->exists("BeforeEdit")) $retval=$eventObj->BeforeEdit($evalues,$strWhereClause,$dataold,$keys,$usermessage,(bool)$inlineedit, $pageObject); if($hasDenyDuplicatesFields && $retval) { $changedValues = array(); foreach($evalues as $fieldName => $value) { if($dataold[$fieldName] != $value) { $changedValues[$fieldName] = $value; } } //check if some values are duplicated for the fields not allowing duplicates $retval = !$pageObject->hasDeniedDuplicateValues($changedValues, $usermessage); } // if get save data and user is logged and not check permission if ($evalues && !CheckTablePermissions($strTableName, "E") && isLogged()) { $retval = false; $usermessage = 'You have no permissions to complete this action.'; } // if get save data and user is not logged or guest if ($evalues && ((!CheckTablePermissions($strTableName, "E") && isLoggedAsGuest()) || !isLogged())) { $retval = false; $usermessage = mlang_message("SESSION_EXPIRED1") . "" . mlang_message("SESSION_EXPIRED3") . "" . mlang_message("SESSION_EXPIRED4"); } if($retval && $pageObject->isCaptchaOk) { if($inlineedit!=EDIT_INLINE) $_SESSION[$strTableName."_count_captcha"] = $_SESSION[$strTableName."_count_captcha"]+1; //set updated lat-lng values for all map fileds with 'UpdateLatLng' ticked if( $pageObject->isTableGeoUpdatable() ) $pageObject->setUpdatedLatLng( $evalues, $dataold ); $customEditResult = true; if($eventObj->exists("CustomEdit")) $customEditResult = $eventObj->CustomEdit($evalues, $strWhereClause, $dataold, $keys, $usermessage, (bool)$inlineedit, $pageObject); if(!$customEditResult) { // custom procedure worked $IsSaved = ($usermessage == ""); } else { $IsSaved = DoUpdateRecord($strOriginalTableName,$evalues,$blobfields,$strWhereClause,$id,$pageObject, $pageObject->cipherer); $usermessage = $message; } if($IsSaved) { // Give possibility to all edit controls to clean their data // processing UID - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_UID->afterSuccessfulSave(); } // processing UID - end // processing Title - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Title->afterSuccessfulSave(); } // processing Title - end // processing English name - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_English_name->afterSuccessfulSave(); } // processing English name - end // processing Chinese name - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Chinese_name->afterSuccessfulSave(); } // processing Chinese name - end // processing Tel - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Tel->afterSuccessfulSave(); } // processing Tel - end // processing E-mail - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_E_mail->afterSuccessfulSave(); } // processing E-mail - end // processing Account Type - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Account_Type->afterSuccessfulSave(); } // processing Account Type - end // processing ID card no - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_ID_card_no->afterSuccessfulSave(); } // processing ID card no - end // processing Passport no - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Passport_no->afterSuccessfulSave(); } // processing Passport no - end // processing Issue Country - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Issue_Country->afterSuccessfulSave(); } // processing Issue Country - end // processing Nationality - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Nationality->afterSuccessfulSave(); } // processing Nationality - end // processing Date of Birth - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Date_of_Birth->afterSuccessfulSave(); } // processing Date of Birth - end // processing sex - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_sex->afterSuccessfulSave(); } // processing sex - end // processing Residential Address - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Residential_Address->afterSuccessfulSave(); } // processing Residential Address - end // processing correspondence address - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_correspondence_address->afterSuccessfulSave(); } // processing correspondence address - end // processing Residential Tel - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Residential_Tel->afterSuccessfulSave(); } // processing Residential Tel - end // processing Date of Birth (day) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Date_of_Birth__day_->afterSuccessfulSave(); } // processing Date of Birth (day) - end // processing Date of Birth (Month) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Date_of_Birth__Month_->afterSuccessfulSave(); } // processing Date of Birth (Month) - end // processing Date of Birth (Year) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Date_of_Birth__Year_->afterSuccessfulSave(); } // processing Date of Birth (Year) - end // processing Employ status - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Employ_status->afterSuccessfulSave(); } // processing Employ status - end // processing Company post - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Company_post->afterSuccessfulSave(); } // processing Company post - end // processing Company name - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Company_name->afterSuccessfulSave(); } // processing Company name - end // processing Business nature - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Business_nature->afterSuccessfulSave(); } // processing Business nature - end // processing 香港證券現金帳戶 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_________->afterSuccessfulSave(); } // processing 香港證券現金帳戶 - end // processing 香港證券保證金帳戶 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________->afterSuccessfulSave(); } // processing 香港證券保證金帳戶 - end // processing 環球證券保證金帳戶 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________->afterSuccessfulSave(); } // processing 環球證券保證金帳戶 - end // processing 貴金屬帳戶 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control______->afterSuccessfulSave(); } // processing 貴金屬帳戶 - end // processing 期貨帳戶 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____->afterSuccessfulSave(); } // processing 期貨帳戶 - end // processing Statement post method - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Statement_post_method->afterSuccessfulSave(); } // processing Statement post method - end // processing 主要入帳銀行 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_______->afterSuccessfulSave(); } // processing 主要入帳銀行 - end // processing 帳戶號碼 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____->afterSuccessfulSave(); } // processing 帳戶號碼 - end // processing 貨幣 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control___->afterSuccessfulSave(); } // processing 貨幣 - end // processing 入帳銀行帳戶持有人 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________->afterSuccessfulSave(); } // processing 入帳銀行帳戶持有人 - end // processing SWIFT編號 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_SWIFT__->afterSuccessfulSave(); } // processing SWIFT編號 - end // processing 每年收入 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____->afterSuccessfulSave(); } // processing 每年收入 - end // processing 淨資產值 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____->afterSuccessfulSave(); } // processing 淨資產值 - end // processing 流動產值 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____->afterSuccessfulSave(); } // processing 流動產值 - end // processing 香港上市証券 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_______->afterSuccessfulSave(); } // processing 香港上市証券 - end // processing 海外上市證券 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_______->afterSuccessfulSave(); } // processing 海外上市證券 - end // processing 香港期貨及期權 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________->afterSuccessfulSave(); } // processing 香港期貨及期權 - end // processing 海外期貨及期權 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________->afterSuccessfulSave(); } // processing 海外期貨及期權 - end // processing 投資目的 (收入) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________->afterSuccessfulSave(); } // processing 投資目的 (收入) - end // processing 投資目的 (對沖) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________->afterSuccessfulSave(); } // processing 投資目的 (對沖) - end // processing 投資目的 (資本增值) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control____________->afterSuccessfulSave(); } // processing 投資目的 (資本增值) - end // processing 投資目的 (投機) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________->afterSuccessfulSave(); } // processing 投資目的 (投機) - end // processing 閣下自己、閣下之配偶、父母、及/或子女是否富泰中順的公司帳戶的董事及/或股東? - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________________________________________->afterSuccessfulSave(); } // processing 閣下自己、閣下之配偶、父母、及/或子女是否富泰中順的公司帳戶的董事及/或股東? - end // processing 閣下的配偶、及/或子女是否富泰中順的客戶? - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control______________________->afterSuccessfulSave(); } // processing 閣下的配偶、及/或子女是否富泰中順的客戶? - end // processing 閣下是否個人或與閣下之配偶共同控制任何富泰中順的公司客戶35%或以上的投票權? - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____________________________35_________->afterSuccessfulSave(); } // processing 閣下是否個人或與閣下之配偶共同控制任何富泰中順的公司客戶35%或以上的投票權? - end // processing 閣下是否與富泰中順任何顧員有親屬關係? - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control____________________->afterSuccessfulSave(); } // processing 閣下是否與富泰中順任何顧員有親屬關係? - end // processing 閣下是否香港證監會持牌人或註冊人的顧員? - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____________________->afterSuccessfulSave(); } // processing 閣下是否香港證監會持牌人或註冊人的顧員? - end // processing 閣下是否此帳戶之最終受益人? - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_______________->afterSuccessfulSave(); } // processing 閣下是否此帳戶之最終受益人? - end // processing (請註明詳情) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________->afterSuccessfulSave(); } // processing (請註明詳情) - end // processing (請註明詳情)1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________1->afterSuccessfulSave(); } // processing (請註明詳情)1 - end // processing (請註明詳情)2 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________2->afterSuccessfulSave(); } // processing (請註明詳情)2 - end // processing (請註明詳情) - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_________->afterSuccessfulSave(); } // processing (請註明詳情) - end // processing (請註明詳情)3 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________3->afterSuccessfulSave(); } // processing (請註明詳情)3 - end // processing (請註明詳情)4 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control________4->afterSuccessfulSave(); } // processing (請註明詳情)4 - end // processing 閣下於過去三年,曾執行五次或以上有關衍生產品的交易 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control__________________________->afterSuccessfulSave(); } // processing 閣下於過去三年,曾執行五次或以上有關衍生產品的交易 - end // processing 閣下現時或過去擁有與衍生產品有關的工作經驗 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control______________________->afterSuccessfulSave(); } // processing 閣下現時或過去擁有與衍生產品有關的工作經驗 - end // processing 職位 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control___->afterSuccessfulSave(); } // processing 職位 - end // processing 公司名稱 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____->afterSuccessfulSave(); } // processing 公司名稱 - end // processing 工作年期 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_____->afterSuccessfulSave(); } // processing 工作年期 - end // processing 有關工作經驗詳情 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_________->afterSuccessfulSave(); } // processing 有關工作經驗詳情 - end // processing 閣下曾接受有關衍生產品的培訓或修讀相關課程 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control______________________->afterSuccessfulSave(); } // processing 閣下曾接受有關衍生產品的培訓或修讀相關課程 - end // processing 詳情 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control___->afterSuccessfulSave(); } // processing 詳情 - end // processing 風險披露聲明或就在交易所買賣的衍生產品所附帶的風險作出解釋」 。 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_________________________________->afterSuccessfulSave(); } // processing 風險披露聲明或就在交易所買賣的衍生產品所附帶的風險作出解釋」 。 - end // processing Employ status1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Employ_status1->afterSuccessfulSave(); } // processing Employ status1 - end // processing Company post1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Company_post1->afterSuccessfulSave(); } // processing Company post1 - end // processing Company name1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Company_name1->afterSuccessfulSave(); } // processing Company name1 - end // processing Business nature1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Business_nature1->afterSuccessfulSave(); } // processing Business nature1 - end // processing QQ - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_QQ->afterSuccessfulSave(); } // processing QQ - end // processing WeChat - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_WeChat->afterSuccessfulSave(); } // processing WeChat - end // processing QQ1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_QQ1->afterSuccessfulSave(); } // processing QQ1 - end // processing WeChat1 - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_WeChat1->afterSuccessfulSave(); } // processing WeChat1 - end // processing Create Date - begin $condition = $inlineedit!=EDIT_INLINE;//(!$inlineedit) edit simple mode if($condition) { $control_Create_Date->afterSuccessfulSave(); } // processing Create Date - end // after edit event if($pageObject->lockingObj) { if( $keysChanged ) { //remove from the locking table a record with the old keys $pageObject->lockingObj->UnlockRecord($strTableName, $savedKeys, ""); } if( $inlineedit == EDIT_INLINE || $inlineedit == EDIT_POPUP && !$pageObject->pSet->useMoveNext() ) { $pageObject->lockingObj->UnlockRecord($strTableName, $keys , ""); } } if($auditObj || $eventObj->exists("AfterEdit")) { foreach($dataold as $idx=>$val) { if(!array_key_exists($idx,$evalues)) $evalues[$idx] = $val; } } if($auditObj) $auditObj->LogEdit($strTableName,$evalues,$dataold,$keys); if($eventObj->exists("AfterEdit")) $eventObj->AfterEdit($evalues,KeyWhere($keys),$dataold,$keys,(bool)$inlineedit, $pageObject); $mesClass = ""; } else { $message = $usermessage; $readevalues = true; $status = "DECLINED"; } } else { $message = $usermessage; $readevalues = true; $status = "DECLINED"; } } // saving was not successful if($readevalues) { if($pageObject->lockingObj && $keysChanged) { // free the record with new key values locked before saving $pageObject->lockingObj->UnlockRecord($strTableName, $keys , ""); } $keys = $savedKeys; } } if($message) $message = "
".$message."
"; // redirect after saving to avoid POSTDATA resending if ($IsSaved && no_output_done() && $inlineedit == EDIT_SIMPLE) { // saving message $_SESSION["message_edit"] = ($message ? $message : ""); // key get query $keyGetQ = ""; $keyGetQ.="editid1=".rawurldecode($keys["UID"])."&"; // cut last & $keyGetQ = substr($keyGetQ, 0, strlen($keyGetQ)-1); // redirect HeaderRedirect("Individual_Account", $pageObject->getPageType(), $keyGetQ); // turned on output buffering, so we need to stop script exit(); } // for PRG rule, to avoid POSTDATA resend. Saving mess in session if ($inlineedit == EDIT_SIMPLE && isset($_SESSION["message_edit"])) { $message = $_SESSION["message_edit"]; unset($_SESSION["message_edit"]); } // lock record before printing controls if($pageObject->lockingObj && !( $IsSaved && ( $inlineedit == EDIT_INLINE || $inlineedit == EDIT_POPUP ) )) { $enableCtrlsForEditing = $pageObject->lockingObj->LockRecord($strTableName, $keys); if(!$enableCtrlsForEditing) { if($inlineedit == EDIT_INLINE) { if(IsAdmin() || $_SESSION["AccessLevel"] == ACCESS_LEVEL_ADMINGROUP) $lockmessage = $pageObject->lockingObj->GetLockInfo($strTableName,$keys,false,$id); else $lockmessage = $pageObject->lockingObj->LockUser; $returnJSON['success'] = false; $returnJSON['message'] = $lockmessage; $returnJSON['enableCtrls'] = $enableCtrlsForEditing; $returnJSON['confirmTime'] = $pageObject->lockingObj->ConfirmTime; echo printJSON($returnJSON); exit(); } $system_attrs = "style='display:block;'"; $system_message = $pageObject->lockingObj->LockUser; if(IsAdmin() || $_SESSION["AccessLevel"] == ACCESS_LEVEL_ADMINGROUP) { $rb = $pageObject->lockingObj->GetLockInfo($strTableName,$keys,true,$id); if($rb!="") $system_message = $rb; } } } if($pageObject->lockingObj && $inlineedit!=EDIT_INLINE) $pageObject->body["begin"] .='
'.$system_message.'
'; $pageObject->setKeys($keys); $pageObject->readEditValues = $readevalues; if($readevalues) $pageObject->editValues = $evalues; // read current values from the database $data = $pageObject->getCurrentRecordInternal(); if(!$data) { if($inlineedit == EDIT_SIMPLE) { HeaderRedirect("Individual_Account", "list", "a=return"); exit(); } else $data = array(); } if($globalEvents->exists("IsRecordEditable", $strTableName)) { if(!$globalEvents->IsRecordEditable($data, true, $strTableName) && $inlineedit != EDIT_INLINE) { return SecurityRedirect($inlineedit); } } //global variable use in BuildEditControl function // show readonly fields $xt->assign("show_key1", $pageObject->showDBValue("UID", $data)); if($readevalues) { $data["UID"] = $evalues["UID"]; $data["Title"] = $evalues["Title"]; $data["English name"] = $evalues["English name"]; $data["Chinese name"] = $evalues["Chinese name"]; $data["Tel"] = $evalues["Tel"]; $data["E-mail"] = $evalues["E-mail"]; $data["Account Type"] = $evalues["Account Type"]; $data["ID card no"] = $evalues["ID card no"]; $data["Passport no"] = $evalues["Passport no"]; $data["Issue Country"] = $evalues["Issue Country"]; $data["Nationality"] = $evalues["Nationality"]; $data["Date of Birth"] = $evalues["Date of Birth"]; $data["sex"] = $evalues["sex"]; $data["Residential Address"] = $evalues["Residential Address"]; $data["correspondence address"] = $evalues["correspondence address"]; $data["Residential Tel"] = $evalues["Residential Tel"]; $data["Date of Birth (day)"] = $evalues["Date of Birth (day)"]; $data["Date of Birth (Month)"] = $evalues["Date of Birth (Month)"]; $data["Date of Birth (Year)"] = $evalues["Date of Birth (Year)"]; $data["Employ status"] = $evalues["Employ status"]; $data["Company post"] = $evalues["Company post"]; $data["Company name"] = $evalues["Company name"]; $data["Business nature"] = $evalues["Business nature"]; $data["香港證券現金帳戶"] = $evalues["香港證券現金帳戶"]; $data["香港證券保證金帳戶"] = $evalues["香港證券保證金帳戶"]; $data["環球證券保證金帳戶"] = $evalues["環球證券保證金帳戶"]; $data["貴金屬帳戶"] = $evalues["貴金屬帳戶"]; $data["期貨帳戶"] = $evalues["期貨帳戶"]; $data["Statement post method"] = $evalues["Statement post method"]; $data["主要入帳銀行"] = $evalues["主要入帳銀行"]; $data["帳戶號碼"] = $evalues["帳戶號碼"]; $data["貨幣"] = $evalues["貨幣"]; $data["入帳銀行帳戶持有人"] = $evalues["入帳銀行帳戶持有人"]; $data["SWIFT編號"] = $evalues["SWIFT編號"]; $data["每年收入"] = $evalues["每年收入"]; $data["淨資產值"] = $evalues["淨資產值"]; $data["流動產值"] = $evalues["流動產值"]; $data["香港上市証券"] = $evalues["香港上市証券"]; $data["海外上市證券"] = $evalues["海外上市證券"]; $data["香港期貨及期權"] = $evalues["香港期貨及期權"]; $data["海外期貨及期權"] = $evalues["海外期貨及期權"]; $data["投資目的 (收入)"] = $evalues["投資目的 (收入)"]; $data["投資目的 (對沖)"] = $evalues["投資目的 (對沖)"]; $data["投資目的 (資本增值)"] = $evalues["投資目的 (資本增值)"]; $data["投資目的 (投機)"] = $evalues["投資目的 (投機)"]; $data["閣下自己、閣下之配偶、父母、及/或子女是否富泰中順的公司帳戶的董事及/或股東?"] = $evalues["閣下自己、閣下之配偶、父母、及/或子女是否富泰中順的公司帳戶的董事及/或股東?"]; $data["閣下的配偶、及/或子女是否富泰中順的客戶?"] = $evalues["閣下的配偶、及/或子女是否富泰中順的客戶?"]; $data["閣下是否個人或與閣下之配偶共同控制任何富泰中順的公司客戶35%或以上的投票權?"] = $evalues["閣下是否個人或與閣下之配偶共同控制任何富泰中順的公司客戶35%或以上的投票權?"]; $data["閣下是否與富泰中順任何顧員有親屬關係?"] = $evalues["閣下是否與富泰中順任何顧員有親屬關係?"]; $data["閣下是否香港證監會持牌人或註冊人的顧員?"] = $evalues["閣下是否香港證監會持牌人或註冊人的顧員?"]; $data["閣下是否此帳戶之最終受益人?"] = $evalues["閣下是否此帳戶之最終受益人?"]; $data["(請註明詳情)"] = $evalues["(請註明詳情)"]; $data["(請註明詳情)1"] = $evalues["(請註明詳情)1"]; $data["(請註明詳情)2"] = $evalues["(請註明詳情)2"]; $data["(請註明詳情) "] = $evalues["(請註明詳情) "]; $data["(請註明詳情)3"] = $evalues["(請註明詳情)3"]; $data["(請註明詳情)4"] = $evalues["(請註明詳情)4"]; $data["閣下於過去三年,曾執行五次或以上有關衍生產品的交易"] = $evalues["閣下於過去三年,曾執行五次或以上有關衍生產品的交易"]; $data["閣下現時或過去擁有與衍生產品有關的工作經驗"] = $evalues["閣下現時或過去擁有與衍生產品有關的工作經驗"]; $data["職位"] = $evalues["職位"]; $data["公司名稱"] = $evalues["公司名稱"]; $data["工作年期"] = $evalues["工作年期"]; $data["有關工作經驗詳情"] = $evalues["有關工作經驗詳情"]; $data["閣下曾接受有關衍生產品的培訓或修讀相關課程"] = $evalues["閣下曾接受有關衍生產品的培訓或修讀相關課程"]; $data["詳情"] = $evalues["詳情"]; $data["風險披露聲明或就在交易所買賣的衍生產品所附帶的風險作出解釋」 。"] = $evalues["風險披露聲明或就在交易所買賣的衍生產品所附帶的風險作出解釋」 。"]; $data["Employ status1"] = $evalues["Employ status1"]; $data["Company post1"] = $evalues["Company post1"]; $data["Company name1"] = $evalues["Company name1"]; $data["Business nature1"] = $evalues["Business nature1"]; $data["QQ"] = $evalues["QQ"]; $data["WeChat"] = $evalues["WeChat"]; $data["QQ1"] = $evalues["QQ1"]; $data["WeChat1"] = $evalues["WeChat1"]; $data["Create Date"] = $evalues["Create Date"]; } ///////////////////////////////////////////////////////////// // assign values to $xt class, prepare page for displaying ///////////////////////////////////////////////////////////// //Basic includes js files $includes = ""; //javascript code if($inlineedit != EDIT_INLINE) { if($inlineedit == EDIT_SIMPLE) { $includes .= GetBaseScriptsForPage(false); if (!isMobile()) $includes.= "
\r\n"; $pageObject->body["begin"].= $includes; } if(!$pageObject->isAppearOnTabs("UID")) $xt->assign("UID_fieldblock",true); else $xt->assign("UID_tabfieldblock",true); $xt->assign("UID_label",true); if(isEnableSection508()) $xt->assign_section("UID_label",""); if(!$pageObject->isAppearOnTabs("Title")) $xt->assign("Title_fieldblock",true); else $xt->assign("Title_tabfieldblock",true); $xt->assign("Title_label",true); if(isEnableSection508()) $xt->assign_section("Title_label",""); if(!$pageObject->isAppearOnTabs("English name")) $xt->assign("English_name_fieldblock",true); else $xt->assign("English_name_tabfieldblock",true); $xt->assign("English_name_label",true); if(isEnableSection508()) $xt->assign_section("English_name_label",""); if(!$pageObject->isAppearOnTabs("Chinese name")) $xt->assign("Chinese_name_fieldblock",true); else $xt->assign("Chinese_name_tabfieldblock",true); $xt->assign("Chinese_name_label",true); if(isEnableSection508()) $xt->assign_section("Chinese_name_label",""); if(!$pageObject->isAppearOnTabs("Tel")) $xt->assign("Tel_fieldblock",true); else $xt->assign("Tel_tabfieldblock",true); $xt->assign("Tel_label",true); if(isEnableSection508()) $xt->assign_section("Tel_label",""); if(!$pageObject->isAppearOnTabs("E-mail")) $xt->assign("E_mail_fieldblock",true); else $xt->assign("E_mail_tabfieldblock",true); $xt->assign("E_mail_label",true); if(isEnableSection508()) $xt->assign_section("E_mail_label",""); if(!$pageObject->isAppearOnTabs("Account Type")) $xt->assign("Account_Type_fieldblock",true); else $xt->assign("Account_Type_tabfieldblock",true); $xt->assign("Account_Type_label",true); if(isEnableSection508()) $xt->assign_section("Account_Type_label",""); if(!$pageObject->isAppearOnTabs("ID card no")) $xt->assign("ID_card_no_fieldblock",true); else $xt->assign("ID_card_no_tabfieldblock",true); $xt->assign("ID_card_no_label",true); if(isEnableSection508()) $xt->assign_section("ID_card_no_label",""); if(!$pageObject->isAppearOnTabs("Passport no")) $xt->assign("Passport_no_fieldblock",true); else $xt->assign("Passport_no_tabfieldblock",true); $xt->assign("Passport_no_label",true); if(isEnableSection508()) $xt->assign_section("Passport_no_label",""); if(!$pageObject->isAppearOnTabs("Issue Country")) $xt->assign("Issue_Country_fieldblock",true); else $xt->assign("Issue_Country_tabfieldblock",true); $xt->assign("Issue_Country_label",true); if(isEnableSection508()) $xt->assign_section("Issue_Country_label",""); if(!$pageObject->isAppearOnTabs("Nationality")) $xt->assign("Nationality_fieldblock",true); else $xt->assign("Nationality_tabfieldblock",true); $xt->assign("Nationality_label",true); if(isEnableSection508()) $xt->assign_section("Nationality_label",""); if(!$pageObject->isAppearOnTabs("Date of Birth")) $xt->assign("Date_of_Birth_fieldblock",true); else $xt->assign("Date_of_Birth_tabfieldblock",true); $xt->assign("Date_of_Birth_label",true); if(isEnableSection508()) $xt->assign_section("Date_of_Birth_label",""); if(!$pageObject->isAppearOnTabs("sex")) $xt->assign("sex_fieldblock",true); else $xt->assign("sex_tabfieldblock",true); $xt->assign("sex_label",true); if(isEnableSection508()) $xt->assign_section("sex_label",""); if(!$pageObject->isAppearOnTabs("Residential Address")) $xt->assign("Residential_Address_fieldblock",true); else $xt->assign("Residential_Address_tabfieldblock",true); $xt->assign("Residential_Address_label",true); if(isEnableSection508()) $xt->assign_section("Residential_Address_label",""); if(!$pageObject->isAppearOnTabs("correspondence address")) $xt->assign("correspondence_address_fieldblock",true); else $xt->assign("correspondence_address_tabfieldblock",true); $xt->assign("correspondence_address_label",true); if(isEnableSection508()) $xt->assign_section("correspondence_address_label",""); if(!$pageObject->isAppearOnTabs("Residential Tel")) $xt->assign("Residential_Tel_fieldblock",true); else $xt->assign("Residential_Tel_tabfieldblock",true); $xt->assign("Residential_Tel_label",true); if(isEnableSection508()) $xt->assign_section("Residential_Tel_label",""); if(!$pageObject->isAppearOnTabs("Date of Birth (day)")) $xt->assign("Date_of_Birth__day__fieldblock",true); else $xt->assign("Date_of_Birth__day__tabfieldblock",true); $xt->assign("Date_of_Birth__day__label",true); if(isEnableSection508()) $xt->assign_section("Date_of_Birth__day__label",""); if(!$pageObject->isAppearOnTabs("Date of Birth (Month)")) $xt->assign("Date_of_Birth__Month__fieldblock",true); else $xt->assign("Date_of_Birth__Month__tabfieldblock",true); $xt->assign("Date_of_Birth__Month__label",true); if(isEnableSection508()) $xt->assign_section("Date_of_Birth__Month__label",""); if(!$pageObject->isAppearOnTabs("Date of Birth (Year)")) $xt->assign("Date_of_Birth__Year__fieldblock",true); else $xt->assign("Date_of_Birth__Year__tabfieldblock",true); $xt->assign("Date_of_Birth__Year__label",true); if(isEnableSection508()) $xt->assign_section("Date_of_Birth__Year__label",""); if(!$pageObject->isAppearOnTabs("Employ status")) $xt->assign("Employ_status_fieldblock",true); else $xt->assign("Employ_status_tabfieldblock",true); $xt->assign("Employ_status_label",true); if(isEnableSection508()) $xt->assign_section("Employ_status_label",""); if(!$pageObject->isAppearOnTabs("Company post")) $xt->assign("Company_post_fieldblock",true); else $xt->assign("Company_post_tabfieldblock",true); $xt->assign("Company_post_label",true); if(isEnableSection508()) $xt->assign_section("Company_post_label",""); if(!$pageObject->isAppearOnTabs("Company name")) $xt->assign("Company_name_fieldblock",true); else $xt->assign("Company_name_tabfieldblock",true); $xt->assign("Company_name_label",true); if(isEnableSection508()) $xt->assign_section("Company_name_label",""); if(!$pageObject->isAppearOnTabs("Business nature")) $xt->assign("Business_nature_fieldblock",true); else $xt->assign("Business_nature_tabfieldblock",true); $xt->assign("Business_nature_label",true); if(isEnableSection508()) $xt->assign_section("Business_nature_label",""); if(!$pageObject->isAppearOnTabs("香港證券現金帳戶")) $xt->assign("_________fieldblock",true); else $xt->assign("_________tabfieldblock",true); $xt->assign("_________label",true); if(isEnableSection508()) $xt->assign_section("_________label",""); if(!$pageObject->isAppearOnTabs("香港證券保證金帳戶")) $xt->assign("__________fieldblock",true); else $xt->assign("__________tabfieldblock",true); $xt->assign("__________label",true); if(isEnableSection508()) $xt->assign_section("__________label",""); if(!$pageObject->isAppearOnTabs("環球證券保證金帳戶")) $xt->assign("__________fieldblock",true); else $xt->assign("__________tabfieldblock",true); $xt->assign("__________label",true); if(isEnableSection508()) $xt->assign_section("__________label",""); if(!$pageObject->isAppearOnTabs("貴金屬帳戶")) $xt->assign("______fieldblock",true); else $xt->assign("______tabfieldblock",true); $xt->assign("______label",true); if(isEnableSection508()) $xt->assign_section("______label",""); if(!$pageObject->isAppearOnTabs("期貨帳戶")) $xt->assign("_____fieldblock",true); else $xt->assign("_____tabfieldblock",true); $xt->assign("_____label",true); if(isEnableSection508()) $xt->assign_section("_____label",""); if(!$pageObject->isAppearOnTabs("Statement post method")) $xt->assign("Statement_post_method_fieldblock",true); else $xt->assign("Statement_post_method_tabfieldblock",true); $xt->assign("Statement_post_method_label",true); if(isEnableSection508()) $xt->assign_section("Statement_post_method_label",""); if(!$pageObject->isAppearOnTabs("主要入帳銀行")) $xt->assign("_______fieldblock",true); else $xt->assign("_______tabfieldblock",true); $xt->assign("_______label",true); if(isEnableSection508()) $xt->assign_section("_______label",""); if(!$pageObject->isAppearOnTabs("帳戶號碼")) $xt->assign("_____fieldblock",true); else $xt->assign("_____tabfieldblock",true); $xt->assign("_____label",true); if(isEnableSection508()) $xt->assign_section("_____label",""); if(!$pageObject->isAppearOnTabs("貨幣")) $xt->assign("___fieldblock",true); else $xt->assign("___tabfieldblock",true); $xt->assign("___label",true); if(isEnableSection508()) $xt->assign_section("___label",""); if(!$pageObject->isAppearOnTabs("入帳銀行帳戶持有人")) $xt->assign("__________fieldblock",true); else $xt->assign("__________tabfieldblock",true); $xt->assign("__________label",true); if(isEnableSection508()) $xt->assign_section("__________label",""); if(!$pageObject->isAppearOnTabs("SWIFT編號")) $xt->assign("SWIFT___fieldblock",true); else $xt->assign("SWIFT___tabfieldblock",true); $xt->assign("SWIFT___label",true); if(isEnableSection508()) $xt->assign_section("SWIFT___label",""); if(!$pageObject->isAppearOnTabs("每年收入")) $xt->assign("_____fieldblock",true); else $xt->assign("_____tabfieldblock",true); $xt->assign("_____label",true); if(isEnableSection508()) $xt->assign_section("_____label",""); if(!$pageObject->isAppearOnTabs("淨資產值")) $xt->assign("_____fieldblock",true); else $xt->assign("_____tabfieldblock",true); $xt->assign("_____label",true); if(isEnableSection508()) $xt->assign_section("_____label",""); if(!$pageObject->isAppearOnTabs("流動產值")) $xt->assign("_____fieldblock",true); else $xt->assign("_____tabfieldblock",true); $xt->assign("_____label",true); if(isEnableSection508()) $xt->assign_section("_____label",""); if(!$pageObject->isAppearOnTabs("香港上市証券")) $xt->assign("_______fieldblock",true); else $xt->assign("_______tabfieldblock",true); $xt->assign("_______label",true); if(isEnableSection508()) $xt->assign_section("_______label",""); if(!$pageObject->isAppearOnTabs("海外上市證券")) $xt->assign("_______fieldblock",true); else $xt->assign("_______tabfieldblock",true); $xt->assign("_______label",true); if(isEnableSection508()) $xt->assign_section("_______label",""); if(!$pageObject->isAppearOnTabs("香港期貨及期權")) $xt->assign("________fieldblock",true); else $xt->assign("________tabfieldblock",true); $xt->assign("________label",true); if(isEnableSection508()) $xt->assign_section("________label",""); if(!$pageObject->isAppearOnTabs("海外期貨及期權")) $xt->assign("________fieldblock",true); else $xt->assign("________tabfieldblock",true); $xt->assign("________label",true); if(isEnableSection508()) $xt->assign_section("________label",""); if(!$pageObject->isAppearOnTabs("投資目的 (收入)")) $xt->assign("__________fieldblock",true); else $xt->assign("__________tabfieldblock",true); $xt->assign("__________label",true); if(isEnableSection508()) $xt->assign_section("__________label",""); if(!$pageObject->isAppearOnTabs("投資目的 (對沖)")) $xt->assign("__________fieldblock",true); else $xt->assign("__________tabfieldblock",true); $xt->assign("__________label",true); if(isEnableSection508()) $xt->assign_section("__________label",""); if(!$pageObject->isAppearOnTabs("投資目的 (資本增值)")) $xt->assign("____________fieldblock",true); else $xt->assign("____________tabfieldblock",true); $xt->assign("____________label",true); if(isEnableSection508()) $xt->assign_section("____________label",""); if(!$pageObject->isAppearOnTabs("投資目的 (投機)")) $xt->assign("__________fieldblock",true); else $xt->assign("__________tabfieldblock",true); $xt->assign("__________label",true); if(isEnableSection508()) $xt->assign_section("__________label",""); if(!$pageObject->isAppearOnTabs("閣下自己、閣下之配偶、父母、及/或子女是否富泰中順的公司帳戶的董事及/或股東?")) $xt->assign("________________________________________fieldblock",true); else $xt->assign("________________________________________tabfieldblock",true); $xt->assign("________________________________________label",true); if(isEnableSection508()) $xt->assign_section("________________________________________label",""); if(!$pageObject->isAppearOnTabs("閣下的配偶、及/或子女是否富泰中順的客戶?")) $xt->assign("______________________fieldblock",true); else $xt->assign("______________________tabfieldblock",true); $xt->assign("______________________label",true); if(isEnableSection508()) $xt->assign_section("______________________label",""); if(!$pageObject->isAppearOnTabs("閣下是否個人或與閣下之配偶共同控制任何富泰中順的公司客戶35%或以上的投票權?")) $xt->assign("____________________________35__________fieldblock",true); else $xt->assign("____________________________35__________tabfieldblock",true); $xt->assign("____________________________35__________label",true); if(isEnableSection508()) $xt->assign_section("____________________________35__________label",""); if(!$pageObject->isAppearOnTabs("閣下是否與富泰中順任何顧員有親屬關係?")) $xt->assign("____________________fieldblock",true); else $xt->assign("____________________tabfieldblock",true); $xt->assign("____________________label",true); if(isEnableSection508()) $xt->assign_section("____________________label",""); if(!$pageObject->isAppearOnTabs("閣下是否香港證監會持牌人或註冊人的顧員?")) $xt->assign("_____________________fieldblock",true); else $xt->assign("_____________________tabfieldblock",true); $xt->assign("_____________________label",true); if(isEnableSection508()) $xt->assign_section("_____________________label",""); if(!$pageObject->isAppearOnTabs("閣下是否此帳戶之最終受益人?")) $xt->assign("_______________fieldblock",true); else $xt->assign("_______________tabfieldblock",true); $xt->assign("_______________label",true); if(isEnableSection508()) $xt->assign_section("_______________label",""); if(!$pageObject->isAppearOnTabs("(請註明詳情)")) $xt->assign("________fieldblock",true); else $xt->assign("________tabfieldblock",true); $xt->assign("________label",true); if(isEnableSection508()) $xt->assign_section("________label",""); if(!$pageObject->isAppearOnTabs("(請註明詳情)1")) $xt->assign("_______1_fieldblock",true); else $xt->assign("_______1_tabfieldblock",true); $xt->assign("_______1_label",true); if(isEnableSection508()) $xt->assign_section("_______1_label",""); if(!$pageObject->isAppearOnTabs("(請註明詳情)2")) $xt->assign("_______2_fieldblock",true); else $xt->assign("_______2_tabfieldblock",true); $xt->assign("_______2_label",true); if(isEnableSection508()) $xt->assign_section("_______2_label",""); if(!$pageObject->isAppearOnTabs("(請註明詳情) ")) $xt->assign("_________fieldblock",true); else $xt->assign("_________tabfieldblock",true); $xt->assign("_________label",true); if(isEnableSection508()) $xt->assign_section("_________label",""); if(!$pageObject->isAppearOnTabs("(請註明詳情)3")) $xt->assign("_______3_fieldblock",true); else $xt->assign("_______3_tabfieldblock",true); $xt->assign("_______3_label",true); if(isEnableSection508()) $xt->assign_section("_______3_label",""); if(!$pageObject->isAppearOnTabs("(請註明詳情)4")) $xt->assign("_______4_fieldblock",true); else $xt->assign("_______4_tabfieldblock",true); $xt->assign("_______4_label",true); if(isEnableSection508()) $xt->assign_section("_______4_label",""); if(!$pageObject->isAppearOnTabs("閣下於過去三年,曾執行五次或以上有關衍生產品的交易")) $xt->assign("__________________________fieldblock",true); else $xt->assign("__________________________tabfieldblock",true); $xt->assign("__________________________label",true); if(isEnableSection508()) $xt->assign_section("__________________________label",""); if(!$pageObject->isAppearOnTabs("閣下現時或過去擁有與衍生產品有關的工作經驗")) $xt->assign("______________________fieldblock",true); else $xt->assign("______________________tabfieldblock",true); $xt->assign("______________________label",true); if(isEnableSection508()) $xt->assign_section("______________________label",""); if(!$pageObject->isAppearOnTabs("職位")) $xt->assign("___fieldblock",true); else $xt->assign("___tabfieldblock",true); $xt->assign("___label",true); if(isEnableSection508()) $xt->assign_section("___label",""); if(!$pageObject->isAppearOnTabs("公司名稱")) $xt->assign("_____fieldblock",true); else $xt->assign("_____tabfieldblock",true); $xt->assign("_____label",true); if(isEnableSection508()) $xt->assign_section("_____label",""); if(!$pageObject->isAppearOnTabs("工作年期")) $xt->assign("_____fieldblock",true); else $xt->assign("_____tabfieldblock",true); $xt->assign("_____label",true); if(isEnableSection508()) $xt->assign_section("_____label",""); if(!$pageObject->isAppearOnTabs("有關工作經驗詳情")) $xt->assign("_________fieldblock",true); else $xt->assign("_________tabfieldblock",true); $xt->assign("_________label",true); if(isEnableSection508()) $xt->assign_section("_________label",""); if(!$pageObject->isAppearOnTabs("閣下曾接受有關衍生產品的培訓或修讀相關課程")) $xt->assign("______________________fieldblock",true); else $xt->assign("______________________tabfieldblock",true); $xt->assign("______________________label",true); if(isEnableSection508()) $xt->assign_section("______________________label",""); if(!$pageObject->isAppearOnTabs("詳情")) $xt->assign("___fieldblock",true); else $xt->assign("___tabfieldblock",true); $xt->assign("___label",true); if(isEnableSection508()) $xt->assign_section("___label",""); if(!$pageObject->isAppearOnTabs("風險披露聲明或就在交易所買賣的衍生產品所附帶的風險作出解釋」 。")) $xt->assign("_________________________________fieldblock",true); else $xt->assign("_________________________________tabfieldblock",true); $xt->assign("_________________________________label",true); if(isEnableSection508()) $xt->assign_section("_________________________________label",""); if(!$pageObject->isAppearOnTabs("Employ status1")) $xt->assign("Employ_status1_fieldblock",true); else $xt->assign("Employ_status1_tabfieldblock",true); $xt->assign("Employ_status1_label",true); if(isEnableSection508()) $xt->assign_section("Employ_status1_label",""); if(!$pageObject->isAppearOnTabs("Company post1")) $xt->assign("Company_post1_fieldblock",true); else $xt->assign("Company_post1_tabfieldblock",true); $xt->assign("Company_post1_label",true); if(isEnableSection508()) $xt->assign_section("Company_post1_label",""); if(!$pageObject->isAppearOnTabs("Company name1")) $xt->assign("Company_name1_fieldblock",true); else $xt->assign("Company_name1_tabfieldblock",true); $xt->assign("Company_name1_label",true); if(isEnableSection508()) $xt->assign_section("Company_name1_label",""); if(!$pageObject->isAppearOnTabs("Business nature1")) $xt->assign("Business_nature1_fieldblock",true); else $xt->assign("Business_nature1_tabfieldblock",true); $xt->assign("Business_nature1_label",true); if(isEnableSection508()) $xt->assign_section("Business_nature1_label",""); if(!$pageObject->isAppearOnTabs("QQ")) $xt->assign("QQ_fieldblock",true); else $xt->assign("QQ_tabfieldblock",true); $xt->assign("QQ_label",true); if(isEnableSection508()) $xt->assign_section("QQ_label",""); if(!$pageObject->isAppearOnTabs("WeChat")) $xt->assign("WeChat_fieldblock",true); else $xt->assign("WeChat_tabfieldblock",true); $xt->assign("WeChat_label",true); if(isEnableSection508()) $xt->assign_section("WeChat_label",""); if(!$pageObject->isAppearOnTabs("QQ1")) $xt->assign("QQ1_fieldblock",true); else $xt->assign("QQ1_tabfieldblock",true); $xt->assign("QQ1_label",true); if(isEnableSection508()) $xt->assign_section("QQ1_label",""); if(!$pageObject->isAppearOnTabs("WeChat1")) $xt->assign("WeChat1_fieldblock",true); else $xt->assign("WeChat1_tabfieldblock",true); $xt->assign("WeChat1_label",true); if(isEnableSection508()) $xt->assign_section("WeChat1_label",""); if(!$pageObject->isAppearOnTabs("Create Date")) $xt->assign("Create_Date_fieldblock",true); else $xt->assign("Create_Date_tabfieldblock",true); $xt->assign("Create_Date_label",true); if(isEnableSection508()) $xt->assign_section("Create_Date_label",""); //$xt->assign('editForm',true); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Begin Next Prev button ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if(!@$_SESSION[$strTableName."_noNextPrev"] && $inlineedit != EDIT_INLINE) { $next = array(); $prev = array(); $pageObject->getNextPrevRecordKeys($data,"Edit",$next,$prev); } $nextlink = $prevlink = ""; if(count($next)) { $xt->assign("next_button", true); $nextlink.= "editid1=".runner_htmlspecialchars(rawurlencode($next[1-1])); $xt->assign("nextbutton_attrs", "id=\"nextButton".$id."\" align=\"absmiddle\""); } else if( count($prev) ) { $xt->assign("next_button", true); $xt->assign("nextbutton_class", "rnr-invisible-button"); } else $xt->assign("next_button", false); if(count($prev)) { $xt->assign("prev_button", true); $prevlink.= "editid1=".runner_htmlspecialchars(rawurlencode($prev[1-1])); $xt->assign("prevbutton_attrs", "id=\"prevButton".$id."\" align=\"absmiddle\""); } else if( count($next) ) { $xt->assign("prev_button", true); $xt->assign("prevbutton_class", "rnr-invisible-button"); } else $xt->assign("prev_button", false); $xt->assign("resetbutton_attrs",'id="resetButton'.$id.'"'); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //End Next Prev button ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if($inlineedit == EDIT_SIMPLE) { $xt->assign("back_button",true); $xt->assign("backbutton_attrs","id=\"backButton".$id."\""); $xt->assign("mbackbutton_attrs","id=\"extraBackButton".$id."\""); } if($inlineedit == EDIT_POPUP) { $xt->assign("close_button",true); $xt->assign("closebutton_attrs","id=\"closeButton".$id."\""); } // onmouseover event, for changing focus. Needed to proper submit form //$onmouseover = "this.focus();"; //$onmouseover = 'onmouseover="'.$onmouseover.'"'; $xt->assign("save_button",true); if(!$enableCtrlsForEditing) $xt->assign("savebutton_attrs", "id=\"saveButton".$id."\" type=\"disabled\" "); else $xt->assign("savebutton_attrs", "id=\"saveButton".$id."\""); $xt->assign("reset_button",true); $permis = $pageObject->getPermissions(); if($pageObject->pSet->hasViewPage() && $permis['search']) { $xt->assign("view_page_button", true); $xt->assign("view_page_button_attrs","id=\"viewPageButton".$id."\""); } } $xt->assign("message_block",true); $xt->assign("message",$message); if(!strlen($message)) { $xt->displayBrickHidden("message"); } ///////////////////////////////////////////////////////////// //process readonly and auto-update fields ///////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////// // prepare Edit Controls ///////////////////////////////////////////////////////////// // validation stuff $control = array(); $controlFields = $pageObject->editFields; if( $inlineedit == EDIT_INLINE ) //#9069 $pageObject->removeHiddenColumnsFromInlineFields( $controlFields, postvalue("screenWidth"), postvalue("screenHeight"), postvalue("orientation") ); foreach($controlFields as $fName) { $gfName = GoodFieldName($fName); $controls = array('controls'=>array()); if (!$detailKeys || !in_array($fName, $detailKeys)) { $control[$gfName] = array(); $parameters = array(); $parameters["id"] = $id; $parameters["ptype"] = PAGE_EDIT; $parameters["field"] = $fName; $parameters["data"] = $data; if(!IsNumberType($pageObject->pSet->getFieldType($fName)) || is_null(@$data[$fName])) { $parameters["value"] = @$data[$fName]; } else { $parameters["value"] = str_replace(".",$locale_info["LOCALE_SDECIMAL"],@$data[$fName]); } $parameters["pageObj"] = $pageObject; // Begin Add validation $arrValidate = $pageObject->pSet->getValidation($fName); $parameters["validate"] = $arrValidate; // End Add validation $additionalCtrlParams = array(); $additionalCtrlParams["disabled"] = !$enableCtrlsForEditing; $parameters["additionalCtrlParams"] = $additionalCtrlParams; } $controls["controls"]['ctrlInd'] = 0; $controls["controls"]['id'] = $id; $controls["controls"]['fieldName'] = $fName; if($inlineedit == EDIT_INLINE) { if(!$detailKeys || !in_array($fName, $detailKeys)) $parameters["mode"]="inline_edit"; $controls["controls"]['mode'] = "inline_edit"; } else{ if (!$detailKeys || !in_array($fName, $detailKeys)) $parameters["mode"] = "edit"; $controls["controls"]['mode'] = "edit"; } if(!$detailKeys || !in_array($fName, $detailKeys)) { AssignFunction($control[$gfName], "xt_buildeditcontrol", $parameters); $xt->assignbyref($gfName."_editcontrol",$control[$gfName]); } elseif($detailKeys && in_array($fName, $detailKeys)) { $controls["controls"]['value'] = @$data[$fName]; } // category control field $strCategoryControl = $pageObject->getMainLookupFieldNameForDependant($fName); if($strCategoryControl !== "" && in_array($strCategoryControl, $controlFields)) { $vals = array($fName => @$data[$fName],$strCategoryControl => @$data[$strCategoryControl]); } else { $vals = array($fName => @$data[$fName]); } $preload = $pageObject->fillPreload($fName, $vals); if($preload!==false) $controls["controls"]['preloadData'] = $preload; $pageObject->fillControlsMap($controls); //fill field tool tips $pageObject->fillFieldToolTips($fName); // fill special settings for timepicker if($pageObject->pSet->getEditFormat($fName) == 'Time') $pageObject->fillTimePickSettings($fName, $data[$fName]); if($pageObject->pSet->getViewFormat($fName) == FORMAT_MAP) $pageObject->googleMapCfg['isUseGoogleMap'] = true; if($detailKeys && in_array($fName, $detailKeys) && array_key_exists($fName, $data)) { $value = $pageObject->showDBValue($fName, $data); $xt->assign($gfName."_editcontrol",$value); } } //fill tab groups name and sections name to controls $pageObject->fillCntrlTabGroups(); $pageObject->jsSettings['tableSettings'][$strTableName]["keys"] = $pageObject->jsKeys; $pageObject->jsSettings['tableSettings'][$strTableName]['keyFields'] = $pageObject->keyFields; $pageObject->jsSettings['tableSettings'][$strTableName]["prevKeys"] = $prev; $pageObject->jsSettings['tableSettings'][$strTableName]["nextKeys"] = $next; if($pageObject->lockingObj) { $pageObject->jsSettings['tableSettings'][$strTableName]["sKeys"] = implode("&", $savedKeys);; $pageObject->jsSettings['tableSettings'][$strTableName]["enableCtrls"] = $enableCtrlsForEditing; $pageObject->jsSettings['tableSettings'][$strTableName]["confirmTime"] = $pageObject->lockingObj->ConfirmTime; } ///////////////////////////////////////////////////////////// if($pageObject->isShowDetailTables && $inlineedit!=EDIT_INLINE && !isMobile()) { if(count($dpParams['ids'])) { include('classes/listpage.php'); include('classes/listpage_embed.php'); include('classes/listpage_dpinline.php'); $xt->assign("detail_tables",true); } $dControlsMap = array(); $dViewControlsMap = array(); $pageObject->flyId = $ids+1; global $useFlashChartLibrary; for($d=0;$dAddCSSFile($layout->getCSSFiles(isRTL(), isMobile())); } $options['id'] = $dpParams['ids'][$d]; $options['flyId'] = $pageObject->genId()+1; $options['tName'] = $strTableName; $options['pageType'] = PAGE_CHART; $options['shortTableName'] = GetTableURL($strTableName); $_params["chartname"] = GetTableURL($strTableName); $_params["table"] = $strTableName; $_params["ctype"] = $dpParams['params'][$d]; $_params["singlePage"] = true; $_params["id"] = $options['flyId']; $options["xt"]->assign_function($options['shortTableName']."_chart","xt_showchart", $_params); $chartPageObject = new RunnerPage($options); $chartPageObject->init(); $options["xt"]->assign("chart_block",true); $options["xt"]->assign("asearch_link",true); $options["xt"]->assign("search_records_block",true); $options["xt"]->assign("exportpdflink_attrs","onclick='chart.saveAsPDF();'"); $options["xt"]->assign("searchform_showall",true); $options["xt"]->assign("showallbutton_attrs","onclick=\"window.location.href='".GetTableLink($options['shortTableName'], "chart", "a=showall")."';\""); $options["xt"]->assign("advsearchlink_attrs", "id=\"advButton".$id."\""); $options["xt"]->assign("style_block",true); $options["xt"]->assign("shiftstyle_block", true); $chartPageObject->addControlsJSAndCSS(); $chartPageObject->fillSetCntrlMaps(); $chartPageObject->body["begin"] = ''; $chartPageObject->body["end"] = ''; $options["xt"]->assign("body",$chartPageObject->body); $options["xt"]->assign("style_block",true); $options["xt"]->assign("guestlink_block", false); $options["xt"]->assign("container_toplinks", false); $options["xt"]->assign("container_search", false); $options["xt"]->assign("container_left", false); $mkr = 1; foreach($mKeys[$strTableName] as $mk) { $options['masterKeysReq'][$mkr++] = $data[$mk]; } $masterKeysReq = $options['masterKeysReq']; if(count($masterKeysReq)) { // copy keys to session for($i = 1;$i<=count($masterKeysReq);$i++) $_SESSION[$strTableName."_masterkey".$i]= $masterKeysReq[$i]; if(isset($_SESSION[$strTableName."_masterkey".$i])) unset($_SESSION[$strTableName."_masterkey".$i]); } //add detail settings to master settings $pageObject->jsSettings['tableSettings'][$strTableName] = $chartPageObject->jsSettings['tableSettings'][$strTableName]; $pageObject->AddJSFile('libs/js/AnyChart.js'); $pageObject->AddJSFile('libs/js/AnyChartHTML5.js'); $dControlsMap[$strTableName] = $chartPageObject->controlsMap; $dControlsMap[$strTableName]['useFlashChartLibrary'] = $useFlashChartLibrary; $dViewControlsMap[$strTableName] = $chartPageObject->viewControlsMap; foreach($chartPageObject->jsSettings['global']['shortTNames'] as $keySet=>$val) { if(!array_key_exists($keySet,$pageObject->settingsMap["globalSettings"]['shortTNames'])) $pageObject->settingsMap["globalSettings"]['shortTNames'][$keySet] = $val; } //Add detail's js files to master's files $pageObject->copyAllJSFiles($chartPageObject->grabAllJSFiles()); //Add detail's css files to master's files $pageObject->copyAllCSSFiles($chartPageObject->grabAllCSSFiles()); $xt->assign("details_".GoodFieldName($chartPageObject->tName), true); $xtParams = array("params" => $chartPageObject->templatefile); AssignMethod($xtParams, 'showPageDp', $chartPageObject); $xt->assign("displayDetailTable_".GoodFieldName($chartPageObject->tName), $xtParams); $pageObject->controlsMap['dpTablesParams'][] = array('tName'=>$strTableName, 'id'=>$options['id'], 'pType'=>PAGE_CHART, 'pParam'=>$_params); } elseif ($dpParams['type'][$d] == "report") { include_once('classes/reportpage.php'); $strTableName = $dpParams['strTableNames'][$d]; $options = array(); //array of params for classes $options["xt"] = new Xtempl( true ); //#9607 1. Temporary fix $options["mode"] = LIST_DETAILS; $options["pageType"] = PAGE_REPORT; $options["masterPageType"] = PAGE_VIEW; $options["mainMasterPageType"] = PAGE_VIEW; $options['masterTable'] = "Individual Account"; $options['firstTime'] = 1; $options['tName'] = $strTableName; $options['id'] = $dpParams['ids'][$d]; $options['flyId'] = $pageObject->genId()+1; $options['shortTableName'] = GetTableURL($strTableName); include_once("include/".GetTableURL($strTableName)."_settings.php"); if(!CheckSecurity(@$_SESSION["_".$strTableName."_OwnerID"],"Search")) { $strTableName = "Individual Account"; continue; } $layout = GetPageLayout(GoodFieldName($strTableName), PAGE_REPORT); if($layout) { $pageObject->AddCSSFile($layout->getCSSFiles(isRTL(), isMobile())); } $mkr = 1; $masterkey = ''; foreach($mKeys[$strTableName] as $mk) { $options['masterKeysReq'][$mkr++] = $data[$mk]; $masterkey .= $data[$mk]; } $options["pageSize"] = $_SESSION[$strTableName."_pagesize"]; $options["masterkey"] = $masterkey; $options["crosstable_refresh"] = postvalue("crosstable_refresh"); $reportPageObject = new ReportPage($options); $reportPageObject->init(); $reportPageObject->prepareDetailForEditViewPage($dpParams['params'][$d]); //add detail settings to master settings $reportPageObject->addControlsJSAndCSS(); $reportPageObject->fillSetCntrlMaps(); $pageObject->jsSettings['tableSettings'][$strTableName] = $reportPageObject->jsSettings['tableSettings'][$strTableName]; $dControlsMap[$strTableName] = $reportPageObject->controlsMap; $dViewControlsMap[$strTableName] = $reportPageObject->viewControlsMap; foreach($reportPageObject->jsSettings['global']['shortTNames'] as $keySet=>$val) { if(!array_key_exists($keySet,$pageObject->settingsMap["globalSettings"]['shortTNames'])) $pageObject->settingsMap["globalSettings"]['shortTNames'][$keySet] = $val; } //Add detail's js files to master's files $pageObject->copyAllJSFiles($reportPageObject->grabAllJSFiles()); //Add detail's css files to master's files $pageObject->copyAllCSSFiles($reportPageObject->grabAllCSSFiles()); $xt->assign("details_".GoodFieldName($reportPageObject->tName), true); $xtParams = array("params" => $reportPageObject->templatefile); AssignMethod($xtParams, 'showPageDp', $reportPageObject); $xt->assign("displayDetailTable_".GoodFieldName($reportPageObject->tName), $xtParams); $pageObject->controlsMap['dpTablesParams'][] = array('tName'=>$strTableName, 'id'=>$options['id'], 'pType'=>PAGE_REPORT); } else { $options = array(); //array of params for classes $options["mode"] = LIST_DETAILS; $options["pageType"] = PAGE_LIST; $options["masterPageType"] = PAGE_EDIT; $options["mainMasterPageType"] = PAGE_EDIT; $options['masterTable'] = "Individual Account"; $options['firstTime'] = 1; $strTableName = $dpParams['strTableNames'][$d]; if(!CheckSecurity(@$_SESSION["_".$strTableName."_OwnerID"],"Search")){ $strTableName = "Individual Account"; continue; } include_once("include/".GetTableURL($strTableName)."_settings.php"); $layout = GetPageLayout(GoodFieldName($strTableName), PAGE_LIST); if($layout) { $pageObject->AddCSSFile($layout->getCSSFiles(isRTL(), isMobile())); } $options['xt'] = new Xtempl( true ); //#9607 1. Temporary fix $options['id'] = $dpParams['ids'][$d]; $options['flyId'] = $pageObject->flyId++; $masterKeys = array(); $mkr = 1; $options['masterKeysReq'] = array(); foreach($mKeys[$strTableName] as $mk){ $options['masterKeysReq'][$mkr] = $data[$mk]; $masterKeys['masterKey'.$mkr] = $data[$mk]; $mkr++; } $listPageObject = ListPage::createListPage($strTableName, $options); // prepare code $listPageObject->prepareForBuildPage(); // show page if($listPageObject->isDispGrid()) { //set page events foreach($listPageObject->eventsObject->events as $event => $name) $listPageObject->xt->assign_event($event, $listPageObject->eventsObject, $event, array()); //add detail settings to master settings $listPageObject->addControlsJSAndCSS(); $listPageObject->fillSetCntrlMaps(); $pageObject->jsSettings['tableSettings'][$strTableName] = $listPageObject->jsSettings['tableSettings'][$strTableName]; foreach($listPageObject->jsSettings["global"]["shortTNames"] as $tName => $shortTName){ $pageObject->settingsMap["globalSettings"]["shortTNames"][$tName] = $shortTName; } $dControlsMap[$strTableName] = $listPageObject->controlsMap; $dControlsMap[$strTableName]['masterKeys'] = $masterKeys; $dViewControlsMap[$strTableName] = $listPageObject->viewControlsMap; //Add detail's js files to master's files $pageObject->copyAllJSFiles($listPageObject->grabAllJSFiles()); //Add detail's css files to master's files $pageObject->copyAllCSSFiles($listPageObject->grabAllCSSFiles()); $xt->assign("details_".GoodFieldName($listPageObject->tName), true); $xtParams = array("params" => false); AssignMethod($xtParams, 'showPage', $listPageObject); $xt->assign("displayDetailTable_".GoodFieldName($listPageObject->tName), $xtParams); $pageObject->controlsMap['dpTablesParams'][] = array('tName'=>$strTableName, 'id'=>$options['id'], 'pType'=>PAGE_LIST); } $pageObject->flyId = $listPageObject->recId+1; } } $pageObject->controlsMap['dControlsMap'] = $dControlsMap; $pageObject->viewControlsMap['dViewControlsMap'] = $dViewControlsMap; $strTableName = "Individual Account"; } ///////////////////////////////////////////////////////////// //fill jsSettings and ControlsHTMLMap $pageObject->fillSetCntrlMaps(); $pageObject->addCommonJs(); if($inlineedit == EDIT_SIMPLE) { // assign body end $pageObject->body['end'] = array(); AssignMethod($pageObject->body['end'], "assignBodyEnd", $pageObject); $xt->assign("flybody", true); $xt->assign("body", $pageObject->body); $pageObject->assignFormFooterAndHeaderBricks( true ); } if($inlineedit == EDIT_POPUP) { $xt->assign("footer",false); $xt->assign("header",false); $xt->assign("body",$pageObject->body); } $xt->assign("style_block",true); $viewlink = ""; $viewkeys = array(); $viewkeys["editid1"] = postvalue("editid1"); foreach($viewkeys as $key => $val) { if($viewlink) $viewlink.="&"; $viewlink.=$key."=".$val; } $xt->assign("viewlink_attrs","id=\"viewButton".$id."\" name=\"viewButton" .$id."\" onclick=\"window.location.href='".GetTableLink("Individual_Account", "view", $viewlink)."'\""); if(CheckSecurity(@$_SESSION["_".$strTableName."_OwnerID"],"Search") && $inlineedit == EDIT_SIMPLE) $xt->assign("view_button",true); else $xt->assign("view_button",false); ///////////////////////////////////////////////////////////// //display the page ///////////////////////////////////////////////////////////// if($eventObj->exists("BeforeShowEdit")) $eventObj->BeforeShowEdit($xt,$templatefile,$data, $pageObject); if($inlineedit != EDIT_SIMPLE) { $returnJSON['controlsMap'] = $pageObject->controlsHTMLMap; $returnJSON['viewControlsMap'] = $pageObject->viewControlsHTMLMap; $returnJSON['settings'] = $pageObject->jsSettings; } if($inlineedit == EDIT_POPUP || $inlineedit == EDIT_INLINE) { if($globalEvents->exists("IsRecordEditable", $strTableName)) { if(!$globalEvents->IsRecordEditable($data, true, $strTableName)) return SecurityRedirect($inlineedit); } } if($inlineedit == EDIT_POPUP) { $pageObject->displayAJAX($templatefile, $pageObject->flyId + 1); exit(); // .net compatibility } elseif($inlineedit == EDIT_INLINE) { $xt->load_template($templatefile); $returnJSON["html"] = array(); foreach($controlFields as $fName) { if($detailKeys && in_array($fName, $detailKeys)) continue; $returnJSON["html"][$fName] = $xt->fetchVar(GoodFieldName($fName)."_editcontrol"); } $returnJSON["additionalJS"] = $pageObject->grabAllJsFiles(); $returnJSON["additionalCSS"] = $pageObject->grabAllCSSFiles(); echo printJSON($returnJSON); exit(); // .net compatibility } else $pageObject->display($templatefile); function SecurityRedirect($inlineedit) { if($inlineedit == EDIT_INLINE) { echo printJSON(array("success" => false, "message" => mlang_message("RECORD_ISNOT_EDITABLE"))); return; } $_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"]; HeaderRedirect("menu", "message=expired"); } ?>