% strAdmin = Session("SbNuAdmin") strCheckAdmin = Mid(strAdmin, 6, 1) strDate = DateAdd("d", -1, Date) intPageSize = 25 intPage = Request.QueryString("page") If intPage = "" Then intPage = 1 If Request.Form("org") = "" Then strOrga = Request.QueryString("org") Else strOrga = Request.Form("org") End If If Request.Form("land") = "" Then strLand = Request.QueryString("country") Else strLand = Request.Form("land") End If %> <% Set RSShow = Server.CreateObject("ADODB.Recordset") If Request.QueryString("what") = "country" Then If Request.Form("land") = "falsk" Then Response.Redirect "default.asp" Else If strCheckAdmin = "1" Then Visa = "SELECT tblFair.*, tblCountry.EName AS CoName FROM tblFair INNER JOIN tblCountry ON tblFair.CountryID = tblCountry.ID WHERE tblFair.CountryID = " & strLand & " AND tblFair.Deleted = False ORDER BY tblFair.FairDate, tblFair.CountryID, tblFair.City" Else Visa = "SELECT tblFair.*, tblCountry.EName AS CoName FROM tblFair INNER JOIN tblCountry ON tblFair.CountryID = tblCountry.ID WHERE tblFair.FairDate > #" & strDate & "# AND tblFair.CountryID = " & strLand & " AND tblFair.Deleted = False ORDER BY tblFair.FairDate, tblFair.CountryID, tblFair.City" End If End If ElseIf Request.QueryString("what") = "org" Then If Request.Form("org") = "falsk" Then Response.Redirect "default.asp" Else If strCheckAdmin = "1" Then Visa = "SELECT tblFair.*, tblCountry.EName AS CoName FROM tblFair INNER JOIN tblCountry ON tblFair.CountryID = tblCountry.ID WHERE tblFair.OrgID = " & strOrga & " AND tblFair.Deleted = False ORDER BY tblFair.FairDate , tblFair.CountryID, tblFair.City" Else Visa = "SELECT tblFair.*, tblCountry.EName AS CoName FROM tblFair INNER JOIN tblCountry ON tblFair.CountryID = tblCountry.ID WHERE tblFair.FairDate > #" & strDate & "# AND tblFair.OrgID = " & strOrga & " AND tblFair.Deleted = False ORDER BY tblFair.FairDate , tblFair.CountryID, tblFair.City" End If End If ElseIf Request.QueryString("what") = "all" Or Request.QueryString("what") = "" Then If strCheckAdmin = "1" Then Visa = "SELECT tblFair.*, tblCountry.EName AS CoName FROM tblFair INNER JOIN tblCountry ON tblFair.CountryID = tblCountry.ID WHERE tblFair.Deleted = False ORDER BY tblFair.FairDate, tblFair.CountryID, tblFair.City" Else Visa = "SELECT tblFair.*, tblCountry.EName AS CoName FROM tblFair INNER JOIN tblCountry ON tblFair.CountryID = tblCountry.ID WHERE tblFair.FairDate > #" & strDate & "# AND tblFair.Deleted = False ORDER BY tblFair.FairDate, tblFair.CountryID, tblFair.City" End If ElseIf Request.QueryString("what") = "year" Then If strCheckAdmin = "1" Then Visa = "SELECT tblFair.*, tblCountry.EName AS CoName FROM tblFair INNER JOIN tblCountry ON tblFair.CountryID = tblCountry.ID WHERE Year(tblFair.FairDate) = " & Request.QueryString("info") & " AND tblFair.Deleted = False ORDER BY tblFair.FairDate, tblFair.CountryID, tblFair.City" Else Visa = "SELECT tblFair.*, tblCountry.EName AS CoName FROM tblFair INNER JOIN tblCountry ON tblFair.CountryID = tblCountry.ID WHERE tblFair.FairDate > #" & strDate & "# AND Year(tblFair.FairDate) = " & Request.QueryString("info") & " AND tblFair.Deleted = False ORDER BY tblFair.FairDate, tblFair.CountryID, tblFair.City" End If ElseIf Request.QueryString("what") = "checkdate" Then If strCheckAdmin = "1" Then Visa = "SELECT tblFair.*, tblCountry.EName AS CoName FROM tblFair INNER JOIN tblCountry ON tblFair.CountryID = tblCountry.ID WHERE tblFair.FairDate = #" & Request.QueryString("info") & "# AND tblFair.Deleted = False ORDER BY tblFair.FairDate, tblFair.CountryID, tblFair.City" Else Visa = "SELECT tblFair.*, tblCountry.EName AS CoName FROM tblFair INNER JOIN tblCountry ON tblFair.CountryID = tblCountry.ID WHERE tblFair.FairDate = #" & Request.QueryString("info") & "# AND tblFair.Deleted = False ORDER BY tblFair.FairDate, tblFair.CountryID, tblFair.City" End If End If With RSShow .ActiveConnection = Connect .Source = Visa .PageSize = intPageSize .CursorType = 3 .LockType = 1 .Open End With %>
<% If Request.QueryString("what") = "country" Then
Set RSCoun = Server.CreateObject("ADODB.Recordset")
ILand = "SELECT EName FROM tblCountry WHERE ID = " & strLand & " GROUP BY EName ORDER BY EName "
RSCoun.Open ILand, Connect, adOpenDynamic, adLockOptimistic %>
Showing Fairs in: <% =RSCoun("EName") %>
<% RSCoun.Close
ElseIf Request.QueryString("what") = "org" Then
If Not RSShow("OrgID") = "" Then
Set RSOrga = Server.CreateObject("ADODB.Recordset")
Orga = "SELECT * FROM tblFairOrg WHERE ID = " & strOrga & " "
RSOrga.Open Orga, Connect, adOpenDynamic, adLockOptimistic
Else
End If %>
Showing Fairs by: <% If Not RSShow("OrgID") = "" Then %><% =RSOrga("Name") %><% Else %>-<% End If %>
<% RSOrga.Close
ElseIf Request.QueryString("what") = "all" Or Request.QueryString("what") = "" Then %>
Showing All Fairs!
<% ElseIf Request.QueryString("what") = "year" Then %>
Showing Fairs during: <% =Request.QueryString("info") %>
<% ElseIf Request.QueryString("what") = "checkdate" Then %>
Showing Fairs during: <% =Request.QueryString("info") %>
<% End If %>
Information |
---|
The Fair is arranged in "><% =FormatStr(RSShow("City")) %>, <% =RSShow("CoName") %> ( <% =FormatStr(RSShow("Place")) %> ) On <% =RSShow("FairDate") %> Organizer: <% If Not RSShow("OrgID") = "" Then %>"><% =RSOrg("Name") %><% Else %>-<% End If %> |
<% Call PageNavigation(intPage, intTotalPages) Else %>
No Fairs found... |
---|