Merge pull request #405 from xmujay/0604_server_plugins

refactor server_plugins.php:
This commit is contained in:
Marc Delisle 2013-06-07 09:48:06 -07:00
commit c859dddbde
6 changed files with 451 additions and 354 deletions

View File

@ -12,22 +12,6 @@ if (! defined('PHPMYADMIN')) {
exit;
}
/**
* Returns the html for the sub-page heading
*
* @param null
*
* @return string
*/
function PMA_getSubPageHeader()
{
$html = '<h2>' . "\n"
. PMA_Util::getImage('s_tbl.png')
. ' ' . __('Binary log') . "\n"
. '</h2>' . "\n";
return $html;
}
/**
* Returns the html for log selector.
*
@ -39,48 +23,48 @@ function PMA_getSubPageHeader()
*/
function PMA_getLogSelector($binary_log_file_names, $url_params)
{
$html = "";
if (count($binary_log_file_names) > 1) {
$html .= '<form action="server_binlog.php" method="get">';
$html .= PMA_generate_common_hidden_inputs($url_params);
$html .= '<fieldset><legend>';
$html .= __('Select binary log to view');
$html .= '</legend><select name="log">';
$full_size = 0;
foreach ($binary_log_file_names as $each_log) {
$html .= '<option value="' . $each_log['Log_name'] . '"';
if ($each_log['Log_name'] == $_REQUEST['log']) {
$html .= ' selected="selected"';
}
$html .= '>' . $each_log['Log_name'];
if (isset($each_log['File_size'])) {
$full_size += $each_log['File_size'];
$html .= ' ('
. implode(
' ',
PMA_Util::formatByteDown(
$each_log['File_size'], 3, 2
)
)
. ')';
}
$html .= '</option>';
}
$html .= '</select> ';
$html .= count($binary_log_file_names) . ' ' . __('Files') . ', ';
if ($full_size > 0) {
$html .= implode(
' ', PMA_Util::formatByteDown($full_size)
);
}
$html .= '</fieldset>';
$html .= '<fieldset class="tblFooters">';
$html .= '<input type="submit" value="' . __('Go') . '" />';
$html .= '</fieldset>';
$html .= '</form>';
}
return $html;
$html = "";
if (count($binary_log_file_names) > 1) {
$html .= '<form action="server_binlog.php" method="get">';
$html .= PMA_generate_common_hidden_inputs($url_params);
$html .= '<fieldset><legend>';
$html .= __('Select binary log to view');
$html .= '</legend><select name="log">';
$full_size = 0;
foreach ($binary_log_file_names as $each_log) {
$html .= '<option value="' . $each_log['Log_name'] . '"';
if ($each_log['Log_name'] == $_REQUEST['log']) {
$html .= ' selected="selected"';
}
$html .= '>' . $each_log['Log_name'];
if (isset($each_log['File_size'])) {
$full_size += $each_log['File_size'];
$html .= ' ('
. implode(
' ',
PMA_Util::formatByteDown(
$each_log['File_size'], 3, 2
)
)
. ')';
}
$html .= '</option>';
}
$html .= '</select> ';
$html .= count($binary_log_file_names) . ' ' . __('Files') . ', ';
if ($full_size > 0) {
$html .= implode(
' ', PMA_Util::formatByteDown($full_size)
);
}
$html .= '</fieldset>';
$html .= '<fieldset class="tblFooters">';
$html .= '<input type="submit" value="' . __('Go') . '" />';
$html .= '</fieldset>';
$html .= '</form>';
}
return $html;
}
/**
@ -94,74 +78,74 @@ function PMA_getLogSelector($binary_log_file_names, $url_params)
*/
function PMA_getLogInfo($binary_log_file_names, $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'] . '\'';
}
if ($GLOBALS['cfg']['MaxRows'] !== 'all') {
$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;
}
/**
* 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'] . '\'';
}
if ($GLOBALS['cfg']['MaxRows'] !== 'all') {
$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 .= '<table cellpadding="2" cellspacing="1" id="binlogTable">'
. '<thead>'
. '<tr>'
. '<td colspan="6" class="center">';
$html .= PMA_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 .= PMA_getAllLogItemInfo($result, $dontlimitchars);
$html .= '</tbody>'
. '</table>';
return $html;
//html output
$html = PMA_Util::getMessage(PMA_Message::success(), $sql_query);
$html .= '<table cellpadding="2" cellspacing="1" id="binlogTable">'
. '<thead>'
. '<tr>'
. '<td colspan="6" class="center">';
$html .= PMA_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 .= PMA_getAllLogItemInfo($result, $dontlimitchars);
$html .= '</tbody>'
. '</table>';
return $html;
}
/**
@ -179,60 +163,60 @@ function PMA_getLogInfo($binary_log_file_names, $url_params)
*/
function PMA_getNavigationRow($url_params, $pos, $num_rows, $dontlimitchars)
{
$html = "";
// we do not know how much rows are in the binlog
// so we can just force 'NEXT' button
if ($pos > 0) {
$this_url_params = $url_params;
if ($pos > $GLOBALS['cfg']['MaxRows']) {
$this_url_params['pos'] = $pos - $GLOBALS['cfg']['MaxRows'];
}
$html .= '<a href="server_binlog.php'
. PMA_generate_common_url($this_url_params) . '"';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$html .= ' title="' . _pgettext('Previous page', 'Previous') . '">';
} else {
$html .= '>' . _pgettext('Previous page', 'Previous');
} // end if... else...
$html .= ' &lt; </a> - ';
}
$this_url_params = $url_params;
if ($pos > 0) {
$this_url_params['pos'] = $pos;
}
if ($dontlimitchars) {
unset($this_url_params['dontlimitchars']);
$tempTitle = __('Truncate Shown Queries');
$tempImgMode = 'partial';
} else {
$this_url_params['dontlimitchars'] = 1;
$tempTitle = __('Show Full Queries');
$tempImgMode = 'full';
}
$html .= '<a href="server_binlog.php' . PMA_generate_common_url($this_url_params)
. '" title="' . $tempTitle . '">'
. '<img src="' .$GLOBALS['pmaThemeImage'] . 's_' . $tempImgMode . 'text.png"'
. 'alt="' . $tempTitle . '" /></a>';
// 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 .= ' - <a href="server_binlog.php'
. PMA_generate_common_url($this_url_params)
. '"';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$html .= ' title="' . _pgettext('Next page', 'Next') . '">';
} else {
$html .= '>' . _pgettext('Next page', 'Next');
} // end if... else...
$html .= ' &gt; </a>';
}
return $html;
$html = "";
// we do not know how much rows are in the binlog
// so we can just force 'NEXT' button
if ($pos > 0) {
$this_url_params = $url_params;
if ($pos > $GLOBALS['cfg']['MaxRows']) {
$this_url_params['pos'] = $pos - $GLOBALS['cfg']['MaxRows'];
}
$html .= '<a href="server_binlog.php'
. PMA_generate_common_url($this_url_params) . '"';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$html .= ' title="' . _pgettext('Previous page', 'Previous') . '">';
} else {
$html .= '>' . _pgettext('Previous page', 'Previous');
} // end if... else...
$html .= ' &lt; </a> - ';
}
$this_url_params = $url_params;
if ($pos > 0) {
$this_url_params['pos'] = $pos;
}
if ($dontlimitchars) {
unset($this_url_params['dontlimitchars']);
$tempTitle = __('Truncate Shown Queries');
$tempImgMode = 'partial';
} else {
$this_url_params['dontlimitchars'] = 1;
$tempTitle = __('Show Full Queries');
$tempImgMode = 'full';
}
$html .= '<a href="server_binlog.php' . PMA_generate_common_url($this_url_params)
. '" title="' . $tempTitle . '">'
. '<img src="' .$GLOBALS['pmaThemeImage'] . 's_' . $tempImgMode . 'text.png"'
. 'alt="' . $tempTitle . '" /></a>';
// 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 .= ' - <a href="server_binlog.php'
. PMA_generate_common_url($this_url_params)
. '"';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$html .= ' title="' . _pgettext('Next page', 'Next') . '">';
} else {
$html .= '>' . _pgettext('Next page', 'Next');
} // end if... else...
$html .= ' &gt; </a>';
}
return $html;
}
/**
@ -246,33 +230,33 @@ function PMA_getNavigationRow($url_params, $pos, $num_rows, $dontlimitchars)
*/
function PMA_getAllLogItemInfo($result, $dontlimitchars)
{
$html = "";
$odd_row = true;
while ($value = $GLOBALS['dbi']->fetchAssoc($result)) {
if (! $dontlimitchars
&& PMA_strlen($value['Info']) > $GLOBALS['cfg']['LimitChars']
) {
$value['Info'] = PMA_substr(
$value['Info'], 0, $GLOBALS['cfg']['LimitChars']
) . '...';
}
$html .= '<tr class="noclick ' . ($odd_row ? 'odd' : 'even') . '">'
. '<td>&nbsp;' . $value['Log_name'] . '&nbsp;</td>'
. '<td class="right">&nbsp;' . $value['Pos'] . '&nbsp;</td>'
. '<td>&nbsp;' . $value['Event_type'] . '&nbsp;</td>'
. '<td class="right">&nbsp;' . $value['Server_id'] . '&nbsp;</td>'
. '<td class="right">&nbsp;'
. (isset($value['Orig_log_pos'])
? $value['Orig_log_pos'] : $value['End_log_pos'])
. '&nbsp;</td>'
. '<td><code class="sql"><pre>&nbsp;' . htmlspecialchars($value['Info'])
. '&nbsp;</pre></code></td>'
. '</tr>';
$odd_row = !$odd_row;
}
return $html;
$html = "";
$odd_row = true;
while ($value = $GLOBALS['dbi']->fetchAssoc($result)) {
if (! $dontlimitchars
&& PMA_strlen($value['Info']) > $GLOBALS['cfg']['LimitChars']
) {
$value['Info'] = PMA_substr(
$value['Info'], 0, $GLOBALS['cfg']['LimitChars']
) . '...';
}
$html .= '<tr class="noclick ' . ($odd_row ? 'odd' : 'even') . '">'
. '<td>&nbsp;' . $value['Log_name'] . '&nbsp;</td>'
. '<td class="right">&nbsp;' . $value['Pos'] . '&nbsp;</td>'
. '<td>&nbsp;' . $value['Event_type'] . '&nbsp;</td>'
. '<td class="right">&nbsp;' . $value['Server_id'] . '&nbsp;</td>'
. '<td class="right">&nbsp;'
. (isset($value['Orig_log_pos'])
? $value['Orig_log_pos'] : $value['End_log_pos'])
. '&nbsp;</td>'
. '<td><code class="sql"><pre>&nbsp;' . htmlspecialchars($value['Info'])
. '&nbsp;</pre></code></td>'
. '</tr>';
$odd_row = !$odd_row;
}
return $html;
}
?>

