<%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") cmonth=month(date) cyear=year(date) rs.open "select count(*) from tblpaintings where (pmonth=DATEPART(month, GETDATE()) or pmonth=DATEPART(month, GETDATE())-1) and pyear=DATEPART(year, GETDATE())",con totcount=rs(0) rs.close if totcount>0 then session("pageno")=request.querystring("arg") if session("pageno")="" then 'session("artid")=request.querystring("manid") session("mynextid")="" session("pageno")=1 rs.open "select pid from tblpaintings where (pmonth=DATEPART(month, GETDATE()) or pmonth=DATEPART(month, GETDATE())-1) and pyear=DATEPART(year, GETDATE()) 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 '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 'response.write("
nextid "&session("mynextid")) if session("pageno")<=ubound(nextid)/4 then count=request.querystring("arg3") rs.open "select * from tblpaintings where pid>='"&nextid(newcount)&"' and (pmonth=DATEPART(month, GETDATE()) or pmonth=DATEPART(month, GETDATE())-1) and pyear=DATEPART(year, GETDATE()) 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 pid>='"&nextid(newcount)&"' and (pmonth=DATEPART(month, GETDATE()) or pmonth=DATEPART(month, GETDATE())-1) and pyear=DATEPART(year, GETDATE()) 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 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%>
Recent Works
<%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
<%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
No New Arrivals
   
 
     
<%con.close%>