%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% Dim news Dim news_numRows Set news = Server.CreateObject("ADODB.Recordset") news.ActiveConnection = MM_abc_STRING news.Source = "SELECT 编号, title, date FROM mbanews ORDER BY 编号 DESC" news.CursorType = 0 news.CursorLocation = 2 news.LockType = 1 news.Open() news_numRows = 0 %> <% Dim qustion Dim qustion_numRows Set qustion = Server.CreateObject("ADODB.Recordset") qustion.ActiveConnection = MM_abc_STRING qustion.Source = "SELECT id, title FROM question ORDER BY id DESC" qustion.CursorType = 0 qustion.CursorLocation = 2 qustion.LockType = 1 qustion.Open() qustion_numRows = 0 %> <% Dim colnews Dim colnews_numRows Set colnews = Server.CreateObject("ADODB.Recordset") colnews.ActiveConnection = MM_abc_STRING colnews.Source = "SELECT 编号, title, date FROM collegenew ORDER BY 编号 DESC" colnews.CursorType = 0 colnews.CursorLocation = 2 colnews.LockType = 1 colnews.Open() colnews_numRows = 0 %> <% Dim jdanli__MMColParam jdanli__MMColParam = "优秀" If (Request("MM_EmptyValue") <> "") Then jdanli__MMColParam = Request("MM_EmptyValue") End If %> <% Dim jdanli Dim jdanli_numRows Set jdanli = Server.CreateObject("ADODB.Recordset") jdanli.ActiveConnection = MM_abc_STRING jdanli.Source = "SELECT 编号, 标题, 姓名, 状态, 分类 FROM anli WHERE 状态 = '" + Replace(jdanli__MMColParam, "'", "''") + "' ORDER BY 分类 ASC" jdanli.CursorType = 0 jdanli.CursorLocation = 2 jdanli.LockType = 1 jdanli.Open() jdanli_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = 10 Repeat1__index = 0 qustion_numRows = qustion_numRows + Repeat1__numRows %> <% Dim MM_paramName %> <% Dim Repeat0__numRows Dim Repeat0__index Repeat0__numRows = 10 Repeat0__index = 0 news_numRows = news_numRows + Repeat0__numRows %> <% Dim Repeat3__numRows Dim Repeat3__index Repeat3__numRows = 10 Repeat3__index = 0 jdanli_numRows = jdanli_numRows + Repeat3__numRows %> <% Dim Repeat2__numRows Dim Repeat2__index Repeat2__numRows = 10 Repeat2__index = 0 colnews_numRows = colnews_numRows + Repeat2__numRows %> <% ' *** Validate request to log in to this site. MM_LoginAction = Request.ServerVariables("URL") If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString) MM_valUsername=CStr(Request.Form("usn")) If MM_valUsername <> "" Then MM_fldUserAuthorization="访问级别" MM_redirectLoginSuccess="bbs.asp" MM_redirectLoginFailed="index.asp" MM_flag="ADODB.Recordset" set MM_rsUser = Server.CreateObject(MM_flag) MM_rsUser.ActiveConnection = MM_abc_STRING MM_rsUser.Source = "SELECT user, psw" If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization MM_rsUser.Source = MM_rsUser.Source & " FROM student WHERE user='" & Replace(MM_valUsername,"'","''") &"' AND psw='" & Replace(Request.Form("psw"),"'","''") & "'" MM_rsUser.CursorType = 0 MM_rsUser.CursorLocation = 2 MM_rsUser.LockType = 3 MM_rsUser.Open If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then ' username and password match - this is a valid user Session("MM_Username") = MM_valUsername If (MM_fldUserAuthorization <> "") Then Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value) Else Session("MM_UserAuthorization") = "" End If if CStr(Request.QueryString("accessdenied")) <> "" And false Then MM_redirectLoginSuccess = Request.QueryString("accessdenied") End If MM_rsUser.Close Response.Redirect(MM_redirectLoginSuccess) End If MM_rsUser.Close Response.Redirect(MM_redirectLoginFailed) End If %> <% ' *** 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 %>