<%@ page language="C#" autoeventwireup="true" inherits="admin_Login, LebiMall" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>乐彼商城系统-管理员登陆</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	overflow:hidden;
}
.STYLE3 {color: #d0f0ff; font-size: 12px; }
.STYLE4 {
	color: #d0f0ff;
	font-size: 12px; 
}
-->
</style>

 <script type="text/javascript">
        function getCookies(name)
        {
            var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
            if(arr != null) return decodeURI(arr[2]); return null;
        }

        function imgf(){
            document.getElementById("img1").src=document.getElementById("img1").src+'?';
        }
        function checkTrue(){
            var flag = true;
            if(flag&&!check_un()){
                flag = false;
            }
            if(flag && !check_pwd()){
                flag = false;
            }
            if(flag && !check_yz()){
                flag = false;
            }
            return flag;
        }
        function check_un(){
             if(document.getElementById("adminUserName").value==""){
                 document.getElementById("msg_yz").innerHTML="<span class='msg_submit'>用户名不能为空！</span>";
                 return false;
             }else
             {
                document.getElementById("msg_yz").innerHTML="  ";
                return true;
             }
        }
        function check_pwd(){
             if(document.getElementById("adminPwd").value=="")
             {
                 document.getElementById("msg_yz").innerHTML="<span class='msg_submit'>密码不能为空！</span>";
                 return false;
             }else{
                document.getElementById("msg_yz").innerHTML="  ";
                return true;
             }
        }
         function check_yz(){
            var checkfc=getCookies('CheckCodef');
            var txt_=document.getElementById("txt_yz").value;
            if(txt_==""){
            
                document.getElementById("msg_yz").innerHTML="<span class='msg_submit'>请输入验证码！</span>";
                return false;
                
            }else if(checkfc==txt_){
               document.getElementById("msg_yz").innerHTML="  ";  
               return true;
            }else{
                document.getElementById("msg_yz").innerHTML="<span class='msg_submit'>请正确填写校验码</span>";
                return false;
            }
        }
    </script>

</head>
<body style="font-size:12px;">
<form runat="server" onsubmit="return checkTrue();">
<table  width="100%" height="100%" border="1" cellpadding="0" cellspacing="0">
  <tr>
    <td height="608" style="background:url(images/login1.gif)  repeat-x #d0f0ff" background="images/login1.gif"><table  width="862" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="340" background="images/loginbg-3.jpg">&nbsp;</td>
      </tr>
      <tr>
        <td height="95"><table  width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="200" height="200" background="images/login40.gif">&nbsp;</td>
            <td width="409" background="images/login3.gif"><table height="50%"  width="100%" border="0" cellspacing="0" cellpadding="0">
	       <tr>
                <td height="45px" style="width: 143px"><div align="right"><span class="STYLE3"></span></div></td>
                <td width="64%" height="45px"><input style="border:0;width:226px;background:#EFFED3; margin-top:14px;" runat="server" id="adminUserName" onblur="check_un();" type="text"></td>
		
              </tr>
              <tr>
                <td height="40px" style="width: 143px"><div align="right"><span class="STYLE3"></span></div></td>
                <td width="65%" height="40px"><input style="border:0;width:226px;background:#EFFED3;" id="adminPwd" runat="server" onblur="check_pwd();" type="password" ></td>
              </tr>
		<tr>
                <td height="40px" style="width: 143px"><div align="right"><span class="STYLE3"></span></div></td>
                <td width="35%" height="40px" style=" "><div style=" float:left; margin-top:2px;"><input style="border:0;width:82px; background:#EFFED3;" runat="server" onblur="check_yz();" id="txt_yz"  maxlength="5" size="5"  type="text"></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <img class="img_c" style="width:65px;height:23px;" title="点击重新获取验证码" id="img1" src="imgcheck2.aspx" language="javascript" onclick="this.src=this.src+'?'">
                </td>
              </tr>
              <tr>
                <td style="width: 143px">&nbsp;</td>
                <td height="74px;"> <span id="msg_yz" runat="server" style="color:#ff0000; margin-left:30px; font-size:12px;"></span><br />
                    &nbsp;&nbsp;<asp:Button ID="Button2" runat="server" style="BACKGROUND: url(images/button.gif); border:0;; width:136px; height:40px;" OnClick="Button1_Click" /></td>
              </tr>
            </table></td>
            <td width="255" background="images/login-4.gif">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="247" valign="top" style="background:url(images/login6.gif) repeat-x #D0F0FF" ><table  width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="22%" height="30"></td>
            <td width="56%" style="text-align:center;"></td>
            <td width="22%">&nbsp;</td>
</tr><tr>
		<td width="22%" height="30"></td>
            <td width="56%" style="text-align:center;">Copyright 2003 - 2010 56770 Inc</td>
            <td width="22%">&nbsp;</td>          </tr>
          <tr>
            <td>&nbsp;</td>
            <td height="30"></td>
            <td></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#D0F0FF"></td>
  </tr>
</table>
</form>
</body>
</html>
