<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Mvcb2b.admin.login.Default" %>
<!doctype html>
<html>
<head><%string webcode = Fun.Webcode; %>
<meta charset="<%=webcode%>">
<title><%=Data.Bkname %>数字报后台管理系统登录</title>
<style type="text/css">
html{min-height:689px;height:100%;}
body{
	text-align: center;
	margin: 0px;
	padding: 0px;
	height:100%;padding-top: 128px; box-sizing:border-box;
	background-image: url(Images/2.jpg);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
}
td{
	color: #333333;
	font-size: 12px;padding:1px;line-height:19px;  
}
.td2{padding-left:70px;margin-bottom:15px;}.td2 span{display:inline-block;}
td input,td img{ vertical-align:middle;}
input, textarea, select, button {
	text-rendering: auto;
	color: initial;
	letter-spacing: normal;
	word-spacing: normal;
	text-transform: none;
	text-indent: 0px;
	text-shadow: none;
	display: inline-block;
	text-align: start;
	margin: 0em;
	background-color: transparent;
	font-family: Arial;
	font-size: 14px;
	font-weight: 400;
	border-top-width: 0px;
	border-right-width: 0px;
	border-bottom-width: 0px;
	border-left-width: 0px;
}
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
    background-color: transparent;
    background-image: none;
    color: rgb(0, 0, 0);
}
.bg {
	width:521px;
	height:521px;padding-top:128px;height:403px;
	text-align:left;  
	margin-left:auto;
	margin-right:auto;
	background-image: url(Images/login.png);
	background-repeat: no-repeat;
	background-position: left top; position:relative;
}
#Login1 {width:521px;height:356px;margin-left:auto;margin-right:auto;}
.user,.pass,.pass2{
	padding-left: 56px;margin-left:70px;display:inline-block;
	width: 322px;
	padding-top:7px;
	height:50px;
	font-size: 14px;
	line-height: 40px;
	background-repeat: no-repeat;
	background-position:20px center;
	margin: 0px;
	border: 1px solid #bdbdbd;
	border-radius:10px;
	background-color: #FFF;
}
.user{background-image: url(images/userbg.png);}
.pass,.pass2{background-image: url(images/passbg.png);}
.pass2{width:196px;}
.user input,.pass2 input{color:#999;}.pass input{color:#333;}
#Login1_UserName,#Login1_Password{
	width:307px;
	height: 40px;background-image: url(images/user.png);
	font-size: 14px;
	line-height: 40px;
	margin: 0px;
	padding: 0px;padding-left:3px;
	border-top-width: 0px;
	border-right-width: 0px;
	border-bottom-width: 0px;
	border-left-width: 0px;background-color:transparent;background:#fff;
}


.login2{margin-left:70px;padding-left:0px;display:inline-block;
	width: 378px;background-position:20px center;
	height:69px;
	font-size: 14px;
	background-image: url(images/loginbutton.png);
	background-repeat: no-repeat;
	background-position: left top;
}
.login2 input{width:100%;height:69px;}
#Login1_LoginButton{ 
}
#Login1_RememberMe{margin-left:40px;}
.usernum{width:180px;
	height: 40px;background-image: url(images/pass.png);
	font-size: 14px;
	line-height: 40px;
	margin: 0px;
	padding: 0px;padding-left:3px;
	border-top-width: 0px;
	border-right-width: 0px;
	border-bottom-width: 0px;
	border-left-width: 0px;background-color:transparent;background:#fff;}
</style>
<script src="<%=Fun.Webdirectory %>Comja/jquery-1.12.4.min.js" type="text/javascript"></script>
<script type="text/javascript" src="<%=Fun.Webdirectory %>Comja/md5.js"></script>  
<!--hex_md5("123456");-->
</head>
<body>
<form id="form2" runat="server">
<div class="bg">
    <asp:Login ID="Login1" runat="server" OnAuthenticate="Login1_Authenticate"   
        DestinationPageUrl="../default.aspx" style="text-align: left; vertical-align:top;" 
        LoginButtonText="登 录" TitleText="登 录" >
        <LayoutTemplate> 
                                <div align="right" style="display:none;width:0%;">
                                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">用户名:</asp:Label>
                                </div>
                                <div style="color:Red;text-align:center;padding-left:0;" id="msg" class="td2">
                                    <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                </div>
                                <div  class="td2">
                                   <span class="user"> <asp:TextBox ID="UserName" TabIndex="1" runat="server" Text="用户名"  ></asp:TextBox></span>
                                  <asp:RequiredFieldValidator ID="UserNameRequired" runat="server"   ControlToValidate="UserName" ErrorMessage="必须填写“用户名”。" ToolTip="必须填写“用户名”。"  ValidationGroup="Login1">*</asp:RequiredFieldValidator>
                                </div> 
                                <div align="right" style="display:none;">
                                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">密码:</asp:Label>
                                </div>
                                <div   class="td2">
                                   <span class="pass">  <asp:TextBox ID="Password" runat="server" TabIndex="2"   TextMode="Password"></asp:TextBox></span><asp:RequiredFieldValidator ID="PasswordRequired" runat="server"        ControlToValidate="Password" ErrorMessage="必须填写“密码”。" ToolTip="必须填写“密码”。"     ValidationGroup="Login1">*</asp:RequiredFieldValidator>
                                </div> 
                             <div align="right" style="display:none;">验证码:</div>
                            <div   class="td2">
                            <span class="pass2">
                            <input class="usernum"  name="verifyCode" id="verifyCode" maxlength="8"  tabindex="3" value="验证码" type="text" />
                            </span>                            
		<img  src="CheckCode.aspx" alt="看不清，换一张图片" style="width:80px;height:30px;margin-left:18px; vertical-align:middle;" onclick="this.src='CheckCode.aspx?'+(new Date().getTime());" /></div> 
                                <div style="display:none;">
                                    <asp:CheckBox ID="RememberMe"  Checked="false" runat="server" Text="下次记住我。" />
                                </div>                                
                                <div  class="td2 login2" ><input type="hidden" name="username2" id="username2" value="" /><input type="hidden" name="pass2" id="pass2" value="" />
                                <asp:Button ID="LoginButton" runat="server" tabindex="4" CommandName="Login" Text=" "  ValidationGroup="Login1" />
                                </div>
        </LayoutTemplate>
    </asp:Login>
</div><!--bg-->
</form>
<script type="text/javascript">
    $(function () {
		$(document).on("click","#Login1_UserName",function () {		     	    
			if (this.value == "用户名")
			{
				this.style.color="#333";
				this.value = '';
			}
		});	 
		$(document).on("click","#verifyCode",function () {		     	    
			if (this.value == "验证码")
			{	
			    this.style.color="#333";
				this.value = '';
			}
		});	 
        $("#Login1_LoginButton").click(function (e) {
			var u=$("#Login1_UserName").val();
			if (u=="" || u=="用户名")
			{ 
				$("#msg").html("请输入用户名！");
				return false;
			}
			var vc=$("#verifyCode").val();
			if (vc=="" || vc=="验证码")
			{ 
				$("#msg").html("请输入验证码！");
				return false;
			}
            // var e = e || window.event;
            // if (e.preventDefault) e.preventDefault();
            // else window.event.returnValue = false;
            //var username = $('#Login1_UserName').val();
            var pass = $('#Login1_Password').val();
            //username = hex_md5(username);
            pass = hex_md5(pass);
          //  $('#Login1_UserName').val(username);
            $('#Login1_Password').val(pass);
        });
    });
</script>
</body>
</html>