Showing
11 changed files
with
117 additions
and
49 deletions
No preview for this file type
public/img/confirm.jpg
deleted
100644 → 0
76.5 KB
public/img/downloads-bg.jpg
deleted
100644 → 0
206 KB
public/img/pizza.jpg
deleted
100644 → 0
124 KB
public/img/ss.jpg
0 → 100644
168 KB
public/img/그림1.jpg
deleted
100644 → 0
60.7 KB
public/img/수정됨_로고2.jpg
deleted
100644 → 0
16.6 KB
| ... | @@ -56,10 +56,6 @@ router.get('/menu',function(req,res){ | ... | @@ -56,10 +56,6 @@ router.get('/menu',function(req,res){ |
| 56 | 56 | ||
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | - | ||
| 60 | - | ||
| 61 | - | ||
| 62 | - | ||
| 63 | router.get('/db', function(req, res){ | 59 | router.get('/db', function(req, res){ |
| 64 | pool.getConnection(function (err, connection) | 60 | pool.getConnection(function (err, connection) |
| 65 | { | 61 | { |
| ... | @@ -70,11 +66,16 @@ router.get('/db', function(req, res){ | ... | @@ -70,11 +66,16 @@ router.get('/db', function(req, res){ |
| 70 | if (err) console.error("err : " + err); | 66 | if (err) console.error("err : " + err); |
| 71 | console.log("rows : " + JSON.stringify(rows)); | 67 | console.log("rows : " + JSON.stringify(rows)); |
| 72 | connection.release(); | 68 | connection.release(); |
| 69 | + res.render('res_list', {data: rows}); | ||
| 73 | // 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. |
| 74 | }); | 71 | }); |
| 75 | }); | 72 | }); |
| 76 | }); | 73 | }); |
| 77 | 74 | ||
| 75 | +router.get('/pw',function(req,res){ | ||
| 76 | + res.render('pw',{title: '비번'}); | ||
| 77 | +}); | ||
| 78 | + | ||
| 78 | 79 | ||
| 79 | /* GET home page. */ | 80 | /* GET home page. */ |
| 80 | router.get('/pay', function(req, res, next) { | 81 | router.get('/pay', function(req, res, next) { | ... | ... |
views/pw.ejs
0 → 100644
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html lang="en"> | ||
| 3 | + | ||
| 4 | + <head> | ||
| 5 | + <meta charset="utf-8"> | ||
| 6 | + | ||
| 7 | + | ||
| 8 | + <title>식당 예약</title> | ||
| 9 | + | ||
| 10 | + <section id="about" class="reservationTheme content-section "> | ||
| 11 | + <div class="container"> | ||
| 12 | + <br><br> | ||
| 13 | + <h1>Thank you!</h1> | ||
| 14 | + <h2>감사합니다! <br>예약이 성공적으로 완료되었습니다</h2> | ||
| 15 | + | ||
| 16 | + <SCRIPT LANGUAGE="JavaScript"> | ||
| 17 | + <!-- | ||
| 18 | + function password() | ||
| 19 | + { | ||
| 20 | + var count = 0; | ||
| 21 | + | ||
| 22 | + // 패스워드를 입력받는 상자를 띄워줌 | ||
| 23 | + var pass = prompt('패스워드를 입력하세요',''); | ||
| 24 | + | ||
| 25 | + while(count <=2 ) | ||
| 26 | + { | ||
| 27 | + if (pass == "pw") | ||
| 28 | + { alert('어서 오세요!'); | ||
| 29 | + location.href="/db"; | ||
| 30 | + break; | ||
| 31 | + } | ||
| 32 | + else count+=1; | ||
| 33 | + | ||
| 34 | + var pass = prompt('당신은 허가된 사용자가 아닙니다. 다시 입력해 주세요.',''); | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + if(count == 3) | ||
| 38 | + { | ||
| 39 | + alert('자꾸 접근하려 하면 혼납니다!'); | ||
| 40 | + location.href="/first"; | ||
| 41 | + } | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + document.write(password()); | ||
| 45 | + | ||
| 46 | + //--> | ||
| 47 | + </SCRIPT> | ||
| 48 | + | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + | ||
| 52 | + | ||
| 53 | + | ||
| 54 | + | ||
| 55 | + | ||
| 56 | + <script type="text/javascript" src="/mail"></script> | ||
| 57 | + </head> | ||
| 58 | +</html> | ||
| 59 | + | ||
| 60 | + | ||
| 61 | + | ||
| 62 | + | ||
| 63 | + | ||
| 64 | + <!-- <form method="POST" action="/jj"> |
| ... | @@ -25,6 +25,11 @@ | ... | @@ -25,6 +25,11 @@ |
| 25 | 25 | ||
| 26 | <title>식당 예약</title> | 26 | <title>식당 예약</title> |
| 27 | 27 | ||
| 28 | + | ||
| 29 | + | ||
| 30 | + | ||
| 31 | + | ||
| 32 | + | ||
| 28 | <style type="text/css"> | 33 | <style type="text/css"> |
| 29 | .reservationTheme{ | 34 | .reservationTheme{ |
| 30 | background:url('/img/12.jpg') no-repeat center fixed; | 35 | background:url('/img/12.jpg') no-repeat center fixed; |
| ... | @@ -35,45 +40,40 @@ | ... | @@ -35,45 +40,40 @@ |
| 35 | } | 40 | } |
| 36 | </style> | 41 | </style> |
| 37 | <section id="about" class="reservationTheme content-section "> | 42 | <section id="about" class="reservationTheme content-section "> |
| 38 | - <div class="container"> | ||
| 39 | <br><br> | 43 | <br><br> |
| 40 | <h1>예약 리스트</h1> | 44 | <h1>예약 리스트</h1> |
| 41 | - <table> | 45 | + <table class = "table table-hover"> |
| 42 | <thead> | 46 | <thead> |
| 43 | <tr> | 47 | <tr> |
| 44 | - <th>번호<th> | 48 | + <th>번호</th> |
| 45 | - <th>이름<th> | 49 | + <th>이름</th> |
| 46 | - <th>휴대폰 번호<th> | 50 | + <th>휴대폰번호</th> |
| 47 | - <th>이메일주소<th> | 51 | + <th>email</th> |
| 48 | - <th>인원<th> | 52 | + <th>인원</th> |
| 49 | - <th>예약 시<th> | 53 | + <th>예약 시</th> |
| 50 | - <th>예약 분<th> | 54 | + <th>예약 분</th> |
| 51 | - <th>예약 날짜<th> | 55 | + <th>예약 날짜 </th> |
| 52 | - <th>메뉴<th> | 56 | + <th>메뉴</th> |
| 53 | - <th>작성시간<th> | 57 | + <th>작성시간</th> |
| 54 | </tr> | 58 | </tr> |
| 55 | </thead> | 59 | </thead> |
| 56 | <tbody> | 60 | <tbody> |
| 57 | 61 | ||
| 58 | - <% | 62 | + <% for(var i=0; i< data.length; i++) { %> |
| 59 | - for(var i=0; i<rows.length; i++) | 63 | + <tr> |
| 60 | - var oneItem = rows[i]; | 64 | + <td><%=data[i].idx%></td> |
| 61 | - %> | 65 | + <td><%=data[i].creater_id%></td> |
| 62 | - <tr> | 66 | + <td><%=data[i].phone%></td> |
| 63 | - <td><%=sqlForSelect.idx%></td> | 67 | + <td><%=data[i].email%></td> |
| 64 | - <td><%=sqlForSelect.creater_id%></td> | 68 | + <td><%=data[i].num%></td> |
| 65 | - <td><%=sqlForSelect.phone%></td> | 69 | + <td><%=data[i].restime%></td> |
| 66 | - <td><%=sqlForSelect.email%></td> | 70 | + <td><%=data[i].resmin%></td> |
| 67 | - <td><%=sqlForSelect.num%></td> | 71 | + <td><%=data[i].date%></td> |
| 68 | - <td><%=sqlForSelect.restime%></td> | 72 | + <td><%=data[i].content%></td> |
| 69 | - <td><%=sqlForSelect.resmin%></td> | 73 | + <td><%=data[i].modidate%></td> |
| 70 | - <td><%=sqlForSelect.content%></td> | 74 | + </tr> |
| 71 | - <td><%=sqlForSelect.modidate%></td> | 75 | + <% } %> |
| 72 | - </tr> | 76 | +</tbody> |
| 73 | - | ||
| 74 | -<% | ||
| 75 | - } | ||
| 76 | -%> | ||
| 77 | </table> | 77 | </table> |
| 78 | 78 | ||
| 79 | 79 | ||
| ... | @@ -82,11 +82,15 @@ | ... | @@ -82,11 +82,15 @@ |
| 82 | 82 | ||
| 83 | 83 | ||
| 84 | 84 | ||
| 85 | + | ||
| 85 | <div class="form-group"> | 86 | <div class="form-group"> |
| 86 | <label class="col-md-4 control-label"></label> | 87 | <label class="col-md-4 control-label"></label> |
| 87 | <div class="col-md-4 center"> | 88 | <div class="col-md-4 center"> |
| 88 | <a href="/first" class="btn btn-default btn-lg">홈으로</a> | 89 | <a href="/first" class="btn btn-default btn-lg">홈으로</a> |
| 89 | </div> | 90 | </div> |
| 91 | + | ||
| 92 | + | ||
| 93 | + | ||
| 90 | </head> | 94 | </head> |
| 91 | </html> | 95 | </html> |
| 92 | 96 | ... | ... |
| ... | @@ -25,21 +25,20 @@ | ... | @@ -25,21 +25,20 @@ |
| 25 | 25 | ||
| 26 | <title>식당 예약</title> | 26 | <title>식당 예약</title> |
| 27 | 27 | ||
| 28 | - <style type="text/css"> | 28 | + <style type="text/css"> |
| 29 | - .reservationTheme{ | 29 | + .reservationTheme{ |
| 30 | - background:url('/img/diapo1.jpg') no-repeat center fixed; | 30 | + background:url('/img/ss.jpg') no-repeat center fixed; |
| 31 | - -webkit-background-size: cover; | 31 | + -webkit-background-size: cover; |
| 32 | - -moz-background-size: cover; | 32 | + -moz-background-size: cover; |
| 33 | - -o-background-size: cover; | 33 | + -o-background-size: cover; |
| 34 | - background-size: cover; | 34 | + background-size: cover; |
| 35 | - } | 35 | + } |
| 36 | - </style> | 36 | + </style> |
| 37 | - | 37 | + |
| 38 | - | 38 | +<div class="container reservationTheme content-section"> |
| 39 | -<div class="container"> | 39 | + |
| 40 | <br><br> | 40 | <br><br> |
| 41 | <h2>Reservation <br>예약하기</h2> | 41 | <h2>Reservation <br>예약하기</h2> |
| 42 | - <br><br> | ||
| 43 | <form class="well form-horizontal" action=" " method="post" id="contact_form"> | 42 | <form class="well form-horizontal" action=" " method="post" id="contact_form"> |
| 44 | <fieldset> | 43 | <fieldset> |
| 45 | <form method="POST" action="/reservation"> <!-- Text input--> | 44 | <form method="POST" action="/reservation"> <!-- Text input--> |
| ... | @@ -80,7 +79,7 @@ | ... | @@ -80,7 +79,7 @@ |
| 80 | <div class="input-group"> | 79 | <div class="input-group"> |
| 81 | <label class="col-md-4 control-label">휴대전화</label> | 80 | <label class="col-md-4 control-label">휴대전화</label> |
| 82 | <i class="glyphicon glyphicon-earphone"></i> | 81 | <i class="glyphicon glyphicon-earphone"></i> |
| 83 | - <input name="phone" placeholder="0101234567" class="form-control" type="text"> | 82 | + <input name="phone" placeholder="010빼고 적어주세요" class="form-control" type="text"> |
| 84 | </div> | 83 | </div> |
| 85 | </div> | 84 | </div> |
| 86 | </div> | 85 | </div> | ... | ... |
-
Please register or login to post a comment