<%option explicit%> <% '********************************************************** ' Version 6.50 ' prompts for type of export '********************************************************** ShopCheckAdmin "shopa_editdisplay.asp" dim sAction dim currentURL dim returnURL Dim Fieldnames(10) Dim Fieldvalues(10) Dim optionCount Dim OptionNames(5) Dim Optionfieldname Dim fieldname Dim Fieldvalue Dim Fieldcount Dim cSelect dim captions(10) cSelect= getlang("LangCommonSelect") sAction=request("Action") if sAction="" then sAction=request("Action.x") end if currentURL=CurrentFile & "?table=" & request("table") 'returnURL=GetSess("CurrentURL") returnURL = "shopa_editdisplay.asp?table=" & request("table") if saction="" then AdminPageHeader GetFieldnames GetFieldValues DisplayForm AdminPageTrailer else ProcessForm responseredirect returnURL & "&SpecialFunction=" & getlang("langSpecialExport") end if Sub DisplayForm dim i GenerateDisplayHeader "Export Setup" GenerateDisplayBodyHeader ' shopwriteheader getlang("LangEdit02") ' Shopwriteheader getlang("LangEditTableName") & " " & Getsess("Table") response.write "
" if sError > "" then shopwriteerror sError end if Response.Write(tabledef) for i=0 to fieldcount fieldname = fieldnames(i) fieldvalue = fieldvalues(i) FormatRow fieldname,fieldvalue, captions(i) next ShowHeaderOption Response.Write(TableDefEnd) If Getconfig("xbuttoncontinue")="" then Response.Write("
") else Response.Write("
") end if Response.Write("
") response.write "

" GenerateDisplayBodyFooter gethelp end sub Sub FormatRow (fieldname,fieldvalue, caption) Response.Write(tablerow & tablecolumn & caption & tablecolumnEnd & "") end sub Sub ProcessForm dim strname dim strvalue Dim Key For Each key in Request.Form strname = key strvalue = Request.Form(key) SetSess strname, strvalue ' debugwrite key & "=" & strvalue Next end sub ' Sub GetFieldnames Fieldnames(0)="ExportFilename" Fieldnames(1)="Exportlocation" Fieldnames(2)="Exportdelimiter" fieldcount=2 OptionNames(0)="No" OptionNames(1)="Yes" OptionFieldName="ExportIdField" OptionCount=2 captions(0)= getlang("LangMenuFileName") captions(1)= getlang("LangDirectory") captions(2)= getlang("LangDelimiter") end sub ' Sub GetFieldvalues Dim strvalue Dim i if GetSess("ExportIdField")="" then SetDefaultValues else for i = 0 to fieldcount fieldvalues(i)=Getsess(fieldnames(i)) next end if end sub Sub SetDefaultValues SetSess "ExportFileName",request("table") & ".txt" Fieldvalues(0)=GetSess("ExportfileName") Setsess "exportlocation","" Fieldvalues(1)=getsess("exportlocation") SetSess "Exportdelimiter",";" FieldValues(2)=GetSess("ExportDelimiter") end sub ' Function CurrentFile CurrentFile="shopa_exportsetup.asp" end function Sub ShowHeaderOption dim caption caption=getlang("langexportheaderrequired") Response.Write tablerow & TableColumn & caption & tablecolumnEnd & "" & vbcrlf Response.write "" & vbcrlf Response.write "" & vbcrlf End Sub %>'