Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김재현
/
open-source-project-2017-02
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-07 15:27:11 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
22a213a0d3b6f736882037154c4faecc7e3a35fb
22a213a0
1 parent
45081187
POST and subbit기능 완성
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
34 deletions
public/images/menu_icon.png
public/stylesheets/style.css
public/stylesheets/style.styl
routes/index.js
views/map.ejs
public/images/menu_icon.png
0 → 100644
View file @
22a213a
19.4 KB
public/stylesheets/style.css
View file @
22a213a
...
...
@@ -39,20 +39,16 @@ ul.sidenav li a:hover:not(.active) {
}
table
{
width
:
70%
;
height
:
100%
;
border-collapse
:
collapse
;
text-align
:
center
;
vertical-align
:
middle
;
}
td
{
vertical-align
:
middle
;
text-align
:
center
;
border
:
1px
solid
#ddd
;
width
:
10%
;
height
:
0%
;
padding-bottom
:
20%
;
background-image
:
url("/images/stamp.jpg")
;
background-repeat
:
no-repeat
;
background-position
:
center
top
;
padding
:
15px
;
width
:
20%
;
height
:
20%
;
}
.bold
{
color
:
#ffc0cb
;
...
...
@@ -66,14 +62,7 @@ td {
width
:
15%
;
display
:
inline-block
;
float
:
left
;
position
:
fixed
;
overflow
:
auto
;
}
#maintitle
{
text-align
:
center
;
background
:
#ffc0cb
;
padding
:
8px
16px
;
margin-left
:
15%
;
}
#mynav
{
display
:
block
;
...
...
@@ -85,7 +74,3 @@ td {
float
:
left
;
margin-left
:
0px
;
}
#map
{
height
:
400px
;
width
:
100%
;
}
...
...
public/stylesheets/style.styl
View file @
22a213a
...
...
@@ -71,13 +71,17 @@ td
width: 15%;
display : inline-block;
float : left;
position : fixed;
overflow : auto;
position : fixed;
background-image : url("/images/menu_icon.png");
background-repeat: no-repeat;
background-position: center top;
#maintitle
text-align : center;
background : pink;
padding: 8px 16px;
background : black;
color : white;
padding: 80px 16px;
margin-left : 15%;
#mynav
...
...
routes/index.js
View file @
22a213a
...
...
@@ -4,8 +4,8 @@ var router = express.Router();
var
connection
=
mysql
.
createConnection
({
host
:
'localhost'
,
user
:
'
admin
'
,
password
:
'
admin
'
,
user
:
'
root
'
,
password
:
'
qmfkdnsl
'
,
database
:
'ossprojectdb'
});
...
...
@@ -44,20 +44,21 @@ router.post('/map', function(req, res){
var
tempuser
=
{
'
idusers'
:
req
.
body
.
userid
,
'
address'
:
req
.
body
.
placeaddress
,
'
contentid'
:
req
.
body
.
placeid
,
'
title'
:
req
.
body
.
placename
}
'
email'
:
req
.
body
.
useremail
,
'
contentid'
:
req
.
body
.
id
,
'
title'
:
req
.
body
.
title
,
'
address'
:
req
.
body
.
address
}
console
.
log
(
tempuser
);
var
query
=
connection
.
query
(
'insert into users set ?'
,
tempuser
,
function
(
err
,
result
){
if
(
err
)
{
console
.
error
(
err
);
throw
err
;
}
});
console
.
log
(
"success insert!"
);
});
router
.
get
(
'/mybook'
,
function
(
req
,
res
,
next
){
...
...
views/map.ejs
View file @
22a213a
...
...
@@ -8,14 +8,17 @@
function
addShop
(
id
)
{
var
placeid
=
$
(
id
).
attr
(
'id'
);
var
placename
=
$
(
id
).
attr
(
'name'
);
var
placeaddress
=
$
(
id
).
attr
(
'address'
);
$
(
'input[name=useremail]'
).
val
(
'<%=user.email%>'
);
$
(
'input[name=id]'
).
val
(
placeid
);
$
(
'input[name=title]'
).
val
(
placename
);
$
(
'input[name=address]'
).
val
(
placeaddress
);
$
(
'form[name=submit]'
).
submit
();
console
.
log
(
$
(
'input[name=id]'
).
val
());
$
(
'form[name=shop]'
).
submit
();
}
function
initMap
(
latitude
,
longitude
)
{
...
...
@@ -144,7 +147,7 @@
<div
id =
"content"
>
<div
id=
"map"
></div>
<div
id=
"popup"
></div>
<div
id=
"form"
>
<
!-- <
div id="form">
<form name="userform" method="POST" action="/map">
<input type="hidden" name="userid"/>
<input type="hidden" name="placeid"/>
...
...
@@ -153,11 +156,12 @@
</form>
</div>
</div>
-->
</div>
<div
id =
"footer"
></div>
<form
name=
"shop"
method=
"post"
action=
"/shop"
>
<form
name=
"shop"
method=
"post"
action=
"/map"
>
<input
type=
"hidden"
name=
"useremail"
/>
<input
type=
"hidden"
name=
"id"
/>
<input
type=
"hidden"
name=
"title"
/>
<input
type=
"hidden"
name=
"address"
/>
...
...
Please
register
or
login
to post a comment