
Latest News
<%
'======================================================================
Function GetLastDay(theMonth, theYear)
' calculates the last day of a month
'======================================================================
' Get the month number
intMonthNum = theMonth
' Get the year number
intYearNum = theYear
' Start the "last day" of the month at 28
intResult = 28
' now we create the date for each day after 28 to see if it still falls within this month
For intLastDay = intResult To 31
'Response.Write "INTLASTDAY" & intResult & ": "
datTestDay = DateSerial(intYearNum, intMonthNum, intLastDay)
If CStr(Month(datTestDay)) = CStr(intMonthNum) Then
intResult = intLastDay
End If
Next
GetLastDay = intResult
End Function
'======================================================================
Function displayNews()
' generates the current news page
'======================================================================
intThisMonth = Month(Date())
intThisYear = Year(Date())
intLastDay = GetLastDay(intThisMonth, intThisYear)
strSearch = Request("newsSearch")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open dbODBCName, dbODBCUsername, dbODBCPassword
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT TOP 5 * FROM [" & dbTableName & "] WHERE "
If Request("newsID") <> "" Then
sql = sql & "[" & dbTableName & "].ID = " & Request("newsID") & " "
Else
strStartDate = "01 " & MonthName(DatePart("m", Date)) & " " & DatePart("yyyy", Date)
strEndDate = intLastDay & " " & MonthName(DatePart("m", Date)) & " " & DatePart("yyyy", Date)
sql = sql & "[" & dbTableName & "].[Date] >= '" & strStartDate & "' "
sql = sql & "AND [" & dbTableName & "].[Date] <= '" & strEndDate & "' "
sql = sql & "AND Allow = 1 "
End If
sql = sql & "ORDER BY [" & dbTableName & "].[ID] DESC"
rs.Open sql, conn, 3, 3
Response.Write ""
If rs.RecordCount > 0 Then
rs.MoveFirst
while Not rs.eof
Response.Write ""
Response.Write ""
If Request("newsID") = "" Then
Response.Write "· " & rs.Fields("Headline").Value & "
"
rs.MoveNext
Else
If Session("UserID") = rs("UserID") Or Session("IsAdministrator") = True Then
End If
If blnAllowFriends = True Then
End If
If (blnAllowFriends = True) Or (Session("UserID") = rs("UserID") Or Session("IsAdministrator") = True) Then
End If
rs.MoveNext
End If
Response.Write " | "
Wend
Else
End If
rs.Close
Set rs = nothing
conn.close
Set conn=nothing
Response.Write " "
End Function
Select Case newsAction
Case ""
Call displayNews()
End Select
%>
<% For HomepageLoop = 0 to uBound(arryHomepage,2) %>
<% If Len(arryHomepage(1,HomepageLoop)) = 0 then %>
<% Else %>
| <%=arryHomepage(1,HomepageLoop)%> |
<% End If %>
<% If Len(arryHomepage(10,HomepageLoop)) = 0 then %>
<% Else %>
<% End If %>
<%=arryHomepage(2,HomepageLoop)%> |
<% If Len(arryHomepage(3,HomepageLoop)) = 0 then %>
<% Else %>
<% End If %>
<% If Len(arryHomepage(4,HomepageLoop)) = 0 then %>
%>)
|
<% Else %>
%>)
|
<% End If %>
<% If Len(arryHomepage(5,HomepageLoop)) = 0 then %>
<% Else %>
<% End If %>
<% If Len(arryHomepage(6,HomepageLoop)) = 0 then %>
%>)
|
<% Else %>
%>)
|
<% End If %>
|
|
<% If Len(arryHomepage(7,HomepageLoop)) = 0 OR Len(arryHomepage(8,HomepageLoop)) = 0 then %>
<% Else %>
RV PRICE FOR
2009/10 SEASON
|
<%=arryHomepage(7,HomepageLoop)%>
|
<%=arryHomepage(8,HomepageLoop)%>
|
<% End If %>
<% If Len(arryHomepage(9,HomepageLoop)) = 0 then %>
<% Else %>
| R/$ <%=arryHomepage(9,HomepageLoop)%> |
<% End If %>
|
SPOT PRICES
|
<% Next %>
Disclaimer
Grocane accepts no liability of whatsoever nature for any loss, liability,
damage or expense resulting directly or indirectly from the use of any information on this website.
|