예제 #1
0
 function p_new()
 {
     # get the common server class and set login details
     include_once PATH_MODULES . 'host_server/host_server.inc.php';
     $host = new host_server();
     if ($this->service['host_username'] == '' || $this->service['host_password'] == '') {
         $this->login = $host->generate_login($this->service, $this->account, 4, 4, false);
     } else {
         $this->login['username'] = $this->service['host_username'];
         $this->login['password'] = $this->service['host_password'];
     }
     # get ip address
     if ($this->plugin_data['type'] == '1') {
         $this->ip = $host->useipaddress($this->service, $this->server);
     } else {
         $this->ip = $this->server['name_based_ip'];
     }
     # Set the post vars:
     $this->host = 'https://' . $this->server_cfg['host'] . ':' . $this->server_cfg['port'] . '/CMD_ACCOUNT_USER';
     $this->post = "action=create" . "&add=Submit" . "&username={$this->login['username']}" . "&email={$this->account['email']}" . "&passwd={$this->login['password']}" . "&passwd2={$this->login['password']}" . "&domain={$this->service['domain_name']}.{$this->service['domain_tld']}" . "&package={$this->plugin_data['package']}" . "&ip={$this->ip}" . "&notify={$this->server_cfg['notify']}";
     # Connect & get response:
     $result = $this->connect('25');
     # Check the response & Debug
     if ($this->server['debug']) {
         echo "<pre> " . print_r($result) . " </pre>";
     }
     if (!empty($result)) {
         return true;
     } else {
         return false;
     }
 }
예제 #2
0
 function p_new()
 {
     # get the common server class and set login details
     include_once PATH_MODULES . 'host_server/host_server.inc.php';
     $host = new host_server();
     if ($this->service['host_username'] == '' || $this->service['host_password'] == '') {
         $this->login = $host->generate_login($this->service, $this->account, 4, 4, false);
     } else {
         $this->login['username'] = $this->service['host_username'];
         $this->login['password'] = $this->service['host_password'];
     }
     # get ip address
     if ($this->plugin_data['ipinfo_namebased'] == '1') {
         $host->useipaddress($this->service, $this->server);
     }
     # send the admin the creation email
     include_once PATH_MODULES . 'email_template/email_template.inc.php';
     $email = new email_template();
     $email->send('admin->host_new_admin', $this->account['id'], $this->service['id'], '', '');
     # send the user the alert email
     include_once PATH_MODULES . 'email_template/email_template.inc.php';
     $email = new email_template();
     $email->send('host_new_user', $this->account['id'], $this->service['id'], '', '');
     return true;
 }
예제 #3
0
 function p_new()
 {
     # get the common server class and set login details
     include_once PATH_MODULES . 'host_server/host_server.inc.php';
     $host = new host_server();
     if ($this->service['host_username'] == '' || $this->service['host_password'] == '') {
         $this->login = $host->generate_login($this->service, $this->account, 4, 4, false);
     } else {
         $this->login['username'] = $this->service['host_username'];
     }
     #include the Helm class (sorry, that file is encoded)
     include_once PATH_CORE . 'helm.inc.php';
     $helm = new HELM();
     $helm->ssl = true;
     $helm->cookie_path = PATH_FILES . 'HELM_COOKIE.dat';
     $helm->host = $this->server_cfg['host'];
     $helm->user = $this->server_cfg['user'];
     $helm->pass = $this->server_cfg['pass'];
     $helm->debug = $this->server['debug'];
     $result = $helm->add($this->server_cfg['reseller'], $this->login['username'], $this->service['domain_name'], $this->service['domain_tld'], $this->plugin_data['plan'], $this->service['sku'], $this->account['first_name'], $this->account['last_name'], $this->account['company'], $this->account['address1'], $this->account['city'], $this->account['state'], $this->account['zip'], $this->account['email']);
     # send the user the details
     include_once PATH_MODULES . 'email_template/email_template.inc.php';
     $email = new email_template();
     $email->send('host_new_user', $this->account['id'], $this->service_id, '', '');
     return $result;
 }
