Ejemplo n.º 1
0
 public function Profile()
 {
     $this->MyAction = 'Profile';
     $AgentModule = new AgentModule();
     if (strlen($this->_POST['PassWord']) >= 6) {
         $Update['PassWord'] = md5($this->_POST['PassWord']);
     }
     if ($this->_POST['EnterpriseName']) {
         $Update['EnterpriseName'] = $this->_POST['EnterpriseName'];
     }
     if ($this->_POST['ContactName']) {
         $Update['ContactName'] = $this->_POST['ContactName'];
     }
     if ($this->_POST['ContactTel']) {
         $Update['ContactTel'] = $this->_POST['ContactTel'];
     }
     if ($this->_POST['ContactEmail']) {
         $Update['ContactEmail'] = $this->_POST['ContactEmail'];
     }
     if ($this->_POST['ContactAddress']) {
         $Update['ContactAddress'] = $this->_POST['ContactAddress'];
     }
     $filter[AgentID] = intval($_SESSION['AgentID']);
     //dd($Update);
     if (!empty($Update)) {
         if ($AgentModule->UpdateArray($Update, $filter)) {
             JsMessage('修改个人资料成功');
         } else {
             JsMessage('修改个人资料失败,请再一次尝试!');
         }
     }
     $AgentInfo = $AgentModule->GetOneInfoByKeyID($_SESSION['AgentID']);
     //dd($AgentInfo);
     $this->Data = $AgentInfo;
 }