added a check/uncheck all feature
This commit is contained in:
@@ -10,7 +10,7 @@ $Source$
|
|||||||
start the split
|
start the split
|
||||||
* tbl_properties.php3, new tbl_properties_export.php3,
|
* tbl_properties.php3, new tbl_properties_export.php3,
|
||||||
tbl_properties_links.php3, lang/*.php3: export is splitted
|
tbl_properties_links.php3, lang/*.php3: export is splitted
|
||||||
* new tbl_properties_table_info.php3, to be able to display links
|
* new tbl_properties_table_info, to be able to display links
|
||||||
on the export page
|
on the export page
|
||||||
* new tbl_properties_operations.php3
|
* new tbl_properties_operations.php3
|
||||||
|
|
||||||
@@ -28,6 +28,7 @@ $Source$
|
|||||||
* tbl_qbe.php3, line 732: fixed again a warning.
|
* tbl_qbe.php3, line 732: fixed again a warning.
|
||||||
* tbl_addfield.php3; tbl_alter.php3: fixed bug #548495 - Alter table not
|
* tbl_addfield.php3; tbl_alter.php3: fixed bug #548495 - Alter table not
|
||||||
replicate.
|
replicate.
|
||||||
|
* db_stats.php3; libraries/functions.js: added a check/uncheck all feature.
|
||||||
|
|
||||||
2002-04-27 Marc Delisle <lem9@users.sourceforge.net>
|
2002-04-27 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* tbl_properties.php3, new tbl_properties_links.php3:
|
* tbl_properties.php3, new tbl_properties_links.php3:
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
/**
|
/**
|
||||||
* Gets the variables sent to this script and send headers
|
* Gets the variables sent to this script and send headers
|
||||||
*/
|
*/
|
||||||
|
$js_to_run = 'functions.js';
|
||||||
require('./libraries/grab_globals.lib.php3');
|
require('./libraries/grab_globals.lib.php3');
|
||||||
require('./header.inc.php3');
|
require('./header.inc.php3');
|
||||||
|
|
||||||
@@ -168,7 +169,7 @@ if ($num_dbs > 0) {
|
|||||||
$col = 3;
|
$col = 3;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<form action="db_stats.php3">
|
<form action="db_stats.php3" name="dbStatsForm">
|
||||||
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
|
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
|
||||||
<input type="hidden" name="server" value="<?php echo $server; ?>" />
|
<input type="hidden" name="server" value="<?php echo $server; ?>" />
|
||||||
|
|
||||||
@@ -249,6 +250,16 @@ if ($num_dbs > 0) {
|
|||||||
uksort($dbs_array, 'PMA_dbCmp');
|
uksort($dbs_array, 'PMA_dbCmp');
|
||||||
reset($dbs_array);
|
reset($dbs_array);
|
||||||
|
|
||||||
|
// Check/unchek all databases url
|
||||||
|
$checkall_url = 'db_stats.php3'
|
||||||
|
. '?lang=' . $lang
|
||||||
|
. '&server=' . $server
|
||||||
|
. (empty($sort_by) ? '' : '&sort_by=' . $sort_by)
|
||||||
|
. (empty($sort_order) ? '' : '&sort_order=' . $sort_order);
|
||||||
|
$do_check = (empty($checkall))
|
||||||
|
? ''
|
||||||
|
: ' checked="checked"';
|
||||||
|
|
||||||
// Displays the tables stats per database
|
// Displays the tables stats per database
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while (list($db_name, $db_prop) = each($dbs_array)) {
|
while (list($db_name, $db_prop) = each($dbs_array)) {
|
||||||
@@ -260,7 +271,7 @@ if ($num_dbs > 0) {
|
|||||||
|
|
||||||
echo ' <tr>' . "\n";
|
echo ' <tr>' . "\n";
|
||||||
echo ' <td align="center" bgcolor="'. $bgcolor . '">' . "\n";
|
echo ' <td align="center" bgcolor="'. $bgcolor . '">' . "\n";
|
||||||
echo ' <input type="checkbox" name="selected_db[]" value="' . urlencode($db_name) . '" /> ' . "\n";
|
echo ' <input type="checkbox" name="selected_db[]" value="' . urlencode($db_name) . '"' . $do_check . ' /> ' . "\n";
|
||||||
echo ' </td>' . "\n";
|
echo ' </td>' . "\n";
|
||||||
echo ' <td bgcolor="'. $bgcolor . '"> <a href="index.php3?lang=' . $lang . '&server=' . $server . '&db=' . urlencode($db_name) . '" target="_parent">' . htmlentities($db_name) . '</a> </td>' . "\n";
|
echo ' <td bgcolor="'. $bgcolor . '"> <a href="index.php3?lang=' . $lang . '&server=' . $server . '&db=' . urlencode($db_name) . '" target="_parent">' . htmlentities($db_name) . '</a> </td>' . "\n";
|
||||||
echo ' <td align="right" bgcolor="'. $bgcolor . '"> ' . $dbs_array[$db_name][0] . ' </td>' . "\n";
|
echo ' <td align="right" bgcolor="'. $bgcolor . '"> ' . $dbs_array[$db_name][0] . ' </td>' . "\n";
|
||||||
@@ -290,6 +301,12 @@ if ($num_dbs > 0) {
|
|||||||
echo ' <tr>' . "\n";
|
echo ' <tr>' . "\n";
|
||||||
echo ' <td colspan="6">' . "\n";
|
echo ' <td colspan="6">' . "\n";
|
||||||
echo ' <img src="./images/arrow_' . $text_dir . '.gif" border="0" width="38" height="22" alt="' . $strWithChecked . '" />' . "\n";
|
echo ' <img src="./images/arrow_' . $text_dir . '.gif" border="0" width="38" height="22" alt="' . $strWithChecked . '" />' . "\n";
|
||||||
|
echo ' <a href="' . $checkall_url . '&checkall=1" onclick="setCheckboxes(\'dbStatsForm\', true); return false;">' . "\n";
|
||||||
|
echo ' ' . $strCheckAll . '</a>' . "\n";
|
||||||
|
echo ' / ' . "\n";
|
||||||
|
echo ' <a href="' . $checkall_url . '" onclick="setCheckboxes(\'dbStatsForm\', false); return false;">' . "\n";
|
||||||
|
echo ' ' . $strUncheckAll . '</a>' . "\n";
|
||||||
|
echo ' ' . "\n";
|
||||||
echo ' <i>' . $strWithChecked . '</i> <input type="submit" name="submit_mult" value="' . $strDrop . '" />' . "\n";
|
echo ' <i>' . $strWithChecked . '</i> <input type="submit" name="submit_mult" value="' . $strDrop . '" />' . "\n";
|
||||||
echo ' </td>' . "\n";
|
echo ' </td>' . "\n";
|
||||||
echo ' </tr>' . "\n";
|
echo ' </tr>' . "\n";
|
||||||
|
@@ -420,7 +420,9 @@ function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerCol
|
|||||||
*/
|
*/
|
||||||
function setCheckboxes(the_form, do_check)
|
function setCheckboxes(the_form, do_check)
|
||||||
{
|
{
|
||||||
var elts = document.forms[the_form].elements['selected_tbl[]'];
|
var elts = (typeof(document.forms[the_form].elements['selected_db[]']) != 'undefined')
|
||||||
|
? document.forms[the_form].elements['selected_db[]']
|
||||||
|
: document.forms[the_form].elements['selected_tbl[]'];
|
||||||
var elts_cnt = (typeof(elts.length) != 'undefined')
|
var elts_cnt = (typeof(elts.length) != 'undefined')
|
||||||
? elts.length
|
? elts.length
|
||||||
: 0;
|
: 0;
|
||||||
|
Reference in New Issue
Block a user