<!--#Include File="../Inc/Config.asp"-->
<!--#Include File="../Inc/Md5.asp"--><%
'--------------------------------------
'Power By 580Web @2010-2014 f02
'URL:http://www.580web.cn/
'EMail:wsok85@qq.com
'QQ:253819801
'版权所有 未经允许不得去除本版权信息
'--------------------------------------

Dim Fk_Admin_LoginName,Fk_Admin_LoginPass

Types=Clng(Request.QueryString("Type"))

Select Case Types
	Case 1
		Call LoginBox() '读取登录信息
	Case 2
		Call LoginDo() '登录操作
	Case Else
		Response.Redirect("Index.asp")
		Call FKFun.PageEnd()
End Select

'==========================================
'函 数 名：LoginBox()
'作    用：读取登录信息
'==========================================
Sub LoginBox()
%>
<style type="text/css">
html {
overflow-x:hidden;
overflow-y:hidden;
}
body
{
	margin: 0;
	padding: 0;
	font-size: 12px;
	background: #214D90 url(images/login2/bg.gif) repeat-x;
	color: #999999;
	font-family: Tahoma,Verdana;
}
ul
{
	list-style: none;
	margin: 0;
	padding: 0;
}
.Main
{
	width: 940px;
	margin: 0 auto;
}

.top
{
	height: 75px;
	background: url(images/login2/login_01.gif) no-repeat;
}

.top2
{
	height: 94px;
	background: url(images/login2/login_02.gif) no-repeat;
}

.topA
{
	width: 155px;
	height: 140px;
	float: left;
	overflow: hidden;
	background: url(images/login2/login_03.gif) no-repeat;
}


.topB
{
	width: 282px;
	height: 140px;
	float: left;
	overflow: hidden;
	background: url(images/login2/login_04.gif) no-repeat;
}


.topC
{
	width: 27px;
	height: 140px;
	float: left;
	overflow: hidden;
	background: url(images/login2/login_05.gif) no-repeat;
}


.topD
{
	width: 318px;
	height: 140px;
	float: left;
	overflow: hidden;
	background: url(images/login2/login_06.gif) no-repeat;
}

.topE
{
	width: 158px;
	height: 140px;
	float: left;
	overflow: hidden;
	background: url(images/login2/login_07.gif) no-repeat;
}



.middle_A
{
	width: 155px;
	height: 94px;
	float: left;
	overflow: hidden;
	background: url(images/login2/login_08.gif) no-repeat;
}

.middle_B
{
	width: 309px;
	height: 94px;
	float: left;
	overflow: hidden;
	background: url(images/login2/login_09.gif) no-repeat;

}

.middle_C
{
	width: 318px;
	height: 94px;
	float: left;
	overflow: hidden;
	background: url(images/login2/login_10.gif) no-repeat;
}

.middle_D
{
	width: 158px;
	height: 94px;
	float: left;
	overflow: hidden;
	background: url(images/login2/login_11.gif) no-repeat;
}

.bottom_A
{
	height: 72px;
	clear: both;
	overflow: hidden;
	background: url(images/login2/login_12.gif) no-repeat;
}

.bottom_B
{
	height: 70px;
	overflow: hidden;
	 text-align:center;
	background: url(images/login2/login_13.gif) no-repeat;
	color: #ffffff;
}

.login
{
	padding-top:30px;
}

.login li
{
	line-height: 35px;
	height:35px;
	overflow:hidden;
}

.left
{ line-height: 35px;
	vertical-align: middle;
	width: 50px;
	height:34px;
	text-align: right;
	display: -moz-inline-box;
	display: inline-block;
	padding-bottom:3px;
}

.txt
{
	width: 215px;
	height: 30px;
	line-height: 30px;
	overflow: hidden;
	border: 0px;
	padding-left: 3px;
	color: #999999;
	background: url(images/login2/txt.gif) no-repeat left center;
}

.txtCode
{
	line-height: 30px;
	width: 93px;
	height: 30px;
	overflow: hidden;
	border: 0px;
	padding-left: 3px;
		color: #999999;
	background: url(images/login2/code.gif) no-repeat left center;
}

