Ejemplo n.º 1
0
 static function continueFormFinish($parent, $class, $param, $continueaction)
 {
     //$vlist['__m_message_pre'] = 'make_sure_ipaddress_template';
     $iplist = $parent->getIpaddress(array($param['listpriv_s_webpserver_sing']));
     if (!$iplist) {
         throw new lxexception('no_ip_address_matching_the_webserver', 'parent');
     }
     $vlist['ipaddress'] = array('s', $iplist);
     $res = DomainBase::getDnsTemplateList($parent);
     //$vlist['dbtype_list'] = null;
     $vlist['dnstemplate'] = array('s', $res);
     $ret['variable'] = $vlist;
     $ret['action'] = 'add';
     $ret['param'] = $param;
     return $ret;
 }
Ejemplo n.º 2
0
 function __get($var)
 {
     global $gbl, $sgbl, $login, $ghtml;
     if (!isset($this->__parent_o)) {
         return null;
     }
     $parent = $this->__parent_o;
     if (!$parent || !$parent->isAdmin()) {
         return null;
     }
     if (cse($var, 'pserver_list')) {
         $slist = $parent->getRealPserverList(strtil($var, "pserver_list"));
         $this->{$var} = get_namelist_from_objectlist($slist);
         return $this->{$var};
     }
     if (cse($var, 'dnstemplate_list')) {
         $this->{$var} = DomainBase::getDnsTemplateList($parent);
         return $this->{$var};
     }
     if (cse($var, 'dbtype_list')) {
         return $sgbl->__var_dblist;
     }
     return null;
 }
Ejemplo n.º 3
0
 static function addform($parent, $class, $typetd = null)
 {
     /*
     	if ($parent->isNotCustomer()) {
     		$vlist['__m_message_pre'] = "domain_not_customer";
     		$ret['variable'] = $vlist;
     		$ret['action'] = '';
     		return $ret;
     	}
     */
     $res = DomainBase::getDnsTemplateList($parent);
     $vlist['nname'] = "";
     $dir = "__path_customer_root/{$parent->getPathFromName()}";
     $dir = expand_real_root($dir);
     if ($parent->priv->isOn('document_root_flag')) {
         $vlist['docroot'] = array('m', array('pretext' => "{$dir}/"));
     }
     //$templatelist = $parent->getResourcePlanList('resourceplan');
     //$vlist['password'] = null;
     $vlist['__v_button'] = 'add';
     $vlist['dnstemplate_f'] = make_hidden_if_one($res);
     //$vlist['resourceplan_f'] = array('A', $templatelist);
     //$vlist['__c_subtitle_quota'] = 'Features';
     $qvlist = getQuotaListForClass('domain', array('ttype' => 'virtual', 'webpserver' => $parent->websyncserver));
     $vlist = lx_array_merge(array($vlist, $qvlist));
     $ret['variable'] = $vlist;
     $ret['action'] = "add";
     return $ret;
 }
Ejemplo n.º 4
0
 function updateform($subaction, $param)
 {
     switch ($subaction) {
         // For template Only... For domain, the ip address is kept in web.
         case "preview_config":
             $vlist['previewdomain'] = null;
             return $vlist;
         case "fix_openbasedir":
             $vlist['remove_openbasedir'] = null;
             return $vlist;
         case "catchall":
             $name[] = "--bounce--";
             $name[] = "postmaster";
             $name[] = "Delete";
             $vlist['catchall'] = array('s', $name);
             return $vlist;
         case "redirect_domain":
             $vlist['redirect_domain'] = array('M', $this->getObject('web')->redirect_domain);
             //$vlist['web_s_syncserver'] = array('M', $this->getObject('web')->syncserver);
             //$vlist['mmail_s_syncserver'] = array('M', $this->getObject('mmail')->syncserver);
             //$vlist['dns_s_syncserver'] = array('M', $this->getObject('dns')->syncserver);
             $mmail = $this->getObject('mmail');
             if ($mmail->ttype !== 'forward') {
                 $this->syncserver = $this->getParentO()->getFromList('domain', $this->getObject('web')->redirect_domain)->getObject('mmail')->syncserver;
                 $mmail->ttype = 'forward';
                 $mmail->redirect_domain = $this->getObject('web')->redirect_domain;
             }
             $vlist['__v_button'] = array();
             return $vlist;
         case "ipaddress":
             if (!$this->isRightParent()) {
                 $vlist['ipaddress'] = array('M', $this->ipaddress_sing);
                 return $vlist;
             }
             $iplist = $this->getParentO()->getIpaddress(array('localhost'));
             if (!$iplist) {
                 $iplist = getAllIpaddress();
             }
             $vlist['ipaddress'] = array('s', $iplist);
             return $vlist;
             //ONly for Template...
         //ONly for Template...
         case "description":
             $vlist['description'] = null;
             //$vlist['share_status'] = null;
             if (!$this->isRightParent()) {
                 $this->convertToUnmodifiable($vlist);
             }
             return $vlist;
         case "dnstemplate":
             $res = DomainBase::getDnsTemplateList($this->getParentO());
             $vlist['dnstemplate'] = array('s', $res);
             return $vlist;
         case "information":
             $web = $this->getObject('web');
             $mmail = $this->getObject('mmail');
             $dns = $this->getObject('dns');
             $vlist['nname'] = array('M', $this->nname);
             $vlist['uuser_dummy'] = array('M', $web->ftpusername);
             $vlist['ddate'] = array('M', @date('d-m-Y', $this->ddate));
             $vlist['parent_name_f'] = array('M', $this->getParentName());
             $webserv = " (ftp.{$this->nname})";
             $mailserv = " (mail.{$this->nname})";
             $vlist['web_s_syncserver'] = array('M', $webserv);
             if ($web->iisid) {
                 $vlist['web_s_iisid'] = array('M', $web->iisid);
             }
             $vlist['mmail_s_syncserver'] = array('M', $mailserv);
             //$vlist['dns_s_syncserver'] = array('M', $dns->syncserver);
             //$vlist['dbtype_list'] = array('M', $this->listpriv->dbtype_list);
             //$vlist['contactemail'] = "";
             if (!$this->isLogin()) {
                 $vlist['text_comment'] = null;
             }
             return $vlist;
             // Only for template...
         // Only for template...
         case "pserver_s":
             $parent = $this->getParentO();
             $vlist['webpserver_sing'] = null;
             $vlist['mmailpserver_sing'] = null;
             $vlist['dnspserver_sing'] = null;
             $vlist['secdnspserver_sing'] = array('Q', add_disabled($parent->listpriv->secdnspserver_list));
             if (!$this->isRightParent()) {
                 $this->convertToUnmodifiable($vlist);
             }
             return $vlist;
     }
     return parent::updateform($subaction, $param);
 }