<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Mall.ManageMC3System.Login" %>


<!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 id="Head1" runat="server">
    <title>MCShop 微维网上商城系统V3.06 管理中心--登录</title>
     <link href="/content/manage/CSS/css.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/content/js/jquery-1.4.2.min.js"></script>
</head>
<body style=" text-align:center; background-color:#8cc5ec;">
   <form id="Form1" action="" runat="server">
    <div style="text-align: center; background-image:url(/content/manage/images/Login.gif) ; margin-left:30%; width:435px;height:286px;position: relative; top: 143px">
        <div style="left: 30px; width: 328px; position: inherit; margin-left:10%; top: 133px; height: 134px">
            <div style="width: 322px; height: 25px; text-align: left">
                <span style="font-size: 10pt"> <span>帐 &nbsp;号：</span></span><input
                    id="TxtName" style="width: 190px;   " type="text" /></div>
            <div style="width: 322px; height: 25px; text-align: left">
                <span style="font-size: 10pt"><span>密 &nbsp;码：</span></span><input
                    id="TxtPwd" style="width: 190px" type="PassWord" /></div>
            <div style="width: 320px; height: 35px">
            </div>
            <div style="width: 320px; height: 33px; margin-top:-25px; padding-left:20px; text-align: left;">
                &nbsp; 
                <input id="Login" type="button" value="登  录"  onclick=" Check();" style="width: 75px"  onkeydown="Check();" class="btn"/>
                &nbsp; &nbsp;&nbsp; &nbsp; 
                <input id="Reset" style="width: 75px" type="reset" value="重  置" class="btn" /></div>
        </div>
        <SCRIPT   language="javascript"   event="onkeydown"   for="document">   
  <!--   
  if(event.keyCode==13)   
  {   

  document.getElementById('Login').click();   
 
  }   
  //-->   
  </SCRIPT> 
    </div>
   </form>
</body>
</html>
<script language="javascript">

    function Check() {

        var MyAjaxUrl = "/mcscriptmanageservices/CheckLogin.aspx"
        var username = $("#TxtName").val();
        var userpwd = $("#TxtPwd").val();
        if (username.length < 1) {
            alert("请输入用户名");
            return;
        }
        if (userpwd.length < 1) {
            alert("请输入密码");
            return;

        }
        $.ajax({
            type: 'POST',
            url: MyAjaxUrl,
            data: { "username": username, "userpwd": userpwd },
            success: function (date) {
                if (date.indexOf("1") > -1) {

                    window.location.href = "/Managemc3system/Index.aspx";

                } else {

                    alert("请您确认您的用户名密码正确!");

                }

            },
            error: function (date) {
                var temp = date.status;
                alert("系统出错，错误代码" + temp + "请您尝试重新登陆。");
            }


        });
    }
</script>