%
Function showalbum(album_id)
' Define variables
dim recordsonpage, requestrecords, offset, allrecords, hiddenrecords, showrecords, lastrecord, recordcounter, pagelist, pagelistcounter
' DB connection
dim Conn
Set Conn = createobject("ADODB.Connection")
Conn.open = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=mysql95.secureserver.net;PORT=3306;DATABASE=illweb;USER=illweb;PASSWORD='webill';OPTION=0;"
'DRIVER={MySQL ODBC 3.51 Driver};SERVER=mysql95.secureserver.net;PORT=3306;DATABASE=illweb;USER=illweb;PASSWORD='your password';OPTION=0;
' records per page
dim albumhtml
sql = "SELECT *,DATE_FORMAT( release_date, '%M %e, %Y' ) as formatted_date FROM illalbumdb where album_id = " & album_id & " Limit 1"
' opens database
set rs = conn.Execute(sql)
' reads first records (offset) without showing them (can't find another solution!)
hiddenrecords = requestrecords
do until hiddenrecords = 0 OR rs.EOF
hiddenrecords = hiddenrecords - 1
rs.movenext
if rs.EOF then
lastrecord = 1
end if
loop
dim albumname,albumrd,label,albumfolder,price,artist,dl_ind,zip_name,sell_ind,tmphtml,email_addr
album_id = rs("album_id")
albumname = rs("album_name")
albumrd = rs("formatted_date")
label = rs("album_label")
albumfolder = rs("album_folder")
price = rs("album_price")
artist = rs("album_artist")
albumpath = "/" & trim(albumfolder) & "/"
dl_ind = rs("dl_ind")
sell_ind = rs("sell_ind")
zip_name = rs("zip_name")
email_addr = rs("email_addr")
if dl_ind = 1 then
tmphtml = ""
tmphtml = " "
tmphtml = tmphtml & "
"
tmphtml = tmphtml & " " & artist & " - " & albumname & "
"
tmphtml = tmphtml & " Release Date: " & albumrd & "
"
tmphtml = tmphtml & "
"
tmphtml = tmphtml & ""
tmphtml = tmphtml & "
"
elseif sell_ind then
tmphtml = ""
tmphtml = " "
tmphtml = tmphtml & "
"
tmphtml = tmphtml & " " & artist & " - " & albumname & "
"
tmphtml = tmphtml & " Release Date: " & albumrd & "
"
tmphtml = tmphtml & ""
tmphtml = tmphtml & ""
tmphtml = tmphtml & ""
end if
' Closes connection
rs.close
Conn.close
showalbum = tmphtml
End Function
%>
|
|
All material was produced, written, and performed by iLL-itERAcy
|
|
Please Click On the Album Cover To Preview Album
|
|
<%= showalbum(5) %>
|
|
<%= showalbum(1) %>
|
|
|
|
|
|