diff --git a/frontend/rewrite.php b/frontend/rewrite.php index 7ed4266..e0ea193 100644 --- a/frontend/rewrite.php +++ b/frontend/rewrite.php @@ -14,9 +14,14 @@ $_CVM = true; require("includes/include.base.php"); +$sUserbox = ""; + if(!empty($_SESSION['userid'])) { - $sUser = new User($sUser); + $sUser = new User($_SESSION['userid']); + $sUserbox = Templater::InlineRender("userbox", $locale->strings, array( + 'username' => "joepie91" + )); } else { @@ -57,6 +62,7 @@ catch (UnauthorizedException $e) } echo(Templater::InlineRender("main", $locale->strings, array( + 'userbox' => $sUserbox, 'title' => $sPageTitle, 'main' => $sMainContents, 'main-class' => $sMainClass diff --git a/frontend/templates/main.tpl b/frontend/templates/main.tpl index 9d19899..4824fa4 100644 --- a/frontend/templates/main.tpl +++ b/frontend/templates/main.tpl @@ -14,10 +14,7 @@
-
-
You are logged in as joepie91.
-
Account overview | My VPSes
-
+ <%?userbox>
<%?main>