예제 #4
0
 function p_new()
 {
     # get the common server class and set login details
     include_once PATH_MODULES . 'host_server/host_server.inc.php';
     $host = new host_server();
     if ($this->service['host_username'] == '' || $this->service['host_password'] == '') {
         $this->login = $host->generate_login($this->service, $this->account, 4, 4, false);
     } else {
         $this->login['username'] = $this->service['host_username'];
         $this->login['password'] = $this->service['host_password'];
     }
     # get ip address
     if ($this->plugin_data['ipinfo_namebased'] == '1') {
         $this->ip = $host->useipaddress($this->service, $this->server);
     } else {
         $this->ip = false;
     }
     # ip based?
     if ($this->plugin_data['ipinfo_namebased'] == '1' && $this->ip != false) {
         $cmd = "AddVirtDomain " . "-p " . $this->plugin_data['plan'] . " -c siteinfo,domain=" . $this->service['domain_name'] . "." . $this->service['domain_tld'] . ",admin_user=\"" . $this->login['username'] . "\"" . ",tpasswd=" . $this->login['password'] . ",email=" . $this->account['email'] . " -c ipinfo,namebased=0,ipaddrs=\\[" . $this->ip . "\\]" . $this->nl;
     } else {
         $cmd = "AddVirtDomain " . "-p " . $this->plugin_data['plan'] . " -c siteinfo,domain=" . $this->service['domain_name'] . "." . $this->service['domain_tld'] . ",admin_user=\"" . $this->login['username'] . "\"" . ",tpasswd=" . $this->login['password'] . ",email=" . $this->account['email'];
     }
     return $cmd;
 }
예제 #5
0
 function p_new()
 {
     # get the common server class and set login details
     include_once PATH_MODULES . 'host_server/host_server.inc.php';
     $host = new host_server();
     if ($this->service['host_username'] == '' || $this->service['host_password'] == '') {
         $this->login = $host->generate_login($this->service, $this->account, 4, 4, false);
     } else {
         $this->login['username'] = $this->service['host_username'];
         $this->login['password'] = $this->service['host_password'];
     }
     $cmd = "./create-domain.pl " . " --template " . $this->plugin_data['template'] . " --domain " . $this->service['domain_name'] . "." . $this->service['domain_tld'] . " --user " . $this->login['username'] . " --pass " . $this->login['password'] . " --email " . $this->account['email'];
     ### Get the op tions
     foreach ($this->options as $s) {
         if (empty($this->plugin_data["{$s}"])) {
             $cmd .= " --{$s}";
         }
     }
     # get ip address
     if ($this->plugin_data['ipinfo_namebased'] == '1') {
         $this->ip = $host->useipaddress($this->service, $this->server);
     } else {
         $this->ip = $this->server['name_based_ip'];
     }
     # ip based?
     if ($this->plugin_data['ipinfo_namebased'] == '0' && $this->ip != false) {
         $cmd .= " --ip " . $this->ip;
     }
     return $cmd;
 }
