login.jsp 2.92 KB
<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!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">
<%
    Cookie[] cookies = request.getCookies();
			String userName = "";
			if (cookies != null && cookies.length > 0) {
				for (int i = 0; i < cookies.length; i++) {
					Cookie cookie = cookies[i];
					if (cookie.getName().equals("userName")) {
						userName = cookie.getValue();
					}
				}
			}
%>
<head>
<jsp:include page="${ctx }/view/common/meta.jsp" />
<link href="${ctx }/resource/css/auth.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	$(function() {
		if ('${msg}' != '') {
			alert('${msg}');
		}
	});
</script>
</head>
<body>
	<jsp:include page="${ctx }/view/common/header1.jsp" />

	<div class="loginbox">
		<div class="logintit">登录</div>
		<div class="logincon">
			<form id="login-form" action="${ctx }/login" method="post">
				<div class="inputs">
					<div class="nameyh">
						账号 <input id="username" name="username" type="text" placeholder="会员号/手机号" class="input0" maxlength="11" value="<%=userName%>" /> 
						<span class="errortip" id="tip-username"></span>
					</div>
					<div class="password">
						密码 <input type="password" name="password" id="password" class="input1" maxlength="8" /> 
						<span class="errortip" id="tip-password"></span>
					</div>
					<%-- <div class="yanzheng">验证码
                    <input name="code" id="code" type="text" class="input0" maxlength="4" /> 
                    <img id="imgCaptcha" alt="验证码" style="vertical-align:middle" src="${ctx }/captcha-image" 
						width="70px;" height="27px;" border="1" id="validaCode" />
                    <a id="changeCaptcha" href="javascript:changeCaptcha()" class="blues">看不清,换一张</a>
                    <span class="errortip" id="tip-code"></span>
                </div>  --%>
					<div class="xieyi">
						<input type="checkbox" id="loginagree" checked="checked" />
						<a target="view_window" href="https://www.zhao.com/trade/article?id=96&cid=9">我已认真阅读并同意遵守《赵涌牛服务协议》 </a> 
						<span class="errortip" id="tip-loginagree"></span>
					</div>
				</div>
				<div class="loginenter">
					<div class="juli">
						<label><input name="remberme" type="checkbox" value="remberme" <%if (!"".equals(userName)) {%> 
							checked="checked" <%}%> id="remberme" /> &nbsp;记住会员号</label>
					</div>
					<a href="#" id="doLogin" class="btnw loginbtn">登录</a>
				</div>
				<input type="hidden" name="referer" value="${referer }" />
			</form>
		</div>
	</div>

	<jsp:include page="${ctx }/view/common/bottom.jsp" />
</body>
</html>