<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' check for an abacci cookie if session("uid") = "" then If Request.Cookies("abaccibooks") <> "" Then ' get this user's previous session uid session("uid") = Request.Cookies("abaccibooks")("uid") else ' new user, create a new cookie for them session("uid") = cstr(cdbl(cstr(year(now)) & cstr(month(now)) & cstr(day(now)) & cstr(timer())) * 100) response.Cookies("abaccibooks").expires = Now() + 90 response.Cookies("abaccibooks")("uid") = session("uid") End if end if Dim cmdListCount__list_ID cmdListCount__list_ID = "0" if(session("uid") <> "") then cmdListCount__list_ID = session("uid") %> <% set cmdListCount = Server.CreateObject("ADODB.Command") cmdListCount.ActiveConnection = MM_cnBooks_STRING cmdListCount.CommandText = "dbo.getListCount" cmdListCount.Parameters.Append cmdListCount.CreateParameter("@RETURN_VALUE", 3, 4) cmdListCount.Parameters.Append cmdListCount.CreateParameter("@list_ID", 200, 1,16,cmdListCount__list_ID) cmdListCount.CommandType = 4 cmdListCount.CommandTimeout = 0 cmdListCount.Prepared = true set rsListCount = cmdListCount.Execute rsListCount_numRows = 0 %> <% Dim rsBookList__MMColParam rsBookList__MMColParam = "1" If (Session("uid") <> "") Then rsBookList__MMColParam = Session("uid") End If %> <% Dim rsBookList Dim rsBookList_numRows Set rsBookList = Server.CreateObject("ADODB.Recordset") rsBookList.ActiveConnection = MM_cnBooks_STRING rsBookList.Source = "SELECT * FROM dbo.cwcBooklist WHERE userID = '" + Replace(rsBookList__MMColParam, "'", "''") + "'" rsBookList.CursorType = 1 rsBookList.CursorLocation = 2 rsBookList.LockType = 1 rsBookList.Open() rsBookList_numRows = 0 %> <% Dim rsAuthor__MMColParam rsAuthor__MMColParam = "200" If (Request.QueryString("bookID") <> "") Then rsAuthor__MMColParam = Request.QueryString("bookID") querystring = "SELECT authorName, authorID FROM dbo.vCWCAuthorTitles WHERE bookID = " + Replace(rsAuthor__MMColParam, "'", "''") + "" elseif request.querystring("authorID") <> "" then rsAuthor__MMColParam = request.QueryString("authorID") querystring = "SELECT authorName, authorID FROM dbo.cwcAmazonAuthors WHERE authorID = " + Replace(rsAuthor__MMColParam, "'", "''") + "" else querystring = "select authorname, authorID from dbo.cwcAmazonAuthors WHERE authorID = 104" End If %> <% Dim rsAuthor Dim rsAuthor_numRows dim commapos dim authorname Set rsAuthor = Server.CreateObject("ADODB.Recordset") rsAuthor.ActiveConnection = MM_cnBooks_STRING rsAuthor.Source = querystring rsAuthor.CursorType = 0 rsAuthor.CursorLocation = 2 rsAuthor.LockType = 1 rsAuthor.Open() commapos = instr(rsAuthor.Fields.Item("authorName").Value,",") if commapos > 0 then authorname = mid(rsAuthor.Fields.Item("authorName").Value, commapos + 1) & " " & left(rsAuthor.Fields.Item("authorName").Value, commapos - 1) else authorname = rsAuthor.Fields.Item("authorName").Value end if rsAuthor_numRows = 0 %> Your Abacci Book List

Abacci Books:
the world's best literature, free!

Abacci
Books



Advanced Search

FAQ
<% if session("username") <> "" then%> Log Out
Your Account <% else %> Login <% end if %>
About Abacci
Contact Us
Links
Site Map
Newsletter

 

<% if request.QueryString("bookID") <> "" then ' called from book page %> Abacci > Books > ">Authors > "><%=authorname%> > Book List <% elseif request.QueryString("authorID") <> "" then ' called from authordetail page %> Abacci > Books > ">Authors > "><%=authorname%> > Book List <% else ' being called from manage booklist %> Abacci > Books > Book List <% end if %>  
 

