} $xtpl->table_tr(); $xtpl->table_td(_("Processes") . ':'); $xtpl->table_td($vps->ve["vps_nproc"]); $xtpl->table_tr(); $xtpl->table_td(_("Hostname") . ':'); $xtpl->table_td($vps->ve["vps_hostname"]); $xtpl->table_tr(); $xtpl->table_td(_("RAM") . ':'); $xtpl->table_td(sprintf('%4d MB', $vps->ve["vps_vm_used_mb"])); $xtpl->table_tr(); $xtpl->table_td(_("HDD") . ':'); $xtpl->table_td(sprintf('%.2f GB', round($vps->ve["vps_disk_used_mb"] / 1024, 2))); $xtpl->table_tr(); $xtpl->table_td(_("Distribution") . ':'); $templ = template_by_id($vps->ve["vps_template"]); $xtpl->table_td($templ["templ_label"]); $xtpl->table_tr(); if ($vps->ve["vps_specials_installed"]) { $xtpl->table_td(_("Special features installed") . ':'); $xtpl->table_td($vps->ve["vps_specials_installed"]); $xtpl->table_tr(); } $xtpl->table_td(_("Backuper") . ':'); $xtpl->table_td($vps->ve["vps_backup_enabled"] ? _("enabled") : _("disabled")); $xtpl->table_tr(); if ($_SESSION["is_admin"]) { $xtpl->table_td(_("Backup lock") . ':'); $xtpl->table_td($vps->ve["vps_backup_lock"] ? _("locked") : _("unlocked")); $xtpl->table_tr(); }
function reinstall() { global $cluster, $db; if ($this->exists) { $ips = $this->iplist(); $params = array("ip_addrs" => array()); if ($ips) { foreach ($ips as $ip) { $params["ip_addrs"][] = $ip["ip_addr"]; } } $template = template_by_id($this->ve["vps_template"]); $params["hostname"] = $this->ve["vps_hostname"]; $params["template"] = $template["templ_name"]; $this->ve["vps_nameserver"] = "8.8.8.8"; $params["nameserver"] = $this->ve["vps_nameserver"]; add_transaction($_SESSION["member"]["m_id"], $this->ve["vps_server"], $this->veid, T_REINSTALL_VE, $params); $this->applyconfigs(); $this->mount_regen(); $sql = 'UPDATE vps SET vps_features_enabled=0 WHERE vps_id=' . $db->check($this->veid); $result = $db->query($sql); $this->nameserver($cluster->get_first_suitable_dns($cluster->get_location_of_server($this->ve["vps_server"]))); } }
function reinstall() { global $cluster; if ($this->exists) { $ips = $this->iplist(); if ($ips) { foreach ($ips as $ip) { $this->ipdel($ip["ip_addr"]); } } $template = template_by_id($this->ve["vps_template"]); $params["hostname"] = $this->ve["vps_hostname"]; $params["template"] = $template["templ_name"]; $params["nameserver"] = $cluster->get_first_suitable_dns($cluster->get_location_of_server($this->ve["vps_server"])); add_transaction($_SESSION["member"]["m_id"], $this->ve["vps_server"], $this->veid, T_REINSTALL_VE, $params); $tmp["vps_privvmpages"] = $this->ve["vps_privvmpages"]; $tmp["vps_diskspace"] = $this->ve["vps_diskspace"]; $this->set_privvmpages(0, true); $this->set_diskspace(0, true); $this->set_privvmpages($tmp["vps_privvmpages"], true); $this->set_diskspace($tmp["vps_diskspace"], true); if ($ips) { foreach ($ips as $ip) { $this->ipadd($ip["ip_addr"]); } } } }