예제 #1
0
 function updateform($subaction, $param)
 {
     if ($subaction === 'edit') {
         $vlist['directory'] = null;
         return $vlist;
     }
     return parent::updateform($subaction, $param);
 }
예제 #2
0
 function updateform($subaction, $param)
 {
     if ($subaction === 'privilege') {
         $vlist['delete_flag'] = null;
         $vlist['pserver_flag'] = null;
         return $vlist;
     }
     return parent::updateform($subaction, $param);
 }
예제 #3
0
 function updateform($subaction, $param)
 {
     global $gbl, $sgbl, $login, $ghtml;
     switch ($subaction) {
         case "shell_access":
             $driverapp = $gbl->getSyncClass($this->__masterserver, $this->syncserver, 'uuser');
             $res = rl_exec_get($this->__masterserver, $this->syncserver, array("uuser__{$driverapp}", "getShellList"), null);
             $vlist['nname'] = array('M', null);
             $vlist['shell'] = array('s', $res);
             return $vlist;
     }
     return parent::updateform($subaction, $param);
 }
예제 #4
0
 function updateform($subaction, $param)
 {
     switch ($subaction) {
         case "ddatabasepserver":
             if ($this->isLogin()) {
                 $vlist['mysqldbpserver_list'] = array('M', $this->listpriv->mysqldbpserver_list);
                 $vlist['mssqldbpserver_list'] = array('M', $this->listpriv->mssqldbpserver_list);
                 //$vlist['dbtype_list'] = array('M', $this->listpriv->dbtype_list);
                 $vlist['__v_button'] = array();
                 return $vlist;
             }
             $parent = $this->getParentO();
             $vlist['mysqldbpserver_list'] = array('Q', $parent->listpriv->mysqldbpserver_list);
             $vlist['mssqldbpserver_list'] = array('Q', $parent->listpriv->mssqldbpserver_list);
             //$vlist['dbtype_list'] = array('Q', $parent->listpriv->dbtype_list);
             if (!$this->isRightParent()) {
                 $this->convertToUnmodifiable($vlist);
             }
             return $vlist;
     }
     return parent::updateform($subaction, $param);
 }
예제 #5
0
 function updateform($subaction, $param)
 {
     global $gbl, $sgbl, $login, $ghtml;
     switch ($subaction) {
         case "centralbackupconfig":
             $list = $login->getList('centralbackupserver');
             $list = get_namelist_from_objectlist($list);
             $vlist['centralbackupserver'] = array('s', add_disabled($list));
             $vlist['internalnetworkip'] = null;
             $vlist['tmpdir'] = null;
             //$vlist['__v_updateall_button'] = array();
             return $vlist;
         case "commandcenter":
             return $this->commandCenter($param);
             break;
         case "timezone":
             $vlist['timezone'] = array('s', pserver::getTimeZoneList());
             return $vlist;
         case "ssl_key":
             $this->createPublicPrivate();
             $this->setUpdateSubaction();
             $vlist['text_public_key'] = array('t', null);
             return $vlist;
         case "switchprogram":
             $this->web_driver = $gbl->getSyncClass($this->__masterserver, $this->nname, 'web');
             $this->dns_driver = $gbl->getSyncClass($this->__masterserver, $this->nname, 'dns');
             $this->spam_driver = $gbl->getSyncClass($this->__masterserver, $this->nname, 'spam');
             $vlist['web_driver'] = array('s', array('apache', 'lighttpd'));
             $vlist['dns_driver'] = array('s', array('bind', 'djbdns'));
             $vlist['spam_driver'] = array('s', array('spamassassin', 'bogofilter'));
             return $vlist;
         case "mysqlpasswordreset":
             $vlist['newpassword_f'] = null;
             return $vlist;
         case "importvps":
             $vlist['importvps'] = array('M', 'Import Vpses on this server?');
             $vlist['__v_button'] = "Import";
             return $vlist;
         case "importhypervmvps":
             $vlist['importvps'] = array('M', 'Import HyperVM Vpses on this server?');
             $vlist['__v_button'] = "Import";
             return $vlist;
         case "savevpsdata":
             $vlist['__v_button'] = "Save";
             return $vlist;
         case "information":
             $sq = new Sqlite(null, 'client');
             $res = $sq->getRowsWhere("cttype = 'wholesale'", null, array('nname'));
             $clientlist = get_namelist_from_arraylist($res);
             $vlist['description'] = null;
             $vlist['realhostname'] = null;
             if ($sgbl->isHyperVm()) {
                 $list = get_namelist_from_objectlist($login->getList('datacenter'));
                 if (!$list) {
                     $list[] = '--no-dc--';
                     $this->datacenter = '--no-dc--';
                 }
                 $vlist['datacenter'] = array('s', $list);
                 $newclientlist = lx_array_merge(array(array('--unassigned--'), $clientlist));
                 if ($this->nname === 'localhost') {
                     $vlist['clientname'] = array('M', $login->getKeyword('master_cannot_be_assigned'));
                 } else {
                     $vlist['clientname'] = array('s', $newclientlist);
                 }
             }
             if ($sgbl->isHyperVm()) {
                 $vlist['max_vps_num'] = null;
             }
             $this->setDefaultValue("load_threshold", "20");
             $vlist['load_threshold'] = null;
             return $vlist;
         case "backupconfig":
             return $vlist;
         case "phpsmtp":
             $vlist['pserverconf_b_s_usesmtp'] = null;
             $vlist['pserverconf_b_s_smtpserver'] = null;
             $vlist['pserverconf_b_s_smtpport'] = null;
             $vlist['pserverconf_b_s_smtpuseauth'] = null;
             $vlist['pserverconf_b_s_smtpuser'] = null;
             $vlist['pserverconf_b_s_smtppass'] = null;
             return $vlist;
         case "cron_mailto":
             $vlist['cron_mailto'] = null;
             return $vlist;
         case "vpslist":
             $vlist['used_vpslist_f'] = array('M', $this->getUsed());
             $vlist['__v_button'] = array();
             return $vlist;
         case "showused":
             $res = $this->createUsedDomainList();
             foreach ($res as $k => $v) {
                 $var = "used_domainlist_{$k}_f";
                 $vlist[$var] = array('M', $this->{$var});
             }
             $vlist['__v_button'] = array();
             return $vlist;
         case "update":
             $vlist['nname'] = array('M', null);
             $vlist['password'] = null;
             return $vlist;
         case "poweroff":
             // --- issue 612 - Hide password in reboot / shutdown server
             //	$vlist['retype_admin_p_f'] = null;
             $vlist['__v_button'] = 'Poweroff';
             return $vlist;
         case "reboot":
             // --- issue 612 - Hide password in reboot / shutdown server
             //	$vlist['retype_admin_p_f'] = null;
             $vlist['__v_button'] = 'Reboot';
             return $vlist;
         case "dbpassword":
             $vlist['dbadmin'] = null;
             $vlist['dbpassword'] = null;
             return $vlist;
     }
     return parent::updateform($subaction, $param);
 }
