<%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "975, 976, 977" strThisBackPage = "config" %> <% '=============================================== ' CactuShop ASP Shopping Cart ' ©1999-2004 Cactusoft Ltd. www.cactusoft.com '=============================================== ' All rights reserved. ' Use of this code is covered by the terms and ' conditions in the license agreement. No ' unauthorized duplication or distribution is ' permitted. Cactusoft's copyright notices must ' remain in the ASP sections of the code. '================================================ server.scripttimeout = 3000 '----------------------------------------------- 'LIST CATEGORIES FOR GATEWAY PAGES '----------------------------------------------- %> <% =GetString("Config_headtitle") %>
<% For numCounter = 1 to numTotalLanguages: strVersions = strVersions & "tblCactuShopVersions.V_Name" & CStr(numCounter) & ", ": next For numCounter = 1 to numTotalLanguages: strProducts = strProducts & "tblCactuShopProducts.P_Name" & CStr(numCounter) & ", ": next strQuery = "SELECT " & strProducts & strVersions & "tblCactuShopProducts.P_ID, tblCactuShopVersions.V_ID, tblCactuShopVersions.V_DownLoadInfo, tblCactuShopVersions.V_DownloadType, MIN(tblCactuShopProductProdTypeLink.PPT_ProdTypeID) As ProdTypeID FROM (tblCactuShopVersions INNER JOIN tblCactuShopProducts ON tblCactuShopVersions.V_Product = tblCactuShopProducts.P_ID) INNER JOIN tblCactuShopProductProdTypeLink ON tblCactuShopProductProdTypeLink.PPT_ProductID = tblCactuShopProducts.P_ID WHERE V_DownloadType IN ('l', 'u') AND tblCactuShopProducts.P_Live ='y' AND tblCactuShopVersions.V_Live = 'y' GROUP BY " & strProducts & strVersions & "tblCactuShopProducts.P_ID, tblCactuShopVersions.V_ID, tblCactuShopVersions.V_DownloadInfo, tblCactuShopVersions.V_DownloadType ORDER BY tblCactuShopVersions.V_DownloadType, tblCactuShopVersions.V_Name1" call ExecuteSQL(strQuery,numCursorType,objRecordSet) if objRecordSet.BOF and objRecordSet.EOF then %> <% else %> <% end if objRecordSet.Close %>
<% WriteString("PageTitle_VersionDownloads") %>
<% WriteString("ContentText_VersionDownloadsPageText") %>
<% WriteString("ContentText_NoDownloadableVersions") %>
<% do while not objRecordSet.EOF 'Get product name strProductName = objRecordSet("P_Name" & CStr(numLanguageID)) If strProductName & "" = "" then numCounter = 0 for numCounter = 1 to numTotalLanguages strProductName = objRecordSet("P_Name" & CStr(numCounter)) If strProductName & "" <> "" then exit for next end if 'Get version name strVersionName = objRecordSet("V_Name" & CStr(numLanguageID)) If strVersionName & "" = "" then numCounter = 0 for numCounter = 1 to numTotalLanguages strVersionName = objRecordSet("V_Name" & CStr(numCounter)) If strVersionName & "" <> "" then exit for next end if 'Build strItemName strItemName = strProductName & " (" & strVersionName & ")" 'Get download information V_DownloadInfo = objRecordSet("V_DownloadInfo") V_DownloadType = objRecordSet("V_DownloadType") 'Alternate background colour numBackgroundCounter = numBackgroundCounter + 1 If numBackgroundCounter Mod 2 = 0 Then strBgColour="#EEEEEE" Else strBgColour="#DDDDDD" 'Work out if we need to do a subtitle If numBackgroundCounter = 1 And V_DownloadType = "l" And Not blnDoneFirstLink Then blnDoneFirstLink = True %> <% ElseIf Not blnDoneFirstUpload And V_DownloadType = "u" Then blnDoneFirstUpload = True numBackgroundCounter = 0 %> <% End If %> <% objRecordSet.MoveNext Loop %>
Linked Files

Uploaded Files
<% = strItemName %> <% If V_DownloadType = "l" Then %> <% Response.Write(SafeHTMLEncode(V_DownLoadInfo)) %> <% ElseIf V_DownloadType = "u" Then 'See if the file exists ReDim aryDownloadExtension(0) Dim aryDownloadInfo aryDownloadInfo = split(V_DownloadInfo, "|") aryDownloadExtension(0) = aryDownloadInfo(0) Set FSO = Server.CreateObject("Scripting.FileSystemObject") theFile = GetFileLocation(Server.MapPath(Application(LICENSENUMBER & "uploadsfolder") & "files_versions/"), objRecordSet("V_ID") & "_" & aryDownloadInfo(1), aryDownloadExtension, FSO) 'response.write out the result If theFile = "" Then %> <% Response.Write(SafeHTMLEncode(aryDownloadInfo(0))) %> <% Else strFileLocation = Application(LICENSENUMBER & "uploadsfolder") & "files_versions/" & theFile %> <% Response.Write(SafeHTMLEncode(aryDownloadInfo(0))) %> <% End if End If %> &P_ID=<% =objRecordSet("P_ID") %>&PT_ID=<%=objRecordSet("ProdTypeID")%>"><% WriteSafeString(" title="<% WriteSafeString("ImageLabel_EditThisVersion") %>" src="images_webshop/modify.gif" border="0">
<% Set objRecordSet = Nothing objDataConn.Close set objDataConn = nothing %>