Showing
6 changed files
with
93 additions
and
49 deletions
... | @@ -9,21 +9,16 @@ var bodyParser = require('body-parser'); | ... | @@ -9,21 +9,16 @@ var bodyParser = require('body-parser'); |
9 | var router = express.Router(); | 9 | var router = express.Router(); |
10 | 10 | ||
11 | // configuration =============================================================== | 11 | // configuration =============================================================== |
12 | - | ||
13 | - | ||
14 | -router.get('/reservation',function(req,res){ | ||
15 | - res.render('reservation',{title : "첫번째 화면~"}); | ||
16 | -}) | ||
17 | router.get('/first',function(req,res){ | 12 | router.get('/first',function(req,res){ |
18 | - res.render('first',{title : "첫번째 화면~"}); | 13 | + res.render('first',{title : "첫번째 화면"}); |
19 | }) | 14 | }) |
20 | 15 | ||
21 | router.get('/', function(req, res){ | 16 | router.get('/', function(req, res){ |
22 | res.render('index',{title: "첫화면"}); | 17 | res.render('index',{title: "첫화면"}); |
23 | }); | 18 | }); |
24 | 19 | ||
25 | -router.get('/list', function(req, res){ | 20 | +router.get('/reservation',function(req,res){ |
26 | - res.render('list',{title :"게시판"}); | 21 | + res.render('reservation',{title : "예약"}); |
27 | }); | 22 | }); |
28 | 23 | ||
29 | 24 | ||
... | @@ -54,49 +49,33 @@ router.post('/reservation',function(req, res){ | ... | @@ -54,49 +49,33 @@ router.post('/reservation',function(req, res){ |
54 | 49 | ||
55 | router.get('/resconfirm', function(req, res){ | 50 | router.get('/resconfirm', function(req, res){ |
56 | res.render('resconfirm',{title : "예약확인"}); | 51 | res.render('resconfirm',{title : "예약확인"}); |
57 | -}) | 52 | +}); |
58 | 53 | ||
59 | 54 | ||
55 | +router.get('/menu',function(req,res){ | ||
56 | + res.render('menu',{title : "메뉴판"}); | ||
57 | +}); | ||
60 | 58 | ||
61 | -router.get('/write2',function(req,res){ | 59 | +router.get('/db', function(req, res){ |
62 | - res.render('write',{title : "게시판"}); | ||
63 | - res.redirect('/'); | ||
64 | - connection.release(); | ||
65 | -}) | ||
66 | -router.post('/write2',function(req, res){ | ||
67 | - var creater_id = req.body.creater_id; | ||
68 | - var title = req.body.title; | ||
69 | - var content = req.body.content; | ||
70 | pool.getConnection(function (err, connection) | 60 | pool.getConnection(function (err, connection) |
71 | { | 61 | { |
72 | // Use the connection | 62 | // Use the connection |
73 | - var sqlForInsertBoard = "insert into db2(creater_id, title, content) values('"+creater_id+"', '"+title+"', '"+content+"')"; | 63 | + //var sqlForInsertBoard = "insert into menu(creater_id, phone, email, num, restime, resmin,date,food,content) values('"+creater_id+"', '"+phone+"', '"+email+"','"+num+"','"+restime+"','"+resmin+"','"+date+"','"+food+"','"+content+"')"; |
74 | - connection.query(sqlForInsertBoard, function (err, rows) { | 64 | + var sqlForSelect = 'SELECT * from menu' |
65 | + connection.query(sqlForSelect, function (err, rows) { | ||
75 | if (err) console.error("err : " + err); | 66 | if (err) console.error("err : " + err); |
76 | console.log("rows : " + JSON.stringify(rows)); | 67 | console.log("rows : " + JSON.stringify(rows)); |
77 | - res.redirect('/'); | 68 | + res.render('first'); |
78 | connection.release(); | 69 | connection.release(); |
79 | // Don't use the connection here, it has been returned to the pool. | 70 | // Don't use the connection here, it has been returned to the pool. |
80 | }); | 71 | }); |
81 | }); | 72 | }); |
82 | -}) | ||
83 | - | ||
84 | -router.get('/persons', function(req, res){ | ||
85 | - connection.query('SELECT * from Persons', function(err, rows) { | ||
86 | - if(err) throw err; | ||
87 | - | ||
88 | - console.log('The solution is: ', rows); | ||
89 | - res.send(rows); | ||
90 | - }); | ||
91 | }); | 73 | }); |
92 | 74 | ||
93 | -router.get('/page',function(req, res){ | ||
94 | - connection.query('SELECT * from db2', function(err, rows) { | ||
95 | - if(err) throw err; | ||
96 | 75 | ||
97 | - console.log('The solution is: ', rows); | 76 | +/* GET home page. */ |
98 | - res.send(rows); | 77 | +router.get('/pay', function(req, res, next) { |
99 | - }); | 78 | + res.render('pay', { title: '결제' }); |
100 | }); | 79 | }); |
101 | 80 | ||
102 | module.exports = router; | 81 | module.exports = router; | ... | ... |
... | @@ -13,7 +13,7 @@ var smtpTransport = nodemailer.createTransport({ | ... | @@ -13,7 +13,7 @@ var smtpTransport = nodemailer.createTransport({ |
13 | 13 | ||
14 | var mailOptions = { | 14 | var mailOptions = { |
15 | from: '정지윤 <violet3073@gmail.com>', | 15 | from: '정지윤 <violet3073@gmail.com>', |
16 | - to: 'djkaiden@naver.com', | 16 | + to: 'jju0807@naver.com', |
17 | subject: '예약 게시판 확인해주세요!', | 17 | subject: '예약 게시판 확인해주세요!', |
18 | text: '예약이 도착했습니다' | 18 | text: '예약이 도착했습니다' |
19 | }; | 19 | }; | ... | ... |
... | @@ -38,6 +38,11 @@ | ... | @@ -38,6 +38,11 @@ |
38 | <li class="nav-item"> | 38 | <li class="nav-item"> |
39 | <a class="nav-link js-scroll-trigger" href="#about">About</a> | 39 | <a class="nav-link js-scroll-trigger" href="#about">About</a> |
40 | </li> | 40 | </li> |
41 | + | ||
42 | + <li class="nav-item"> | ||
43 | + <a class="nav-link js-scroll-trigger" href="#menu">Menu</a> | ||
44 | + </li> | ||
45 | + | ||
41 | <li class="nav-item"> | 46 | <li class="nav-item"> |
42 | <a class="nav-link js-scroll-trigger" href="#download">Reservation</a> | 47 | <a class="nav-link js-scroll-trigger" href="#download">Reservation</a> |
43 | </li> | 48 | </li> |
... | @@ -75,23 +80,40 @@ | ... | @@ -75,23 +80,40 @@ |
75 | <div class="container"> | 80 | <div class="container"> |
76 | <div class="row"> | 81 | <div class="row"> |
77 | <div class="col-lg-8 mx-auto"> | 82 | <div class="col-lg-8 mx-auto"> |
78 | - <h2>About GROTTO</h2> | 83 | + <h2>About 별빛바다 달빛초원</h2> |
79 | <p> | 84 | <p> |
80 | - <a href="http://startbootstrap.com/template-overviews/grayscale/">Grotto - Let your senses fly</a>. | 85 | + <a href="http://startbootstrap.com/template-overviews/grayscale/">01</a>. |
81 | - <br>당신의 오감을 날려드립니다.</p> | 86 | + <br>건강한 식재료와 제철 음식을 지향합니다.</p> |
82 | 87 | ||
83 | <p> | 88 | <p> |
84 | - <a href="http://gratisography.com/">Coffee - Kona coffee</a> | 89 | + <a href="http://gratisography.com/">02</a> |
85 | - <br>세계 3대 커피 하와이안 코나 원두를 사용합니다.</p> | 90 | + <br>활어회/신선한 초밥/해산물 잔뜩 요리전문점</p> |
86 | <p> | 91 | <p> |
87 | - <a href="http://snazzymaps.com/">Wine - Wine expert</a>. | 92 | + <a href="http://snazzymaps.com/">03</a>. |
88 | - <br>150가지 종류의 와인을 와인을 닮은 공간에서 편하게 즐기세요.</p> | 93 | + <br>수원에서 가장 깔끔하고 싱싱한 횟집</p> |
89 | </div> | 94 | </div> |
90 | </div> | 95 | </div> |
91 | </div> | 96 | </div> |
92 | </section> | 97 | </section> |
93 | 98 | ||
94 | 99 | ||
100 | + | ||
101 | + | ||
102 | + <!-- Menu Section --> | ||
103 | + <section id="menu" class=" content-section text-center"> | ||
104 | + <div class="container"> | ||
105 | + <div class="row"> | ||
106 | + <div class="col-lg-8 mx-auto"> | ||
107 | + <h2>Menu</h2> | ||
108 | + <p>별빛바다 달빛초원은 항상 싱싱한 생선만 손질합니다.</p> | ||
109 | + <a href="/menu" class="btn btn-default btn-lg">메뉴 보러가기</a> | ||
110 | + </div> | ||
111 | + </div> | ||
112 | + </div> | ||
113 | + </section> | ||
114 | + | ||
115 | + | ||
116 | + | ||
95 | <!-- Download Section --> | 117 | <!-- Download Section --> |
96 | <section id="download" class="download-section content-section text-center"> | 118 | <section id="download" class="download-section content-section text-center"> |
97 | <div class="container"> | 119 | <div class="container"> |
... | @@ -108,7 +130,7 @@ | ... | @@ -108,7 +130,7 @@ |
108 | <div class="container"> | 130 | <div class="container"> |
109 | <div class="row"> | 131 | <div class="row"> |
110 | <div class="col-lg-8 mx-auto"> | 132 | <div class="col-lg-8 mx-auto"> |
111 | - <h2>Contact GROTTO</h2> | 133 | + <h2>Contact 별빛바다 달빛초원</h2> |
112 | <p>전화번호 : 031-205-7220</p> | 134 | <p>전화번호 : 031-205-7220</p> |
113 | <p>영업시간 : 매일 10:00 - 23:30 (Last Order 22:00)</p> | 135 | <p>영업시간 : 매일 10:00 - 23:30 (Last Order 22:00)</p> |
114 | <ul class="list-inline banner-social-buttons"> | 136 | <ul class="list-inline banner-social-buttons"> |
... | @@ -118,12 +140,13 @@ | ... | @@ -118,12 +140,13 @@ |
118 | <span class="network-name">facebook</span> | 140 | <span class="network-name">facebook</span> |
119 | </a> | 141 | </a> |
120 | </li> | 142 | </li> |
121 | - <li class="list-inline-item"> | 143 | + <!--<li class="list-inline-item"> |
122 | <a href="https://www.instagram.com/grotto_since2011/" class="btn btn-default btn-lg"> | 144 | <a href="https://www.instagram.com/grotto_since2011/" class="btn btn-default btn-lg"> |
123 | <i class="fa fa-instagram fa-fw"></i> | 145 | <i class="fa fa-instagram fa-fw"></i> |
124 | <span class="network-name">Instagram</span> | 146 | <span class="network-name">Instagram</span> |
125 | </a> | 147 | </a> |
126 | </li> | 148 | </li> |
149 | + --> | ||
127 | </ul> | 150 | </ul> |
128 | </div> | 151 | </div> |
129 | </div> | 152 | </div> |
... | @@ -153,7 +176,7 @@ | ... | @@ -153,7 +176,7 @@ |
153 | } | 176 | } |
154 | </style> | 177 | </style> |
155 | <body> | 178 | <body> |
156 | - <p>경기도 수원시 영통구 영통동 1030-2</p> | 179 | + <p>경기도 수원시 영통구 영통동 1025-1(경기도 수원시 영통구 청명로 28) 1층 별빛바다 달빛초원</p> |
157 | <section id="contact" class="content-section text-center"> | 180 | <section id="contact" class="content-section text-center"> |
158 | <div class="container"> | 181 | <div class="container"> |
159 | <div class="row"> | 182 | <div class="row"> |
... | @@ -185,7 +208,7 @@ | ... | @@ -185,7 +208,7 @@ |
185 | <script> | 208 | <script> |
186 | function initMap() { | 209 | function initMap() { |
187 | var cnt = 1; //마커 카운트 해서 우선 2개만 제한 | 210 | var cnt = 1; //마커 카운트 해서 우선 2개만 제한 |
188 | - var initLatLng = {lat: 37.251797, lng: 127.076747}; | 211 | + var initLatLng = {lat: 37.2497462, lng: 127.0785575}; |
189 | var geocoder = new google.maps.Geocoder; | 212 | var geocoder = new google.maps.Geocoder; |
190 | var map = new google.maps.Map(document.getElementById('map'), { | 213 | var map = new google.maps.Map(document.getElementById('map'), { |
191 | center: initLatLng, | 214 | center: initLatLng, | ... | ... |
views/menu.ejs
0 → 100644
This diff is collapsed. Click to expand it.
views/pay.ejs
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | + | ||
3 | +<html> | ||
4 | + <head> | ||
5 | + <title><%= title %></title> | ||
6 | + <link rel='stylesheet' href='/stylesheets/style.css' /> | ||
7 | + <script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.min.js" ></script> | ||
8 | + <script type="text/javascript" src="https://service.iamport.kr/js/iamport.payment-1.1.5.js"></script> | ||
9 | + </head> | ||
10 | + <body> | ||
11 | + <h1>결제창</h1> | ||
12 | + </body> | ||
13 | + <script> | ||
14 | + var IMP = window.IMP; | ||
15 | + IMP.init('imp90003971'); | ||
16 | + IMP.request_pay({ | ||
17 | + pg : 'kakao', // version 1.1.0부터 지원. | ||
18 | + pay_method : 'card', | ||
19 | + merchant_uid : 'merchant_' + new Date().getTime(), | ||
20 | + name : '주문명:결제테스트', | ||
21 | + amount : 100, | ||
22 | + buyer_email : 'jju0807@naver.com', | ||
23 | + buyer_name : '정지윤', | ||
24 | + buyer_tel : '010-8762-3073', | ||
25 | + buyer_addr : '서울특별시 강남구 삼성동', | ||
26 | + buyer_postcode : '123-456', | ||
27 | + m_redirect_url : 'https://localhost:3000' | ||
28 | + }, function(rsp) { | ||
29 | + if ( rsp.success ) { | ||
30 | + var msg = '결제가 완료되었습니다.'; | ||
31 | + msg += '고유ID : ' + rsp.imp_uid; | ||
32 | + msg += '상점 거래ID : ' + rsp.merchant_uid; | ||
33 | + msg += '결제 금액 : ' + rsp.paid_amount; | ||
34 | + msg += '카드 승인번호 : ' + rsp.apply_num; | ||
35 | + } else { | ||
36 | + var msg = '결제에 실패하였습니다.'; | ||
37 | + msg += '에러내용 : ' + rsp.error_msg; | ||
38 | + } | ||
39 | + alert(msg); | ||
40 | + }); | ||
41 | + </script> | ||
42 | +</html> |
... | @@ -61,7 +61,7 @@ | ... | @@ -61,7 +61,7 @@ |
61 | <div class="input-group"> | 61 | <div class="input-group"> |
62 | <label class="col-md-4 control-label">휴대전화</label> | 62 | <label class="col-md-4 control-label">휴대전화</label> |
63 | <i class="glyphicon glyphicon-earphone"></i> | 63 | <i class="glyphicon glyphicon-earphone"></i> |
64 | - <input name="phone" placeholder="010-123-4567" class="form-control" type="text"> | 64 | + <input name="phone" placeholder="0101234567" class="form-control" type="text"> |
65 | </div> | 65 | </div> |
66 | </div> | 66 | </div> |
67 | </div> | 67 | </div> | ... | ... |
-
Please register or login to post a comment