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-06-17 23:33:04 +0400
committerRouslan Placella <rouslan@placella.com>2012-10-31 00:04:51 +0400
commit61fac554d6148049d30a44f7a639cc22fb4fe913 (patch)
treed1d1c970e536ec55aa1e7058a36b1bee884a3028 /server_status.php
parentee84dffda6b567bbb53b8bc20e077d2c798b69bd (diff)
Got rid of inline JS on server_status.php
Diffstat (limited to 'server_status.php')
-rw-r--r--server_status.php52
1 files changed, 17 insertions, 35 deletions
diff --git a/server_status.php b/server_status.php
index 1b2c3cd42e..75072f4c04 100644
--- a/server_status.php
+++ b/server_status.php
@@ -784,41 +784,23 @@ $server_db_isLocal = strtolower($cfg['Server']['host']) == 'localhost'
|| $cfg['Server']['host'] == '127.0.0.1'
|| $cfg['Server']['host'] == '::1';
-PMA_addJSVar(
- 'pma_token',
- $_SESSION[' PMA_token ']
-);
-PMA_addJSVar(
- 'url_query',
- str_replace('&amp;', '&', PMA_generate_common_url($db))
-);
-PMA_addJSVar(
- 'server_time_diff',
- 'new Date().getTime() - ' . (microtime(true) * 1000),
- false
-);
-PMA_addJSVar(
- 'server_os',
- PHP_OS
-);
-PMA_addJSVar(
- 'is_superuser',
- PMA_isSuperuser()
-);
-PMA_addJSVar(
- 'server_db_isLocal',
- $server_db_isLocal
-);
-PMA_addJSVar(
- 'profiling_docu',
- PMA_Util::showMySQLDocu(
- 'general-thread-states', 'general-thread-states'
- )
-);
-PMA_addJSVar(
- 'explain_docu',
- PMA_Util::showMySQLDocu('explain-output', 'explain-output')
-);
+$input = '<input type="hidden" name="%s" value="%s" />';
+
+echo '<form id="js_data" class="hide">';
+printf($input, 'pma_token', $_SESSION[' PMA_token ']);
+printf($input, 'url_query', str_replace('&amp;', '&', PMA_generate_common_url($db)));
+printf($input, 'server_time_diff', 'new Date().getTime() - ' . (microtime(true) * 1000));
+printf($input, 'server_os', PHP_OS);
+printf($input, 'is_superuser', PMA_isSuperuser());
+printf($input, 'server_db_isLocal', $server_db_isLocal);
+echo '</form>';
+
+echo '<div id="profiling_docu" class="hide">';
+echo $common_functions->showMySQLDocu('general-thread-states', 'general-thread-states');
+echo '</div>';
+echo '<div id="explain_docu" class="hide">';
+echo $common_functions->showMySQLDocu('explain-output', 'explain-output');
+echo '</div>';
/**
* start output