예제 #6
0
 function p_new()
 {
     # get the common server class and set login details
     include_once PATH_MODULES . 'host_server/host_server.inc.php';
     $host = new host_server();
     if ($this->service['host_username'] == '' || $this->service['host_password'] == '') {
         $this->login = $host->generate_login($this->service, $this->account, 4, 4, false);
     } else {
         $this->login['username'] = $this->service['host_username'];
         $this->login['password'] = $this->service['host_password'];
     }
     # get ip address
     if ($this->plugin_data['ipinfo_namebased'] == '0') {
         $this->ip = $host->useipaddress($this->service, $this->server);
     } else {
         $this->ip = false;
     }
     # force on/off for specific vars
     $tf_array = array('mailscanner', 'develenv', 'aspmgr', 'scriptsmgr', 'logrotate', 'analog', 'files', 'vhbackup', 'bind', 'imap', 'tomcat4', 'openssl', 'ssi', 'weblogs', 'anonftp', 'majordomo', 'vacation', 'spam_filter', 'sqmail', 'mivamerchant', 'frontpage', 'webalizer', 'proftpd', 'sendmail', 'cgi', 'perl', 'subdomain', 'ssh', 'telnet', 'mysql');
     while (list($key, $val) = each($this->plugin_data)) {
         for ($i = 0; $i < count($tf_array); $i++) {
             if ($tf_array[$i] == $key) {
                 if ($val == 1) {
                     $this->plugin_data[$key] = 'on';
                 } else {
                     $this->plugin_data[$key] = 'off';
                 }
                 $i = 100;
             }
         }
     }
     # tomcat
     if ($this->plugin_data['tomcat4'] == 'on') {
         $this->plugin_data['apache_jail'] = 0;
     }
     # start the command
     $cmd = "AddVirtDomain " . " -c siteinfo" . ",domain=" . $this->service['domain_name'] . "." . $this->service['domain_tld'] . ",admin_user=\"" . $this->login['username'] . "\"" . ",passwd=" . $this->login['password'] . ",tpasswd=" . $this->login['password'] . ",email=" . $this->account['email'];
     # ip based?
     if ($this->plugin_data['ipinfo_namebased'] == '0' && $this->ip == false) {
         $cmd .= " -c ipinfo,namebased=0,ipaddrs=\\[" . $this->ip . "\\]";
         $cmd .= " -c openssl," . $this->plugin_data['openssl'];
         $cmd .= " -c ssh," . $this->plugin_data['ssh'];
         $cmd .= ",jail=" . $this->plugin_data['ssh_jail'];
     } else {
         $cmd .= " -c ipinfo,namebased=1";
     }
     $cmd .= " -c bandwidth" . ",threshold=" . $this->plugin_data['bandwidth_threshold'] . ",rollover=" . $this->plugin_data['bandwidth_rollover'] . " -c mailscanner," . $this->plugin_data['mailscanner'] . ",scan_incoming=" . $this->plugin_data['mailscanner_in'] . ",scan_outgoing=" . $this->plugin_data['mailscanner_out'] . " -c develenv," . $this->plugin_data['develenv'] . " -c aspmgr," . $this->plugin_data['aspmgr'] . " -c scriptsmgr," . $this->plugin_data['scriptsmgr'] . " -c logrotate," . $this->plugin_data['logrotate'] . " -c analog," . $this->plugin_data['analog'] . " -c files," . $this->plugin_data['files'] . " -c vhbackup," . $this->plugin_data['vhbackup'] . " -c bind," . $this->plugin_data['bind'] . " -c imap," . $this->plugin_data['imap'] . " -c tomcat4," . $this->plugin_data['tomcat4'] . " -c ssi," . $this->plugin_data['ssi'] . " -c weblogs," . $this->plugin_data['weblogs'] . " -c anonftp," . $this->plugin_data['anonftp'] . " -c majordomo," . $this->plugin_data['majordomo'] . " -c vacation," . $this->plugin_data['vacation'] . " -c spam_filter," . $this->plugin_data['spam_filter'] . " -c sqmail," . $this->plugin_data['sqmail'] . " -c mivamerchant," . $this->plugin_data['mivamerchant'] . " -c frontpage," . $this->plugin_data['frontpage'] . " -c webalizer," . $this->plugin_data['webalizer'] . " -c proftpd," . $this->plugin_data['proftpd'] . " -c sendmail," . $this->plugin_data['sendmail'] . " -c cgi," . $this->plugin_data['cgi'] . " -c mod_perl," . $this->plugin_data['perl'] . " -c subdomain," . $this->plugin_data['subdomain'] . ",max=" . $this->plugin_data['max_subdomain'] . " -c users,maxusers=" . $this->plugin_data['maxusers'] . " -c ssh," . $this->plugin_data['ssh'] . ",jail=" . $this->plugin_data['ssh_jail'] . " -c telnet," . $this->plugin_data['telnet'] . ",jail=" . $this->plugin_data['telnet_jail'] . " -c apache,on" . ",jail=" . $this->plugin_data['apache_jail'] . " -c diskquota,units=MB" . ",quota=" . $this->plugin_data['diskquota'] . " -c mysql," . $this->plugin_data['mysql'] . ",dbaseadmin=" . $this->login['username'] . ",dbasenum=" . $this->plugin_data['dbasenum'];
     $cmd .= $this->nl;
     return $cmd;
 }
