%@LANGUAGE="VBSCRIPT"%>
<%
Dim rns
Dim rns_numRows
Set rns = Server.CreateObject("ADODB.Recordset")
rns.ActiveConnection = MM_conn_STRING
rns.Source = "SELECT * FROM t_news ORDER BY n_id DESC"
rns.CursorType = 0
rns.CursorLocation = 2
rns.LockType = 1
rns.Open()
rns_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 10
Repeat1__index = 0
rns_numRows = rns_numRows + Repeat1__numRows
%>
<%
Dim rsn
Dim rsn_numRows
Set rsn = Server.CreateObject("ADODB.Recordset")
rsn.Source = "SELECT * FROM t_news ORDER BY n_id DESC"
rsn.CursorType = 0
rsn.CursorLocation = 2
rsn.LockType = 1
rsn_numRows = 0
%>
<%
'请尊重作者劳动成果不要删除以上信息
'业一新闻系统3.0正式版
'主页:http://yeyi.net
'论坛:http://bbs.yeyi.net
'业一网络 承接各种网站制作
'程序开发 软件开发业务
'业务联系
'电话: 13007310512
'联系人:郝亚平
'QQ:24344842 (只谈业务,技术问题请访问论坛)
'请尊重作者劳动成果不要删除以上信息
%>
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
MM_valUsername=CStr(Request.Form("u_name"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization="u_level"
MM_redirectLoginSuccess="../news/frame.asp"
MM_redirectLoginFailed="../default.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_conn_STRING
MM_rsUser.Source = "SELECT u_name, u_password"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM t_user WHERE u_name='" & Replace(MM_valUsername,"'","''") &"' AND u_password='" & md5(trim(Replace(Request.Form("u_password"),"'","''"))) & "'"
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
%>