2 /* vim: set expandtab sw=4 ts=4 sts=4: */
5 * functions for displaying server engines
7 * @usedby server_engines.php
11 if (! defined('PHPMYADMIN')) {
16 * setup HTML for server Engines information
20 function PMA_getHtmlForServerEngines()
23 * Did the user request information about a certain storage engine?
26 if (empty($_REQUEST['engine'])
27 ||
! PMA_StorageEngine
::isValid($_REQUEST['engine'])
29 $html .= PMA_getHtmlForAllServerEngines();
31 $html .= PMA_getHtmlForSpecifiedServerEngines();
38 * setup HTML for server all Engines information
42 function PMA_getHtmlForAllServerEngines()
45 * Displays the table header
47 $html = '<table class="noclick">' . "\n"
49 . '<tr><th>' . __('Storage Engine') . '</th>' . "\n"
50 . ' <th>' . __('Description') . '</th>' . "\n"
57 * Listing the storage engines
60 foreach (PMA_StorageEngine
::getStorageEngines() as $engine => $details) {
61 $html .= '<tr class="'
62 . ($odd_row ?
'odd' : 'even')
63 . ($details['Support'] == 'NO' ||
$details['Support'] == 'DISABLED'
66 . ' <td><a rel="newpage" href="server_engines.php'
67 . PMA_URL_getCommon(array('engine' => $engine)) . '">' . "\n"
68 . ' ' . htmlspecialchars($details['Engine']) . "\n"
70 . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
75 unset($odd_row, $engine, $details);
76 $html .= '</tbody>' . "\n"
83 * setup HTML for a given Storage Engine
87 function PMA_getHtmlForSpecifiedServerEngines()
90 * Displays details about a given Storage Engine
93 $engine_plugin = PMA_StorageEngine
::getEngine($_REQUEST['engine']);
94 $html .= '<h2>' . "\n"
95 . PMA_Util
::getImage('b_engine.png')
96 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
97 . ' ' . PMA_Util
::showMySQLDocu($engine_plugin->getMysqlHelpPage())
98 . "\n" . '</h2>' . "\n\n";
101 . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
104 $infoPages = $engine_plugin->getInfoPages();
105 if (! empty($infoPages) && is_array($infoPages)) {
106 $html .= '<p>' . "\n"
107 . ' <strong>[</strong>' . "\n";
108 if (empty($_REQUEST['page'])) {
109 $html .= ' <strong>' . __('Variables') . '</strong>' . "\n";
111 $html .= ' <a href="server_engines.php'
112 . PMA_URL_getCommon(array('engine' => $_REQUEST['engine']))
113 . '">' . __('Variables') . '</a>' . "\n";
115 foreach ($infoPages as $current => $label) {
116 $html .= ' <strong>|</strong>' . "\n";
117 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
118 $html .= ' <strong>' . $label . '</strong>' . "\n";
120 $html .= ' <a href="server_engines.php'
122 array('engine' => $_REQUEST['engine'], 'page' => $current)
124 . '">' . htmlspecialchars($label) . '</a>' . "\n";
127 unset($current, $label);
128 $html .= ' <strong>]</strong>' . "\n"
131 unset($infoPages, $page_output);
132 if (! empty($_REQUEST['page'])) {
133 $page_output = $engine_plugin->getPage($_REQUEST['page']);
135 if (! empty($page_output)) {
136 $html .= $page_output;
138 $html .= '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
140 . $engine_plugin->getHtmlVariables();