2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * display list of server engines and additional information about them
12 require_once 'libraries/common.inc.php';
15 * Does the common work
17 require 'libraries/server_common.inc.php';
18 require 'libraries/StorageEngine.class.php';
23 $response = PMA_Response
::getInstance();
24 $response->addHTML(PMA_getServerEnginesHtml());
30 * setup HTML for server Engines information
36 function PMA_getServerEnginesHtml()
39 * Did the user request information about a certain storage engine?
42 if (empty($_REQUEST['engine'])
43 ||
! PMA_StorageEngine
::isValid($_REQUEST['engine'])
45 $html .= PMA_getAllServerEnginesHtml();
47 $html .= PMA_getSpecifiedServerEnginesHtml();
54 * setup HTML for server all Engines information
60 function PMA_getAllServerEnginesHtml()
63 * Displays the sub-page heading
66 . PMA_Util
::getImage('b_engine.png')
67 . "\n" . __('Storage Engines') . "\n"
71 * Displays the table header
73 $html .= '<table class="noclick">' . "\n"
75 . '<tr><th>' . __('Storage Engine') . '</th>' . "\n"
76 . ' <th>' . __('Description') . '</th>' . "\n"
83 * Listing the storage engines
86 foreach (PMA_StorageEngine
::getStorageEngines() as $engine => $details) {
87 $html .= '<tr class="'
88 . ($odd_row ?
'odd' : 'even')
89 . ($details['Support'] == 'NO' ||
$details['Support'] == 'DISABLED'
92 . ' <td><a rel="newpage" href="server_engines.php'
93 . PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
94 . ' ' . htmlspecialchars($details['Engine']) . "\n"
96 . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
101 unset($odd_row, $engine, $details);
102 $html .= '</tbody>' . "\n"
109 * setup HTML for a given Storage Engine
115 function PMA_getSpecifiedServerEnginesHtml()
118 * Displays details about a given Storage Engine
121 $engine_plugin = PMA_StorageEngine
::getEngine($_REQUEST['engine']);
122 $html .= '<h2>' . "\n"
123 . PMA_Util
::getImage('b_engine.png')
124 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
125 . ' ' . PMA_Util
::showMySQLDocu('', $engine_plugin->getMysqlHelpPage())
126 . "\n" . '</h2>' . "\n\n";
127 $html .= '<p>' . "\n"
129 . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
132 $infoPages = $engine_plugin->getInfoPages();
133 if (! empty($infoPages) && is_array($infoPages)) {
134 $html .= '<p>' . "\n"
135 . ' <strong>[</strong>' . "\n";
136 if (empty($_REQUEST['page'])) {
137 $html .= ' <strong>' . __('Variables') . '</strong>' . "\n";
139 $html .= ' <a href="server_engines.php'
140 . PMA_generate_common_url(array('engine' => $_REQUEST['engine']))
141 . '">' . __('Variables') . '</a>' . "\n";
143 foreach ($infoPages as $current => $label) {
144 $html .= ' <strong>|</strong>' . "\n";
145 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
146 $html .= ' <strong>' . $label . '</strong>' . "\n";
148 $html .= ' <a href="server_engines.php'
149 . PMA_generate_common_url(
150 array('engine' => $_REQUEST['engine'], 'page' => $current)
152 . '">' . htmlspecialchars($label) . '</a>' . "\n";
155 unset($current, $label);
156 $html .= ' <strong>]</strong>' . "\n"
159 unset($infoPages, $page_output);
160 if (! empty($_REQUEST['page'])) {
161 $page_output = $engine_plugin->getPage($_REQUEST['page']);
163 if (! empty($page_output)) {
164 $html .= $page_output;
166 $html .= '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
168 . $engine_plugin->getHtmlVariables();