AlternC/bureau/admin/sql_users_list.php

80 lines
2.4 KiB
PHP
Raw Permalink Normal View History

<?php
/*
----------------------------------------------------------------------
LICENSE
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License (GPL)
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To read the license please visit http://www.gnu.org/copyleft/gpl.html
----------------------------------------------------------------------
*/
/**
* Manages the MySQL users of an account
*
* @copyright AlternC-Team 2000-2017 https://alternc.com/
*/
require_once("../class/config.php");
2009-09-08 05:29:38 +00:00
include_once("head.php");
$r=$mysql->get_userslist();
$rdb=$mysql->get_dblist();
?>
<h3><?php __("MySQL Users"); ?></h3>
2010-05-27 15:10:45 +00:00
<hr id="topbar"/>
<br />
<?php
echo $msg->msg_html_all(true, true);
if($r){ // if there is some userlist
?>
<form method="post" action="sql_users_del.php">
<?php csrf_get(); ?>
<table cellspacing="0" cellpadding="4" class="tlist">
<tr><th>&nbsp;</th><th><?php __("User"); ?></th><th><?php __("Rights"); ?></th><th><?php __("Password");?></th></tr>
<?php
for($i=0;$i<count($r);$i++) {
$val=$r[$i];
?>
<tr class="lst">
<td align="center">
<input type="checkbox" class="inc" id="del_<?php echo $val["name"]; ?>" name="del_<?php echo $val["name"]; ?>" value="<?php echo $val["name"]; ?>" />
</td>
2012-08-25 17:05:38 +00:00
<td><label for="del_<?php echo $val["name"]; ?>"><?php echo $val["name"]; ?></label></td>
<td><span class="ina permissions"><a href="sql_users_rights.php?id=<?php echo $val["name"] ?>"><?php __("Manage the rights"); ?></a></span></td>
<td><span class="ina lock"><a href="sql_users_password.php?id=<?php echo $val["name"] ?>"><?php __("Password change"); ?></a></span></td>
</tr>
<?php
}
?>
</table>
2013-02-08 07:52:35 +00:00
<p>
<button type="submit" name="sub" class="inb delete"><?php __("Delete the checked users"); ?></button>
</p>
</form>
<?php
} else {
$msg->raise("INFO", "mysql", _("You have no sql user at the moment."));
echo $msg->msg_html_all();
}
?>
<p>
<span class="ina add"><a href="sql_users_add.php"><?php __("Create a new MySQL user"); ?></a></span>
</p>
2009-09-08 05:29:38 +00:00
<?php include_once("foot.php"); ?>