patch #1120466, optional column names on pdf schema scratchboard

This commit is contained in:
Marc Delisle
2005-02-22 03:26:06 +00:00
parent abd90b29d8
commit 1edf8c0906
2 changed files with 13 additions and 3 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2005-02-21 Marc Delisle <lem9@users.sourceforge.net>
* pdf_pages.php: patch #1120466 (modified): optional column names
in visual scratchboard, thanks to Remco Aalbers - remcoa
2005-02-17 Marc Delisle <lem9@users.sourceforge.net>
* header.inc.php, queryframe.php: HTML improvement,
thanks to Armel Fauveau

View File

@@ -301,6 +301,9 @@ while ($temp_sh_page = @PMA_DBI_fetch_assoc($page_rs)) {
// garvin: Display WYSIWYG-PDF parts?
if ($cfg['WYSIWYG-PDF']) {
if (!isset($_POST['with_field_names']) && !isset($_POST['showwysiwyg'])) {
$with_field_names = TRUE;
}
?>
<script type="text/javascript" src="./libraries/dom-drag.js"></script>
<form method="post" action="pdf_pages.php" name="dragdrop">
@@ -330,8 +333,10 @@ foreach ($array_sh_page AS $key => $temp_sh_page) {
$fields_cnt = PMA_DBI_num_rows($fields_rs);
echo '<div id="table_' . $i . '" class="pdflayout_table"><u>' . $temp_sh_page['table_name'] . '</u>';
while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
echo '<br />' . htmlspecialchars($row['Field']) . "\n";
if (isset($with_field_names)) {
while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
echo '<br />' . htmlspecialchars($row['Field']) . "\n";
}
}
echo '</div>' . "\n";
PMA_DBI_free_result($fields_rs);
@@ -439,6 +444,7 @@ function resetDrag() {
echo "\n" . ' <input type="hidden" name="c_table_rows" value="' . ($i + 1) . '" />';
echo ($cfg['WYSIWYG-PDF'] ? "\n" . ' <input type="hidden" name="showwysiwyg" value="' . ((isset($showwysiwyg) && $showwysiwyg == '1') ? '1' : '0') . '" />' : '');
echo "\n" . ' <input type="checkbox" name="with_field_names" ' . (isset($with_field_names) ? 'checked="checked"' : ''). ' />' . $strColumnNames . '<br />';
echo "\n" . ' <input type="submit" value="' . $strGo . '" />';
echo "\n" . '</form>' . "\n\n";
} // end if
@@ -483,7 +489,7 @@ function resetDrag() {
<?php echo PMA_generate_common_hidden_inputs($db); ?>
<input type="hidden" name="pdf_page_number" value="<?php echo $chpage; ?>" />
<?php echo $strDisplayPDF; ?>:&nbsp;<br />
<?php echo '<br /><b>' . $strDisplayPDF . '</b>'; ?>:&nbsp;<br />
<input type="checkbox" name="show_grid" id="show_grid_opt" /><label for="show_grid_opt"><?php echo $strShowGrid; ?></label><br />
<input type="checkbox" name="show_color" id="show_color_opt" checked="checked" /><label for="show_color_opt"><?php echo $strShowColor; ?></label><br />
<input type="checkbox" name="show_table_dimension" id="show_table_dim_opt" /><label for="show_table_dim_opt"><?php echo $strShowTableDimension; ?></label><br />