<%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") 'myend=request.querystring("end") session("pageno")=request.querystring("arg") if session("pageno")="" then session("pageno")=1 end if 'session("artid")=request.querystring("manid") session("mynextid")="" 'artid=session("artid") rs.open "select * from tblpaintings order by pid desc",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 'artid=session("artid") nextid=split(session("mynextid"),"#",-1,1) if session("pageno")<>1 then newcount=(cint(session("pageno"))-1)*4 else newcount=0 end if rs.open "select count(*) from tblpaintings",con reccount=rs(0) rs.close if reccount>0 then if session("pageno") <%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 pid<='"&nextid(newcount)&"' order by pid desc",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 Works
<%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")%>','<%=rs("paintid")%>');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%>