정지윤

예약리스트 조회 화면 추가

...@@ -30,7 +30,6 @@ router.post('/reservation',function(req, res){ ...@@ -30,7 +30,6 @@ 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 - var food = req.body.food;
34 var content = req.body.content; 33 var content = req.body.content;
35 pool.getConnection(function (err, connection) 34 pool.getConnection(function (err, connection)
36 { 35 {
...@@ -55,6 +54,12 @@ router.get('/menu',function(req,res){ ...@@ -55,6 +54,12 @@ router.get('/menu',function(req,res){
55 res.render('menu',{title : "메뉴판"}); 54 res.render('menu',{title : "메뉴판"});
56 }); 55 });
57 56
57 +
58 +
59 +
60 +
61 +
62 +
58 router.get('/db', function(req, res){ 63 router.get('/db', function(req, res){
59 pool.getConnection(function (err, connection) 64 pool.getConnection(function (err, connection)
60 { 65 {
...@@ -64,7 +69,6 @@ router.get('/db', function(req, res){ ...@@ -64,7 +69,6 @@ router.get('/db', function(req, res){
64 connection.query(sqlForSelect, function (err, rows) { 69 connection.query(sqlForSelect, function (err, rows) {
65 if (err) console.error("err : " + err); 70 if (err) console.error("err : " + err);
66 console.log("rows : " + JSON.stringify(rows)); 71 console.log("rows : " + JSON.stringify(rows));
67 - res.render('first');
68 connection.release(); 72 connection.release();
69 // Don't use the connection here, it has been returned to the pool. 73 // Don't use the connection here, it has been returned to the pool.
70 }); 74 });
......
1 +<!DOCTYPE html>
2 +<html lang="en">
3 +
4 + <head>
5 + <meta charset="utf-8">
6 +
7 + <!-- Bootstrap core CSS -->
8 + <link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
9 +
10 + <!-- Custom fonts for this template -->
11 + <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
12 + <link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css">
13 + <link href='https://fonts.googleapis.com/css?family=Cabin:700' rel='stylesheet' type='text/css'>
14 +
15 + <!-- Custom styles for this template -->
16 + <link href="css/grayscale.min.css" rel="stylesheet">
17 +
18 + <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script>
19 + <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"></script>
20 +
21 + <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
22 + <link rel="stylesheet" href="https://jqueryui.com/resources/demos/style.css">
23 + <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
24 + <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
25 +
26 + <title>식당 예약</title>
27 +
28 + <style type="text/css">
29 + .reservationTheme{
30 + background:url('/img/12.jpg') no-repeat center fixed;
31 + -webkit-background-size: cover;
32 + -moz-background-size: cover;
33 + -o-background-size: cover;
34 + background-size: cover;
35 + }
36 + </style>
37 + <section id="about" class="reservationTheme content-section ">
38 + <div class="container">
39 + <br><br>
40 + <h1>예약 리스트</h1>
41 + <table>
42 + <thead>
43 + <tr>
44 + <th>번호<th>
45 + <th>이름<th>
46 + <th>휴대폰 번호<th>
47 + <th>이메일주소<th>
48 + <th>인원<th>
49 + <th>예약 시<th>
50 + <th>예약 분<th>
51 + <th>예약 날짜<th>
52 + <th>메뉴<th>
53 + <th>작성시간<th>
54 + </tr>
55 + </thead>
56 + <tbody>
57 +
58 + <%
59 + for(var i=0; i<rows.length; i++)
60 + var oneItem = rows[i];
61 + %>
62 + <tr>
63 + <td><%=sqlForSelect.idx%></td>
64 + <td><%=sqlForSelect.creater_id%></td>
65 + <td><%=sqlForSelect.phone%></td>
66 + <td><%=sqlForSelect.email%></td>
67 + <td><%=sqlForSelect.num%></td>
68 + <td><%=sqlForSelect.restime%></td>
69 + <td><%=sqlForSelect.resmin%></td>
70 + <td><%=sqlForSelect.content%></td>
71 + <td><%=sqlForSelect.modidate%></td>
72 + </tr>
73 +
74 +<%
75 + }
76 +%>
77 +</table>
78 +
79 +
80 +
81 +
82 +
83 +
84 +
85 + <div class="form-group">
86 + <label class="col-md-4 control-label"></label>
87 + <div class="col-md-4 center">
88 + <a href="/first" class="btn btn-default btn-lg">홈으로</a>
89 + </div>
90 + </head>
91 +</html>
92 +
93 +
94 +
95 +
96 +
97 + <!-- <form method="POST" action="/jj">
......