4.18
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>注册界面</title>
<link rel="stylesheet" href="layui/css/one.css">
<link rel="stylesheet" href="css/two.css">
</head>
<body>
<div class="wrap">
<img src="img/timg.png" class="imgStyle">
<div class="loginForm">
<form action="registerget.jsp" method="POST">
<div class="logoHead">
</div>
<div class="usernameWrapDiv">
<div class="usernameLabel">
<label>用户名:</label>
</div>
<div class="usernameDiv">
<i class="layui-icon layui-icon-username adminIcon"></i>
<input id="loginUsername" class="layui-input adminInput" type="text" name="name"
placeholder="输入用户名">
</div>
</div>
<div class="usernameWrapDiv">
<div class="usernameLabel">
<label>密码:</label>
</div>
<div class="passwordDiv">
<i class="layui-icon layui-icon-password adminIcon"></i>
<input id="loginPassword" class="layui-input adminInput" type="password" name="password" placeholder="输入密码">
</div>
</div>
<div class="usernameWrapDiv">
<div class="usernameLabel">
<label>确认密码:</label>
</div>
<div class="passwordDiv">
<i class="layui-icon layui-icon-password adminIcon"></i>
<input id="" class="layui-input adminInput" type="password" placeholder="输入密码">
</div>
</div>
<div class="usernameWrapDiv">
<div class="submitLabel">
<label> </label>
</div>
<div class="submitDiv"><input id="loginBtn" type="submit" class="submit layui-btn layui-btn-primary" value="登录">
</div>
</div>
</form>
</div>
</div>
</body>
</html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page language="java" import="java.util.*"%> <%@page import="com.jjy.dao.jspdataDao"%> <%@page import="com.jjy.bean.jspdata"%> <html> <head> <title>注册信息收集界面</title> </head> <body> <% request.setCharacterEncoding("utf-8"); jspdata u= new jspdata(); String uname = request.getParameter("name");uname.trim(); u.setUname(uname); String upwd = request.getParameter("password");upwd.trim(); u.setUpwd(upwd); jspdataDao sd=new jspdataDao(); if(sd.addUers(u)>0){ %><p>注册成功:<%=uname%></p><a href="index.jsp"><button>去登陆</button></a> <% }else{%> <p>输入错误,请重新注册</p><a href="register.jsp"><button>返回注册界面</button></a> <% } %> </body> </html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>登陆界面</title> <link rel="stylesheet" href="layui/css/layui.css"> <link rel="stylesheet" href="css/adminLogin.css"> </head> <body> <div class="wrap"> <img src="img/back.png" class="imgStyle"> <div class="loginForm"> <form action="get.jsp" method="POST"> <div class="logoHead"> </div> <div class="usernameWrapDiv"> <div class="usernameLabel"> <label>用户名:</label> </div> <div class="usernameDiv"> <i class="layui-icon layui-icon-username adminIcon"></i> <input id="loginUsername" class="layui-input adminInput" type="text" name="name" placeholder="输入用户名"> </div> </div> <div class="usernameWrapDiv"> <div class="usernameLabel"> <label>密码:</label> </div> <div class="passwordDiv"> <i class="layui-icon layui-icon-password adminIcon"></i> <input id="loginPassword" class="layui-input adminInput" type="password" name="password" placeholder="输入密码"> </div> </div> <div class="usernameWrapDiv"> <div class="usernameLabel"> <label>验证码:</label> </div> <div class="cardDiv"> <input id="loginCard" class="layui-input cardInput" type="text" name="card" placeholder="输入验证码"> </div> <div id="code_box" class="codeDiv">a1c4(点击切换验证码) </div> </div> <div class="usernameWrapDiv"> <div class="submitLabel"> <label>没有账号?<a href="register.jsp" id="loginRegister">点击注册</a></label> </div> <div class="submitDiv"> <input id="loginBtn" type="submit" class="submit layui-btn layui-btn-primary" value="登录"></input> </div> </div> </form> </div> </div> <script src="js/code.js"></script> </body> </html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body> 您已成功登录! </body> </html>