<!--#include file=../include/config.asp-->
<!--#include file=../include/conn_view.asp-->
<!--#include file=../include/function.asp-->
<%
	dim user,password,strSql,rsTmp,retValue
	user=request("user")
	password=request("password")
	if user="" then
		out("用户名不能为空！")
		resonse.end
	end if
	if password="" then
		out("密码不能为空！")
		resonse.end
	end if
	set rsTmp=Server.CreateObject("ADODB.RecordSet")
	strSql = "select * from [admin] where username='" & convertsql(user) & "'"
	strSql = strSql & " and userpassword='" & convertsql(password) & "'"
	rsTmp.open strSql,conn
	if rsTmp.eof then
		out("该用户不存在,或密码错误！")
		retValue=1
	else
		retValue=0
		'##设置session
		session("adminlogin")="ok"
		session("user_id")=rsTmp("user_id")
	end if
	rsTmp.close
	set rsTmp=nothing
	conn.close
	set conn=nothing
	'##跳转到另一页去
	if retValue=0 then
		response.redirect "../manage.asp"
	end if
%>
<!--#include file=../include/foot.asp-->