View File

@ -39,20 +39,13 @@ if ($is_superuser && ! PMA_DRIZZLE) {
$GLOBALS['dbi']->selectDb('mysql', $userlink);
}
/**
* @global array binary log files
*/
$binary_logs = PMA_DRIZZLE
? null
: $GLOBALS['dbi']->fetchResult(
'SHOW MASTER LOGS',
'Log_name',
null,
null,
PMA_DatabaseInterface::QUERY_STORE
);
PMA_Util::checkParameters(
array('is_superuser', 'url_query'), false
);
/**
* shared functions for server page
*/
require_once './libraries/server_common.lib.php';
?>

View File

@ -0,0 +1,36 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Shared code for server pages
*
* @package PhpMyAdmin
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/**
* Returns the html for the sub-page heading
*
* @param string $type Sub page type
*
* @return string
*/
function PMA_getSubPageHeader($type)
{
$res = array();
$res['plugins']['icon'] = 'b_engine.png';
$res['plugins']['text'] = __('Plugins');
$res['binlog']['icon'] = 's_tbl.png';
$res['binlog']['text'] = __('Binary log');
$html = '<h2>' . "\n"
. PMA_Util::getImage($res[$type]['icon'])
. ' ' . $res[$type]['text'] . "\n"
. '</h2>' . "\n";
return $html;
}
?>

