2 /* vim: set expandtab sw=4 ts=4 sts=4: */
11 require_once 'libraries/common.inc.php';
16 $response = PMA_Response
::getInstance();
17 $header = $response->getHeader();
18 $scripts = $header->getScripts();
19 $scripts->addFile('jquery/jquery.tablesorter.js');
20 $scripts->addFile('server_plugins.js');
23 * Does the common work
25 require 'libraries/server_common.inc.php';
28 * Displays the sub-page heading
31 . PMA_Util
::getImage('b_engine.png')
32 . "\n" . __('Plugins') . "\n"
38 $sql = "SELECT p.plugin_name, p.plugin_type, p.is_active, m.module_name, m.module_library,
39 m.module_version, m.module_author, m.module_description, m.module_license
40 FROM data_dictionary.plugins p
41 JOIN data_dictionary.modules m USING (module_name)
42 ORDER BY m.module_name, p.plugin_type, p.plugin_name";
43 $res = PMA_DBI_query($sql);
46 while ($row = PMA_DBI_fetch_assoc($res)) {
47 $plugins[$row['plugin_type']][] = $row;
48 $modules[$row['module_name']]['info'] = $row;
49 $modules[$row['module_name']]['plugins'][$row['plugin_type']][] = $row;
51 PMA_DBI_free_result($res);
53 // sort plugin list (modules are already sorted)
60 <script type
="text/javascript">
61 pma_theme_image
= '<?php echo $GLOBALS['pmaThemeImage
']; ?>';
63 <div id
="pluginsTabs">
65 <li
><a href
="#plugins_plugins"><?php
echo __('Plugins'); ?
></a
></li
>
66 <li
><a href
="#plugins_modules"><?php
echo __('Modules'); ?
></a
></li
>
69 <div id
="plugins_plugins">
70 <div id
="sectionlinks">
72 foreach ($plugins as $plugin_type => $plugin_list) {
73 $key = 'plugins-' . preg_replace('/[^a-z]/', '', strtolower($plugin_type));
74 echo '<a href="#' . $key . '">' . htmlspecialchars($plugin_type) . '</a>' . "\n";
80 foreach ($plugins as $plugin_type => $plugin_list) {
81 $key = 'plugins-' . preg_replace('/[^a-z]/', '', strtolower($plugin_type));
84 <table
class="data_full_width" id
="<?php echo $key; ?>">
85 <caption
class="tblHeaders">
86 <a
class="top" href
="#serverinfo"><?php
88 echo PMA_Util
::getImage('s_asc.png');
90 <?php
echo htmlspecialchars($plugin_type); ?
>
94 <th
><?php
echo __('Plugin'); ?
></th
>
95 <th
><?php
echo __('Module'); ?
></th
>
96 <th
><?php
echo __('Library'); ?
></th
>
97 <th
><?php
echo __('Version'); ?
></th
>
98 <th
><?php
echo __('Author'); ?
></th
>
99 <th
><?php
echo __('License'); ?
></th
>
105 foreach ($plugin_list as $plugin) {
106 $odd_row = !$odd_row;
108 <tr
class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
109 <th
><?php
echo htmlspecialchars($plugin['plugin_name']); ?
></th
>
110 <td
><?php
echo htmlspecialchars($plugin['module_name']); ?
></td
>
111 <td
><?php
echo htmlspecialchars($plugin['module_library']); ?
></td
>
112 <td
><?php
echo htmlspecialchars($plugin['module_version']); ?
></td
>
113 <td
><?php
echo htmlspecialchars($plugin['module_author']); ?
></td
>
114 <td
><?php
echo htmlspecialchars($plugin['module_license']); ?
></td
>
125 <div id
="plugins_modules">
126 <table
class="data_full_width">
129 <th
><?php
echo __('Module'); ?
></th
>
130 <th
><?php
echo __('Description'); ?
></th
>
131 <th
><?php
echo __('Library'); ?
></th
>
132 <th
><?php
echo __('Version'); ?
></th
>
133 <th
><?php
echo __('Author'); ?
></th
>
134 <th
><?php
echo __('License'); ?
></th
>
140 foreach ($modules as $module_name => $module) {
141 $odd_row = !$odd_row;
143 <tr
class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
144 <th rowspan
="2"><?php
echo htmlspecialchars($module_name); ?
></th
>
145 <td
><?php
echo htmlspecialchars($module['info']['module_description']); ?
></td
>
146 <td
><?php
echo htmlspecialchars($module['info']['module_library']); ?
></td
>
147 <td
><?php
echo htmlspecialchars($module['info']['module_version']); ?
></td
>
148 <td
><?php
echo htmlspecialchars($module['info']['module_author']); ?
></td
>
149 <td
><?php
echo htmlspecialchars($module['info']['module_license']); ?
></td
>
151 <tr
class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
156 foreach ($module['plugins'] as $plugin_type => $plugin_list) {
159 <td
><b
class="plugin-type"><?php
echo htmlspecialchars($plugin_type); ?
></b
></td
>
162 for ($i = 0; $i < count($plugin_list); $i++
) {
163 echo ($i != 0 ?
'<br />' : '') . htmlspecialchars($plugin_list[$i]['plugin_name']);
164 if (!$plugin_list[$i]['is_active']) {
165 echo ' <small class="attention">' . __('disabled') . '</small>';