Common strings for descriptions of DATE, TIME, DATETIME and VARCHAR2
[phpmyadmin.git] / server_plugins.php
blob26fec2fe11792a8d882607d94e4304d5cccc0d7b
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package PhpMyAdmin
6 */
8 /**
9 * requirements
11 require_once 'libraries/common.inc.php';
13 /**
14 * JS includes
16 $GLOBALS['js_include'][] = 'jquery/jquery.cookie.js';
17 $GLOBALS['js_include'][] = 'jquery/jquery.tablesorter.js';
18 $GLOBALS['js_include'][] = 'server_plugins.js';
20 /**
21 * Does the common work
23 require 'libraries/server_common.inc.php';
26 /**
27 * Displays the links
29 require 'libraries/server_links.inc.php';
31 /**
32 * Displays the sub-page heading
34 echo '<h2>' . "\n"
35 . PMA_getImage('b_engine.png')
36 . "\n" . __('Plugins') . "\n"
37 . '</h2>' . "\n";
39 /**
40 * Prepare plugin list
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);
48 $plugins = array();
49 $modules = array();
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)
58 ksort($plugins);
60 /**
61 * Displays the page
64 <script type="text/javascript">
65 pma_theme_image = '<?php echo $GLOBALS['pmaThemeImage']; ?>';
66 </script>
67 <div id="pluginsTabs">
68 <ul>
69 <li><a href="#plugins_plugins"><?php echo __('Plugins'); ?></a></li>
70 <li><a href="#plugins_modules"><?php echo __('Modules'); ?></a></li>
71 </ul>
73 <div id="plugins_plugins">
74 <div id="sectionlinks">
75 <?php
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";
81 </div>
82 <br />
83 <?php
84 foreach ($plugins as $plugin_type => $plugin_list) {
85 $key = 'plugins-' . preg_replace('/[^a-z]/', '', strtolower($plugin_type));
86 sort($plugin_list);
88 <table class="data_full_width" id="<?php echo $key; ?>">
89 <caption class="tblHeaders">
90 <a class="top" href="#serverinfo"><?php
91 echo __('Begin');
92 echo PMA_getImage('s_asc.png');
93 ?></a>
94 <?php echo htmlspecialchars($plugin_type); ?>
95 </caption>
96 <thead>
97 <tr>
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>
104 </tr>
105 </thead>
106 <tbody>
107 <?php
108 $odd_row = false;
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>
119 </tr>
120 <?php
123 </tbody>
124 </table>
125 <?php
128 </div>
129 <div id="plugins_modules">
130 <table class="data_full_width">
131 <thead>
132 <tr>
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>
139 </tr>
140 </thead>
141 <tbody>
142 <?php
143 $odd_row = false;
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>
154 </tr>
155 <tr class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
156 <td colspan="5">
157 <table>
158 <tbody>
159 <?php
160 foreach ($module['plugins'] as $plugin_type => $plugin_list) {
162 <tr class="noclick">
163 <td><b class="plugin-type"><?php echo htmlspecialchars($plugin_type); ?></b></td>
164 <td>
165 <?php
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>';
173 </td>
174 </tr>
175 <?php
178 </tbody>
179 </table>
180 </td>
181 </tr>
182 <?php
185 </tbody>
186 </table>
187 </div>
188 </div>
189 <?php
191 * Sends the footer
193 require 'libraries/footer.inc.php';