<% '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) = "View Space" 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 SpaceId,Description FROM SpaceMaster ORDER BY Description ASC " %>
Space
">
Available for Booking
" 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 a.SpaceId,a.Description aa,a.AvailforBook from SpaceMaster a" '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 a.SpaceId like '"& chspa &"' and a.AvailForBook like '"& chActive & "'" 'Response.Write strselect 'Response.End 'end if strselect=strselect & " order by aa" '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 "Yes" else if chCodeActive="N" then Response.Write "No" 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("AvailforBook"))="Y" then ClassVal="Yes" else ClassVal="No" end if %> <% strSpace=rsselect("aa") iRowCount = iRowCount + 1 rsselect.MoveNext maxpagerecs=cint(maxpagerecs) + 1 if rsselect.EOF then Exit Do Loop %> <% else %> <%end if%>
Space
Exhibitor Category
Available
Action
<%=trim(rsselect("aa"))%>  
<% strSpaceCat="" strselect = "Select c.Description bb from SpaceMaster a, SpaceAvailToDetails b,AvailableToCatgMaster c where a.SpaceId=b.SpaceId and b.CategoryId=c.CategoryId and a.spaceid=" & rsselect("spaceid") set rsSpaceCat=objconn.execute(strselect) do while not (rsSpaceCat.eof or rsSpaceCat.bof) strSpaceCat=strSpaceCat & rsspacecat("bb") & ", " rsspacecat.movenext loop set rsSpaceCat=nothing if len(strSpaceCat)>0 then strspacecate=mid(strSpaceCat,1,len(strSpaceCat)- 2) %> <%=trim(strSpaceCat)%>  
<%=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 %>