I've bolded the offending line:
<%@ Language=VBScript %>
<%Response.Buffer = True%>
<!-- #include file="SecurityHDR.asp" -->
<%
'****************************************
'* OrderForm.asp
'*
'* -initializes the order process
'* -retrieves stored order data from the database
'* -starts up and passes data to the order form applet
'****************************************
'If user doesn't have an order number, send them back to get one (workaround for problems caused by user hitting "Back" button)
if Session("OrderNumber") = "" then
Response.Redirect "PixChoice.asp"
end if
'Acquire passed/stored values
strUserName = Session("UserName")
intOrderNum = Session("OrderNumber")
strFileType = Request.QueryString("FileType")
%>
<!--#include file="../Secure/dbconn.asp" -->
<%
Set objrs = Server.CreateObject("ADODB.Recordset")
Set objrsPI = Server.CreateObject("ADODB.Recordset")
'Retrieve user information from database
strSQLPI = "SELECT * FROM Users WHERE UserName ='" & strUserName & "'"
objrsPI.Open strSQLPI,objcon
'Retrieve stored order data from the database
strSQL = "SELECT * FROM Orders WHERE OrderNumber=" & intOrderNum & " AND ImageType NOT IN ('Placeholder') ORDER BY FileName,Quantity ASC"
objrs.open strSQL, objcon
%>
<HTML>
<HEAD>
<TITLE>Order Form for Order #<% =intOrderNum %></TITLE>
</HEAD>
<BODY>
<APPLET CODE="OrderForm" ARCHIVE="sOrderForm.jar" NAME="OrderForm" BGCOLOR="#FFFFFF" WIDTH=100% HEIGHT=100%>
<PARAM NAME="FileType" VALUE="<% =strFileType %>">
<PARAM NAME="OrderNumber" VALUE="<% =intOrderNum %>">
<PARAM NAME="FName" VALUE="<% =objrsPI("FName") %>">
<PARAM NAME="LName" VALUE="<% =objrsPI("LName") %>">
<PARAM NAME="UserName" VALUE="<% =strUserName %>">
<%
'Assign stored order data to parameters for applet to retrieve data from
fileCount = 0
pkgCount = 0
strPkgCount = ""
'If there is stored order data...
if not (objrs.bof and objrs.eof) then
ct = -1
cn = 0
strOldFile = ""
%><PARAM NAME="Rush" VALUE="<% =objrs("Rush") %>">
<PARAM NAME="Ship" VALUE="<% =objrs("Ship") %>">
<PARAM NAME="Reference" VALUE="<% =objrs("Reference") %>">
<%
'Do this until we reach the end of the order data
while not objrs.eof
'If there is a file name associated with this package...
if objrs("FilePath") <> "" then
'Is this package associated with the same file as the last package? If not, then...
if strOldFile <> objrs("FilePath") then
'Increment file counter
ct = ct + 1
%>
<PARAM NAME="FileName<% =ct %>" VALUE="<% =Replace(objrs("FilePath"),"/","\") %>">
<%
'Reset package counter
cn = 0
'Increment total file count
fileCount = fileCount + 1
'Reset total package count (for this file)
pkgCount = 0
'Add to comma-delimited package count string
strPkgCount = strPkgCount & ","
end if
'If a quantity (package) was entered for this file...
if objrs("Quantity") <> "" then
'Increment total package count (for this file)...
pkgCount = pkgCount + 1
'...and add it to the end of the comma-delimited package count string
strPkgCount = Left(strPkgCount, instrrev(strPkgCount, ",")) & pkgCount
'Now, assign package data to parameters
%><PARAM NAME="Quantity<% =ct %>_<% =cn %>" VALUE="<% =objrs("Quantity") %>">
<PARAM NAME="Size<% =ct %>_<% =cn %>" VALUE="<% =objrs("Size") %>">
<PARAM NAME="Mount<% =ct %>_<% =cn %>" VALUE="<% =objrs("Mount") %>">
<PARAM NAME="Texture<% =ct %>_<% =cn %>" VALUE="<% =objrs("Texture") %>">
<PARAM NAME="Spray<% =ct %>_<% =cn %>" VALUE="<% =objrs("Spray") %>">
<PARAM NAME="Spot<% =ct %>_<% =cn %>" VALUE="<% =objrs("Spot") %>">
<PARAM NAME="UC<% =ct %>_<% =cn %>" VALUE="<% =objrs("UC") %>">
<PARAM NAME="DA<% =ct %>_<% =cn %>" VALUE="<% =objrs("DA") %>">
<PARAM NAME="DAtext<% =ct %>_<% =cn %>" VALUE="<% =objrs("DAtext") %>">
<PARAM NAME="GC<% =ct %>_<% =cn %>" VALUE="<% =objrs("GC") %>">
<PARAM NAME="GCtext<% =ct %>_<% =cn %>" VALUE="<% =objrs("GCtext") %>">
<PARAM NAME="SpecInstr<% =ct %>_<% =cn %>" VALUE="<% =objrs("Instructions") %>">
<%
'Increment package counter
cn = cn + 1
else
'No quantity (package) entered for this file, so add a "0" to the comma-delimited package count string
strPkgCount = Left(strPkgCount, instrrev(strPkgCount, ",")+1) & "0"
end if
'Save this file name, in case the next package is associated with the same file
strOldFile = Replace(objrs("FilePath"),"/","\")
'Move to the next package
objrs.MoveNext
end if
wend
'Assign comma-delimited package count string to a parameter
%>
<PARAM NAME="PackageCount" VALUE="<% =Right(strPkgCount, len(strPkgCount)-1) %>">
<%
end if
'Assign total file count to a parameter
%>
<PARAM NAME="FileCount" VALUE="<% =fileCount %>">
<!-- This text will be displayed if the customer does not have a Java plug-in at all -->
You need to have at least version 1.4.1 of the Java plug-in, which can be obtained at <A HREF="
</APPLET>
</BODY>
</HTML>