Add user lookup page

feature/node-rewrite
Sven Slootweg 13 years ago
parent 59ec642b4d
commit ac3d2bd753

@ -37,6 +37,31 @@ class User extends CPHPDatabaseRecordClass
'AccessLevel'
);
public function __get($name)
{
switch($name)
{
case "sContainerCount":
return $this->GetContainerCount();
break;
default:
return null;
break;
}
}
public function GetContainerCount()
{
if($result = mysql_query_cached("SELECT * FROM containers WHERE `UserId` = '{$this->sId}'"))
{
return count($result->data);
}
else
{
return 0;
}
}
public function GenerateSalt()
{
$this->uSalt = random_string(10);

@ -66,7 +66,7 @@ table.vpsinfo, table.console
border: 2px solid #31305E;
}
table.vpsinfo td, table.console td
table.vertical td
{
padding: 2px 13px;
}
@ -86,6 +86,11 @@ table.console th
width: 120px;
}
table.userinfo th
{
width: 180px;
}
table.userlist td
{
padding-bottom: 4px;

@ -106,9 +106,11 @@ console-title-port; Port
console-title-username; Username
console-title-password; Password
admin-title-id; User ID
admin-title-username; Username
admin-title-email; Email address
admin-title-accesslevel; Access level
admin-title-containers; Container count
admin-level-enduser; End user
admin-level-reseller; Reseller
admin-level-nodeadmin; Node administrator

@ -29,7 +29,8 @@ try
$router->routes = array(
0 => array(
'^/admin/?$' => "module.admin.overview.php",
'^/admin/users/?$' => "module.admin.users.php"
'^/admin/users/?$' => "module.admin.users.php",
'^/admin/user/([0-9]+)/?$' => "module.admin.user.php"
)
);

Loading…
Cancel
Save