Documentation TYPO3 par Ameos |
00001 <?php 00002 /* $Id: server_binlog.php,v 2.4 2005/02/26 23:16:59 nijel Exp $ */ 00003 // vim: expandtab sw=4 ts=4 sts=4: 00004 00005 00009 require_once('./server_common.inc.php'); 00010 00011 00015 require('./server_links.inc.php'); 00016 00017 00021 echo '<h2>' . "\n" 00022 . ($cfg['MainPageIconic'] ? '<img src="' . $pmaThemeImage . 's_process.png" width="16" height="16" border="0" hspace="2" align="middle" />' : '' ) 00023 . ' ' . $strBinaryLog . "\n" 00024 . '</h2>' . "\n"; 00025 00026 if (!isset($log)) $log = ''; 00027 00031 if (count($binary_logs) > 1) { 00032 echo '<p><form action="server_binlog.php" method="get">'; 00033 echo PMA_generate_common_hidden_inputs(); 00034 echo $strSelectBinaryLog . ': '; 00035 echo '<select name="log">'; 00036 foreach($binary_logs as $name) { 00037 echo '<option value="' . $name . '"' . ($name == $log ? ' selected="selected"' : '') . '>' . $name . '</option>'; 00038 } 00039 echo '</select>'; 00040 echo '<input type="submit" value="' . $strGo . '" />'; 00041 echo '</form><br /></p>'; 00042 } 00043 00044 00045 $sql_query = 'SHOW BINLOG EVENTS'; 00046 if (!empty($log)) $sql_query .= ' IN \'' . $log . '\''; 00047 00051 $serverProcesses = array(); 00052 $res = PMA_DBI_query($sql_query); 00053 while ($row = PMA_DBI_fetch_assoc($res)) { 00054 $serverProcesses[] = $row; 00055 } 00056 @PMA_DBI_free_result($res); 00057 unset($res); 00058 unset($row); 00059 00060 PMA_showMessage($GLOBALS['strSuccess']); 00061 00062 00066 ?> 00067 <table border="0" cellpadding="2" cellspacing="1"> 00068 <tr> 00069 <td colspan="6" align="center"><a href="./server_binlog.php?<?php echo $url_query . (!empty($log) ? '&log=' . htmlspecialchars($log) : '' ) . (empty($full) ? '&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> 00070 </tr> 00071 <tr> 00072 <th> <?php echo $strBinLogName; ?> </th> 00073 <th> <?php echo $strBinLogPosition; ?> </th> 00074 <th> <?php echo $strBinLogEventType; ?> </th> 00075 <th> <?php echo $strBinLogServerId; ?> </th> 00076 <th> <?php echo $strBinLogOriginalPosition; ?> </th> 00077 <th> <?php echo $strBinLogInfo; ?> </th> 00078 </tr> 00079 <?php 00080 $useBgcolorOne = TRUE; 00081 foreach ($serverProcesses as $value) { 00082 if (empty($full) && PMA_strlen($value['Info']) > $GLOBALS['cfg']['LimitChars']) { 00083 $value['Info'] = PMA_substr($value['Info'], 0, $GLOBALS['cfg']['LimitChars']) . '...'; 00084 } 00085 ?> 00086 <tr> 00087 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo $value['Log_name']; ?> </td> 00088 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right"> <?php echo $value['Pos']; ?> </td> 00089 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo $value['Event_type']; ?> </td> 00090 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right"> <?php echo $value['Server_id']; ?> </td> 00091 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right"> <?php echo isset($value['Orig_log_pos']) ? $value['Orig_log_pos'] : $value['End_log_pos']; ?> </td> 00092 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo htmlspecialchars($value['Info']); ?> </td> 00093 </tr> 00094 <?php 00095 $useBgcolorOne = !$useBgcolorOne; 00096 } 00097 ?> 00098 <?php 00099 ?> 00100 </table> 00101 <?php 00102 00103 00107 require_once('./footer.inc.php'); 00108 00109 ?>