BVB Source Codes

Shandong kernel enterprise stand the source code Show edit_baseinfo.php Source code

Return Download Shandong kernel enterprise stand the source code: download edit_baseinfo.php Source code - Download Shandong kernel enterprise stand the source code Source code - Type:.php
  1. <?php
  2. require_once(dirname(__FILE__)."/config.php");
  3. CheckRank(0,0);
  4. $menutype = 'config';
  5. if(!isset($dopost))
  6. {
  7.         $dopost = '';
  8. }
  9. $pwd2=(empty($pwd2))? "" : $pwd2;
  10. $row=$dsql->GetOne("select  * from `#@__member` where mid='".$cfg_ml->M_ID."'");
  11. $face = $row['face'];
  12. if($dopost=='save')
  13. {
  14.         $svali = GetCkVdValue();
  15.  
  16.         if(strtolower($vdcode) != $svali || $svali=='')
  17.         {
  18.                 ResetVdValue();
  19.                 ShowMsg('验证码错误!','-1');
  20.                 exit();
  21.         }
  22.         if(!is_array($row) || $row['pwd']!=md5($oldpwd))
  23.         {
  24.                 ShowMsg('你输入的旧密码错误或没填写,不允许修改资料!','-1');
  25.                 exit();
  26.         }
  27.         if($userpwd!=$userpwdok)
  28.         {
  29.                 ShowMsg('你两次输入的新密码不一致!','-1');
  30.                 exit();
  31.         }
  32.         if($userpwd=='')
  33.         {
  34.                 $pwd = $row['pwd'];
  35.         }
  36.         else
  37.         {
  38.                 $pwd = md5($userpwd);
  39.                 $pwd2 = substr(md5($userpwd),5,20);
  40.         }
  41.         $addupquery = '';
  42.        
  43.         #api{{
  44.         if(defined('UC_API') && @include_once DEDEROOT.'/uc_client/client.php')
  45.         {
  46.                 $emailnew = $email != $row['email'] ? $email : '';
  47.                 $ucresult = uc_user_edit($cfg_ml->M_LoginID, $oldpwd, $userpwd, $emailnew);            
  48.         }
  49.         #/aip}}
  50.        
  51.         //修改安全问题或Email
  52.         if($email != $row['email'] || ($newsafequestion != 0 && $newsafeanswer != ''))
  53.         {
  54.                 if($row['safequestion']!=0 && ($row['safequestion'] != $safequestion || $row['safeanswer'] != $safeanswer))
  55.                 {
  56.                         ShowMsg('你的旧安全问题及答案不正确,不能修改Email或安全问题!','-1');
  57.                         exit();
  58.                 }
  59.  
  60.                 //修改Email
  61.                 if($email != $row['email'])
  62.                 {
  63.                         if(!CheckEmail($email))
  64.                         {
  65.                                 ShowMsg('Email格式不正确!','-1');
  66.                                 exit();
  67.                         }
  68.                         else
  69.                         {
  70.                                 $addupquery .= ",email='$email'";
  71.                         }
  72.                 }
  73.  
  74.                 //修改安全问题
  75.                 if($newsafequestion != 0 && $newsafeanswer != '')
  76.                 {
  77.                         if(strlen($newsafeanswer) > 30)
  78.                         {
  79.                                 ShowMsg('你的新安全问题的答案太长了,请保持在30字节以内!','-1');
  80.                                 exit();
  81.                         }
  82.                         else
  83.                         {
  84.                                 $addupquery .= ",safequestion='$newsafequestion',safeanswer='$newsafeanswer'";
  85.                         }
  86.                 }
  87.         }
  88.  
  89.         //修改uname
  90.         if($uname != $row['uname'])
  91.         {
  92.                 $rs = CheckUserID($uname,'昵称或公司名称',false);
  93.                 if($rs!='ok')
  94.                 {
  95.                         ShowMsg($rs,'-1');
  96.                         exit();
  97.                 }
  98.                 $addupquery .= ",uname='$uname'";
  99.         }
  100.        
  101.         //性别
  102.         if( !in_array($sex,array('男','女','保密')) )
  103.         {
  104.                 ShowMsg('请选择正常的性别!','-1');
  105.                 exit();
  106.         }
  107.        
  108.         $query1 = "Update `#@__member` set pwd='$pwd',sex='$sex'{$addupquery} where mid='".$cfg_ml->M_ID."' ";
  109.         $dsql->ExecuteNoneQuery($query1);
  110.  
  111.         //如果是管理员,修改其后台密码
  112.         if($cfg_ml->fields['matt']==10 && $pwd2!="")
  113.         {
  114.                 $query2 = "Update `#@__admin` set pwd='$pwd2' where id='".$cfg_ml->M_ID."' ";
  115.                 $dsql->ExecuteNoneQuery($query2);
  116.         }
  117.         ShowMsg('成功更新你的基本资料!','edit_baseinfo.php',0,5000);
  118.         exit();
  119. }
  120. include(DEDEMEMBER."/templets/edit_baseinfo.htm");
  121. ?>
downloadedit_baseinfo.php Source code - Download Shandong kernel enterprise stand the source code Source code
Related Source Codes/Software:
Dede V2.2 dance music program - This system is based on DEDE5.7 sp1 production dan... 2016-11-11
Search engine v1.0 eight grams of novels - This program consists of WEB side and collection p... 2016-11-11
A thief free Jacky novel CMS, support for multiple station collection, support pseudo original SEO - A thief free Jacky novel CMS, support for multiple... 2016-11-11
Kunlun lubricating oil companies stand the source code - Just testing, free, source code is very beautiful ... 2016-11-11
Imitation of Chinese stationmaster net source dreams to 5.7 sp1 source code - Exactly the same and the Director of China network... 2016-11-11
Newscoop CMS v4.0.4 multilingual version - Newscoop is a content management system is mainly ... 2016-11-11
Ku978 navigator free send you department (with acquisition module) - Is I purchase the commercial version of this progr... 2016-11-11
Think of concise message this v1.1 - Wisdom of concise message this V1.1 main functions... 2016-11-11
nvidia-docker - Build and run Docker containers leveraging NVIDIA ... 2017-04-08
quickstart - Angular 2 QuickStart - source from the documentati... 2017-04-08
jQuery-Autocomplete - Ajax Autocomplete for jQuery allows you to easily ... 2017-04-08
Android-Best-Practices - Android best practice examples 2017-04-08
Bootstrap-Admin-Template - Metis - Free Bootstrap Admin Dashboard Template ... 2017-04-08
CocoaSPDY - SPDY for iOS and OS X 2017-04-08
parse-dashboard - A dashboard for managing your Parse apps that aren... 2017-04-08
HoloEverywhere - NO LONGER MAINTAINED. DEVELOP FOR 4.X+ DUDE. 2017-04-08
side-comments - [UNMAINTAINED] An interface component to give your... 2017-04-08
SVG-Morpheus - JavaScript library enabling SVG icons to morph fro... 2017-04-08

 Back to top