sorry, wrong version checked in
[phpmyadmin/arisferyanto.git] / server_binlog.php
blobb86475aa737e1274072a0d24a8ab892cdc99ce60
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
5 require_once('./libraries/common.lib.php');
7 /**
8 * Does the common work
9 */
10 require_once('./server_common.inc.php');
13 /**
14 * Displays the links
16 require('./server_links.inc.php');
19 /**
20 * Displays the sub-page heading
22 echo '<h2>' . "\n"
23 . ($cfg['MainPageIconic'] ? '<img src="' . $pmaThemeImage . 's_process.png" width="16" height="16" border="0" hspace="2" align="middle" />' : '' )
24 . ' ' . $strBinaryLog . "\n"
25 . '</h2>' . "\n";
27 if (!isset($log)) $log = '';
29 /**
30 * Display log selector.
32 if (count($binary_logs) > 1) {
33 echo '<p><form action="server_binlog.php" method="get">';
34 echo PMA_generate_common_hidden_inputs();
35 echo $strSelectBinaryLog . ': ';
36 echo '<select name="log">';
37 foreach($binary_logs as $name) {
38 echo '<option value="' . $name . '"' . ($name == $log ? ' selected="selected"' : '') . '>' . $name . '</option>';
40 echo '</select>';
41 echo '<input type="submit" value="' . $strGo . '" />';
42 echo '</form><br /></p>';
46 $sql_query = 'SHOW BINLOG EVENTS';
47 if (!empty($log)) $sql_query .= ' IN \'' . $log . '\'';
49 /**
50 * Sends the query and buffers the result
52 $serverProcesses = array();
53 $res = PMA_DBI_query($sql_query);
54 while ($row = PMA_DBI_fetch_assoc($res)) {
55 $serverProcesses[] = $row;
57 @PMA_DBI_free_result($res);
58 unset($res);
59 unset($row);
61 PMA_showMessage($GLOBALS['strSuccess']);
64 /**
65 * Displays the page
68 <table border="0" cellpadding="2" cellspacing="1">
69 <tr>
70 <td colspan="6" align="center"><a href="./server_binlog.php?<?php echo $url_query . (!empty($log) ? '&amp;log=' . htmlspecialchars($log) : '' ) . (empty($full) ? '&amp;full=1' : ''); ?>" title="<?php echo empty($full) ? $strShowFullQueries : $strTruncateQueries; ?>"><img src="<?php echo $pmaThemeImage . 's_' . (empty($full) ? 'full' : 'partial'); ?>text.png" width="50" height="20" border="0" alt="<?php echo empty($full) ? $strShowFullQueries : $strTruncateQueries; ?>" /></a></td>
71 </tr>
72 <tr>
73 <th>&nbsp;<?php echo $strBinLogName; ?>&nbsp;</th>
74 <th>&nbsp;<?php echo $strBinLogPosition; ?>&nbsp;</th>
75 <th>&nbsp;<?php echo $strBinLogEventType; ?>&nbsp;</th>
76 <th>&nbsp;<?php echo $strBinLogServerId; ?>&nbsp;</th>
77 <th>&nbsp;<?php echo $strBinLogOriginalPosition; ?>&nbsp;</th>
78 <th>&nbsp;<?php echo $strBinLogInfo; ?>&nbsp;</th>
79 </tr>
80 <?php
81 $useBgcolorOne = TRUE;
82 foreach ($serverProcesses as $value) {
83 if (empty($full) && PMA_strlen($value['Info']) > $GLOBALS['cfg']['LimitChars']) {
84 $value['Info'] = PMA_substr($value['Info'], 0, $GLOBALS['cfg']['LimitChars']) . '...';
87 <tr>
88 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['Log_name']; ?>&nbsp;</td>
89 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo $value['Pos']; ?>&nbsp;</td>
90 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['Event_type']; ?>&nbsp;</td>
91 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo $value['Server_id']; ?>&nbsp;</td>
92 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo isset($value['Orig_log_pos']) ? $value['Orig_log_pos'] : $value['End_log_pos']; ?>&nbsp;</td>
93 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo htmlspecialchars($value['Info']); ?>&nbsp;</td>
94 </tr>
95 <?php
96 $useBgcolorOne = !$useBgcolorOne;
99 <?php
101 </table>
102 <?php
106 * Sends the footer
108 require_once('./footer.inc.php');