<%@language=vbscript%> <% dim strpagecode strpagecode= "4EXIS03" %> <% Response.ExpiresAbsolute= date -1 'code for Recordset Paging Dim maxpages Dim maxrecs Dim iCurrentPage if Request.QueryString("page")="" then iCurrentPage = 1 else iCurrentPage = cint(Request("page")) end if 'Processing of single quote function changequotes(inputstr) changequotes= replace(inputstr,"'","''") changequotes=trim(changequotes) end function if trim(request("blnHiddendelete"))<>"" and isnumeric(trim(request("blnHiddendelete"))) then objconn.execute "Delete from Exhib_Inquiry where InquiryNo=" & trim(request("blnHiddendelete")) 'Response.Write "Delete from Exhib_Inquiry where InquiryNo=" & trim(request("blnHiddendelete")) end if %> <% 'Page/form name: Inquiry_search_criteria.asp 'Purpose :Inquiry Search 'Date Modified: 20-Sep-2001 'Modified by :Ashish Bansal %> Inquiry Search-<%=Application("Title")%>
 
">
Home > Exhibition Centre> Inquiry Search  
Search Inquiry
Name (Company/Individual)
">
Date From
(dd/mm/yyyy)
">
Date To
(dd/mm/yyyy)
">
Status


<%' if request("blnSearched")="Y" then dim strSearchCriterion if trim(request("txtCompName"))="" then strSearchCriterion=" duration " & request("FromDate") & " - " & request("ToDate") else strSearchCriterion=" Company '" & trim(request("txtCompName")) & "' and duration " & request("FromDate") & "-" & request("ToDate") end if %> <% dim rsInquiry,strSqlInquiry set rsInquiry=server.CreateObject("adodb.recordset") if trim(request("txtCompName"))="" and trim(request("FromDate"))="" and trim(request("ToDate"))="" then strSqlInquiry="select inquiryno,company_name,Replied,convert(char(10),createdate,103) as createdate from exhib_Inquiry" strSearchCriterion=" All Inquiries" elseif trim(request("txtCompName"))="" and trim(request("FromDate"))<>"" and trim(request("ToDate"))="" then strSqlInquiry="select inquiryno,company_name,Replied,convert(char(10),createdate,103) as createdate from exhib_Inquiry where convert(char(10),createdate,103)>='" & request("FromDate") & "' " strSearchCriterion=" All Inquiries after Date " & request("FromDate") elseif trim(request("txtCompName"))="" and trim(request("FromDate"))="" and trim(request("ToDate"))<>"" then strSqlInquiry="select inquiryno,company_name,Replied,convert(char(10),createdate,103) as createdate from exhib_Inquiry where convert(char(10),createdate,103)<='" & request("ToDate") & "' " strSearchCriterion="All Inquiries before Date " & request("ToDate") elseif trim(request("txtCompName"))="" and trim(request("FromDate"))<>"" and trim(request("ToDate"))<>"" then strSqlInquiry="select inquiryno,company_name,Replied,convert(char(10),createdate,103) as createdate from exhib_Inquiry where convert(char(10),createdate,103)>='" & request("FromDate") & "' and convert(char(10),createdate,103)<='" & request("ToDate") & "' " strSearchCriterion=" duration " & request("FromDate") & " - " & request("ToDate") elseif trim(request("txtCompName"))<>"" and trim(request("FromDate"))="" and trim(request("ToDate"))="" then strSqlInquiry="select inquiryno,company_name,Replied,convert(char(10),createdate,103) as createdate from exhib_Inquiry where Company_Name like '%" & trim(changequotes(request("txtCompName"))) & "%' " strSearchCriterion=" All Inquiries having Company '" & trim(request("txtCompName")) & "'" elseif trim(request("txtCompName"))<>"" and trim(request("FromDate"))<>"" and trim(request("ToDate"))="" then strSqlInquiry="select inquiryno,company_name,Replied,convert(char(10),createdate,103) as createdate from exhib_Inquiry where Company_Name like '%" & trim(changequotes(request("txtCompName"))) & "%' convert(char(10),createdate,103)>='" & request("FromDate") & "'" strSearchCriterion=" All Inquiries having Company '" & trim(request("txtCompName")) & "' and After Date " & request("FromDate") elseif trim(request("txtCompName"))<>"" and trim(request("FromDate"))="" and trim(request("ToDate"))<>"" then strSqlInquiry="select inquiryno,company_name,Replied,convert(char(10),createdate,103) as createdate from exhib_Inquiry where Company_Name like '%" & trim(changequotes(request("txtCompName"))) & "%' and convert(char(10),createdate,103)<='" & request("ToDate") & "' " strSearchCriterion=" All Inquiries having Company '" & trim(request("txtCompName")) & "' and Before Date " & request("ToDate") elseif trim(request("txtCompName"))<>"" and trim(request("FromDate"))<>"" and trim(request("ToDate"))<>"" then strSqlInquiry= "select inquiryno,company_name,Replied,convert(char(10),createdate,103) as createdate from exhib_Inquiry where Company_Name like '%" & trim(changequotes(request("txtCompName"))) & "%' and convert(char(10),createdate,103)>='" & request("FromDate") & "' and convert(char(10),createdate,103)<='" & request("ToDate") & "' " strSearchCriterion=" Company '" & trim(request("txtCompName")) & "' and duration " & request("FromDate") & "-" & request("ToDate") end if if trim(request("selReplied"))="N" then if trim(request("txtCompName"))="" and trim(request("FromDate"))="" and trim(request("ToDate"))="" then strSqlInquiry=strSqlInquiry & " where Replied='N' order by Company_Name" else strSqlInquiry=strSqlInquiry & " and Replied='N' order by Company_Name" end if strSearchCriterion=strSearchCriterion & ", Not Replied" elseif trim(request("selReplied"))="Y" then if trim(request("txtCompName"))="" and trim(request("FromDate"))="" and trim(request("ToDate"))="" then strSqlInquiry=strSqlInquiry & " where Replied='Y' order by Company_Name" else strSqlInquiry=strSqlInquiry & " and Replied='Y' order by Company_Name" end if strSearchCriterion=strSearchCriterion & ", Replied" else strSqlInquiry=strSqlInquiry & " order by Company_Name" end if rsInquiry.Open strSqlInquiry, objconn,adOpenStatic, adLockOptimistic dim rcount rcount=rsInquiry.RecordCount 'Response.Write rcount 'Response.Write "select * from exhib_Inquiry where Company_Name like '%" & trim(changequotes(request("txtCompName"))) & "%' and convert(char(10),createdate,103)>'" & request("FromDate") & "' and convert(char(10),createdate,103)<'" & request("ToDate") & "' order by company_Name" 'Response.End dim StartRecNo dim EndRecNo StartRecNo = 0 EndRecNo = 0 ReturnRecNumbers iCurrentPage, StartRecNo, EndRecNo, rCount if not (rsInquiry.EOF or rsInquiry.BOF) then rsInquiry.MoveFirst rsInquiry.PageSize = application("numrecords") rsInquiry.CacheSize = application("numrecords") 'set rspag=nothing rsInquiry.AbsolutePage = Cint(iCurrentPage) maxpages = Cint(rsInquiry.Pagecount) maxrecs = Cint(rsInquiry.Pagesize) %> <%if rcount>0 then%> <%else%> <%end if%>
<%=StartRecNo%> to <%=EndRecNo%> of <%=rCount%> Matching Records 0 Matching Records
<%Dim maxpagerecs maxpagerecs=0 do while not rsInquiry.EOF and (cint(maxpagerecs) < cint(maxrecs)) %> <% maxpagerecs=cint(maxpagerecs) + 1 rsInquiry.MoveNext loop%> <% rsInquiry.Close set rsInquiry=nothing else%> <%if rcount>0 then%> <%else%> <%end if%> <%'end if%>
Search Results for <%=strSearchCriterion%>
Name Inquiry Date Replied Action
<%=rsInquiry("Company_Name")%>
<% if not isnull(rsInquiry("Replied")) then if trim(rsInquiry("Replied"))="N" then Response.Write "No" else Response.Write "Yes" end if else Response.Write "N/A" end if %>
"> Reply / &blnHiddendelete=<%=rsInquiry("InquiryNo")%>&txtCompName=<%=request("txtCompName")%>&FromDate=<%=request("FromDate")%>&ToDate=<%=request("ToDate")%>&selReplied=<%=request("selReplied")%>" onclick="return ConfirmDelete('<%=rsInquiry("InquiryNo")%>')"> Delete
<% dim strlnk if cint(maxpages) > 1 then if cint(iCurrentPage) >1 then%> &txtCompName=<%=request("txtCompName")%>&FromDate=<%=request("FromDate")%>&ToDate=<%=request("ToDate")%>"><<Prev   <%end if Dim Counter if iCurrentPage > 10 then if iCurrentPage mod 10 = 0 then Counter=(iCurrentPage - 10) +1 else Counter=(iCurrentPage - (iCurrentPage mod 10)) +1 end if else Counter =1 end if For cnt = 1 to 10 if counter <= maxpages then if counter <> CInt(iCurrentPage) Then %> &txtCompName=<%=request("txtCompName")%>&FromDate=<%=request("FromDate")%>&ToDate=<%=request("ToDate")%>"><%=counter%> <%Else%> <%=counter%> <%End if Counter=Counter + 1 else exit for end if Next if cint(iCurrentPage) < cint(maxpages) then%> &txtCompName=<%=request("txtCompName")%>&FromDate=<%=request("FromDate")%>&ToDate=<%=request("ToDate")%>">Next>>   <%end if end if%>
<%=StartRecNo%> to <%=EndRecNo%> of <%=rCount%> Matching Records
0 Matching Records
Search Results for <%=strSearchCriterion%>
<%end if%>
Company Name Inquiry Date Replied Action
No Inquiry Found
 
<% 'this procedure returns Start and End Record no. of the 'selected page. sub ReturnRecNumbers(lintPageNo, lStartRecNo, lEndRecNo, tot_recs) lEndRecNo = lintPageNo * Application("numrecords") lStartRecNo = (lEndRecNo - Application("numrecords")) + 1 if lEndRecNo >= tot_recs then lEndRecNo = tot_recs end if end sub %> <% set rsProdCategory=nothing %>