Exemplo n.º 1
0
 static function addform($parent, $class, $typetd = null)
 {
     $res = Dnsbase::getIpaddressList($parent);
     if (!$res) {
         lxshell_return("__path_php_path", "../bin/fixIpAddress.php");
     }
     $res = Dnsbase::getIpaddressList($parent);
     if (!$res) {
         throw new lxexception('no_ip_address', 'parent');
     }
     $vlist['nname'] = null;
     $vlist['webipaddress'] = array('s', $res);
     $vlist['mmailipaddress'] = array('s', $res);
     $vlist['nameserver_f'] = null;
     $vlist['secnameserver_f'] = null;
     $ret['action'] = 'add';
     $ret['variable'] = $vlist;
     return $ret;
 }
Exemplo n.º 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);
 }