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';
21 * Did the user request information about a certain storage engine?
24 if (empty($_REQUEST['engine'])
25 ||
! PMA_StorageEngine
::isValid($_REQUEST['engine'])
29 * Displays the sub-page heading
31 $html .= '<h2>' . "\n"
32 . PMA_Util
::getImage('b_engine.png')
33 . "\n" . __('Storage Engines') . "\n"
38 * Displays the table header
40 $html .= '<table class="noclick">' . "\n"
42 . '<tr><th>' . __('Storage Engine') . '</th>' . "\n"
43 . ' <th>' . __('Description') . '</th>' . "\n"
50 * Listing the storage engines
53 foreach (PMA_StorageEngine
::getStorageEngines() as $engine => $details) {
54 $html .= '<tr class="'
55 . ($odd_row ?
'odd' : 'even')
56 . ($details['Support'] == 'NO' ||
$details['Support'] == 'DISABLED'
59 . ' <td><a rel="newpage" href="server_engines.php'
60 . PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
61 . ' ' . htmlspecialchars($details['Engine']) . "\n"
63 . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
68 unset($odd_row, $engine, $details);
69 $html .= '</tbody>' . "\n"
75 * Displays details about a given Storage Engine
78 $engine_plugin = PMA_StorageEngine
::getEngine($_REQUEST['engine']);
79 $html .= '<h2>' . "\n"
80 . PMA_Util
::getImage('b_engine.png')
81 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
82 . ' ' . PMA_Util
::showMySQLDocu('', $engine_plugin->getMysqlHelpPage())
83 . "\n" . '</h2>' . "\n\n";
86 . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
89 $infoPages = $engine_plugin->getInfoPages();
90 if (! empty($infoPages) && is_array($infoPages)) {
92 . ' <strong>[</strong>' . "\n";
93 if (empty($_REQUEST['page'])) {
94 $html .= ' <strong>' . __('Variables') . '</strong>' . "\n";
96 $html .= ' <a href="server_engines.php'
97 . PMA_generate_common_url(array('engine' => $_REQUEST['engine']))
98 . '">' . __('Variables') . '</a>' . "\n";
100 foreach ($infoPages as $current => $label) {
101 $html .= ' <strong>|</strong>' . "\n";
102 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
103 $html .= ' <strong>' . $label . '</strong>' . "\n";
105 $html .= ' <a href="server_engines.php'
106 . PMA_generate_common_url(
107 array('engine' => $_REQUEST['engine'], 'page' => $current)
109 . '">' . htmlspecialchars($label) . '</a>' . "\n";
112 unset($current, $label);
113 $html .= ' <strong>]</strong>' . "\n"
116 unset($infoPages, $page_output);
117 if (! empty($_REQUEST['page'])) {
118 $page_output = $engine_plugin->getPage($_REQUEST['page']);
120 if (! empty($page_output)) {
121 $html .= $page_output;
123 $html .= '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
125 . $engine_plugin->getHtmlVariables();
129 $response = PMA_Response
::getInstance();
130 $response->addHTML($html);