정지윤

예약리스트 조회 화면 추가

......@@ -30,7 +30,6 @@ 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;
pool.getConnection(function (err, connection)
{
......@@ -55,6 +54,12 @@ router.get('/menu',function(req,res){
res.render('menu',{title : "메뉴판"});
});
router.get('/db', function(req, res){
pool.getConnection(function (err, connection)
{
......@@ -64,7 +69,6 @@ router.get('/db', function(req, res){
connection.query(sqlForSelect, function (err, rows) {
if (err) console.error("err : " + err);
console.log("rows : " + JSON.stringify(rows));
res.render('first');
connection.release();
// Don't use the connection here, it has been returned to the pool.
});
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Bootstrap core CSS -->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Cabin:700' rel='stylesheet' type='text/css'>
<!-- Custom styles for this template -->
<link href="css/grayscale.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="https://jqueryui.com/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<title>식당 예약</title>
<style type="text/css">
.reservationTheme{
background:url('/img/12.jpg') no-repeat center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
<section id="about" class="reservationTheme content-section ">
<div class="container">
<br><br>
<h1>예약 리스트</h1>
<table>
<thead>
<tr>
<th>번호<th>
<th>이름<th>
<th>휴대폰 번호<th>
<th>이메일주소<th>
<th>인원<th>
<th>예약 시<th>
<th>예약 분<th>
<th>예약 날짜<th>
<th>메뉴<th>
<th>작성시간<th>
</tr>
</thead>
<tbody>
<%
for(var i=0; i<rows.length; i++)
var oneItem = rows[i];
%>
<tr>
<td><%=sqlForSelect.idx%></td>
<td><%=sqlForSelect.creater_id%></td>
<td><%=sqlForSelect.phone%></td>
<td><%=sqlForSelect.email%></td>
<td><%=sqlForSelect.num%></td>
<td><%=sqlForSelect.restime%></td>
<td><%=sqlForSelect.resmin%></td>
<td><%=sqlForSelect.content%></td>
<td><%=sqlForSelect.modidate%></td>
</tr>
<%
}
%>
</table>
<div class="form-group">
<label class="col-md-4 control-label"></label>
<div class="col-md-4 center">
<a href="/first" class="btn btn-default btn-lg">홈으로</a>
</div>
</head>
</html>
<!-- <form method="POST" action="/jj">
......