26 require_once(
"../class/config.php");
27 include_once (
"head.php");
30 "confirm" => array (
"post",
"string",
""),
37 while (list(
$key,
$val)=each($_POST)) {
38 if (substr(
$key,0,4)==
"del_") {
40 $r=$mysql->del_db(substr(
$key,4));
42 $msg->raise(
"INFO",
"mysql", _(
"The database '%s' has been successfully deleted"),
$val);
46 include(
"sql_list.php");
53 if (substr(
$key,0,4)==
"del_") {
58 $msg->raise(
"ALERT",
"mysql", _(
"Please check which databases you want to delete"));
59 include(
"sql_list.php");
64 <h3><?php
__(
"MySQL Databases"); ?></h3>
67 <p
class=
"alert alert-warning"><?php
__(
"WARNING"); ?></big><br /><?php
__(
"Confirm the deletion of the following SQL databases"); ?><br />
68 <?php
__(
"This will delete all the tables currently in those db."); ?></p>
69 <form method=
"post" action=
"sql_del.php" id=
"main">
72 <input type=
"hidden" name=
"confirm" value=
"y" />
75 while (list(
$key,
$val)=each($_POST)) {
76 if (substr(
$key,0,4)==
"del_") {
77 echo
"<input type=\"hidden\" name=\"".ehe(
$key,
false).
"\" value=\"".
ehe(
$val,
false).
"\" /><ul><li><b>".
ehe(
$val,
false).
"</b></li></ul>\n";
83 <input type=
"submit" class=
"inb ok" name=
"sub" value=
"<?php __("Yes,
delete the database
"); ?>" /> <input type=
"button" class=
"inb cancel" name=
"non" value=
"<?php __("No, don
't delete the database"); ?>" onclick="history.back()" />
86 <?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 MySQL databases for the account.
if(empty($_POST['key'])||empty($_POST['val'])) $key