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
34 function PMA_getServerEnginesHtml()
37 * Did the user request information about a certain storage engine?
40 if (empty($_REQUEST['engine'])
41 ||
! PMA_StorageEngine
::isValid($_REQUEST['engine'])
43 $html .= PMA_getAllServerEnginesHtml();
45 $html .= PMA_getSpecifiedServerEnginesHtml();
52 * setup HTML for server all Engines information
56 function PMA_getAllServerEnginesHtml()
59 * Displays the sub-page heading
62 . PMA_Util
::getImage('b_engine.png')
63 . "\n" . __('Storage Engines') . "\n"
67 * Displays the table header
69 $html .= '<table class="noclick">' . "\n"
71 . '<tr><th>' . __('Storage Engine') . '</th>' . "\n"
72 . ' <th>' . __('Description') . '</th>' . "\n"
79 * Listing the storage engines
82 foreach (PMA_StorageEngine
::getStorageEngines() as $engine => $details) {
83 $html .= '<tr class="'
84 . ($odd_row ?
'odd' : 'even')
85 . ($details['Support'] == 'NO' ||
$details['Support'] == 'DISABLED'
88 . ' <td><a rel="newpage" href="server_engines.php'
89 . PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
90 . ' ' . htmlspecialchars($details['Engine']) . "\n"
92 . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
97 unset($odd_row, $engine, $details);
98 $html .= '</tbody>' . "\n"
105 * setup HTML for a given Storage Engine
109 function PMA_getSpecifiedServerEnginesHtml()
112 * Displays details about a given Storage Engine
115 $engine_plugin = PMA_StorageEngine
::getEngine($_REQUEST['engine']);
116 $html .= '<h2>' . "\n"
117 . PMA_Util
::getImage('b_engine.png')
118 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
119 . ' ' . PMA_Util
::showMySQLDocu('', $engine_plugin->getMysqlHelpPage())
120 . "\n" . '</h2>' . "\n\n";
121 $html .= '<p>' . "\n"
123 . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
126 $infoPages = $engine_plugin->getInfoPages();
127 if (! empty($infoPages) && is_array($infoPages)) {
128 $html .= '<p>' . "\n"
129 . ' <strong>[</strong>' . "\n";
130 if (empty($_REQUEST['page'])) {
131 $html .= ' <strong>' . __('Variables') . '</strong>' . "\n";
133 $html .= ' <a href="server_engines.php'
134 . PMA_generate_common_url(array('engine' => $_REQUEST['engine']))
135 . '">' . __('Variables') . '</a>' . "\n";
137 foreach ($infoPages as $current => $label) {
138 $html .= ' <strong>|</strong>' . "\n";
139 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
140 $html .= ' <strong>' . $label . '</strong>' . "\n";
142 $html .= ' <a href="server_engines.php'
143 . PMA_generate_common_url(
144 array('engine' => $_REQUEST['engine'], 'page' => $current)
146 . '">' . htmlspecialchars($label) . '</a>' . "\n";
149 unset($current, $label);
150 $html .= ' <strong>]</strong>' . "\n"
153 unset($infoPages, $page_output);
154 if (! empty($_REQUEST['page'])) {
155 $page_output = $engine_plugin->getPage($_REQUEST['page']);
157 if (! empty($page_output)) {
158 $html .= $page_output;
160 $html .= '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
162 . $engine_plugin->getHtmlVariables();