예제 #6
0
 static function add($parent, $class, $param)
 {
     if ($parent->isClient()) {
         $param['nname'] = "{$param['nname']}@{$param['real_clparent_f']}";
         $param['syncserver'] = $parent->mmailsyncserver;
     } else {
         $param['nname'] = "{$param['nname']}@{$parent->nname}";
         $param['syncserver'] = $parent->syncserver;
     }
     if (!validate_email($param['nname'])) {
         throw new lxException("invalid_email_id", 'nname');
     }
     // Not needed. The child will automatically inherit the syncserver.
     //$param['syncserver'] = $parent->syncserver;
     $param['nname'] = trim($param['nname']);
     //$param['parent_clname'] = "mmail-{$param['real_clparent_f']}";
     if (exists_in_db(null, "mailforward", $param['nname'])) {
         throw new lxException("forward_with_same_id_exists", 'nname', $param['nname']);
     }
     $param = parent::add($parent, $class, $param);
     return $param;
 }
예제 #7
0
 function display($var)
 {
     if ($var === 'made_by') {
         return $this->getParentName('made_by');
     }
     if ($var === 'sent_to') {
         return $this->getParentName('sent_to');
     }
     return parent::display($var);
 }
예제 #8
0
파일: domainlib.php 프로젝트: zseand/kloxo
 static function continueFormFinish($parent, $class, $param, $continueaction)
 {
     //$vlist['__m_message_pre'] = 'make_sure_ipaddress_template';
     global $gbl, $sgbl, $login, $ghtml;
     // For IE.. too many variables won't work in get mode.
     $sgbl->method = "post";
     $param['nname'] = trim(strtolower($param['nname']));
     $dname = $param['nname'];
     $dname = str_replace(".", "", $dname);
     if (is_numeric($dname[0])) {
         $dname = "a" . $dname;
     }
     $iplist = $parent->getIpaddress(array('localhost'));
     if (!$iplist) {
         $iplist = getAllIpaddress();
     }
     /// Normal Virtual Hosting.
     Lxclient::fixpserver_list($param);
     $vlist['__c_subtitle_quota'] = 'Quota';
     $qvlist = getQuotaListForClass('domain', array('ttype' => 'virtual'));
     $vlist = lx_array_merge(array($vlist, $qvlist));
     //$vlist['dbtype_list'] = null;
     $ret['param'] = $param;
     $ret['variable'] = $vlist;
     $ret['action'] = "Add";
     return $ret;
 }
예제 #9
0
 static function continueFormFinish($parent, $class, $param, $continueaction)
 {
     //$vlist['__m_message_pre'] = 'make_sure_ipaddress_template';
     global $gbl, $sgbl, $login, $ghtml;
     // For IE.. too many variables won't work in get mode.
     $sgbl->method = "post";
     $driverapp = $gbl->getSyncClass('localhost', $param['listpriv_s_vpspserver_sing'], 'vps');
     $ostlist = rl_exec_get(null, $param['listpriv_s_vpspserver_sing'], array("vps__{$driverapp}", "getOsTemplatelist"));
     $vlist['ostemplate'] = array('A', $ostlist);
     Lxclient::fixpserver_list($param);
     //dprintr($param);
     if (!isOn($param['use_resourceplan_f'])) {
         $vlist['__c_subtitle_quota'] = 'Quota';
         $qvlist = getQuotaListForClass('vps');
         $vlist = lx_merge_good($vlist, $qvlist);
     }
     //$vlist['dbtype_list'] = null;
     $ret['param'] = $param;
     $ret['variable'] = $vlist;
     $ret['action'] = "Add";
     return $ret;
 }
예제 #10
0
 function updateform($subaction, $param)
 {
     switch ($subaction) {
     }
     return parent::updateform($subaction, $param);
 }