久久中文字幕一区二区,青青久久国产,91亚洲国产,8888四色奇米在线观看不卡,精品一区二区三区四区电影,男女羞羞视频免费看

關(guān)閉X

modoer點(diǎn)評(píng)系統(tǒng)防止注冊(cè)機(jī)惡意注冊(cè)解決辦法

發(fā)布時(shí)間:2014年10月26日    作者:溧陽(yáng)安靠信息技術(shù)原創(chuàng)   key:點(diǎn)擊:
modoer點(diǎn)評(píng)系統(tǒng)防止注冊(cè)機(jī)惡意注冊(cè)解決辦法

解決辦法:在注冊(cè)時(shí)添加一個(gè)必填的選項(xiàng),同理可增加其它選項(xiàng)來(lái)防止注冊(cè)

1.在數(shù)據(jù)表modoer_member里添加字段mobile,字段類型如下

`mobile` varchar(20) NOT NULL DEFAULT ''
2.找到文件/templates/main/default/member_reg.htm,在相應(yīng)位置(不出意外的話在30行左右)添加
  1. <tr>
2.                          <td align="right" width="100" valign="top">手機(jī)號(hào)碼:</td>
  1.                         <td width="*">
  2.                             <input type="text" onblur="check_mobile(this);" name="mobile" class="t_input" style="width:200px;" validator="{'empty':'N','errmsg':'請(qǐng)?zhí)顚懩氖謾C(jī)號(hào)碼。'}" />
  3.                             <span id="msg_mobile" class="formmessage none"></span>
  4.                             <div class="formtip">手機(jī)號(hào)碼為<span class="font_2">11</span>或<span class="font_2">12</span>個(gè)字符</div>
  5.                         </td>
  6.                     </tr>
復(fù)制代碼
3.找到文件/static/javascript/member.js,在相應(yīng)位置(應(yīng)該在22行左右)添加
  1. function check_mobile(obj) {
  2.         if(!obj.value) {
  3.                 $('#msg_mobile').html('<span class="font_1">請(qǐng)輸入手機(jī)號(hào)碼.</span>').show();
  4.                 return;
  5.         }
  6.         $.post(Url('member/reg/op/check_mobile'), {'mobile':obj.value,'in_ajax':1}, function(data) {
  7.                 $('#msg_mobile').html(data).show();
  8.         });
  9. }
復(fù)制代碼
4.找到文件/core/modules/member/reg.php,在相應(yīng)位置(48行左右)添加
  1. case 'check_mobile':
  2.     if(!$mobile = trim($_POST['mobile'])) {
  3.         echo lang('member_reg_ajax_mobile_empty'); exit;
  4.     }
  5.     if(!validate::is_mobile($mobile)) {
  6.         echo lang('member_reg_ajax_mobile_invalid'); exit;
  7.     }
  8.     if(!$MOD['existsmobilereg'] && $user->check_mobile_exists($mobile)) {
  9.         echo lang('member_reg_ajax_mobile_exists');
  10.         exit;
  11.     }
  12.     echo lang('member_reg_ajax_mobile_normal'); exit;
  13.     break;
復(fù)制代碼
5.找到文件/core/modules/member/model/member_class.php
28行,將
  1. $this->add_field('uid,username,password,password2,email,groupid,nexttime,nextgroupid,point,coin');
復(fù)制代碼
修改為
  1. $this->add_field('uid,username,password,password2,email,mobile,groupid,nexttime,nextgroupid,point,coin');
復(fù)制代碼
31行,將
  1. $this->add_field_fun('password,email', 'trim');
復(fù)制代碼
修改為
  1. $this->add_field_fun('password,email,mobile', 'trim');
復(fù)制代碼
150行左右,添加
  1.        $this->loader->helper('validate');
  2.         if(!$post['mobile'] || !validate::is_mobile($post['mobile'])) {
  3.             redirect('member_post_empty_mobile');
  4.         }
復(fù)制代碼

163行左右,添加
  1.                 if($this->check_mobile_exists($post['mobile'])) 
  2.                     redirect('member_post_exists_mobile');
復(fù)制代碼
182行左右,添加
  1.     function check_mobile_exists($mobile, $without_uid = null) {
  2.         $this->db->from($this->table);
  3.         $this->db->where('mobile',$mobile);
  4.         if($without_uid > 0) $this->db->where_not_equal('uid', $without_uid);
  5.         return $this->db->count() > 0;
  6.     }
