CachedQuery("SELECT * FROM containers WHERE `UserId` = :UserId", array(":UserId" => $sUser->sId)); $sVpsList = array(); foreach($result->data as $row) { $sVps = new Vps($row); try { $sStatus = $sVps->sStatusText; } catch (SshException $e) { $sStatus = "unknown"; } $sVpsList[] = array( 'id' => $sVps->sId, 'hostname' => $sVps->sHostname, 'node' => $sVps->sNode->sName, 'node-hostname' => $sVps->sNode->sHostname, 'template' => $sVps->sTemplate->sName, 'diskspace' => number_format($sVps->sDiskSpace / 1024), 'diskspace-unit' => "GB", 'guaranteed-ram' => $sVps->sGuaranteedRam, 'guaranteed-ram-unit' => "MB", 'status' => $sStatus, 'virtualization-type' => $sVps->sVirtualizationType ); } $sMainContents = Templater::AdvancedParse("{$sTheme}/client/vps/list", $locale->strings, array( 'vpses' => $sVpsList )); } else { throw new UnauthorizedException("You must be logged in to view this page."); }