<!-- #include file="conn.asp" -->
<!-- #include file="md5.asp" -->

<%call head()

Call saycarda("管理登陆")
If saytk>1 Then response.write "<div class=""toper"">"
response.write "<img src='/img/logo/admin.png' alt='.'/><br/>"
If saytk>1 Then response.write "</div>"
dim username,password,TP,rs,sql,dlip
TP=request("TP")
if TP<>"" then
   username=request.form("username")
   password=md5(md5(request.form("password"),16),32)
   password1=md5(md5(request.form("password1"),16),32)
   set Rs=server.createobject("adodb.recordset")
   Sql="select * from [adminguli] where [password]='"&password&"' and [twapp_admin]='"&password1&"' and [username]='"&username&"'"
Rs.open sql,conn,1,1
if Rs.eof then
rs.close
set rs=nothing
  Call Error("登录失败,用户名或密码不正确！")
  end if
if password=Rs("password") and password1=rs("twapp_admin") and username=Rs("username") then
else
  Call Error("登录失败,用户名或密码不正确！")
  end if
   sid=rs("sid")
   lastdate=rs("lastdate")
   lastip=rs("lastip")
   If saytk>1 Then%>
<div style="padding: 5px;border: none;background-color:#FFFFFF;color: #000000; margin: auto; text-align:left;">
   <%End if
response.write "登录成功,欢迎使用!"
rs.close
set rs=nothing
   response.write "<br/>上次登录时间:"&lastdate&"<br/>"
   response.write "上次登录IP:"&lastip&"<br/>"
   response.write "本次登录IP:"&Request.ServerVariables("REMOTE_ADDR")&"<br/>"
   If lastip<>Request.ServerVariables("REMOTE_ADDR") Then response.write "本次登录IP与上次不符,请检查是否存在盗号!<br/>"
   response.write "<a href='info.asp?saytk="&saytk&"&amp;sid="&sid&"'>进入管理</a><br/>"
conn.close
set conn=Nothing
If saytk>1 Then%></div><%End if
else


if saytk>1 then
Response.write "<form name=""form"" method=""post"" action=""login.asp?saytk="&saytk&""">"%>
<div class="path">
用户名:</div>
<div style="padding: 5px;border: none;background-color:#FFFFFF;color: #000000; margin: auto; text-align:left;">
<input name="username" title="用户" type="text" size="32"/></div>
<div class="path">
密码:</div>
<div style="padding: 5px;border: none;background-color:#FFFFFF;color: #000000; margin: auto; text-align:left;">
<input name="password" title="密码" type="password" size="32"/></div><div class="path">
高密:</div>
<div style="padding: 5px;border: none;background-color:#FFFFFF;color: #000000; margin: auto; text-align:left;">
<input name="password1" title="高密" type="password" size="32"/></div>
<%
response.write "<input type=""hidden"" name=""TP"" value=""1""/>"%><div style="padding: 3px;background-color:#efefef; border:1px solid #ffffff;">
    <input type="submit" name="Submit" value=">>管理登陆"></form></div>
<%else%>
用户名:<br/>
<input name="username" title="用户" type="text"/><br/>
密码:<br/>
<input name="password" title="密码" type="password"/><br/>
高密:<br/>
<input name="password1" title="高密" type="password"/><br/>
<anchor>>>管理登陆<go href="login.asp?saytk=1" method="post" accept-charset="utf-8">
<postfield name="TP" value="1"/><postfield name="username" value="$(username)"/><postfield name="password" value="$(password)"/><postfield name="password1" value="$(password1)"/></go></anchor><br/>
<%end if%>
<%end if

response.write "<br/><a href='/?sid="&sid&"'>返回网站首页</a><br/>"


%>
精彩建站,激情与创业同在!
<br/>多一点付出,多一份收获!

<%Call head1()%>
