<?php
/**
 * Copy Right IJH.CC
 * Each engineer has a duty to keep the code elegant
 * $Id$
 */
if(!defined('__CORE_DIR')){
    exit("Access Denied");
}
class Ctl_Ucenter_Set extends Ctl_Ucenter
{
    
    public function wxmodifymobile(){
       
       $mobile = $this->GP('mobile');
       if($mobile){
           
            $session =K::M('system/session')->start();  
            if(!$code = $this->GP('mobile_yzm')){
                $this->msgbox->add('验证码不能为空',211);
            }else if($code != $session->get('code_'.$mobile)){
                $this->msgbox->add('验证码不正确',211);
            }else if(K::M('member/account')->update_mobile($this->uid,$mobile)){
                $this->msgbox->add('绑定手机成功');
            }
           
       }else{
           if(strlen($this->MEMBER['mobile']) > 1){
                header('Location:/xiche/index/');
            }
            $this->tmpl = 'ucenter/set/wxmodifymobile.html';
       }
       
  
       
   }


    
}