bug #1234616, minor theme text color issue
[phpmyadmin/crack.git] / server_binlog.php
blob2bd6a5c712e14c2ad5402e4658a815f30d334969
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * Does the common work
8 */
9 require_once('./server_common.inc.php');
12 /**
13 * Displays the links
15 require('./server_links.inc.php');
18 /**
19 * Displays the sub-page heading
21 echo '<h2>' . "\n"
22 . ($cfg['MainPageIconic'] ? '<img src="' . $pmaThemeImage . 's_process.png" width="16" height="16" border="0" hspace="2" align="middle" />' : '' )
23 . ' ' . $strBinaryLog . "\n"
24 . '</h2>' . "\n";
26 if (!isset($log)) $log = '';
28 /**
29 * Display log selector.
31 if (count($binary_logs) > 1) {
32 echo '<p><form action="server_binlog.php" method="get">';
33 echo PMA_generate_common_hidden_inputs();
34 echo $strSelectBinaryLog . ': ';
35 echo '<select name="log">';
36 foreach($binary_logs as $name) {
37 echo '<option value="' . $name . '"' . ($name == $log ? ' selected="selected"' : '') . '>' . $name . '</option>';
39 echo '</select>';
40 echo '<input type="submit" value="' . $strGo . '" />';
41 echo '</form><br /></p>';
45 $sql_query = 'SHOW BINLOG EVENTS';
46 if (!empty($log)) $sql_query .= ' IN \'' . $log . '\'';
48 /**
49 * Sends the query and buffers the result
51 $serverProcesses = array();
52 $res = PMA_DBI_query($sql_query);
53 while ($row = PMA_DBI_fetch_assoc($res)) {
54 $serverProcesses[] = $row;
56 @PMA_DBI_free_result($res);
57 unset($res);
58 unset($row);
60 PMA_showMessage($GLOBALS['strSuccess']);
63 /**
64 * Displays the page
67 <table border="0" cellpadding="2" cellspacing="1">
68 <tr>
69 <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>
70 </tr>
71 <tr>
72 <th>&nbsp;<?php echo $strBinLogName; ?>&nbsp;</th>
73 <th>&nbsp;<?php echo $strBinLogPosition; ?>&nbsp;</th>
74 <th>&nbsp;<?php echo $strBinLogEventType; ?>&nbsp;</th>
75 <th>&nbsp;<?php echo $strBinLogServerId; ?>&nbsp;</th>
76 <th>&nbsp;<?php echo $strBinLogOriginalPosition; ?>&nbsp;</th>
77 <th>&nbsp;<?php echo $strBinLogInfo; ?>&nbsp;</th>
78 </tr>
79 <?php
80 $useBgcolorOne = TRUE;
81 foreach ($serverProcesses as $value) {
82 if (empty($full) && PMA_strlen($value['Info']) > $GLOBALS['cfg']['LimitChars']) {
83 $value['Info'] = PMA_substr($value['Info'], 0, $GLOBALS['cfg']['LimitChars']) . '...';
86 <tr>
87 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['Log_name']; ?>&nbsp;</td>
88 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo $value['Pos']; ?>&nbsp;</td>
89 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['Event_type']; ?>&nbsp;</td>
90 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo $value['Server_id']; ?>&nbsp;</td>
91 <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>
92 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo htmlspecialchars($value['Info']); ?>&nbsp;</td>
93 </tr>
94 <?php
95 $useBgcolorOne = !$useBgcolorOne;
98 <?php
100 </table>
101 <?php
105 * Sends the footer
107 require_once('./footer.inc.php');