예제 #1
0
 function createShowUpdateform()
 {
     if (check_if_many_server()) {
         $uflist['pserver_s'] = null;
     }
     $uflist['limit'] = null;
     return $uflist;
 }
예제 #2
0
파일: oldheader.php 프로젝트: zseand/kloxo
function createOldHeaderData()
{
    global $gbl, $sgbl, $login, $ghtml;
    global $gdata;
    $homedesc = $login->getKeywordUc('home');
    $deskdesc = $login->getKeywordUc('desktop');
    $aboutdesc = $login->getKeywordUc('about');
    $domaindesc = get_plural(get_description('domain'));
    $clientdesc = get_plural(get_description('client'));
    $slavedesc = get_description('pserver');
    $ticketdesc = get_plural(get_description('ticket'));
    $ssessiondesc = get_description('ssession');
    $systemdesc = $login->getKeywordUc('system');
    $logoutdesc = $login->getKeywordUc('logout');
    $helpdesc = $login->getKeywordUc('help');
    $ffiledesc = get_plural(get_description("ffile"));
    $alldesc = $login->getKeywordUc('all');
    if ($login->isAdmin()) {
        $doctype = "admin";
        $domainclass = "domain";
    } else {
        $doctype = "client";
        $domainclass = "domain";
    }
    if (check_if_many_server()) {
        $serverurl = $ghtml->getFullUrl('a=list&c=pserver');
        $slavedesc = get_plural($slavedesc);
    } else {
        $serverurl = $ghtml->getFullUrl('k[class]=pserver&k[nname]=localhost&a=show');
    }
    if ($login->is__table('client')) {
        $ffileurl = $ghtml->getFullUrl('k[class]=ffile&k[nname]=/&a=show');
    } else {
        $ffileurl = $ghtml->getFullUrl('n=web&k[class]=ffile&k[nname]=/&a=show');
    }
    $gob = $login->getObject('general')->generalmisc_b;
    if (isset($gob->ticket_url) && $gob->ticket_url) {
        $url = $gob->ticket_url;
        $url = add_http_if_not_exist($url);
        $ticket_url = "javascript:window.open('{$url}')";
    } else {
        $ticket_url = "/display.php?frm_action=list&frm_o_cname=ticket";
    }
    $helpurl = "http://wiki.lxcenter.org";
    $gdata = array("desktop" => array($deskdesc, "/display.php?frm_action=desktop", "client_list.gif"), "home" => array($homedesc, "/display.php?frm_action=show", "client_list.gif"), "all" => array($alldesc, "/display.php?frm_action=list&frm_o_cname=all_domain", "client_list.gif"), "domain" => array($domaindesc, "/display.php?frm_action=list&frm_o_cname={$domainclass}", "domain_list.gif"), "system" => array($systemdesc, "/display.php?frm_action=show&frm_o_o[0][class]=pserver&frm_o_o[0][nname]=localhost", "pserver_list.gif"), "client" => array($clientdesc, "/display.php?frm_action=list&frm_o_cname=client", "client_list.gif"), "ffile" => array($ffiledesc, $ffileurl, "client_list.gif"), "pserver" => array($slavedesc, $serverurl, "pserver_list.gif"), "ticket" => array($ticketdesc, $ticket_url, "ticket_list.gif"), "ssession" => array($ssessiondesc, "/display.php?frm_action=list&frm_o_cname=ssessionlist", "ssession_list.gif"), "about" => array($aboutdesc, "/display.php?frm_action=about", "ssession_list.gif"), "help" => array($helpdesc, "javascript:window.open('{$helpurl}/')", "ssession_list.gif"), "logout" => array("<font color=red>{$logoutdesc}<font >", "javascript:top.mainframe.logOut();", "delete.gif"));
}
예제 #3
0
파일: clientlib.php 프로젝트: zseand/kloxo
 function createShowAlist(&$alist, $subaction = null)
 {
     global $gbl, $sgbl, $login, $ghtml;
     if ($subaction === 'config') {
         return $this->createShowAlistConfig($alist);
     }
     $server = null;
     if ($this->isAdmin()) {
         $server = "Servers: {$this->getUSlashP("pserver_num")}";
     }
     $alist['__title_administer'] = $login->getKeywordUc('administration');
     if ($this->isLte('reseller')) {
         //$alist[] = "a=list&c=all_domain";
         $alist[] = create_simpleObject(array('url' => "a=list&c=all_domain", 'purl' => "a=updateform&sa=all_resource", '__internal' => true, 'target' => ""));
     }
     $alist[] = "a=list&c=actionlog";
     if ($this->isAdmin()) {
         $alist[] = 'a=list&c=pserver';
         /*
         if (check_if_many_server()) {
         	$this->getListActions($alist, 'pserver'); 
         } else {
         	$alist[] = 'k[class]=pserver&k[nname]=localhost&a=show';
         }
         */
     }
     if ($this->isLte('reseller')) {
         $alist[] = "a=list&c=client";
     }
     if ($this->isLte('reseller')) {
         $alist[] = "a=list&c=resourceplan";
     }
     $this->getTicketMessageUrl($alist);
     //$alist[] = "a=list&c=ssession";
     if ($login->priv->isOn('can_change_password_flag')) {
         if ($this->isLogin() && $login->isAuxiliary()) {
             $alist['__v_dialog_pass'] = "******";
         } else {
             $alist['__v_dialog_pass'] = "******";
         }
     }
     if ($this->isAdmin()) {
         $alist[] = "a=list&c=custombutton";
     }
     $alist['__v_dialog_info'] = "a=updateform&sa=information";
     if ($this->priv->isOn('webhosting_flag')) {
         if ($this->priv->isOn('cron_manage_flag') && $this->isCustomer()) {
             $alist[] = "a=list&c=cron";
         }
     }
     if (!$this->isLogin()) {
         $alist['__v_dialog_limit'] = "a=updateform&sa=limit";
         $alist['__v_dialog_plan'] = "a=updateform&sa=change_plan";
     }
     if ($this->isAdmin() && !lxfile_exists("/proc/user_beancounters") && !lxfile_exists("/proc/xen")) {
         $alist[] = "a=list&c=reversedns";
     }
     if (!$this->isAdmin()) {
         if (!$this->isLogin()) {
             $alist['__v_dialog_dnstem'] = "a=updateform&sa=dnstemplatelist";
         }
         if (check_if_many_server()) {
             if ($this->isLte('reseller')) {
                 $alist[] = "a=updateForm&sa=pserver_s";
             }
         } else {
             //$alist[] = "a=updateForm&sa=pserver_s";
             //$alist[] = "a=updateForm&sa=ipaddress";
         }
     }
     if ($this->isAdmin()) {
         //$alist[] = 'k[class]=pserver&k[nname]=localhost&o=lxupdate&a=updateform&sa=lxupdateinfo';
         $alist[] = 'o=lxupdate&a=show';
     }
     //$alist[] = "a=updateform&sa=generate_csr";
     $dbadminUrl = "/thirdparty/phpMyAdmin/";
     //$alist[] = create_simpleObject(array('url' => "$dbadminUrl", 'purl' => "c=mysqldb&a=updateform&sa=phpmyadmin", 'target' => "target='_blank'"));
     if (!$this->isLogin()) {
         $alist[] = "a=update&sa=dologin";
     }
     if ($this->priv->isOn('webhosting_flag')) {
         $alist['__title_resource'] = $login->getKeywordUc('resource');
     }
     $alist[] = "a=updateform&sa=update&o=domaindefault";
     $alist[] = "a=list&c=auxiliary";
     /*
     	if (!$this->isAuxiliary()) {
     		$alist[] = "a=list&c=auxiliary";
     	}
     */
     $alist[] = "a=list&c=utmp";
     if ($login->isAdmin()) {
         $alist['__v_dialog_shell'] = "a=updateform&sa=shell_access";
     }
     if (check_if_many_server()) {
         if (!$this->isLogin() && !$this->isAdmin()) {
             $alist[] = "a=updateForm&sa=domainpserver";
         }
     }
     if ($this->isAdmin()) {
         if ($this->priv->isOn("dns_manage_flag")) {
             $alist[] = "c=dnstemplate&a=list";
         }
     }
     //$alist[] = "a=list&c=domain";
     if ($this->isAdmin()) {
         if (lxfile_exists("/var/installatron")) {
             $alist[] = create_simpleObject(array('url' => "/installatron/", 'purl' => 'a=updateform&sa=installatron', 'target' => ""));
         }
     }
     if ($this->priv->isOn('webhosting_flag')) {
         if (lxfile_exists("/var/installatron")) {
             if (!$this->isAdmin()) {
                 if ($this->isLogin()) {
                     $alist[] = create_simpleObject(array('url' => "/installatron/", 'purl' => 'a=updateform&sa=installatron', 'target' => ""));
                 } else {
                     $alist[] = "a=updateform&sa=installatron";
                 }
             }
         }
         if ($login->priv->isOn('backup_flag')) {
             $alist[] = "a=show&o=lxbackup";
         }
         $alist[] = "a=list&c=ipaddress";
         if ($this->getList('ipaddress')) {
             $alist[] = "a=list&c=sslcert";
         }
         if ($this->isCustomer()) {
             $alist[] = "a=list&c=ftpuser";
             $alist[] = 'a=list&c=ftpsession';
             $alist[] = "a=show&l[class]=ffile&l[nname]=/";
             $alist['__v_dialog_defd'] = "a=updateform&sa=default_domain";
             $alist[] = "a=show&o=sshclient";
             $alist[] = "a=list&c=traceroute";
             $this->getListActions($alist, 'mysqldb');
             $this->getMysqlDbAdmin($alist);
             //$this->getListActions($alist, 'mssqldb');
         }
         if ($login->priv->isOn('domain_add_flag')) {
             $alist[] = "a=addform&c=domain";
         }
     }
     /// List dns tempate only for admin... From now onwards.
     if (!$this->isLogin()) {
         //Both wall and message not done through message board.
         //$alist[] = 'a=updateForm&sa=message';
     }
     // Client Traffic history. Doesn't know if I should add the history of HIS clients too, or just use the traffic for the domains under him. So hashing for the present.
     //$alist[] = 'a=list&c=domaintraffichistory';
     //$this->getListActions($alist, 'ticket');
     //$web = $this->getObject('web');
     //$ip = getFQDNforServer($web->syncserver);
     //$ip = getFQDNforServer('localhost');
     //$alist[] = create_simpleObject(array('url' => "http://$ip/~$this->username/", 'purl' => 'a=updateform&sa=site_preview&l[class]=domain&l[nname]=$this->nname', 'target' => "target='_blank'"));
     //$this->getLxclientActions($alist);
     if ($this->isAdmin()) {
         //$alist[] = "a=list&c=blockedip";
         //$alist[] = "o=general&a=updateForm&sa=attempts";
         //$alist[] = "a=list&c=module";
     } else {
     }
     if ($this->isNotCustomer()) {
         $alist['__title_domain_rec'] = $login->getKeywordUc('domain');
         $alist[] = "a=list&c=ftpuser";
         $this->getListActions($alist, 'mysqldb');
         $this->getMysqlDbAdmin($alist);
         $alist[] = "a=show&l[class]=ffile&l[nname]=/";
         $alist['__v_dialog_defd'] = "a=updateform&sa=default_domain";
         //$alist[] = "a=show&o=sshclient";
         $alist[] = "a=list&c=cron";
         $alist[] = "a=list&c=traceroute";
         //$this->getListActions($alist, 'mssqldb');
     }
     if (!$this->isAdmin() && !$this->isDisabled("shell")) {
         $alist[] = "a=list&c=sshauthorizedkey";
     }
     if ($this->isCustomer()) {
         $this->getDomainAlist($alist);
     }
     if ($this->isAdmin()) {
         if ($this->isDomainOwnerMode()) {
             $this->getDomainAlist($alist);
         } else {
             $so = $this->getFromList('pserver', 'localhost');
             $this->getAlistFromChild($so, $alist);
         }
     } else {
         if ($this->isLte('reseller') && $this->isDomainOwnerMode()) {
             $this->getDomainAlist($alist);
         }
     }
     $this->getCustomButton($alist);
     $alist['__title_advanced'] = $login->getKeywordUc('advanced');
     if ($this->isAdmin()) {
         //$alist['__v_dialog_tick'] = "a=updateform&sa=ticketconfig&o=ticketconfig";
         //$alist[] = "o=general&c=helpdeskcategory_a&a=list";
         $alist['__v_dialog_sca'] = "o=general&a=updateform&sa=scavengetime";
         $alist['__v_dialog_gen'] = "o=general&a=updateform&sa=generalsetting";
         $alist['__v_dialog_main'] = "o=general&a=updateform&sa=maintenance";
         $alist['__v_dialog_self'] = "o=general&a=updateform&sa=selfbackupconfig";
         //$alist['__v_dialog_ssh'] = "o=general&a=updateform&sa=ssh_config";
         //$alist['__v_dialog_ipcheck'] = "o=general&a=updateform&sa=session_config";
         $alist['__v_dialog_download'] = "o=general&a=updateform&sa=download_config";
         $alist['__v_dialog_forc'] = "a=updateform&sa=forcedeletepserver";
         if ($sgbl->isHyperVm()) {
             $alist['__v_dialog_hack'] = "o=general&a=updateform&sa=hackbuttonconfig";
             $alist['__v_dialog_rev'] = "o=general&a=updateform&sa=reversedns";
             $alist['__v_dialog_cust'] = "o=general&a=updateform&sa=customaction";
             $alist['__v_dialog_orph'] = "a=updateform&sa=deleteorphanedvps";
             $alist['__v_dialog_lxc'] = "o=general&a=updateform&sa=kloxo_config";
             //$alist[] = "a=show&o=ostemplatelist";
             $alist[] = "a=list&c=customaction";
         } else {
             $alist[] = "o=genlist&c=dirindexlist_a&a=list";
         }
     }
     if ($sgbl->isHyperVm()) {
         if (!$this->isAdmin()) {
             $alist[] = "a=updateform&sa=ostemplatelist";
         }
     }
     $alist['__v_dialog_misc'] = "a=updateform&sa=miscinfo";
     // temporary, only for admin - on 6.1.7
     if ($this->isAdmin()) {
         if ($login->priv->isOn('logo_manage_flag') && $this->isLogin()) {
             $alist['__v_dialog_uplo'] = "o=sp_specialplay&a=updateForm&sa=upload_logo";
         }
         if ($this->canHaveChild()) {
             $alist['__v_dialog_ch'] = "o=sp_childspecialplay&a=updateform&sa=skin";
         }
     }
     $alist['__v_dialog_misc'] = "a=updateform&sa=miscinfo";
     if ($this->isAdmin()) {
         $alist[] = "o=general&a=updateform&sa=portconfig";
     }
     if (!$this->isLogin() && !$this->isLteAdmin() && csb($this->nname, "demo_")) {
         $alist['__v_dialog_demo'] = "o=sp_specialplay&a=updateform&sa=demo_status";
     }
     // temporary, only for admin - on 6.1.7
     if ($this->isAdmin()) {
         if ($login->priv->isOn('can_set_disabled_flag')) {
             $alist[] = 'a=updateform&sa=disable_skeleton';
         }
     }
     $alist[] = "a=list&c=blockedip";
     $alist[] = "a=show&o=notification";
     if (!$this->isLogin()) {
         $alist['__v_dialog_disa'] = "a=updateform&sa=disable_per";
     }
     // temporary, only for admin
     if ($this->isAdmin()) {
         if ($login->priv->isOn('logo_manage_flag') && $this->isLogin()) {
             $alist['__v_dialog_uplo'] = "o=sp_specialplay&a=updateForm&sa=upload_logo";
         }
     }
     if (!$this->isLogin()) {
         $alist['__v_dialog_resend'] = "a=updateform&sa=resendwelcome";
     }
     if (!$this->isLogin()) {
         $alist[] = "a=updateForm&sa=changeowner";
     }
     if ($this->isLogin()) {
         $alist['__v_dialog_login'] = "******";
     }
     if ($this->isAdmin()) {
         $alist[] = "a=updateform&sa=license&o=license";
     }
     return $alist;
 }
