% %> <% add_nocache_headers asp_include "include/customer_variables.asp",false asp_include "include/xtempl.asp",false asp_include "classes/runnerpage.asp",false filename = "" status = "" message = "" mesClass = "" usermessage = "" error_happened = false readavalues = false Set keys = (CreateDictionary()) Set showValues = (CreateDictionary()) Set showRawValues = (CreateDictionary()) Set showFields = (CreateDictionary()) Set showDetailKeys = (CreateDictionary()) IsSaved = false HaveData = true popUpSave = false doAssignment sessionPrefix,strTableName onFly = false if bValue(postvalue("onFly")) then onFly = true end if if IsEqual(GetRequestValue(Request,"editType"),"inline") then inlineadd = ADD_INLINE else if IsEqual(GetRequestValue(Request,"editType"),ADD_POPUP) then inlineadd = ADD_POPUP if (IsEqual(GetRequestValue(RequestForm(),"a"),"added") and IsEqual(postvalue("field"),"")) and IsEqual(postvalue("category"),"") then popUpSave = true end if else if IsEqual(GetRequestValue(Request,"editType"),"addmaster") then inlineadd = ADD_MASTER else if bValue(onFly) then inlineadd = ADD_ONTHEFLY sessionPrefix = CSmartStr(strTableName) & "_add" else inlineadd = ADD_SIMPLE end if end if end if end if if IsEqual(inlineadd,ADD_INLINE) then templatefile = "customer_inline_add.htm" else templatefile = "customer_add.htm" end if doAssignmentByRef id,postvalue("id") if IsEqual(asp_intval(id),0) then id = 1 end if if not bValue(Session(CSmartStr(sessionPrefix) & "_mastertable")) and bValue(postvalue("mastertable")) then setArrElement Session,CSmartStr(sessionPrefix) & "_mastertable",postvalue("mastertable") end if Set xt = (CreateClass("Xtempl",0,Empty,Empty,Empty,Empty,Empty,Empty,Empty)) xt.assign_p2 "id",id doAssignmentByRef auditObj,GetAuditObject(strTableName) Set params = (CreateDictionary3("pageType",PAGE_ADD,"id",id,"mode",inlineadd)) setArrElement params,"calendar",true setArrElement params,"tName",strTableName setArrElement params,"strOriginalTableName",strOriginalTableName setArrElement params,"menuTablesArr",menuTablesArr setArrElementByRef params,"xt",xt setArrElement params,"needSearchClauseObj",false 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,"pageAddLikeInline",IsEqual(inlineadd,ADD_INLINE) setArrElement params,"useTabsOnAdd",useTabsOnAdd(strTableName) if bValue(ArrayElement(params,"useTabsOnAdd")) then setArrElement params,"arrAddTabs",GetAddTabs(strTableName) end if Set pageObject = (CreateClass("RunnerPage",1,params,Empty,Empty,Empty,Empty,Empty,Empty)) doAssignment detailKeys,pageObject.detailKeysByM doAssignmentByRef addFields,pageObject.getFieldsByPageType() if IsEqual(inlineadd,ADD_SIMPLE) 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 (IsEqual(inlineadd,ADD_SIMPLE) or IsEqual(inlineadd,ADD_MASTER)) or IsEqual(inlineadd,ADD_POPUP) 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")) if IsEqual(inlineadd,ADD_SIMPLE) then pageObject.AddJSFile_p1 "include/detailspreview" end if end if end if if bValue(eventObj.exists_p1("BeforeProcessAdd")) then eventObj.BeforeProcessAdd_p1 conn end if if (IsEqual(inlineadd,ADD_SIMPLE) or IsEqual(inlineadd,ADD_MASTER)) or IsEqual(inlineadd,ADD_POPUP) then if bValue(pageObject.captchaExists()) then pageObject.doCaptchaCode end if end if if IsEqual(GetRequestValue(RequestForm(),"a"),"added") then Set afilename_values = (CreateDictionary()) Set avalues = (CreateDictionary()) Set blobfields = (CreateDictionary()) inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"FirstName",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"LastName",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"Salutation",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"Position",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"Organization",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"Adress1",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"Adress2",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"City",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"State",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"Country",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"PostalCode",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"WorkPhone",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"CellPhone",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"FaxNumber",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"Email",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"DateOfBirth",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"PassportNo",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"VisaNo",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"VisaStatus",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"FinancialSponsor",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"PaymentChoice",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"TravelDate",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"AirlineOrFlight",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"HowReferred",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"RegisterCID",value end if end if inlineAddOption = true if bValue(inlineAddOption) 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 avalues,"EssayOrCV",value end if end if failed_inline_add = false GetCollectionBounds afilename_values,add_loopIdx2,add_loopMax2 do while add_loopIdx2<=add_loopMax2 akey = GetCollectionKey(afilename_values,add_loopIdx2) doAssignment value,ArrayElement(afilename_values,akey) setArrElement avalues,akey,value add_loopIdx2=add_loopIdx2+1 loop retval = true if bValue(eventObj.exists_p1("BeforeAdd")) then doAssignmentByRef retval,eventObj.BeforeAdd_p3(avalues,usermessage,bValue(inlineadd)) end if if bValue(retval) and bValue(pageObject.isCaptchaOk) then setArrElement Session,CSmartStr(strTableName) & "_count_captcha",CSmartDbl(Session(CSmartStr(strTableName) & "_count_captcha"))+1 if bValue(DoInsertRecord(strOriginalTableName,avalues,blobfields,id,pageObject)) then IsSaved = true if bValue(auditObj) or bValue(eventObj.exists_p1("AfterAdd")) then GetCollectionBounds keys,add_loopIdx3,add_loopMax3 do while add_loopIdx3<=add_loopMax3 idx = GetCollectionKey(keys,add_loopIdx3) doAssignment val,ArrayElement(keys,idx) setArrElement avalues,idx,val add_loopIdx3=add_loopIdx3+1 loop end if if bValue(auditObj) then auditObj.LogAdd_p3 strTableName,avalues,keys end if if bValue(eventObj.exists_p1("AfterAdd")) then eventObj.AfterAdd_p3 avalues,keys,bValue(inlineadd) end if if IsEqual(inlineadd,ADD_SIMPLE) or IsEqual(inlineadd,ADD_MASTER) then Set permis = (CreateDictionary()) keylink = "" k = 0 GetCollectionBounds keys,add_loopIdx4,add_loopMax4 do while add_loopIdx4<=add_loopMax4 idx = GetCollectionKey(keys,add_loopIdx4) doAssignment val,ArrayElement(keys,idx) if not IsEqual(k,0) then keylink = CSmartStr(keylink) & "&" end if keylink = CSmartStr(keylink) & ((("editid" & CSmartStr(preInc(k))) & "=") & CSmartStr(htmlspecialchars(asp_rawurlencode(val)))) add_loopIdx4=add_loopIdx4+1 loop doAssignmentByRef permis,pageObject.getPermissions() if bValue(asp_count(keys)) then message = CSmartStr(message) & "" if bValue(GetTableData(strTableName,".edit",false)) and bValue(ArrayElement(permis,"edit")) then message = CSmartStr(message) & ((((" ") & CSmartStr("Edit")) & " ") end if if bValue(GetTableData(strTableName,".view",false)) and bValue(ArrayElement(permis,"search")) then message = CSmartStr(message) & ((((" ") & CSmartStr("View")) & " ") end if end if mesClass = "mes_ok" end if else if not IsEqual(inlineadd,ADD_INLINE) then mesClass = "mes_not" end if end if else doAssignment message,usermessage status = "DECLINED" readavalues = true end if end if message = ((("
" if (bValue(no_output_done()) and IsEqual(inlineadd,ADD_SIMPLE)) and bValue(IsSaved) then setArrElement Session,"message",IIF(message,message,"") asp_header ("Location: customer_" & CSmartStr(pageObject.getPageType())) & ".asp" Response.End end if if IsEqual(inlineadd,ADD_MASTER) and bValue(IsSaved) then setArrElement Session,"message",IIF(message,message,"") end if if IsEqual(inlineadd,ADD_SIMPLE) and not IsEmpty(Session("message")) then doAssignment message,Session("message") asp_unsetElement Session,"message" end if Set defvalues = (CreateDictionary()) if bValue(asp_array_key_exists("copyid1",Request)) or bValue(asp_array_key_exists("editid1",Request)) then Set copykeys = (CreateDictionary()) if bValue(asp_array_key_exists("copyid1",Request)) then setArrElement copykeys,"ID",postvalue("copyid1") else setArrElement copykeys,"ID",postvalue("editid1") end if doAssignmentByRef strWhere,KeyWhere(copykeys,"") doAssignmentByRef strSQL,gSQLWhere(strWhere,"") LogInfo strSQL doAssignmentByRef rs,db_query(strSQL,conn) doAssignmentByRef defvalues,db_fetch_array(rs) if not bValue(defvalues) then Set defvalues = (CreateDictionary()) end if setArrElement defvalues,"ID","" if bValue(eventObj.exists_p1("CopyOnLoad")) then eventObj.CopyOnLoad_p2 defvalues,strWhere end if else end if if bValue(readavalues) then setArrElement defvalues,"FirstName",ArrayElement(avalues,"FirstName") setArrElement defvalues,"LastName",ArrayElement(avalues,"LastName") setArrElement defvalues,"Salutation",ArrayElement(avalues,"Salutation") setArrElement defvalues,"Position",ArrayElement(avalues,"Position") setArrElement defvalues,"Organization",ArrayElement(avalues,"Organization") setArrElement defvalues,"Adress1",ArrayElement(avalues,"Adress1") setArrElement defvalues,"Adress2",ArrayElement(avalues,"Adress2") setArrElement defvalues,"City",ArrayElement(avalues,"City") setArrElement defvalues,"State",ArrayElement(avalues,"State") setArrElement defvalues,"Country",ArrayElement(avalues,"Country") setArrElement defvalues,"PostalCode",ArrayElement(avalues,"PostalCode") setArrElement defvalues,"WorkPhone",ArrayElement(avalues,"WorkPhone") setArrElement defvalues,"CellPhone",ArrayElement(avalues,"CellPhone") setArrElement defvalues,"FaxNumber",ArrayElement(avalues,"FaxNumber") setArrElement defvalues,"Email",ArrayElement(avalues,"Email") setArrElement defvalues,"DateOfBirth",ArrayElement(avalues,"DateOfBirth") setArrElement defvalues,"PassportNo",ArrayElement(avalues,"PassportNo") setArrElement defvalues,"VisaNo",ArrayElement(avalues,"VisaNo") setArrElement defvalues,"VisaStatus",ArrayElement(avalues,"VisaStatus") setArrElement defvalues,"FinancialSponsor",ArrayElement(avalues,"FinancialSponsor") setArrElement defvalues,"PaymentChoice",ArrayElement(avalues,"PaymentChoice") setArrElement defvalues,"TravelDate",ArrayElement(avalues,"TravelDate") setArrElement defvalues,"AirlineOrFlight",ArrayElement(avalues,"AirlineOrFlight") setArrElement defvalues,"HowReferred",ArrayElement(avalues,"HowReferred") setArrElement defvalues,"RegisterCID",ArrayElement(avalues,"RegisterCID") setArrElement defvalues,"EssayOrCV",ArrayElement(avalues,"EssayOrCV") end if if bValue(eventObj.exists_p1("ProcessValuesAdd")) then eventObj.ProcessValuesAdd_p1 defvalues end if includes = "" if not IsEqual(inlineadd,ADD_INLINE) then if not IsEqual(inlineadd,ADD_ONTHEFLY) and not IsEqual(inlineadd,ADD_POPUP) then includes = CSmartStr(includes) & "" & vbcrlf if IsIdentical(pageObject.debugJSMode,true) then includes = CSmartStr(includes) & "" & vbcrlf else includes = CSmartStr(includes) & "" end if includes = CSmartStr(includes) & "" & vbcrlf includes = CSmartStr(includes) & "" & vbcrlf 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 if not IsEqual(inlineadd,ADD_ONTHEFLY) and not IsEqual(inlineadd,ADD_POPUP) then setArrElement pageObject.body,"begin",CSmartStr(ArrayElement(pageObject.body,"begin")) & CSmartStr(includes) if bValue(pageObject.isShowDetailTables) then setArrElement pageObject.body,"begin",CSmartStr(ArrayElement(pageObject.body,"begin")) & "