From cfa3c5c7b14dc0e3667b2add09e6d2c317c11453 Mon Sep 17 00:00:00 2001 From: Dieter Adriaenssens Date: Mon, 10 Sep 2012 18:13:10 +0200 Subject: [PATCH] remove mixed php and html --- server_binlog.php | 98 ++++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/server_binlog.php b/server_binlog.php index 873c3da3e7..b387daffb6 100644 --- a/server_binlog.php +++ b/server_binlog.php @@ -123,12 +123,11 @@ echo $common_functions->getMessage(PMA_Message::success()); /** * Displays the page */ -?> - - - - ' + . '' + . ' - - - - - - - - - - - -' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . ''; + $odd_row = true; while ($value = PMA_DBI_fetch_assoc($result)) { - if (! $dontlimitchars && PMA_strlen($value['Info']) > $GLOBALS['cfg']['LimitChars']) { - $value['Info'] = PMA_substr($value['Info'], 0, $GLOBALS['cfg']['LimitChars']) . '...'; + if (! $dontlimitchars + && PMA_strlen($value['Info']) > $GLOBALS['cfg']['LimitChars'] + ) { + $value['Info'] = PMA_substr( + $value['Info'], 0, $GLOBALS['cfg']['LimitChars'] + ) . '...'; } - ?> - - - - - - - - - ' + . '' + . '' + . '' + . '' + . '' + . '' + . ''; + $odd_row = !$odd_row; } -?> - -
-' + . '
'; + // we do not now how much rows are in the binlog // so we can just force 'NEXT' button if ($pos > 0) { @@ -153,27 +152,24 @@ if ($pos > 0) { } if ($dontlimitchars) { unset($this_url_params['dontlimitchars']); - ?> - - <?php echo __('Truncate Shown Queries'); ?> - ' + . ''; } else { $this_url_params['dontlimitchars'] = 1; - ?> - - <?php echo __('Show Full Queries'); ?> - ' + . ''; } // we do not now how much rows are in the binlog // so we can just force 'NEXT' button if ($num_rows >= $GLOBALS['cfg']['MaxRows']) { $this_url_params = $url_params; $this_url_params['pos'] = $pos + $GLOBALS['cfg']['MaxRows']; - echo ' - '; } else { @@ -181,37 +177,43 @@ if ($num_rows >= $GLOBALS['cfg']['MaxRows']) { } // end if... else... echo ' > '; } -?> -
' . __('Log name') . '' . __('Position') . '' . __('Event type') . '' . __('Server ID') . '' . __('Original position') . '' . __('Information') . '
            
 ' . $value['Log_name'] . '  ' . $value['Pos'] . '  ' . $value['Event_type'] . '  ' . $value['Server_id'] . '  ' + . (isset($value['Orig_log_pos']) + ? $value['Orig_log_pos'] : $value['End_log_pos']) + . '  ' . htmlspecialchars($value['Info']) . ' 
+echo '' + . '';