<% ' Set up constants Const ForReading = 1 ' Input OutPut Mode Const Create = False ' Declare local variables Dim FSO ' FileSystemObject Dim inFile ' TextStreamObject Dim strTemp Dim strContact() Dim strTape() Dim i, j Dim passedEmail Dim disNam, webSite, eMail, fName, lName, sAddress, city, state, pCode Dim taxCond, shipCond, checkPay strFileName = Server.MapPath("DistributorInfo.txt") passedEmail = Request.QueryString("email") ' Instantiate the FileSystemObject Set FSO = Server.CreateObject("Scripting.FileSystemObject") ' use Opentextfile Method to Open the text File Set inFile = FSO.OpenTextFile(strFileName, ForReading, Create) strTemp = inFile.ReadLine do if (UBound(split(strTemp,"^")) > 1) then if split(strTemp,"^")(2)=passedEmail then exit do End if if strTemp = "That'sAllFolks" then exit do strTemp = infile.ReadLine loop disNam = split(strTemp,"^")(0) webSite = split(strTemp,"^")(1) eMail = split(strTemp,"^")(2) taxCond = split(strTemp,"^")(3) checkPay = split(strTemp,"^")(4) shipCond = split(strTemp,"^")(5) strTemp = inFile.ReadLine fName = split(strTemp,"^")(0) lName = split(strTemp,"^")(1) sAddress = split(strTemp,"^")(2) city = split(strTemp,"^")(3) state = split(strTemp,"^")(4) pCode = split(strTemp,"^")(5) %> Purchase Order Form

<%=disNam%>

<% if passedEmail = "jgoetz@speed.net" then %> c/o Joyce Goetz
<%end if%> <%=sAddress & " // " & city & ", " & state & " " & pCode%>
<% if website <> "" then %> ><%=webSite%> <% end if %>

SONG TAPE ORDER FORM
PRE-PAID ORDERS ONLY
NAME:
STREET ADDRESS:
CITY, STATE:
POSTAL CODE:
EMAIL:

INSTRUCTIONS

Please indicate the number of cassettes or compact discs (CDs) desired, then click "Submit". Print and mail the order form with your payment to the address indicated on the order form. YOUR ORDER WILL BE SENT AFTER PAYMENT IS RECEIVED.

Tax: <%=taxCond%>
Shipping: <%=shipCond%>

<% Select Case passedEmail Case "seattletapes@aol.com" %> Email seattletapes@aol.com for discounted shipping/handling on orders of $50 or more

<% Case "kwongwm1234@netzero.com" Case "slawson8@hotmail.com" Case "jgoetz@speed.net" %> 8% discount on any order over $80.00

<% Case "john@youngpeople.com" %>
           
PRICES
Units.. Amount.. ..Units.. Amount.. ..Units.. Amount
CASSETTES   1-10.. $ 8.00 11-30.. $ 6.00 31+.. $ 5.50
CDs   1-10.. $10.00 11-30.. $ 8.00 31+.. $ 7.00
     

<% Case "hallmark@nas.com" %> For a complete list of purchase items and discounts available for
church bookrooms, please refer to the website above.


<% End Select %> <%j = 0 strTemp = inFile.ReadLine While not split(strTemp,"^")(0) = "****" if (not split(strTemp,"^")(2)="$0.00") then%> <% if split(strTemp,"^")(0) = "" then %> <% else %> <% end if %> <%j = j+1%> "> [CD]"> <% End If if (not split(strTemp,"^")(3)="$0.00") then%> <% if split(strTemp,"^")(0) = "" then %> <% else %> <% end if %> <%j = j + 1%> "> [Tape]"> <% End If strTemp = inFile.ReadLine Wend%> "> ">
TITLE PRICE QUANTITY
<%=split(strTemp,"^")(1)%> [CD]><%=split(strTemp,"^")(1)%> [CD]<%=split(strTemp,"^")(2)%>
<%=split(strTemp,"^")(1)%> [Tape]><%=split(strTemp,"^")(1)%> [Tape]<%=split(strTemp,"^")(3)%>

<% ' close TextStreamObject ' and destroy local variables to relase memory inFile.Close Set inFile = Nothing Set FSO = Nothing Function SplitIt(splitString, delimiter) Dim i Dim returnArray() ReDim returnArray(UBound(Split(splitString, delimiter))) For i = 0 To UBound(Split(splitString, delimiter)) returnArray(i) = Split(splitString, delimiter)(i) Next SplitIt = returnArray End Function %>