| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <%@ page contentType="text/html; charset=utf-8" session="false" %>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <!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>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>${siteName }</title>
- <link rel="shortcut icon" type="image/x-icon" href="${contextPath}/favicon.ico" />
- <link href="${contextPath}/images/style.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="${contextPath}/js/ajax.js"></script>
- <script type="text/javascript" src="${contextPath}/js/cookie.js"></script>
- <script type="text/javascript" src="${contextPath}/js/string.js"></script>
- <script type="text/javascript">
- function login(contextPath,username,password) {
- document.getElementById("error_username").innerHTML="";
- document.getElementById("error_password").innerHTML="";
- ajaxget(contextPath+"/admin/user/login.html?username="+username.encode()+"&password="+password.encode(),function(xmlHttp) {
- if (xmlHttp.readyState == 4) {
- if (xmlHttp.status == 200) {
- var dom=xmlHttp.responseXML;
- var status=dom.getElementsByTagName("status")[0].firstChild.nodeValue;
- if (status=="1") {
- document.getElementById("error_username").innerHTML=dom.getElementsByTagName("error")[0].firstChild.nodeValue;
- document.getElementById("username").focus();
- } else if(status=="2") {
- document.getElementById("error_password").innerHTML=dom.getElementsByTagName("error")[0].firstChild.nodeValue;
- document.getElementById("password").focus();
- } else {
- setCookie("__adminuser",dom.getElementsByTagName("userid")[0].firstChild.nodeValue,dom.getElementsByTagName("expire")[0].firstChild.nodeValue);
- window.location.href = "${contextPath}/admin/main.html";
- }
- }
- }
- });
- return false;
- }
- </script>
- </head>
- <body class="logbody">
- <div class="logfrm">
- <form name="loginform" onsubmit="return login('${contextPath}',this.username.value,this.password.value);" class="logact">
- <table border="0" cellpadding="0" cellspacing="8">
- <tr>
- <td>用户名<br /><input type="text" id="username" name="username" class="logtxtsty" /><span id="error_username" style="float:left; color:#FF0000;width: 150px;"></span></td>
- </tr>
- <tr>
- <td>密 码<br /><input type="password" id="password" name="password" class="logtxtsty" /><span id="error_password" style="float:left; color:#FF0000;width: 150px;"></span></td>
- </tr>
- <tr>
- <td><input type="submit" value="" class="logsubsty" /></td>
- </tr>
- </table>
- </form>
- </div>
- </body>
- </html>
|