<% '''**** Created by sujit on 22/1/2002 *********** ''****** Last edited by sujit on 6/5/2002 ******** vitemid=request.querystring("prodid") ' Response.Write vitemid&"--" '''*** bookstore table is being used. 'qry="select bookstore.*,categoryname,pubname from bookstore,category,publisher,tbllink where bookstore.itemid="& vitemid &" and bookstore.pubcode=publisher.pubcode and tbllink.itemid="& vitemid &" and tbllink.categoryid=category.categoryid" set con = server.createobject("ADODB.Connection") 'Application("DSNseagull")="Driver=SQL Server; Database=Seagull_Modified_13Feb08; UID=sa; PWD=; SERVER=.;" 'con.Open Application("DSNseagull") Application("dsnseagull08")="Driver={SQL Server};Server=205.178.152.123;Database=seagull08;Uid=seagullindia;Pwd=Seagullindia2002;" con.Open Application("dsnseagull08") set mycmd=server.CreateObject("ADODB.Command") mycmd.ActiveConnection=con mycmd.CommandType=adcmdstoredproc mycmd.CommandText="retbookdetails" set prm1=mycmd.CreateParameter("itemid",adInteger,adParamInput,4,vitemid) mycmd.Parameters.Append prm1 set rsbooksearch=server.createobject("ADODB.recordset") rsbooksearch.ActiveConnection=con rsbooksearch.CursorType=adopenstatic rsbooksearch.PageSize=10 rsbooksearch.CursorLocation=3 'rsbooksearch.Open qry,con rsbooksearch.Open mycmd if rsbooksearch.RecordCount>0 then %>
View Book Details
 
<%if rsbooksearch("description")<>"" then%> <%=rsbooksearch("description")%>
<%end if %>
  " width="75" height="116" border="0">

<% if rsbooksearch("bookname")<>"" then%> <%=rsbooksearch("bookname")%>
<%end if if rsbooksearch("author") <> "--" then%> <%=rsbooksearch("author")%>
<%end if if rsbooksearch("authordetails")<>"" then%> <%=(rsbooksearch("authordetails"))%>
<%end if if rsbooksearch("pubname")<>"" then%> <%=rsbooksearch("pubname")%>
<%end if if rsbooksearch("edition")<>"" then%> <%=rsbooksearch("edition")%>
<%end if if rsbooksearch("publicationdt")<>"" then%> <%=rsbooksearch("publicationdt")%>

<%end if %> <% 'if rsbooksearch("isbn")<>"" then%> <%'end if ''** if enterall=N then it means all the values are inserted separately '''** and so display data from fields directly for data if >0 'if rsbooksearch("enterall")="N" then ' if rsbooksearch("listprice")>0 or rsbooksearch("Priceindoll")>0 or rsbooksearch("Priceinpound")>0 then ' Response.Write "
Price : " ' end if ' if rsbooksearch("listprice")>0 then ' Response.Write "Rs."&rsbooksearch("listprice") ' end if ' if rsbooksearch("Priceindoll")>0 then ' if rsbooksearch("listprice")>0 then ' Response.Write " / " ' end if ' Response.Write "$"&rsbooksearch("Priceindoll") ' end if ' if rsbooksearch("Priceinpound")>0 then ' if rsbooksearch("Priceindoll")>0 or rsbooksearch("listprice")>0 then ' Response.Write " / " ' end if ' Response.Write ""&rsbooksearch("Priceinpound") ' end if ' else ' if rsbooksearch("listprice")>0 then ' Response.Write "
Price : Rs."&rsbooksearch("listprice") ' set rsrate1=server.CreateObject("ADODB.recordset") ' qry="select dollinRs,poundinRs from tblrate" ' rsrate1.Open qry,con,3 ' '''in shopcart, insert price of book from this variable ' dollrate=formatnumber(rsbooksearch("listprice")/rsrate1("dollinRs"),2) ' poundrate=formatnumber(rsbooksearch("listprice")/rsrate1("poundinRs"),2) ' rsrate1.Close ' ' Response.Write " / $"& dollrate ' Response.Write " / "& poundrate ' end if ' end if%> <% set rsbook=server.CreateObject("ADODB.Recordset") sql="SELECT * FROM bookstore WHERE bookname='" & rsbooksearch("bookname") &"' and author='" & rsbooksearch("author") &"' and pubcode='" & rsbooksearch("pubcode") &"' " rsbook.Open sql,con do while not rsbook.eof %> <% if rsbook("isbn")<>"" then%> ISBN : <%=rsbook("isbn")%> <%end if%>
<% 'response.Write(rsbook("Listprice")) strdoll=(rsbook("Priceindoll")) strpound=(rsbook("Priceinpound")) if rsbook("Listprice")<>0 and strdoll<>0 and strpound<>0 then %> Price : Rs.<%=rsbook("Listprice")%>/ $<%=response.Write(rsbook("Priceindoll"))%>/ <%=response.Write(rsbook("Priceinpound"))%> [<%=rsbook("type")%>] <% elseif rsbook("Listprice")<>0 and strdoll=0 and strpound=0 then %> Price : Rs.<%=rsbook("Listprice")%> [<%=rsbook("type")%>] <% elseif rsbook("Listprice")<>0 and strdoll<>0 and strpound=0 then %> Price : Rs.<%=rsbook("Listprice")%>/ $<%=formatnumber(rsbook("Priceindoll"),2)%> [<%=rsbook("type")%>] <% elseif rsbook("Listprice")=0 and strdoll<>0 and strpound<>0 then %> $<%=formatnumber(rsbook("Priceindoll"),2)%>/ <%=formatnumber(rsbook("Priceinpound"),2)%> [<%=rsbook("type")%>] <% elseif rsbook("Listprice")=0 and strdoll=0 and strpound<>0 then %> <%=formatnumber(rsbook("Priceinpound"),2)%> [<%=rsbook("type")%>] <% end if %> <% if rsbook("available")=True then %> ','<%=rsbook("pubcode")%>')" style="text-decoration:none">

<% else %> Out of Print!

<%end if %> <% rsbook.movenext loop %>
<% end if rsbooksearch.close con.close %>