View File

@ -0,0 +1,199 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* functions for displaying server plugins
*
* @usedby server_plugins.php
*
* @package PhpMyAdmin
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/**
* Returns the html for plugin and module Info.
*
* @param Array $plugins Plugin list
*
* @param Array $modules Module list
*
* @return string
*/
function PMA_getPluginAndModuleInfo($plugins, $modules)
{
$html = '<script type="text/javascript">';
$html .= 'pma_theme_image = "' . $GLOBALS['pmaThemeImage'] . '"';
$html .= '</script>';
$html .= '<div id="pluginsTabs">';
$html .= '<ul>';
$html .= '<li><a href="#plugins_plugins">' . __('Plugins') . '</a></li>';
$html .= '<li><a href="#plugins_modules">' . __('Modules') . '</a></li>';
$html .= '</ul>';
$html .= PMA_getPluginTab($plugins);
$html .= PMA_getModuleTab($modules);
$html .= '</div>';
return $html;
}
/**
* 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]/', '', 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]/', '', 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;
}
/**
* 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 .= '<tr class="noclick ' . ($odd_row ? 'odd' : 'even') . '">';
$html .= '<th>' . htmlspecialchars($plugin['plugin_name']) . '</th>';
$html .= '<td>' . htmlspecialchars($plugin['module_name']) . '</td>';
$html .= '<td>' . htmlspecialchars($plugin['module_library']) . '</td>';
$html .= '<td>' . htmlspecialchars($plugin['module_version']) . '</td>';
$html .= '<td>' . htmlspecialchars($plugin['module_author']) . '</td>';
$html .= '<td>' . htmlspecialchars($plugin['module_license']) . '</td>';
$html .= '</tr>';
}
return $html;
}
/**
* Returns the html for Module Tab.
*
* @param Array $modules list
*
* @return string
*/
function PMA_getModuleTab($modules)
{
$html = '<div id="plugins_modules">';
$html .= '<table class="data_full_width">';
$html .= '<thead>';
$html .= '<tr>';
$html .= '<th>' . __('Module') . '</th>';
$html .= '<th>' . __('Description') . '</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_getModuleList($modules);
$html .= '</tbody>';
$html .= '</table>';
$html .= '</div>';
return $html;
}
/**
* Returns the html for module List.
*
* @param Array $modules list
*
* @return string
*/
function PMA_getModuleList($modules)
{
$html = "";
$odd_row = false;
foreach ($modules as $module_name => $module) {
$odd_row = !$odd_row;
$html .= '<tr class="noclick ' . ($odd_row ? 'odd' : 'even') . '">';
$html .= '<th rowspan="2">' . htmlspecialchars($module_name) . '</th>';
$html .= '<td>' . htmlspecialchars($module['info']['module_description']) . '</td>';
$html .= '<td>' . htmlspecialchars($module['info']['module_library']) . '</td>';
$html .= '<td>' . htmlspecialchars($module['info']['module_version']) . '</td>';
$html .= '<td>' . htmlspecialchars($module['info']['module_author']) . '</td>';
$html .= '<td>' . htmlspecialchars($module['info']['module_license']) . '</td>';
$html .= '</tr>';
$html .= '<tr class="noclick ' . ($odd_row ? 'odd' : 'even') . '">';
$html .= '<td colspan="5">';
$html .= '<table>';
$html .= '<tbody>';
foreach ($module['plugins'] as $plugin_type => $plugin_list) {
$html .= '<tr class="noclick">';
$html .= '<td><b class="plugin-type">'
. htmlspecialchars($plugin_type) . '</b></td>';
$html .= '<td>';
for ($i = 0; $i < count($plugin_list); $i++) {
$html .= ($i != 0 ? '<br />' : '')
. htmlspecialchars($plugin_list[$i]['plugin_name']);
if (!$plugin_list[$i]['is_active']) {
$html .= ' <small class="attention">' . __('disabled') . '</small>';
}
}
$html .= '</td>';
$html .= '</tr>';
}
$html .= '</tbody>';
$html .= '</table>';
$html .= '</td>';
$html .= '</tr>';
}
return $html;
}
?>

