2 /* vim: set expandtab sw=4 ts=4 sts=4: */
9 * no need for variables importing
12 if (! defined('PMA_NO_VARIABLES_IMPORT')) {
13 define('PMA_NO_VARIABLES_IMPORT', true);
19 require_once './libraries/common.inc.php';
24 $GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
25 $GLOBALS['js_include'][] = 'jquery/jquery.cookie.js';
26 $GLOBALS['js_include'][] = 'jquery/jquery.tablesorter.js';
27 $GLOBALS['js_include'][] = 'server_plugins.js';
30 * Does the common work
32 require './libraries/server_common.inc.php';
38 require './libraries/server_links.inc.php';
41 * Displays the sub-page heading
44 . ($GLOBALS['cfg']['MainPageIconic']
45 ?
'<img class="icon" src="' . $pmaThemeImage . 'b_engine.png"'
46 .' width="16" height="16" alt="" />' : '')
47 . "\n" . __('Plugins') . "\n"
53 $sql = "SELECT p.plugin_name, p.plugin_type, p.is_active, m.module_name, m.module_library,
54 m.module_version, m.module_author, m.module_description, m.module_license
55 FROM data_dictionary.plugins p
56 JOIN data_dictionary.modules m USING (module_name)
57 ORDER BY m.module_name, p.plugin_type, p.plugin_name";
58 $res = PMA_DBI_query($sql);
61 while ($row = PMA_DBI_fetch_assoc($res)) {
62 $plugins[$row['plugin_type']][] = $row;
63 $modules[$row['module_name']]['info'] = $row;
64 $modules[$row['module_name']]['plugins'][$row['plugin_type']][] = $row;
66 PMA_DBI_free_result($res);
68 // sort plugin list (modules are already sorted)
75 <script type
="text/javascript">
76 pma_theme_image
= '<?php echo $GLOBALS['pmaThemeImage
']; ?>';
78 <div id
="pluginsTabs">
80 <li
><a href
="#plugins_plugins"><?php
echo __('Plugins'); ?
></a
></li
>
81 <li
><a href
="#plugins_modules"><?php
echo __('Modules'); ?
></a
></li
>
84 <div id
="plugins_plugins">
85 <div id
="sectionlinks">
87 foreach ($plugins as $plugin_type => $plugin_list) {
88 $key = 'plugins-' . preg_replace('/[^a-z]/', '', strtolower($plugin_type));
89 echo '<a href="#' . $key . '">' . htmlspecialchars($plugin_type) . '</a>' . "\n";
95 foreach ($plugins as $plugin_type => $plugin_list) {
96 $key = 'plugins-' . preg_replace('/[^a-z]/', '', strtolower($plugin_type));
99 <table
class="data_full_width" id
="<?php echo $key; ?>">
100 <caption
class="tblHeaders">
101 <a
class="top" href
="#serverinfo"><?php
103 echo $GLOBALS['cfg']['MainPageIconic']
104 ?
'<img src="' . $GLOBALS['pmaThemeImage'] .
105 's_asc.png" width="11" height="9" align="middle" alt="" />'
107 <?php
echo htmlspecialchars($plugin_type); ?
>
111 <th
><?php
echo __('Plugin'); ?
></th
>
112 <th
><?php
echo __('Module'); ?
></th
>
113 <th
><?php
echo __('Library'); ?
></th
>
114 <th
><?php
echo __('Version'); ?
></th
>
115 <th
><?php
echo __('Author'); ?
></th
>
116 <th
><?php
echo __('License'); ?
></th
>
122 foreach ($plugin_list as $plugin) {
123 $odd_row = !$odd_row;
125 <tr
class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
126 <th
><?php
echo htmlspecialchars($plugin['plugin_name']); ?
></th
>
127 <td
><?php
echo htmlspecialchars($plugin['module_name']); ?
></td
>
128 <td
><?php
echo htmlspecialchars($plugin['module_library']); ?
></td
>
129 <td
><?php
echo htmlspecialchars($plugin['module_version']); ?
></td
>
130 <td
><?php
echo htmlspecialchars($plugin['module_author']); ?
></td
>
131 <td
><?php
echo htmlspecialchars($plugin['module_license']); ?
></td
>
142 <div id
="plugins_modules">
143 <table
class="data_full_width">
146 <th
><?php
echo __('Module'); ?
></th
>
147 <th
><?php
echo __('Description'); ?
></th
>
148 <th
><?php
echo __('Library'); ?
></th
>
149 <th
><?php
echo __('Version'); ?
></th
>
150 <th
><?php
echo __('Author'); ?
></th
>
151 <th
><?php
echo __('License'); ?
></th
>
157 foreach ($modules as $module_name => $module) {
158 $odd_row = !$odd_row;
160 <tr
class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
161 <th rowspan
="2"><?php
echo htmlspecialchars($module_name); ?
></th
>
162 <td
><?php
echo htmlspecialchars($module['info']['module_description']); ?
></td
>
163 <td
><?php
echo htmlspecialchars($module['info']['module_library']); ?
></td
>
164 <td
><?php
echo htmlspecialchars($module['info']['module_version']); ?
></td
>
165 <td
><?php
echo htmlspecialchars($module['info']['module_author']); ?
></td
>
166 <td
><?php
echo htmlspecialchars($module['info']['module_license']); ?
></td
>
168 <tr
class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
173 foreach ($module['plugins'] as $plugin_type => $plugin_list) {
176 <td
><b
class="plugin-type"><?php
echo htmlspecialchars($plugin_type); ?
></b
></td
>
179 for ($i = 0; $i < count($plugin_list); $i++
) {
180 echo ($i != 0 ?
'<br />' : '') . htmlspecialchars($plugin_list[$i]['plugin_name']);
181 if (!$plugin_list[$i]['is_active']) {
182 echo ' <small class="attention">' . __('disabled') . '</small>';
206 require './libraries/footer.inc.php';