<%@ Language="VBScript"%> <% option explicit %> <%thispage="updatehaylistinglist.asp"%> Pasture Listings

  Current Pasture Listings

You may select options in the categories below to filter the listings.

<% flag = request("flag") if flag = "" then flag = 0 end if Select Case flag Case 0 sqltext3 = "islive = 1" Case 1 ' haytypeid = request("haytypeid") countyid = request("countyid") ' packagetypeid = request("packagetypeid") need = request("need") ' if haytypeid = "" then ' sqltextA = "" ' else sqltextA = " and haytypeid in (" & haytypeid & ")" ' end if if countyid = "" then sqltextB = "" else sqltextB = " and countyid in (" & countyid & ")" end if ' if packagetypeid = "" then ' sqltextC = "" ' else sqltextC = " and packagetypeid in (" & packagetypeid & ")" ' end if if need = "" then sqltextD = "" else sqltextD = " and need = '" & need & "'" end if sqltext3 = "islive = 1" & sqltextB & sqltextD ' response.write sqltext3 'liveFlag = request("liveFlag") ' if liveFlag = "" then ' liveFlag = 0 ' end if ' haylistingid = Request("haylistingid") 'Select Case liveFlag ' Case 0 ' Case 1 ' islive = request("islive") ' if islive = "1" then ' islive = "0" ' else ' if islive = "0" then ' islive = "1" ' end if ' end if ' insertentry = "islive = '" & islive & "'" 'sqltext = "update tblhaylisting set " & insertentry & " where haylistingid = '" & haylistingid & "'" ' response.write sqltext 'set RSnews = sqlnews.execute(sqltext) End Select ' sqltextE = "select * from tblhaylisttype order by haytype" ' RSnews3.Open sqltextE, sqlnews 'sqltext2 = "select count(*) as cnting from tblhaylisting where (haytypeid = " & RSnews3("haytypeid") & ")" ' RSnews2.Open sqltext2, sqlnews2 ' if not RSnews2.eof and not RSnews2.bof then ' haycnting = RSnews2("cnting") ' else ' haycnting = "0" ' end if ' RSnews2.close ' response.write haycnting %>

County Filter

<% dim counter, myCIArray myCIArray = Split(countyid,",") sqltext = "select * from tblcounty order by county" myCount = 1 set RSnews = sqlnews.execute(sqltext) if not RSnews.eof and not RSnews.bof then do while not RSnews.eof sqltext2 = "select count(*) as cnting from tblpasturelisting where (countyid = '" & RSnews("countyid") & "') and (islive = '1')" RSnews2.Open sqltext2, sqlnews2 if not RSnews2.eof and not RSnews2.bof then haycnting = RSnews2("cnting") else haycnting = "0" end if RSnews2.close response.write "" ' else if islive = "0" then ' response.Write "" else response.Write " (" & haycnting & ")" end if 'end if myCount = myCount + 1 RSnews.movenext loop end if RSnews.close %>

 

Pasture Needed or
Pasture Available

> Available
> Needed



 

Click on any listing below or select multiple listings to view details.
<% sqltext = "select * from tblpasturelisting where " & sqltext3 & " order by pastureid" RSnews.Open sqltext, sqlnews if not RSnews.eof and not RSnews.bof then %> <% Do While Not RSnews.EOF myCount = 1 'added if rowcolor = 1 then response.write "" else response.write "" end if ' Started adding here Response.write "" ' Stopped here Response.write "" Response.write "" Response.write "" Response.write "" response.Write "" if rowcolor = 1 then rowcolor = 0 else rowcolor = 1 end if myCount = myCount + 1 RSnews.MoveNext Loop else response.Write "

Pasture type

County

City of
Listing

  Available /
  Needed

" response.write "

  " sqltext2 = "select * from tblcounty where countyid = '" & RSnews("countyid") & "'" Response.write cleantext(trim(RSnews("pasturetype"))) Response.write "  

  " ' sqltext2 = "select * from tblpackagetype where packagetypeid = '" & RSnews("packagetypeid") & "'" ' RSnews2.Open sqltext2, sqlnews2 ' if not RSnews2.eof and not RSnews2.bof then RSnews2.Open sqltext2, sqlnews2 if not RSnews2.eof and not RSnews2.bof then Response.write cleantext(trim(RSnews2("county"))) end if RSnews2.close ' end if ' RSnews2.close Response.write "  

  " ' sqltext2 = "select * from tblpackagetype where packagetypeid = '" & RSnews("packagetypeid") & "'" ' RSnews2.Open sqltext2, sqlnews2 ' if not RSnews2.eof and not RSnews2.bof then Response.write cleantext(trim(RSnews("lcity"))) ' end if ' RSnews2.close Response.write "  

  " if RSnews("need") = "A" then response.Write "Available" else response.Write "Needed" end if Response.write "

" response.Write "" end if RSnews.close ' RSnews3.close %>

There are no pasture listings.

 
<% if request("msg") = "1" then response.Write "

  You must make at least one selection.

" end if %>

 

<% call closedb %>