26 require_once(
"../class/config.php");
28 "confirm" => array (
"post",
"string",
""),
32 if (isset($confirm) && ($confirm==
"y")) {
34 while (list(
$key,
$val)=each($_POST)) {
35 if (substr(
$key,0,4)==
"del_") {
37 if($mysql->del_user(
$val)) {
38 $msg->raise(
"INFO",
"mysql", _(
"The user '%s' has been successfully deleted"),
$val);
42 include(
"sql_users_list.php");
46 include_once(
"head.php");
49 <h3><?php
__(
"MySQL users"); ?></h3>
52 <p
class=
"alert alert-warning"><?php
__(
"WARNING"); ?></big><br /><?php
__(
"Confirm the deletion of the following MySQL users"); ?><br />
54 <form method=
"post" action=
"sql_users_del.php" id=
"main">
57 <input type=
"hidden" name=
"confirm" value=
"y" />
61 while (list(
$key,
$val)=each($_POST)) {
62 if (substr(
$key,0,4)==
"del_") {
63 echo
"<li><input type=\"hidden\" name=\"".ehe(
$key,
false).
"\" value=\"".
ehe(
$val,
false).
"\" /><b>".
ehe(
$val,
false).
"</b></li>\n";
69 <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()" />
72 <?php include_once("foot.php"); ?>
ehe($str, $display=TRUE)
Echo the HTMLSpecialChars version of a value.
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
$fields
Delete a MySQL user account.
if(empty($_POST['key'])||empty($_POST['val'])) $key