在ecshop中用户信息添加字段的思路分析及方法

上传人:wt****50 文档编号:36714067 上传时间:2018-04-01 格式:DOC 页数:5 大小:31.50KB
返回 下载 相关 举报
在ecshop中用户信息添加字段的思路分析及方法_第1页
第1页 / 共5页
在ecshop中用户信息添加字段的思路分析及方法_第2页
第2页 / 共5页
在ecshop中用户信息添加字段的思路分析及方法_第3页
第3页 / 共5页
在ecshop中用户信息添加字段的思路分析及方法_第4页
第4页 / 共5页
在ecshop中用户信息添加字段的思路分析及方法_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

《在ecshop中用户信息添加字段的思路分析及方法》由会员分享,可在线阅读,更多相关《在ecshop中用户信息添加字段的思路分析及方法(5页珍藏版)》请在金锄头文库上搜索。

1、在在 ecshop 中用户信息添加字段的思路分析及方法中用户信息添加字段的思路分析及方法http:/ 1、用 phpMyAdmin 打开 mysql 数据库 2、选择表“ecs_users ”3】添加你想要加的字段 二、修改模板文件 1、修改 themes/你所选模板目录下/user_passport.dwt 文件$lang.other_mobile_phone$lang.other_wangw修改 themes/你所选模板目录下/user_transaction.dwt 文件$lang.other_mobile_phone:$lang.other_wangw:三修改 php 文件 1.修改根

2、目录下的 user.php /* 修改个人资料的处理 */ elseif ($action = act_edit_profile) include_once(ROOT_PATH . includes/lib_transaction.php);$birthday = trim($_POSTbirthdayYear) .-. trim($_POSTbirthdayMonth) .-.trim($_POSTbirthdayDay);$email = trim($_POSTemail);$msn = trim($_POSTothermsn);$qq = trim($_POSTotherqq);$mob

3、ile_phone = trim($_POSTothermobile_phone);$office_phone = $_POSTotheroffice_phone;$home_phone = $_POSTotherhome_phone; $wangw = $_POSTotherwangw;if (!empty($office_phone) if (!empty($home_phone) if (!is_email($email)show_message($_LANGmsg_email_format);if (!empty($msn) if (!empty($qq) if (!empty($mo

4、bile_phone) if (!empty($wangw) $profile = array( 3、修改 upload/js/user.js 文件 处理注册用户 */ function register() var frm = document.formsformUser;var username = Utils.trim(frm.elementsusername.value);var email = frm.elementsemail.value;var password = Utils.trim(frm.elementspassword.value);var confirm_passwo

5、rd = Utils.trim(frm.elementsconfirm_password.value);var checked_agreement = frm.elementsagreement.checked;var msn = frm.elementsothermsn ? Utils.trim(frm.elementsothermsn.value) : ;var qq = frm.elementsotherqq ? Utils.trim(frm.elementsotherqq.value) : ;var home_phone = frm.elementsotherhome_phone ?

6、Utils.trim(frm.elementsotherhome_phone.value) : ;var office_phone = frm.elementsotheroffice_phone ? Utils.trim(frm.elementsotheroffice_phone.value) : ;var mobile_phone = frm.elementsothermobile_phone ? Utils.trim(frm.elementsothermobile_phone.value) : ;var wangw = frm.elementsotherwangw ? Utils.trim

7、(frm.elementsotherwangw.value) : ;var msg = “;/ 检查输入var msg = ;if (username.length = 0)msg += username_empty + n;else if (username.match(/s*$|c:concon$|%,*“stelse if (username.length 0 if (qq.length 0 if (office_phone.length0)var reg = /d|-|s+$/;if (!reg.test(office_phone)msg += office_phone_invalid

8、 + n;if (home_phone.length0)var reg = /d|-|s+$/;if (!reg.test(home_phone)msg += home_phone_invalid + n;if (mobile_phone.length0)var reg = /d|-|s+$/;if (!reg.test(mobile_phone)msg += mobile_phone_invalid + n;if (wangw.length0)var reg = /d|-|s+$/;if (!reg.test(wangw)msg += wangw_invalid + n;if (msg.le

9、ngth 0) 4、修改 includes/lib_passport.php/* 过滤非法的键值 */$other_key_array = array(msn, qq, office_phone, home_phone, mobile_phone,wangw);foreach ($profileother as $key = $val)/* 会员帐号信息 */$info = array();$infos = array();$sql = “SELECT user_name, birthday, sex, question, answer, rank_points, pay_points,use

10、r_money, user_rank, “.“ msn, qq, office_phone, home_phone, mobile_phone,wangw “.“FROM “ .$GLOBALSecs-table(users) . “ WHERE user_id = $user_id“;$infoquestion = isset($infosquestion) ? htmlspecialchars($infosquestion) : ;$infouser_money = price_format($infouser_money, false);$infopay_points = $infopay_points . $GLOBALS_CFGintegral_name;$infobonus = $bonus;$infoqq = $infosqq;$infomsn = $infosmsn;$infooffice_phone= $infosoffice_phone;$infohome_phone = $infoshome_phone;$infomobile_phone = $infosmobile_phone;$infowangw = $infoswangw;return $info;

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 社会民生

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号