Toggle navigation
Toggle navigation
This project
Loading...
Sign in
정지윤
/
project_opensource
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
정지윤
2017-12-06 12:05:48 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e96c4ab2706ef3b0ab6b5f1a74a3de36b87bc21b
e96c4ab2
1 parent
6f12697e
데이터베이스 오류 수정
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
232 additions
and
218 deletions
public/img/그림1.jpg
routes/index.js
views/first.ejs
views/pay.ejs
views/reservation.ejs
public/img/그림1.jpg
0 → 100644
View file @
e96c4ab
60.7 KB
routes/index.js
View file @
e96c4ab
...
...
@@ -30,9 +30,8 @@ router.post('/reservation',function(req, res){
var
restime
=
req
.
body
.
restime
;
var
resmin
=
req
.
body
.
resmin
;
var
date
=
req
.
body
.
date
;
var
food
=
req
.
body
.
food
;
var
content
=
req
.
body
.
content
;
var
food
=
req
.
body
.
food
;
pool
.
getConnection
(
function
(
err
,
connection
)
{
// Use the connection
...
...
@@ -40,6 +39,7 @@ router.post('/reservation',function(req, res){
connection
.
query
(
sqlForInsertBoard
,
function
(
err
,
rows
)
{
if
(
err
)
console
.
error
(
"err : "
+
err
);
console
.
log
(
"rows : "
+
JSON
.
stringify
(
rows
));
res
.
redirect
(
'/resconfirm'
);
connection
.
release
();
// Don't use the connection here, it has been returned to the pool.
});
...
...
@@ -75,6 +75,7 @@ router.get('/db', function(req, res){
/* GET home page. */
router
.
get
(
'/pay'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'pay'
,
{
title
:
'결제'
});
res
.
render
(
'first'
);
});
module
.
exports
=
router
;
...
...
views/first.ejs
View file @
e96c4ab
...
...
@@ -63,7 +63,7 @@
<div
class=
"col-lg-8 mx-auto"
>
<h1
class=
"brand-heading"
style=
"background-color: rgba( 0, 0, 0, 0.7 );"
>
별빛바다 달빛초원
</h1>
<p
class=
"intro-text"
>
<br>
정지윤
</p>
<br>
아래로 내리세요
</p>
<a
href=
"#about"
class=
"btn btn-circle js-scroll-trigger"
>
<i
class=
"fa fa-angle-double-down animated"
></i>
</a>
...
...
views/pay.ejs
View file @
e96c4ab
...
...
@@ -44,7 +44,7 @@
buyer_tel
:
'010-8762-3073'
,
buyer_addr
:
'서울특별시 강남구 삼성동'
,
buyer_postcode
:
'123-456'
,
m_redirect_url
:
'http
s://localhost:3000/resconfirm
'
m_redirect_url
:
'http
://localhost:3000/reservation
'
},
function
(
rsp
)
{
if
(
rsp
.
success
)
{
var
msg
=
'결제가 완료되었습니다.'
;
...
...
@@ -52,11 +52,17 @@
msg
+=
'상점 거래ID : '
+
rsp
.
merchant_uid
;
msg
+=
'결제 금액 : '
+
rsp
.
paid_amount
;
msg
+=
'카드 승인번호 : '
+
rsp
.
apply_num
;
}
else
{
alert
(
msg
);
document
.
location
.
href
=
"/reservation"
;
}
else
{
var
msg
=
'결제에 실패하였습니다.'
;
msg
+=
'에러내용 : '
+
rsp
.
error_msg
;
alert
(
msg
);
document
.
location
.
href
=
"/first"
;
}
alert
(
msg
);
});
</script>
</html>
...
...
views/reservation.ejs
View file @
e96c4ab
...
...
@@ -35,241 +35,249 @@
}
</style>
<section
id=
"about"
class=
"reservationTheme content-section "
>
<div
class=
"container"
>
<div
class=
"container"
>
<br><br>
<h2>
Reservation
<br>
예약하기
</h2>
<br><br>
<form
class=
"well form-horizontal"
action=
" "
method=
"post"
id=
"contact_form"
>
<fieldset>
<form
method=
"POST"
action=
"/reservation"
>
<!-- Form Name -->
<!-- Text input-->
<form
class=
"well form-horizontal"
action=
" "
method=
"post"
id=
"contact_form"
>
<fieldset>
<form
method=
"POST"
action=
"/reservation"
>
<!-- Text input-->
<!-- Button -->
<div
class=
"form-group"
>
<div
class=
"col-md-4 inputGroupContainer "
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label "
>
이름
</label>
<i
class=
"glyphicon glyphicon-envelope"
></i>
<input
name=
"creater_id"
placeholder=
"홍길동"
class=
"form-control"
type=
"text"
>
</div>
<div
class=
"inputGroupContainer "
>
<label
class=
"col-md-4 control-label"
></label>
<div
class=
"col-md-4"
>
잠깐! No Show 문제를 방지하기 위해 예약 전, 선금 2000원을 입금해야 합니다!
<a
href=
"/pay"
class=
"btn btn-default btn-lg"
>
입금하기
</a>
<a
href=
"/first"
class=
"btn btn-default btn-lg"
>
돌아가기
</a>
</div>
</div>
<!-- 휴대전화-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 inputGroupContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
휴대전화
</label>
<i
class=
"glyphicon glyphicon-earphone"
></i>
<input
name=
"phone"
placeholder=
"0101234567"
class=
"form-control"
type=
"text"
>
</div>
</div>
</div>
<!-- Text input-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 inputGroupContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
이메일주소
</label>
<br>
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
<br>
<br>
<br>
<!-- 이름-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 inputGroupContainer "
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label "
>
이름
</label>
<i
class=
"glyphicon glyphicon-envelope"
></i>
<input
name=
"creater_id"
placeholder=
"홍길동"
class=
"form-control"
type=
"text"
>
</div>
</div>
</div>
<!-- 휴대전화-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 inputGroupContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
휴대전화
</label>
<i
class=
"glyphicon glyphicon-earphone"
></i>
<input
name=
"phone"
placeholder=
"0101234567"
class=
"form-control"
type=
"text"
>
</div>
</div>
</div>
<i
class=
"glyphicon glyphicon-envelope"
></i>
<input
name=
"email"
placeholder=
"E-Mail Address"
class=
"form-control"
type=
"text"
>
</div>
</div>
</div>
<!--인원수-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
인원 수
</label>
<i
class=
"glyphicon glyphicon-list"
></i>
<select
name=
"num"
class=
"form-control selectpicker"
>
<option>
1~4명
</option>
<option>
5~10명
</option>
<option
>
10명~15명
</option>
<option
>
15명~20명
</option>
<option
>
20명 이상
</option>
</select>
</div>
</div>
</div>
<!--예약시간-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
예약 시간
</label>
<i
class=
"glyphicon glyphicon-list"
></i>
<select
name=
"restime"
class=
"form-control selectpicker"
>
<option
value=
" "
>
시간
</option>
<option>
10시
</option>
<option>
11시
</option>
<option>
12시
</option>
<option>
13시
</option>
<option>
14시
</option>
<option>
15시
</option>
<option>
16시
</option>
<option>
17시
</option>
<option>
18시
</option>
<option>
19시
</option>
<option>
20시
</option>
</select>
<select
name=
"resmin"
class=
"form-control selectpicker"
>
<option
value=
" "
>
분
</option>
<option>
00분
</option>
<option>
15분
</option>
<option>
30분
</option>
<option>
45분
</option>
</select>
</div>
</div>
</div>
<!-- 이메일주소-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 inputGroupContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
이메일주소
</label>
<i
class=
"glyphicon glyphicon-envelope"
></i>
<input
name=
"email"
placeholder=
"E-Mail Address"
class=
"form-control"
type=
"text"
>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<!--인원수-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
인원 수
</label>
<i
class=
"glyphicon glyphicon-list"
></i>
<select
name=
"num"
class=
"form-control selectpicker"
>
<option>
1~4명
</option>
<option>
5~10명
</option>
<option
>
10명~15명
</option>
<option
>
15명~20명
</option>
<option
>
20명 이상
</option>
</select>
</div>
</div>
</div>
<label
class=
"col-md-4 control-label"
>
예약 날짜
</label>
<div
class=
"input-group input-append date"
id=
"dateRangePicker"
>
</div>
<script>
$
(
'#dateRangePicker'
).
datepicker
({
format
:
"yyyy-mm-dd"
,
language
:
"kr"
});
</script>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
></label>
<i
class=
"glyphicon glyphicon-list"
></i>
<select
name=
"date"
class=
"form-control selectpicker"
>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
1
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
2
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
3
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
4
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
5
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
6
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
7
,
"일 (예약은 1주일까지만 가능합니다)"
)
</script>
</option>
</select>
</div>
</div>
</div>
<!--예약시간-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
예약 시간
</label>
<i
class=
"glyphicon glyphicon-list"
></i>
<select
name=
"restime"
class=
"form-control selectpicker"
>
<option
value=
" "
>
시간
</option>
<option>
10시
</option>
<option>
11시
</option>
<option>
12시
</option>
<option>
13시
</option>
<option>
14시
</option>
<option>
15시
</option>
<option>
16시
</option>
<option>
17시
</option>
<option>
18시
</option>
<option>
19시
</option>
<option>
20시
</option>
</select>
<select
name=
"resmin"
class=
"form-control selectpicker"
>
<option
value=
" "
>
분
</option>
<option>
00분
</option>
<option>
15분
</option>
<option>
30분
</option>
<option>
45분
</option>
</select>
</div>
</div>
</div>
<!-- radio checks-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
메뉴
</label>
<div
class=
"checkbox"
>
<label>
<image
src =
"/img/pizza.jpg"
width=
100
height=
100
>
<br><input
type=
"checkbox"
name=
"food"
value=
"pizza"
/>
피자
</label>
<!--달력-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
예약 날짜
</label>
<div
class=
"input-group input-append date"
id=
"dateRangePicker"
>
</div>
<script>
$
(
'#dateRangePicker'
).
datepicker
({
format
:
"yyyy-mm-dd"
,
language
:
"kr"
});
</script>
</div>
</div>
<div
class=
"checkbox"
>
<label>
<image
src =
"/img/파스타.jpg"
width=
100
height=
100
>
<br><input
type=
"checkbox"
name=
"food"
value=
"pasta"
/>
파스타
</label>
</div>
<div
class=
"checkbox"
>
<label>
<image
src =
"/img/와인.jpg"
width=
100
height=
100
>
<br><input
type=
"checkbox"
name=
"food"
value=
"wine"
/>
와인
</label>
<!--예약날짜-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
></label>
<i
class=
"glyphicon glyphicon-list"
></i>
<select
name=
"date"
class=
"form-control selectpicker"
>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
1
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
2
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
3
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
4
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
5
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
6
,
"일"
)
</script>
</option>
<option><script
language=
"JavaScript"
>
var
today
=
new
Date
(
)
document
.
write
(
today
.
getMonth
(
)
+
1
,
"월 "
,
today
.
getDate
(
)
+
7
,
"일 (예약은 1주일까지만 가능합니다)"
)
</script>
</option>
</select>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 메뉴체크-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
메뉴
</label>
<div
class=
"checkbox"
>
<label>
<image
src =
"/img/pizza.jpg"
width=
100
height=
100
>
<br><input
type=
"checkbox"
name=
"food"
value=
"pizza"
/>
피자
</label>
</div>
<div
class=
"checkbox"
>
<label>
<image
src =
"/img/파스타.jpg"
width=
100
height=
100
>
<br><input
type=
"checkbox"
name=
"food"
value=
"pasta"
/>
파스타
</label>
</div>
<div
class=
"checkbox"
>
<label>
<image
src =
"/img/와인.jpg"
width=
100
height=
100
>
<br><input
type=
"checkbox"
name=
"food"
value=
"wine"
/>
와인
</label>
</div>
</div>
</div>
</div>
<br>
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
요청 사항
</label>
<i
class=
"glyphicon glyphicon-pencil"
></i>
<textarea
class=
"form-control"
name=
"content"
placeholder=
"요청 사항을 적어주세요."
style=
"width:310px; height:100px;"
></textarea>
</div>
</div>
<br>
<!-- 요청사항-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
요청 사항
</label>
<i
class=
"glyphicon glyphicon-pencil"
></i>
<textarea
class=
"form-control"
name=
"content"
placeholder=
"요청 사항을 적어주세요."
style=
"width:310px; height:100px;"
></textarea>
</div>
</div>
</div>
<br>
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
<!-- 예약완료 버튼-->
<div
class=
"form-group"
>
<label
class=
"col-md-4 control-label"
></label>
<div
class=
"col-md-4"
>
<button
type=
"submit"
class=
"btn btn-warning"
>
예약
<span
class=
"glyphicon glyphicon-send"
></span></button>
</div>
</div>
<!-- Button -->
<div
class=
"form-group"
>
<label
class=
"col-md-4 control-label"
></label>
<div
class=
"col-md-4"
>
잠깐! No Show 문제를 방지하기 위해 예약 전, 선금 2000원을 입금해야 합니다!
<a
href=
"/pay"
class=
"btn btn-default btn-lg"
>
입금하기
</a>
<a
href=
"/first"
class=
"btn btn-default btn-lg"
>
돌아가기
</a>
</div>
</div>
</form>
</fieldset>
</form>
</div>
</div>
</script>
</fieldset>
</form>
</div>
<script>
...
...
@@ -347,7 +355,6 @@
return
false
;
}
}
</script>
...
...
Please
register
or
login
to post a comment