<%set con = server.createobject("adodb.connection") con.open Datasource set rs = server.createobject("adodb.recordset") set rs10 = server.createobject("adodb.recordset")%>
<% set rs = server.createobject("adodb.recordset") set rs1 = server.createobject("adodb.recordset") set rs2 = server.createobject("adodb.recordset") set rs3 = server.createobject("adodb.recordset") if request.querystring("catid")<>"" then session("catid")=request.querystring("catid") end if catid=session("catid") rs.open "select * from tblcategory where catid ='"&catid&"'",con %> <%rs.close%> <%rs.open "select count(*) from tblpaintings where catid ='"&catid&"'",con artcount=rs(0) rs.close if artcount>0 then session("pageno")=request.querystring("arg") if request.querystring("catid")<>"" then session("catid")=request.querystring("catid") session("mynextid")="" session("pageno")=1 catid=session("catid") rs.open "select count(*) from tblpaintings where catid ='"&catid&"'",con artcount=rs(0) rs.close if artcount>0 then rs.open "select * from tblpaintings where catid ='"&catid&"' order by pid asc",con do while not rs.EOF if session("mynextid")="" then session("mynextid")=rs("pid") else session("mynextid")=session("mynextid")&"#"&rs("pid") end if rs.MoveNext loop rs.close end if end if catid=session("catid") nextid=split(session("mynextid"),"#",-1,1) if session("pageno")<>1 then newcount=(cint(session("pageno"))-1)*4 else newcount=0 end if if session("pageno")<=ubound(nextid)/4 then count=request.querystring("arg3") rs.open "select * from tblpaintings where catid ='"&catid&"' and pid>'"&nextid(newcount)&"' order by pid asc",con mycount=1 do while not rs.eof if mycount<=4 then rs1.open "select fname,lname from tblartist where aid='"&rs("aid")&"'",con rs2.open "select catname from tblcategory where catid='"&rs("catid")&"'",con%> <%rs1.close rs2.close count=count+1 mycount=mycount+1 rs.MoveNext else 'session("nextid")=rs("pid") 'session("artid")=rs("aid") exit do end if loop%> <%else count=request.querystring("arg4") rs.open "select * from tblpaintings where catid ='"&catid&"' and pid>='"&nextid(newcount)&"' order by pid",con mycount=1 do while not rs.eof if mycount<=4 then rs1.open "select fname,lname from tblartist where aid='"&rs("aid")&"'",con rs2.open "select catname from tblcategory where catid='"&rs("catid")&"'",con%> <%rs1.close rs2.close rs.MoveNext count=count+1 mycount=mycount+1 else 'session("nextid")=rs("pid") 'session("artid")=rs("aid") exit do end if loop%> <%end If%> <%else%> <%end if%>
Art Work Category--<%=rs("catname")%>
<%imgs=split(rs("thumbnail"),".",-1,1) imgs1=imgs(0)%> " border="0" onclick="myFull('<%=rs("pid")%>');return false"> <%if session("uid")<>"" then rs3.open "select count(*) from tblmygallery where uid='"&session("uid")&"' and pid='"&rs("paintid")&"'",con if rs3(0)>0 then%> <%else%> <%end if rs3.close else%> <%end if%>
Title: <%if rs("title")="" then%>Untitled<%else%><%=rs("title")%><%end if%>
Code: <%=rs("paintid")%>
Medium: <%=rs("medium")%>
Category: <%=rs2("catname")%>
Size: H W
cms <%=rs("height1")%> <%=rs("width1")%>
inches <%=rs("height2")%> <%=rs("width2")%>
Year: <%=rs("pyear")%>
<%=rs("status")%> Added to your Gallery">Add to My Gallery">Add to My Gallery
<%imgs=split(rs("thumbnail"),".",-1,1) imgs1=imgs(0)%> " border="0" onclick="myFull('<%=rs("pid")%>');return false"> <%if session("uid")<>"" then rs3.open "select count(*) from tblmygallery where uid='"&session("uid")&"' and pid='"&rs("paintid")&"'",con if rs3(0)>0 then%> <%else%> <%end if rs3.close else%> <%end if%>
Title: <%if rs("title")="" then%>Untitled<%else%><%=rs("title")%><%end if%>
Code: <%=rs("paintid")%>
Medium: <%=rs("medium")%>
Category: <%=rs2("catname")%>
Size: H W
cms <%=rs("height1")%> <%=rs("width1")%>
inches <%=rs("height2")%> <%=rs("width2")%>
Year: <%=rs("pyear")%>
<%=rs("status")%> Added to your Gallery">Add to My Gallery">Add to My Gallery
Painting collection not available
   
 
     
<%con.close%>