更新登录以及去除jquery3.6.4
This commit is contained in:
		
							parent
							
								
									0202812af6
								
							
						
					
					
						commit
						43262d1573
					
				| 
						 | 
					@ -6,7 +6,7 @@
 | 
				
			||||||
<head runat="server">
 | 
					<head runat="server">
 | 
				
			||||||
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 | 
					    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 | 
				
			||||||
    <title></title>
 | 
					    <title></title>
 | 
				
			||||||
    <script src="../Scripts/jquery-3.6.4.js"></script>
 | 
					    <script src="../Scripts/jquery-3.7.1.min.js"></script>
 | 
				
			||||||
    <script type="text/javascript" language="javascript">
 | 
					    <script type="text/javascript" language="javascript">
 | 
				
			||||||
        function pagesetup_null() {
 | 
					        function pagesetup_null() {
 | 
				
			||||||
            try {
 | 
					            try {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -164,7 +164,7 @@
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    </style>
 | 
					    </style>
 | 
				
			||||||
    <link href="../res/css/common.css" rel="stylesheet" type="text/css" />
 | 
					    <link href="../res/css/common.css" rel="stylesheet" type="text/css" />
 | 
				
			||||||
    <script src="../Scripts/jquery-3.6.4.js"></script>
 | 
					    <script src="../Scripts/jquery-3.7.1.min.js"></script>
 | 
				
			||||||
    <script src="../Scripts/layer/layer.js"></script>
 | 
					    <script src="../Scripts/layer/layer.js"></script>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +30,7 @@
 | 
				
			||||||
            display: none;
 | 
					            display: none;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    </style>
 | 
					    </style>
 | 
				
			||||||
    <script src="../Scripts/jquery-3.6.4.js"></script>
 | 
					    <script src="../Scripts/jquery-3.7.1.min.js"></script>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
    <form id="form1" runat="server">
 | 
					    <form id="form1" runat="server">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,7 +31,7 @@
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    </style>
 | 
					    </style>
 | 
				
			||||||
    <script src="../Scripts/jquery-3.6.4.js"></script>
 | 
					    <script src="../Scripts/jquery-3.7.1.min.js"></script>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
    <form id="form1" runat="server">
 | 
					    <form id="form1" runat="server">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -382,6 +382,7 @@
 | 
				
			||||||
    <Content Include="KPI\KPI.aspx" />
 | 
					    <Content Include="KPI\KPI.aspx" />
 | 
				
			||||||
    <Content Include="Login.aspx" />
 | 
					    <Content Include="Login.aspx" />
 | 
				
			||||||
    <Content Include="AttachFile\fileupload.ashx" />
 | 
					    <Content Include="AttachFile\fileupload.ashx" />
 | 
				
			||||||
 | 
					    <Content Include="loginApi.aspx" />
 | 
				
			||||||
    <Content Include="MyWebService.asmx" />
 | 
					    <Content Include="MyWebService.asmx" />
 | 
				
			||||||
    <Content Include="res\css\common.css" />
 | 
					    <Content Include="res\css\common.css" />
 | 
				
			||||||
    <Content Include="res\css\dashboard.css" />
 | 
					    <Content Include="res\css\dashboard.css" />
 | 
				
			||||||
| 
						 | 
					@ -2492,6 +2493,7 @@
 | 
				
			||||||
    <Content Include="res\themes\pure_orange\theme.css" />
 | 
					    <Content Include="res\themes\pure_orange\theme.css" />
 | 
				
			||||||
    <Content Include="res\themes\pure_purple\theme.css" />
 | 
					    <Content Include="res\themes\pure_purple\theme.css" />
 | 
				
			||||||
    <Content Include="res\themes\pure_red\theme.css" />
 | 
					    <Content Include="res\themes\pure_red\theme.css" />
 | 
				
			||||||
 | 
					    <Content Include="Scripts\ajax.js" />
 | 
				
			||||||
    <Content Include="Scripts\echarts\dist\chart\bar.js" />
 | 
					    <Content Include="Scripts\echarts\dist\chart\bar.js" />
 | 
				
			||||||
    <Content Include="Scripts\echarts\dist\chart\chord.js" />
 | 
					    <Content Include="Scripts\echarts\dist\chart\chord.js" />
 | 
				
			||||||
    <Content Include="Scripts\echarts\dist\chart\eventRiver.js" />
 | 
					    <Content Include="Scripts\echarts\dist\chart\eventRiver.js" />
 | 
				
			||||||
| 
						 | 
					@ -2514,9 +2516,9 @@
 | 
				
			||||||
    <Content Include="Scripts\echarts\echarts.js" />
 | 
					    <Content Include="Scripts\echarts\echarts.js" />
 | 
				
			||||||
    <Content Include="Scripts\echarts\macarons.js" />
 | 
					    <Content Include="Scripts\echarts\macarons.js" />
 | 
				
			||||||
    <Content Include="Scripts\index.aspx" />
 | 
					    <Content Include="Scripts\index.aspx" />
 | 
				
			||||||
    <Content Include="Scripts\jquery-1.8.3.min.js" />
 | 
					 | 
				
			||||||
    <Content Include="Scripts\jquery-3.6.4.js" />
 | 
					    <Content Include="Scripts\jquery-3.6.4.js" />
 | 
				
			||||||
    <Content Include="Scripts\jquery-3.6.4.min.js" />
 | 
					    <Content Include="Scripts\jquery-3.6.4.min.js" />
 | 
				
			||||||
 | 
					    <Content Include="Scripts\jquery-3.7.1.min.js" />
 | 
				
			||||||
    <Content Include="Scripts\layer\layer.js" />
 | 
					    <Content Include="Scripts\layer\layer.js" />
 | 
				
			||||||
    <Content Include="Scripts\layer\mobile\layer.js" />
 | 
					    <Content Include="Scripts\layer\mobile\layer.js" />
 | 
				
			||||||
    <Content Include="Scripts\layer\mobile\need\layer.css" />
 | 
					    <Content Include="Scripts\layer\mobile\need\layer.css" />
 | 
				
			||||||
| 
						 | 
					@ -2527,6 +2529,7 @@
 | 
				
			||||||
    <Content Include="Scripts\layer\theme\default\loading-1.gif" />
 | 
					    <Content Include="Scripts\layer\theme\default\loading-1.gif" />
 | 
				
			||||||
    <Content Include="Scripts\layer\theme\default\loading-2.gif" />
 | 
					    <Content Include="Scripts\layer\theme\default\loading-2.gif" />
 | 
				
			||||||
    <Content Include="Scripts\markingSystem.js" />
 | 
					    <Content Include="Scripts\markingSystem.js" />
 | 
				
			||||||
 | 
					    <Content Include="Scripts\md5.js" />
 | 
				
			||||||
    <Content Include="Scripts\startScore.js" />
 | 
					    <Content Include="Scripts\startScore.js" />
 | 
				
			||||||
    <Content Include="SendEmail\SelectUserControl.ascx" />
 | 
					    <Content Include="SendEmail\SelectUserControl.ascx" />
 | 
				
			||||||
    <Content Include="SendEmail\SendEmail.aspx" />
 | 
					    <Content Include="SendEmail\SendEmail.aspx" />
 | 
				
			||||||
| 
						 | 
					@ -2601,7 +2604,6 @@
 | 
				
			||||||
    <Content Include="ntko.js" />
 | 
					    <Content Include="ntko.js" />
 | 
				
			||||||
    <Content Include="OperationError.aspx" />
 | 
					    <Content Include="OperationError.aspx" />
 | 
				
			||||||
    <Content Include="Scripts\inputAutocomplete.js" />
 | 
					    <Content Include="Scripts\inputAutocomplete.js" />
 | 
				
			||||||
    <Content Include="Scripts\jquery-1.4.1-vsdoc.js" />
 | 
					 | 
				
			||||||
    <Content Include="Scripts\jquery.autocomplete.js" />
 | 
					    <Content Include="Scripts\jquery.autocomplete.js" />
 | 
				
			||||||
    <Content Include="Scripts\ValidateGroupControl.js" />
 | 
					    <Content Include="Scripts\ValidateGroupControl.js" />
 | 
				
			||||||
    <Content Include="Styles\jquery.autocomplete.css" />
 | 
					    <Content Include="Styles\jquery.autocomplete.css" />
 | 
				
			||||||
| 
						 | 
					@ -3096,6 +3098,13 @@
 | 
				
			||||||
    <Compile Include="Login.aspx.designer.cs">
 | 
					    <Compile Include="Login.aspx.designer.cs">
 | 
				
			||||||
      <DependentUpon>Login.aspx</DependentUpon>
 | 
					      <DependentUpon>Login.aspx</DependentUpon>
 | 
				
			||||||
    </Compile>
 | 
					    </Compile>
 | 
				
			||||||
 | 
					    <Compile Include="loginApi.aspx.cs">
 | 
				
			||||||
 | 
					      <DependentUpon>loginApi.aspx</DependentUpon>
 | 
				
			||||||
 | 
					      <SubType>ASPXCodeBehind</SubType>
 | 
				
			||||||
 | 
					    </Compile>
 | 
				
			||||||
 | 
					    <Compile Include="loginApi.aspx.designer.cs">
 | 
				
			||||||
 | 
					      <DependentUpon>loginApi.aspx</DependentUpon>
 | 
				
			||||||
 | 
					    </Compile>
 | 
				
			||||||
    <Compile Include="LogOff.aspx.cs">
 | 
					    <Compile Include="LogOff.aspx.cs">
 | 
				
			||||||
      <DependentUpon>LogOff.aspx</DependentUpon>
 | 
					      <DependentUpon>LogOff.aspx</DependentUpon>
 | 
				
			||||||
      <SubType>ASPXCodeBehind</SubType>
 | 
					      <SubType>ASPXCodeBehind</SubType>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@
 | 
				
			||||||
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 | 
					    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 | 
				
			||||||
    <title>KPI</title>
 | 
					    <title>KPI</title>
 | 
				
			||||||
    <link href="../res/css/common.css" rel="stylesheet" type="text/css" />
 | 
					    <link href="../res/css/common.css" rel="stylesheet" type="text/css" />
 | 
				
			||||||
    <script src="../Scripts/jquery-3.6.4.js"></script>
 | 
					    <script src="../Scripts/jquery-3.7.1.min.js"></script>
 | 
				
			||||||
    <script src="../Scripts/layer/layer.js"></script>
 | 
					    <script src="../Scripts/layer/layer.js"></script>
 | 
				
			||||||
    <script src="../Scripts/echarts/echarts.js"></script>
 | 
					    <script src="../Scripts/echarts/echarts.js"></script>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,11 +47,11 @@
 | 
				
			||||||
                                    src="res/index/images/loginBg.jpg"
 | 
					                                    src="res/index/images/loginBg.jpg"
 | 
				
			||||||
                                    style="width: auto; height: 335px; width: 355px; position: absolute; flex-shrink: 0; margin: 0px; border-radius: 10px; box-shadow: 0px 20px 20px #1b1b2a">
 | 
					                                    style="width: auto; height: 335px; width: 355px; position: absolute; flex-shrink: 0; margin: 0px; border-radius: 10px; box-shadow: 0px 20px 20px #1b1b2a">
 | 
				
			||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
                            <div style="width: 100px; height: 100px; position: absolute; border-radius:10px;top:0px ;right: -6px;background-image:url(/res/images/sanjiao.png);background-size:cover">
 | 
					                            <div style="width: 100px; height: 100px; position: absolute; border-radius: 10px; top: 0px; right: -6px; background-image: url(/res/images/sanjiao.png); background-size: cover">
 | 
				
			||||||
                                <div id="pointd" style="font-size:26px; color:#FFF;text-align:center;position:relative;width:50px;left:45px;top:15px;cursor:pointer;">FA</div>
 | 
					                                <div id="pointd" style="font-size: 26px; color: #FFF; text-align: center; position: relative; width: 50px; left: 45px; top: 15px; cursor: pointer;">FA</div>
 | 
				
			||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
                            <div id="loginpwd" class="bi-vertical-layout"
 | 
					                            <div id="loginpwd" class="bi-vertical-layout"
 | 
				
			||||||
                                style="overflow: hidden auto;  display:none;left: 40px; right: 40px; top: 0px; bottom: 0px; position: absolute;">
 | 
					                                style="overflow: hidden auto; display: none; left: 40px; right: 40px; top: 0px; bottom: 0px; position: absolute;">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                                <div class="bi-vertical-layout" style="overflow: hidden auto; position: relative; margin-top: 50px; border-color: #fff">
 | 
					                                <div class="bi-vertical-layout" style="overflow: hidden auto; position: relative; margin-top: 50px; border-color: #fff">
 | 
				
			||||||
                                    <div class="dec-login-item bi-vertical-layout"
 | 
					                                    <div class="dec-login-item bi-vertical-layout"
 | 
				
			||||||
| 
						 | 
					@ -153,7 +153,7 @@
 | 
				
			||||||
                                        </div>
 | 
					                                        </div>
 | 
				
			||||||
                                    </div>
 | 
					                                    </div>
 | 
				
			||||||
                                </div>
 | 
					                                </div>
 | 
				
			||||||
                                <div class="bi-horizon-auto-layout" style="position: relative;">
 | 
					                                <div class="bi-horizon-auto-layout" onclick="login()" style="position: relative;">
 | 
				
			||||||
                                    <div
 | 
					                                    <div
 | 
				
			||||||
                                        class="bi-single bi-basic-button cursor-pointer bi-button login-button button-common bi-label bi-flex-center-adapt-layout"
 | 
					                                        class="bi-single bi-basic-button cursor-pointer bi-button login-button button-common bi-label bi-flex-center-adapt-layout"
 | 
				
			||||||
                                        style="width: 190px; height: 40px; line-height: 38px; min-width: 80px; position: relative; margin: 0px auto; box-shadow: 0px 10px 20px #2d2353">
 | 
					                                        style="width: 190px; height: 40px; line-height: 38px; min-width: 80px; position: relative; margin: 0px auto; box-shadow: 0px 10px 20px #2d2353">
 | 
				
			||||||
| 
						 | 
					@ -169,7 +169,7 @@
 | 
				
			||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
                            <div id="fasklogin" class="bi-vertical-layout"
 | 
					                            <div id="fasklogin" class="bi-vertical-layout"
 | 
				
			||||||
                                style="overflow: hidden auto; left: 40px; right: 40px; top: 0px; bottom: 0px; position: absolute;">
 | 
					                                style="overflow: hidden auto; left: 40px; right: 40px; top: 0px; bottom: 0px; position: absolute;">
 | 
				
			||||||
                                <div style="height:150px;"></div>
 | 
					                                <div style="height: 150px;"></div>
 | 
				
			||||||
                                <div class="bi-horizon-auto-layout" style="position: relative;">
 | 
					                                <div class="bi-horizon-auto-layout" style="position: relative;">
 | 
				
			||||||
                                    <div
 | 
					                                    <div
 | 
				
			||||||
                                        class="bi-single bi-basic-button cursor-pointer bi-button login-button button-common bi-label bi-flex-center-adapt-layout"
 | 
					                                        class="bi-single bi-basic-button cursor-pointer bi-button login-button button-common bi-label bi-flex-center-adapt-layout"
 | 
				
			||||||
| 
						 | 
					@ -188,7 +188,9 @@
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</body>
 | 
					</body>
 | 
				
			||||||
<script type="text/javascript" src="Scripts/jquery-3.6.4.min.js"></script>
 | 
					    <script src="Scripts/jquery-3.7.1.min.js"></script>
 | 
				
			||||||
 | 
					<script src="Scripts/md5.js"></script>
 | 
				
			||||||
 | 
					<script src="Scripts/ajax.js"></script>
 | 
				
			||||||
<script type="text/javascript">
 | 
					<script type="text/javascript">
 | 
				
			||||||
    var $activeWrap = document.getElementById('activewrap')
 | 
					    var $activeWrap = document.getElementById('activewrap')
 | 
				
			||||||
    var $active = document.getElementById('active')
 | 
					    var $active = document.getElementById('active')
 | 
				
			||||||
| 
						 | 
					@ -203,18 +205,44 @@
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<script type="text/javascript">
 | 
					<script type="text/javascript">
 | 
				
			||||||
    $(document).ready(function () {
 | 
					    var user = localStorage.getItem("u")
 | 
				
			||||||
        var user = getCookie("u") || "";
 | 
					    var pwd = localStorage.getItem("p")
 | 
				
			||||||
        var pwd = getCookie("p") || "";
 | 
					    document.getElementById("user").value = user;
 | 
				
			||||||
        $("#user").val(user)
 | 
					    document.getElementById("pwd").value = pwd;
 | 
				
			||||||
        $("#pwd").val(pwd)
 | 
					
 | 
				
			||||||
    })
 | 
					
 | 
				
			||||||
    $("#login").click(function () {
 | 
					    function login() {
 | 
				
			||||||
        login()
 | 
					        var user = document.getElementById("user").value;
 | 
				
			||||||
    })
 | 
					        var pwd = document.getElementById("pwd").value;
 | 
				
			||||||
 | 
					        if (user == '' && pwd == '') {
 | 
				
			||||||
 | 
					            alert("请输入账号和密码");
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        Ajax().post({
 | 
				
			||||||
 | 
					            url: 'loginApi.aspx',
 | 
				
			||||||
 | 
					            data: {
 | 
				
			||||||
 | 
					                "action": "login", "account": user, "pwd": pwd
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            success: function (data) {
 | 
				
			||||||
 | 
					                if (data == '' || data == undefined) {
 | 
				
			||||||
 | 
					                    alert("账号密码不正确!");
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
 | 
					                    var $activeWrap = document.getElementById('activewrap')
 | 
				
			||||||
 | 
					                    if ($activeWrap.className.indexOf('active') !== -1) {
 | 
				
			||||||
 | 
					                        localStorage.setItem("u", user);
 | 
				
			||||||
 | 
					                        localStorage.setItem('p', pwd)
 | 
				
			||||||
 | 
					                    } else {
 | 
				
			||||||
 | 
					                        localStorage.setItem("u", '');
 | 
				
			||||||
 | 
					                        localStorage.setItem("p", '');
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    top.window.location.href = data;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    $("#pointd").click(function () {
 | 
					    $("#pointd").click(function () {
 | 
				
			||||||
        if ($("#loginpwd").css("display")=="none") {
 | 
					        if ($("#loginpwd").css("display") == "none") {
 | 
				
			||||||
            $("#fasklogin").css("display","none");
 | 
					            $("#fasklogin").css("display", "none");
 | 
				
			||||||
            $("#loginpwd").css("display", "block");
 | 
					            $("#loginpwd").css("display", "block");
 | 
				
			||||||
            $("#pointd").text("FA");
 | 
					            $("#pointd").text("FA");
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
| 
						 | 
					@ -235,47 +263,34 @@
 | 
				
			||||||
        location.href = ssourl;
 | 
					        location.href = ssourl;
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
    function login() {
 | 
					    function login() {
 | 
				
			||||||
        var user = $("#user").val()
 | 
					        var user = document.getElementById("user").value;
 | 
				
			||||||
        var pwd = $("#pwd").val()
 | 
					        var pwd = document.getElementById("pwd").value;
 | 
				
			||||||
        $.ajax({
 | 
					        if (user == '' && pwd == '') {
 | 
				
			||||||
            url: "Login.aspx/LoginPost",
 | 
					            alert("请输入账号和密码");
 | 
				
			||||||
            type: "POST",
 | 
					            return;
 | 
				
			||||||
            contentType: "application/json; charset=utf-8",
 | 
					        }
 | 
				
			||||||
            dataType: "json",
 | 
					
 | 
				
			||||||
            data: JSON.stringify({
 | 
					        Ajax().post({
 | 
				
			||||||
                user: user,
 | 
					            url: 'loginApi.aspx',
 | 
				
			||||||
                pwd: pwd
 | 
					            data: {
 | 
				
			||||||
            }),
 | 
					                "action": "login", "account": user, "pwd": pwd
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
            success: function (data) {
 | 
					            success: function (data) {
 | 
				
			||||||
                if (data.d == '' || data.d == undefined) {
 | 
					                if (data == '' || data == undefined) {
 | 
				
			||||||
                    alert("账号密码不正确!");
 | 
					                    alert("账号密码不正确!");
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                    var $activeWrap = document.getElementById('activewrap')
 | 
					                    var $activeWrap = document.getElementById('activewrap')
 | 
				
			||||||
                    if ($activeWrap.className.indexOf('active') !== -1) {
 | 
					                    if ($activeWrap.className.indexOf('active') !== -1) {
 | 
				
			||||||
                        setCookie("u", user);
 | 
					                        localStorage.setItem("u", user);
 | 
				
			||||||
                        setCookie("p", pwd);
 | 
					                        localStorage.setItem('p', pwd)
 | 
				
			||||||
                    } else {
 | 
					                    } else {
 | 
				
			||||||
                        setCookie("u", '');
 | 
					                        localStorage.setItem("u", '');
 | 
				
			||||||
                        setCookie("p", '');
 | 
					                        localStorage.setItem("p", '');
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    top.window.location.href = data.d;
 | 
					                    top.window.location.href = data;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        })
 | 
					        });
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    function setCookie(name, value) {
 | 
					 | 
				
			||||||
        var Days = 365;
 | 
					 | 
				
			||||||
        var exp = new Date();
 | 
					 | 
				
			||||||
        exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
 | 
					 | 
				
			||||||
        document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    function getCookie(name) {
 | 
					 | 
				
			||||||
        var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
 | 
					 | 
				
			||||||
        if (arr = document.cookie.match(reg))
 | 
					 | 
				
			||||||
            return unescape(arr[2]);
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
            return null;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,7 @@
 | 
				
			||||||
<head runat="server">
 | 
					<head runat="server">
 | 
				
			||||||
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 | 
					    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 | 
				
			||||||
    <title></title>
 | 
					    <title></title>
 | 
				
			||||||
    <script src="../Scripts/jquery-3.6.4.js"></script>
 | 
					    <script src="../Scripts/jquery-3.7.1.min.js"></script>
 | 
				
			||||||
    <script src="../Scripts/startScore.js"></script>
 | 
					    <script src="../Scripts/startScore.js"></script>
 | 
				
			||||||
    <script src="../Scripts/layer/layer.js"></script>
 | 
					    <script src="../Scripts/layer/layer.js"></script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,127 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * ajax方法
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					var Ajax = function () {
 | 
				
			||||||
 | 
					    var that = this;
 | 
				
			||||||
 | 
					    // 创建异步请求对象方法
 | 
				
			||||||
 | 
					    that.createXHR = function () {
 | 
				
			||||||
 | 
					        if (window.XMLHttpRequest) { // IE7+、Firefox、Opera、Chrome 和Safari
 | 
				
			||||||
 | 
					            return new XMLHttpRequest();
 | 
				
			||||||
 | 
					        } else if (window.ActiveXObject) { // IE6 及以下
 | 
				
			||||||
 | 
					            var versions = ['MSXML2.XMLHttp', 'Microsoft.XMLHTTP'];
 | 
				
			||||||
 | 
					            for (var i = 0, len = versions.length; i < len; i++) {
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					                    return new ActiveXObject(version[i]);
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                } catch (e) {
 | 
				
			||||||
 | 
					                    // 跳过
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            throw new Error('浏览器不支持XHR对象!');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    // 初始化数据方法
 | 
				
			||||||
 | 
					    that.init = function (obj) {
 | 
				
			||||||
 | 
					        // 初始化数据
 | 
				
			||||||
 | 
					        var objAdapter = {
 | 
				
			||||||
 | 
					            method: 'get',
 | 
				
			||||||
 | 
					            data: {},
 | 
				
			||||||
 | 
					            success: function () {
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            complete: function () {
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            error: function (s) {
 | 
				
			||||||
 | 
					                alert('status:' + s + 'error!');
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            async: true
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        // 通过使用JS随机字符串解决IE浏览器第二次默认获取缓存的问题
 | 
				
			||||||
 | 
					        that.url = obj.url + '?rand=' + Math.random();
 | 
				
			||||||
 | 
					        that.method = obj.method || objAdapter.method;
 | 
				
			||||||
 | 
					        that.data = that.params(obj.data) || that.params(objAdapter.data);
 | 
				
			||||||
 | 
					        that.async = obj.async || objAdapter.async;
 | 
				
			||||||
 | 
					        that.complete = obj.complete || objAdapter.complete;
 | 
				
			||||||
 | 
					        that.success = obj.success || objAdapter.success;
 | 
				
			||||||
 | 
					        that.error = obj.error || objAdapter.error;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    // ajax异步调用
 | 
				
			||||||
 | 
					    that.ajax = function (obj) {
 | 
				
			||||||
 | 
					        that.method = obj.method || 'get';
 | 
				
			||||||
 | 
					        if (obj.method === 'post') {
 | 
				
			||||||
 | 
					            that.post(obj);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            that.get(obj);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    // post方法
 | 
				
			||||||
 | 
					    that.post = function (obj) {
 | 
				
			||||||
 | 
					        var xhr = that.createXHR(); // 创建XHR对象
 | 
				
			||||||
 | 
					        that.init(obj);
 | 
				
			||||||
 | 
					        that.method = 'post';
 | 
				
			||||||
 | 
					        if (that.async === true) { // true表示异步,false表示同步
 | 
				
			||||||
 | 
					            // 使用异步调用的时候,需要触发readystatechange 事件
 | 
				
			||||||
 | 
					            xhr.onreadystatechange = function () {
 | 
				
			||||||
 | 
					                if (xhr.readyState == 4) { // 判断对象的状态是否交互完成
 | 
				
			||||||
 | 
					                    that.callback(obj, this); // 回调
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        // 在使用XHR对象时,必须先调用open()方法,
 | 
				
			||||||
 | 
					        // 它接受三个参数:请求类型(get、post)、请求的URL和表示是否异步。
 | 
				
			||||||
 | 
					        xhr.open(that.method, that.url, that.async);
 | 
				
			||||||
 | 
					        // post方式需要自己设置http的请求头,来模仿表单提交。
 | 
				
			||||||
 | 
					        // 放在open方法之后,send方法之前。
 | 
				
			||||||
 | 
					        xhr.setRequestHeader('Content-Type',
 | 
				
			||||||
 | 
					            'application/x-www-form-urlencoded');
 | 
				
			||||||
 | 
					        xhr.send(that.data); // post方式将数据放在send()方法里
 | 
				
			||||||
 | 
					        if (that.async === false) { // 同步
 | 
				
			||||||
 | 
					            that.callback(obj, this); // 回调
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    // get方法
 | 
				
			||||||
 | 
					    that.get = function (obj) {
 | 
				
			||||||
 | 
					        var xhr = that.createXHR(); // 创建XHR对象
 | 
				
			||||||
 | 
					        that.init(obj);
 | 
				
			||||||
 | 
					        if (that.async === true) { // true表示异步,false表示同步
 | 
				
			||||||
 | 
					            // 使用异步调用的时候,需要触发readystatechange 事件
 | 
				
			||||||
 | 
					            xhr.onreadystatechange = function () {
 | 
				
			||||||
 | 
					                if (xhr.readyState == 4) { // 判断对象的状态是否交互完成
 | 
				
			||||||
 | 
					                    that.callback(obj, this); // 回调
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        // 若是GET请求,则将数据加到url后面
 | 
				
			||||||
 | 
					        that.url += that.url.indexOf('?') == -1 ? '?' + that.data : '&'
 | 
				
			||||||
 | 
					            + that.data;
 | 
				
			||||||
 | 
					        // 在使用XHR对象时,必须先调用open()方法,
 | 
				
			||||||
 | 
					        // 它接受三个参数:请求类型(get、post)、请求的URL和表示是否异步。
 | 
				
			||||||
 | 
					        xhr.open(that.method, that.url, that.async);
 | 
				
			||||||
 | 
					        xhr.send(null); // get方式则填null
 | 
				
			||||||
 | 
					        if (that.async === false) { // 同步
 | 
				
			||||||
 | 
					            that.callback(obj, this); // 回调
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    // 请求成功后,回调方法
 | 
				
			||||||
 | 
					    that.callback = function (obj, xhr) {
 | 
				
			||||||
 | 
					        if (xhr.status == 200) { // 判断http的交互是否成功,200表示成功
 | 
				
			||||||
 | 
					            obj.success(xhr.responseText); // 回调传递参数
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            alert('获取数据错误!错误代号:' + xhr.status + ',错误信息:' + xhr.statusText);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    // 数据转换
 | 
				
			||||||
 | 
					    that.params = function (data) {
 | 
				
			||||||
 | 
					        var arr = [];
 | 
				
			||||||
 | 
					        for (var i in data) {
 | 
				
			||||||
 | 
					            // 特殊字符传参产生的问题可以使用encodeURIComponent()进行编码处理
 | 
				
			||||||
 | 
					            arr.push(encodeURIComponent(i) + '=' + encodeURIComponent(data[i]));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return arr.join('&');
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					        post: that.post,
 | 
				
			||||||
 | 
					        get: that.get,
 | 
				
			||||||
 | 
					        ajax: that.ajax
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
						 | 
					@ -0,0 +1,186 @@
 | 
				
			||||||
 | 
					function md5(string, bit) {
 | 
				
			||||||
 | 
					    function md5_RotateLeft(lValue, iShiftBits) {
 | 
				
			||||||
 | 
					        return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    function md5_AddUnsigned(lX, lY) {
 | 
				
			||||||
 | 
					        var lX4, lY4, lX8, lY8, lResult;
 | 
				
			||||||
 | 
					        lX8 = (lX & 0x80000000);
 | 
				
			||||||
 | 
					        lY8 = (lY & 0x80000000);
 | 
				
			||||||
 | 
					        lX4 = (lX & 0x40000000);
 | 
				
			||||||
 | 
					        lY4 = (lY & 0x40000000);
 | 
				
			||||||
 | 
					        lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
 | 
				
			||||||
 | 
					        if (lX4 & lY4) {
 | 
				
			||||||
 | 
					            return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (lX4 | lY4) {
 | 
				
			||||||
 | 
					            if (lResult & 0x40000000) {
 | 
				
			||||||
 | 
					                return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            return (lResult ^ lX8 ^ lY8);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    function md5_F(x, y, z) {
 | 
				
			||||||
 | 
					        return (x & y) | ((~x) & z);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    function md5_G(x, y, z) {
 | 
				
			||||||
 | 
					        return (x & z) | (y & (~z));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    function md5_H(x, y, z) {
 | 
				
			||||||
 | 
					        return (x ^ y ^ z);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    function md5_I(x, y, z) {
 | 
				
			||||||
 | 
					        return (y ^ (x | (~z)));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    function md5_FF(a, b, c, d, x, s, ac) {
 | 
				
			||||||
 | 
					        a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_F(b, c, d), x), ac));
 | 
				
			||||||
 | 
					        return md5_AddUnsigned(md5_RotateLeft(a, s), b);
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    function md5_GG(a, b, c, d, x, s, ac) {
 | 
				
			||||||
 | 
					        a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_G(b, c, d), x), ac));
 | 
				
			||||||
 | 
					        return md5_AddUnsigned(md5_RotateLeft(a, s), b);
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    function md5_HH(a, b, c, d, x, s, ac) {
 | 
				
			||||||
 | 
					        a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_H(b, c, d), x), ac));
 | 
				
			||||||
 | 
					        return md5_AddUnsigned(md5_RotateLeft(a, s), b);
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    function md5_II(a, b, c, d, x, s, ac) {
 | 
				
			||||||
 | 
					        a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_I(b, c, d), x), ac));
 | 
				
			||||||
 | 
					        return md5_AddUnsigned(md5_RotateLeft(a, s), b);
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    function md5_ConvertToWordArray(string) {
 | 
				
			||||||
 | 
					        var lWordCount;
 | 
				
			||||||
 | 
					        var lMessageLength = string.length;
 | 
				
			||||||
 | 
					        var lNumberOfWords_temp1 = lMessageLength + 8;
 | 
				
			||||||
 | 
					        var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64;
 | 
				
			||||||
 | 
					        var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
 | 
				
			||||||
 | 
					        var lWordArray = Array(lNumberOfWords - 1);
 | 
				
			||||||
 | 
					        var lBytePosition = 0;
 | 
				
			||||||
 | 
					        var lByteCount = 0;
 | 
				
			||||||
 | 
					        while (lByteCount < lMessageLength) {
 | 
				
			||||||
 | 
					            lWordCount = (lByteCount - (lByteCount % 4)) / 4;
 | 
				
			||||||
 | 
					            lBytePosition = (lByteCount % 4) * 8;
 | 
				
			||||||
 | 
					            lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
 | 
				
			||||||
 | 
					            lByteCount++;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        lWordCount = (lByteCount - (lByteCount % 4)) / 4;
 | 
				
			||||||
 | 
					        lBytePosition = (lByteCount % 4) * 8;
 | 
				
			||||||
 | 
					        lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
 | 
				
			||||||
 | 
					        lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
 | 
				
			||||||
 | 
					        lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
 | 
				
			||||||
 | 
					        return lWordArray;
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    function md5_WordToHex(lValue) {
 | 
				
			||||||
 | 
					        var WordToHexValue = "", WordToHexValue_temp = "", lByte, lCount;
 | 
				
			||||||
 | 
					        for (lCount = 0; lCount <= 3; lCount++) {
 | 
				
			||||||
 | 
					            lByte = (lValue >>> (lCount * 8)) & 255;
 | 
				
			||||||
 | 
					            WordToHexValue_temp = "0" + lByte.toString(16);
 | 
				
			||||||
 | 
					            WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return WordToHexValue;
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    function md5_Utf8Encode(string) {
 | 
				
			||||||
 | 
					        string = string.replace(/\r\n/g, "\n");
 | 
				
			||||||
 | 
					        var utftext = "";
 | 
				
			||||||
 | 
					        for (var n = 0; n < string.length; n++) {
 | 
				
			||||||
 | 
					            var c = string.charCodeAt(n);
 | 
				
			||||||
 | 
					            if (c < 128) {
 | 
				
			||||||
 | 
					                utftext += String.fromCharCode(c);
 | 
				
			||||||
 | 
					            } else if ((c > 127) && (c < 2048)) {
 | 
				
			||||||
 | 
					                utftext += String.fromCharCode((c >> 6) | 192);
 | 
				
			||||||
 | 
					                utftext += String.fromCharCode((c & 63) | 128);
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                utftext += String.fromCharCode((c >> 12) | 224);
 | 
				
			||||||
 | 
					                utftext += String.fromCharCode(((c >> 6) & 63) | 128);
 | 
				
			||||||
 | 
					                utftext += String.fromCharCode((c & 63) | 128);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return utftext;
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    var x = Array();
 | 
				
			||||||
 | 
					    var k, AA, BB, CC, DD, a, b, c, d;
 | 
				
			||||||
 | 
					    var S11 = 7, S12 = 12, S13 = 17, S14 = 22;
 | 
				
			||||||
 | 
					    var S21 = 5, S22 = 9, S23 = 14, S24 = 20;
 | 
				
			||||||
 | 
					    var S31 = 4, S32 = 11, S33 = 16, S34 = 23;
 | 
				
			||||||
 | 
					    var S41 = 6, S42 = 10, S43 = 15, S44 = 21;
 | 
				
			||||||
 | 
					    string = md5_Utf8Encode(string);
 | 
				
			||||||
 | 
					    x = md5_ConvertToWordArray(string);
 | 
				
			||||||
 | 
					    a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
 | 
				
			||||||
 | 
					    for (k = 0; k < x.length; k += 16) {
 | 
				
			||||||
 | 
					        AA = a; BB = b; CC = c; DD = d;
 | 
				
			||||||
 | 
					        a = md5_FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
 | 
				
			||||||
 | 
					        d = md5_FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
 | 
				
			||||||
 | 
					        c = md5_FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
 | 
				
			||||||
 | 
					        b = md5_FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
 | 
				
			||||||
 | 
					        a = md5_FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
 | 
				
			||||||
 | 
					        d = md5_FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
 | 
				
			||||||
 | 
					        c = md5_FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
 | 
				
			||||||
 | 
					        b = md5_FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
 | 
				
			||||||
 | 
					        a = md5_FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
 | 
				
			||||||
 | 
					        d = md5_FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
 | 
				
			||||||
 | 
					        c = md5_FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
 | 
				
			||||||
 | 
					        b = md5_FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
 | 
				
			||||||
 | 
					        a = md5_FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
 | 
				
			||||||
 | 
					        d = md5_FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
 | 
				
			||||||
 | 
					        c = md5_FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
 | 
				
			||||||
 | 
					        b = md5_FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
 | 
				
			||||||
 | 
					        a = md5_GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
 | 
				
			||||||
 | 
					        d = md5_GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
 | 
				
			||||||
 | 
					        c = md5_GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
 | 
				
			||||||
 | 
					        b = md5_GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
 | 
				
			||||||
 | 
					        a = md5_GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
 | 
				
			||||||
 | 
					        d = md5_GG(d, a, b, c, x[k + 10], S22, 0x2441453);
 | 
				
			||||||
 | 
					        c = md5_GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
 | 
				
			||||||
 | 
					        b = md5_GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
 | 
				
			||||||
 | 
					        a = md5_GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
 | 
				
			||||||
 | 
					        d = md5_GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
 | 
				
			||||||
 | 
					        c = md5_GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
 | 
				
			||||||
 | 
					        b = md5_GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
 | 
				
			||||||
 | 
					        a = md5_GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
 | 
				
			||||||
 | 
					        d = md5_GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
 | 
				
			||||||
 | 
					        c = md5_GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
 | 
				
			||||||
 | 
					        b = md5_GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
 | 
				
			||||||
 | 
					        a = md5_HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
 | 
				
			||||||
 | 
					        d = md5_HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
 | 
				
			||||||
 | 
					        c = md5_HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
 | 
				
			||||||
 | 
					        b = md5_HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
 | 
				
			||||||
 | 
					        a = md5_HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
 | 
				
			||||||
 | 
					        d = md5_HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
 | 
				
			||||||
 | 
					        c = md5_HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
 | 
				
			||||||
 | 
					        b = md5_HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
 | 
				
			||||||
 | 
					        a = md5_HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
 | 
				
			||||||
 | 
					        d = md5_HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
 | 
				
			||||||
 | 
					        c = md5_HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
 | 
				
			||||||
 | 
					        b = md5_HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
 | 
				
			||||||
 | 
					        a = md5_HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
 | 
				
			||||||
 | 
					        d = md5_HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
 | 
				
			||||||
 | 
					        c = md5_HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
 | 
				
			||||||
 | 
					        b = md5_HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
 | 
				
			||||||
 | 
					        a = md5_II(a, b, c, d, x[k + 0], S41, 0xF4292244);
 | 
				
			||||||
 | 
					        d = md5_II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
 | 
				
			||||||
 | 
					        c = md5_II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
 | 
				
			||||||
 | 
					        b = md5_II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
 | 
				
			||||||
 | 
					        a = md5_II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
 | 
				
			||||||
 | 
					        d = md5_II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
 | 
				
			||||||
 | 
					        c = md5_II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
 | 
				
			||||||
 | 
					        b = md5_II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
 | 
				
			||||||
 | 
					        a = md5_II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
 | 
				
			||||||
 | 
					        d = md5_II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
 | 
				
			||||||
 | 
					        c = md5_II(c, d, a, b, x[k + 6], S43, 0xA3014314);
 | 
				
			||||||
 | 
					        b = md5_II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
 | 
				
			||||||
 | 
					        a = md5_II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
 | 
				
			||||||
 | 
					        d = md5_II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
 | 
				
			||||||
 | 
					        c = md5_II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
 | 
				
			||||||
 | 
					        b = md5_II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
 | 
				
			||||||
 | 
					        a = md5_AddUnsigned(a, AA);
 | 
				
			||||||
 | 
					        b = md5_AddUnsigned(b, BB);
 | 
				
			||||||
 | 
					        c = md5_AddUnsigned(c, CC);
 | 
				
			||||||
 | 
					        d = md5_AddUnsigned(d, DD);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    if (bit == 32) {
 | 
				
			||||||
 | 
					        return (md5_WordToHex(a) + md5_WordToHex(b) + md5_WordToHex(c) + md5_WordToHex(d)).toLowerCase();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    return (md5_WordToHex(b) + md5_WordToHex(c)).toLowerCase();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -8,7 +8,7 @@
 | 
				
			||||||
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 | 
					    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 | 
				
			||||||
    <title>首页</title>
 | 
					    <title>首页</title>
 | 
				
			||||||
    <link href="../res/css/common.css" rel="stylesheet" type="text/css" />
 | 
					    <link href="../res/css/common.css" rel="stylesheet" type="text/css" />
 | 
				
			||||||
    <script src="../Scripts/jquery-3.6.4.js"></script>
 | 
					    <script src="../Scripts/jquery-3.7.1.min.js"></script>
 | 
				
			||||||
    <script src="../Scripts/layer/layer.js"></script>
 | 
					    <script src="../Scripts/layer/layer.js"></script>
 | 
				
			||||||
    <script src="../Scripts/echarts/echarts.js"></script>
 | 
					    <script src="../Scripts/echarts/echarts.js"></script>
 | 
				
			||||||
    <style>
 | 
					    <style>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,2 @@
 | 
				
			||||||
 | 
					<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="loginApi.aspx.cs" Inherits="FineUIPro.Web.loginApi" %>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,162 @@
 | 
				
			||||||
 | 
					using BLL;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Web;
 | 
				
			||||||
 | 
					using System.Web.UI;
 | 
				
			||||||
 | 
					using System.Web.UI.WebControls;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace FineUIPro.Web
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public partial class loginApi : System.Web.UI.Page
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        string action = string.Empty;
 | 
				
			||||||
 | 
					        string account = string.Empty;
 | 
				
			||||||
 | 
					        string pwd = string.Empty;
 | 
				
			||||||
 | 
					        protected void Page_Load(object sender, EventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            this.action = Request.Params[nameof(action)];
 | 
				
			||||||
 | 
					            this.account = Request.Params[nameof(account)];
 | 
				
			||||||
 | 
					            this.pwd = Request.Params[nameof(pwd)];
 | 
				
			||||||
 | 
					            if (this.action == "login")
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                string url = Login(this.account, this.pwd);
 | 
				
			||||||
 | 
					                Response.Write(url);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private string Login(string account, string pwd)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            string url = "";
 | 
				
			||||||
 | 
					            string userNameProxyUser = "CN=byc_fcl,ou=Proxy-User,ou=EMEA,o=SERVICES";
 | 
				
			||||||
 | 
					            string passwordProxyUser = "3gLFbB5E";
 | 
				
			||||||
 | 
					            string domain = "bgd-ldap-lb.rz-c007-j650.basf-ag.de";
 | 
				
			||||||
 | 
					            string path = "o=AUTH";
 | 
				
			||||||
 | 
					            //string serial = ConfigurationManager.AppSettings["Serial"]; 
 | 
				
			||||||
 | 
					            string serial = "612d524b000000000002";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            bool result = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            try
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                LdapUser ldapuser = new LdapUser();
 | 
				
			||||||
 | 
					                result = AuthenticateUser(account, pwd, userNameProxyUser, passwordProxyUser, domain, path, serial, out ldapuser);
 | 
				
			||||||
 | 
					                if (result)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    var user = from x in Funs.DB.Sys_User where x.Account == account select x;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if (user.Count() == 0)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        Model.Sys_User newUser = new Model.Sys_User();
 | 
				
			||||||
 | 
					                        newUser.UserId = SQLHelper.GetNewID(typeof(Model.Sys_User));
 | 
				
			||||||
 | 
					                        newUser.Account = account;
 | 
				
			||||||
 | 
					                        //newUser.UserName = txtUserName.Text.Trim();
 | 
				
			||||||
 | 
					                        //newUser.Email = txtEmail.Text.Trim();
 | 
				
			||||||
 | 
					                        newUser.UserName = ldapuser.FullName;
 | 
				
			||||||
 | 
					                        newUser.Email = ldapuser.EmailAddress;
 | 
				
			||||||
 | 
					                        newUser.RoleId = Const.Role_CommonUsers;
 | 
				
			||||||
 | 
					                        newUser.IsPost = true;
 | 
				
			||||||
 | 
					                        Funs.DB.Sys_User.InsertOnSubmit(newUser);
 | 
				
			||||||
 | 
					                        Funs.DB.SubmitChanges();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        //Alert.Show("验证通过! "+ txtUserName.Text+"|"+ txtEmail.Text.Trim(), MessageBoxIcon.Success);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        // 更新用户名和邮箱
 | 
				
			||||||
 | 
					                        if (string.IsNullOrEmpty(user.First().UserName) || string.IsNullOrEmpty(user.First().Email))
 | 
				
			||||||
 | 
					                        {
 | 
				
			||||||
 | 
					                            Model.Sys_User newUser = Funs.DB.Sys_User.FirstOrDefault(x => x.UserId == user.First().UserId);
 | 
				
			||||||
 | 
					                            if (newUser != null)
 | 
				
			||||||
 | 
					                            {
 | 
				
			||||||
 | 
					                                newUser.UserName = ldapuser.FullName;
 | 
				
			||||||
 | 
					                                newUser.Email = ldapuser.EmailAddress;
 | 
				
			||||||
 | 
					                                //newUser.UserName = txtUserName.Text.Trim();
 | 
				
			||||||
 | 
					                                //newUser.Email = txtEmail.Text.Trim();
 | 
				
			||||||
 | 
					                                Funs.DB.SubmitChanges();
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if (BLL.Sys_UserService.ADUserLogOn(account, true, this.Page) == true)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        url = "default.htm";
 | 
				
			||||||
 | 
					                        //Response.Redirect("~/default.htm");
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    if (BLL.Sys_UserService.UserLogOn(account, pwd, true, this.Page))
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        url = "default.htm";
 | 
				
			||||||
 | 
					                        //Response.Redirect("~/default.htm");
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        Alert.Show("验证未通过", MessageBoxIcon.Success);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            catch (Exception ex)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                Alert.Show(ex.ToString(), MessageBoxIcon.Success);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return url;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public bool AuthenticateUser(string userName,
 | 
				
			||||||
 | 
					                                    string password,
 | 
				
			||||||
 | 
					                                    string ldapUserName,
 | 
				
			||||||
 | 
					                                    string ldapPassword,
 | 
				
			||||||
 | 
					                                    string ldapDomain,
 | 
				
			||||||
 | 
					                                    string ldapPath,
 | 
				
			||||||
 | 
					                                    string ldapSslSerialKey, out LdapUser ldapUser)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            bool isVaild = false;
 | 
				
			||||||
 | 
					            ldapUser = null;
 | 
				
			||||||
 | 
					            if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(password))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                // momentan in Testversion
 | 
				
			||||||
 | 
					                //Bis.SK.Ldap.LdapQuery query = new LdapQuery(ldapUserName, ldapPassword, ldapDomain, ldapPath);
 | 
				
			||||||
 | 
					                //return query.CheckPassword(userName, password);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                LdapUser user = new LdapUser();
 | 
				
			||||||
 | 
					                LdapAuthentication auth = new LdapAuthentication();
 | 
				
			||||||
 | 
					                auth.UserNameProxyUser = ldapUserName;
 | 
				
			||||||
 | 
					                auth.PasswordProxyUser = ldapPassword;
 | 
				
			||||||
 | 
					                auth.Domain = ldapDomain;
 | 
				
			||||||
 | 
					                auth.Path = ldapPath;
 | 
				
			||||||
 | 
					                auth.UseSecureSocketLayer = true;
 | 
				
			||||||
 | 
					                auth.VerifyCertificateLocally = true;
 | 
				
			||||||
 | 
					                auth.AllowAnyCertificates = true;
 | 
				
			||||||
 | 
					                auth.LocallyVerificationCertificate = null;
 | 
				
			||||||
 | 
					                auth.LocallyVerificationCertificateSerialNumber = ldapSslSerialKey;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (userName.IndexOf('\\') > 0)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    userName = userName.Split('\\')[1];
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    isVaild = auth.CheckPassword(userName, password, out user);
 | 
				
			||||||
 | 
					                    ldapUser = user;
 | 
				
			||||||
 | 
					                    //txtUserName.Text = user.FullName;
 | 
				
			||||||
 | 
					                    //txtEmail.Text = user.EmailAddress;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch (Exception ex)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    isVaild = false;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return isVaild;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,17 @@
 | 
				
			||||||
 | 
					//------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					// <自动生成>
 | 
				
			||||||
 | 
					//     此代码由工具生成。
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//     对此文件的更改可能导致不正确的行为,如果
 | 
				
			||||||
 | 
					//     重新生成代码,则所做更改将丢失。
 | 
				
			||||||
 | 
					// </自动生成>
 | 
				
			||||||
 | 
					//------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace FineUIPro.Web
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public partial class loginApi
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue