|
| <% WriteString("PageTitle_VersionDownloads") %> |
| <% WriteString("ContentText_VersionDownloadsPageText") %> |
<%
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 %>
| <% WriteString("ContentText_NoDownloadableVersions") %> |
<% else %>
<%
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
%> | Linked Files |
<%
ElseIf Not blnDoneFirstUpload And V_DownloadType = "u" Then
blnDoneFirstUpload = True
numBackgroundCounter = 0
%> Uploaded Files |
<%
End If
%>
| <% = strItemName %> |
<% If V_DownloadType = "l" Then
%>
<%
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
%>
<%
Else
strFileLocation = Application(LICENSENUMBER & "uploadsfolder") & "files_versions/" & theFile
%>
<%
End if
End If
%>
|
&P_ID=<% =objRecordSet("P_ID") %>&PT_ID=<%=objRecordSet("ProdTypeID")%>"> " title="<% WriteSafeString("ImageLabel_EditThisVersion") %>" src="images_webshop/modify.gif" border="0"> |
<% objRecordSet.MoveNext
Loop
%>
|
<% end if
objRecordSet.Close %>
|