<!--#include file="../Include/Cls_top.asp"-->
<!--#include file="../include/MD5.asp"-->
<div align=center><b>程序最新动态</b></div><table cellspacing=0 cellpadding=1 width="100%" bgcolor=#ecf1fb border=0>
<center>
<table width="746" border>
<tr><th align="center" bgcolor=ffaa00><marquee direction=up height=100 width=200 id=m onmouseout=m.start() onMouseOver=m.stop() scrollamount=2 align="center">
<font size=2 color="#ffff00">
<p align="center"><a href="http://bbs.snxsc.com" target="_blank">您的版本以更新请点击下载最新版本程序</a></p> 
<p>○欢迎使用本系统程序</p>
<p>○为了确保您正常使用此程序</p>
<p>○请随时关注我们的最新动态</p>
<p>○我们的网址是：<a href="http://bbs.snxsc.com">http://bbs.snxsc.com</a></p>
<p>○新浪官方微博：<a href="http://t.qq.com/sn-xs">http://weibo.com/838881688</a></p>
<p>○腾讯官方微博：<a href="http://t.qq.com/sn-xs">http://t.qq.com/sn-xsc</a></p>
<p align="right"><a href="http://blog.sina.com.cn/u/2729031315" target="_blank">80IT工作室</a><p>
<a href="http://blog.sina.com.cn/u/2729031315" target="_blank">80IT工作室</a></p>
</p>
<p align="right">&nbsp;</p>
</font></marquee></th>
</table><embed src="http://www.snxsc.com/terop.swf" wmode="transparent" width="745" height="22" flashvars="txt=欢迎使用本程序：目前您的程序属于安全状态！"></embed>	
<%
Select Case Request("Action")
  Case "LoginSave"
    Call LoginSave()
  Case Else
    Call Login()
End Select
Call ClassEnd()
 
Public Sub LoginSave()
  Dim UserName,Password,Code
  UserName = tx_common.CheckStr(Request.form("username"),0)
  Password= tx_common.CheckStr(Request.form("password"),0)
  Code = tx_common.CheckStr(Request.form("Code"),0)
  Call DBConnBegin()
  Set Rs = Conn.ExeCute("Select tx_adminuser,tx_adminpass From tx_admin Where tx_adminuser = '"&UserName&"'")
  If Not Rs.Eof Then
    If Rs(1) <> MD5(2,PassWord) Then
      Response.Write MD5(2,PassWord)&"<script>alert('用户密码输入不正确');history.back(1)</script>"
	  Response.end
	Else
      If Code <> Session("Code") Then
        Response.Write "<script>alert('验证码不正确');history.back(1)</script>"
        Response.end
      End If
      Session("Code") = ""
      Response.Cookies("Admin") = Rs(0)
	End If
  Else
     Response.Write "<script>alert('管理员不存在');history.back(1)</script>"
	 Response.end
  End If
  Rs.Close
  Set Rs = Nothing
  Call DBConnEnd()
  Response.Redirect "Admin_Manage.asp"
End Sub

