Showing
5 changed files
with
28 additions
and
34 deletions
public/images/menu_icon.png
0 → 100644
19.4 KB
... | @@ -39,20 +39,16 @@ ul.sidenav li a:hover:not(.active) { | ... | @@ -39,20 +39,16 @@ ul.sidenav li a:hover:not(.active) { |
39 | } | 39 | } |
40 | table { | 40 | table { |
41 | width: 70%; | 41 | width: 70%; |
42 | + height: 100%; | ||
42 | border-collapse: collapse; | 43 | border-collapse: collapse; |
43 | text-align: center; | 44 | text-align: center; |
44 | - vertical-align: middle; | ||
45 | } | 45 | } |
46 | td { | 46 | td { |
47 | - vertical-align: middle; | ||
48 | text-align: center; | 47 | text-align: center; |
49 | border: 1px solid #ddd; | 48 | border: 1px solid #ddd; |
50 | - width: 10%; | 49 | + padding: 15px; |
51 | - height: 0%; | 50 | + width: 20%; |
52 | - padding-bottom: 20%; | 51 | + height: 20%; |
53 | - background-image: url("/images/stamp.jpg"); | ||
54 | - background-repeat: no-repeat; | ||
55 | - background-position: center top; | ||
56 | } | 52 | } |
57 | .bold { | 53 | .bold { |
58 | color: #ffc0cb; | 54 | color: #ffc0cb; |
... | @@ -66,14 +62,7 @@ td { | ... | @@ -66,14 +62,7 @@ td { |
66 | width: 15%; | 62 | width: 15%; |
67 | display: inline-block; | 63 | display: inline-block; |
68 | float: left; | 64 | float: left; |
69 | - position: fixed; | 65 | + |
70 | - overflow: auto; | ||
71 | -} | ||
72 | -#maintitle { | ||
73 | - text-align: center; | ||
74 | - background: #ffc0cb; | ||
75 | - padding: 8px 16px; | ||
76 | - margin-left: 15%; | ||
77 | } | 66 | } |
78 | #mynav { | 67 | #mynav { |
79 | display: block; | 68 | display: block; |
... | @@ -85,7 +74,3 @@ td { | ... | @@ -85,7 +74,3 @@ td { |
85 | float: left; | 74 | float: left; |
86 | margin-left: 0px; | 75 | margin-left: 0px; |
87 | } | 76 | } |
88 | -#map { | ||
89 | - height: 400px; | ||
90 | - width: 100%; | ||
91 | -} | ... | ... |
... | @@ -71,13 +71,17 @@ td | ... | @@ -71,13 +71,17 @@ td |
71 | width: 15%; | 71 | width: 15%; |
72 | display : inline-block; | 72 | display : inline-block; |
73 | float : left; | 73 | float : left; |
74 | - position : fixed; | ||
75 | overflow : auto; | 74 | overflow : auto; |
75 | + position : fixed; | ||
76 | + background-image : url("/images/menu_icon.png"); | ||
77 | + background-repeat: no-repeat; | ||
78 | + background-position: center top; | ||
76 | 79 | ||
77 | #maintitle | 80 | #maintitle |
78 | text-align : center; | 81 | text-align : center; |
79 | - background : pink; | 82 | + background : black; |
80 | - padding: 8px 16px; | 83 | + color : white; |
84 | + padding: 80px 16px; | ||
81 | margin-left : 15%; | 85 | margin-left : 15%; |
82 | 86 | ||
83 | #mynav | 87 | #mynav | ... | ... |
... | @@ -4,8 +4,8 @@ var router = express.Router(); | ... | @@ -4,8 +4,8 @@ var router = express.Router(); |
4 | 4 | ||
5 | var connection = mysql.createConnection({ | 5 | var connection = mysql.createConnection({ |
6 | host : 'localhost', | 6 | host : 'localhost', |
7 | - user : 'admin', | 7 | + user : 'root', |
8 | - password : 'admin', | 8 | + password : 'qmfkdnsl', |
9 | database : 'ossprojectdb' | 9 | database : 'ossprojectdb' |
10 | }); | 10 | }); |
11 | 11 | ||
... | @@ -44,20 +44,21 @@ router.post('/map', function(req, res){ | ... | @@ -44,20 +44,21 @@ router.post('/map', function(req, res){ |
44 | 44 | ||
45 | var tempuser ={ | 45 | var tempuser ={ |
46 | 46 | ||
47 | - 'idusers' : req.body.userid, | 47 | + 'email' : req.body.useremail, |
48 | - 'address' : req.body.placeaddress, | 48 | + 'contentid' : req.body.id, |
49 | - 'contentid' : req.body.placeid, | 49 | + 'title' : req.body.title, |
50 | - 'title' : req.body.placename} | 50 | + 'address' : req.body.address} |
51 | 51 | ||
52 | 52 | ||
53 | console.log(tempuser); | 53 | console.log(tempuser); |
54 | + | ||
54 | var query = connection.query('insert into users set ?',tempuser,function(err,result){ | 55 | var query = connection.query('insert into users set ?',tempuser,function(err,result){ |
55 | if (err) { | 56 | if (err) { |
56 | console.error(err); | 57 | console.error(err); |
57 | throw err; | 58 | throw err; |
58 | } | 59 | } |
59 | }); | 60 | }); |
60 | - | 61 | + console.log("success insert!"); |
61 | }); | 62 | }); |
62 | 63 | ||
63 | router.get('/mybook', function(req, res, next){ | 64 | router.get('/mybook', function(req, res, next){ | ... | ... |
... | @@ -8,14 +8,17 @@ | ... | @@ -8,14 +8,17 @@ |
8 | 8 | ||
9 | 9 | ||
10 | function addShop(id) { | 10 | function addShop(id) { |
11 | + | ||
11 | var placeid = $(id).attr('id'); | 12 | var placeid = $(id).attr('id'); |
12 | var placename = $(id).attr('name'); | 13 | var placename = $(id).attr('name'); |
13 | var placeaddress = $(id).attr('address'); | 14 | var placeaddress = $(id).attr('address'); |
14 | 15 | ||
16 | + $('input[name=useremail]').val('<%=user.email%>'); | ||
15 | $('input[name=id]').val(placeid); | 17 | $('input[name=id]').val(placeid); |
16 | $('input[name=title]').val(placename); | 18 | $('input[name=title]').val(placename); |
17 | $('input[name=address]').val(placeaddress); | 19 | $('input[name=address]').val(placeaddress); |
18 | - $('form[name=submit]').submit(); | 20 | + console.log($('input[name=id]').val()); |
21 | + $('form[name=shop]').submit(); | ||
19 | } | 22 | } |
20 | 23 | ||
21 | function initMap(latitude, longitude) { | 24 | function initMap(latitude, longitude) { |
... | @@ -144,7 +147,7 @@ | ... | @@ -144,7 +147,7 @@ |
144 | <div id ="content"> | 147 | <div id ="content"> |
145 | <div id="map"></div> | 148 | <div id="map"></div> |
146 | <div id="popup"></div> | 149 | <div id="popup"></div> |
147 | - <div id="form"> | 150 | + <!-- <div id="form"> |
148 | <form name="userform" method="POST" action="/map"> | 151 | <form name="userform" method="POST" action="/map"> |
149 | <input type="hidden" name="userid"/> | 152 | <input type="hidden" name="userid"/> |
150 | <input type="hidden" name="placeid"/> | 153 | <input type="hidden" name="placeid"/> |
... | @@ -153,11 +156,12 @@ | ... | @@ -153,11 +156,12 @@ |
153 | </form> | 156 | </form> |
154 | 157 | ||
155 | 158 | ||
156 | - </div> | 159 | + </div> --> |
157 | </div> | 160 | </div> |
158 | 161 | ||
159 | <div id ="footer"></div> | 162 | <div id ="footer"></div> |
160 | - <form name="shop" method="post" action="/shop"> | 163 | + <form name="shop" method="post" action="/map"> |
164 | + <input type="hidden" name="useremail"/> | ||
161 | <input type="hidden" name="id"/> | 165 | <input type="hidden" name="id"/> |
162 | <input type="hidden" name="title"/> | 166 | <input type="hidden" name="title"/> |
163 | <input type="hidden" name="address"/> | 167 | <input type="hidden" name="address"/> | ... | ... |
-
Please register or login to post a comment