Add files for user lookup page
parent
ac3d2bd753
commit
6057a28eb5
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/*
|
||||
* CVM is more free software. It is licensed under the WTFPL, which
|
||||
* allows you to do pretty much anything with it, without having to
|
||||
* ask permission. Commercial use is allowed, and no attribution is
|
||||
* required. We do politely request that you share your modifications
|
||||
* to benefit other developers, but you are under no enforced
|
||||
* obligation to do so :)
|
||||
*
|
||||
* Please read the accompanying LICENSE document for the full WTFPL
|
||||
* licensing text.
|
||||
*/
|
||||
|
||||
try
|
||||
{
|
||||
$sUserEntry = new User($router->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();
|
||||
}
|
||||
|
@ -0,0 +1,32 @@
|
||||
<table class="userinfo vertical">
|
||||
<tr>
|
||||
<th><%!admin-title-id></th>
|
||||
<td><%?id></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%!admin-title-username></th>
|
||||
<td><%?username></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%!admin-title-email></th>
|
||||
<td><%?email></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%!admin-title-accesslevel></th>
|
||||
<td>
|
||||
<%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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%!admin-title-containers></th>
|
||||
<td><%?containers></td>
|
||||
</tr>
|
||||
</table>
|
Loading…
Reference in New Issue