Showing
5 changed files
with
46 additions
and
32 deletions
public/img/그림1.jpg
0 → 100644
60.7 KB
| ... | @@ -30,9 +30,8 @@ router.post('/reservation',function(req, res){ | ... | @@ -30,9 +30,8 @@ router.post('/reservation',function(req, res){ |
| 30 | var restime = req.body.restime; | 30 | var restime = req.body.restime; |
| 31 | var resmin = req.body.resmin; | 31 | var resmin = req.body.resmin; |
| 32 | var date = req.body.date; | 32 | var date = req.body.date; |
| 33 | - | ||
| 34 | - var content = req.body.content; | ||
| 35 | var food = req.body.food; | 33 | var food = req.body.food; |
| 34 | + var content = req.body.content; | ||
| 36 | pool.getConnection(function (err, connection) | 35 | pool.getConnection(function (err, connection) |
| 37 | { | 36 | { |
| 38 | // Use the connection | 37 | // Use the connection |
| ... | @@ -40,6 +39,7 @@ router.post('/reservation',function(req, res){ | ... | @@ -40,6 +39,7 @@ router.post('/reservation',function(req, res){ |
| 40 | connection.query(sqlForInsertBoard, function (err, rows) { | 39 | connection.query(sqlForInsertBoard, function (err, rows) { |
| 41 | if (err) console.error("err : " + err); | 40 | if (err) console.error("err : " + err); |
| 42 | console.log("rows : " + JSON.stringify(rows)); | 41 | console.log("rows : " + JSON.stringify(rows)); |
| 42 | + res.redirect('/resconfirm'); | ||
| 43 | connection.release(); | 43 | connection.release(); |
| 44 | // Don't use the connection here, it has been returned to the pool. | 44 | // Don't use the connection here, it has been returned to the pool. |
| 45 | }); | 45 | }); |
| ... | @@ -75,6 +75,7 @@ router.get('/db', function(req, res){ | ... | @@ -75,6 +75,7 @@ router.get('/db', function(req, res){ |
| 75 | /* GET home page. */ | 75 | /* GET home page. */ |
| 76 | router.get('/pay', function(req, res, next) { | 76 | router.get('/pay', function(req, res, next) { |
| 77 | res.render('pay', { title: '결제' }); | 77 | res.render('pay', { title: '결제' }); |
| 78 | + res.render('first'); | ||
| 78 | }); | 79 | }); |
| 79 | 80 | ||
| 80 | module.exports = router; | 81 | module.exports = router; | ... | ... |
| ... | @@ -63,7 +63,7 @@ | ... | @@ -63,7 +63,7 @@ |
| 63 | <div class="col-lg-8 mx-auto"> | 63 | <div class="col-lg-8 mx-auto"> |
| 64 | <h1 class="brand-heading" style="background-color: rgba( 0, 0, 0, 0.7 );">별빛바다 달빛초원</h1> | 64 | <h1 class="brand-heading" style="background-color: rgba( 0, 0, 0, 0.7 );">별빛바다 달빛초원</h1> |
| 65 | <p class="intro-text"> | 65 | <p class="intro-text"> |
| 66 | - <br>정지윤</p> | 66 | + <br>아래로 내리세요</p> |
| 67 | <a href="#about" class="btn btn-circle js-scroll-trigger"> | 67 | <a href="#about" class="btn btn-circle js-scroll-trigger"> |
| 68 | <i class="fa fa-angle-double-down animated"></i> | 68 | <i class="fa fa-angle-double-down animated"></i> |
| 69 | </a> | 69 | </a> | ... | ... |
| ... | @@ -44,7 +44,7 @@ | ... | @@ -44,7 +44,7 @@ |
| 44 | buyer_tel : '010-8762-3073', | 44 | buyer_tel : '010-8762-3073', |
| 45 | buyer_addr : '서울특별시 강남구 삼성동', | 45 | buyer_addr : '서울특별시 강남구 삼성동', |
| 46 | buyer_postcode : '123-456', | 46 | buyer_postcode : '123-456', |
| 47 | - m_redirect_url : 'https://localhost:3000/resconfirm' | 47 | + m_redirect_url : 'http://localhost:3000/reservation' |
| 48 | }, function(rsp) { | 48 | }, function(rsp) { |
| 49 | if ( rsp.success ) { | 49 | if ( rsp.success ) { |
| 50 | var msg = '결제가 완료되었습니다.'; | 50 | var msg = '결제가 완료되었습니다.'; |
| ... | @@ -52,11 +52,17 @@ | ... | @@ -52,11 +52,17 @@ |
| 52 | msg += '상점 거래ID : ' + rsp.merchant_uid; | 52 | msg += '상점 거래ID : ' + rsp.merchant_uid; |
| 53 | msg += '결제 금액 : ' + rsp.paid_amount; | 53 | msg += '결제 금액 : ' + rsp.paid_amount; |
| 54 | msg += '카드 승인번호 : ' + rsp.apply_num; | 54 | msg += '카드 승인번호 : ' + rsp.apply_num; |
| 55 | - } else { | 55 | + |
| 56 | + alert(msg); | ||
| 57 | + document.location.href="/reservation"; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + else { | ||
| 56 | var msg = '결제에 실패하였습니다.'; | 61 | var msg = '결제에 실패하였습니다.'; |
| 57 | msg += '에러내용 : ' + rsp.error_msg; | 62 | msg += '에러내용 : ' + rsp.error_msg; |
| 58 | - } | ||
| 59 | alert(msg); | 63 | alert(msg); |
| 64 | + document.location.href="/first"; | ||
| 65 | + } | ||
| 60 | }); | 66 | }); |
| 61 | </script> | 67 | </script> |
| 62 | </html> | 68 | </html> | ... | ... |
| ... | @@ -35,19 +35,35 @@ | ... | @@ -35,19 +35,35 @@ |
| 35 | } | 35 | } |
| 36 | </style> | 36 | </style> |
| 37 | 37 | ||
| 38 | - <section id="about" class="reservationTheme content-section "> | 38 | + |
| 39 | - <div class="container"> | 39 | +<div class="container"> |
| 40 | <br><br> | 40 | <br><br> |
| 41 | <h2>Reservation <br>예약하기</h2> | 41 | <h2>Reservation <br>예약하기</h2> |
| 42 | <br><br> | 42 | <br><br> |
| 43 | <form class="well form-horizontal" action=" " method="post" id="contact_form"> | 43 | <form class="well form-horizontal" action=" " method="post" id="contact_form"> |
| 44 | <fieldset> | 44 | <fieldset> |
| 45 | + <form method="POST" action="/reservation"> <!-- Text input--> | ||
| 45 | 46 | ||
| 46 | - <form method="POST" action="/reservation"> | 47 | + <!-- Button --> |
| 47 | - <!-- Form Name --> | 48 | + <div class="form-group"> |
| 49 | + <div class="inputGroupContainer "> | ||
| 50 | + <label class="col-md-4 control-label"></label> | ||
| 51 | + <div class="col-md-4"> | ||
| 52 | + 잠깐! No Show 문제를 방지하기 위해 예약 전, 선금 2000원을 입금해야 합니다! | ||
| 53 | + <a href="/pay" class="btn btn-default btn-lg">입금하기</a> | ||
| 54 | + | ||
| 55 | + <a href="/first" class="btn btn-default btn-lg">돌아가기</a> | ||
| 56 | + </div> | ||
| 57 | + </div> | ||
| 58 | + </div> | ||
| 48 | 59 | ||
| 49 | - <!-- Text input--> | 60 | + <br>ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ |
| 61 | + <br> | ||
| 62 | + <br> | ||
| 63 | + <br> | ||
| 50 | 64 | ||
| 65 | + | ||
| 66 | + <!-- 이름--> | ||
| 51 | <div class="form-group"> | 67 | <div class="form-group"> |
| 52 | <div class="col-md-4 inputGroupContainer "> | 68 | <div class="col-md-4 inputGroupContainer "> |
| 53 | <div class="input-group"> | 69 | <div class="input-group"> |
| ... | @@ -58,7 +74,6 @@ | ... | @@ -58,7 +74,6 @@ |
| 58 | </div> | 74 | </div> |
| 59 | </div> | 75 | </div> |
| 60 | 76 | ||
| 61 | - | ||
| 62 | <!-- 휴대전화--> | 77 | <!-- 휴대전화--> |
| 63 | <div class="form-group"> | 78 | <div class="form-group"> |
| 64 | <div class="col-md-4 inputGroupContainer"> | 79 | <div class="col-md-4 inputGroupContainer"> |
| ... | @@ -70,14 +85,11 @@ | ... | @@ -70,14 +85,11 @@ |
| 70 | </div> | 85 | </div> |
| 71 | </div> | 86 | </div> |
| 72 | 87 | ||
| 73 | - | 88 | + <!-- 이메일주소--> |
| 74 | - | ||
| 75 | - <!-- Text input--> | ||
| 76 | <div class="form-group"> | 89 | <div class="form-group"> |
| 77 | <div class="col-md-4 inputGroupContainer"> | 90 | <div class="col-md-4 inputGroupContainer"> |
| 78 | <div class="input-group"> | 91 | <div class="input-group"> |
| 79 | <label class="col-md-4 control-label">이메일주소</label> | 92 | <label class="col-md-4 control-label">이메일주소</label> |
| 80 | - | ||
| 81 | <i class="glyphicon glyphicon-envelope"></i> | 93 | <i class="glyphicon glyphicon-envelope"></i> |
| 82 | <input name="email" placeholder="E-Mail Address" class="form-control" type="text"> | 94 | <input name="email" placeholder="E-Mail Address" class="form-control" type="text"> |
| 83 | </div> | 95 | </div> |
| ... | @@ -101,8 +113,6 @@ | ... | @@ -101,8 +113,6 @@ |
| 101 | </div> | 113 | </div> |
| 102 | </div> | 114 | </div> |
| 103 | 115 | ||
| 104 | - | ||
| 105 | - | ||
| 106 | <!--예약시간--> | 116 | <!--예약시간--> |
| 107 | <div class="form-group"> | 117 | <div class="form-group"> |
| 108 | <div class="col-md-4 selectContainer"> | 118 | <div class="col-md-4 selectContainer"> |
| ... | @@ -136,6 +146,7 @@ | ... | @@ -136,6 +146,7 @@ |
| 136 | </div> | 146 | </div> |
| 137 | </div> | 147 | </div> |
| 138 | 148 | ||
| 149 | + <!--달력--> | ||
| 139 | <div class="form-group"> | 150 | <div class="form-group"> |
| 140 | <div class="col-md-4 selectContainer"> | 151 | <div class="col-md-4 selectContainer"> |
| 141 | <div class="input-group"> | 152 | <div class="input-group"> |
| ... | @@ -152,7 +163,7 @@ | ... | @@ -152,7 +163,7 @@ |
| 152 | </div> | 163 | </div> |
| 153 | </div> | 164 | </div> |
| 154 | 165 | ||
| 155 | - | 166 | + <!--예약날짜--> |
| 156 | <div class="form-group"> | 167 | <div class="form-group"> |
| 157 | <div class="col-md-4 selectContainer"> | 168 | <div class="col-md-4 selectContainer"> |
| 158 | <div class="input-group"> | 169 | <div class="input-group"> |
| ... | @@ -206,12 +217,11 @@ | ... | @@ -206,12 +217,11 @@ |
| 206 | </div> | 217 | </div> |
| 207 | </div> | 218 | </div> |
| 208 | 219 | ||
| 209 | - <!-- radio checks--> | 220 | + <!-- 메뉴체크--> |
| 210 | <div class="form-group"> | 221 | <div class="form-group"> |
| 211 | <div class="col-md-4 selectContainer"> | 222 | <div class="col-md-4 selectContainer"> |
| 212 | <div class="input-group"> | 223 | <div class="input-group"> |
| 213 | <label class="col-md-4 control-label">메뉴</label> | 224 | <label class="col-md-4 control-label">메뉴</label> |
| 214 | - | ||
| 215 | <div class="checkbox"> | 225 | <div class="checkbox"> |
| 216 | <label> | 226 | <label> |
| 217 | <image src = "/img/pizza.jpg" width=100 height=100> | 227 | <image src = "/img/pizza.jpg" width=100 height=100> |
| ... | @@ -227,7 +237,6 @@ | ... | @@ -227,7 +237,6 @@ |
| 227 | <br><input type="checkbox" name="food" value="pasta" /> 파스타 | 237 | <br><input type="checkbox" name="food" value="pasta" /> 파스타 |
| 228 | </label> | 238 | </label> |
| 229 | </div> | 239 | </div> |
| 230 | - | ||
| 231 | | 240 | |
| 232 | | 241 | |
| 233 | | 242 | |
| ... | @@ -241,8 +250,9 @@ | ... | @@ -241,8 +250,9 @@ |
| 241 | </div> | 250 | </div> |
| 242 | </div> | 251 | </div> |
| 243 | 252 | ||
| 244 | - | ||
| 245 | <br> | 253 | <br> |
| 254 | + | ||
| 255 | + <!-- 요청사항--> | ||
| 246 | <div class="form-group"> | 256 | <div class="form-group"> |
| 247 | <div class="col-md-4 selectContainer"> | 257 | <div class="col-md-4 selectContainer"> |
| 248 | <div class="input-group"> | 258 | <div class="input-group"> |
| ... | @@ -251,25 +261,23 @@ | ... | @@ -251,25 +261,23 @@ |
| 251 | <textarea class="form-control" name="content" placeholder="요청 사항을 적어주세요." style="width:310px; height:100px;"></textarea> | 261 | <textarea class="form-control" name="content" placeholder="요청 사항을 적어주세요." style="width:310px; height:100px;"></textarea> |
| 252 | </div> | 262 | </div> |
| 253 | </div> | 263 | </div> |
| 264 | + </div> | ||
| 254 | 265 | ||
| 266 | + <br>ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ | ||
| 255 | 267 | ||
| 256 | - | 268 | + <!-- 예약완료 버튼--> |
| 257 | - <!-- Button --> | ||
| 258 | <div class="form-group"> | 269 | <div class="form-group"> |
| 259 | <label class="col-md-4 control-label"></label> | 270 | <label class="col-md-4 control-label"></label> |
| 260 | <div class="col-md-4"> | 271 | <div class="col-md-4"> |
| 261 | - 잠깐! No Show 문제를 방지하기 위해 예약 전, 선금 2000원을 입금해야 합니다! | 272 | + <button type="submit" class="btn btn-warning" >예약 <span class="glyphicon glyphicon-send"></span></button> |
| 262 | - <a href="/pay" class="btn btn-default btn-lg">입금하기</a> | ||
| 263 | - <a href="/first" class="btn btn-default btn-lg">돌아가기</a> | ||
| 264 | </div> | 273 | </div> |
| 265 | - | ||
| 266 | </div> | 274 | </div> |
| 275 | + | ||
| 276 | + | ||
| 267 | </form> | 277 | </form> |
| 268 | </fieldset> | 278 | </fieldset> |
| 269 | </form> | 279 | </form> |
| 270 | </div> | 280 | </div> |
| 271 | - </div> | ||
| 272 | -</script> | ||
| 273 | 281 | ||
| 274 | 282 | ||
| 275 | <script> | 283 | <script> |
| ... | @@ -347,7 +355,6 @@ | ... | @@ -347,7 +355,6 @@ |
| 347 | return false; | 355 | return false; |
| 348 | } | 356 | } |
| 349 | 357 | ||
| 350 | - | ||
| 351 | } | 358 | } |
| 352 | </script> | 359 | </script> |
| 353 | 360 | ... | ... |
-
Please register or login to post a comment