fixed bug #1431422 Safari: Print view prints blank page

This commit is contained in:
Sebastian Mendel
2006-02-20 14:19:56 +00:00
parent 3d83605027
commit f21826d64c
2 changed files with 72 additions and 70 deletions

View File

@@ -15,6 +15,8 @@ $Source$
- coding standards - coding standards
* js/querywindow.js, css/phpmyadmin.css.php: * js/querywindow.js, css/phpmyadmin.css.php:
- RFE #1433382 visulal feat. request for left bar - RFE #1433382 visulal feat. request for left bar
* sql.php:
- fixed bug #1431422 Safari: Print view prints blank page
2006-02-19 Marc Delisle <lem9@users.sourceforge.net> 2006-02-19 Marc Delisle <lem9@users.sourceforge.net>
* libraries/common.lib.php: re-establish previous error reporting mode * libraries/common.lib.php: re-establish previous error reporting mode

140
sql.php
View File

@@ -5,10 +5,10 @@
/** /**
* Gets some core libraries * Gets some core libraries
*/ */
require_once('./libraries/common.lib.php'); require_once './libraries/common.lib.php';
require_once('./libraries/tbl_indexes.lib.php'); require_once './libraries/tbl_indexes.lib.php';
require_once('./libraries/check_user_privileges.lib.php'); require_once './libraries/check_user_privileges.lib.php';
require_once('./libraries/bookmark.lib.php'); require_once './libraries/bookmark.lib.php';
/** /**
* Defines the url to return to in case of error in a sql statement * Defines the url to return to in case of error in a sql statement
@@ -25,7 +25,7 @@ if (!empty($goto)) {
if (empty($goto)) { if (empty($goto)) {
$goto = (! isset($table) || ! strlen($table)) ? $cfg['DefaultTabDatabase'] : $cfg['DefaultTabTable']; $goto = (! isset($table) || ! strlen($table)) ? $cfg['DefaultTabDatabase'] : $cfg['DefaultTabTable'];
$is_gotofile = TRUE; $is_gotofile = true;
} // end if } // end if
if (!isset($err_url)) { if (!isset($err_url)) {
$err_url = (!empty($back) ? $back : $goto) $err_url = (!empty($back) ? $back : $goto)
@@ -45,7 +45,7 @@ if (isset($fields['dbase'])) {
// Default to browse if no query set an we have table (needed for browsing from DefaultTabTable) // Default to browse if no query set an we have table (needed for browsing from DefaultTabTable)
if (!isset($sql_query) && isset($table) && isset($db)) { if (!isset($sql_query) && isset($table) && isset($db)) {
require_once('./libraries/bookmark.lib.php'); require_once './libraries/bookmark.lib.php';
$book_sql_query = PMA_queryBookmarks($db, $GLOBALS['cfg']['Bookmark'], '\'' . PMA_sqlAddslashes($table) . '\'', 'label'); $book_sql_query = PMA_queryBookmarks($db, $GLOBALS['cfg']['Bookmark'], '\'' . PMA_sqlAddslashes($table) . '\'', 'label');
if (!empty($book_sql_query)) { if (!empty($book_sql_query)) {
$sql_query = $book_sql_query; $sql_query = $book_sql_query;
@@ -73,7 +73,7 @@ if (!defined('PMA_CHK_DROP')
&& !$cfg['AllowUserDropDatabase'] && !$cfg['AllowUserDropDatabase']
&& $is_drop_database && $is_drop_database
&& !$is_superuser) { && !$is_superuser) {
require_once('./libraries/header.inc.php'); require_once './libraries/header.inc.php';
PMA_mysqlDie($strNoDropDatabases, '', '', $err_url); PMA_mysqlDie($strNoDropDatabases, '', '', $err_url);
} // end if } // end if
@@ -83,7 +83,7 @@ if (!defined('PMA_CHK_DROP')
*/ */
if (isset($find_real_end) && $find_real_end) { if (isset($find_real_end) && $find_real_end) {
$unlim_num_rows = PMA_countRecords($db, $table, TRUE, TRUE); $unlim_num_rows = PMA_countRecords($db, $table, true, true);
$pos = @((ceil($unlim_num_rows / $session_max_rows) - 1) * $session_max_rows); $pos = @((ceil($unlim_num_rows / $session_max_rows) - 1) * $session_max_rows);
} }
/** /**
@@ -157,14 +157,14 @@ if ($is_select) {
if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name'])) { if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name'])) {
$table = $analyzed_sql[0]['table_ref'][0]['table_true_name']; $table = $analyzed_sql[0]['table_ref'][0]['table_true_name'];
} }
if ( isset($analyzed_sql[0]['table_ref'][0]['db']) if (isset($analyzed_sql[0]['table_ref'][0]['db'])
&& strlen($analyzed_sql[0]['table_ref'][0]['db']) ) { && strlen($analyzed_sql[0]['table_ref'][0]['db'])) {
$db = $analyzed_sql[0]['table_ref'][0]['db']; $db = $analyzed_sql[0]['table_ref'][0]['db'];
} else { } else {
$db = $prev_db; $db = $prev_db;
} }
// Nijel: don't change reload, if we already decided to reload in import // Nijel: don't change reload, if we already decided to reload in import
if ( empty( $reload ) ) { if (empty($reload)) {
$reload = ($db == $prev_db) ? 0 : 1; $reload = ($db == $prev_db) ? 0 : 1;
} }
} }
@@ -173,7 +173,7 @@ if ($is_select) {
* Sets or modifies the $goto variable if required * Sets or modifies the $goto variable if required
*/ */
if ($goto == 'sql.php') { if ($goto == 'sql.php') {
$is_gotofile = FALSE; $is_gotofile = false;
$goto = 'sql.php?' $goto = 'sql.php?'
. PMA_generate_common_url($db, $table) . PMA_generate_common_url($db, $table)
. '&amp;pos=' . $pos . '&amp;pos=' . $pos
@@ -189,11 +189,11 @@ if (isset($btnDrop) && $btnDrop == $strNo) {
$goto = $back; $goto = $back;
} }
if ($is_gotofile) { if ($is_gotofile) {
if (strpos(' ' . $goto, 'db_details') == 1 && isset($table) && strlen($table) ) { if (strpos(' ' . $goto, 'db_details') == 1 && isset($table) && strlen($table)) {
unset($table); unset($table);
} }
$active_page = $goto; $active_page = $goto;
require('./' . PMA_securePath($goto)); require './' . PMA_securePath($goto);
} else { } else {
PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . str_replace('&amp;', '&', $goto)); PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . str_replace('&amp;', '&', $goto));
} }
@@ -246,7 +246,7 @@ if ($do_confirm) {
<?php <?php
echo '<fieldset class="confirmation">' . "\n" echo '<fieldset class="confirmation">' . "\n"
.' <legend>' . $strDoYouReally . '</legend>' .' <legend>' . $strDoYouReally . '</legend>'
.' <tt>' . htmlspecialchars( $stripped_sql_query ) . '</tt>' . "\n" .' <tt>' . htmlspecialchars($stripped_sql_query) . '</tt>' . "\n"
.'</fieldset>' . "\n" .'</fieldset>' . "\n"
.'<fieldset class="tblFooters">' . "\n"; .'<fieldset class="tblFooters">' . "\n";
?> ?>
@@ -296,7 +296,7 @@ else {
// TODO: detect all this with the parser, to avoid problems finding // TODO: detect all this with the parser, to avoid problems finding
// those strings in comments or backquoted identifiers // those strings in comments or backquoted identifiers
$is_explain = $is_count = $is_export = $is_delete = $is_insert = $is_affected = $is_show = $is_maint = $is_analyse = $is_group = $is_func = FALSE; $is_explain = $is_count = $is_export = $is_delete = $is_insert = $is_affected = $is_show = $is_maint = $is_analyse = $is_group = $is_func = false;
if ($is_select) { // see line 141 if ($is_select) { // see line 141
$is_group = preg_match('@(GROUP[[:space:]]+BY|HAVING|SELECT[[:space:]]+DISTINCT)[[:space:]]+@i', $sql_query); $is_group = preg_match('@(GROUP[[:space:]]+BY|HAVING|SELECT[[:space:]]+DISTINCT)[[:space:]]+@i', $sql_query);
$is_func = !$is_group && (preg_match('@[[:space:]]+(SUM|AVG|STD|STDDEV|MIN|MAX|BIT_OR|BIT_AND)\s*\(@i', $sql_query)); $is_func = !$is_group && (preg_match('@[[:space:]]+(SUM|AVG|STD|STDDEV|MIN|MAX|BIT_OR|BIT_AND)\s*\(@i', $sql_query));
@@ -304,19 +304,19 @@ else {
$is_export = (preg_match('@[[:space:]]+INTO[[:space:]]+OUTFILE[[:space:]]+@i', $sql_query)); $is_export = (preg_match('@[[:space:]]+INTO[[:space:]]+OUTFILE[[:space:]]+@i', $sql_query));
$is_analyse = (preg_match('@[[:space:]]+PROCEDURE[[:space:]]+ANALYSE@i', $sql_query)); $is_analyse = (preg_match('@[[:space:]]+PROCEDURE[[:space:]]+ANALYSE@i', $sql_query));
} elseif (preg_match('@^EXPLAIN[[:space:]]+@i', $sql_query)) { } elseif (preg_match('@^EXPLAIN[[:space:]]+@i', $sql_query)) {
$is_explain = TRUE; $is_explain = true;
} elseif (preg_match('@^DELETE[[:space:]]+@i', $sql_query)) { } elseif (preg_match('@^DELETE[[:space:]]+@i', $sql_query)) {
$is_delete = TRUE; $is_delete = true;
$is_affected = TRUE; $is_affected = true;
} elseif (preg_match('@^(INSERT|LOAD[[:space:]]+DATA|REPLACE)[[:space:]]+@i', $sql_query)) { } elseif (preg_match('@^(INSERT|LOAD[[:space:]]+DATA|REPLACE)[[:space:]]+@i', $sql_query)) {
$is_insert = TRUE; $is_insert = true;
$is_affected = TRUE; $is_affected = true;
} elseif (preg_match('@^UPDATE[[:space:]]+@i', $sql_query)) { } elseif (preg_match('@^UPDATE[[:space:]]+@i', $sql_query)) {
$is_affected = TRUE; $is_affected = true;
} elseif (preg_match('@^SHOW[[:space:]]+@i', $sql_query)) { } elseif (preg_match('@^SHOW[[:space:]]+@i', $sql_query)) {
$is_show = TRUE; $is_show = true;
} elseif (preg_match('@^(CHECK|ANALYZE|REPAIR|OPTIMIZE)[[:space:]]+TABLE[[:space:]]+@i', $sql_query)) { } elseif (preg_match('@^(CHECK|ANALYZE|REPAIR|OPTIMIZE)[[:space:]]+TABLE[[:space:]]+@i', $sql_query)) {
$is_maint = TRUE; $is_maint = true;
} }
// Do append a "LIMIT" clause? // Do append a "LIMIT" clause?
@@ -353,7 +353,7 @@ else {
// If the query is a DELETE query with no WHERE clause, get the number of // If the query is a DELETE query with no WHERE clause, get the number of
// rows that will be deleted (mysql_affected_rows will always return 0 in // rows that will be deleted (mysql_affected_rows will always return 0 in
// this case) // this case)
// Note: testing shows that this no longer applies since MySQL 4.0.x // Note: testing shows that this no longer applies since MySQL 4.0.x
if (PMA_MYSQL_INT_VERSION < 40000) { if (PMA_MYSQL_INT_VERSION < 40000) {
if ($is_delete if ($is_delete
@@ -376,20 +376,19 @@ else {
unset($result); unset($result);
$num_rows = 0; $num_rows = 0;
} else { } else {
// garvin: Measure query time. TODO-Item http://sourceforge.net/tracker/index.php?func=detail&aid=571934&group_id=23067&atid=377411 // garvin: Measure query time.
list($usec, $sec) = explode(' ', microtime()); // TODO-Item http://sourceforge.net/tracker/index.php?func=detail&aid=571934&group_id=23067&atid=377411
$querytime_before = ((float)$usec + (float)$sec); $querytime_before = array_sum(explode(' ', microtime()));
$result = @PMA_DBI_try_query($full_sql_query, null, PMA_DBI_QUERY_STORE); $result = @PMA_DBI_try_query($full_sql_query, null, PMA_DBI_QUERY_STORE);
list($usec, $sec) = explode(' ', microtime()); $querytime_after = array_sum(explode(' ', microtime()));
$querytime_after = ((float)$usec + (float)$sec);
$GLOBALS['querytime'] = $querytime_after - $querytime_before; $GLOBALS['querytime'] = $querytime_after - $querytime_before;
// Displays an error message if required and stop parsing the script // Displays an error message if required and stop parsing the script
if ($error = PMA_DBI_getError()) { if ($error = PMA_DBI_getError()) {
require_once('./libraries/header.inc.php'); require_once './libraries/header.inc.php';
$full_err_url = (preg_match('@^(db_details|tbl_properties)@', $err_url)) $full_err_url = (preg_match('@^(db_details|tbl_properties)@', $err_url))
? $err_url . '&amp;show_query=1&amp;sql_query=' . urlencode($sql_query) ? $err_url . '&amp;show_query=1&amp;sql_query=' . urlencode($sql_query)
: $err_url; : $err_url;
@@ -443,7 +442,7 @@ else {
// is not quick on large InnoDB tables // is not quick on large InnoDB tables
// but do not count again if we did it previously // but do not count again if we did it previously
// due to $find_real_end == TRUE // due to $find_real_end == true
if (!$is_group if (!$is_group
&& !isset($analyzed_sql[0]['queryflags']['union']) && !isset($analyzed_sql[0]['queryflags']['union'])
@@ -454,7 +453,7 @@ else {
) { ) {
// "j u s t b r o w s i n g" // "j u s t b r o w s i n g"
$unlim_num_rows = PMA_countRecords($db, $table, TRUE); $unlim_num_rows = PMA_countRecords($db, $table, true);
} else { // n o t " j u s t b r o w s i n g " } else { // n o t " j u s t b r o w s i n g "
@@ -465,10 +464,10 @@ else {
if (isset($analyzed_sql[0]['queryflags']['distinct'])) { if (isset($analyzed_sql[0]['queryflags']['distinct'])) {
$count_what = 'DISTINCT '; $count_what = 'DISTINCT ';
$first_expr = TRUE; $first_expr = true;
foreach ($analyzed_sql[0]['select_expr'] as $part) { foreach ($analyzed_sql[0]['select_expr'] as $part) {
$count_what .= (!$first_expr ? ', ' : '') . $part['expr']; $count_what .= (!$first_expr ? ', ' : '') . $part['expr'];
$first_expr = FALSE; $first_expr = false;
} }
} else { } else {
$count_what = '*'; $count_what = '*';
@@ -561,8 +560,8 @@ else {
// count from the latest query that worked) // count from the latest query that worked)
// //
// another case where the count_query is wrong: // another case where the count_query is wrong:
// SELECT COUNT( * ), f1 from t1 group by f1 // SELECT COUNT(*), f1 from t1 group by f1
// and you click to sort on count( * ) // and you click to sort on count(*)
// } // }
$cnt_all_result = PMA_DBI_query('SELECT FOUND_ROWS() as count;'); $cnt_all_result = PMA_DBI_query('SELECT FOUND_ROWS() as count;');
list($unlim_num_rows) = PMA_DBI_fetch_row($cnt_all_result); list($unlim_num_rows) = PMA_DBI_fetch_row($cnt_all_result);
@@ -576,7 +575,7 @@ else {
// garvin: if a table or database gets dropped, check column comments. // garvin: if a table or database gets dropped, check column comments.
if (isset($purge) && $purge == '1') { if (isset($purge) && $purge == '1') {
require_once('./libraries/relation_cleanup.lib.php'); require_once './libraries/relation_cleanup.lib.php';
if (isset($table) && isset($db) && strlen($table) && strlen($db)) { if (isset($table) && isset($db) && strlen($table) && strlen($db)) {
PMA_relationsCleanupTable($db, $table); PMA_relationsCleanupTable($db, $table);
@@ -589,9 +588,9 @@ else {
// garvin: If a column gets dropped, do relation magic. // garvin: If a column gets dropped, do relation magic.
if (isset($cpurge) && $cpurge == '1' && isset($purgekey) if (isset($cpurge) && $cpurge == '1' && isset($purgekey)
&& isset($db) && isset($table) && isset($db) && isset($table)
&& strlen($db) && strlen($table) && !empty($purgekey)) { && strlen($db) && strlen($table) && !empty($purgekey)) {
require_once('./libraries/relation_cleanup.lib.php'); require_once './libraries/relation_cleanup.lib.php';
PMA_relationsCleanupColumn($db, $table, $purgekey); PMA_relationsCleanupColumn($db, $table, $purgekey);
} // end if column PMA_* purge } // end if column PMA_* purge
@@ -640,12 +639,12 @@ else {
if (isset($db) && $db == '') { if (isset($db) && $db == '') {
unset($db); unset($db);
} }
$is_db = $is_table = FALSE; $is_db = $is_table = false;
if (strpos(' ' . $goto, 'tbl_properties') == 1) { if (strpos(' ' . $goto, 'tbl_properties') == 1) {
if (!isset($table)) { if (!isset($table)) {
$goto = 'db_details.php'; $goto = 'db_details.php';
} else { } else {
$is_table = @PMA_DBI_query('SHOW TABLES LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\';', null, PMA_DBI_QUERY_STORE); $is_table = @PMA_DBI_query('SHOW TABLES LIKE \'' . PMA_sqlAddslashes($table, true) . '\';', null, PMA_DBI_QUERY_STORE);
if (!($is_table && @PMA_DBI_num_rows($is_table))) { if (!($is_table && @PMA_DBI_num_rows($is_table))) {
$goto = 'db_details.php'; $goto = 'db_details.php';
unset($table); unset($table);
@@ -673,10 +672,10 @@ else {
$js_to_run = 'functions.js'; $js_to_run = 'functions.js';
} }
if ($goto != 'main.php') { if ($goto != 'main.php') {
require_once('./libraries/header.inc.php'); require_once './libraries/header.inc.php';
} }
$active_page = $goto; $active_page = $goto;
require('./' . $goto); require './' . $goto;
} else { } else {
PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . str_replace('&amp;', '&', $goto) . '&message=' . urlencode($message)); PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . str_replace('&amp;', '&', $goto) . '&message=' . urlencode($message));
} // end else } // end else
@@ -690,26 +689,26 @@ else {
unset($show_query); unset($show_query);
} }
if (isset($printview) && $printview == '1') { if (isset($printview) && $printview == '1') {
require_once('./libraries/header_printview.inc.php'); require_once './libraries/header_printview.inc.php';
} else { } else {
$js_to_run = 'functions.js'; $js_to_run = 'functions.js';
unset($message); unset($message);
if (isset($table) && strlen($table)) { if (isset($table) && strlen($table)) {
require('./libraries/tbl_properties_common.php'); require './libraries/tbl_properties_common.php';
$url_query .= '&amp;goto=tbl_properties.php&amp;back=tbl_properties.php'; $url_query .= '&amp;goto=tbl_properties.php&amp;back=tbl_properties.php';
require('./libraries/tbl_properties_table_info.inc.php'); require './libraries/tbl_properties_table_info.inc.php';
require('./libraries/tbl_properties_links.inc.php'); require './libraries/tbl_properties_links.inc.php';
} elseif (isset($db) && strlen($db)) { } elseif (isset($db) && strlen($db)) {
require('./libraries/db_details_common.inc.php'); require './libraries/db_details_common.inc.php';
require('./libraries/db_details_db_info.inc.php'); require './libraries/db_details_db_info.inc.php';
} else { } else {
require('./libraries/server_common.inc.php'); require './libraries/server_common.inc.php';
require('./libraries/server_links.inc.php'); require './libraries/server_links.inc.php';
} }
} }
if (isset($db) && strlen($db)) { if (isset($db) && strlen($db)) {
require_once('./libraries/relation.lib.php'); require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam(); $cfgRelation = PMA_getRelationsParam();
} }
@@ -720,7 +719,7 @@ else {
} }
// Display previous update query (from tbl_replace) // Display previous update query (from tbl_replace)
if (isset($disp_query) && $cfg['ShowSQL'] == TRUE) { if (isset($disp_query) && $cfg['ShowSQL'] == true) {
$tmp_sql_query = $GLOBALS['sql_query']; $tmp_sql_query = $GLOBALS['sql_query'];
$GLOBALS['sql_query'] = $disp_query; $GLOBALS['sql_query'] = $disp_query;
PMA_showMessage($disp_message); PMA_showMessage($disp_message);
@@ -728,7 +727,7 @@ else {
} }
// Displays the results in a table // Displays the results in a table
require_once('./libraries/display_tbl.lib.php'); require_once './libraries/display_tbl.lib.php';
if (empty($disp_mode)) { if (empty($disp_mode)) {
// see the "PMA_setDisplayMode()" function in // see the "PMA_setDisplayMode()" function in
// libraries/display_tbl.lib.php // libraries/display_tbl.lib.php
@@ -739,7 +738,7 @@ else {
} }
// hide edit and delete links for information_schema // hide edit and delete links for information_schema
if ( PMA_MYSQL_INT_VERSION >= 50002 && isset($db) && $db == 'information_schema' ) { if (PMA_MYSQL_INT_VERSION >= 50002 && isset($db) && $db == 'information_schema') {
$disp_mode = 'nnnn110111'; $disp_mode = 'nnnn110111';
} }
@@ -797,7 +796,7 @@ else {
echo PMA_linkOrButton( echo PMA_linkOrButton(
'tbl_change.php' . $url_query, 'tbl_change.php' . $url_query,
($cfg['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 'b_insrow.png" height="16" width="16" alt="' . $strInsertNewRow . '"/>' : '') . $strInsertNewRow, ($cfg['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 'b_insrow.png" height="16" width="16" alt="' . $strInsertNewRow . '"/>' : '') . $strInsertNewRow,
'', TRUE, TRUE, '') . "\n"; '', true, true, '') . "\n";
if ($disp_mode[9] == '1') { if ($disp_mode[9] == '1') {
echo '&nbsp;&nbsp;'; echo '&nbsp;&nbsp;';
@@ -819,14 +818,14 @@ else {
echo PMA_linkOrButton( echo PMA_linkOrButton(
'sql.php' . $url_query . ((isset($dontlimitchars) && $dontlimitchars == '1') ? '&amp;dontlimitchars=1' : ''), 'sql.php' . $url_query . ((isset($dontlimitchars) && $dontlimitchars == '1') ? '&amp;dontlimitchars=1' : ''),
($cfg['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 'b_print.png" height="16" width="16" alt="' . $strPrintView . '"/>' : '') . $strPrintView, ($cfg['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 'b_print.png" height="16" width="16" alt="' . $strPrintView . '"/>' : '') . $strPrintView,
'', TRUE, TRUE, 'print_view') . "\n"; '', true, true, 'print_view') . "\n";
if (!$dontlimitchars) { if (!$dontlimitchars) {
echo ' &nbsp;&nbsp;' . "\n"; echo ' &nbsp;&nbsp;' . "\n";
echo PMA_linkOrButton( echo PMA_linkOrButton(
'sql.php' . $url_query . '&amp;dontlimitchars=1', 'sql.php' . $url_query . '&amp;dontlimitchars=1',
($cfg['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 'b_print.png" height="16" width="16" alt="' . $strPrintViewFull . '"/>' : '') . $strPrintViewFull, ($cfg['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 'b_print.png" height="16" width="16" alt="' . $strPrintViewFull . '"/>' : '') . $strPrintViewFull,
'', TRUE, TRUE, 'print_view') . "\n"; '', true, true, 'print_view') . "\n";
} }
} // end displays "printable view" } // end displays "printable view"
@@ -848,12 +847,12 @@ else {
echo PMA_linkOrButton( echo PMA_linkOrButton(
'tbl_properties_export.php' . $url_query . '&amp;unlim_num_rows=' . $unlim_num_rows . $single_table, 'tbl_properties_export.php' . $url_query . '&amp;unlim_num_rows=' . $unlim_num_rows . $single_table,
($cfg['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 'b_tblexport.png" height="16" width="16" alt="' . $strExport . '" />' : '') . $strExport, ($cfg['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 'b_tblexport.png" height="16" width="16" alt="' . $strExport . '" />' : '') . $strExport,
'', TRUE, TRUE, '') . "\n"; '', true, true, '') . "\n";
} }
// Bookmark Support if required // Bookmark Support if required
if ($disp_mode[7] == '1' if ($disp_mode[7] == '1'
&& ( isset( $cfg['Bookmark'] ) && $cfg['Bookmark']['db'] && $cfg['Bookmark']['table'] && empty($id_bookmark)) && (isset($cfg['Bookmark']) && $cfg['Bookmark']['db'] && $cfg['Bookmark']['table'] && empty($id_bookmark))
&& !empty($sql_query)) { && !empty($sql_query)) {
echo "\n"; echo "\n";
@@ -895,7 +894,7 @@ else {
<input type="checkbox" name="bkm_all_users" id="bkm_all_users" value="true" /> <input type="checkbox" name="bkm_all_users" id="bkm_all_users" value="true" />
<label for="bkm_all_users"><?php echo $strBookmarkAllUsers; ?></label> <label for="bkm_all_users"><?php echo $strBookmarkAllUsers; ?></label>
</div> </div>
<div class="clearfloat"></div> <div class="clearfloat"></div>
</fieldset> </fieldset>
<fieldset class="tblFooters"> <fieldset class="tblFooters">
@@ -907,25 +906,26 @@ else {
// Do print the page if required // Do print the page if required
if (isset($printview) && $printview == '1') { if (isset($printview) && $printview == '1') {
echo "\n";
?> ?>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
<!-- //<![CDATA[
// Do print the page // Do print the page
if (typeof(window.print) != 'undefined') { window.onload = function()
window.print(); {
if (typeof(window.print) != 'undefined') {
window.print();
}
} }
//--> //]]>
</script> </script>
<?php <?php
} // end print case } // end print case
} // end rows returned } // end rows returned
} // end executes the query } // end executes the query
echo "\n\n";
/** /**
* Displays the footer * Displays the footer
*/ */
require_once('./libraries/footer.inc.php'); require_once './libraries/footer.inc.php';
?> ?>