diff options
author | Rouslan Placella <rouslan@placella.com> | 2012-05-12 20:44:51 +0400 |
---|---|---|
committer | Rouslan Placella <rouslan@placella.com> | 2012-05-13 03:02:59 +0400 |
commit | 843fce6b5a677d91b2776ed596ac5a12ab6a36ec (patch) | |
tree | c9485147ebe293c959c9268bad8ef22063c7ca87 /sql.php | |
parent | 791c08bef3f08b1f0c13681799c72dd89948b6eb (diff) |
Moved generation of print summary for queries to sql.php - allows better reuse of header_printview.inc.php
Diffstat (limited to 'sql.php')
-rw-r--r-- | sql.php | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -910,6 +910,33 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) { } if (isset($printview) && $printview == '1') { include_once 'libraries/header_printview.inc.php'; + + $hostname = ''; + if ($cfg['Server']['verbose']) { + $hostname = $cfg['Server']['verbose']; + } else { + $hostname = $cfg['Server']['host']; + if (! empty($cfg['Server']['port'])) { + $hostname .= $cfg['Server']['port']; + } + } + + $versions = "phpMyAdmin " . PMA_VERSION; + $versions .= " / "; + $versions .= "MySQL " . PMA_MYSQL_STR_VERSION; + + echo "<h1>" . __('SQL result') . "</h1>"; + echo "<p>"; + echo "<strong>" . __('Host') . ":</strong> $hostname<br />"; + echo "<strong>" . __('Database') . ":</strong> " . htmlspecialchars($db) . "<br />"; + echo "<strong>" . __('Generation Time') . ":</strong> " . PMA_localisedDate() . "<br />"; + echo "<strong>" . __('Generated by') . ":</strong> $versions<br />"; + echo "<strong>" . __('SQL query') . ":</strong> " . htmlspecialchars($full_sql_query) . ";"; + if (isset($num_rows)) { + echo "<br />"; + echo "<strong>" . __('Rows') . ":</strong> $num_rows"; + } + echo "</p>"; } else { $GLOBALS['js_include'][] = 'functions.js'; |