示例#1
0
文件: Main.php 项目: kokkez/shineisp
 /**
  * updateDomain
  * Update the domain information
  * @param unknown_type $customerID
  */
 public function updateDomain($domainID)
 {
     // Connection to the SOAP system
     $soap = $this->Connect();
     if (empty($this->session)) {
         throw new Exception('SOAP connection system error');
     }
     // Get the domain information
     $domain = Domains::find($domainID);
     if (!empty($domain[0])) {
         $domain_name = $domain[0]['domain'] . "." . $domain[0]['DomainsTlds']['WhoisServers']['tld'];
         try {
             $retval = $soap->domainInfo($this->session['id'], $domain_name);
             $info['domain'] = $retval->domain;
             $info['creation'] = $retval->creation;
             $info['modification'] = $retval->modification;
             $info['expiration'] = $retval->expiration;
             $info['nichandle'] = $retval->nicowner;
             $info['authinfocode'] = $retval->authinfo;
             return Domains::updateDomain($domainID, $info);
         } catch (Exception $e) {
             throw new Exception($e->getMessage());
         }
     }
     throw new Exception('Domain ID not found.');
 }