Better descriptions for Drizzle column types
[phpmyadmin.git] / server_engines.php
blob1c26dc6942c3e14e11a232c5b4df4dccdd96327d
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * display list of server engines and additonal information about them
6 * @package PhpMyAdmin
7 */
9 /**
10 * requirements
12 require_once 'libraries/common.inc.php';
14 /**
15 * Does the common work
17 require 'libraries/server_common.inc.php';
18 require 'libraries/StorageEngine.class.php';
21 /**
22 * Displays the links
24 require 'libraries/server_links.inc.php';
26 /**
27 * Did the user request information about a certain storage engine?
29 if (empty($_REQUEST['engine'])
30 || ! PMA_StorageEngine::isValid($_REQUEST['engine'])
31 ) {
33 /**
34 * Displays the sub-page heading
36 echo '<h2>' . "\n"
37 . PMA_getImage('b_engine.png')
38 . "\n" . __('Storage Engines') . "\n"
39 . '</h2>' . "\n";
42 /**
43 * Displays the table header
45 echo '<table class="noclick">' . "\n"
46 . '<thead>' . "\n"
47 . '<tr><th>' . __('Storage Engine') . '</th>' . "\n"
48 . ' <th>' . __('Description') . '</th>' . "\n"
49 . '</tr>' . "\n"
50 . '</thead>' . "\n"
51 . '<tbody>' . "\n";
54 /**
55 * Listing the storage engines
57 $odd_row = true;
58 foreach (PMA_StorageEngine::getStorageEngines() as $engine => $details) {
59 echo '<tr class="'
60 . ($odd_row ? 'odd' : 'even')
61 . ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED'
62 ? ' disabled'
63 : '')
64 . '">' . "\n"
65 . ' <td><a href="server_engines.php'
66 . PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
67 . ' ' . htmlspecialchars($details['Engine']) . "\n"
68 . ' </a></td>' . "\n"
69 . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
70 . '</tr>' . "\n";
71 $odd_row = !$odd_row;
74 unset($odd_row, $engine, $details);
75 echo '</tbody>' . "\n"
76 . '</table>' . "\n";
78 } else {
80 /**
81 * Displays details about a given Storage Engine
84 $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
85 echo '<h2>' . "\n"
86 . PMA_getImage('b_engine.png')
87 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
88 . ' ' . PMA_showMySQLDocu('', $engine_plugin->getMysqlHelpPage()) . "\n"
89 . '</h2>' . "\n\n";
90 echo '<p>' . "\n"
91 . ' <em>' . "\n"
92 . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
93 . ' </em>' . "\n"
94 . '</p>' . "\n\n";
95 $infoPages = $engine_plugin->getInfoPages();
96 if (! empty($infoPages) && is_array($infoPages)) {
97 echo '<p>' . "\n"
98 . ' <strong>[</strong>' . "\n";
99 if (empty($_REQUEST['page'])) {
100 echo ' <strong>' . __('Variables') . '</strong>' . "\n";
101 } else {
102 echo ' <a href="server_engines.php'
103 . PMA_generate_common_url(array('engine' => $_REQUEST['engine']))
104 . '">' . __('Variables') . '</a>' . "\n";
106 foreach ($infoPages as $current => $label) {
107 echo ' <strong>|</strong>' . "\n";
108 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
109 echo ' <strong>' . $label . '</strong>' . "\n";
110 } else {
111 echo ' <a href="server_engines.php'
112 . PMA_generate_common_url(
113 array('engine' => $_REQUEST['engine'], 'page' => $current)
115 . '">' . htmlspecialchars($label) . '</a>' . "\n";
118 unset($current, $label);
119 echo ' <strong>]</strong>' . "\n"
120 . '</p>' . "\n\n";
122 unset($infoPages, $page_output);
123 if (! empty($_REQUEST['page'])) {
124 $page_output = $engine_plugin->getPage($_REQUEST['page']);
126 if (! empty($page_output)) {
127 echo $page_output;
128 } else {
129 echo '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
130 . '</p>' . "\n"
131 . $engine_plugin->getHtmlVariables();
136 * Sends the footer
138 require 'libraries/footer.inc.php';