Exemple #1
0
 static function getDomainServerVlist($parent, $obj, &$vlist)
 {
     global $gbl, $sgbl, $login, $ghtml;
     $vlist['server_detail_f'] = null;
     $wlist = $parent->getServerList('web');
     $mlist = $parent->getServerList('mmail');
     $mylist = $parent->getServerList('mysqldb');
     $dnslist = $parent->getServerList('dns');
     if ($obj) {
         // This means we are switching as opposed to creating a new client.
         $obj->newdnstemplate = '--leave--';
         $dtlist = domainbase::getDnsTemplateList($login);
         $dtlist = lx_merge_good("--leave--", $dtlist);
         $vlist['newdnstemplate'] = array('s', $dtlist);
     }
     $vlist['websyncserver'] = array('s', $wlist);
     $vlist['mmailsyncserver'] = array('s', $mlist);
     $vlist['mysqldbsyncserver'] = array('s', $mylist);
     $vlist['dnssyncserver_list'] = array('U', $dnslist);
     $list = lx_merge_good($wlist, $mlist, $mylist, $dnslist);
     $sinfo = pservercore::createServerInfo($list);
     $sinfo = get_warning_for_server_info($parent, $sinfo);
     $vlist['server_detail_f'] = array('M', $sinfo);
 }
Exemple #2
0
 function updateform($subaction, $param)
 {
     global $gbl, $sgbl, $login, $ghtml;
     switch ($subaction) {
         // ONly fro dnstemplate
         case "ipaddress":
             $res = Dnsbase::getIpaddressList($this);
             $vlist['ipaddress'] = array('s', $res);
             return $vlist;
         case "parameter":
             foreach ($this->dns_record_a as $d) {
                 if ($d->ttype === 'ns') {
                     $nslist[] = $d->param;
                 }
             }
             $vlist['ttl'] = null;
             $vlist['soanameserver'] = array('s', $nslist);
             return $vlist;
         case "switchdnsserver":
             $vlist['syncserver'] = array('s', $login->getServerList('syncserver'));
             return $vlist;
         case "rebuild":
             $vlist['newdnstemplate_f'] = array('s', domainbase::getDnsTemplateList($login));
             $vlist['__v_updateall_button'] = array();
             return $vlist;
     }
     return parent::updateform($subaction, $param);
 }
Exemple #3
0
 static function addform($parent, $class, $typetd = null)
 {
     global $gbl, $sgbl, $login, $ghtml;
     $progname = $sgbl->__var_program_name;
     $vlist['nname'] = "";
     if ($sgbl->isKloxo()) {
         $dlist = domainbase::getDnsTemplateList($parent);
         if ($typetd['val'] === 'customer') {
             $vlist['domain_name'] = "";
             $vlist['dnstemplate_name'] = make_hidden_if_one($dlist);
             $list = array('wordpress', 'mambo', 'joomla', 'dolphin');
             $list = lx_merge_good('--leave--', $list);
             $vlist['installapp_app'] = array('s', $list);
         }
     }
     $vlist['password'] = "";
     $nclist = $parent->getResourcePlanList('resourceplan');
     $vlist['__c_subtitle_plan'] = "Welcome Message";
     $vlist['contactemail'] = "";
     $vlist['send_welcome_f'] = "";
     $vlist['__v_button'] = $login->getKeywordUc('add');
     $vlist['__c_subtitle_temp'] = "Choose Plan";
     $vlist['resourceplan_f'] = array('A', $nclist);
     if ($sgbl->isKloxo()) {
         if ($typetd['val'] === 'customer') {
             if (check_if_many_server()) {
                 $vlist['__c_subtitle_server'] = "Servers";
                 self::getDomainServerVlist($parent, null, $vlist);
             }
         }
     }
     $ret['variable'] = $vlist;
     $ret['action'] = "continue";
     $ret['continueaction'] = "server";
     return $ret;
 }