<%@ page language="java" import="java.sql.*" %> <%! int counter; %> <% int counter; //Creating Connection Calling the useBean (dbBean) java.sql.Connection myConn = dbBean.getConnection(); //Opening Statement java.sql.Statement stmt=myConn.createStatement(); //ResultSet from Query ResultSet rSet = null; String cmid =request.getParameter("CMCat_Id"); int CMCat_Id =(new Integer(cmid).intValue()); String csid =request.getParameter("CSCat_Id"); int CSCat_Id =(new Integer(csid).intValue()); %> More Cards...
Who we are?Make your own e-Album!Greeting Cards!
Home | e-Album | About Us | Disclaimer | Privacy Policy  
 


<% System.out.println( "Evaluating date now" ); boolean FLAG_exst = false; int totCards = 0; rSet = stmt.executeQuery("SELECT * FROM cardmaster WHERE CMCat_Id ="+CMCat_Id+" AND CSCat_Id ="+CSCat_Id); if (rSet != null) { while (rSet.next()) { FLAG_exst = true; totCards++; } } System.out.println("TC:"+totCards); rSet = null; rSet = stmt.executeQuery("SELECT CMCat_Des FROM cmaincat where CMCat_Id ="+CMCat_Id); String mainCat =""; if (rSet != null) { while (rSet.next()) { mainCat = rSet.getString("CMCat_Des"); } } if (totCards == 0 && FLAG_exst == false ){ %>
Sorry! We have no collection regarding your choice,
We are continue to update our cards collection. You can check us
later on. To check Other collection click below.
<% } else { String strArr[][] = new String[totCards][3]; int intArr[][] = new int[totCards][3]; rSet = null; rSet = stmt.executeQuery("SELECT * FROM cardmaster WHERE CMCat_Id ="+CMCat_Id+" AND CSCat_Id ="+CSCat_Id+" ORDER BY Card_Desrp"); counter =0; if (rSet != null) { while (rSet.next()) { strArr[counter][0] = rSet.getString("Card_Icon"); strArr[counter][1] = rSet.getString("CTitle"); strArr[counter][2] = rSet.getString("Card_Desrp"); intArr[counter][0] = rSet.getInt("CMCat_Id"); intArr[counter][1] = rSet.getInt("CSCat_Id"); intArr[counter][2] = rSet.getInt("Card_Id"); counter++; } //END OF WHILE FOR RESULTSET } //END OF IF FOR RESULTSET //REINTIALIZING THE rSET RESULTSET VARIABLE rSet = null; rSet = stmt.executeQuery("SELECT CSCat_Des FROM csubcat where CMCat_Id =" + CMCat_Id + " AND CSCat_Id ="+ CSCat_Id); String csCat =""; if (rSet != null) { while (rSet.next()) { csCat = rSet.getString("CSCat_Des"); } //END OF WHILE RESULTSET } //END OF IF RESULTSET %>
Cards |<%=mainCat%> | <%=csCat%>
<% counter =0; while (counter < totCards) { %> <% if (counter < totCards) { %> <% counter++; } if (counter <% counter++; }if (counter <% counter++; } %> <% } //end of while loop System.out.println("Counter="+counter); %>

<%=strArr[counter][1]%>
<% if (strArr[counter][2] != null) { %> <%=strArr[counter][2]%> <% } %>
<%=strArr[counter][1]%>
<% if (strArr[counter][2] != null) { %><%=strArr[counter][2]%><% } %>
<%=strArr[counter][1]%>
<% if (strArr[counter][2] != null) { %><%=strArr[counter][2]%><% } %>
<% }// end of else-outer %>
   At WorkBirthday
   Events & HolidaysEvery Day
  FamilyFlowers
  FriendshipKids
   LoveReligion
  SpecialsWedding

<% rSet = stmt.executeQuery("select * from csubcat where CMCat_Id ="+CMCat_Id+" ORDER BY CSCat_Des"); //reitializing the variable int totSize = 0; if (rSet != null) { while (rSet.next()){ totSize++; } } String desArr[] = new String[totSize]; int idArr[][] = new int[totSize][2]; rSet = stmt.executeQuery("select * from csubcat where CMCat_Id ="+CMCat_Id+" ORDER BY CSCat_Des"); counter =0; if (rSet != null) { while (rSet.next()){ desArr[counter] = rSet.getString("CSCat_Des"); idArr[counter][0] = rSet.getInt("CMCat_Id"); idArr[counter][1] = rSet.getInt("CSCat_Id"); counter++; } } %>
Check More Cards | <%=mainCat%>
<% if (totSize%2==0) { counter = 0; while (counter <% counter = counter+2; } }else { counter = 0; while (counter <% counter = counter+2; } %> <% } %>
<%=desArr[counter]%> <%=desArr[counter+1]%>
<%=desArr[counter]%> <%=desArr[counter+1]%>
<%=desArr[totSize-1]%>

 
 
 
 Home | e-Album | About Us | Disclaimer | Privacy Policy 
 

© 2001 Sentimentexpress.com
All Rights Reserved

<% stmt.close(); myConn.close(); %>