2006-04-26 14:59:28 +00:00
|
|
|
<?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
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
*/
|
2017-10-08 17:53:03 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete a MySQL user account
|
|
|
|
*
|
|
|
|
* @copyright AlternC-Team 2000-2017 https://alternc.com/
|
|
|
|
*/
|
|
|
|
|
2006-04-26 14:59:28 +00:00
|
|
|
require_once("../class/config.php");
|
2012-08-25 17:05:38 +00:00
|
|
|
$fields = array (
|
|
|
|
"confirm" => array ("post", "string", ""),
|
|
|
|
);
|
|
|
|
getFields($fields);
|
2016-05-20 12:21:47 +00:00
|
|
|
|
2012-05-16 15:33:04 +00:00
|
|
|
if (isset($confirm) && ($confirm=="y")) {
|
2006-04-26 14:59:28 +00:00
|
|
|
reset($_POST);
|
|
|
|
while (list($key,$val)=each($_POST)) {
|
|
|
|
if (substr($key,0,4)=="del_") {
|
|
|
|
// Effacement de la base $val
|
2017-08-15 17:51:04 +00:00
|
|
|
if($mysql->del_user($val)) {
|
2017-10-06 16:04:36 +00:00
|
|
|
$msg->raise("INFO", "mysql", _("The user '%s' has been successfully deleted"), $val);
|
2006-04-26 14:59:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
include("sql_users_list.php");
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2009-09-08 05:29:38 +00:00
|
|
|
include_once("head.php");
|
|
|
|
|
2006-04-26 14:59:28 +00:00
|
|
|
?>
|
|
|
|
<h3><?php __("MySQL users"); ?></h3>
|
2010-05-27 15:10:45 +00:00
|
|
|
<hr id="topbar"/>
|
2017-10-06 17:34:50 +00:00
|
|
|
<br />
|
2013-10-18 09:12:41 +00:00
|
|
|
<p class="alert alert-warning"><?php __("WARNING"); ?></big><br /><?php __("Confirm the deletion of the following MySQL users"); ?><br />
|
2006-04-26 14:59:28 +00:00
|
|
|
</p>
|
|
|
|
<form method="post" action="sql_users_del.php" id="main">
|
2016-05-20 12:21:47 +00:00
|
|
|
<?php csrf_get(); ?>
|
2006-04-26 14:59:28 +00:00
|
|
|
<p>
|
|
|
|
<input type="hidden" name="confirm" value="y" />
|
2017-08-15 17:51:04 +00:00
|
|
|
<ul>
|
2006-04-26 14:59:28 +00:00
|
|
|
<?php
|
|
|
|
reset($_POST);
|
|
|
|
while (list($key,$val)=each($_POST)) {
|
|
|
|
if (substr($key,0,4)=="del_") {
|
2017-08-15 17:51:04 +00:00
|
|
|
echo "<li><input type=\"hidden\" name=\"".ehe($key,false)."\" value=\"".ehe($val,false)."\" /><b>".ehe($val,false)."</b></li>\n";
|
2006-04-26 14:59:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
2017-08-15 17:51:04 +00:00
|
|
|
</ul>
|
2013-10-18 13:31:39 +00:00
|
|
|
<input type="submit" class="inb ok" name="sub" value="<?php __("Yes, delete the MySQL user"); ?>" /> <input type="button" class="inb cancel" name="non" value="<?php __("No, don't delete the MySQL user"); ?>" onclick="history.back()" />
|
2006-04-26 14:59:28 +00:00
|
|
|
</p>
|
|
|
|
</form>
|
2009-09-08 05:29:38 +00:00
|
|
|
<?php include_once("foot.php"); ?>
|