View File

@ -12,12 +12,24 @@
require_once 'libraries/common.inc.php';
/**
* Does the common work, provides $binary_logs
* Does the common work
*/
require_once 'libraries/server_common.inc.php';
require_once 'libraries/server_bin_log.lib.php';
/**
* array binary log files
*/
$binary_logs = PMA_DRIZZLE
? null
: $GLOBALS['dbi']->fetchResult(
'SHOW MASTER LOGS',
'Log_name',
null,
null,
PMA_DatabaseInterface::QUERY_STORE
);
if (! isset($_REQUEST['log'])
|| ! array_key_exists($_REQUEST['log'], $binary_logs)
@ -33,7 +45,7 @@ if (!empty($_REQUEST['dontlimitchars'])) {
$response = PMA_Response::getInstance();
$response->addHTML(PMA_getSubPageHeader());
$response->addHTML(PMA_getSubPageHeader('binlog'));
$response->addHTML(PMA_getLogSelector($binary_logs, $url_params));
$response->addHTML(PMA_getLogInfo($binary_logs, $url_params));

View File

@ -23,14 +23,7 @@ $scripts->addFile('server_plugins.js');
* Does the common work
*/
require 'libraries/server_common.inc.php';
/**
* Displays the sub-page heading
*/
echo '<h2>' . "\n"
. PMA_Util::getImage('b_engine.png')
. "\n" . __('Plugins') . "\n"
. '</h2>' . "\n";
require 'libraries/server_plugins.lib.php';
/**
* Prepare plugin list
@ -56,129 +49,9 @@ ksort($plugins);
/**
* Displays the page
*/
?>
<script type="text/javascript">
pma_theme_image = '<?php echo $GLOBALS['pmaThemeImage']; ?>';
</script>
<div id="pluginsTabs">
<ul>
<li><a href="#plugins_plugins"><?php echo __('Plugins'); ?></a></li>
<li><a href="#plugins_modules"><?php echo __('Modules'); ?></a></li>
</ul>
$response->addHTML(PMA_getSubPageHeader('plugins'));
$response->addHTML(PMA_getPluginAndModuleInfo($plugins, $modules));
<div id="plugins_plugins">
<div id="sectionlinks">
<?php
foreach ($plugins as $plugin_type => $plugin_list) {
$key = 'plugins-' . preg_replace('/[^a-z]/', '', strtolower($plugin_type));
echo '<a href="#' . $key . '">' . htmlspecialchars($plugin_type) . '</a>' . "\n";
}
?>
</div>
<br />
<?php
foreach ($plugins as $plugin_type => $plugin_list) {
$key = 'plugins-' . preg_replace('/[^a-z]/', '', strtolower($plugin_type));
sort($plugin_list);
?>
<table class="data_full_width" id="<?php echo $key; ?>">
<caption class="tblHeaders">
<a class="top" href="#serverinfo"><?php
echo __('Begin');
echo PMA_Util::getImage('s_asc.png');
?></a>
<?php echo htmlspecialchars($plugin_type); ?>
</caption>
<thead>
<tr>
<th><?php echo __('Plugin'); ?></th>
<th><?php echo __('Module'); ?></th>
<th><?php echo __('Library'); ?></th>
<th><?php echo __('Version'); ?></th>
<th><?php echo __('Author'); ?></th>
<th><?php echo __('License'); ?></th>
</tr>
</thead>
<tbody>
<?php
$odd_row = false;
foreach ($plugin_list as $plugin) {
$odd_row = !$odd_row;
?>
<tr class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
<th><?php echo htmlspecialchars($plugin['plugin_name']); ?></th>
<td><?php echo htmlspecialchars($plugin['module_name']); ?></td>
<td><?php echo htmlspecialchars($plugin['module_library']); ?></td>
<td><?php echo htmlspecialchars($plugin['module_version']); ?></td>
<td><?php echo htmlspecialchars($plugin['module_author']); ?></td>
<td><?php echo htmlspecialchars($plugin['module_license']); ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
}
?>
</div>
<div id="plugins_modules">
<table class="data_full_width">
<thead>
<tr>
<th><?php echo __('Module'); ?></th>
<th><?php echo __('Description'); ?></th>
<th><?php echo __('Library'); ?></th>
<th><?php echo __('Version'); ?></th>
<th><?php echo __('Author'); ?></th>
<th><?php echo __('License'); ?></th>
</tr>
</thead>
<tbody>
<?php
$odd_row = false;
foreach ($modules as $module_name => $module) {
$odd_row = !$odd_row;
?>
<tr class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
<th rowspan="2"><?php echo htmlspecialchars($module_name); ?></th>
<td><?php echo htmlspecialchars($module['info']['module_description']); ?></td>
<td><?php echo htmlspecialchars($module['info']['module_library']); ?></td>
<td><?php echo htmlspecialchars($module['info']['module_version']); ?></td>
<td><?php echo htmlspecialchars($module['info']['module_author']); ?></td>
<td><?php echo htmlspecialchars($module['info']['module_license']); ?></td>
</tr>
<tr class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
<td colspan="5">
<table>
<tbody>
<?php
foreach ($module['plugins'] as $plugin_type => $plugin_list) {
?>
<tr class="noclick">
<td><b class="plugin-type"><?php echo htmlspecialchars($plugin_type); ?></b></td>
<td>
<?php
for ($i = 0; $i < count($plugin_list); $i++) {
echo ($i != 0 ? '<br />' : '') . htmlspecialchars($plugin_list[$i]['plugin_name']);
if (!$plugin_list[$i]['is_active']) {
echo ' <small class="attention">' . __('disabled') . '</small>';
}
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
exit;
?>