예제 #4
0
 function updateform($subaction, $param)
 {
     global $gbl, $sgbl, $login, $ghtml;
     switch ($subaction) {
         case "installatron":
             $vlist['__v_button'] = array();
             return $vlist;
         case "ostemplatelist":
             getResourceOstemplate($vlist, 'all');
             $vlist['__v_updateall_button'] = array();
             return $vlist;
         case "createinvoice_m":
             $vlist['month'] = null;
             return $vlist;
         case "createinvoice_s":
             $vlist['month'] = array('s', $this->getInvoiceMonthList());
             return $vlist;
         case "search_engine":
             $vlist['se_url'] = array('M', "http://");
             $vlist['se_email'] = null;
             return $vlist;
         case "cron_mailto":
             $vlist['cron_mailto'] = null;
             return $vlist;
         case "default_domain":
             $vlist['default_domain'] = array('s', add_disabled(get_namelist_from_objectlist($this->getList('domain'))));
             return $vlist;
         case "shell_access":
             $res[] = "/bin/bash";
             $res[] = "/usr/bin/lxjailshell";
             $res = add_disabled($res);
             $vlist['nname'] = array('M', null);
             $vlist['disable_system_flag'] = null;
             $vlist['shell'] = array('s', $res);
             $vlist['__v_updateall_button'] = array();
             return $vlist;
         case "generate_csr":
             include "lib/countrycode.inc";
             foreach ($gl_country_code as $key => $name) {
                 $temp[$key] = $name;
             }
             $s = new sslcert(null, null, null);
             $this->ssl_data_b = new ssl_data_b(null, null, null);
             $vlist['contactemail'] = array('M', null);
             $vlist["ssl_data_b_s_commonName_r"] = null;
             $vlist["ssl_data_b_s_emailAddress_r"] = null;
             $vlist["ssl_data_b_s_countryName_r"] = array('A', $temp);
             $vlist["ssl_data_b_s_stateOrProvinceName_r"] = null;
             $vlist["ssl_data_b_s_localityName_r"] = null;
             $vlist["ssl_data_b_s_organizationName_r"] = null;
             $vlist["ssl_data_b_s_organizationalUnitName_r"] = null;
             return $vlist;
         case "domainpserver":
             if ($this->isAdmin()) {
                 $parent = $this;
             } else {
                 $parent = $this->getParentO();
             }
             self::getDomainServerVlist($parent, $this, $vlist);
             return $vlist;
         case "forcedeletepserver":
             if_not_admin_complain_and_exit();
             $list = get_namelist_from_objectlist($this->getList('pserver'));
             $vlist['pserver_delete_f'] = array('s', array_remove($list, "localhost"));
             return $vlist;
         case "deleteorphanedvps":
             $sq = new Sqlite(null, 'vps');
             $slist = get_namelist_from_objectlist($this->getList('pserver'));
             $res = $sq->getTable(array('nname', 'syncserver', 'parent_clname'));
             $list = null;
             foreach ($res as $r) {
                 if (!array_search_bool($r['syncserver'], $slist)) {
                     $list[$r['nname']] = "{$r['nname']} ({$r['syncserver']}) (orphaned)";
                 }
             }
             if ($list) {
                 $vlist['vps_delete_f'] = array('A', $list);
             } else {
                 $vlist['vps_delete_f'] = array('M', 'No Orphaned vm');
             }
             return $vlist;
         case "multivpscreate":
             $vlist['vps_basename_f'] = null;
             $vlist['vps_admin_password_f'] = null;
             $vlist['vps_count_f'] = null;
             $vlist['vps_template_name_f'] = array('s', get_namelist_from_objectlist($this->getList('vpstemplate')));
             return $vlist;
         case "disable_url":
             $vlist['disable_url'] = array('m', array('pretext' => 'http://'));
             return $vlist;
         case "message":
             $vlist['wall_from_f'] = array('M', $login->nname);
             $vlist['send_to_f'] = array('M', $this->nname);
             $vlist['wall_subject_f'] = null;
             $vlist['wall_message_f'] = null;
             $vlist['__v_button'] = 'Send';
             return $vlist;
         case "skeleton":
             $vlist['skeletonarchive'] = array('M', null);
             $vlist['skeletonarchive_f'] = null;
             return $vlist;
         case "wall":
             $vlist['wall_from_f'] = array('M', $this->nname);
             //Can't do this. If he has 10000 client, this itelf will hang the machine.
             //$vlist['send_to_f'] = array('M', $namlist);
             $vlist['wall_subject_f'] = null;
             $vlist['wall_message_f'] = null;
             $vlist['__v_button'] = 'Send';
             return $vlist;
         case "dnstemplatelist":
             $parent = $this->getParentO();
             $nlist = domain::getDnsTemplateList($parent);
             $vlist['dnstemplate_list'] = array('U', $nlist);
             $vlist['__v_updateall_button'] = array();
             return $vlist;
         case "information":
             $vlist['nname'] = array('M', $this->nname);
             if ($this->isAdmin()) {
                 $gen = $login->getObject('general');
                 $this->disable_admin = $gen->disable_admin;
                 $vlist['disable_admin'] = null;
             }
             if ($this->isLogin()) {
                 $vlist['cttype'] = array('M', $this->cttype);
             } else {
                 $parent = $this->getParentO();
                 $res = null;
                 if (check_if_many_server()) {
                     $ctlist = array('reseller', 'customer', 'wholesale');
                 } else {
                     $ctlist = array('reseller', 'customer');
                 }
                 foreach ($ctlist as $v) {
                     if ($parent->isGte($v)) {
                         continue;
                     }
                     $res[] = $v;
                 }
                 if ($res) {
                     $vlist['cttype'] = array('s', $res);
                 } else {
                     $vlist['cttype'] = array('M', $this->cttype);
                 }
             }
             $vlist['ddate'] = array('M', @date('d-m-Y', $this->ddate));
             if (!$this->isAdmin()) {
                 $vlist['parent_name_f'] = array('M', $this->getParentName());
             }
             $vlist['contactemail'] = "";
             if (!$this->isLogin()) {
                 $vlist['text_comment'] = null;
             }
             return $vlist;
         case "license":
             $lic = $login->getObject('license')->licensecom_b;
             if ($login->isAdmin()) {
                 $vlist['lic_pserver_num_f'] = array('M', $lic->lic_pserver_num);
                 $vlist['lic_client_num_f'] = array('M', $lic->lic_client_num);
                 $vlist['lic_maindomain_num_f'] = array('M', $lic->lic_maindomain_num);
             } else {
                 $vlist['lic_node_num_f'] = array('M', $lic->node_num);
             }
             $vlist['lic_live_support_f'] = array('M', $lic->lic_live_support);
             //$vlist['lic_ipaddress_f'] = array('M', $lic->lic_ipaddress);
             $vlist['lic_client_f'] = array('M', $lic->lic_client);
             //$vlist['lic_current_f'] = array('t', lfile_get_contents('__path_program_etc/license.txt'));
             $vlist['license_upload_f'] = null;
             return $vlist;
         case "ipaddress":
             $parent = $this->getParentO();
             if ($this->isLogin() || !$this->isRightParent()) {
                 $vlist['ipaddress_list'] = array('M', $this->getIpaddress($this->listpriv->webpserver_list));
                 $vlist['__v_button'] = array();
             } else {
                 if (check_if_many_server()) {
                     dprintr($this->listpriv->webpserver_list);
                     $iplist = $parent->getIpaddress($this->listpriv->webpserver_list);
                 } else {
                     $iplist = $parent->getIpaddress(array('localhost'));
                 }
                 dprintr($iplist);
                 $vlist['ipaddress_list'] = array('Q', $iplist);
             }
             return $vlist;
         case "pserver_s":
             $parent = $this->getParentO();
             $list = null;
             $serverlist = client::getPserverListPriv();
             if ($this->isLogin() || !$this->isRightParent()) {
                 foreach ($serverlist as $s) {
                     $slist = "{$s}_list";
                     $vlist["{$s}_list"] = array('M', $this->listpriv->{$slist});
                 }
                 $vlist['__v_button'] = array();
                 //$vlist['dbtype_list'] = array('M', $this->listpriv->dbtype_list);
                 return $vlist;
             } else {
                 $vlist['server_detail_f'] = null;
                 foreach ($serverlist as $s) {
                     $slist = "{$s}_list";
                     // Hack.. Actually, admin's listpriv should be empty so that the __get inside the listpriv will get automatically called.
                     if ($parent->isAdmin()) {
                         unset($parent->listpriv->{$slist});
                     }
                     $vlist["{$s}_list"] = null;
                     $list = lx_array_merge(array($list, $parent->getServerList(strtilfirst($s, "pserver"))));
                 }
                 $sinfo = pservercore::createServerInfo($list);
                 $sinfo = get_warning_for_server_info($parent, $sinfo);
                 $vlist['server_detail_f'] = array('M', $sinfo);
                 //$vlist['dbtype_list'] = null;
                 return $vlist;
             }
         case "description":
             $vlist['description'] = null;
             //$vlist['share_status'] = null;
             if (!$this->isRightParent()) {
                 $this->convertToUnmodifiable($vlist);
             }
             return $vlist;
     }
     return parent::updateform($subaction, $param);
 }