Public Sub Login()

  Response.Write "<script>" & vbCrLf
  Response.Write "function CheckForm(){" & vbCrLf
  Response.Write "  var Msg = """";" & vbCrLf
  Response.Write "  if (document.login.UserName.value == """"){" & vbCrLf
  Response.Write "	alert(""请输入用户名！"");" & vbCrLf
  Response.Write "	document.login.UserName.focus();" & vbCrLf
  Response.Write "	return false;" & vbCrLf
  Response.Write "    Msg = ""Err"";}" & vbCrLf
  Response.Write "  if (document.login.Password.value == """"){" & vbCrLf
  Response.Write "	alert(""请输入密码！"");" & vbCrLf
  Response.Write "	document.login.Password.focus();" & vbCrLf
  Response.Write "	return false;" & vbCrLf
  Response.Write "    Msg = ""Err"";}  " & vbCrLf
  Response.Write "  if (document.login.Code.value == """"){" & vbCrLf
  Response.Write "	alert(""请输入验证码！"");" & vbCrLf
  Response.Write "	document.login.Password.focus();" & vbCrLf
  Response.Write "	return false;" & vbCrLf
  Response.Write "    Msg = ""Err"";}" & vbCrLf
  Response.Write "  if (Msg == """"){login.submit();}else{return false;}}" & vbCrLf
  Response.Write "function Ctlent(){if(window.event.keyCode==13){CheckForm();}}" & vbCrLf
  Response.Write "</script>" & vbCrLf

  Response.Write "<html>" & vbCrLf
  Response.Write "<head>" & vbCrLf
  Response.Write "<title>管理员登录</title>" & vbCrLf
  Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbCrLf
  Response.Write "<link href='../CSS/ADMIN/Admin_Style.css' rel='stylesheet' type='text/css'>" & vbCrLf
  
  Response.Write "<SCRIPT language=JavaScript src=Admin_SoftKey.Js></SCRIPT>" & vbCrLf
  Response.Write "</head>" & vbCrLf
  Response.Write "<body style='margin:0;color:#FFFFFF;overflow:hidden;border:0'>" & vbCrLf
  Response.Write "<div onkeydown=Ctlent()><table width='100%' height='100%'  border=0 cellpadding=0 cellspacing=0><tr><td>" & vbCrLf

  Response.Write "<table width='100%' align=center height=160 border=0 cellpadding=0 cellspacing=0 style='border-top:1px #0069BF solid;border-bottom:1px #0069BF solid'>" & vbCrLf
  Response.Write "<tr><td align=center>" & vbCrLf
  Response.Write "<table width='100%' align=center height=150 border=0 cellpadding=0 cellspacing=2 bgcolor=#1890CC>" & vbCrLf
  Response.Write "<form name=login action=?Action=LoginSave method=post>" & vbCrLf
  Response.Write "<tr><td width='25%' align=right><img src='img/Login_pic.gif' align=absmiddle></td><td width='2%'><img src='img/Login_line.gif' align=absmiddle></td><td width='73%'>" & vbCrLf
  
  Response.Write "<table border=0 cellpadding=0 cellspacing=2><tr>" & vbCrLf
  Response.Write "<td colspan=6><img src='img/Login_tit.gif' align=absmiddle></td>" & vbCrLf
  Response.Write "<td align=right rowspan=2 valign=bottom width=90><img onclick='CheckForm();' src=Img/Login.gif width=71 height=71 border=0 align=absmiddle style='cursor:pointer'></td>" & vbCrLf
  Response.Write "</tr><tr>" & vbCrLf
  Response.Write "<td width=50 align=right height=60><img src='img/admin_login_01.gif' align=absmiddle></td>" & vbCrLf
  Response.Write "<td>用户名<br><input name=UserName size=12 class=input_login style='width:100;height:18px'></td>" & vbCrLf
  Response.Write "<td width=40 align=right><img src='img/admin_login_02.gif' align=absmiddle></td>" & vbCrLf
  Response.Write "<td>密　码" & vbCrLf
  Response.Write "<table border=0 cellspacing=0 cellpadding=0 class=input_login>" & vbCrLf
  Response.Write "<tr><td bgcolor=#ffffff><input name=Password type=Password style='width:80;height:14px;border:0px'></td>" & vbCrLf
  Response.Write "<td bgcolor=#ffffff width=18><img align=absmiddle src=""Img/Dot_Info.gif"" border=0 style='cursor:pointer' onkeydown=Calc.Password.value=login.Password.value title=""点此使用小键盘输入密码，使你的帐号信息更安全！"" onclick=""inputpass=login.Password;showkeyboard();login.Password.readOnly=1;Calc.Password.value=''""  readOnly onchange=Calc.passcnbbr.value=login.passcnbbr.value></td></tr>" & vbCrLf
  Response.Write "</table>" & vbCrLf
  Response.Write "</td>" & vbCrLf
  Response.Write "<td width=45 align=right><img src='img/admin_login_03.gif' align=absmiddle></td>" & vbCrLf
  Response.Write "<td>验证码<br><input name=Code class=input_login size=8 maxlength=6 style='width:50;height:18px'><img src=../include/Code.asp align=absmiddle class=input_login style='width:80px;height:16px;cursor:pointer' alt='验证码看不清楚?请点击刷新验证码' onclick=""this.src='../inc/Code.asp?'+Math.random()""></td>" & vbCrLf
  Response.Write "</tr></table>" & vbCrLf
  
  Response.Write "</td></tr></form></table>" & vbCrLf
  Response.Write "</td></tr></table>" & vbCrLf
  
  Response.Write "</td></tr></table></div>" & vbCrLf
  Response.Write "<SCRIPT>document.login.UserName.focus()</SCRIPT>" & vbCrLf

  Response.Write "</body>" & vbCrLf
  Response.Write "</html>" & vbCrLf
End Sub
%>