From 208ec985b102ebed2e3235ba1492f6368a4b919f Mon Sep 17 00:00:00 2001 From: fujia Date: Sat, 13 Nov 2010 08:58:22 +0000 Subject: [PATCH] + complete task #320:add other fileds to user's profile. --- db/update1.3.sql | 1 + module/my/view/profile.html.php | 36 +++++++++++++++++++++++++++++++++ module/user/lang/en.php | 1 - module/user/lang/ja.php | 1 - module/user/lang/ko.php | 1 - module/user/lang/zh-cn.php | 1 - module/user/lang/zh-tw.php | 1 - module/user/model.php | 1 + module/user/view/edit.html.php | 36 +++++++++++++++++++++++++++++++++ 9 files changed, 74 insertions(+), 5 deletions(-) diff --git a/db/update1.3.sql b/db/update1.3.sql index 78d2f8aee6..a065c25e5a 100644 --- a/db/update1.3.sql +++ b/db/update1.3.sql @@ -1,2 +1,3 @@ -- 2010-11-13 project table. ALTER TABLE `zt_project` ADD `RM` varchar(30) NOT NULL DEFAULT '' AFTER `QM`; +ALTER TABLE `zt_user` DROP `birthday` ; diff --git a/module/my/view/profile.html.php b/module/my/view/profile.html.php index 4eb8679962..ef9adf48d9 100644 --- a/module/my/view/profile.html.php +++ b/module/my/view/profile.html.php @@ -49,6 +49,42 @@ user->last;?> last;?> + + user->msn;?> + msn;?> + + + user->qq;?> + qq;?> + + + user->yahoo;?> + yahoo;?> + + + user->gtalk;?> + gtalk;?> + + + user->wangwang;?> + wangwang;?> + + + user->mobile;?> + mobile;?> + + + user->phone;?> + phone;?> + + + user->address;?> + address;?> + + + user->zipcode;?> + zipcode;?> + user->realname = 'Realname'; $lang->user->nickname = 'Nickname'; $lang->user->avatar = 'Avatar'; $lang->user->birthyear = 'Birth year'; -$lang->user->birthday = 'Birthday'; $lang->user->gendar = 'Gender'; $lang->user->email = 'Email'; $lang->user->msn = 'MSN'; diff --git a/module/user/lang/ja.php b/module/user/lang/ja.php index e04bb51c09..cf586f2c90 100644 --- a/module/user/lang/ja.php +++ b/module/user/lang/ja.php @@ -59,7 +59,6 @@ $lang->user->realname = '実名'; $lang->user->nickname = 'ニックネーム'; $lang->user->avatar = 'アバター'; $lang->user->birthyear = '誕生年'; -$lang->user->birthday = '誕生日'; $lang->user->gendar = '性別'; $lang->user->email = 'Eメール'; $lang->user->msn = 'MSNの'; diff --git a/module/user/lang/ko.php b/module/user/lang/ko.php index e27ba27a4c..514a56bea3 100644 --- a/module/user/lang/ko.php +++ b/module/user/lang/ko.php @@ -59,7 +59,6 @@ $lang->user->realname = 'Realname'; $lang->user->nickname = '별명'; $lang->user->avatar = '화신'; $lang->user->birthyear = '출생 연도'; -$lang->user->birthday = '생일'; $lang->user->gendar = '성별'; $lang->user->email = '이메일'; $lang->user->msn = 'MSN'; diff --git a/module/user/lang/zh-cn.php b/module/user/lang/zh-cn.php index 0bffce57f4..030e8b0d52 100644 --- a/module/user/lang/zh-cn.php +++ b/module/user/lang/zh-cn.php @@ -59,7 +59,6 @@ $lang->user->realname = '真实姓名'; $lang->user->nickname = '昵称'; $lang->user->avatar = '头像'; $lang->user->birthyear = '出生年'; -$lang->user->birthday = '出生月日'; $lang->user->gendar = '性别'; $lang->user->email = '邮箱'; $lang->user->msn = 'MSN'; diff --git a/module/user/lang/zh-tw.php b/module/user/lang/zh-tw.php index f31c7b7a71..03b39b82ac 100644 --- a/module/user/lang/zh-tw.php +++ b/module/user/lang/zh-tw.php @@ -59,7 +59,6 @@ $lang->user->realname = '真實姓名'; $lang->user->nickname = '暱稱'; $lang->user->avatar = '頭像'; $lang->user->birthyear = '出生年'; -$lang->user->birthday = '出生月日'; $lang->user->gendar = '性別'; $lang->user->email = '郵箱'; $lang->user->msn = 'MSN'; diff --git a/module/user/model.php b/module/user/model.php index 5e96eae1a7..095244b2c4 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -117,6 +117,7 @@ class userModel extends model ->setIF(isset($_POST['join']) and $this->post->join == '', 'join', '0000-00-00') ->setIF($this->post->password1 != false, 'password', md5($this->post->password1)) ->remove('password1, password2') + ->specialChars('msn,qq,yahoo,gtalk,wangwang,mobile,phone,address,zipcode') ->get(); $this->dao->update(TABLE_USER)->data($user) diff --git a/module/user/view/edit.html.php b/module/user/view/edit.html.php index f6b52bc9f2..a3b7661844 100644 --- a/module/user/view/edit.html.php +++ b/module/user/view/edit.html.php @@ -48,6 +48,42 @@ user->password2;?> + + user->msn;?> + msn, "class='text-3'");?> + + + user->qq;?> + qq, "class='text-3'");?> + + + user->yahoo;?> + yahoo, "class='text-3'");?> + + + user->gtalk;?> + gtalk, "class='text-3'");?> + + + user->wangwang;?> + wangwang, "class='text-3'");?> + + + user->mobile;?> + mobile, "class='text-3'");?> + + + user->phone;?> + phone, "class='text-3'");?> + + + user->address;?> + address, "class='text-3'");?> + + + user->zipcode;?> + zipcode, "class='text-3'");?> +