<!--#include file="utf-8.asp" -->
<!--#include file="js/Function.asp" -->
<!--#include file="../inc/Function.asp" -->
<!--#include file="../inc/MD5.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<META NAME="copyright" CONTENT="Copyright 2010-2012 - yidacms.com" />
<META NAME="Author" CONTENT="世纪伟成  yidacms.com" />
<title>Hi!管理员</title>
<link href="images/login.css" rel="stylesheet" type="text/css" />
</head>
<%
IF TXW_install = "open" then
set rs = server.createobject("adodb.recordset")
sql="select * from book_management"
rs.open sql,dbok,1,1	   
	if rs("adminpath")="admin" then
	 response.Write "<script>window.location.replace(""../install.asp"")</script> "
	  else
	 response.Write ""
	end if
end if
%>
<body>
<form id="form1" name="form1" method="post" action="admin_login.asp?shuaiweb=login">
<div id="yidacms_login">
 <div id="yidacms_login_left"></div>
  <div id="yidacms_login_right">
   <div id="yidacms_login_right_top"><img src="images/loginlogo.png"  class="logopng"/></div>
   <div id="yidacms_login_right_foot">

    <div class="yidacms_login_denglu"><div class="span">账户:</div><div class="span2"><input name="loginname" type="text" id="loginname" class="loginborder"/></div></div>
    <div class="yidacms_login_denglu"><div class="span">密码:</div><div class="span2"><input name="loginpass" type="password" id="loginpass" class="loginborder"/></div></div>
    <div class="yidacms_login_denglu"><div class="span">口令:</div><div class="span2"><input name='yidacms_kouling' type='password' class='yan'></div></div>
    <div class="anniu"><font color="#ffffff"><input type="radio" name="yidacms_new" value="new" checked/>全版</font> 

<input type="submit" name="Submit" value="登 陆" class="an"/></div>

   </div>
  </div>
</div>
    <div class="clear"></div>
  <div id="yidacms_foot">&copy; yidacms.com 翻版必究</div>
  </form>
<%
	if request("shuaiweb")="login" then

	username = filter_Str(request.Form("loginname"))
	password = filter_Str(left(MD5(request.Form("loginpass")),10))

	set rs=server.createobject("adodb.recordset")
	sql="select * from shuaiweb_vipadministrator where username='"&username&"' and password='"&password&"'" 
	rs.open sql,dbok,1,1

	If Request.Form("yidacms_kouling") <> validation Then
	response.write("<script language=javascript> alert('口令码错误,请从新输入!');history.go(-1);</script>")
	response.end
        end if

	if not rs.bof and not rs.eof then

        session("username")=username
         yidacms_new = request.Form("yidacms_new")
         if yidacms_new = "new" then
          response.Redirect "new_index.asp" 
           elseif yidacms_new = "old" then
          response.Redirect "index.asp"
         end if
  
	else
	response.write "<script language=javascript> alert('账户或密码不正确，请从新登录！');history.go(-1);</script>"
	response.end
	end if

	end if      
%>
</body>
</html>