|
|
|
|
<%
Set db=Server.CreateObject("ADODB.Connection")
db.open "DRIVER={MySQL ODBC 3.51 Driver};Server=localhost;Database=redlightning;UID=redlightning;PWD=mmPScwbr;OPTION=3;"
set rs1=server.createObject("ADODB.Recordset")
rs1.open "select * from artists WHERE id='" & request("id") & "'", db
if NOT rs1.eof then
%>
|
<%=replace(rs1("artist"),"þ","")%>
|
<%
set rs2=server.createObject("ADODB.Recordset")
rs2.open "select * from albums WHERE artistid='" & request("id") & "' ORDER BY id", db
if NOT rs2.eof then
do while NOT rs2.eof
if rs1("artist") = "Pow Wow Trail" then
height = 169
else
height = 120
end if
%>
&album=<%=rs2("id")%>"> " width="120" height="<%= height %>" border="1">
<%=replace(rs2("title"),"þ","'")%>
<% price = rs2("price") %>
<% if (session("country") = "US") then
curr = "USD"
' for USD just subtract 2 dollars from CAD price
price = (price-2)
' change 20.99 to 19.99 instead
if price = 20.99 then price = 19.99 end if
end if %>
<% if session("discount") <> "" then ' Check if discount exists
discountAmt = session("discount")
youSave = price * discountAmt
price = price - (price * discountAmt)
end if
%>
<% if (session("country") = "CA") then curr = "CAD" end if %>
Price: <% Response.Write(FormatCurrency(price,2)) %> <%= curr %>
<% if discountAmt <> "" then Response.Write(" You Save: " & FormatCurrency(youSave,2) & " " & curr) %>
<%
rs2.movenext
loop
else
response.write "No albums found for this artist."
end if
rs2.close
set rs2=nothing
%>
|
|
<%=replace(rs1("description"),"þ","")%>
<%
set rs3=server.createObject("ADODB.Recordset")
if request("album")<>"" then
rs3.open "select * from albums WHERE artistid='" & request("id") & "' AND id='" & request("album") & "'", db
else
rs3.open "select * from albums WHERE artistid='" & request("id") & "' ORDER BY id desc", db
end if
if NOT rs3.eof then
%>
<% if len(rs3("image"))>0 then %>
">
<% end if %>
<% if request("album") <> "" then
'replace(rs3("description"),"þ","")
end if %>
|
|
|
<%
set rs4=server.createObject("ADODB.Recordset")
rs4.open "select * from songs WHERE albumid='" & rs3("id") & "' ORDER by track asc", db
if NOT rs4.eof then%>
|
|
<%=replace(rs3("title"),"þ","'")%>
|
<%end if
do while NOT rs4.eof
%>
<% if rs3("title") = "Born To Sing" then
if rs4("track") = 1 then Response.Write(" Pow Wow Songs ")
if rs4("track") = 9 then Response.write(" Round Dance Songs ")
end if
%>
<% 'if rs4("track")<10 then response.write "0" & replace(rs4("track"),"þ","'") else response.write replace(rs4("track"),"þ","'") %>
<%=rs4("track")%>. <%=replace(rs4("title"),"þ","'")%> |
<%=rs4("length")%> |
<%
if len(rs4("listenlink"))>0 OR len(rs4("watchlink"))>0 then response.write ""
if len(rs4("listenlink"))>0 then
response.write " "
end if
if len(rs4("listenlink"))>0 AND len(rs4("watchlink"))>0 then response.write " "
if len(rs4("watchlink"))>0 then
response.write " "
end if
if len(rs4("listenlink"))>0 OR len(rs4("watchlink"))>0 then response.write ""
%>
|
<%
rs4.movenext
loop
rs4.close
set rs4=nothing
%>
<%
else
response.write ""
end if
rs3.close
set rs3=nothing
%>
|
|
<%
else
response.write "The requested artist was not found in the database. Please check the URL and try again."
end if
rs1.close
db.close
set db=nothing
%>
|
|
|