query($sql); $plugins = array(); while ($row = $GLOBALS['dbi']->fetchAssoc($res)) { $plugins[$row['plugin_type']][] = $row; } $GLOBALS['dbi']->freeResult($res); ksort($plugins); return $plugins; } /** * Returns the html for plugin Tab. * * @param Array $plugins list * * @return string */ function PMA_getPluginTab($plugins) { $html = '
'; $html .= ''; $html .= '
'; foreach ($plugins as $plugin_type => $plugin_list) { $key = 'plugins-' . preg_replace('/[^a-z]/', '', /*overload*/mb_strtolower($plugin_type)); sort($plugin_list); $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= ''; $html .= PMA_getPluginList($plugin_list); $html .= ''; $html .= '
'; $html .= htmlspecialchars($plugin_type); $html .= '
' . __('Plugin') . '' . __('Description') . '' . __('Version') . '' . __('Author') . '' . __('License') . '
'; } $html .= '
'; return $html; } /** * Returns the html for plugin List. * * @param Array $plugin_list list * * @return string */ function PMA_getPluginList($plugin_list) { $html = ""; $odd_row = false; foreach ($plugin_list as $plugin) { $odd_row = !$odd_row; $html .= ''; $html .= ''; $html .= htmlspecialchars($plugin['plugin_name']); if (! $plugin['is_active']) { $html .= ' ' . __('disabled') . ''; } $html .= ''; $html .= '' . htmlspecialchars($plugin['plugin_description']) . ''; $html .= '' . htmlspecialchars($plugin['plugin_type_version']) . ''; $html .= '' . htmlspecialchars($plugin['plugin_author']) . ''; $html .= '' . htmlspecialchars($plugin['plugin_license']) . ''; $html .= ''; } return $html; }