1) { $html .= '
'; } return $html; } /** * Returns the html for binary log information. * * @param Array $url_params links parameters * * @return string */ function PMA_getLogInfo($url_params) { /** * Need to find the real end of rows? */ if (! isset($_REQUEST['pos'])) { $pos = 0; } else { /* We need this to be a integer */ $pos = (int) $_REQUEST['pos']; } $sql_query = 'SHOW BINLOG EVENTS'; if (! empty($_REQUEST['log'])) { $sql_query .= ' IN \'' . $_REQUEST['log'] . '\''; } $sql_query .= ' LIMIT ' . $pos . ', ' . (int) $GLOBALS['cfg']['MaxRows']; /** * Sends the query */ $result = $GLOBALS['dbi']->query($sql_query); /** * prepare some vars for displaying the result table */ // Gets the list of fields properties if (isset($result) && $result) { $num_rows = $GLOBALS['dbi']->numRows($result); } else { $num_rows = 0; } if (empty($_REQUEST['dontlimitchars'])) { $dontlimitchars = false; } else { $dontlimitchars = true; $url_params['dontlimitchars'] = 1; } //html output $html = PMA_Util::getMessage(PMA_Message::success(), $sql_query); $html .= '| '; $html .= PMA_getNavigationRow($url_params, $pos, $num_rows, $dontlimitchars); $html .= ' | ' . '|||||
| ' . __('Log name') . ' | ' . '' . __('Position') . ' | ' . '' . __('Event type') . ' | ' . '' . __('Server ID') . ' | ' . '' . __('Original position') . ' | ' . '' . __('Information') . ' | ' . '
|---|---|---|---|---|---|
';
// 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'];
$html .= ' - ';
} else {
$html .= '>' . _pgettext('Next page', 'Next');
} // end if... else...
$html .= ' > ';
}
return $html;
}
/**
* Returns the html for all binary log items.
*
* @param resource $result MySQL Query result
* @param bool $dontlimitchars Whether limit chars
*
* @return string
*/
function PMA_getAllLogItemInfo($result, $dontlimitchars)
{
$html = "";
$odd_row = true;
while ($value = $GLOBALS['dbi']->fetchAssoc($result)) {
$html .= '