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:14:12 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
47e7b5d76def30fb0209d90dbfdee96142b86686
47e7b5d7
1 parent
e96c4ab2
예약화면에서 radio button 삭제
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
44 deletions
routes/index.js
views/reservation.ejs
routes/index.js
View file @
47e7b5d
...
...
@@ -35,7 +35,7 @@ router.post('/reservation',function(req, res){
pool
.
getConnection
(
function
(
err
,
connection
)
{
// Use the connection
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
+
"')"
;
var
sqlForInsertBoard
=
"insert into menu(creater_id, phone, email, num, restime, resmin,date,
content) values('"
+
creater_id
+
"', '"
+
phone
+
"', '"
+
email
+
"','"
+
num
+
"','"
+
restime
+
"','"
+
resmin
+
"','"
+
date
+
"','"
+
content
+
"')"
;
connection
.
query
(
sqlForInsertBoard
,
function
(
err
,
rows
)
{
if
(
err
)
console
.
error
(
"err : "
+
err
);
console
.
log
(
"rows : "
+
JSON
.
stringify
(
rows
));
...
...
views/reservation.ejs
View file @
47e7b5d
...
...
@@ -217,48 +217,16 @@
</div>
</div>
<!-- 메뉴체크-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
메뉴
</label>
<div
class=
"checkbox"
>
<label>
<image
src =
"/img/pizza.jpg"
width=
100
height=
100
>
<br><input
type=
"checkbox"
name=
"food"
value=
"pizza"
/>
피자
</label>
</div>
<div
class=
"checkbox"
>
<label>
<image
src =
"/img/파스타.jpg"
width=
100
height=
100
>
<br><input
type=
"checkbox"
name=
"food"
value=
"pasta"
/>
파스타
</label>
</div>
<div
class=
"checkbox"
>
<label>
<image
src =
"/img/와인.jpg"
width=
100
height=
100
>
<br><input
type=
"checkbox"
name=
"food"
value=
"wine"
/>
와인
</label>
</div>
</div>
</div>
</div>
<br>
<!--
요청사항
-->
<!--
메뉴 적기
-->
<div
class=
"form-group"
>
<div
class=
"col-md-4 selectContainer"
>
<div
class=
"input-group"
>
<label
class=
"col-md-4 control-label"
>
요청 사항
</label>
<label
class=
"col-md-4 control-label"
>
메뉴
</label>
<i
class=
"glyphicon glyphicon-pencil"
></i>
<textarea
class=
"form-control"
name=
"content"
placeholder=
"
요청 사항을
적어주세요."
style=
"width:310px; height:100px;"
></textarea>
<textarea
class=
"form-control"
name=
"content"
placeholder=
"
예약할 메뉴를
적어주세요."
style=
"width:310px; height:100px;"
></textarea>
</div>
</div>
</div>
...
...
@@ -338,14 +306,6 @@
alert
(
message
);
return
false
;
}
if
(
$
(
"#food"
).
val
().
trim
()
==
""
)
{
var
message
=
"예약 메뉴를 입력해주세요"
;
$
(
"#food"
).
val
(
""
);
$
(
"#food"
).
focus
();
alert
(
message
);
return
false
;
}
if
(
$
(
"#content"
).
val
().
trim
()
==
""
)
{
var
message
=
"비고사항을 입력해주세요"
;
...
...
Please
register
or
login
to post a comment