2 /* vim: set expandtab sw=4 ts=4 sts=4: */
11 require_once 'libraries/common.inc.php';
16 $GLOBALS['js_include'][] = 'jquery/jquery.cookie.js';
17 $GLOBALS['js_include'][] = 'jquery/jquery.tablesorter.js';
18 $GLOBALS['js_include'][] = 'server_plugins.js';
21 * Does the common work
23 require 'libraries/server_common.inc.php';
29 require 'libraries/server_links.inc.php';
32 * Displays the sub-page heading
35 . PMA_getImage('b_engine.png')
36 . "\n" . __('Plugins') . "\n"
42 $sql = "SELECT p.plugin_name, p.plugin_type, p.is_active, m.module_name, m.module_library,
43 m.module_version, m.module_author, m.module_description, m.module_license
44 FROM data_dictionary.plugins p
45 JOIN data_dictionary.modules m USING (module_name)
46 ORDER BY m.module_name, p.plugin_type, p.plugin_name";
47 $res = PMA_DBI_query($sql);
50 while ($row = PMA_DBI_fetch_assoc($res)) {
51 $plugins[$row['plugin_type']][] = $row;
52 $modules[$row['module_name']]['info'] = $row;
53 $modules[$row['module_name']]['plugins'][$row['plugin_type']][] = $row;
55 PMA_DBI_free_result($res);
57 // sort plugin list (modules are already sorted)
64 <script type
="text/javascript">
65 pma_theme_image
= '<?php echo $GLOBALS['pmaThemeImage
']; ?>';
67 <div id
="pluginsTabs">
69 <li
><a href
="#plugins_plugins"><?php
echo __('Plugins'); ?
></a
></li
>
70 <li
><a href
="#plugins_modules"><?php
echo __('Modules'); ?
></a
></li
>
73 <div id
="plugins_plugins">
74 <div id
="sectionlinks">
76 foreach ($plugins as $plugin_type => $plugin_list) {
77 $key = 'plugins-' . preg_replace('/[^a-z]/', '', strtolower($plugin_type));
78 echo '<a href="#' . $key . '">' . htmlspecialchars($plugin_type) . '</a>' . "\n";
84 foreach ($plugins as $plugin_type => $plugin_list) {
85 $key = 'plugins-' . preg_replace('/[^a-z]/', '', strtolower($plugin_type));
88 <table
class="data_full_width" id
="<?php echo $key; ?>">
89 <caption
class="tblHeaders">
90 <a
class="top" href
="#serverinfo"><?php
92 echo PMA_getImage('s_asc.png');
94 <?php
echo htmlspecialchars($plugin_type); ?
>
98 <th
><?php
echo __('Plugin'); ?
></th
>
99 <th
><?php
echo __('Module'); ?
></th
>
100 <th
><?php
echo __('Library'); ?
></th
>
101 <th
><?php
echo __('Version'); ?
></th
>
102 <th
><?php
echo __('Author'); ?
></th
>
103 <th
><?php
echo __('License'); ?
></th
>
109 foreach ($plugin_list as $plugin) {
110 $odd_row = !$odd_row;
112 <tr
class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
113 <th
><?php
echo htmlspecialchars($plugin['plugin_name']); ?
></th
>
114 <td
><?php
echo htmlspecialchars($plugin['module_name']); ?
></td
>
115 <td
><?php
echo htmlspecialchars($plugin['module_library']); ?
></td
>
116 <td
><?php
echo htmlspecialchars($plugin['module_version']); ?
></td
>
117 <td
><?php
echo htmlspecialchars($plugin['module_author']); ?
></td
>
118 <td
><?php
echo htmlspecialchars($plugin['module_license']); ?
></td
>
129 <div id
="plugins_modules">
130 <table
class="data_full_width">
133 <th
><?php
echo __('Module'); ?
></th
>
134 <th
><?php
echo __('Description'); ?
></th
>
135 <th
><?php
echo __('Library'); ?
></th
>
136 <th
><?php
echo __('Version'); ?
></th
>
137 <th
><?php
echo __('Author'); ?
></th
>
138 <th
><?php
echo __('License'); ?
></th
>
144 foreach ($modules as $module_name => $module) {
145 $odd_row = !$odd_row;
147 <tr
class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
148 <th rowspan
="2"><?php
echo htmlspecialchars($module_name); ?
></th
>
149 <td
><?php
echo htmlspecialchars($module['info']['module_description']); ?
></td
>
150 <td
><?php
echo htmlspecialchars($module['info']['module_library']); ?
></td
>
151 <td
><?php
echo htmlspecialchars($module['info']['module_version']); ?
></td
>
152 <td
><?php
echo htmlspecialchars($module['info']['module_author']); ?
></td
>
153 <td
><?php
echo htmlspecialchars($module['info']['module_license']); ?
></td
>
155 <tr
class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
160 foreach ($module['plugins'] as $plugin_type => $plugin_list) {
163 <td
><b
class="plugin-type"><?php
echo htmlspecialchars($plugin_type); ?
></b
></td
>
166 for ($i = 0; $i < count($plugin_list); $i++
) {
167 echo ($i != 0 ?
'<br />' : '') . htmlspecialchars($plugin_list[$i]['plugin_name']);
168 if (!$plugin_list[$i]['is_active']) {
169 echo ' <small class="attention">' . __('disabled') . '</small>';
193 require 'libraries/footer.inc.php';