예제 #7
0
 function p_new()
 {
     # get the common server class and set login details
     include_once PATH_MODULES . 'host_server/host_server.inc.php';
     $host = new host_server();
     if ($this->service['host_username'] == '' || $this->service['host_password'] == '') {
         $this->login = $host->generate_login($this->service, $this->account, 4, 4, false);
     } else {
         $this->login['username'] = $this->service['host_username'];
         $this->login['password'] = $this->service['host_password'];
     }
     # get ip address
     if ($this->plugin_data['hst_type'] == '0') {
         $this->ip = $host->useipaddress($this->service, $this->server);
     } else {
         $this->ip = $this->server['name_based_ip'];
         $this->plugin_data['fp_ssl'] = 'false';
         $this->plugin_data['ssl'] = 'false';
     }
     # force true/false for specific vars
     $tf_array = array('fp', 'fp_ssl', 'fpauth', 'ssi', 'php', 'cgi', 'perl', 'asp', 'python', 'coldfusion', 'ssl', 'webstat', 'err_docs', 'log_rotate', 'log_compress', 'mail_service', 'www', 'wuscripts', 'webmail');
     while (list($key, $val) = each($this->plugin_data)) {
         for ($i = 0; $i < count($tf_array); $i++) {
             if ($tf_array[$i] == $key) {
                 if ($val == 1) {
                     $this->plugin_data[$key] = 'true';
                 } else {
                     $this->plugin_data[$key] = 'false';
                 }
                 $i = 100;
             }
         }
     }
     #  Create the account
     $cmd = "client.exe" . " -c " . $this->account['username'] . " -name \"" . $this->account['first_name'] . " " . $this->account['last_name'] . "\"" . " -company \"" . $this->account['company'] . "\"" . " -passwd \"" . $this->login['password'] . "\"" . " -email \"" . $this->account['email'] . "\"" . " -state \"" . $this->account['state'] . "\"" . " -pcode \"" . $this->account['zip'] . "\"" . " -notify \"true\"" . $this->nl;
     # Set the account options
     $cmd .= "client_pref.exe -u " . $this->account['username'] . " -create_domains \"false\"" . " -manage_phosting \"true\"" . " -change_limits \"false\"" . " -manage_dns \"false\"" . " -manage_log \"true\"" . " -manage_crontab \"true\"" . " -manage_anonftp \"true\"" . " -manage_webapps \"true\"" . " -manage_maillists \"true\"" . " -manage_sh_access \"true\"" . " -manage_subdomains \"true\"" . " -manage_quota \"false\"" . " -max_dom \"-1\"" . " -disk_space \"-1\"" . " -max_traffic \"-1\"" . " -max_box \"-1\"" . " -max_redir \"-1\"" . " -max_mg \"-1\"" . " -max_resp \"-1\"" . " -max_wu \"-1\"" . " -max_db \"-1\"" . " -max_maillists \"-1\"" . " -max_webapps \"-1\"" . " -max_subdom \"-1\"" . " -ip_pool \"add:" . $this->ip . "\"" . $this->nl;
     # create the domain
     $cmd .= "domain.exe -c " . $this->service['domain_name'] . "." . $this->service['domain_tld'] . " -clogin \"" . $this->account['username'] . "\"" . " -du_passwd \"" . $this->login['password'] . "\"" . " -login \"" . $this->login['username'] . "\"" . " -passwd \"" . $this->login['password'] . "\"" . " -passwd_type \"plain\"" . " -notify \"false\"" . " -status \"true\"" . " -dom_user \"true\"" . " -dns \"true\"" . " -www \"true\"" . " -hosting \"true\"" . " -hst_type \"phys\"" . " -ip \"" . $this->ip . "\"" . " -shell \"" . $this->plugin_data['shell'] . "\"" . " -hard_quota \"" . $this->plugin_data['hard_quota'] . "\"" . " -fp \"" . $this->plugin_data['fp'] . "\"" . " -fp_ssl \"" . $this->plugin_data['fp_ssl'] . "\"" . " -fpauth \"" . $this->plugin_data['fpauth'] . "\"" . " -ssi \"" . $this->plugin_data['ssi'] . "\"" . " -php \"" . $this->plugin_data['php'] . "\"" . " -cgi \"" . $this->plugin_data['cgi'] . "\"" . " -perl \"" . $this->plugin_data['perl'] . "\"" . " -asp \"" . $this->plugin_data['asp'] . "\"" . " -python \"" . $this->plugin_data['python'] . "\"" . " -coldfusion \"" . $this->plugin_data['coldfusion'] . "\"" . " -ssl \"" . $this->plugin_data['ssl'] . "\"" . " -webstat \"" . $this->plugin_data['webstat'] . "\"" . " -err_docs \"" . $this->plugin_data['err_docs'] . "\"" . " -log_rotate \"" . $this->plugin_data['log_rotate'] . "\"" . " -log_bysize \"" . $this->plugin_data['log_bysize'] . "\"" . " -log_bytime \"" . $this->plugin_data['log_bytime'] . "\"" . " -log_max_num \"" . $this->plugin_data['log_max_num'] . "\"" . " -log_compress \"" . $this->plugin_data['log_compress'] . "\"" . " -mail_service \"" . $this->plugin_data['mail_service'] . "\"" . $this->nl;
     # set the domain prefs
     $cmd .= "domain_pref.exe -c " . $this->service['domain_name'] . "." . $this->service['domain_tld'] . " -www \"true\"" . " -disk_space \"" . $this->plugin_data['disk_space'] . "\"" . " -max_traffic \"" . $this->plugin_data['max_traffic'] . "\"" . " -max_box \"" . $this->plugin_data['max_box'] . "\"" . " -mbox_quota \"" . $this->plugin_data['mbox_quota'] . "\"" . " -max_redir \"" . $this->plugin_data['max_redir'] . "\"" . " -max_mg \"" . $this->plugin_data['max_mg'] . "\"" . " -max_resp \"" . $this->plugin_data['max_resp'] . "\"" . " -max_wu \"" . $this->plugin_data['max_wu'] . "\"" . " -max_db \"" . $this->plugin_data['max_db'] . "\"" . " -max_maillists \"" . $this->plugin_data['max_maillists'] . "\"" . " -max_webapps \"" . $this->plugin_data['max_webapps'] . "\"" . " -max_subdom \"" . $this->plugin_data['max_subdom'] . "\"" . " -wuscripts \"" . $this->plugin_data['wuscripts'] . "\"" . " -webmail \"" . $this->plugin_data['webmail'] . "\"" . " -keep_traf_stat \"" . $this->plugin_data['keep_traf_stat'] . "\"";
     return $cmd;
 }
