Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRouslan Placella <rouslan@placella.com>2012-05-12 20:44:51 +0400
committerRouslan Placella <rouslan@placella.com>2012-05-13 03:02:59 +0400
commit843fce6b5a677d91b2776ed596ac5a12ab6a36ec (patch)
treec9485147ebe293c959c9268bad8ef22063c7ca87 /sql.php
parent791c08bef3f08b1f0c13681799c72dd89948b6eb (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.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/sql.php b/sql.php
index 53b5a9276d..4499b2e175 100644
--- a/sql.php
+++ b/sql.php
@@ -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&nbsp;" . PMA_VERSION;
+ $versions .= "&nbsp;/&nbsp;";
+ $versions .= "MySQL&nbsp;" . 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';