



免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
在ecshop中用户信息添加字段的思路分析及方法http:/0535/post/60.html一、数据库结构修改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.修改根目录下的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); $mobile_phone = trim($_POSTothermobile_phone); $office_phone = $_POSTotheroffice_phone; $home_phone = $_POSTotherhome_phone;$wangw = $_POSTotherwangw; if (!empty($office_phone) & !preg_match( /d|_|-|s+$/, $office_phone ) ) show_message($_LANGpassport_jsoffice_phone_invalid); if (!empty($home_phone) & !preg_match( /d|_|-|s+$/, $home_phone) ) show_message($_LANGpassport_jshome_phone_invalid); if (!is_email($email) show_message($_LANGmsg_email_format); if (!empty($msn) & !is_email($msn) show_message($_LANGpassport_jsmsn_invalid); if (!empty($qq) & !preg_match(/d+$/, $qq) show_message($_LANGpassport_jsqq_invalid); if (!empty($mobile_phone) & !preg_match(/d+$/, $mobile_phone) show_message($_LANGpassport_jsmobile_phone_invalid); if (!empty($wangw) & !preg_match(/d+$/, $wangw) show_message($_LANGpassport_jswangw_invalid); $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_password = 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 ? 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(frm.elementsotherwangw.value) : ; var msg = ; / 检查输入 var msg = ; if (username.length = 0) msg += username_empty + n; else if (username.match(/s*$|c:concon$|%,*st&/) msg += username_invalid + n; else if (username.length 3) /msg += username_shorter + n; if (email.length = 0) msg += email_empty + n; else if ( ! (Utils.isEmail(email) msg += email_invalid + n; if (password.length = 0) msg += password_empty + n; else if (password.length 0 & (!Utils.isEmail(msn) msg += msn_invalid + n; if (qq.length 0 & (!Utils.isNumber(qq) msg += qq_invalid + n; if (office_phone.length0) var reg = /d|-|s+$/; if (!reg.test(office_phone) msg += office_phone_invalid + 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.length 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,user_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
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 老年人微课课件
- 泰富广场新年景观
- 期末专项训练:完形填空(含答案解析)-2024人教版七年级英语下册
- 老年人口腔清洁课件
- 人教新目标版八年级上册英语全册知识点总结单词+短语+句子+语法
- 人教版八年级英语下册期中复习:完形填空20篇(10空题)含答案
- 配音设备调试专业知识培训课件
- CN120198056A 基于工业物联网的仓储物品管理方法、系统、设备及介质
- CN120197140A 一种配电网关键节点识别方法、装置、终端及介质
- 人教版八年级英语下册Unit2 I'll help to clean up the city park单元测试题
- 台球俱乐部工作管理制度
- 肉毒素中毒的治疗讲课件
- 蓝色简约风医学生职业生涯规划展示模板
- 土建安全员c类考试试题及答案
- 链家签约文件合同模板
- 第四版(2025)国际压力性损伤溃疡预防和治疗临床指南解读
- 职业学校化妆课教案
- 《泡泡玛特营销策略问卷调查及消费者RFM分析案例综述》2000字
- DB32T 4772-2024自然资源基础调查技术规程
- 面点原料知识
- 陕西省西安市高新一中、交大附中2025届高三第四次模拟考试化学试卷含解析
评论
0/150
提交评论