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:35:28 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ea5a18c341b42fe52d06f143c48c11e76bef65be
ea5a18c3
1 parent
47e7b5d7
예약리스트 조회 화면 추가
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
2 deletions
routes/index.js
views/res_list.ejs
routes/index.js
View file @
ea5a18c
...
...
@@ -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.
});
...
...
views/res_list.ejs
View file @
ea5a18c
<!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">
...
...
Please
register
or
login
to post a comment