%@ page language ="java" errorPage="ExceptionHandler.jsp" %>
<%@ page import ="java.sql.*" %>
<%@ page import ="db.*" %>
<%!
ResultSet rs=null;
ResultSet rs1=null;
ResultSet rstheam=null;
String theam="";
String user_session="";
String qs="";
int q=0;
int i=0;
int k=0;
int n=0;
int j=0;
String arr1="";
String arr2="";
String category="";
int limitePorPagina = 20;
%>
<%
qs=request.getQueryString();
String [] arr= qs.split("@");
arr1=arr[0];
arr2=arr[1];
q=Integer.valueOf(arr1).intValue();
%>
<%
Connection con=ConnectionFactory.getConnection();
Statement sttheam = con.createStatement();
rstheam=sttheam.executeQuery("select * from theams where display='Y'");
while(rstheam.next())
{
theam=rstheam.getString("color_pg");
}
rstheam.close();
sttheam.close();
%>
<%Statement stcat = con.createStatement();
ResultSet rscat=stcat.executeQuery("select Wall_catg from wall_catg where Pk_Wall_Catg_Id="+q);
if(rscat.next()){
category=rscat.getString("Wall_catg"); }
%>
Welcome to Smscontest.com
|
|
|
|
|
<%
Statement st = con.createStatement();
ResultSet rspic=st.executeQuery("select * from wallpapers where Wall_Show='Y' and Fk_wall_catg="+q);
%>
<%
while(rspic.next())
{
i=i+1;
}
rspic.close();
%>
<%
Statement stpic = con.createStatement();
Statement declaracao2 = con.createStatement();
ResultSet rs=stpic.executeQuery("select * from wallpapers where Wall_Show='Y' and Fk_wall_catg="+q+" LIMIT " + arr2 + "," + String.valueOf(limitePorPagina) );
ResultSet rsnew = declaracao2.executeQuery("Select count(*) as c from screensavers where screen_show='Y' and Fk_screen_catg="+q);
rsnew.next();
int totalregs = Integer.parseInt(rsnew.getString("c"));
int totalpgs = Math.round(totalregs / limitePorPagina);
if ((totalregs % limitePorPagina) > 0) totalpgs++;
int pr = Integer.valueOf(arr2).intValue();
//rs.beforeFirst();
int k=i/4;
if(k>1)
{
for(n=0;n
<%
for(j=0; j<4; j++)
{
%>
');"> <%=rs.getString("Wall_Name").trim()%>" height="96" width="96" border="0" alt="Not Available"> <%=rs.getString("Wall_Code")%><%
rs.next();
%> |
<% }%>
<% }%>
<% }
%>
|
<%
if (pr > 20) {
%>
[First]
[Previous]
<%
}//if (pr > 0)
if (pr < (totalpgs * limitePorPagina) - limitePorPagina) {
%>
[Next]
[Last]
<%
}//if (cont < totalpgs)
%>
|
<%}
else
{
if(rs.next())
{
%>
<%for(j=0; j<4; j++)
{ %>
');"> <%=rs.getString("Wall_Name").trim()%>" height="96" width="96" border="0" alt="Not Available">
<%=rs.getString("Wall_Code")%>
<% rs.next(); %> |
<% }%>
<%}
}
//rs.beforeFirst();
rs.close();
con.close();
i=0;
k=0;
n=0;
j=0;
%>
|
|
|
|
|
|
|
|
<%
theam="";
if(con!=null)
{
con.close();
}
%>