<% 'Page/form name: Space_qry.asp 'Purpose : Display the Space 'Date : 17/07/2003 'Author : Himanshu Nigam dim strpagecode strpagecode= "FAIRG05" session("usertype")="SUS" %> Space Query - <%=Application("title")%>
<%if rcount>rsselect.PageSize then%> <%end if%>
<% dim NavigArray() Redim NavigArray(1,0) NavigArray(0,0) = "/fairregistration/admin/" NavigArray(1,0) = DIRECTORY_NAME Redim Preserve NavigArray(1,1) NavigArray(0,1) = RELATIVE_PATH NavigArray(1,1) = "Search Category" Proc_TO_Display_NavigationPath NavigArray, "A" %>
Search Space
<%dim rsspace set rsspace=server.CreateObject("ADODB.Recordset") rsspace.ActiveConnection=objConn rsspace.CursorType=1 rsspace.Open "SELECT CategoryId,Description, IsIndian FROM AvailableTocatgMaster ORDER BY Description ASC " %>
Description
">
Indian / Overseas
" ID="Hidden2"> " ID="Hidden3">
<%dim strselect, rsselect 'strselect = "Select a.SpaceId,a.Description aa,a.AvailforBook,c.Description bb from SpaceMaster a, SpaceAvailToDetails b,AvailableToCatgMaster c where a.SpaceId=b.SpaceId and b.CategoryId=c.CategoryId " strselect = "Select CategoryId,Description ,IsIndian from AvailableToCatgMaster " 'if Request("hdCustomerSearch")="Y" then dim chspa, chActive if Request("txtspace")="NA" or Request("txtspace")="" then chspa="%" else chspa=Replace(Request("txtspace"),"'","''") end if if Request("txtactive")="ALL" or Request("txtactive")="" then chActive="%" else chActive=Request("txtactive") end if strselect =strselect & " where CategoryId like '"& chspa &"' and IsIndian like '"& chActive & "'" 'Response.Write strselect 'Response.End 'end if strselect=strselect & " order by Description" 'set rsselect=objconn.execute(strselect) set rsselect=Server.CreateObject("ADODB.Recordset") SetRecordset rsselect, strselect dim maxrecs maxrecs=0 dim maxpages maxpages = Cint(rsselect.Pagecount) maxrecs = Cint(rsselect.Pagesize) if ((maxpages>0) and (cint(intPageno)>cint(maxpages) or cint(intpageNo)<=0)) then Response.redirect "/config/inc/error.asp" Response.end end if %>
<%if rsselect.RecordCount > 0 then %> <%=StartRecNo%> to <%=EndRecNo%> of <%=totalrecords%> Matching Records <%Else%> 0 Matching Records <%End if %>
Search Results For : <% if chspa="%" then Response.write "All, " else response.write "'" & request("hdcustname") & "', " if chActive="Y" then Response.write "Indian" else if chActive="N" then Response.Write "Overseas" else Response.Write "All" %>
<% dim iRowCount, ClassVal dim strSpace,strCategory dim rsSpaceCat dim strSpaceCat if not(rsselect.EOF and rsselect.BOF) then Do While NOT (rsselect.EOF and rsselect.BOF) and (cint(maxpagerecs) < cint(maxrecs)) %> <% if trim(rsselect("IsIndian"))="Y" then ClassVal="Indian" else ClassVal="Overseas" end if %> <% iRowCount = iRowCount + 1 rsselect.MoveNext maxpagerecs=cint(maxpagerecs) + 1 if rsselect.EOF then Exit Do Loop %> <% else %> <%end if%>
Description
IsIndian
Action
<%=trim(rsselect("Description"))%>  
<%=ClassVal%> 
No Records Found.
<%%>
<% '--Pagination code--' pagination rsselect.PageCount,pagestring, "frmsearch1" %>
<%'dim pagestring if err<>0 then Response.Redirect "/config/inc/error.asp?errtype=err_record§ion=" & SectionName Response.end end if %>

 

 

<% rsspace.Close set rsspace=nothing rsselect.Close set rsselect=nothing %>