예제 #5
0
파일: lib.php 프로젝트: lonelywoolf/hypervm
function get_title()
{
    global $gbl, $sgbl, $login, $ghtml;
    $gen = $login->getObject('general')->generalmisc_b;
    if ($login->isAdmin()) {
        $host = os_get_hostname();
        $host = strtilfirst($host, ".");
    } else {
        $host = $login->nname;
    }
    if (isset($gen->htmltitle) && $gen->htmltitle) {
        $progname = $gen->htmltitle;
    } else {
        $progname = ucfirst($sgbl->__var_program_name);
    }
    $title = null;
    if ($login->isAdmin()) {
        $title = $sgbl->__ver_major . "." . $sgbl->__ver_minor . "." . $sgbl->__ver_release . " " . $sgbl->__ver_extra;
    }
    if (check_if_many_server()) {
        $enterprise = "Enterprise";
    } else {
        $enterprise = "Single Server";
    }
    $title = "{$host} {$progname} {$enterprise} {$title}";
    return $title;
}
예제 #6
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;
 }
예제 #7
0
 function getTitleWithSync($class = null)
 {
     global $gbl, $sgbl, $login, $ghtml;
     if ($class) {
         $obj = $this->getObject($class);
     } else {
         $obj = $this;
         $class = $this->get__table();
     }
     $switch = null;
     if (isset($obj->olddeleteflag) && $obj->olddeleteflag === 'on') {
         $switch = "(Switching)";
     }
     $desc = get_description($class);
     $path = get_image_path();
     $img = $ghtml->get_image($path, null, $obj->__driverappclass, '.gif');
     $descr = null;
     $str = null;
     if (check_if_many_server()) {
         $descr = "on {$obj->syncserver}";
         //$str = ":{$obj->syncserver}";
     }
     //<img src={$img} width=14 height=14>
     // Don't need this. Ruins the appearance <b> [</b>{$obj->getShowInfo()}<b>] </b>
     return "{$desc}  <span title=\"{$desc} is Configured {$descr} on {$obj->__driverappclass}\">  {$str} {$switch}: {$obj->__driverappclass}  </span>";
 }
