PMA\libraries\controllers\server\ServerBinlogController::_getLogInfo PHP Метод

_getLogInfo() приватный Метод

Returns the html for binary log information.
private _getLogInfo ( array $url_params ) : string
$url_params array links parameters
Результат string
    private function _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 . ', ' . intval($GLOBALS['cfg']['MaxRows']);
        /**
         * Sends the query
         */
        $result = $this->dbi->query($sql_query);
        /**
         * prepare some vars for displaying the result table
         */
        // Gets the list of fields properties
        if (isset($result) && $result) {
            $num_rows = $this->dbi->numRows($result);
        } else {
            $num_rows = 0;
        }
        if (empty($_REQUEST['dontlimitchars'])) {
            $dontlimitchars = false;
        } else {
            $dontlimitchars = true;
            $url_params['dontlimitchars'] = 1;
        }
        //html output
        $html = Util::getMessage(Message::success(), $sql_query);
        $html .= '<table id="binlogTable">' . '<thead>' . '<tr>' . '<td colspan="6" class="center">';
        $html .= $this->_getNavigationRow($url_params, $pos, $num_rows, $dontlimitchars);
        $html .= '</td>' . '</tr>' . '<tr>' . '<th>' . __('Log name') . '</th>' . '<th>' . __('Position') . '</th>' . '<th>' . __('Event type') . '</th>' . '<th>' . __('Server ID') . '</th>' . '<th>' . __('Original position') . '</th>' . '<th>' . __('Information') . '</th>' . '</tr>' . '</thead>' . '<tbody>';
        $html .= $this->_getAllLogItemInfo($result, $dontlimitchars);
        $html .= '</tbody>' . '</table>';
        return $html;
    }