<%@ page language="java" import="java.sql.*" errorPage="error.jsp"%> <%session.putValue("nextPage",request.getRequestURI().trim()+"?"+((request.getQueryString()!=null)?request.getQueryString():""));%> My Enquiries
<%if(shpp != null) {%>
<% String SQL=null; String SQL1=null; int SFE_ReceivedEnqToday = 0, SFE_ReceivedEnqWeek = 0, SFE_ReceivedEnqMonth = 0, SFE_ReceivedEnqALL = 0; int ReceivedEnqToday = 0, ReceivedEnqWeek = 0, ReceivedEnqMonth = 0, ReceivedEnqALL = 0; String SentEnqToday = null, SentEnqWeek = null, SentEnqMonth = null, SentEnqALL = 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 EmpEnquiry, Product where Date(ENQUIREDON)>'09-01-2004' and Product=PRRFNBR and (MfrPub is null or Ltrim(Rtrim(MfrPub))='') and Merchant="+shpp+" and Date(EnquiredOn)=Current Date"+") UNION ALL"; SQL = SQL+"("+"(select count(*) from EmpEnquiry where Date(ENQUIREDON)>'09-01-2004' and (MfrPub is null or Ltrim(Rtrim(MfrPub))='') and Merchant="+shpp+" and Date(EnquiredOn) between (Current Date - 6 days) and Current Date)"+") UNION ALL"; SQL = SQL+"("+"select count(*) from EmpEnquiry where Date(ENQUIREDON)>'09-01-2004' and (MfrPub is null or Ltrim(Rtrim(MfrPub))='') and Merchant="+shpp+" and Date(EnquiredOn) between (Current Date - 29 days) and Current Date"+") UNION ALL"; SQL = SQL+"("+"select count(*) from EmpEnquiry where Date(ENQUIREDON)>'09-01-2004' and (MfrPub is null or Ltrim(Rtrim(MfrPub))='') and Merchant="+shpp+") UNION ALL"; SQL = SQL+"("+"select count(*) from EmpEnquiry, Product where Date(ENQUIREDON)>'09-01-2004' and Product=PRRFNBR and (PRSPECIAL is null or Ltrim(Rtrim(PRSPECIAL))='' ) and (UsrPub is null or Ltrim(Rtrim(UsrPub))='') and Shopper="+shpp+" and Date(EnquiredOn)=Current Date"+") UNION ALL"; SQL = SQL+"("+"select count(*) from EmpEnquiry, Product where Date(ENQUIREDON)>'09-01-2004' and Product=PRRFNBR and (PRSPECIAL is null or Ltrim(Rtrim(PRSPECIAL))='' ) and (UsrPub is null or Ltrim(Rtrim(UsrPub))='') and Shopper="+shpp+" and Date(EnquiredOn) between (Current Date - 6 days) and Current Date"+") UNION ALL"; SQL = SQL+"("+"select count(*) from EmpEnquiry, Product where Date(ENQUIREDON)>'09-01-2004' and Product=PRRFNBR and (PRSPECIAL is null or Ltrim(Rtrim(PRSPECIAL))='' ) and (UsrPub is null or Ltrim(Rtrim(UsrPub))='') and Shopper="+shpp+" and Date(EnquiredOn) between (Current Date - 29 days) and Current Date"+") UNION ALL"; SQL = SQL+"("+"select count(*) from EmpEnquiry, Product where Date(ENQUIREDON)>'09-01-2004' and Product=PRRFNBR and (PRSPECIAL is null or Ltrim(Rtrim(PRSPECIAL))='' ) and (UsrPub is null or Ltrim(Rtrim(UsrPub))='') and Shopper="+shpp+")"; rs=stmt.executeQuery(SQL); while (rs.next()) { if (i==1){ReceivedEnqToday = rs.getInt(1);} if (i==2){ReceivedEnqWeek = rs.getInt(1);} if (i==3){ReceivedEnqMonth = rs.getInt(1);} if (i==4){ReceivedEnqALL=rs.getInt(1);} if (i==5){SentEnqToday = rs.getString(1);} if (i==6){SentEnqWeek = rs.getString(1);} if (i==7){SentEnqMonth = rs.getString(1);} if (i==8){SentEnqALL=rs.getString(1);} i++;} SQL1 = "("+"select count(*) from StorefrontEnquiry, Product where Date(PostingDate)>'09-01-2004' and (SFEFIELD1 is null or Ltrim(Rtrim(SFEFIELD1))='') and ProductNumber=Prrfnbr and Prmenbr="+shpp+" and Date(PostingDate)=Current Date"+") UNION ALL"; SQL1 = SQL1+"("+"(select count(*) from StorefrontEnquiry, Product where Date(PostingDate)>'09-01-2004' and (SFEFIELD1 is null or Ltrim(Rtrim(SFEFIELD1))='') and ProductNumber=Prrfnbr and Prmenbr="+shpp+" and Date(PostingDate) between (Current Date - 6 days) and Current Date)"+") UNION ALL"; SQL1 = SQL1+"("+"select count(*) from StorefrontEnquiry, Product where Date(PostingDate)>'09-01-2004' and (SFEFIELD1 is null or Ltrim(Rtrim(SFEFIELD1))='') and ProductNumber=Prrfnbr and Prmenbr="+shpp+" and Date(PostingDate) between (Current Date - 29 days) and Current Date"+") UNION ALL"; SQL1 = SQL1+"("+"select count(*) from StorefrontEnquiry, Product where Date(PostingDate)>'09-01-2004' and (SFEFIELD1 is null or Ltrim(Rtrim(SFEFIELD1))='') and ProductNumber=Prrfnbr and Prmenbr="+shpp+")"; i=1; rs=stmt.executeQuery(SQL1); while (rs.next()) { if (i==1){SFE_ReceivedEnqToday = rs.getInt(1);} if (i==2){SFE_ReceivedEnqWeek = rs.getInt(1);} if (i==3){SFE_ReceivedEnqMonth = rs.getInt(1);} if (i==4){SFE_ReceivedEnqALL=rs.getInt(1);} i++;} ReceivedEnqToday = ReceivedEnqToday + SFE_ReceivedEnqToday; ReceivedEnqWeek = ReceivedEnqWeek + SFE_ReceivedEnqWeek; ReceivedEnqMonth = ReceivedEnqMonth + SFE_ReceivedEnqMonth; ReceivedEnqALL = ReceivedEnqALL + SFE_ReceivedEnqALL; 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 Enquiries
 
All the Trade Enquiries Received/Sent by you, originating from www.ipfonline.com, is displayed in this section for your convenience. What’s more! You can organize your enquiries and send reminders to enquiries already sent, for which you have not received any reply.
 
My Enquiries - Received
 
Today (<%=ReceivedEnqToday%>)
Last 7 days (<%=ReceivedEnqWeek%>)
Last 30 days (<%=ReceivedEnqMonth%>)
All (<%=ReceivedEnqALL%>)
 
My Enquiries - Sent
 
Today (<%=SentEnqToday%>)
Last 7 days (<%=SentEnqWeek%>)
Last 30 days (<%=SentEnqMonth%>)
All (<%=SentEnqALL%>)
 
 
<% } else {response.sendRedirect("/Error/Authenticate.jsp");} %>