예제 #8
0
 function createShowPropertyList(&$alist)
 {
     //$alist['property'][] = "o=sp_specialplay&a=updateForm&sa=skin";
     $alist['property'][] = 'a=show';
     $alist['property'][] = "a=updateform&sa=information";
     if ($this->nname !== 'localhost') {
         $alist['property'][] = "a=updateform&sa=password";
     }
     if (check_if_many_server()) {
         $alist['property'][] = "a=list&c=psrole_a";
     }
 }
예제 #9
0
 function createShowAlist(&$alist, $subaction = null)
 {
     global $gbl, $sgbl, $login, $ghtml;
     //$alist[] = "a=updateForm&sa=pserver";
     //$alist[] = "a=updateForm&sa=limit";
     if (check_if_many_server()) {
         $alist['__title_main'] = $login->getKeywordUc('resource');
         $alist[] = "a=updateform&sa=ddatabasepserver";
         //$alist[] = "a=updateform&sa=dnstemplate";
     }
     return $alist;
 }
예제 #10
0
 static function addform($parent, $class, $typetd = null)
 {
     global $gbl, $sgbl, $login, $ghtml;
     $dbprefix = null;
     if (!$parent->isAdmin()) {
         $dbprefix = self::fixDbname($parent->nname);
     }
     $vlist['nname'] = array('m', array('pretext' => $dbprefix));
     //$vlist['dbtype'] = $class;
     if (0 && check_if_many_server()) {
         $var = "{$class}pserver_list";
         if ($parent->is__table('domain')) {
             $pp = $parent->getRealClientParentO();
         } else {
             $pp = $parent;
         }
         $list = $pp->listpriv->{$var};
         if (!$list) {
             throw new lxException('no_database_server_pool_in_client', $class);
         }
         $vlist['syncserver'] = array('s', $pp->listpriv->{$var});
     }
     //$vlist['username'] = array('m', array('pretext' => $dbprefix));
     $vlist['dbpassword'] = null;
     $ret['variable'] = $vlist;
     $ret['action'] = 'add';
     return $ret;
 }
