<% %> <% asp_include "include/customer_variables.asp",false asp_include "include/xtempl.asp",false asp_include "classes/runnerpage.asp",false asp_include "classes/searchclause.asp",false add_nocache_headers if IsEqual(postvalue("editType"),"inline") then inlineedit = EDIT_INLINE else if IsEqual(postvalue("editType"),EDIT_POPUP) then inlineedit = EDIT_POPUP else inlineedit = EDIT_SIMPLE end if end if doAssignmentByRef id,postvalue("id") if IsEqual(asp_intval(id),0) then id = 1 end if flyId = CSmartDbl(id)+1 Set xt = (CreateClass("Xtempl",0,Empty,Empty,Empty,Empty,Empty,Empty,Empty)) xt.assign_p2 "id",id Set params = (CreateDictionary2("pageType",PAGE_EDIT,"id",id)) setArrElement params,"calendar",true setArrElement params,"tName",strTableName setArrElementByRef params,"xt",xt setArrElement params,"mode",inlineedit setArrElement params,"includes_js",includes_js setArrElement params,"includes_jsreq",includes_jsreq setArrElement params,"includes_css",includes_css setArrElement params,"locale_info",locale_info setArrElement params,"pageEditLikeInline",IsEqual(inlineedit,EDIT_INLINE) setArrElement params,"useTabsOnEdit",useTabsOnEdit(strTableName) if bValue(ArrayElement(params,"useTabsOnEdit")) then setArrElement params,"arrEditTabs",GetEditTabs(strTableName) end if Set pageObject = (CreateClass("RunnerPage",1,params,Empty,Empty,Empty,Empty,Empty,Empty)) if not IsEqual(GetRequestValue(Request,"action"),"") then if bValue(pageObject.lockingObj) then doAssignmentByRef arrkeys,explode("&",GetRequestValue(Request,"keys")) GetCollectionBounds arrkeys,edit_loopIdx2,edit_loopMax2 do while edit_loopIdx2<=edit_loopMax2 ind = GetCollectionKey(arrkeys,edit_loopIdx2) doAssignment val,ArrayElement(arrkeys,ind) setArrElement arrkeys,ind,asp_urldecode(val) edit_loopIdx2=edit_loopIdx2+1 loop if IsEqual(GetRequestValue(Request,"action"),"unlock") then pageObject.lockingObj.UnlockRecord_p3 strTableName,arrkeys,GetRequestValue(Request,"sid") Response.End else if IsEqual(GetRequestValue(Request,"action"),"lockadmin") and (bValue(IsAdmin()) or IsEqual(Session("AccessLevel"),ACCESS_LEVEL_ADMINGROUP)) then pageObject.lockingObj.UnlockAdmin_p3 strTableName,arrkeys,IsEqual(GetRequestValue(Request,"startEdit"),"yes") if IsEqual(GetRequestValue(Request,"startEdit"),"no") then ResponseWrite "unlock" else if IsEqual(GetRequestValue(Request,"startEdit"),"yes") then ResponseWrite "lock" end if end if Response.End else if IsEqual(GetRequestValue(Request,"action"),"confirm") then ResponseWrite "
confirm" if not bValue(pageObject.lockingObj.ConfirmLock_p3(strTableName,arrkeys,message)) then end if ResponseWrite message Response.End end if end if end if else Response.End end if end if doAssignment filename,doAssignment(status,doAssignment(message,doAssignment(mesClass,doAssignment(usermessage,doAssignment(strWhereClause,doAssignment(bodyonload,"")))))) doAssignment showValues,doAssignment(showRawValues,doAssignment(showFields,doAssignment(showDetailKeys,doAssignment(key,doAssignment(var_next,doAssignment(prev,CreateDictionary())))))) doAssignment HaveData,doAssignment(enableCtrlsForEditing,true) doAssignment error_happened,doAssignment(readevalues,doAssignment(IsSaved,false)) doAssignment templatefile,IIF(IsEqual(inlineedit,EDIT_INLINE),"customer_inline_edit.htm","customer_edit.htm") doAssignmentByRef auditObj,GetAuditObject(strTableName) pageObject.searchClauseObj.parseRequest setArrElement Session,CSmartStr(strTableName) & "_advsearch",serialize(pageObject.searchClauseObj) doAssignment detailKeys,pageObject.detailKeysByM doAssignmentByRef editFields,pageObject.getFieldsByPageType() doAssignmentByRef onLoadJsCode,GetTableData(pageObject.tName,".jsOnloadEdit","") pageObject.addOnLoadJsEvent_p1 onLoadJsCode if bValue(pageObject.lockingObj) then system_attrs = "style='display:none;'" system_message = "" end if if not IsEqual(inlineedit,EDIT_INLINE) then pageObject.addButtonHandlers end if doAssignmentByRef url_page,asp_substr(GetRequestValue(Request.ServerVariables,"SCRIPT_NAME"),CSmartDbl(asp_strrpos(GetRequestValue(Request.ServerVariables,"SCRIPT_NAME"),"/",empty))+1,12) if bValue(eventObj.exists_p1("BeforeProcessEdit")) then eventObj.BeforeProcessEdit_p1 conn end if Set keys = (CreateDictionary()) skeys = "" Set savedKeys = (CreateDictionary()) setArrElement keys,"ID",asp_urldecode(postvalue("editid1")) setArrElement savedKeys,"ID",asp_urldecode(postvalue("editid1")) skeys = CSmartStr(skeys) & (CSmartStr(asp_rawurlencode(postvalue("editid1"))) & "&") if not IsEqual(skeys,"") then doAssignmentByRef skeys,asp_substr(skeys,0,-1) end if if not IsEqual(inlineedit,EDIT_INLINE) then Set dpParams = (CreateDictionary()) if bValue(pageObject.isShowDetailTables) then doAssignment ids,id setArrElementN pageObject.jsSettings,CreateArray3("tableSettings",strTableName,"dpParams"),CreateDictionary2("tableNames",ArrayElement(dpParams,"strTableNames"),"ids",ArrayElement(dpParams,"ids")) pageObject.AddJSFile_p1 "include/detailspreview" end if end if if not IsEqual(inlineedit,EDIT_INLINE) then if bValue(pageObject.captchaExists()) then pageObject.doCaptchaCode end if end if if IsEqual(GetRequestValue(RequestForm(),"a"),"edited") then doAssignmentByRef strWhereClause,whereAdd(strWhereClause,KeyWhere(keys,"")) oldValuesRead = false if (bValue(eventObj.exists_p1("AfterEdit")) or bValue(eventObj.exists_p1("BeforeEdit"))) or bValue(auditObj) then doAssignmentByRef rsold,db_query(gSQLWhere(strWhereClause,""),conn) doAssignmentByRef dataold,db_fetch_array(rsold) oldValuesRead = true end if doAssignment evalues,doAssignment(efilename_values,doAssignment(blobfields,CreateDictionary())) condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_FirstName_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_FirstName_" & CSmartStr(id)) if bValue(FieldSubmitted("FirstName_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("FirstName",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "FirstName"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"FirstName",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_LastName_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_LastName_" & CSmartStr(id)) if bValue(FieldSubmitted("LastName_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("LastName",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "LastName"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"LastName",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_Salutation_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_Salutation_" & CSmartStr(id)) if bValue(FieldSubmitted("Salutation_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("Salutation",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "Salutation"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"Salutation",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_Position_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_Position_" & CSmartStr(id)) if bValue(FieldSubmitted("Position_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("Position",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "Position"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"Position",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_Organization_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_Organization_" & CSmartStr(id)) if bValue(FieldSubmitted("Organization_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("Organization",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "Organization"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"Organization",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_Adress1_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_Adress1_" & CSmartStr(id)) if bValue(FieldSubmitted("Adress1_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("Adress1",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "Adress1"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"Adress1",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_Adress2_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_Adress2_" & CSmartStr(id)) if bValue(FieldSubmitted("Adress2_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("Adress2",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "Adress2"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"Adress2",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_City_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_City_" & CSmartStr(id)) if bValue(FieldSubmitted("City_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("City",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "City"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"City",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_State_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_State_" & CSmartStr(id)) if bValue(FieldSubmitted("State_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("State",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "State"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"State",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_Country_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_Country_" & CSmartStr(id)) if bValue(FieldSubmitted("Country_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("Country",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "Country"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"Country",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_PostalCode_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_PostalCode_" & CSmartStr(id)) if bValue(FieldSubmitted("PostalCode_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("PostalCode",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "PostalCode"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"PostalCode",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_WorkPhone_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_WorkPhone_" & CSmartStr(id)) if bValue(FieldSubmitted("WorkPhone_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("WorkPhone",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "WorkPhone"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"WorkPhone",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_CellPhone_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_CellPhone_" & CSmartStr(id)) if bValue(FieldSubmitted("CellPhone_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("CellPhone",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "CellPhone"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"CellPhone",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_FaxNumber_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_FaxNumber_" & CSmartStr(id)) if bValue(FieldSubmitted("FaxNumber_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("FaxNumber",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "FaxNumber"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"FaxNumber",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_Email_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_Email_" & CSmartStr(id)) if bValue(FieldSubmitted("Email_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("Email",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "Email"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"Email",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_DateOfBirth_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_DateOfBirth_" & CSmartStr(id)) if bValue(FieldSubmitted("DateOfBirth_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("DateOfBirth",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "DateOfBirth"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"DateOfBirth",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_PassportNo_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_PassportNo_" & CSmartStr(id)) if bValue(FieldSubmitted("PassportNo_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("PassportNo",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "PassportNo"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"PassportNo",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_VisaNo_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_VisaNo_" & CSmartStr(id)) if bValue(FieldSubmitted("VisaNo_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("VisaNo",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "VisaNo"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"VisaNo",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_VisaStatus_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_VisaStatus_" & CSmartStr(id)) if bValue(FieldSubmitted("VisaStatus_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("VisaStatus",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "VisaStatus"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"VisaStatus",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_FinancialSponsor_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_FinancialSponsor_" & CSmartStr(id)) if bValue(FieldSubmitted("FinancialSponsor_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("FinancialSponsor",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "FinancialSponsor"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"FinancialSponsor",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_PaymentChoice_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_PaymentChoice_" & CSmartStr(id)) if bValue(FieldSubmitted("PaymentChoice_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("PaymentChoice",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "PaymentChoice"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"PaymentChoice",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_TravelDate_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_TravelDate_" & CSmartStr(id)) if bValue(FieldSubmitted("TravelDate_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("TravelDate",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "TravelDate"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"TravelDate",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_AirlineOrFlight_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_AirlineOrFlight_" & CSmartStr(id)) if bValue(FieldSubmitted("AirlineOrFlight_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("AirlineOrFlight",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "AirlineOrFlight"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"AirlineOrFlight",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_HowReferred_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_HowReferred_" & CSmartStr(id)) if bValue(FieldSubmitted("HowReferred_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("HowReferred",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "HowReferred"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"HowReferred",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_RegisterCID_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_RegisterCID_" & CSmartStr(id)) if bValue(FieldSubmitted("RegisterCID_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("RegisterCID",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "RegisterCID"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"RegisterCID",value end if end if condition = 1 if bValue(condition) then doAssignmentByRef value,postvalue("value_EssayOrCV_" & CSmartStr(id)) doAssignmentByRef var_type,postvalue("type_EssayOrCV_" & CSmartStr(id)) if bValue(FieldSubmitted("EssayOrCV_" & CSmartStr(id))) then doAssignmentByRef value,prepare_for_db("EssayOrCV",value,var_type,"","") else value = false end if if not IsFalse(value) then if (bValue(0) and "EssayOrCV"="Password") and IsEqual(url_page,"admin_users_") then doAssignmentByRef value,md5(value) end if setArrElement evalues,"EssayOrCV",value end if end if GetCollectionBounds efilename_values,edit_loopIdx3,edit_loopMax3 do while edit_loopIdx3<=edit_loopMax3 ekey = GetCollectionKey(efilename_values,edit_loopIdx3) doAssignment value,ArrayElement(efilename_values,ekey) setArrElement evalues,ekey,value edit_loopIdx3=edit_loopIdx3+1 loop if bValue(pageObject.lockingObj) then lockmessage = "" if not bValue(pageObject.lockingObj.ConfirmLock_p3(strTableName,savedKeys,lockmessage)) then enableCtrlsForEditing = false system_attrs = "style='dispaly:block;'" if IsEqual(inlineedit,EDIT_INLINE) then if bValue(IsAdmin()) or IsEqual(Session("AccessLevel"),ACCESS_LEVEL_ADMINGROUP) then doAssignmentByRef lockmessage,pageObject.lockingObj.GetLockInfo_p4(strTableName,savedKeys,false,id) end if setArrElement returnJSON,"success",false setArrElement returnJSON,"message",lockmessage setArrElement returnJSON,"enableCtrls",enableCtrlsForEditing setArrElement returnJSON,"confirmTime",pageObject.lockingObj.ConfirmTime ResponseWrite ("" Response.End else if bValue(IsAdmin()) or IsEqual(Session("AccessLevel"),ACCESS_LEVEL_ADMINGROUP) then doAssignmentByRef system_message,pageObject.lockingObj.GetLockInfo_p4(strTableName,savedKeys,true,id) else doAssignment system_message,lockmessage end if end if status = "DECLINED" readevalues = true end if end if if IsEqual(readevalues,false) then retval = true if bValue(eventObj.exists_p1("BeforeEdit")) then doAssignmentByRef retval,eventObj.BeforeEdit_p6(evalues,strWhereClause,dataold,keys,usermessage,bValue(inlineedit)) end if if bValue(retval) and bValue(pageObject.isCaptchaOk) then if not IsEqual(inlineedit,EDIT_INLINE) then setArrElement Session,CSmartStr(strTableName) & "_count_captcha",CSmartDbl(Session(CSmartStr(strTableName) & "_count_captcha"))+1 end if if bValue(DoUpdateRecord(strOriginalTableName,evalues,blobfields,strWhereClause,id,pageObject)) then IsSaved = true if bValue(pageObject.lockingObj) and IsEqual(inlineedit,EDIT_INLINE) then pageObject.lockingObj.UnlockRecord_p3 strTableName,savedKeys,"" end if if bValue(auditObj) or bValue(eventObj.exists_p1("AfterEdit")) then GetCollectionBounds dataold,edit_loopIdx4,edit_loopMax4 do while edit_loopIdx4<=edit_loopMax4 idx = GetCollectionKey(dataold,edit_loopIdx4) doAssignment val,ArrayElement(dataold,idx) if not bValue(asp_array_key_exists(idx,evalues)) then setArrElement evalues,idx,val end if edit_loopIdx4=edit_loopIdx4+1 loop end if if bValue(auditObj) then auditObj.LogEdit_p4 strTableName,evalues,dataold,keys end if if bValue(eventObj.exists_p1("AfterEdit")) then eventObj.AfterEdit_p5 evalues,KeyWhere(keys,""),dataold,keys,bValue(inlineedit) end if mesClass = "mes_ok" else if not IsEqual(inlineedit,EDIT_INLINE) then mesClass = "mes_not" end if end if else doAssignment message,usermessage readevalues = true status = "DECLINED" end if end if if bValue(readevalues) then doAssignment keys,savedKeys end if end if if bValue(pageObject.lockingObj) then doAssignmentByRef enableCtrlsForEditing,pageObject.lockingObj.LockRecord_p2(strTableName,keys) if not bValue(enableCtrlsForEditing) then if IsEqual(inlineedit,EDIT_INLINE) then if bValue(IsAdmin()) or IsEqual(Session("AccessLevel"),ACCESS_LEVEL_ADMINGROUP) then doAssignmentByRef lockmessage,pageObject.lockingObj.GetLockInfo_p4(strTableName,keys,false,id) else doAssignment lockmessage,pageObject.lockingObj.LockUser end if setArrElement returnJSON,"success",false setArrElement returnJSON,"message",lockmessage setArrElement returnJSON,"enableCtrls",enableCtrlsForEditing setArrElement returnJSON,"confirmTime",pageObject.lockingObj.ConfirmTime ResponseWrite my_json_encode(returnJSON) Response.End end if system_attrs = "style='display:block;'" doAssignment system_message,pageObject.lockingObj.LockUser if bValue(IsAdmin()) or IsEqual(Session("AccessLevel"),ACCESS_LEVEL_ADMINGROUP) then doAssignmentByRef rb,pageObject.lockingObj.GetLockInfo_p4(strTableName,keys,true,id) if not IsEqual(rb,"") then doAssignment system_message,rb end if end if end if end if if bValue(pageObject.lockingObj) and not IsEqual(inlineedit,EDIT_INLINE) then setArrElement pageObject.body,"begin",CSmartStr(ArrayElement(pageObject.body,"begin")) & (((((("
") & CSmartStr(system_message)) & "
") end if message = ((("
") & CSmartStr(message)) & "
" if (bValue(IsSaved) and bValue(no_output_done())) and IsEqual(inlineedit,EDIT_SIMPLE) then setArrElement Session,"message",IIF(message,message,"") keyGetQ = "" keyGetQ = CSmartStr(keyGetQ) & (("editid1=" & CSmartStr(asp_rawurldecode(ArrayElement(keys,"ID")))) & "&") doAssignmentByRef keyGetQ,asp_substr(keyGetQ,0,CSmartDbl(asp_strlen(keyGetQ))-1) asp_header (("Location: customer_" & CSmartStr(pageObject.getPageType())) & ".asp?") & CSmartStr(keyGetQ) Response.End end if if IsEqual(inlineedit,EDIT_SIMPLE) and not IsEmpty(Session("message")) then doAssignment message,Session("message") asp_unsetElement Session,"message" end if doAssignmentByRef query,queryData_customer.Copy() doAssignmentByRef strWhereClause,KeyWhere(keys,"") doAssignmentByRef strSQL,gSQLWhere(strWhereClause,"") doAssignment strSQLbak,strSQL if bValue(eventObj.exists_p1("BeforeQueryEdit")) then eventObj.BeforeQueryEdit_p2 strSQL,strWhereClause end if if IsEqual(strSQLbak,strSQL) then doAssignmentByRef strSQL,gSQLWhere(strWhereClause,"") end if LogInfo strSQL doAssignmentByRef rs,db_query(strSQL,conn) doAssignmentByRef data,db_fetch_array(rs) if not bValue(data) then if IsEqual(inlineedit,EDIT_SIMPLE) then asp_header "Location: customer_list.asp?a=return" Response.End else Set data = (CreateDictionary()) end if end if Set readonlyfields = (CreateDictionary()) if bValue(readevalues) then setArrElement data,"FirstName",ArrayElement(evalues,"FirstName") setArrElement data,"LastName",ArrayElement(evalues,"LastName") setArrElement data,"Salutation",ArrayElement(evalues,"Salutation") setArrElement data,"Position",ArrayElement(evalues,"Position") setArrElement data,"Organization",ArrayElement(evalues,"Organization") setArrElement data,"Adress1",ArrayElement(evalues,"Adress1") setArrElement data,"Adress2",ArrayElement(evalues,"Adress2") setArrElement data,"City",ArrayElement(evalues,"City") setArrElement data,"State",ArrayElement(evalues,"State") setArrElement data,"Country",ArrayElement(evalues,"Country") setArrElement data,"PostalCode",ArrayElement(evalues,"PostalCode") setArrElement data,"WorkPhone",ArrayElement(evalues,"WorkPhone") setArrElement data,"CellPhone",ArrayElement(evalues,"CellPhone") setArrElement data,"FaxNumber",ArrayElement(evalues,"FaxNumber") setArrElement data,"Email",ArrayElement(evalues,"Email") setArrElement data,"DateOfBirth",ArrayElement(evalues,"DateOfBirth") setArrElement data,"PassportNo",ArrayElement(evalues,"PassportNo") setArrElement data,"VisaNo",ArrayElement(evalues,"VisaNo") setArrElement data,"VisaStatus",ArrayElement(evalues,"VisaStatus") setArrElement data,"FinancialSponsor",ArrayElement(evalues,"FinancialSponsor") setArrElement data,"PaymentChoice",ArrayElement(evalues,"PaymentChoice") setArrElement data,"TravelDate",ArrayElement(evalues,"TravelDate") setArrElement data,"AirlineOrFlight",ArrayElement(evalues,"AirlineOrFlight") setArrElement data,"HowReferred",ArrayElement(evalues,"HowReferred") setArrElement data,"RegisterCID",ArrayElement(evalues,"RegisterCID") setArrElement data,"EssayOrCV",ArrayElement(evalues,"EssayOrCV") end if if bValue(eventObj.exists_p1("ProcessValuesEdit")) then eventObj.ProcessValuesEdit_p1 data end if includes = "" if not IsEqual(inlineedit,EDIT_INLINE) then if IsEqual(inlineedit,EDIT_SIMPLE) then includes = CSmartStr(includes) & "" & vbcrlf if IsIdentical(pageObject.debugJSMode,true) then includes = CSmartStr(includes) & "" & vbcrlf else includes = CSmartStr(includes) & "" & vbcrlf end if includes = CSmartStr(includes) & "" & vbcrlf includes = CSmartStr(includes) & (("
" & vbcrlf) if bValue(pageObject.isShowDetailTables) then includes = CSmartStr(includes) & "
" end if setArrElement pageObject.body,"begin",CSmartStr(ArrayElement(pageObject.body,"begin")) & CSmartStr(includes) end if if not bValue(pageObject.isAppearOnTabs_p1("FirstName")) then xt.assign_p2 "FirstName_fieldblock",true else xt.assign_p2 "FirstName_tabfieldblock",true end if xt.assign_p2 "FirstName_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "FirstName_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("LastName")) then xt.assign_p2 "LastName_fieldblock",true else xt.assign_p2 "LastName_tabfieldblock",true end if xt.assign_p2 "LastName_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "LastName_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("Salutation")) then xt.assign_p2 "Salutation_fieldblock",true else xt.assign_p2 "Salutation_tabfieldblock",true end if xt.assign_p2 "Salutation_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "Salutation_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("Position")) then xt.assign_p2 "Position_fieldblock",true else xt.assign_p2 "Position_tabfieldblock",true end if xt.assign_p2 "Position_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "Position_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("Organization")) then xt.assign_p2 "Organization_fieldblock",true else xt.assign_p2 "Organization_tabfieldblock",true end if xt.assign_p2 "Organization_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "Organization_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("Adress1")) then xt.assign_p2 "Adress1_fieldblock",true else xt.assign_p2 "Adress1_tabfieldblock",true end if xt.assign_p2 "Adress1_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "Adress1_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("Adress2")) then xt.assign_p2 "Adress2_fieldblock",true else xt.assign_p2 "Adress2_tabfieldblock",true end if xt.assign_p2 "Adress2_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "Adress2_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("City")) then xt.assign_p2 "City_fieldblock",true else xt.assign_p2 "City_tabfieldblock",true end if xt.assign_p2 "City_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "City_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("State")) then xt.assign_p2 "State_fieldblock",true else xt.assign_p2 "State_tabfieldblock",true end if xt.assign_p2 "State_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "State_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("Country")) then xt.assign_p2 "Country_fieldblock",true else xt.assign_p2 "Country_tabfieldblock",true end if xt.assign_p2 "Country_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "Country_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("PostalCode")) then xt.assign_p2 "PostalCode_fieldblock",true else xt.assign_p2 "PostalCode_tabfieldblock",true end if xt.assign_p2 "PostalCode_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "PostalCode_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("WorkPhone")) then xt.assign_p2 "WorkPhone_fieldblock",true else xt.assign_p2 "WorkPhone_tabfieldblock",true end if xt.assign_p2 "WorkPhone_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "WorkPhone_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("CellPhone")) then xt.assign_p2 "CellPhone_fieldblock",true else xt.assign_p2 "CellPhone_tabfieldblock",true end if xt.assign_p2 "CellPhone_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "CellPhone_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("FaxNumber")) then xt.assign_p2 "FaxNumber_fieldblock",true else xt.assign_p2 "FaxNumber_tabfieldblock",true end if xt.assign_p2 "FaxNumber_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "FaxNumber_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("Email")) then xt.assign_p2 "Email_fieldblock",true else xt.assign_p2 "Email_tabfieldblock",true end if xt.assign_p2 "Email_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "Email_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("DateOfBirth")) then xt.assign_p2 "DateOfBirth_fieldblock",true else xt.assign_p2 "DateOfBirth_tabfieldblock",true end if xt.assign_p2 "DateOfBirth_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "DateOfBirth_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("PassportNo")) then xt.assign_p2 "PassportNo_fieldblock",true else xt.assign_p2 "PassportNo_tabfieldblock",true end if xt.assign_p2 "PassportNo_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "PassportNo_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("VisaNo")) then xt.assign_p2 "VisaNo_fieldblock",true else xt.assign_p2 "VisaNo_tabfieldblock",true end if xt.assign_p2 "VisaNo_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "VisaNo_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("VisaStatus")) then xt.assign_p2 "VisaStatus_fieldblock",true else xt.assign_p2 "VisaStatus_tabfieldblock",true end if xt.assign_p2 "VisaStatus_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "VisaStatus_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("FinancialSponsor")) then xt.assign_p2 "FinancialSponsor_fieldblock",true else xt.assign_p2 "FinancialSponsor_tabfieldblock",true end if xt.assign_p2 "FinancialSponsor_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "FinancialSponsor_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("PaymentChoice")) then xt.assign_p2 "PaymentChoice_fieldblock",true else xt.assign_p2 "PaymentChoice_tabfieldblock",true end if xt.assign_p2 "PaymentChoice_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "PaymentChoice_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("TravelDate")) then xt.assign_p2 "TravelDate_fieldblock",true else xt.assign_p2 "TravelDate_tabfieldblock",true end if xt.assign_p2 "TravelDate_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "TravelDate_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("AirlineOrFlight")) then xt.assign_p2 "AirlineOrFlight_fieldblock",true else xt.assign_p2 "AirlineOrFlight_tabfieldblock",true end if xt.assign_p2 "AirlineOrFlight_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "AirlineOrFlight_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("HowReferred")) then xt.assign_p2 "HowReferred_fieldblock",true else xt.assign_p2 "HowReferred_tabfieldblock",true end if xt.assign_p2 "HowReferred_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "HowReferred_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("RegisterCID")) then xt.assign_p2 "RegisterCID_fieldblock",true else xt.assign_p2 "RegisterCID_tabfieldblock",true end if xt.assign_p2 "RegisterCID_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "RegisterCID_label",("" end if if not bValue(pageObject.isAppearOnTabs_p1("EssayOrCV")) then xt.assign_p2 "EssayOrCV_fieldblock",true else xt.assign_p2 "EssayOrCV_tabfieldblock",true end if xt.assign_p2 "EssayOrCV_label",true if bValue(isEnableSection508()) then xt.assign_section_p3 "EssayOrCV_label",("" end if xt.assign_p2 "show_key1",htmlspecialchars(GetData(data,"ID","")) if not bValue(Session(CSmartStr(strTableName) & "_noNextPrev")) and IsEqual(inlineedit,EDIT_SIMPLE) then Set var_next = (CreateDictionary()) Set prev = (CreateDictionary()) pageObject.getNextPrevRecordKeys_p4 data,"Edit",var_next,prev end if doAssignment nextlink,doAssignment(prevlink,"") if bValue(asp_count(var_next)) then xt.assign_p2 "next_button",true nextlink = CSmartStr(nextlink) & ("editid1=" & CSmartStr(htmlspecialchars(asp_rawurlencode(ArrayElement(var_next,1))))) xt.assign_p2 "nextbutton_attrs",("id=""nextButton" & CSmartStr(id)) & """ align=""absmiddle""" else xt.assign_p2 "next_button",false end if if bValue(asp_count(prev)) then xt.assign_p2 "prev_button",true prevlink = CSmartStr(prevlink) & ("editid1=" & CSmartStr(htmlspecialchars(asp_rawurlencode(ArrayElement(prev,1))))) xt.assign_p2 "prevbutton_attrs",("id=""prevButton" & CSmartStr(id)) & """ align=""absmiddle""" else xt.assign_p2 "prev_button",false end if xt.assign_p2 "resetbutton_attrs",("id=""resetButton" & CSmartStr(id)) & """" if IsEqual(inlineedit,EDIT_SIMPLE) then xt.assign_p2 "back_button",true xt.assign_p2 "backbutton_attrs",("id=""backButton" & CSmartStr(id)) & """" end if onmouseover = "this.focus();" onmouseover = ("onmouseover=""" & CSmartStr(onmouseover)) & """" xt.assign_p2 "save_button",true if not bValue(enableCtrlsForEditing) then xt.assign_p2 "savebutton_attrs",(("id=""saveButton" & CSmartStr(id)) & """ disabled=""true"" style='background-color:#dcdcdc' ") & CSmartStr(onmouseover) else xt.assign_p2 "savebutton_attrs",(("id=""saveButton" & CSmartStr(id)) & """") & CSmartStr(onmouseover) end if xt.assign_p2 "reset_button",true end if if bValue(message) then xt.assign_p2 "message_block",true xt.assign_p2 "message",message end if if IsEqual(postvalue("a"),"edited") and (IsEqual(inlineedit,EDIT_INLINE) or IsEqual(inlineedit,EDIT_POPUP)) then if not bValue(data) then doAssignment data,evalues HaveData = false end if masterquery = "mastertable=customer" masterquery = CSmartStr(masterquery) & ("&masterkey1=" & CSmartStr(asp_rawurlencode(ArrayElement(data,"RegisterCID")))) setArrElement showDetailKeys,"courses",masterquery keylink = "" keylink = CSmartStr(keylink) & ("&key1=" & CSmartStr(htmlspecialchars(asp_rawurlencode(ArrayElement(data,"ID"))))) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"PassportNo",""),"field=PassportNo" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"PassportNo",value setArrElement showFields,asp_count(showFields),"PassportNo" setArrElement showRawValues,"PassportNo",asp_substr(ArrayElement(data,"PassportNo"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"VisaNo",""),"field=VisaNo" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"VisaNo",value setArrElement showFields,asp_count(showFields),"VisaNo" setArrElement showRawValues,"VisaNo",asp_substr(ArrayElement(data,"VisaNo"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"VisaStatus",""),"field=VisaStatus" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"VisaStatus",value setArrElement showFields,asp_count(showFields),"VisaStatus" setArrElement showRawValues,"VisaStatus",asp_substr(ArrayElement(data,"VisaStatus"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"FinancialSponsor",""),"field=FinancialSponsor" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"FinancialSponsor",value setArrElement showFields,asp_count(showFields),"FinancialSponsor" setArrElement showRawValues,"FinancialSponsor",asp_substr(ArrayElement(data,"FinancialSponsor"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"PaymentChoice",""),"field=PaymentChoice" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"PaymentChoice",value setArrElement showFields,asp_count(showFields),"PaymentChoice" setArrElement showRawValues,"PaymentChoice",asp_substr(ArrayElement(data,"PaymentChoice"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"TravelDate","Short Date"),"field=TravelDate" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"TravelDate",value setArrElement showFields,asp_count(showFields),"TravelDate" setArrElement showRawValues,"TravelDate",asp_substr(ArrayElement(data,"TravelDate"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"AirlineOrFlight",""),"field=AirlineOrFlight" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"AirlineOrFlight",value setArrElement showFields,asp_count(showFields),"AirlineOrFlight" setArrElement showRawValues,"AirlineOrFlight",asp_substr(ArrayElement(data,"AirlineOrFlight"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"HowReferred",""),"field=HowReferred" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"HowReferred",value setArrElement showFields,asp_count(showFields),"HowReferred" setArrElement showRawValues,"HowReferred",asp_substr(ArrayElement(data,"HowReferred"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"RegisterCID",""),"field=RegisterCID" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"RegisterCID",value setArrElement showFields,asp_count(showFields),"RegisterCID" setArrElement showRawValues,"RegisterCID",asp_substr(ArrayElement(data,"RegisterCID"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"EssayOrCV",""),"field=EssayOrCV" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"EssayOrCV",value setArrElement showFields,asp_count(showFields),"EssayOrCV" setArrElement showRawValues,"EssayOrCV",asp_substr(ArrayElement(data,"EssayOrCV"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"FirstName",""),"field=FirstName" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"FirstName",value setArrElement showFields,asp_count(showFields),"FirstName" setArrElement showRawValues,"FirstName",asp_substr(ArrayElement(data,"FirstName"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"LastName",""),"field=LastName" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"LastName",value setArrElement showFields,asp_count(showFields),"LastName" setArrElement showRawValues,"LastName",asp_substr(ArrayElement(data,"LastName"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"Salutation",""),"field=Salutation" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"Salutation",value setArrElement showFields,asp_count(showFields),"Salutation" setArrElement showRawValues,"Salutation",asp_substr(ArrayElement(data,"Salutation"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"Position",""),"field=Position" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"Position",value setArrElement showFields,asp_count(showFields),"Position" setArrElement showRawValues,"Position",asp_substr(ArrayElement(data,"Position"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"Organization",""),"field=Organization" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"Organization",value setArrElement showFields,asp_count(showFields),"Organization" setArrElement showRawValues,"Organization",asp_substr(ArrayElement(data,"Organization"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"Adress1",""),"field=Adress1" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"Adress1",value setArrElement showFields,asp_count(showFields),"Adress1" setArrElement showRawValues,"Adress1",asp_substr(ArrayElement(data,"Adress1"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"Adress2",""),"field=Adress2" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"Adress2",value setArrElement showFields,asp_count(showFields),"Adress2" setArrElement showRawValues,"Adress2",asp_substr(ArrayElement(data,"Adress2"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"City",""),"field=City" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"City",value setArrElement showFields,asp_count(showFields),"City" setArrElement showRawValues,"City",asp_substr(ArrayElement(data,"City"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"State",""),"field=State" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"State",value setArrElement showFields,asp_count(showFields),"State" setArrElement showRawValues,"State",asp_substr(ArrayElement(data,"State"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"Country",""),"field=Country" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"Country",value setArrElement showFields,asp_count(showFields),"Country" setArrElement showRawValues,"Country",asp_substr(ArrayElement(data,"Country"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"PostalCode",""),"field=PostalCode" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"PostalCode",value setArrElement showFields,asp_count(showFields),"PostalCode" setArrElement showRawValues,"PostalCode",asp_substr(ArrayElement(data,"PostalCode"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"WorkPhone",""),"field=WorkPhone" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"WorkPhone",value setArrElement showFields,asp_count(showFields),"WorkPhone" setArrElement showRawValues,"WorkPhone",asp_substr(ArrayElement(data,"WorkPhone"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"CellPhone",""),"field=CellPhone" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"CellPhone",value setArrElement showFields,asp_count(showFields),"CellPhone" setArrElement showRawValues,"CellPhone",asp_substr(ArrayElement(data,"CellPhone"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"FaxNumber",""),"field=FaxNumber" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"FaxNumber",value setArrElement showFields,asp_count(showFields),"FaxNumber" setArrElement showRawValues,"FaxNumber",asp_substr(ArrayElement(data,"FaxNumber"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"Email",""),"field=Email" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"Email",value setArrElement showFields,asp_count(showFields),"Email" setArrElement showRawValues,"Email",asp_substr(ArrayElement(data,"Email"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"DateOfBirth","Short Date"),"field=DateOfBirth" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"DateOfBirth",value setArrElement showFields,asp_count(showFields),"DateOfBirth" setArrElement showRawValues,"DateOfBirth",asp_substr(ArrayElement(data,"DateOfBirth"),0,100) value = "" doAssignmentByRef value,ProcessLargeText(GetData(data,"ID",""),"field=ID" & CSmartStr(keylink),"",MODE_LIST,"") setArrElement showValues,"ID",value setArrElement showFields,asp_count(showFields),"ID" setArrElement showRawValues,"ID",asp_substr(ArrayElement(data,"ID"),0,100) if bValue(IsSaved) then if bValue(pageObject.lockingObj) then pageObject.lockingObj.UnlockRecord_p3 strTableName,keys,"" end if setArrElement returnJSON,"success",true setArrElement returnJSON,"keys",keys setArrElement returnJSON,"vals",showValues setArrElement returnJSON,"fields",showFields setArrElement returnJSON,"rawVals",showRawValues setArrElement returnJSON,"detKeys",showDetailKeys setArrElement returnJSON,"userMess",usermessage else setArrElement returnJSON,"success",false setArrElement returnJSON,"message",message if bValue(pageObject.lockingObj) then setArrElement returnJSON,"lockMessage",system_message end if end if ResponseWrite ("" Response.End end if regex = "" regexmessage = "" regextype = "" Set control = (CreateDictionary()) GetCollectionBounds editFields,edit_loopIdx5,edit_loopMax5 do while edit_loopIdx5<=edit_loopMax5 edit_arrKey5 = GetCollectionKey(editFields,edit_loopIdx5) doAssignment fName,ArrayElement(editFields,edit_arrKey5) doAssignmentByRef gfName,GoodFieldName(fName) Set controls = (CreateDictionary1("controls",CreateDictionary())) if not bValue(detailKeys) or not bValue(asp_in_array(fName,detailKeys,false)) then setArrElement control,gfName,CreateDictionary() setArrElementN control,CreateArray2(gfName,"func"),"xt_buildeditcontrol" setArrElementN control,CreateArray2(gfName,"params"),CreateDictionary() setArrElementN control,CreateArray3(gfName,"params","id"),id setArrElementN control,CreateArray3(gfName,"params","field"),fName setArrElementN control,CreateArray3(gfName,"params","value"),ArrayElement(data,fName) doAssignmentByRef arrValidate,getValidation(fName,strTableName) setArrElementN control,CreateArray3(gfName,"params","validate"),arrValidate Set additionalCtrlParams = (CreateDictionary()) setArrElement additionalCtrlParams,"disabled",not bValue(enableCtrlsForEditing) setArrElementN control,CreateArray3(gfName,"params","additionalCtrlParams"),additionalCtrlParams end if setArrElementN controls,CreateArray2("controls","ctrlInd"),0 setArrElementN controls,CreateArray2("controls","id"),id setArrElementN controls,CreateArray2("controls","fieldName"),fName if IsEqual(inlineedit,EDIT_INLINE) then if not bValue(detailKeys) or not bValue(asp_in_array(fName,detailKeys,false)) then setArrElementN control,CreateArray3(gfName,"params","mode"),"inline_edit" end if setArrElementN controls,CreateArray2("controls","mode"),"inline_edit" else if not bValue(detailKeys) or not bValue(asp_in_array(fName,detailKeys,false)) then setArrElementN control,CreateArray3(gfName,"params","mode"),"edit" end if setArrElementN controls,CreateArray2("controls","mode"),"edit" end if if not bValue(detailKeys) or not bValue(asp_in_array(fName,detailKeys,false)) then xt.assignbyref_p2 CSmartStr(gfName) & "_editcontrol",ArrayElement(control,gfName) else if bValue(detailKeys) and bValue(asp_in_array(fName,detailKeys,false)) then setArrElementN controls,CreateArray2("controls","value"),ArrayElement(data,fName) end if end if doAssignmentByRef strCategoryControl,pageObject.hasDependField_p1(fName) if not IsFalse(strCategoryControl) and bValue(asp_in_array(strCategoryControl,editFields,false)) then Set vals = (CreateDictionary2(fName,ArrayElement(data,fName),strCategoryControl,ArrayElement(data,strCategoryControl))) else Set vals = (CreateDictionary1(fName,ArrayElement(data,fName))) end if doAssignmentByRef preload,pageObject.fillPreload_p2(fName,vals) if not IsFalse(preload) then setArrElementN controls,CreateArray2("controls","preloadData"),preload end if pageObject.fillControlsMap_p1 controls pageObject.fillFieldToolTips_p1 fName if IsEqual(GetEditFormat(fName,""),"Time") then pageObject.fillTimePickSettings_p2 fName,ArrayElement(data,fName) end if if IsEqual(ViewFormat(fName,""),FORMAT_MAP) then setArrElement pageObject.googleMapCfg,"isUseGoogleMap",true end if if (bValue(detailKeys) and bValue(asp_in_array(fName,detailKeys,false))) and bValue(asp_array_key_exists(fName,data)) then if (IsEqual(GetEditFormat(fName,""),EDIT_FORMAT_LOOKUP_WIZARD) or IsEqual(GetEditFormat(fName,""),EDIT_FORMAT_RADIO)) and IsEqual(GetpLookupType(fName,""),LT_LOOKUPTABLE) then doAssignmentByRef value,DisplayLookupWizard(fName,ArrayElement(data,fName),data,"",MODE_VIEW) else if bValue(NeedEncode(fName,"")) then doAssignmentByRef value,ProcessLargeText(GetData(data,fName,ViewFormat(fName,"")),"field=" & CSmartStr(asp_rawurlencode(htmlspecialchars(fName))),"",MODE_VIEW,"") else doAssignmentByRef value,GetData(data,fName,ViewFormat(fName,"")) end if end if xt.assign_p2 CSmartStr(gfName) & "_editcontrol",value end if edit_loopIdx5=edit_loopIdx5+1 loop pageObject.fillCntrlTabGroups setArrElementN pageObject.jsSettings,CreateArray3("tableSettings",strTableName,"keys"),keys setArrElementN pageObject.jsSettings,CreateArray3("tableSettings",strTableName,"prevKeys"),prev setArrElementN pageObject.jsSettings,CreateArray3("tableSettings",strTableName,"nextKeys"),var_next if bValue(pageObject.lockingObj) then setArrElementN pageObject.jsSettings,CreateArray3("tableSettings",strTableName,"sKeys"),skeys setArrElementN pageObject.jsSettings,CreateArray3("tableSettings",strTableName,"enableCtrls"),enableCtrlsForEditing setArrElementN pageObject.jsSettings,CreateArray3("tableSettings",strTableName,"confirmTime"),pageObject.lockingObj.ConfirmTime end if pageObject.fillSetCntrlMaps if bValue(pageObject.isShowDetailTables) and not IsEqual(inlineedit,EDIT_INLINE) then Set options = (CreateDictionary()) setArrElement options,"mode",LIST_DETAILS setArrElement options,"pageType",PAGE_LIST setArrElement options,"masterPageType",PAGE_EDIT setArrElement options,"mainMasterPageType",PAGE_EDIT setArrElement options,"masterTable",strTableName setArrElement options,"firstTime",1 if bValue(asp_count(ArrayElement(dpParams,"ids"))) then asp_include "classes/listpage.asp",false asp_include "classes/listpage_embed.asp",false asp_include "classes/listpage_dpinline.asp",false xt.assign_p2 "detail_tables",true end if Set dControlsMap = (CreateDictionary()) flyId = CSmartDbl(ids)+1 d = 0 edit_exitLoop6=false do while IsLess(d,asp_count(ArrayElement(dpParams,"ids"))) edit_exitLoop6=false do doAssignment strTableName,ArrayElement(ArrayElement(dpParams,"strTableNames"),d) asp_include ("include/" & CSmartStr(GetTableURL(strTableName))) & "_settings.asp",false if not bValue(CheckSecurity(Session(("_" & CSmartStr(strTableName)) & "_OwnerID"),"Search")) then strTableName = "customer" exit do end if setArrElement options,"xt",CreateClass("Xtempl",0,Empty,Empty,Empty,Empty,Empty,Empty,Empty) setArrElement options,"id",ArrayElement(ArrayElement(dpParams,"ids"),d) setArrElement options,"flyId",postInc(flyId) mkr = 1 GetCollectionBounds ArrayElement(mKeys,strTableName),edit_loopIdx7,edit_loopMax7 do while edit_loopIdx7<=edit_loopMax7 edit_arrKey7 = GetCollectionKey(ArrayElement(mKeys,strTableName),edit_loopIdx7) doAssignment mk,ArrayElement(ArrayElement(mKeys,strTableName),edit_arrKey7) setArrElementN options,CreateArray2("masterKeysReq",postInc(mkr)),ArrayElement(data,mk) edit_loopIdx7=edit_loopIdx7+1 loop doAssignmentByRef listPageObject,method_ListPage_createListPage(this_object,strTableName,options) listPageObject.prepareForBuildPage flyId = CSmartDbl(listPageObject.recId)+1 if bValue(listPageObject.isDispGrid()) then listPageObject.fillSetCntrlMaps setArrElementN pageObject.jsSettings,CreateArray2("tableSettings",strTableName),ArrayElement(ArrayElement(listPageObject.jsSettings,"tableSettings"),strTableName) setArrElementN dControlsMap,CreateArray2(strTableName,"gridRows"),ArrayElement(ArrayElement(ArrayElement(ArrayElement(listPageObject.controlsHTMLMap,strTableName),PAGE_LIST),ArrayElement(ArrayElement(dpParams,"ids"),d)),"gridRows") setArrElementN dControlsMap,CreateArray2(strTableName,"video"),ArrayElement(ArrayElement(ArrayElement(ArrayElement(listPageObject.controlsHTMLMap,strTableName),PAGE_LIST),ArrayElement(ArrayElement(dpParams,"ids"),d)),"video") setArrElementN dControlsMap,CreateArray2(strTableName,"gMaps"),ArrayElement(ArrayElement(ArrayElement(ArrayElement(listPageObject.controlsHTMLMap,strTableName),PAGE_LIST),ArrayElement(ArrayElement(dpParams,"ids"),d)),"gMaps") GetCollectionBounds ArrayElement(ArrayElement(listPageObject.jsSettings,"global"),"shortTNames"),edit_loopIdx8,edit_loopMax8 do while edit_loopIdx8<=edit_loopMax8 key = GetCollectionKey(ArrayElement(ArrayElement(listPageObject.jsSettings,"global"),"shortTNames"),edit_loopIdx8) doAssignment val,ArrayElement(ArrayElement(ArrayElement(listPageObject.jsSettings,"global"),"shortTNames"),key) if not bValue(asp_array_key_exists(key,ArrayElement(ArrayElement(pageObject.jsSettings,"global"),"shortTNames"))) then setArrElementN pageObject.jsSettings,CreateArray3("global","shortTNames",key),val end if edit_loopIdx8=edit_loopIdx8+1 loop pageObject.copyAllJSFiles_p1 listPageObject.grabAllJSFiles() pageObject.copyAllCSSFiles_p1 listPageObject.grabAllCSSFiles() end if xt.assign_p2 "displayDetailTable_" & CSmartStr(GoodFieldName(strTableName)),CreateDictionary2("func","showDetailTable","params",CreateDictionary2("dpObject",listPageObject,"dpParams",strTableName)) loop while false if edit_exitLoop6 then _ exit do d = CSmartDbl(d)+1 loop strTableName = "customer" setArrElementN pageObject.controlsHTMLMap,CreateArray4(strTableName,PAGE_EDIT,id,"dControlsMap"),dControlsMap end if if IsEqual(inlineedit,EDIT_SIMPLE) then setArrElementN pageObject.jsSettings,CreateArray2("global","idStartFrom"),CSmartDbl(flyId)+1 setArrElement pageObject.body,"end",CSmartStr(ArrayElement(pageObject.body,"end")) & "" else setArrElement returnJSON,"controlsMap",pageObject.controlsHTMLMap setArrElement returnJSON,"settings",pageObject.jsSettings end if pageObject.addCommonJs doAssignmentByRef jscode,pageObject.PrepareJS() if IsEqual(inlineedit,EDIT_SIMPLE) then setArrElement pageObject.body,"end",CSmartStr(ArrayElement(pageObject.body,"end")) & (("") xt.assign_p2 "body",pageObject.body xt.assign_p2 "flybody",true else if IsEqual(inlineedit,EDIT_POPUP) then xt.assign_p2 "footer","" xt.assign_p2 "flybody",pageObject.body xt.assign_p2 "body",true end if end if xt.assign_p2 "style_block",true pageObject.xt.assign_p2 "legendBreak","
" if bValue(eventObj.exists_p1("BeforeShowEdit")) then eventObj.BeforeShowEdit_p3 xt,templatefile,data end if if IsEqual(inlineedit,EDIT_POPUP) then xt.load_template_p1 templatefile setArrElement returnJSON,"html",CSmartStr(xt.fetch_loaded_p1("style_block")) & CSmartStr(xt.fetch_loaded_p1("flybody")) if bValue(pageObject.isShowDetailTables) then setArrElement returnJSON,"html",CSmartStr(ArrayElement(returnJSON,"html")) & CSmartStr(xt.fetch_loaded_p1("detail_tables")) end if setArrElement returnJSON,"idStartFrom",CSmartDbl(flyId)+1 ResponseWrite my_json_encode(returnJSON) else if IsEqual(inlineedit,EDIT_INLINE) then xt.load_template_p1 templatefile setArrElement returnJSON,"html",CreateDictionary() GetCollectionBounds editFields,edit_loopIdx9,edit_loopMax9 edit_exitLoop9=false do while edit_loopIdx9<=edit_loopMax9 edit_exitLoop9=false do edit_arrKey9 = GetCollectionKey(editFields,edit_loopIdx9) doAssignment fName,ArrayElement(editFields,edit_arrKey9) if bValue(detailKeys) and bValue(asp_in_array(fName,detailKeys,false)) then exit do end if setArrElementN returnJSON,CreateArray2("html",fName),xt.fetchVar_p1(CSmartStr(GoodFieldName(fName)) & "_editcontrol") loop while false if edit_exitLoop9 then _ exit do edit_loopIdx9=edit_loopIdx9+1 loop ResponseWrite my_json_encode(returnJSON) else xt.display_p1 templatefile end if end if %>