1. 환자 회원가입, 로그인 추가
2. 임직원 로그인 추가 3. 외래 or 입원, 건강검진 추가 예정
This commit is contained in:
@@ -32,6 +32,17 @@
|
||||
<artifactId>mariadb-java-client</artifactId>
|
||||
<version>2.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>taglibs</groupId>
|
||||
<artifactId>standard</artifactId>
|
||||
<version>1.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>1.1.2</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class UserJoinDao extends BasicDao {
|
||||
UserJoinVo vo = null;
|
||||
|
||||
try {
|
||||
this.psmt = this.conn.prepareStatement("SELECT * FROM user_tbl WHERE u_ID ='?' and u_psw ='?'");
|
||||
this.psmt = this.conn.prepareStatement("SELECT * FROM user_tbl WHERE u_ID =? and u_psw =?");
|
||||
//this.psmt = this.conn.prepareStatement("SELECT u_ID, u_psw FROM user_tbl");
|
||||
|
||||
// while(this.rs.next()) {
|
||||
@@ -55,12 +55,11 @@ public class UserJoinDao extends BasicDao {
|
||||
this.psmt.setString(2, member.getU_psw());
|
||||
this.rs = this.psmt.executeQuery();
|
||||
if (this.rs.next()) {
|
||||
// vo = new UserJoinVo();
|
||||
vo = new UserJoinVo();
|
||||
String id = this.rs.getString("u_ID");
|
||||
String pw = this.rs.getString("u_psw");
|
||||
vo = new UserJoinVo(id, pw); // 이거 왜 이러냐 개샤ㅐ끼야
|
||||
//vo.setU_ID(id);
|
||||
//vo.setU_psw(pw);
|
||||
vo.setU_ID(id);
|
||||
vo.setU_psw(pw);
|
||||
}
|
||||
} catch (SQLException var5) {
|
||||
var5.printStackTrace();
|
||||
|
||||
@@ -53,7 +53,7 @@ public class UserJoinCommand implements Command {
|
||||
UserJoinDao dao = new UserJoinDao();
|
||||
n = dao.memberInsert(member);
|
||||
if (n != 0) {
|
||||
request.setAttribute("joinName", u_name);
|
||||
request.setAttribute("joinName", u_ID);
|
||||
path = "joinOk.jsp";
|
||||
} else {
|
||||
path = "joinFail.jsp";
|
||||
|
||||
24
hospital/src/main/java/command/UserListCommand.java
Normal file
24
hospital/src/main/java/command/UserListCommand.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package command;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import UserJoin.UserJoinDao;
|
||||
import UserJoin.UserJoinVo;
|
||||
|
||||
public class UserListCommand implements Command {
|
||||
|
||||
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
UserJoinDao dao = new UserJoinDao();
|
||||
ArrayList<UserJoinVo> list = dao.select();
|
||||
|
||||
request.setAttribute("members", list);
|
||||
String path = "UserList.jsp";
|
||||
return path;
|
||||
}
|
||||
}
|
||||
@@ -20,13 +20,16 @@ public class UserLoginCheckCommand implements Command {
|
||||
System.out.println("u_psw : " + pw);
|
||||
id = id.trim();
|
||||
pw = pw.trim();
|
||||
member = new UserJoinVo(); // 인스턴스화 안함 왜 빼먹음
|
||||
member.setU_ID(id); // 동일
|
||||
member.setU_psw(pw); // 동일
|
||||
member = dao.selectMember(member);
|
||||
request.setAttribute("member", member);
|
||||
String path;
|
||||
if (member != null) {
|
||||
path = "loginOk.jsp";
|
||||
} else {
|
||||
path = "loginFail.jsp";
|
||||
path = "UserLogin.jsp"; // 실패 시 로그인 화면으로
|
||||
}
|
||||
|
||||
return path;
|
||||
|
||||
@@ -6,9 +6,44 @@ 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";
|
||||
}
|
||||
import patientJoin.patientJoinVo;
|
||||
import patientJoin.patientJoinDao;;
|
||||
|
||||
public class patientJoinCommand implements Command {
|
||||
|
||||
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
String p_ID = request.getParameter("p_ID");
|
||||
String p_name = request.getParameter("p_name");
|
||||
String p_psw = request.getParameter("p_psw");
|
||||
String p_addr = request.getParameter("p_addr");
|
||||
String p_phone = request.getParameter("p_phone");
|
||||
String p_gender = request.getParameter("p_gender");
|
||||
String p_birthYear = request.getParameter("p_birthYear");
|
||||
String p_car_num = request.getParameter("p_car_num");
|
||||
String p_age = request.getParameter("p_age");
|
||||
int n;
|
||||
String path;
|
||||
|
||||
patientJoinVo member = new patientJoinVo();
|
||||
member.setP_ID(p_ID);
|
||||
member.setP_psw(p_psw);
|
||||
member.setP_name(p_name);
|
||||
member.setP_addr(p_addr);
|
||||
member.setP_phone(p_phone);
|
||||
member.setP_gender(p_gender);
|
||||
member.setP_birthYear(p_birthYear);
|
||||
member.setP_car_num(p_car_num);
|
||||
member.setP_age(p_age);
|
||||
|
||||
patientJoinDao dao = new patientJoinDao();
|
||||
n = dao.memberInsert(member);
|
||||
if (n != 0) {
|
||||
request.setAttribute("joinName", p_ID);
|
||||
path = "joinOk.jsp";
|
||||
} else {
|
||||
path = "joinFail.jsp";
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
}
|
||||
37
hospital/src/main/java/command/patientLoginCheckCommand.java
Normal file
37
hospital/src/main/java/command/patientLoginCheckCommand.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package command;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import patientJoin.patientJoinDao;
|
||||
import patientJoin.patientJoinVo;
|
||||
|
||||
public class patientLoginCheckCommand implements Command {
|
||||
|
||||
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
patientJoinDao dao = new patientJoinDao();
|
||||
patientJoinVo member = null;
|
||||
String id = request.getParameter("p_ID");
|
||||
String pw = request.getParameter("p_psw");
|
||||
System.out.println("p_ID : " + id);
|
||||
System.out.println("p_psw : " + pw);
|
||||
id = id.trim();
|
||||
pw = pw.trim();
|
||||
member = new patientJoinVo(); // 인스턴스화 안함 왜 빼먹음
|
||||
member.setP_ID(id); // 동일
|
||||
member.setP_psw(pw); // 동일
|
||||
member = dao.selectMember(member);
|
||||
request.setAttribute("member", member);
|
||||
String path;
|
||||
if (member != null) {
|
||||
path = "patientOK.jsp";
|
||||
} else {
|
||||
path = "patientLogin.jsp"; // 실패 시 로그인 화면으로
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
}
|
||||
17
hospital/src/main/java/command/patientRegCommand.java
Normal file
17
hospital/src/main/java/command/patientRegCommand.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 patientRegCommand implements Command {
|
||||
@Override
|
||||
public String exec(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
|
||||
//TODO : DB작업 필요
|
||||
|
||||
|
||||
return "patientJoin.jsp";
|
||||
}
|
||||
}
|
||||
@@ -15,11 +15,14 @@ import command.BoardViewCommand;
|
||||
import command.Command;
|
||||
import command.HomeCommand;
|
||||
import command.UserJoinCommand;
|
||||
import command.UserListCommand;
|
||||
import command.UserLoginCheckCommand;
|
||||
import command.UserLoginCommand;
|
||||
import command.UserRegCommand;
|
||||
import command.patientJoinCommand;
|
||||
import command.patientLoginCheckCommand;
|
||||
import command.patientLoginCommand;
|
||||
import command.patientRegCommand;
|
||||
|
||||
@WebServlet("/Fcontroller")
|
||||
public class Fcontroller extends HttpServlet {
|
||||
@@ -36,12 +39,15 @@ public class Fcontroller extends HttpServlet {
|
||||
|
||||
list.put("/home.do", new HomeCommand()); //처음 보여주는 페이지;
|
||||
list.put("/UserLogin.do", new UserLoginCommand()); // 임직원 로그인 처리
|
||||
list.put("/UserJoin.do", new UserJoinCommand()); // 임직원 회원가입
|
||||
list.put("/UserReg.do", new UserRegCommand()); // 임직원 회원가입 전달 처리
|
||||
list.put("/loginCheck.do", new UserLoginCheckCommand()); // 임직원 로그인 체크
|
||||
list.put("/patientlogin.do", new patientLoginCommand()); // 환자 로그인 처리
|
||||
list.put("/UserJoin.do", new UserJoinCommand()); // 임직원 로그인 페이지
|
||||
list.put("/UserReg.do", new UserRegCommand()); // 임직원 회원가입 페이지
|
||||
list.put ("/patientJoin.do", new patientJoinCommand()); // 환자 회원가입 페이지
|
||||
list.put("/patientJoin.do", new patientJoinCommand()); // 환자 회원가입 처리
|
||||
list.put("/patientReg.do", new patientRegCommand()); // 환자 회원가입 전달 처리
|
||||
list.put("/patientCheck.do", new patientLoginCheckCommand()); // 환자 로그인 체크
|
||||
list.put("/boardView.do", new BoardViewCommand()); // 데이터 보기 test 페이지
|
||||
list.put("/loginCheck.do", new UserLoginCheckCommand());
|
||||
list.put("/UserList.do", new UserListCommand()); // 유저 리스트 보여주는 페이지
|
||||
//이 부분에 계속적으로 매핑을 추가하면 됨
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,101 @@
|
||||
package patientJoin;
|
||||
|
||||
public class patientJoinDao {
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import DB.BasicDao;
|
||||
import UserJoin.UserJoinVo;
|
||||
|
||||
public class patientJoinDao extends BasicDao {
|
||||
private final String patientJoinJoin_LIST = "SELECT * FROM patient_tbl";
|
||||
private final String patientJoinJoin_CHECK = "SELECT * FROM patient_tbl WHERE u_ID = ? and u_psw = ?";
|
||||
private final String patientJoinJoin_INSERT = "INSERT into patient_tbl values(?,?,?,?,?,?,?)";
|
||||
|
||||
public ArrayList<patientJoinVo> select() {
|
||||
ArrayList list = new ArrayList();
|
||||
|
||||
try {
|
||||
this.psmt = this.conn.prepareStatement("SELECT * FROM patient_tbl");
|
||||
this.rs = this.psmt.executeQuery();
|
||||
|
||||
while(this.rs.next()) {
|
||||
patientJoinVo member = new patientJoinVo();
|
||||
member.setP_ID(this.rs.getString("u_ID"));
|
||||
member.setP_name(this.rs.getString("u_name"));
|
||||
member.setP_addr(this.rs.getString("u_addr"));
|
||||
member.setP_phone(this.rs.getString("u_phone"));
|
||||
member.setP_gender(this.rs.getString("u_gender"));
|
||||
member.setP_age(this.rs.getString("u_age"));
|
||||
member.setP_birthYear(this.rs.getString("u_birth"));
|
||||
member.setP_car_num(this.rs.getString("u_car_num"));
|
||||
|
||||
list.add(member);
|
||||
}
|
||||
} catch (SQLException var3) {
|
||||
var3.printStackTrace();
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public patientJoinVo selectMember(patientJoinVo member) {
|
||||
patientJoinVo vo = null;
|
||||
|
||||
try {
|
||||
this.psmt = this.conn.prepareStatement("SELECT * FROM patient_tbl WHERE p_ID =? and p_psw =?");
|
||||
this.psmt.setString(1, member.getP_ID());
|
||||
this.psmt.setString(2, member.getP_psw());
|
||||
this.rs = this.psmt.executeQuery();
|
||||
if (this.rs.next()) {
|
||||
vo = new patientJoinVo();
|
||||
String id = this.rs.getString("p_ID");
|
||||
String pw = this.rs.getString("p_psw");
|
||||
vo.setP_ID(id);
|
||||
vo.setP_psw(pw);
|
||||
}
|
||||
} catch (SQLException var5) {
|
||||
var5.printStackTrace();
|
||||
}
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
public int memberInsert(patientJoinVo member) {
|
||||
int n = 0;
|
||||
|
||||
try {
|
||||
this.psmt = this.conn.prepareStatement("INSERT into patient_tbl(p_name,p_ID,p_psw,p_age,p_birthYear,p_gender,p_phone,p_addr,p_car_num) values(?,?,?,?,?,?,?,?,?)");
|
||||
this.psmt.setString(1, member.getP_name());
|
||||
this.psmt.setString(2, member.getP_ID());
|
||||
this.psmt.setString(3, member.getP_psw());
|
||||
this.psmt.setString(4, member.getP_age());
|
||||
this.psmt.setString(5, member.getP_birthYear());
|
||||
this.psmt.setString(6, member.getP_gender());
|
||||
this.psmt.setString(7, member.getP_phone());
|
||||
this.psmt.setString(8, member.getP_addr());
|
||||
this.psmt.setString(9, member.getP_car_num());
|
||||
n = this.psmt.executeUpdate();
|
||||
} catch (SQLException var4) {
|
||||
var4.printStackTrace();
|
||||
}
|
||||
try {
|
||||
this.psmt = this.conn.prepareStatement("INSERT into patient_test_tbl(pt_ID,pt_name) values(?,?)");
|
||||
this.psmt.setString(1, member.getP_ID());
|
||||
this.psmt.setString(2, member.getP_name());
|
||||
n = this.psmt.executeUpdate();
|
||||
} catch (SQLException var4) {
|
||||
var4.printStackTrace();
|
||||
}
|
||||
|
||||
try {
|
||||
this.psmt = this.conn.prepareStatement("INSERT into patient_inout_tbl(pio_ID,pio_name) values(?,?)");
|
||||
this.psmt.setString(1, member.getP_ID());
|
||||
this.psmt.setString(2, member.getP_name());
|
||||
n = this.psmt.executeUpdate();
|
||||
} catch (SQLException var4) {
|
||||
var4.printStackTrace();
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,68 @@
|
||||
package patientJoin;
|
||||
|
||||
public class patientJoinVo {
|
||||
public String p_ID;
|
||||
public String p_name;
|
||||
public String p_psw;
|
||||
public String p_age;
|
||||
public String p_addr;
|
||||
public String p_phone;
|
||||
public String p_gender;
|
||||
public String p_birthYear;
|
||||
public String p_car_num;
|
||||
|
||||
public String getP_ID() {
|
||||
return p_ID;
|
||||
}
|
||||
public void setP_ID(String p_ID) {
|
||||
this.p_ID = p_ID;
|
||||
}
|
||||
public String getP_name() {
|
||||
return p_name;
|
||||
}
|
||||
public void setP_name(String p_name) {
|
||||
this.p_name = p_name;
|
||||
}
|
||||
public String getP_psw() {
|
||||
return p_psw;
|
||||
}
|
||||
public void setP_psw(String p_psw) {
|
||||
this.p_psw = p_psw;
|
||||
}
|
||||
public String getP_age() {
|
||||
return p_age;
|
||||
}
|
||||
public void setP_age(String p_age) {
|
||||
this.p_age = p_age;
|
||||
}
|
||||
public String getP_addr() {
|
||||
return p_addr;
|
||||
}
|
||||
public void setP_addr(String p_addr) {
|
||||
this.p_addr = p_addr;
|
||||
}
|
||||
public String getP_phone() {
|
||||
return p_phone;
|
||||
}
|
||||
public void setP_phone(String p_phone) {
|
||||
this.p_phone = p_phone;
|
||||
}
|
||||
public String getP_gender() {
|
||||
return p_gender;
|
||||
}
|
||||
public void setP_gender(String p_gender) {
|
||||
this.p_gender = p_gender;
|
||||
}
|
||||
public String getP_birthYear() {
|
||||
return p_birthYear;
|
||||
}
|
||||
public void setP_birthYear(String p_birthYear) {
|
||||
this.p_birthYear = p_birthYear;
|
||||
}
|
||||
public String getP_car_num() {
|
||||
return p_car_num;
|
||||
}
|
||||
public void setP_car_num(String p_car_num) {
|
||||
this.p_car_num = p_car_num;
|
||||
}
|
||||
}
|
||||
|
||||
65
hospital/src/main/webapp/UserList.jsp
Normal file
65
hospital/src/main/webapp/UserList.jsp
Normal file
@@ -0,0 +1,65 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<jsp:include page="menu.jsp" />
|
||||
<html>
|
||||
<head>
|
||||
<title>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>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<br/>
|
||||
<h1 class="text-center">회원 리스트</h1>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-12">
|
||||
<table id="tb" class="table table-hover">
|
||||
<c:choose>
|
||||
<c:when test="${empty members}">
|
||||
<tr>
|
||||
<td colspan="6" align="center"> 데이터가 없습니다.</td>
|
||||
</tr>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th scope="col">아이디</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">주소</th>
|
||||
<th scope="col">전화</th>
|
||||
<th scope="col">성별</th>
|
||||
<th scope="col">차량번호</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${members}" var = "member">
|
||||
<tr>
|
||||
<td>${member.u_ID}</td>
|
||||
<td>${member.u_name}</td>
|
||||
<td>${member.u_addr}</td>
|
||||
<td>${member.u_phone}</td>
|
||||
<td>${member.u_gender}</td>
|
||||
<td>${member.u_car_num}</td>
|
||||
</tr>
|
||||
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<jsp:include page="tail.jsp" />
|
||||
@@ -33,7 +33,7 @@
|
||||
</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>
|
||||
<button class="btn btn-UserJoin btn-primary btn-block" onclick="location.href='UserReg.do'">임직원 가입하기</button>
|
||||
<br/>
|
||||
<a style="text-decoration: none" href="home.do">홈으로</a>
|
||||
<p class="mt-5 mb-3 text-muted">© 2020-2020</p>
|
||||
|
||||
@@ -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='patientJoin.do'">
|
||||
<input class="btn btn-UserJoin" type="button" value="환자가입하기" onclick="location.href='patientReg.do'">
|
||||
<input class="btn btn-UserLogin" type="button" value="환자로그인" onclick="location.href='patientlogin.do'" >
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,7 +8,7 @@
|
||||
<body>
|
||||
<div align="center">
|
||||
<div><br/></div>
|
||||
<div><h1>입력한 ${param.id}는 존재하지 않는 아이디 입니다.</h1></div>
|
||||
<div><h1>입력한 ${param.u_ID}는 존재하지 않는 아이디 입니다.</h1></div>
|
||||
<div><br/></div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div align="center">
|
||||
<div><h1>${requestScope.member.id} 님 환영합니다</h1></div>
|
||||
<div><h1>${requestScope.member.u_ID} 님 환영합니다</h1></div> <!-- u_ID -->
|
||||
<div><br/></div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -22,32 +22,10 @@
|
||||
<a class="nav-link" href="home.do">메인 <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="memberList.do">회원리스트</a>
|
||||
<a class="nav-link" href="UserList.do">회원리스트</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="boardList.do">자유게시판</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="UserReg.do">회원가입</a>
|
||||
</li>
|
||||
<!--<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Dropdown
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
</li>-->
|
||||
<!--<li class="nav-item">
|
||||
<a class="nav-link disabled" href="#">Disabled</a>
|
||||
</li>-->
|
||||
</ul>
|
||||
<form class="form-inline my-2 my-lg-0">
|
||||
<!--<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">-->
|
||||
<button class="btn btn-outline-success my-2 my-sm-0" type="button" onclick="location='UserLogin.do'">로그인</button>
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
113
hospital/src/main/webapp/patientInout.jsp
Normal file
113
hospital/src/main/webapp/patientInout.jsp
Normal file
@@ -0,0 +1,113 @@
|
||||
<%@ 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.p_name.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(form.id.value==""){
|
||||
alert("사용자 아이디를 입력하세요.");
|
||||
form.p_ID.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(form.pw.value==""){
|
||||
alert("사용자 비밀번호를 입력하세요.");
|
||||
form.p_psw.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(form.pwCheck.value==""){
|
||||
alert("사용자 비밀번호 확인값을 입력하세요.");
|
||||
form.p_pswCheck.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="patientJoin.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="p_name" name="p_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="p_ID" name="p_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="p_psw" name="p_psw" type="password" size="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">패스워드확인</th><td colspan="3"><input class="form-control" style="width:30%" id="p_pswCheck" name="p_pswCheck" type="password" size="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">주소</th><td colspan="3"><input class="form-control" id="p_addr" name="p_addr" type="text" maxlength="50"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">전화번호</th><td><input class="form-control" id="p_phone" name="p_phone" type="tel" style="width:30%" maxlength="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">차량번호</th><td><input class="form-control" id="p_car_num" name="p_car_num" type="text" style="width:30%" maxlength="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">생년월일</th><td><input class="form-control" id="p_birthYear" name="p_birthYear" type="date" style="width:30%" maxlength="6"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">나이</th><td><input class="form-control" id="p_age" name="p_age" type="number" style="width:30%" maxlength="3"></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="p_gender" value="남성" 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="p_gender"value="여성">
|
||||
<label class="custom-control-label" for="female">여성</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>
|
||||
@@ -17,25 +17,25 @@
|
||||
|
||||
if(form.name.value==""){
|
||||
alert("사용자 이름을 입력하세요.");
|
||||
form.name.focus();
|
||||
form.p_name.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(form.id.value==""){
|
||||
alert("사용자 아이디를 입력하세요.");
|
||||
form.id.focus();
|
||||
form.p_ID.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(form.pw.value==""){
|
||||
alert("사용자 비밀번호를 입력하세요.");
|
||||
form.pw.focus();
|
||||
form.p_psw.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(form.pwCheck.value==""){
|
||||
alert("사용자 비밀번호 확인값을 입력하세요.");
|
||||
form.pwCheck.focus();
|
||||
form.p_pswCheck.focus();
|
||||
return false;
|
||||
}
|
||||
<!-- form.submit(); button type -->
|
||||
@@ -51,33 +51,33 @@
|
||||
<div><h1>환자 회원 가입</h1></div>
|
||||
<br/>
|
||||
<div>
|
||||
<form id="frm" name="frm" action="memberInsert.do" method="post" onsubmit="return formDataCheck()">
|
||||
<form id="frm" name="frm" action="patientJoin.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>
|
||||
<th scope="row">환자성명</th><td colspan="3"><input class="form-control" style="width:30%" type="text" id="p_name" name="p_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>
|
||||
<th scope="row">회원ID</th><td colspan="3"> <input class="form-control d-inline" style="width:30%" type="text" id="p_ID" name="p_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>
|
||||
<th scope="row">패스워드</th><td colspan="3"><input class="form-control" style="width:30%" id="p_psw" name="p_psw" 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>
|
||||
<th scope="row">패스워드확인</th><td colspan="3"><input class="form-control" style="width:30%" id="p_pswCheck" name="p_pswCheck" 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>
|
||||
<th scope="row">주소</th><td colspan="3"><input class="form-control" id="p_addr" name="p_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>
|
||||
<th scope="row">전화번호</th><td><input class="form-control" id="p_phone" name="p_phone" 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>
|
||||
<th scope="row">차량번호</th><td><input class="form-control" id="p_car_num" name="p_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>
|
||||
<th scope="row">생년월일</th><td><input class="form-control" id="p_birthYear" name="p_birthYear" type="date" style="width:30%" maxlength="6"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">나이</th><td><input class="form-control" id="p_age" name="p_age" type="number" style="width:30%" maxlength="3"></td>
|
||||
@@ -86,11 +86,11 @@
|
||||
<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>
|
||||
<input class="custom-control-input" type="radio" id="male" name="p_gender" value="남성" 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">
|
||||
<input class="custom-control-input" type="radio" id="female" name="p_gender"value="여성">
|
||||
<label class="custom-control-label" for="female">여성</label>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -20,20 +20,20 @@
|
||||
</head>
|
||||
<body class="text-center">
|
||||
<h1>A 병원</h1>
|
||||
<form class="form-signin" action="loginCheck.do" method="post">
|
||||
<form class="form-signin" action="patientCheck.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>
|
||||
<input type="text" id="p_ID" name="p_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>
|
||||
<input type="password" id="p_psw" name="p_psw" 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>
|
||||
<button class="btn btn-UserJoin btn-primary btn-block" onclick="location.href='patientReg.do'">환자 가입하기</button>
|
||||
<br/>
|
||||
<a style="text-decoration: none" href="home.do">홈으로</a>
|
||||
<p class="mt-5 mb-3 text-muted">© 2020-2020</p>
|
||||
|
||||
37
hospital/src/main/webapp/patientMenu.jsp
Normal file
37
hospital/src/main/webapp/patientMenu.jsp
Normal file
@@ -0,0 +1,37 @@
|
||||
<%@ 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>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<a class="navbar-brand" href="home.do">병원 종합 관리 시스템</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="home.do">메인 <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="UserList.do">일반병실</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="UserList.do">건강검진</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="form-inline my-2 my-lg-0">
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
hospital/src/main/webapp/patientOK.jsp
Normal file
17
hospital/src/main/webapp/patientOK.jsp
Normal file
@@ -0,0 +1,17 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<jsp:include page="patientMenu.jsp" />
|
||||
<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>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>로그인 성공</title>
|
||||
</head>
|
||||
<body>
|
||||
<div align="center">
|
||||
<div><h1>${requestScope.member.p_ID} 님 환영합니다</h1></div> <!-- u_ID -->
|
||||
<div><br/></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<jsp:include page="tail.jsp" />
|
||||
Reference in New Issue
Block a user