private function _getDnsTemplate(Server_Package $p) { $params = array('action' => 'simplelist', 'resource' => 'dnstemplate'); $result = $this->_makeRequest($params); if (isset($result['return']) && $result['return'] == 'error') { throw new Server_Exception('Can\'t find Dns template with name "' . $p->getName() . '". Go to Kloxo and create Dns template with this name'); } $name = str_replace(' ', '_', $p->getName()); foreach ($result['result'] as $key => $value) { if ($value == $name . '.dnst') { return $key; } } throw new Server_Exception('Can\'t find Dns template with name "' . $p->getName() . '". Go to Kloxo and create Dns template with this name'); }
private function _getPackageName(Server_Package $package) { $name = $package->getName(); if ($this->_config['username'] != 'root') { $name = $this->_config['username'] . '_' . $name; } return $name; }
private function _getPackageName(Server_Package $package) { $name = $package->getName(); return $name; }
/** * Change account package on server * @param Server_Account $a * @param Server_Package $p */ public function changeAccountPackage(Server_Account $a, Server_Package $p) { if ($a->getReseller()) { $this->getLog()->info('Updating reseller hosting account'); } else { $this->getLog()->info('Updating shared hosting account'); } $p->getName(); $p->getQuota(); $p->getBandwidth(); $p->getMaxSubdomains(); $p->getMaxParkedDomains(); $p->getMaxDomains(); $p->getMaxFtp(); $p->getMaxSql(); $p->getMaxPop(); $p->getCustomValue('param_name'); }
public function changeAccountPackage(Server_Account $a, Server_Package $p) { $client = $a->getClient(); $ci = $this->getClient($a); $params = array('reseller_id' => 1, 'client_id' => $ci['client_id'], 'server_id' => $this->getServerId(), 'company_name' => $client->getCompany(), 'contact_name' => $client->getFullName(), 'username' => $a->getUsername(), 'password' => $a->getPassword(), 'language' => $p->getCustomValue('languge'), 'usertheme' => $p->getCustomValue('theme'), 'street' => $client->getStreet(), 'zip' => $client->getZip(), 'city' => $client->getCity(), 'state' => $client->getState(), 'country' => $client->getCountry(), 'telephone' => $client->getTelephone(), 'mobile' => $client->getTelephone(), 'fax' => $client->getTelephone(), 'email' => $client->getEmail(), 'internet' => $client->getWww(), 'icq' => '', 'notes' => $a->getNote()); $result = $this->_request('client_update', $params); return (bool) $result; }