multi table printview

This commit is contained in:
Marc Delisle
2001-12-05 19:01:40 +00:00
parent 5096589d6e
commit b0b61e293e
3 changed files with 64 additions and 0 deletions

View File

@@ -8,6 +8,8 @@ $Source$
2001-12-05 Marc Delisle <lem9@users.sourceforge.net>
* lang/norwegian.inc.php3 updates thanks to Sven-Erik Andersen
* Documentation.html: faq entry about safe mode and uploads
* db_details.php3, tbl_printview.php3: patch 484112,
thanks to Christophe Gesch<63> (moosh_fr at sourceforge.net)
2001-12-04 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* config.inc.php3; Documentation.html; left.php3;

View File

@@ -450,6 +450,27 @@ if ($num_tables > 0) {
<!-- Printable view of a table -->
<li>
<div style="margin-bottom: 10px"><a href="db_printview.php3?<?php echo $url_query; ?>"><?php echo $strPrintView; ?></a></div>
<?php // Add by Moosh
?>
<FORM method="post" action="tbl_printview.php3?lang=<?php echo $lang; ?>&server=<?php echo $server; ?>&db=<?php echo $db; ?>&goto=db_details.php3" >
<select name="tables[]" size="5" multiple="multiple">
<?php
$i = 0;
echo "\n";
while ($i < $num_tables) {
$table = ((PMA_MYSQL_INT_VERSION >= 32300) ?
$tables[$i]['Name'] : $tables[$i]);
echo ' <option value="' . $table . '">' . $table . '</option>' . "\n";
$i++;
}
echo "</select>";
echo "<input type=\"submit\" value=\"" . $GLOBALS['strGo'] . "\" />";
echo "</FORM>";
// end of Add by Moosh
?>
</li>
<?php
}

View File

@@ -24,6 +24,33 @@ $err_url = 'tbl_properties.php3'
*/
mysql_select_db($db);
// add by Moosh
if (is_array($tables))
{ $lesTables =$tables;
} else
{ if (isset($tables))
{ $lesTables = explode("|",$tables);
}
if (isset($table))
{ $lesTables[] = $table;
}
}
$multiTable = 0;
if (sizeof($lesTables)> 1)
{ $multiTable = 1;
while ( list( $key, $table ) = each($lesTables))
{ echo '['.$table. ']';
}
}
reset($lesTables);
while ( list( $key, $table ) = each($lesTables))
{
if ($multiTable) echo '<div style="page-break-after:
always;"><H1>'.$table. '</H1>';
//end of add by Moosh
/**
* Gets table informations
@@ -447,6 +474,20 @@ if ($cfgShowStats) {
} // end if (PMA_MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE)
} // end if ($cfgShowStats)
//ajout Moosh
if ($multiTable)
{ //nettoyer les valeurs
unset($ret_keys);
unset($num_rows);
unset($show_comment);
echo '</DIV><HR>';
}
}
//fin ajout Moosh
/**
* Displays the footer