oc-server3/htdocs/admins.php
following 5fe55ee0c2 added listing archiving-and-restore function (vandalism protection), and ...
- added log-picture removal on log deletion (bugfix)
- block deletion of user accounts if archived logs or cache reports exist
- show number of archived logs and cache reports in adminuser interface
- improved cache description deletion confirmation message
2013-03-20 18:11:08 +01:00

43 lines
1.3 KiB
PHP

<?php
/***************************************************************************
* For license information see doc/license.txt
*
* Unicode Reminder メモ
***************************************************************************/
require('./lib2/web.inc.php');
require_once('./lib2/logic/user.class.php');
$tpl->name = 'admins';
$tpl->menuitem = MNU_ADMIN_ADMINS;
$error = 0;
$login->verify();
if ($login->userid == 0)
$tpl->redirect_login();
if ($login->admin == 0)
$tpl->error(ERROR_NO_ACCESS);
$rs = sql("SELECT `user_id`,`username`,`admin` FROM `user` WHERE `admin` ORDER BY username");
while ($record = sql_fetch_assoc($rs))
{
$admin['id'] = $record['user_id'];
$admin['name'] = $record['username'];
$rights = array();
if ($record['admin'] & ADMIN_TRANSLATE) $rights[] = "translate";
if ($record['admin'] & ADMIN_MAINTAINANCE) $rights[] = "dbmaint";
if ($record['admin'] & ADMIN_USER) $rights[] = "user/caches";
if ($record['admin'] & ADMIN_NEWS) $rights[] = "newsapprove";
if ($record['admin'] & ADMIN_RESTORE) $rights[] = "vand.restore";
if ($record['admin'] & 128) $rights[] = "root";
$admin['rights'] = implode(", ", $rights);
$admins[] = $admin;
}
sql_free_result($rs);
$tpl->assign('admins',$admins);
$tpl->display();
?>