From a3f56fb3d4be970c26a3754ec1d30621f2d44ee2 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 6 May 2012 20:00:05 +0200 Subject: [PATCH] Rewrote status section of container overview --- frontend/module.vps.overview.php | 2 +- frontend/rewrite.php | 2 -- frontend/templates/status.running.tpl | 1 - frontend/templates/status.stopped.tpl | 1 - frontend/templates/status.suspended.tpl | 1 - frontend/templates/status.unknown.tpl | 1 - frontend/templates/vps.overview.tpl | 12 +++++++++++- 7 files changed, 12 insertions(+), 8 deletions(-) delete mode 100644 frontend/templates/status.running.tpl delete mode 100644 frontend/templates/status.stopped.tpl delete mode 100644 frontend/templates/status.suspended.tpl delete mode 100644 frontend/templates/status.unknown.tpl diff --git a/frontend/module.vps.overview.php b/frontend/module.vps.overview.php index 832ff48..4ac245e 100644 --- a/frontend/module.vps.overview.php +++ b/frontend/module.vps.overview.php @@ -38,6 +38,6 @@ $sPageContents = Templater::InlineRender("vps.overview", $locale->strings, array 'disk-space' => "{$sContainer->sDiskSpace}MB", 'total-traffic-limit' => "{$sContainer->sTotalTrafficLimit} bytes", 'bandwidth-limit' => "100mbit", - 'status' => Templater::InlineRender("status.{$sContainer->sStatusText}", $locale->strings) + 'status' => $sContainer->sStatusText )); ?> diff --git a/frontend/rewrite.php b/frontend/rewrite.php index e5306c1..3f5e7cb 100644 --- a/frontend/rewrite.php +++ b/frontend/rewrite.php @@ -16,8 +16,6 @@ require("includes/include.base.php"); $sTemplateParameters = array(); -$_SESSION['userid'] = 1; - if(!empty($_SESSION['userid'])) { $sUser = new User($_SESSION['userid']); diff --git a/frontend/templates/status.running.tpl b/frontend/templates/status.running.tpl deleted file mode 100644 index 94b952c..0000000 --- a/frontend/templates/status.running.tpl +++ /dev/null @@ -1 +0,0 @@ -Running diff --git a/frontend/templates/status.stopped.tpl b/frontend/templates/status.stopped.tpl deleted file mode 100644 index 0080ca8..0000000 --- a/frontend/templates/status.stopped.tpl +++ /dev/null @@ -1 +0,0 @@ -Stopped diff --git a/frontend/templates/status.suspended.tpl b/frontend/templates/status.suspended.tpl deleted file mode 100644 index f686718..0000000 --- a/frontend/templates/status.suspended.tpl +++ /dev/null @@ -1 +0,0 @@ -Suspended diff --git a/frontend/templates/status.unknown.tpl b/frontend/templates/status.unknown.tpl deleted file mode 100644 index 105cd63..0000000 --- a/frontend/templates/status.unknown.tpl +++ /dev/null @@ -1 +0,0 @@ -Unknown diff --git a/frontend/templates/vps.overview.tpl b/frontend/templates/vps.overview.tpl index e8512cc..3770082 100644 --- a/frontend/templates/vps.overview.tpl +++ b/frontend/templates/vps.overview.tpl @@ -47,7 +47,17 @@ - +
Status<%?status> + <%if status == running> + Running + <%/if><%if status == stopped> + Stopped + <%/if><%if status == suspended> + Suspended + <%/if><%if status == unknown> + Unknown + <%/if> +
Server location