From bdc6c87e4c94e5dfaac50e288314dc5adaeaf687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Sun, 2 Sep 2001 22:30:39 +0000 Subject: [PATCH] moved the work for multiple queries in the 'mult_drops.inc.php3' library --- db_stats.php3 | 76 ++++++--------------------------------------------- 1 file changed, 9 insertions(+), 67 deletions(-) diff --git a/db_stats.php3 b/db_stats.php3 index 305e97775..8d8a05041 100644 --- a/db_stats.php3 +++ b/db_stats.php3 @@ -5,76 +5,18 @@ * Gets the variables sent to this script and send headers */ require('./grab_globals.inc.php3'); -$js_to_run = 'functions.js'; require('./header.inc.php3'); -/* ---------------- The user requires some db to be dropped ---------------- */ +/** + * Drop databases if required + */ +if (!empty($submit_mult) || isset($btnDrop)) { + $action = 'db_stats.php3'; + $show_query = 'y'; + include('./mult_drops.inc.php3'); +} -if (!empty($submit) || isset($btnDrop)) { - - /** - * Confirmation form - */ - if (!empty($submit) && !empty($selected_db)) { - - // 1.1 Builds the query - $full_query = ''; - $drop_cnt = count($selected_db); - for ($i = 0; $i < $drop_cnt; $i++) { - $full_query .= 'DROP DATABASE ' . backquote(htmlspecialchars(urldecode($selected_db[$i]))) . ';
'; - } - - // 1.2 Displays the form - echo $strDoYouReally . ' :
' . "\n"; - echo '' . $full_query . ' ?
' . "\n"; - ?> -
- - - ' . "\n"; - } - ?> - - -
- - - 0) { echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . $strWithChecked . '' . "\n"; - echo ' ' . $strWithChecked . '  ' . "\n"; + echo ' ' . $strWithChecked . '  ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n";