%@LANGUAGE="VBSCRIPT"%>
<%
' *** Logout the current user.
MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
If (CStr(Request("MM_Logoutnow")) = "1") Then
Session.Abandon
MM_logoutRedirectPage = "logout.asp"
' redirect with URL parameters (remove the "MM_Logoutnow" query param).
if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))
If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_newQS = "?"
For Each Item In Request.QueryString
If (Item <> "MM_Logoutnow") Then
If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
End If
Next
if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS
End If
Response.Redirect(MM_logoutRedirectPage)
End If
%>
<%
Dim spWebReadydata__id
spWebReadydata__id = "2"
if(Request("id") <> "") then spWebReadydata__id = Request("id")
%>
<%
Dim rsCatList__MMColParam
rsCatList__MMColParam = "1"
if (Request.QueryString("id") <> "") then rsCatList__MMColParam = Request.QueryString("id")
%>
<%
set rsCatList = Server.CreateObject("ADODB.Recordset")
rsCatList.ActiveConnection = MM_vos2_STRING
rsCatList.Source = "SELECT ParentCategoryID, CategoryLinkDepthFlag, CategoryID, CategoryName, CategoryLinkOrder FROM dbo.BrowseMenu WHERE ParentCategoryID = " + Replace(rsCatList__MMColParam, "'", "''") + ""
rsCatList.CursorType = 0
rsCatList.CursorLocation = 2
rsCatList.LockType = 3
rsCatList.Open()
rsCatList_numRows = 0
%>
<%
Dim rsName__MMColParam
rsName__MMColParam = "1"
if (Request.QueryString("id") <> "") then rsName__MMColParam = Request.QueryString("id")
%>
<%
set rsName = Server.CreateObject("ADODB.Recordset")
rsName.ActiveConnection = MM_vos2_STRING
rsName.Source = "SELECT dbo.Categories.CategoryName, dbo.Categories.CategoryDescription FROM dbo.Categories WHERE (dbo.Categories.CategoryID = " + Replace(rsName__MMColParam, "'", "''") + ")"
rsName.CursorType = 0
rsName.CursorLocation = 2
rsName.LockType = 3
rsName.Open()
rsName_numRows = 0
%>
<%
set spWebReadydata = Server.CreateObject("ADODB.Command")
spWebReadydata.ActiveConnection = MM_vos2_STRING
spWebReadydata.CommandText = "dbo.spBrowse"
spWebReadydata.Parameters.Append spWebReadydata.CreateParameter("@RETURN_VALUE", 3, 4)
spWebReadydata.Parameters.Append spWebReadydata.CreateParameter("@id", 3, 1,1000,spWebReadydata__id)
spWebReadydata.CommandType = 4
spWebReadydata.CommandTimeout = 0
spWebReadydata.Prepared = true
set rsUnionTest = spWebReadydata.Execute
rsUnionTest_numRows = 0
%>
<%
Dim rsParents__MMColParam
rsParents__MMColParam = "1"
if (Request.QueryString("id") <> "") then rsParents__MMColParam = Request.QueryString("id")
%>
<%
set rsParents = Server.CreateObject("ADODB.Recordset")
rsParents.ActiveConnection = MM_vos2_STRING
rsParents.Source = "SELECT Root, CategoryID, CategoryName FROM dbo.Parents WHERE Root = " + Replace(rsParents__MMColParam, "'", "''") + ""
rsParents.CursorType = 0
rsParents.CursorLocation = 2
rsParents.LockType = 3
rsParents.Open()
rsParents_numRows = 0
%>
<%
Dim Repeat2__numRows
Repeat2__numRows = -1
Dim Repeat2__index
Repeat2__index = 0
rsCatList_numRows = rsCatList_numRows + Repeat2__numRows
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
rsUnionTest_numRows = rsUnionTest_numRows + Repeat1__numRows
%>
<%
Dim Repeat3__numRows
Repeat3__numRows = -1
Dim Repeat3__index
Repeat3__index = 0
rsParents_numRows = rsParents_numRows + Repeat3__numRows
%>
<%
' *** 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 & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(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)
if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
' 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
%>
VoS - Voice of the Shuttle
<% If Session("MM_UserAuthorization")="1" THEN %>
Edit
Text | Edit
Order | Browse
<% End If %>
<% If Not rsCatList.EOF Or Not rsCatList.BOF Then %>
<%
While ((Repeat2__numRows <> 0) AND (NOT rsCatList.EOF))
%>
<% End If ' end Not rsCatList.EOF Or NOT rsCatList.BOF %>
<% If Not rsParents.EOF Or Not rsParents.BOF Then %>
<% If ((rsParents.Fields.Item("CategoryID").Value)<3) Then %>
Home
<% Else %>
<%
While ((Repeat3__numRows <> 0) AND (NOT rsParents.EOF))
%>
"><%=(rsParents.Fields.Item("CategoryName").Value)%>
<%
Repeat3__index=Repeat3__index+1
Repeat3__numRows=Repeat3__numRows-1
rsParents.MoveNext()
Wend
%>
<% End If %>
<% End If ' end Not rsParents.EOF Or NOT rsParents.BOF %>
<%=(rsName.Fields.Item("CategoryName").Value)%>
<%=(rsName.Fields.Item("CategoryDescription").Value)%>
<%
While ((Repeat1__numRows <> 0) AND (NOT rsUnionTest.EOF))
%>
<% 'J: Begin Code
Dim indent
indent = ((rsUnionTest.Fields.Item("Indent").Value))*32
%>
<% If rsUnionTest("IsInfo")=0 Then 'J: Begin Is Category
%>
<% If rsUnionTest("Indent")<2 Then 'J: Begin Cat Top level with nav - horizontal rule
%>
ayliu@english.ucsb.edu
To suggest links for inclusion in VoS, please use the "Suggest
a Link" button on the relevant category page [available shortly].
To offer feedback on the site, please use the suggestion
form.