復(fù)制代碼
6.找到/core/helper/validate.php,在12行左右添加
  1.         function is_mobile($str) {
  2.                 if(strlen($str) == 11){
  3.                         return preg_match('/^(13[0-9]|15[0-9]|153|156|18[0-9])[0-9]{8}$/', $str);
  4.                 }elseif(strlen($str) == 12){
  5.                         return preg_match('/^0(13[0-9]|15[0-9]|153|156|18[0-9])[0-9]{8}$/', $str);
  6.                 }else{
  7.                         return false;
  8.                 }
  9.     }
復(fù)制代碼
7.找到/core/modules/member/helper/query.php,在19行,將
  1. $db->select($select?$select:'uid,username,email,groupid,coin,point,reviews,subjects,responds,flowers');
復(fù)制代碼
修改為
  1. $db->select($select?$select:'uid,username,email,mobile,groupid,coin,point,reviews,subjects,responds,flowers');
復(fù)制代碼
8.找到/core/lang/CH/member.php,在30行左右和45行左右,添加
  1.     'member_reg_ajax_mobile_empty' => '<font color="red">您未填寫手機(jī)號(hào)碼</font>',
  2.     'member_reg_ajax_mobile_invalid' => '<font color="red">您填寫的手機(jī)號(hào)碼格式不正確</font>',
  3.     'member_reg_ajax_mobile_exists' => '<font color="red">您填寫的手機(jī)號(hào)碼已存在</font>',
  4.     'member_reg_ajax_mobile_normal' => '<font color="green">您可以使用這個(gè)手機(jī)號(hào)碼</font>',
復(fù)制代碼
  1. 'member_post_empty_mobile' => '對(duì)不起,您未填寫手機(jī)號(hào)碼或者格式錯(cuò)誤,請(qǐng)返回重寫。',
  2.     'member_post_exists_mobile' => '對(duì)不起,您填寫的手機(jī)號(hào)碼已存在,請(qǐng)返回重寫。',
除非注明,文章均為安靠信息技術(shù)原創(chuàng),轉(zhuǎn)載請(qǐng)注明本文地址:m.bwm5.cn/FAQ/question_33.html

上一篇:modoer點(diǎn)評(píng)系統(tǒng)地圖出現(xiàn)亂碼的解決辦法
下一篇:網(wǎng)站設(shè)計(jì)制作合作須知

安靠首頁(yè) | 服務(wù)項(xiàng)目 | 解決方案 | 常見(jiàn)問(wèn)題 | 溧陽(yáng)網(wǎng)站建設(shè) | 優(yōu)惠政策 | 友情鏈接 | 申請(qǐng)友鏈 | 網(wǎng)站地圖 最新新聞

安靠信息技術(shù)是一家集互聯(lián)網(wǎng)及移動(dòng)APP應(yīng)用開(kāi)發(fā)、網(wǎng)站建設(shè)運(yùn)營(yíng)、電子商務(wù)、企業(yè)服務(wù)器技術(shù)文件共享安全vpn域應(yīng)用、

弱電監(jiān)控安裝綜合布線、企業(yè)管理軟件OA、ERP、CRM財(cái)務(wù)軟件等IT服務(wù)于一體的高科技服務(wù)型網(wǎng)絡(luò)公司。
Copyright 2013 m.bwm5.cn 常州溧陽(yáng)安靠信息技術(shù)

主站蜘蛛池模板: 无法忍受电影完整版 | 性配久久久| 国产玖玖在线 | 男女试看120秒 | 免费国产成人高清无线看软件 | run away无删减韩国动漫在线看 | 精品福利在线视频 | 婷婷激情五月综合 | 欧美国产一区二区三区 | 精品一区精品二区 | 精品一区二区三区免费视频 | 玖玖精品在线 | 99在线观看精品免费99 | 六月婷婷中文字幕 | 国产一区国产二区国产三区 | 久久精品国产99国产精品 | 日韩免费在线视频观看 | 精品成人在线视频 | 免费一区区三区四区 | 色黄视频在线观看 | 欧美顶级情欲片免费看 | 久久国产免费观看精品1 | 欧美日韩亚洲一区二区三区在线观看 | 国产永久在线视频 | 国产精品视_精品国产免费 国产精品深夜福利免费观看 | 狠狠干天天爽 | 日韩欧美国产精品第一页不卡 | 综合色影院 | 色天天天天综合男人的天堂 | 99精品在线观看视频 | 久久精品国产精品亚洲婷婷 | 国产区综合 | 日韩福利在线视频 | 国产成人久久精品一区二区三区 | 激情综合网五月 | 欧美视频在线观看一区 | 久久国产成人午夜aⅴ影院 久久国产成人精品国产成人亚洲 | 丝袜精品 欧美 亚洲 自拍 | 国产精品一区三区 | 免费一级视频在线播放 | 免费在线一区 |