예제 #8
0
 function p_new()
 {
     # get the common server class and set login details
     include_once PATH_MODULES . 'host_server/host_server.inc.php';
     $host = new host_server();
     if ($this->service['host_username'] == '' && $this->service['host_password'] == '') {
         $this->login = $host->generate_login($this->service, $this->account, 4, 4, false);
     } else {
         $this->login['username'] = $this->service['host_username'];
         $this->login['password'] = $this->service['host_password'];
     }
     # get ip address
     if ($this->plugin_data['hst_type'] == '0') {
         $this->ip = $host->useipaddress($this->service, $this->server);
     } else {
         $this->ip = $this->server['name_based_ip'];
         $this->plugin_data['enssl'] = 0;
     }
     #include the easyAdmin class (sorry, that file is encoded)
     include_once PATH_CORE . 'easyadmin.inc.php';
     $e = new EASYADMIN();
     $e->cookiepath = PATH_FILES . 'easyCookie.txt';
     $e->debug = $this->server['debug'];
     $e->host = $this->server_cfg['host'];
     $e->user = $this->server_cfg['user'];
     $e->pass = $this->server_cfg['pass'];
     $e->reseller = $this->server_cfg['reseller'];
     $e->domain = $this->service['domain_name'] . '.' . $this->service['domain_tld'];
     $e->username = $this->login['username'];
     $e->passwd = $this->login['password'];
     $e->email = $this->account['email'];
     $e->ip = $this->ip;
     $e->prod = array('users' => $this->plugin_data['users'], 'quota' => $this->plugin_data['quota'], 'enfp' => $this->plugin_data['enfp'], 'enphp' => $this->plugin_data['enphp'], 'enshell' => $this->plugin_data['enshell'], 'enssi' => $this->plugin_data['enssi'], 'encgi' => $this->plugin_data['encgi'], 'ensuexec' => $this->plugin_data['ensuexec'], 'enthrottle' => $this->plugin_data['enthrottle'], 'enraw' => $this->plugin_data['enraw'], 'enmiva' => $this->plugin_data['enmiva'], 'enssl' => $this->plugin_data['enssl'], 'enfilter' => $this->plugin_data['enfilter'], 'limit' => $this->plugin_data['limit'], 'bwunit' => $this->plugin_data['bwunit'], 'duration' => $this->plugin_data['duration'], 'durationunit' => $this->plugin_data['durationunit']);
     # add
     $result = $e->add();
     # send the user the details
     include_once PATH_MODULES . 'email_template/email_template.inc.php';
     $email = new email_template();
     $email->send('host_new_user', $this->account['id'], $this->service_id, '', '');
     return $result;
 }
