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"
56 * Listing the storage engines
59 foreach (PMA_StorageEngine
::getStorageEngines() as $engine => $details) {
60 $html .= '<tr class="'
61 . ($odd_row ?
'odd' : 'even')
62 . ($details['Support'] == 'NO' ||
$details['Support'] == 'DISABLED'
65 . ' <td><a rel="newpage" href="server_engines.php'
66 . PMA_URL_getCommon(array('engine' => $engine)) . '">' . "\n"
67 . ' ' . htmlspecialchars($details['Engine']) . "\n"
69 . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
74 unset($odd_row, $engine, $details);
75 $html .= '</tbody>' . "\n"
82 * setup HTML for a given Storage Engine
86 function PMA_getHtmlForSpecifiedServerEngines()
89 * Displays details about a given Storage Engine
92 $engine_plugin = PMA_StorageEngine
::getEngine($_REQUEST['engine']);
93 $html .= '<h2>' . "\n"
94 . PMA_Util
::getImage('b_engine.png')
95 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
96 . ' ' . PMA_Util
::showMySQLDocu($engine_plugin->getMysqlHelpPage())
97 . "\n" . '</h2>' . "\n\n";
100 . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
103 $infoPages = $engine_plugin->getInfoPages();
104 if (! empty($infoPages) && is_array($infoPages)) {
105 $html .= '<p>' . "\n"
106 . ' <strong>[</strong>' . "\n";
107 if (empty($_REQUEST['page'])) {
108 $html .= ' <strong>' . __('Variables') . '</strong>' . "\n";
110 $html .= ' <a href="server_engines.php'
111 . PMA_URL_getCommon(array('engine' => $_REQUEST['engine']))
112 . '">' . __('Variables') . '</a>' . "\n";
114 foreach ($infoPages as $current => $label) {
115 $html .= ' <strong>|</strong>' . "\n";
116 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
117 $html .= ' <strong>' . $label . '</strong>' . "\n";
119 $html .= ' <a href="server_engines.php'
121 array('engine' => $_REQUEST['engine'], 'page' => $current)
123 . '">' . htmlspecialchars($label) . '</a>' . "\n";
126 unset($current, $label);
127 $html .= ' <strong>]</strong>' . "\n"
130 unset($infoPages, $page_output);
131 if (! empty($_REQUEST['page'])) {
132 $page_output = $engine_plugin->getPage($_REQUEST['page']);
134 if (! empty($page_output)) {
135 $html .= $page_output;
137 $html .= '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
139 . $engine_plugin->getHtmlVariables();