<% Set db = Server.CreateObject("ADODB.Connection") set rs = server.createObject("ADODB.Recordset") ' if request("action")="addalbum" then if len(request("artist"))>0 then myArtist=request("artist") else myError="Please enter the artist this album belongs to." if len(request("Description"))>0 then myDescription=replace(request("Description"),"'","þ") if len(request("Title"))>0 then myTitle=replace(request("Title"),"'","þ") else myError="Please enter a title of the album." if len(request("Image"))>0 then myImage=replace(request("image"),"'","þ") if len(request("thumbnail"))>0 then myThumbnail=replace(request("thumbmail"),"'","þ") if len(request("buylink"))>0 then myBuyLink=request("buylink") if len(myError)<1 then response.write "Adding Album... " db.execute("INSERT into albums (artistid,title,description,image,thumbimage,buylink) VALUES ('" & myArtist & "','" & myTitle & "','" & myDescription & "','" & myImage & "','" & myThumbnail & "','" & request("buylink") & "')") set rs=db.execute("SELECT last_insert_id() FROM albums") albumid=rs("last_insert_id()") rs.close response.write "Done." x=1 DO until x>=21 if len(request("title" & x))>0 then response.write "Adding Songs... " db.execute("INSERT into songs (albumid,track,title,listenlink,watchlink,length) VALUES('" & albumid & "','" & request("tracknumber" & x) & "','" & replace(request("title" & x),"'","þ") & "','" & request("listenlink" & x) & "','" & request("watchlink" & x) & "','" & request("length" & x) & "')") 'response.write request("title" & x) & "
" response.write "Done." else 'x=50 end if x=x+1 LOOP end if end if if request("action")="" OR len(myerror)>0 then if len(myerror)>0 then response.write "Error: " & myError & "

" %>
Artist:
Album Title:
Album Description:

Album Image:
Album Thumbnail:

Buy Link:

Songs: <% dim myTrackNumber(20) dim mySongTitle(20) dim myLink(20) dim myLength(20) dim myListenLink(20) dim myWatchLink(20) for x=1 to 20 %> <% next %>
TrackTitleLengthListen LinkWatch Link
" size=1 maxlength=3>"" then response.write request("title" & x) else response.write mySongTitle(x) %>">"" then response.write request("length" & x) else response.write myLength(x)%>" size=4 maxlength=6>"" then response.write request("listenlink" & x) else response.write myListenLink(x)%>">"" then response.write request("watchlink" & x) else response.write myWatchLink(x) %>">


<% end if set rs=nothing db.close set db=nothing %>