예제 #9
0
 function p_new()
 {
     # get the common server class and set login details
     include_once PATH_MODULES . 'host_server/host_server.inc.php';
     $host = new host_server();
     if ($this->service['host_username'] == '' && $this->service['host_password'] == '') {
         $this->login = $host->generate_login($this->service, $this->account, 4, 4, false);
     } else {
         $this->login['username'] = $this->service['host_username'];
         $this->login['password'] = $this->service['host_password'];
     }
     # get ip address
     if ($this->plugin_data['network_interface'] == '1') {
         $this->ip = $host->useipaddress($this->service, $this->server);
     } else {
         $this->ip = $this->server['name_based_ip'];
     }
     #include the webmin class (sorry, that file is encoded)
     include_once PATH_CORE . 'webmin.inc.php';
     $e = new WEBMIN();
     $e->debug = $this->server['debug'];
     $e->host = $this->server_cfg['host'];
     $e->user = $this->server_cfg['user'];
     $e->pass = $this->server_cfg['pass'];
     $e->port = $this->server_cfg['port'];
     $e->ssl = $this->server_cfg['ssl'];
     $e->domain = $this->service['domain_name'] . '.' . $this->service['domain_tld'];
     $e->username = $this->login['username'];
     $e->password = $this->login['password'];
     $e->email = $this->account['email'];
     $e->ip = $this->ip;
     $e->prod = $this->plugin_data;
     # add
     $result = $e->add();
     # send the user the details
     include_once PATH_MODULES . 'email_template/email_template.inc.php';
     $email = new email_template();
     $email->send('host_new_user', $this->account['id'], $this->service_id, '', '');
     return $result;
 }
