From 198a3a42a1427e3893dc48ee49b846df0153b365 Mon Sep 17 00:00:00 2001 From: konekoneko Date: Wed, 14 Nov 2012 15:06:32 +0900 Subject: [PATCH] =?utf8?q?=E9=A0=85=E7=9B=AE=E3=82=92=E8=BF=BD=E5=8A=A0?= =?utf8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- init.sql | 1 + profile.js | 7 ++++++- public/profile/detail.ejs | 17 +++++++++-------- public/profile/edit.ejs | 4 ++++ public/profile/registor.ejs | 4 ++++ 5 files changed, 24 insertions(+), 9 deletions(-) diff --git a/init.sql b/init.sql index a86107b..06bf100 100644 --- a/init.sql +++ b/init.sql @@ -10,6 +10,7 @@ create table list(name VARCHAR(64) NOT NULL, age SMALLINT UNSIGNED DEFAULT 0, height SMALLINT UNSIGNED DEFAULT 0, weight SMALLINT UNSIGNED DEFAULT 0, + gender VARCHAR(8), race VARCHAR(64), password VARCHAR(16), lastmodified DATETIME, diff --git a/profile.js b/profile.js index 6bcca77..aec6b6b 100644 --- a/profile.js +++ b/profile.js @@ -15,6 +15,8 @@ var async = require("async"); var security = require("./security.js"); +var ejs = require("ejs"); + var collection = new ProfileCollection(); module.exports = function(app){ @@ -79,8 +81,9 @@ function detail_proc(req, res) res.render("profile\\message",{message:err}); else if(result.length == 0) res.render("profile\\message",{message:$notfound_name}); - else + else{ res.render("profile\\detail",{list:result,token:info.token}); + } }); } @@ -234,6 +237,7 @@ function ProfileCollection() var item = { name:data.name, age:data.age, + gender:data.gender, height:data.height, weight:data.weight, race:data.race, @@ -260,6 +264,7 @@ function ProfileCollection() var item = { name:data.name, age:data.age, + gender:data.gender, height:data.height, weight:data.weight, race:data.race, diff --git a/public/profile/detail.ejs b/public/profile/detail.ejs index d261b61..21b4b2e 100644 --- a/public/profile/detail.ejs +++ b/public/profile/detail.ejs @@ -8,16 +8,17 @@

詳細画面

+

<%= list[0].name %>

- - - - + + + + @@ -29,11 +30,11 @@ - - - -
名前<%= list[0].name %>
å¹´é½¢ <%= list[0].age %>
性別<%= list[0].gender %>
身長 <%= list[0].height %>
種族 <%= list[0].race %>
備考<%= list[0].etc %>
+
+

詳細

+ <%- list[0].etc %> +
diff --git a/public/profile/edit.ejs b/public/profile/edit.ejs index d61d5da..bddf594 100644 --- a/public/profile/edit.ejs +++ b/public/profile/edit.ejs @@ -15,6 +15,10 @@ + 性別 + + + パスワード diff --git a/public/profile/registor.ejs b/public/profile/registor.ejs index 2401b49..23be2df 100644 --- a/public/profile/registor.ejs +++ b/public/profile/registor.ejs @@ -19,6 +19,10 @@ + 性別 + + + 年齢 -- 2.11.0