#32003/7/24 11:15:19
原程序如下:
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="高级"
MM_authFailedURL="../login/error.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<%
Dim news__MMColParam4
news__MMColParam4 = "%"
If (request.querystring("wh") <> "") Then
news__MMColParam4 = request.querystring("wh")
End If
%>
<%
Dim news__wen
news__wen = "%"
If (request.querystring("title") <> "") Then
news__wen = request.querystring("title")
End If
%>
<%
Dim news__shui
news__shui = "%"
If (request.querystring("textfield") <> "") Then
news__shui = request.querystring("textfield")
End If
%>
<%
Dim news__jiguan
news__jiguan = "%"
If (request.querystring("textfield2") <> "") Then
news__jiguan = request.querystring("textfield2")
End If
%>
<%
Dim news__wenhao
news__wenhao = "%"
If (request.querystring("wenhao") <> "") Then
news__wenhao = request.querystring("wenhao")
End If
%>
<%
Dim news__zheng
news__zheng = "%"
If (request.querystring("zw") <> "") Then
news__zheng = request.querystring("zw")
End If
%>
<%
Dim news__sh
news__sh = "已审核"
If (Request("MM_Emptyvalue") <> "") Then
news__sh = Request("MM_Emptyvalue")
End If
%>
<%
Dim news
Dim news_numRows
Set news = Server.CreateObject("ADODB.Recordset")
news.ActiveConnection = MM_news_STRING
news.Source = "SELECT * FROM news WHERE (wh like '%" + Replace(news__MMColParam4, "'", "''") + "%'and title like'%" + Replace(news__wen, "'", "''") + "%'and suiz like'%" + Replace(news__shui, "'", "''") + "%'and fwjg like'%" + Replace(news__jiguan, "'", "''") + "%'and (wh = '" + Replace(news__wenhao, "'", "''") + "'or wh like '%" + Replace(news__wenhao, "'", "''") + "%')and text_zw like '%" + Replace(news__zheng, "'", "''") + "%')and shenh='" + Replace(news__sh, "'", "''") + "' ORDER BY id desc"
news.CursorType = 0
news.CursorLocation = 2
news.LockType = 1
news.Open()
news_numRows = 0
%>