예제 #10
0
 function p_new()
 {
     # get the common server class and set login details
     include_once PATH_MODULES . 'host_server/host_server.inc.php';
     $host = new host_server();
     if ($this->service['host_username'] == '' || $this->service['host_password'] == '') {
         $this->login = $host->generate_login($this->service, $this->account, 4, 4, false);
     } else {
         $this->login['username'] = $this->service['host_username'];
         $this->login['password'] = $this->service['host_password'];
     }
     # Add the site
     $cmd = "./addvsite -n www " . " -d " . strtolower($this->service['domain_name'] . "." . $this->service['domain_tld']);
     # get ip address
     if ($this->plugin_data['ipinfo_namebased'] == '1') {
         $this->ip = $host->useipaddress($this->service, $this->server);
         $cmd .= " --i " . $this->ip;
         if (!empty($this->options['enable-ssl'])) {
             $cmd .= " --enable-ssl";
         }
     } else {
         $this->ip = $this->server['name_based_ip'];
         $cmd .= " --i " . $this->ip;
     }
     ### Get site options
     foreach ($this->options as $s => $v) {
         if (empty($this->plugin_data["{$s}"])) {
             if ($v != 0 && $v != 1) {
                 $cmd .= " --{$s} {$v}";
             } else {
                 $cmd .= " --{$s}";
             }
         }
     }
     ### Add the user
     $cmd .= $this->nl;
     $cmd .= "./adduser -n www." . strtolower($this->service['domain_name'] . "." . $this->service['domain_tld']) . " -f \"" . $this->account['first_name'] . " " . $this->account['last_name'] . "\"" . " -u " . $this->login['username'] . " -p \"" . $this->login['password'] . "\"" . " -q " . $this->options['quota'] . " -e " . strtolower($this->account['first_name']) . ',' . strtolower($this->account['first_name'] . '.' . $this->account['last_name']);
     return $cmd;
 }
