<%
String category = null;
Boolean bool = true ;
try{
// Connection con = connect.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from t_category where active='1'");
while (rs.next() ) {
category = rs.getString(2);
if(bool){
out.println("
");
bool = false;
}
else{
out.println("
");
bool = true;
}
out.println("
") ;
out.println("
+".jpg)
");
Statement stmt1 = con.createStatement();
ResultSet rs1 = stmt1.executeQuery("select * from t_news where view = 'General' and category = '"+category+"' and active='1' order by sno desc");
int i = 0 ;
while (i!=6 ) {
boolean b = rs1.next();
if(b==false)
{break;}
i++;
String str = rs1.getString(2);
if (str.length() >= 50 )
{
str = str.substring(0, 50);
}
out.println("
"+str+"");
}
rs1.close();
stmt1.close();
out.println("
");
if(bool){
out.println("
");
}
}
rs.close();
stmt.close();
// con.close();
} catch (Exception e) {
out.println(e);
}
%>