예제 #11
0
 function createShowPropertyList(&$alist)
 {
     global $gbl, $sgbl, $login, $ghtml;
     $alist['property'][] = 'a=show';
     $alist['property'][] = "a=updateForm&sa=description";
     $alist['property'][] = "a=updateForm&sa=account";
     if ($sgbl->isKloxo() && $this->getParentO()->isLte('reseller')) {
         $alist['property'][] = "a=updateform&sa=dnstemplatelist";
     }
     if ($sgbl->isHyperVm()) {
         $alist['property'][] = "a=updateForm&sa=pserver_s";
         $alist['property'][] = "a=updateForm&sa=ostemplatelist";
     }
     if ($sgbl->isKloxo() && check_if_many_server()) {
         //$alist['property'][] = "a=updateForm&sa=pserver_s";
     }
     $alist['property'][] = "a=updateForm&sa=copyplan";
     $alist['property'][] = "a=updateForm&sa=changerealname";
 }
예제 #12
0
파일: domainlib.php 프로젝트: zseand/kloxo
 static function createListSlist($parent)
 {
     $nlist['nname'] = null;
     $nlist['parent_clname'] = null;
     $nlist['dtype'] = array('s', array('--any--', 'maindomain', 'subdomain'));
     if (check_if_many_server()) {
         $sql = new Sqlite($parent->__masterserver, "pserver");
         $res = $sql->getTable(array('nname'));
         $rs = get_namelist_from_arraylist($res);
         $rs = lx_array_merge(array(array('--any--'), $rs));
         $nlist['webpserver'] = array('s', $rs);
         $nlist['mmailpserver'] = array('s', $rs);
         $nlist['dnspserver'] = array('s', $rs);
     }
     return $nlist;
 }
예제 #13
0
파일: lxclass.php 프로젝트: zseand/kloxo
 function getSwitchServerUrl(&$alist)
 {
     global $gbl, $sgbl, $login, $ghtml;
     return;
     if ($login->isAdmin()) {
         if (check_if_many_server()) {
             $alist[] = "n={$this->getClass()}&a=updateform&sa=switchserver";
         }
     }
 }