%@ page language="java" import="java.sql.*" errorPage="error.jsp"%>
<%session.putValue("nextPage",request.getRequestURI().trim()+"?"+((request.getQueryString()!=null)?request.getQueryString():""));%>
Clippings Index
<%if(shpp != null) {%>
<%
String SQL=null;
String ClippingsToday = null, ClippingsWeek = null, ClippingsMonth = null, ClippingsALL = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
int i=1;
try {
con = com.ipf.global.app.IPFDBUtils.getConnection();
stmt = con.createStatement();
SQL = "("+"select count(*) from Clippings where Upper(ClipPub)='S' and ClipShopper="+shpp+" and Date(ClipDate)=Current Date"+") UNION ALL";
SQL = SQL+"("+"select count(*) from Clippings where Upper(ClipPub)='S' and ClipShopper="+shpp+" and Date(ClipDate) between (Current Date - 6 days) and Current Date"+") UNION ALL";
SQL = SQL+"("+"select count(*) from Clippings where Upper(ClipPub)='S' and ClipShopper="+shpp+" and Date(ClipDate) between (Current Date - 29 days) and Current Date"+") UNION ALL";
SQL = SQL+"("+"select count(*) from Clippings where Upper(ClipPub)='S' and ClipShopper="+shpp+")";
rs=stmt.executeQuery(SQL);
while (rs.next()) {
if (i==1){ClippingsToday = rs.getString(1);}
if (i==2){ClippingsWeek = rs.getString(1);}
if (i==3){ClippingsMonth = rs.getString(1);}
if (i==4){ClippingsALL=rs.getString(1);}
i++;}
if (rs != null) {rs.close();}
if (stmt != null) {stmt.close();}
if (con != null) {con.close();}
} catch(Exception e){
if (rs != null) {rs.close();}
if (stmt != null) {stmt.close();}
if (con != null) {con.close();}%> <%=e%> <%
} %>
| |
 | My Clippings |
|
| |
|
|
|
|
<%
} else {response.sendRedirect("/Error/Authenticate.jsp");}
%>