/*프로필 게시판*/
/*name,office_name,office_phone,id -변호사 회원가입 테이블 불러오기*/
/*나머지는 프로필 글쓰기로 insert*/
CREATE TABLE profile_board
(
seq NUMBER primary key,
name VARCHAR2(20) NOT NULL,
title VARCHAR2(10) NOT NULL,
phone VARCHAR2(20) NOT NULL,
specialty VARCHAR2(20) NOT NULL,
office_name VARCHAR2(50) NOT NULL,
office_phone VARCHAR2(20) NOT NULL,
test VARCHAR2(50) NOT NULL,
education VARCHAR2(10) NOT NULL,
id VARCHAR2(20) NOT NULL
);
create sequence profile_board_seq
start with 1
increment by 1
nocache
nomaxvalue;
insert into profile_board values(
profile_board_seq.nextval,
'name'||profile_board_seq.currval,
'test',
'test',
'test',
'test',
'test',
'test',
'test',
'id'||profile_board_seq.currval);
select * from profile_board;
/*카테고리 테이블*/
/*일단 개발자가 만들어 놓고 관계테이블에서 join하는 용도*/
/*나중에 시간 남으면 관리자가 추가 제거?*/
CREATE TABLE category
(
category_code VARCHAR2(20) primary key,
category_name VARCHAR2(20) NOT NULL
);
insert into category values('c01','이혼');
insert into category values('c02','부동산');
insert into category values('c03','형사');
insert into category values('c04','세금');
select * from category;
CREATE TABLE lawyer_category
(
lawyer_id VARCHAR2(20) NOT NULL,
category_code VARCHAR2(20) NOT NULL
);
insert into lawyer_category values('id1','c01');
insert into lawyer_category values('id1','c02');
insert into lawyer_category values('id2','c01');
insert into lawyer_category values('id2','c04');
insert into lawyer_category values('id3','c04');
insert into lawyer_category values('id4','c01');
insert into lawyer_category values('id4','c02');
insert into lawyer_category values('id4','c03');
select * from lawyer_category;
/*아이디 - 카테고리 코드 - 카테고리 이름*/
select
*
from lawyer_category lc , category c
where
lc.category_code = c.category_code;
commit;
/*이름 - 카테고리 출력*/
select
pb.name, c.category_name
from profile_board pb, lawyer_category lc , category c
where
pb.id = lc.lawyer_id and
lc.category_code = c.category_code;
drop table profile_board;
drop table lawyer_category;
drop table category;
drop sequence profile_board_seq;
프로필 작성 페이지 초안
- 이미지 업로드 미구현
- 전문분야 선택 애매
profileWriteView.jsp
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<script>
$
</script>
</head>
<body>
<!--인증된 변호사라면 들어올 수 있는 프로필 작성 페이지-->
<!--lawyer 테이블에서 가져올 수 없는 정보 기입 -->
<div class="accordion" id="accordionExample">
<div class="card">
<div class="card-header" id="headingOne">
<h2 class="mb-0">
<button class="btn btn-dark btn-block text-left" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
프로필 정보 입력
</button>
</h2>
</div>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordionExample">
<div class="card-body">
<!--title 프로필 제목 (홍보문구)-->
<!--test 변호사 시험 유형 input? -->
<!--education 경력 교육 이력 textarea? -->
<form>
<div class="form-group">
<label for="exampleFormControlInput1">프로필 제목</label>
<input type="email" class="form-control" id="exampleFormControlInput1" placeholder="회원님을 표현하는 제목을 입력해주세요">
</div>
<div class="form-group">
<label for="exampleFormControlSelect1">출신시험 선택</label>
<select class="form-control" id="exampleFormControlSelect1">
<option>사법시험</option>
<option>변호사시험</option>
<option>군법무관 임용시험</option>
<option>고등고시</option>
</select>
</div>
<div class="form-group">
<label for="exampleFormControlTextarea1">이력 사항</label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
</div>
</form>
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingTwo">
<h2 class="mb-0">
<button class="btn btn-dark btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
전문 분야 선택
</button>
</h2>
</div>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample">
<div class="card-body">
<!--specialty 선택(전문분야)하면 dao 에서 lawyer_category에 insert 아이디, category_code -->
<!--체그박스 대신 버튼 형으로는?-->
<div class="list-group">
<button type="button" class="list-group-item list-group-item-action">
이혼
</button>
<button type="button" class="list-group-item list-group-item-action">부동산</button>
<button type="button" class="list-group-item list-group-item-action">형사</button>
<button type="button" class="list-group-item list-group-item-action">세금</button>
<button type="button" class="list-group-item list-group-item-action" disabled>분쟁</button>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="inlineCheckbox1" value="option1">
<label class="form-check-label" for="inlineCheckbox1">1</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="inlineCheckbox2" value="option2">
<label class="form-check-label" for="inlineCheckbox2">2</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="inlineCheckbox3" value="option3" disabled>
<label class="form-check-label" for="inlineCheckbox3">3 (disabled)</label>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingThree">
<h2 class="mb-0">
<button class="btn btn-dark btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
이미지 업로드
</button>
</h2>
</div>
<div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="card-body">
<!--프로필 이미지 아직 미구현 -->
<form>
<div class="form-group">
<label for="exampleFormControlFile1">Example file input</label>
<input type="file" class="form-control-file" id="exampleFormControlFile1">
</div>
</form>
</div>
</div>
</div>
</div>
</body></html>
'디지털 컨버전스 > Project' 카테고리의 다른 글
[LawView] 프로필 쓰기 오류 (0) | 2020.05.14 |
---|---|
[LawView] 프로필 게시판 (0) | 2020.05.14 |
[Project] 첨부파일 목록 (0) | 2020.05.13 |
[Project] 파일 업로드 (0) | 2020.05.13 |
[Project] url 줄이기 (0) | 2020.05.13 |