예제 #11
0
 function p_new()
 {
     # get the common server class and set login details
     include_once PATH_MODULES . 'host_server/host_server.inc.php';
     $host = new host_server();
     if ($this->service['host_username'] == '' || $this->service['host_password'] == '') {
         $this->login = $host->generate_login($this->service, $this->account, 4, 4, false);
     } else {
         $this->login['username'] = $this->service['host_username'];
         $this->login['password'] = $this->service['host_password'];
     }
     # get ip address
     if ($this->plugin_data['ipinfo_namebased'] == '0') {
         $this->ip = $host->useipaddress($this->service, $this->server);
     } else {
         $this->ip = false;
     }
     # start the command
     $cmd = 'adddomain -s "<xml>';
     # ip based?
     if ($this->plugin_data['ipinfo_namebased'] == '0' && $this->ip != false) {
         $cmd .= '<type>IPBased<type></ip>' . $this->ip . '</ip>';
         $ssl = '1';
     } else {
         $cmd .= '<type>NameBased</type>';
         $ssl = '0';
     }
     # defaults
     while (list($key, $val) = each($this->plugin_data)) {
         if (empty($this->plugin_data[$key])) {
             $this->plugin_data[$key] = '0';
         }
     }
     # construct the remaining XML:
     $cmd .= '<domain>' . $this->service['domain_name'] . '.' . $this->service['domain_tld'] . '</domain>' . '<user>' . $this->login['username'] . '</user>' . '<password>' . $this->login['password'] . '</password>' . '<email>' . $this->account['email'] . '</email>' . '<sendEmail>0</sendEmail><from>na@na.com</from><emailContent>hello</emailContent><subject>hello</subject>' . '<reseller></reseller>' . '<setDns>1</setDns>' . '<dataDrive>' . $this->plugin_data['dataDrive'] . '</dataDrive>' . '<style_name>' . $this->plugin_data['style_name'] . '</style_name>' . '<diskquota>' . $this->plugin_data['diskquota'] . '</diskquota>' . '<maxusers>' . $this->plugin_data['maxusers'] . '</maxusers>' . '<services>' . '<urchin>' . $this->plugin_data['urchin'] . '</urchin>' . '<winfiles>' . $this->plugin_data['winfiles'] . '</winfiles>' . '<winanalog>' . $this->plugin_data['winanalog'] . '</winanalog>' . '<odbc>' . $this->plugin_data['odbc'] . '</odbc>' . '<coldfusion>' . $this->plugin_data['coldfusion'] . '</coldfusion>' . '<frontpage>' . $this->plugin_data['frontpage'] . '</frontpage>' . '<perl>' . $this->plugin_data['perl'] . '</perl>' . '<php>' . $this->plugin_data['php'] . '</php>' . '<mysql>' . $this->plugin_data['mysql'] . '</mysql>' . '<urchin>' . $this->plugin_data['urchin'] . '</urchin>' . '<mssqlodbc>' . $this->plugin_data['odbc'] . '</mssqlodbc>' . '<msftpsvc>' . '<accessread>1</accessread>' . '<accesswrite>1</accesswrite>' . '<connectiontimeout>900</connectiontimeout>' . '<msdosdiroutput>1</msdosdiroutput>' . '<exitmessage>Goodbye</exitmessage>' . '<greetingmessage>Hello</greetingmessage>' . '<maxclientsmessage>TO_MANY_USERS</maxclientsmessage>' . '<allowanonymous>' . $this->plugin_data['allowanonymous'] . '</allowanonymous>' . '<logtype>' . $this->plugin_data['logtype'] . '</logtype>' . '<maxconnections>' . $this->plugin_data['ftp_maxconnections'] . '</maxconnections>' . '<maxconnectionsunlimited>' . $this->plugin_data['ftp_maxconnectionsunlimited'] . '</maxconnectionsunlimited>' . '<msftpsvc>' . $this->plugin_data['msftpsvc'] . '</msftpsvc>' . '</msftpsvc>' . '<w3svc>' . '<ssi>' . $this->plugin_data['ssi'] . '</ssi>' . '<sslc>' . $ssl . '</sslc>' . '<maxconnectionsunlimited>' . $this->plugin_data['w3svc_maxconnectionsunlimited'] . '</maxconnectionsunlimited>' . '<maxconnections>' . $this->plugin_data['w3svc_maxconnections'] . '</maxconnections>' . '<aspnet>0</aspnet>' . '<allowkeepalive>1</allowkeepalive>' . '<appisolated>2</appisolated>' . '<enablereversedns>1</enablereversedns>' . '<accessread>1</accessread>' . '<accesswrite>0</accesswrite>' . '<accesssslflags>0</accesssslflags>' . '<execflag>1</execflag>' . '<enabledirbrowsing>1</enabledirbrowsing>' . '<enabledefaultdoc>1</enabledefaultdoc>' . '<defaultdoc>Default.html</defaultdoc>' . '<connectiontimeout>900</connectiontimeout>' . '<logtype>' . $this->plugin_data['logtype'] . '</logtype>' . '<enablebandwidthquota>' . $this->plugin_data['enablebandwidthquota'] . '</enablebandwidthquota>' . '<maxbandwidth>' . $this->plugin_data['maxbandwidth'] . '</maxbandwidth>' . '<enablecpuquota>' . $this->plugin_data['enablecpuquota'] . '</enablecpuquota>' . '<cpuquota>' . $this->plugin_data['cpuquota'] . '</cpuquota>' . '<serversize>' . $this->plugin_data['serversize'] . '</serversize>' . '<enabledocfooter>0</enabledocfooter>' . '<defaultdocfooter>footer</defaultdocfooter>' . '<footertype>0</footertype>' . '<footerstring></footerstring>' . '<footerfile></footerfile>' . '<w3svc>' . $this->plugin_data['w3svc'] . '</w3svc>' . '</w3svc>' . '<winmail>' . '<autoresponder>' . $this->plugin_data['autoresponder'] . '</autoresponder>' . '<userforwards>' . $this->plugin_data['userforwards'] . '</userforwards>' . '<winmail>' . $this->plugin_data['winmail'] . '</winmail>' . '</winmail>' . '</services>' . '</xml>"';
     return $cmd;
 }