%@LANGUAGE="VBSCRIPT"%>
<%
Dim Recordset2__id
Recordset2__id = "TF003"
if(request("id") <> "") then Recordset2__id = request("id")
%>
<%
Dim Recordset3__id
Recordset3__id = "TF003"
if(request("id") <> "") then Recordset3__id = request("id")
%>
<%
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_tf_STRING
Recordset2.Source = "SELECT musician.first & RTRIM(musician.last) & ',' as musicianname, musician.instrument, productmusician.mrank FROM productmusician, musician WHERE musician.musicianID = productmusician.musicianID and productmusician.productid = '" + Replace(Recordset2__id, "'", "''") + "' ORDER BY mrank"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 3
Recordset2.Open()
Recordset2_numRows = 0
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_tf_STRING
Recordset1.Source = "SELECT first & last AS artist, productID, title, price, recordingdates, studio, playingTime, producer, rtrim(audioengineer) AS aengineer, rtrim(photographer) AS photoman, rtrim(mastering) AS masterer, rtrim(graphicartist) AS gartist, releasedate, imageurl FROM product"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Recordset3
Dim Recordset3_numRows
Set Recordset3 = Server.CreateObject("ADODB.Recordset")
Recordset3.ActiveConnection = MM_tf_STRING
Recordset3.Source = "SELECT composition.title, productcomposition.mrank, productcomposition.duration FROM productcomposition, composition WHERE productcomposition.compositionID = composition.compositionID and productcomposition.productID='" + Replace(Recordset3__id, "'", "''") + "' ORDER BY mrank"
Recordset3.CursorType = 0
Recordset3.CursorLocation = 2
Recordset3.LockType = 3
Recordset3.Open()
Recordset3_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
Recordset2_numRows = Recordset2_numRows + Repeat1__numRows
%><%
Dim Repeat2__numRows
Repeat2__numRows = -1
Dim Repeat2__index
Repeat2__index = 0
Recordset3_numRows = Recordset3_numRows + Repeat2__numRows
%><%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
Recordset1_total = Recordset1.RecordCount
' set the number of rows displayed on this page
If (Recordset1_numRows < 0) Then
Recordset1_numRows = Recordset1_total
Elseif (Recordset1_numRows = 0) Then
Recordset1_numRows = 1
End If
' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1
' if we have the correct record count, check the other stats
If (Recordset1_total <> -1) Then
If (Recordset1_first > Recordset1_total) Then Recordset1_first = Recordset1_total
If (Recordset1_last > Recordset1_total) Then Recordset1_last = Recordset1_total
If (Recordset1_numRows > Recordset1_total) Then Recordset1_numRows = Recordset1_total
End If
%> <%
' *** Move To Record and Go To Record: declare variables
Set MM_rs = Recordset1
MM_rsCount = Recordset1_total
MM_size = Recordset1_numRows
MM_uniqueCol = "productID"
MM_paramName = "id"
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%> <%
' *** Move To Specific Record: handle detail parameter
If (MM_paramIsDefined And MM_rsCount <> 0) Then
' get the value of the parameter
param = Request.QueryString(MM_paramName)
' find the record with the unique column value equal to the parameter value
MM_offset = 0
Do While (Not MM_rs.EOF)
If (Cstr(MM_rs.Fields.Item(MM_uniqueCol).Value) = param) Then
Exit Do
End If
MM_offset = MM_offset + 1
MM_rs.MoveNext
Loop
' if not found, set the number of records and reset the cursor
If (MM_rs.EOF) Then
If (MM_rsCount < 0) Then MM_rsCount = MM_offset
If (MM_size < 0 Or MM_size > MM_offset) Then MM_size = MM_offset
MM_offset = 0
' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Close
MM_rs.Open
End If
End If
End If
%> <%
' *** Move To Record: if we dont know the record count, check the display range
If (MM_rsCount = -1) Then
' walk to the end of the display range for this page
i = MM_offset
While (Not MM_rs.EOF And (MM_size < 0 Or i < MM_offset + MM_size))
MM_rs.MoveNext
i = i + 1
Wend
' if we walked off the end of the recordset, set MM_rsCount and MM_size
If (MM_rs.EOF) Then
MM_rsCount = i
If (MM_size < 0 Or MM_size > MM_rsCount) Then MM_size = MM_rsCount
End If
' if we walked off the end, set the offset based on page size
If (MM_rs.EOF And Not MM_paramIsDefined) Then
If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
If ((MM_rsCount Mod MM_size) > 0) Then
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Requery
End If
' move the cursor to the selected record
i = 0
While (Not MM_rs.EOF And i < MM_offset)
MM_rs.MoveNext
i = i + 1
Wend
End If
%> <%
' *** Move To Record: update recordset stats
' set the first and last displayed record
Recordset1_first = MM_offset + 1
Recordset1_last = MM_offset + MM_size
If (MM_rsCount <> -1) Then
If (Recordset1_first > MM_rsCount) Then Recordset1_first = MM_rsCount
If (Recordset1_last > MM_rsCount) Then Recordset1_last = MM_rsCount
End If
' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
Untitled Document
<%=(Recordset1.Fields.Item("artist").Value)%>
<%=(Recordset1.Fields.Item("title").Value)%>
<%=(Recordset1.Fields.Item("productID").Value)%>
(cd only)
Producer, <%=(Recordset1.Fields.Item("producer").Value)%>
Playing Time: <%=(Recordset1.Fields.Item("playingTime").Value)%>
<% strReview = "SEE REVIEWS" %>
<% Response.write(strReview) %>
ADD
REVIEW
|
<% strImage = ""%>
<% Response.write(strImage) %>
|
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))
%>
<%=(Recordset2.Fields.Item("musicianname").Value)%>
<%=(Recordset2.Fields.Item("instrument").Value)%>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset2.MoveNext()
Wend
%>
<%
While ((Repeat2__numRows <> 0) AND (NOT Recordset3.EOF))
%><%=(Recordset3.Fields.Item("title").Value)%>
<%=(Recordset3.Fields.Item("duration").Value)%><%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
Recordset3.MoveNext()
Wend
%>
Audio engineer
- <%=(Recordset1.Fields.Item("aengineer").Value)%>,
Photography - <%=(Recordset1.Fields.Item("photoman").Value)%>,
Graphic Design - <%=(Recordset1.Fields.Item("gartist").Value)%>
|
|
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<%
Recordset3.Close()
Set Recordset3 = Nothing
%>