<%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Response.expires = 0 %> <% On Error Resume Next Dim newFileDescription, newFilePaths, insRec, delRec, showText, _ updateRec, updRec, dropStr, spaces, remRecord, remDispRecord '----------Localization Variables----------------- Dim bckSlash, colon, semiColon, period bckSlash = chr(92) colon = chr(58) semiColon = chr(59) period = chr(46) '----------Query strings------------------------- newFileDescription = request.querystring("newDescription") newFilePaths = request.querystring("newFilePath") remRecord = request.querystring("remRecord") remDispRecord = request.querystring("remDispRecord") updateRec = request.querystring("updateRec") showText = Myinfo.ShowText dropStr = Myinfo.dropStr '------------Call Subs and Functions----------------- If remDispRecord <> "" Then 'Remove a record from the display removeDisplayRecords remDispRecord End If If updateRec <> "" Then 'Update a description updateRecords updateRec, newFileDescription End If If remRecord <> "" Then 'Remove a record removeRecords remRecord End If If newFilePaths <> "" Then 'Add records addRecords newFilePaths, newFileDescription End If '--------------Subs and Functions------------------- Sub RemoveItem(FileToUpdate) Dim strFull, astrFull, item, aFileInfo, FileName, FileDesc,FilePath, updatedFullStr strFull = Myinfo.strFull updatedFullStr = "" astrFull = split(strFull,";") for each item in astrFull if item <> "" then aFileInfo = split(item,"|") FileName = aFileInfo(0) FileDesc = aFileInfo(1) FilePath = aFileInfo(2) if Trim(FileToUpdate) = Trim(FileName) then updatedFullStr = updatedFullStr & FileName & "|" & FileDesc & "|" & FilePath & "|REMOVE;" else updatedFullStr = updatedFullStr & item & ";" end if end if next Myinfo.strFull = updatedFullStr Myinfo.sync =0 End Sub Sub updateRecords(FileToUpdate, newDesc) Dim strFull, astrFull, item, aFileInfo, FileName, FilePath, updatedFullStr strFull = Myinfo.strFull updatedFullStr = "" astrFull = split(strFull,";") for each item in astrFull if item <> "" then aFileInfo = split(item,"|") FileName = aFileInfo(0) FilePath = aFileInfo(2) if Trim(FileToUpdate) = Trim(FileName) then updatedFullStr = updatedFullStr & FileName & "|" & newDesc & "|" & FilePath & "|UPDATE;" else updatedFullStr = updatedFullStr & item & ";" end if end if next Myinfo.strFull = updatedFullStr Myinfo.sync =0 Myinfo.updRec = 1 End Sub Sub addRecords(Records, Description) Dim strFull, strDisplay, n, posSemiCol, Record, FileName, FilePath, _ insRec, addDisplay, FileDescription, strAddDisplay Dim aFilePaths, aFileDescs Dim oFileSystem Dim fPath, fName, fDesc, thisfp Set oFileSystem=CreateObject("Scripting.FileSystemObject") strFull = Myinfo.strFull strDisplay = Myinfo.strDisplay strAddDisplay = "" aFilePaths = split(Records, semiColon) aFileDescs = split(Description, semiColon) n = UBound(aFilePaths) thisfp = 0 For Each fPath in aFilePaths FName= oFileSystem.GetFileName(fPath) if FName <> "" then FDesc = aFileDescs(thisfp) strAddDisplay = strAddDisplay & fName & "|" & fDesc & semiColon strFull = strFull & fName & "|" & fDesc & "|" & fPath & "|INSERT" & semiColon thisfp = thisfp + 1 end if Next insRec = 1 addDisplay = 1 strDisplay = strDisplay & strAddDisplay Myinfo.sync = 0 Myinfo.insRec = insRec Myinfo.strFull=strFull Myinfo.strDisplay=strDisplay Myinfo.addDisplay = addDisplay End Sub Sub setSpaces Dim i, boxWidth, addDisplay boxWidth = Myinfo.Width addDisplay = Myinfo.addDisplay If addDisplay = 1 OR boxWidth = 1 Then For i = 1 to 107 spaces = spaces + "
 
" Next Else For i = 1 to 120 spaces = spaces + "
 
" Next End If End Sub %> PWS Publishing Wizard