%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim rsDistNews
Dim rsDistNews_cmd
Dim rsDistNews_numRows
Set rsDistNews_cmd = Server.CreateObject ("ADODB.Command")
rsDistNews_cmd.ActiveConnection = MM_connSQLNews_STRING
rsDistNews_cmd.CommandText = "SELECT * FROM dbo.Non_Emergency_News ORDER BY ID DESC"
rsDistNews_cmd.Prepared = true
Set rsDistNews = rsDistNews_cmd.Execute
rsDistNews_numRows = 0
%>
<%
Dim rsSVHSNews
Dim rsSVHSNews_cmd
Dim rsSVHSNews_numRows
Set rsSVHSNews_cmd = Server.CreateObject ("ADODB.Command")
rsSVHSNews_cmd.ActiveConnection = MM_connDistrictWeb_STRING
rsSVHSNews_cmd.CommandText = "SELECT * FROM dbo.SVHS_News WHERE Active = '1' ORDER BY ID DESC"
rsSVHSNews_cmd.Prepared = true
Set rsSVHSNews = rsSVHSNews_cmd.Execute
rsSVHSNews_numRows = 0
%>
<%
Dim rsAthScores
Dim rsAthScores_cmd
Dim rsAthScores_numRows
Set rsAthScores_cmd = Server.CreateObject ("ADODB.Command")
rsAthScores_cmd.ActiveConnection = MM_connDistrictWeb_STRING
rsAthScores_cmd.CommandText = "SELECT * FROM dbo.SVHS_Athletic_Scores ORDER BY ID DESC"
rsAthScores_cmd.Prepared = true
Set rsAthScores = rsAthScores_cmd.Execute
rsAthScores_numRows = 0
%>
<%
Dim rsEmerNews
Dim rsEmerNews_cmd
Dim rsEmerNews_numRows
Set rsEmerNews_cmd = Server.CreateObject ("ADODB.Command")
rsEmerNews_cmd.ActiveConnection = MM_connEmergencyNews_STRING
rsEmerNews_cmd.CommandText = "SELECT * FROM dbo.News WHERE Active = '1'"
rsEmerNews_cmd.Prepared = true
Set rsEmerNews = rsEmerNews_cmd.Execute
rsEmerNews_numRows = 0
%>
<%
Dim rsPhoto
Dim rsPhoto_cmd
Dim rsPhoto_numRows
Set rsPhoto_cmd = Server.CreateObject ("ADODB.Command")
rsPhoto_cmd.ActiveConnection = MM_connDistrictWeb_STRING
rsPhoto_cmd.CommandText = "SELECT * FROM dbo.SVHS_Phtos"
rsPhoto_cmd.Prepared = true
Set rsPhoto = rsPhoto_cmd.Execute
rsPhoto_numRows = 0
%>
<%
Dim rsCount
Dim rsCount_cmd
Dim rsCount_numRows
Set rsCount_cmd = Server.CreateObject ("ADODB.Command")
rsCount_cmd.ActiveConnection = MM_connDistrictWeb_STRING
rsCount_cmd.CommandText = "SELECT COUNT(Photo_Name) AS COUNT FROM dbo.SVHS_Phtos "
rsCount_cmd.Prepared = true
Set rsCount = rsCount_cmd.Execute
rsCount_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 5
Repeat1__index = 0
rsDistNews_numRows = rsDistNews_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim rsPhoto_total
Dim rsPhoto_first
Dim rsPhoto_last
' set the record count
rsPhoto_total = rsPhoto.RecordCount
' set the number of rows displayed on this page
If (rsPhoto_numRows < 0) Then
rsPhoto_numRows = rsPhoto_total
Elseif (rsPhoto_numRows = 0) Then
rsPhoto_numRows = 1
End If
' set the first and last displayed record
rsPhoto_first = 1
rsPhoto_last = rsPhoto_first + rsPhoto_numRows - 1
' if we have the correct record count, check the other stats
If (rsPhoto_total <> -1) Then
If (rsPhoto_first > rsPhoto_total) Then
rsPhoto_first = rsPhoto_total
End If
If (rsPhoto_last > rsPhoto_total) Then
rsPhoto_last = rsPhoto_total
End If
If (rsPhoto_numRows > rsPhoto_total) Then
rsPhoto_numRows = rsPhoto_total
End If
End If
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim rsCount_total
Dim rsCount_first
Dim rsCount_last
' set the record count
rsCount_total = rsCount.RecordCount
' set the number of rows displayed on this page
If (rsCount_numRows < 0) Then
rsCount_numRows = rsCount_total
Elseif (rsCount_numRows = 0) Then
rsCount_numRows = 1
End If
' set the first and last displayed record
rsCount_first = 1
rsCount_last = rsCount_first + rsCount_numRows - 1
' if we have the correct record count, check the other stats
If (rsCount_total <> -1) Then
If (rsCount_first > rsCount_total) Then
rsCount_first = rsCount_total
End If
If (rsCount_last > rsCount_total) Then
rsCount_last = rsCount_total
End If
If (rsCount_numRows > rsCount_total) Then
rsCount_numRows = rsCount_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (rsPhoto_total = -1) Then
' count the total records by iterating through the recordset
rsPhoto_total=0
While (Not rsPhoto.EOF)
rsPhoto_total = rsPhoto_total + 1
rsPhoto.MoveNext
Wend
' reset the cursor to the beginning
If (rsPhoto.CursorType > 0) Then
rsPhoto.MoveFirst
Else
rsPhoto.Requery
End If
' set the number of rows displayed on this page
If (rsPhoto_numRows < 0 Or rsPhoto_numRows > rsPhoto_total) Then
rsPhoto_numRows = rsPhoto_total
End If
' set the first and last displayed record
rsPhoto_first = 1
rsPhoto_last = rsPhoto_first + rsPhoto_numRows - 1
If (rsPhoto_first > rsPhoto_total) Then
rsPhoto_first = rsPhoto_total
End If
If (rsPhoto_last > rsPhoto_total) Then
rsPhoto_last = rsPhoto_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (rsCount_total = -1) Then
' count the total records by iterating through the recordset
rsCount_total=0
While (Not rsCount.EOF)
rsCount_total = rsCount_total + 1
rsCount.MoveNext
Wend
' reset the cursor to the beginning
If (rsCount.CursorType > 0) Then
rsCount.MoveFirst
Else
rsCount.Requery
End If
' set the number of rows displayed on this page
If (rsCount_numRows < 0 Or rsCount_numRows > rsCount_total) Then
rsCount_numRows = rsCount_total
End If
' set the first and last displayed record
rsCount_first = 1
rsCount_last = rsCount_first + rsCount_numRows - 1
If (rsCount_first > rsCount_total) Then
rsCount_first = rsCount_total
End If
If (rsCount_last > rsCount_total) Then
rsCount_last = rsCount_total
End If
End If
%>
<%
Dim Repeat3__numRows
Dim Repeat3__index
Repeat3__numRows = 5
Repeat3__index = 0
rsAthScores_numRows = rsAthScores_numRows + Repeat3__numRows
%>
<%
Dim MM_paramName
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth
Dim MM_removeList
Dim MM_item
Dim MM_nextItem
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then
MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "") Then
MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then
MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "") Then
MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%
Dim Repeat2__numRows
Dim Repeat2__index
Repeat2__numRows = 5
Repeat2__index = 0
rsSVHSNews_numRows = rsSVHSNews_numRows + Repeat2__numRows
%>
SVHS Web Site - Main Page
My faculty page is currently under construction.
Please check back at a later time.
*To request information pertaining to my classroom, please feel free to contact me via email from our campus Staff Directory page.
<%
rsDistNews.Close()
Set rsDistNews = Nothing
%>
<%
rsSVHSNews.Close()
Set rsSVHSNews = Nothing
%>
<%
rsAthScores.Close()
Set rsAthScores = Nothing
%>
<%
rsEmerNews.Close()
Set rsEmerNews = Nothing
%>
<%
rsPhoto.Close()
Set rsPhoto = Nothing
%>
<%
rsCount.Close()
Set rsCount = Nothing
%>