<!--#include file="conn.asp"-->
<!--#include file="inc/TS_SqlIn.asp"-->
<!--#include file="zjy_md6.asp"-->
<%dim admin,password,verifycode
admin=replace(trim(request("admin")),"'","")
password=zjy_md6(replace(trim(request("password")),"'",""))
'Response.Write password

verifycode=replace(trim(request("verifycode")),"'","")
if admin="" or password="" then
response.Write "<script LANGUAGE='javascript'>alert('您的管理ID或密码有误！');history.go(-1);</script>"
response.end
end if
if  Request.Form ("verifycode")<>session("Vcode") or session("Vcode")=""then
response.Write "<script LANGUAGE='javascript'>alert('请输入正确的验证码！');history.go(-1);</script>"
response.end
end if

set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from shop_admin where admin='"&admin&"' and password='"&password&"' " ,conn,1,1
if not(rs.bof and rs.eof) then
if password=rs("password") then
session("AdminName")=trim(rs("admin"))
session("flag")=rs("flag")
session.Timeout=60
rs.Close
set rs=nothing
response.Redirect "total.htm"
else
response.write "<script LANGUAGE='javascript'>alert('对不起，登陆失败！');history.go(-1);</script>"
end if
else
response.write "<script LANGUAGE='javascript'>alert('对不起，登陆失败！');history.go(-1);</script>"
end if
%>