Add fixed userlist templates
parent
5ceb711b64
commit
6389096941
@ -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.
|
||||
*/
|
||||
|
||||
$result = mysql_query_cached("SELECT * FROM users");
|
||||
|
||||
$sUserList = array();
|
||||
|
||||
foreach($result->data as $row)
|
||||
{
|
||||
$sUserEntry = new User($row);
|
||||
$sUserList[] = array(
|
||||
'id' => $sUserEntry->sId,
|
||||
'username' => $sUserEntry->sUsername,
|
||||
'email' => $sUserEntry->sEmailAddress,
|
||||
'accesslevel' => $sUserEntry->sAccessLevel
|
||||
);
|
||||
}
|
||||
|
||||
$sPageContents = Templater::InlineRender("admin.users", $locale->strings, array(
|
||||
'users' => $sUserList
|
||||
));
|
@ -0,0 +1,26 @@
|
||||
<h2><%!title-admin-userlist></h2>
|
||||
|
||||
<table class="userlist">
|
||||
<tr>
|
||||
<th><%!admin-title-username></th>
|
||||
<th><%!admin-title-email></th>
|
||||
<th><%!admin-title-accesslevel></th>
|
||||
</tr>
|
||||
<%foreach user in users>
|
||||
<tr class="clickable" data-url="/admin/user/<%?user[id]>/">
|
||||
<td><%?user[username]></td>
|
||||
<td><%?user[email]></td>
|
||||
<td>
|
||||
<%if user[accesslevel] == 1>
|
||||
<%!admin-level-enduser>
|
||||
<%/if><%if user[accesslevel] == 10>
|
||||
<%!admin-level-reseller>
|
||||
<%/if><%if user[accesslevel] == 20>
|
||||
<%!admin-level-nodeadmin>
|
||||
<%/if><%if user[accesslevel] == 30>
|
||||
<%!admin-level-masteradmin>
|
||||
<%/if>
|
||||
</td>
|
||||
</tr>
|
||||
<%/foreach>
|
||||
</table>
|
Loading…
Reference in New Issue