1. 임직원 로그인 페이지 추가
2. 환자 로그인, 회원가입 페이지 추가
This commit is contained in:
@@ -6,12 +6,12 @@ import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class LoginCommand implements Command {
|
||||
public class UserLoginCommand implements Command {
|
||||
@Override
|
||||
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
|
||||
//TODO : DB작업 필요
|
||||
|
||||
|
||||
return "Login.jsp";
|
||||
return "UserLogin.jsp";
|
||||
}
|
||||
}
|
||||
14
hospital/src/main/java/command/patientJoinCommand.java
Normal file
14
hospital/src/main/java/command/patientJoinCommand.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package command;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class patientJoinCommand implements Command{
|
||||
@Override
|
||||
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
|
||||
return "patientJoin.jsp";
|
||||
}
|
||||
}
|
||||
17
hospital/src/main/java/command/patientLoginCommand.java
Normal file
17
hospital/src/main/java/command/patientLoginCommand.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package command;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class patientLoginCommand implements Command {
|
||||
@Override
|
||||
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
|
||||
//TODO : DB작업 필요
|
||||
|
||||
|
||||
return "patientLogin.jsp";
|
||||
}
|
||||
}
|
||||
@@ -13,8 +13,10 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import command.Command;
|
||||
import command.HomeCommand;
|
||||
import command.LoginCommand;
|
||||
import command.UserJoinCommand;
|
||||
import command.UserLoginCommand;
|
||||
import command.patientJoinCommand;
|
||||
import command.patientLoginCommand;
|
||||
|
||||
@WebServlet("/Fcontroller")
|
||||
public class Fcontroller extends HttpServlet {
|
||||
@@ -29,9 +31,11 @@ public class Fcontroller extends HttpServlet {
|
||||
// TODO Auto-generated method stub
|
||||
list = new HashMap<String, Command>();
|
||||
|
||||
list.put("/login.do", new LoginCommand()); //로그인 처리
|
||||
list.put("/home.do", new HomeCommand()); //처음 보여주는 페이지;
|
||||
list.put("/UserLogin.do", new UserLoginCommand()); // 임직원 로그인 처리
|
||||
list.put("/patientlogin.do", new patientLoginCommand()); // 환자 로그인 처리
|
||||
list.put ("/UserJoin.do", new UserJoinCommand()); // 임직원 회원가입 페이지
|
||||
list.put ("/patientJoin.do", new patientJoinCommand()); // 환자 회원가입 페이지
|
||||
//이 부분에 계속적으로 매핑을 추가하면 됨
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<br/>
|
||||
<div><h1>회원 가입</h1></div>
|
||||
<div><h1>임직원 회원 가입</h1></div>
|
||||
<br/>
|
||||
<div>
|
||||
<form id="frm" name="frm" action="memberInsert.do" method="post" onsubmit="return formDataCheck()">
|
||||
|
||||
42
hospital/src/main/webapp/UserLogin.jsp
Normal file
42
hospital/src/main/webapp/UserLogin.jsp
Normal file
@@ -0,0 +1,42 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="icon" href="favicon.ico">
|
||||
|
||||
<title>병원 관리 시스템</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="css/signin.css" rel="stylesheet">
|
||||
</head>
|
||||
<body class="text-center">
|
||||
<h1>A 병원</h1>
|
||||
<form class="form-signin" action="loginCheck.do" method="post">
|
||||
<img class="mb-4" src="img/google_icon.png" alt="" width="100" height="100">
|
||||
<h1 class="h3 mb-3 font-weight-normal">임직원 로그인</h1>
|
||||
<label for="id" class="sr-only">Email address</label>
|
||||
<input type="text" id="id" name="id" class="form-control" placeholder="ID" required autofocus>
|
||||
<label for="pw" class="sr-only">Password</label>
|
||||
<input type="password" id="pw" name="pw" class="form-control" placeholder="Password" required>
|
||||
<div class="checkbox mb-3">
|
||||
<label>
|
||||
<input type="checkbox" value="remember-me"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
<button class="btn btn-UserLogin btn-primary btn-block" type="submit">임직원 로그인</button>
|
||||
<button class="btn btn-UserJoin btn-primary btn-block" onclick="location.href='UserJoin.do'">임직원 가입하기</button>
|
||||
<br/>
|
||||
<a style="text-decoration: none" href="home.do">홈으로</a>
|
||||
<p class="mt-5 mb-3 text-muted">© 2020-2020</p>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -11,7 +11,7 @@
|
||||
<input class="btn btn-UserLogin" type="button" value="임직원로그인" onclick="location.href='UserLogin.do'" >
|
||||
<br>
|
||||
<br>
|
||||
<input class="btn btn-UserJoin" type="button" value="환자가입하기" onclick="location.href='UserJoin.do'">
|
||||
<input class="btn btn-UserLogin" type="button" value="환자로그인" onclick="location.href='UserLogin.do'" >
|
||||
<input class="btn btn-UserJoin" type="button" value="환자가입하기" onclick="location.href='patientJoin.do'">
|
||||
<input class="btn btn-UserLogin" type="button" value="환자로그인" onclick="location.href='patientlogin.do'" >
|
||||
</body>
|
||||
</html>
|
||||
135
hospital/src/main/webapp/patientJoin.jsp
Normal file
135
hospital/src/main/webapp/patientJoin.jsp
Normal file
@@ -0,0 +1,135 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title> 환자 회원가입</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
function idValidCheck(){
|
||||
document.getElementById('exampleModal').modal();
|
||||
}
|
||||
function formDataCheck(){
|
||||
var form = document.frm;
|
||||
|
||||
if(form.name.value==""){
|
||||
alert("사용자 이름을 입력하세요.");
|
||||
form.name.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(form.id.value==""){
|
||||
alert("사용자 아이디를 입력하세요.");
|
||||
form.id.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(form.pw.value==""){
|
||||
alert("사용자 비밀번호를 입력하세요.");
|
||||
form.pw.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(form.pwCheck.value==""){
|
||||
alert("사용자 비밀번호 확인값을 입력하세요.");
|
||||
form.pwCheck.focus();
|
||||
return false;
|
||||
}
|
||||
<!-- form.submit(); button type -->
|
||||
return true; <!-- submit type -->
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<br/>
|
||||
<div><h1>환자 회원 가입</h1></div>
|
||||
<br/>
|
||||
<div>
|
||||
<form id="frm" name="frm" action="memberInsert.do" method="post" onsubmit="return formDataCheck()">
|
||||
<div>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">회원명</th><td colspan="3"><input class="form-control" style="width:30%" type="text" id="name" name="name" maxlength="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">회원ID</th><td colspan="3"> <input class="form-control d-inline" style="width:30%" type="text" id="id" name="id" maxlength="10"> <input class="btn btn-info" type="button" value="중복확인" onclick="idValidCheck()"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">패스워드</th><td colspan="3"><input class="form-control" style="width:30%" id="pw" name="pw" type="password" size="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">패스워드확인</th><td colspan="3"><input class="form-control" style="width:30%" id="pwCheck" name="pwCheck" type="password" size="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주소</th><td colspan="3"><input class="form-control" id="addr" name="addr" type="text" maxlength="50"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">전화번호</th><td><input class="form-control" id="tel" name="tel" type="tel" style="width:30%" maxlength="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">차량번호</th><td><input class="form-control" id="u_car_num" name="u_car_num" type="text" style="width:30%" maxlength="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">생년월일</th><td><input class="form-control" id="u_birth" name="u_birth" type="number" style="width:30%" maxlength="6"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">병과</th><td><input class="form-control" id="u_car_num" name="u_car_num" type="text" style="width:30%" maxlength="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">성별</th>
|
||||
<td>
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input class="custom-control-input" type="radio" id="male" name="gender" value="male" checked>
|
||||
<label class="custom-control-label" for="male">남성</label>
|
||||
</div>
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input class="custom-control-input" type="radio" id="female" name="gender"value="female">
|
||||
<label class="custom-control-label" for="female">여성</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">직책</th>
|
||||
<td colspan="3">
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
<input type="checkbox" class="custom-control-input" id="u_post_0" name="u_post" value="사원">
|
||||
<label class="custom-control-label" for="u_post_0">사원</label>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
<input type="checkbox" class="custom-control-input" id="u_post_1" name="u_post" value="주임">
|
||||
<label class="custom-control-label" for="u_post_1">주임</label>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
<input type="checkbox" class="custom-control-input" id="u_post_2" name="u_post" value="대리">
|
||||
<label class="custom-control-label" for="u_post_2">대리</label>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
<input type="checkbox" class="custom-control-input" id="u_post_3" name="u_post" value="과장">
|
||||
<label class="custom-control-label" for="u_post_3">과장</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<br/>
|
||||
<input class="btn btn-success" type="submit" value="가입하기" > <input class="btn btn-danger" type="reset" value="취소" > <input class="btn btn-primary" type="button" value="홈" onclick="location.href='home.do'">
|
||||
<br/>
|
||||
<br/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
42
hospital/src/main/webapp/patientLogin.jsp
Normal file
42
hospital/src/main/webapp/patientLogin.jsp
Normal file
@@ -0,0 +1,42 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="icon" href="favicon.ico">
|
||||
|
||||
<title>병원 관리 시스템</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="css/signin.css" rel="stylesheet">
|
||||
</head>
|
||||
<body class="text-center">
|
||||
<h1>A 병원</h1>
|
||||
<form class="form-signin" action="loginCheck.do" method="post">
|
||||
<img class="mb-4" src="img/google_icon.png" alt="" width="100" height="100">
|
||||
<h1 class="h3 mb-3 font-weight-normal">로그인 해주세요</h1>
|
||||
<label for="id" class="sr-only">Email address</label>
|
||||
<input type="text" id="id" name="id" class="form-control" placeholder="ID" required autofocus>
|
||||
<label for="pw" class="sr-only">Password</label>
|
||||
<input type="password" id="pw" name="pw" class="form-control" placeholder="Password" required>
|
||||
<div class="checkbox mb-3">
|
||||
<label>
|
||||
<input type="checkbox" value="remember-me"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
<button class="btn btn-UserLogin btn-primary btn-block" type="submit">환자 로그인</button>
|
||||
<button class="btn btn-UserJoin btn-primary btn-block" onclick="location.href='patientJoin.do'">환자 가입하기</button>
|
||||
<br/>
|
||||
<a style="text-decoration: none" href="home.do">홈으로</a>
|
||||
<p class="mt-5 mb-3 text-muted">© 2020-2020</p>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user