<!--#include file="system/include/config.asp"-->
<!--#include file="conn_system.asp"-->
<!--#include file="system/include/function.asp"-->
<!--#include file="inc/UpiConfig.asp"--><!--恒浪整合配置文件-->
<!--#include file="inc/hl_md5.asp"--><!----恒浪加密文件---->
<%
	dim user,password,strSql,rsTmp,retValue
	user=request("username")
	password=request("password")
	if request("username")="" then
%>
<SCRIPT LANGUAGE=vbscript>
<!--
msgbox("用户名不能为空!")
window.top.location.href="login.htm"
-->
</SCRIPT>
<%
	end if
	if password="" then
%>
<SCRIPT LANGUAGE=vbscript>
<!--
msgbox("密码不能为空!")
window.top.location.href="login.htm"
-->
</SCRIPT>
<%
	end if
	set rsTmp=Server.CreateObject("ADODB.RecordSet")
	strSql = "select * from [user] where username='" & convertsql(user) & "'"
	'strSql = strSql & " and password='" & convertsql(password) & "'"
	strSql = strSql & " and password='"& md5(convertsql(password),16)&"'"
	rsTmp.open strSql,conn,3,3
	if rsTmp.eof then
        retValue=1
%>
<SCRIPT LANGUAGE=vbscript>
<!--
msgbox("'该用户不存在' 或 '密码不正确'!")
window.top.location.href="login.htm"
-->
</SCRIPT>
<%
		
	else
		retValue=0
		'##设置session
		session("zjlogin")=""
		session("adminlogin")="ok"
		session("user_id")=rsTmp("id")
		session("user_name")=rsTmp("username")
                rsTmp("last_date")=now()
                rsTmp.update
	end if
	rsTmp.close
	set rsTmp=nothing
	conn.close
	set conn=nothing
	'//==恒浪整合登录开始==By Howave.Net & SeaShell 2007/05/11==
	Dim H_ComeUrl
	H_ComeUrl=Request.ServerVariables("HTTP_REFERER")
	H_ComeUrl=Replace(lcase(H_ComeUrl),"login.htm","")
	Howave_Login user,password,"0",H_ComeUrl
	'//==恒浪整合登录结束====
	
	'##跳转到另一页去
	if retValue=0 then
		response.redirect "member.asp"
	end if
%>
<!--#include file=system/include/foot.asp-->