From 6057a28eb5677a32366e7b161d43a1ef6eabde76 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Fri, 11 May 2012 02:31:02 +0200 Subject: [PATCH] Add files for user lookup page --- frontend/module.admin.user.php | 31 ++++++++++++++++++++++++++++++ frontend/templates/admin.user.tpl | 32 +++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 frontend/module.admin.user.php create mode 100644 frontend/templates/admin.user.tpl diff --git a/frontend/module.admin.user.php b/frontend/module.admin.user.php new file mode 100644 index 0000000..76b4ae6 --- /dev/null +++ b/frontend/module.admin.user.php @@ -0,0 +1,31 @@ +uParameters[1]); + + $sPageContents = Templater::InlineRender("admin.user", $locale->strings, array( + 'id' => $sUserEntry->sId, + 'username' => $sUserEntry->sUsername, + 'email' => $sUserEntry->sEmailAddress, + 'accesslevel' => $sUserEntry->sAccessLevel, + 'containers' => $sUserEntry->sContainerCount + )); +} +catch (NotFoundException $e) +{ + $err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, "That user does not exist", "The user you tried to look up does not exist."); + $sPageContents .= $err->Render(); +} + diff --git a/frontend/templates/admin.user.tpl b/frontend/templates/admin.user.tpl new file mode 100644 index 0000000..f47ef53 --- /dev/null +++ b/frontend/templates/admin.user.tpl @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + +
<%!admin-title-id><%?id>
<%!admin-title-username><%?username>
<%!admin-title-email><%?email>
<%!admin-title-accesslevel> + <%if accesslevel == 1> + <%!admin-level-enduser> + <%/if><%if accesslevel == 10> + <%!admin-level-reseller> + <%/if><%if accesslevel == 20> + <%!admin-level-nodeadmin> + <%/if><%if accesslevel == 30> + <%!admin-level-masteradmin> + <%/if> +
<%!admin-title-containers><%?containers>