Your book list:

<% if rsBookList.eof then %> Is empty! <% else set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP") %>
<% rsBookList.movefirst While NOT rsBookList.EOF szAuthors = "" szGetString = "http://xml.amazon.com/onca/xml2?t=coverwave-20&dev-t=DEX7DQTIVJGCS&AsinSearch=" & rsBookList.Fields.Item("ASIN").Value & "&type=heavy&f=xml" objHTTP.open "GET", szGetString, true objHTTP.Send 'Wait for up to 3 seconds if we've not gotten the data yet If objHTTP.readyState <> 4 then objHTTP.waitForResponse 3 End If If (objHTTP.readyState <> 4) Or (objHTTP.Status <> 200) Then 'Abort the XMLHttp request objHTTP.Abort 'strData = "Problem communicating with remote server..." Else Set objXML = objHTTP.ResponseXML set o15 = objXML.getElementsByTagName("Details").item(i) set o16 = o15.childNodes For j = 0 to o16.length-1 Select Case o16.item(j).nodeName Case "Catalog" szCatalog = o16.item(j).text Case "Asin" szAsin = o16.item(j).text Case "ProductName" szProductName = o16.item(j).text Case "Isbn" szIsbn = o16.item(j).text Case "Upc" szUpc = o16.item(j).text Case "Manufacturer" szManufacturer = o16.item(j).text Case "Distributor" szDistributor = o16.item(j).text Case "Binding" szBinding = o16.item(j).text Case "Publisher" szPublisher = o16.item(j).text Case "OurPrice" szOurPrice = o16.item(j).text Case "ListPrice" szListPrice = o16.item(j).text Case "UsedPrice" szUsedPrice = o16.item(j).text Case "ReleaseDate" szReleaseDate = o16.item(j).text Case "Availability" szAvailability = o16.item(j).text Case "ImageUrlSmall" szImageUrlSmall = o16.item(j).text Case "Authors" totAuths = objXML.getElementsByTagName("Author").length For k = 0 to (totAuths-1) If (k" End Select Next Case "Directors" totDirectors = objXML.getElementsByTagName("Director").length For k = 0 to (totDirectors-1) If (k"") Then szTaggedurl="page/detail.asp?asin=" & szAsin End if %> <% end if ' got a timely response Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsBookList.MoveNext() if not rsBookList.eof then %> <% end if Wend %>
<% If (szImageUrlSmall<>"") Then Response.write("") Else Response.write(" ") End if %> " size="2"> "> <% Response.write ("") Response.write ("" & szProductName & "
") If (szAuthors<>"") Then Response.write ("by " & szAuthors & "
") End if If (szArtists<>"") Then Response.write ("by " & szArtists & "
") End if If (szManufacturer<>"") Then Response.write (szManufacturer & "
") End if If (szReleasedate <> "") Then Response.write ("Released: " & szReleasedate ) If (szIsbn <> "") Then Response.write (" - ISBN: " & szIsbn & "
") Elseif (szUpc <> "") Then Response.write (" - UPC: " & szUpc & "
") Else Response.write ("
") End if Else If (szIsbn <> "") Then Response.write ("ISBN: " & szIsbn & "
") Elseif (szUpc <> "") Then Response.write ("UPC: " & szUpc & "
") End if End if response.Write("
") If szOurPrice <> "" Then Response.write ("" & szOurPrice & "") End if If (szAvailability <> "Available") Then Response.write ("     * " & szAvailability & " *
") Else Response.write ("
") End if %>
">Remove

 

Note: this will not send any personal information to Amazon, but will open a window and set up a shopping cart filled with the book information displayed above.

Before completing your purchase you will need to create or log into an Amazon account and provide them with your delivery and payment details. <% rsBookList.movefirst do while not rsBookList.eof %> <% rsBookList.movenext loop %>

<%end if %>

 

 

Home | Authors | Titles | FAQ | <% if session("username") <> "" then%> Log Out | Your Account <% else %> Login <% end if %> | Contact Us | Site Map

Site Design: Megalong Multimedia

<% rsBookList.Close() Set rsBookList = Nothing %>