コード例 #1
0
/**
 * Returns the html for plugin Tab.
 *
 * @param Array $plugins list
 *
 * @return string
 */
function PMA_getPluginTab($plugins)
{
    $html = '<div id="plugins_plugins">';
    $html .= '<div id="sectionlinks">';
    foreach ($plugins as $plugin_type => $plugin_list) {
        $key = 'plugins-' . preg_replace('/[^a-z]/', '', mb_strtolower($plugin_type));
        $html .= '<a href="#' . $key . '">' . htmlspecialchars($plugin_type) . '</a>' . "\n";
    }
    $html .= '</div>';
    $html .= '<br />';
    foreach ($plugins as $plugin_type => $plugin_list) {
        $key = 'plugins-' . preg_replace('/[^a-z]/', '', mb_strtolower($plugin_type));
        sort($plugin_list);
        $html .= '<table class="data_full_width" id="' . $key . '">';
        $html .= '<caption class="tblHeaders">';
        $html .= htmlspecialchars($plugin_type);
        $html .= '</caption>';
        $html .= '<thead>';
        $html .= '<tr>';
        $html .= '<th>' . __('Plugin') . '</th>';
        $html .= '<th>' . __('Description') . '</th>';
        $html .= '<th>' . __('Version') . '</th>';
        $html .= '<th>' . __('Author') . '</th>';
        $html .= '<th>' . __('License') . '</th>';
        $html .= '</tr>';
        $html .= '</thead>';
        $html .= '<tbody>';
        $html .= PMA_getPluginList($plugin_list);
        $html .= '</tbody>';
        $html .= '</table>';
    }
    $html .= '</div>';
    return $html;
}
コード例 #2
0
/**
 * Returns the html for plugin Tab.
 *
 * @param Array $plugins list
 *
 * @return string
 */
function PMA_getPluginTab($plugins)
{
    $html = '<div id="plugins_plugins">';
    $html .= '<div id="sectionlinks">';
    /** @var PMA_String $pmaString */
    $pmaString = $GLOBALS['PMA_String'];
    foreach ($plugins as $plugin_type => $plugin_list) {
        $key = 'plugins-' . preg_replace('/[^a-z]/', '', $pmaString->strtolower($plugin_type));
        $html .= '<a href="#' . $key . '">' . htmlspecialchars($plugin_type) . '</a>' . "\n";
    }
    $html .= '</div>';
    $html .= '<br />';
    foreach ($plugins as $plugin_type => $plugin_list) {
        $key = 'plugins-' . preg_replace('/[^a-z]/', '', $pmaString->strtolower($plugin_type));
        sort($plugin_list);
        $html .= '<table class="data_full_width" id="' . $key . '">';
        $html .= '<caption class="tblHeaders">';
        $html .= '<a class="top" href="#serverinfo">';
        $html .= __('Begin');
        $html .= PMA_Util::getImage('s_asc.png');
        $html .= '</a>';
        $html .= htmlspecialchars($plugin_type);
        $html .= '</caption>';
        $html .= '<thead>';
        $html .= '<tr>';
        $html .= '<th>' . __('Plugin') . '</th>';
        $html .= '<th>' . __('Module') . '</th>';
        $html .= '<th>' . __('Library') . '</th>';
        $html .= '<th>' . __('Version') . '</th>';
        $html .= '<th>' . __('Author') . '</th>';
        $html .= '<th>' . __('License') . '</th>';
        $html .= '</tr>';
        $html .= '</thead>';
        $html .= '<tbody>';
        $html .= PMA_getPluginList($plugin_list);
        $html .= '</tbody>';
        $html .= '</table>';
    }
    $html .= '</div>';
    return $html;
}