<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

<!--#include file="Connections/conn_news.asp" -->
<!--#include file="yns_config.asp" -->
<!--#include file="md5.asp" -->
<%
Dim rsu__MMColParam
rsu__MMColParam = "1"
If (Request.Form("username") <> "") Then
  rsu__MMColParam = Request.Form("username")
End If
%>
<%
Dim rsu
Dim rsu_numRows

Set rsu = Server.CreateObject("ADODB.Recordset")
rsu.ActiveConnection = MM_conn_news_STRING
rsu.Source = "SELECT * FROM t_user WHERE u_name = '" + Replace(rsu__MMColParam, "'", "''") + "'"
rsu.CursorType = 0
rsu.CursorLocation = 2
rsu.LockType = 1
rsu.Open()

rsu_numRows = 0
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=yns_title%></title>
</head>

<body>
<% If rsu.EOF And rsu.BOF Then %>
没有该用户
<%
response.End()
else
%>
<%
dim mm_pass
mm_pass = Replace(mm_pass, "'", "''")
mm_pass = md5(request.Form("password"))
if (rsu.Fields.Item("u_password").Value) = mm_pass then
 session("ss_user") = (rsu.Fields.Item("u_name").Value)
 session("ss_level") = (rsu.Fields.Item("u_level").Value)
%>
登陆成功...
<meta http-equiv="refresh" content="1;URL=yns_frameset.asp">
<% else %>
密码错误
<%
response.End()
end if
%>
<% End If  %>
</body>
</html>
<%
rsu.Close()
Set rsu = Nothing
%>