.btn
{
	margin-left:60px;
}

</style>
<div style="background:#214D90 url(images/login2/bg.gif) no-repeat center top;margin: 0;padding: 0;color:#404040;height:100%;position: absolute;left:0px;top:0px;width:100%;">
<form id="AdminLogin" name="AdminLogin" method="post" target="ajax" action="Login.asp?Type=2" hrefUrl="Index.asp">
    <div class="Main">
        <ul>
            <li class="top"></li>
            <li class="top2"></li>
            <li class="topA"></li>
            <li class="topB"><span>
                <img src="images/login2/logo.gif" alt="" style="" />
            </span></li>
            <li class="topC"></li>
            <li class="topD">
                <ul class="login">
                    <li><span class="left">用户名：</span> <span style="left">
                        <input name="Fk_Admin_LoginName" id="Fk_Admin_LoginName" type="text" class="txt" />  
                    </span></li>
                    <li><span class="left">密 码：</span> <span style="left">
                       <input name="Fk_Admin_LoginPass" id="Fk_Admin_LoginPass" type="password" class="txt" />  
                    </span></li>
                     <li><span class="left">验证码：</span> <span style="left">
                    <input name="VerifyCode" id="VerifyCode" type="text" class="txtCode" />  <img id="safecode" src="../Plugin/VerifyCode/1.asp" title="看不清,点击换张验证码" onClick="this.src='../Plugin/VerifyCode/1.asp?' + Math.random();" style="cursor:pointer;" />
                    </span>  
                    </li>
                    
                    <!--<li>
                    <span class="left">记住我：</span>
                        <input id="Checkbox" type="checkbox" />  
                    </li>-->
                    
                </ul>
            </li>
            <li class="topE"></li>
            <li class="middle_A"></li>
            <li class="middle_B"></li>
            <li class="middle_C">
            <span class="btn">
               <input type="image" src="images/login2/btnlogin.gif" name="Enter" id="Enter" value="登 录" /> 
            </span>
            </li>
            <li class="middle_D"></li>
            <li class="bottom_A"></li>
            <li class="bottom_B">
            网站后台管理中心登录平台
            </li>
        </ul>
    </div>
    </form></div>
<%
End Sub

'==========================================
'函 数 名：LoginDo()
'作    用：登录操作
'==========================================
Sub LoginDo()
	Fk_Admin_LoginName=FKFun.HTMLEncode(Trim(Request.Form("Fk_Admin_LoginName")))
	Fk_Admin_LoginPass=FKFun.HTMLEncode(Trim(Request.Form("Fk_Admin_LoginPass")))
	Call FKFun.JsonString(Fk_Admin_LoginName,1,50,0,"请输入登录名！","登录名名不能大于50个字符！")
	Call FKFun.JsonString(Fk_Admin_LoginPass,1,50,0,"请输入登录密码！","登录密码不能大于50个字符！")
	If cstr(Session("VerifyCode"))<>cstr(Request.Form("VerifyCode")) then
    Call FKFun.JsonError("请注意正确输入验证码！")
End If
	Sqlstr="Select Fk_Admin_LoginName,Fk_Admin_LoginPass From [Fk_Admin] Where Fk_Admin_State=1 And Fk_Admin_LoginName='"&Fk_Admin_LoginName&"' And Fk_Admin_LoginPass='"&Md5(Md5(Fk_Admin_LoginPass,32),16)&"'"
	Rs.Open Sqlstr,Conn,1,1
	If Not Rs.Eof Then
		Response.Cookies("u_f02")=Fk_Admin_LoginName
		Response.Cookies("p_f02")=Md5(Rs("Fk_Admin_LoginPass")&"f02"&Request.ServerVariables("REMOTE_ADDR")&Date(),16)
		Call FKFun.JsonSuccess()
	Else
		Rs.Close
		Call FKFun.JsonError("用户名或密码错误！")
	End If
	Rs.Close
End Sub

Call FKFun.PageEnd()
%>
