Czech translation update.
[phpmyadmin/last10db.git] / server_engines.php
blob02a65fcad88545b8d8945eee6b332e32373ce718
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * display list of server enignes and additonal information about them
6 * @version $Id$
7 * @todo falcon storage enginge is not listed under dev.mysql.com/doc/refman but dev.mysql.com/doc/falcon/
8 */
10 /**
13 if (! defined('PMA_NO_VARIABLES_IMPORT')) {
14 define('PMA_NO_VARIABLES_IMPORT', true);
17 /**
18 * requirements
20 require_once './libraries/common.inc.php';
22 /**
23 * Does the common work
25 require './libraries/server_common.inc.php';
26 require './libraries/StorageEngine.class.php';
29 /**
30 * Displays the links
32 require './libraries/server_links.inc.php';
34 /**
35 * Did the user request information about a certain storage engine?
37 if (empty($_REQUEST['engine'])
38 || ! PMA_StorageEngine::isValid($_REQUEST['engine'])) {
40 /**
41 * Displays the sub-page heading
43 echo '<h2>' . "\n"
44 . ($GLOBALS['cfg']['MainPageIconic']
45 ? '<img class="icon" src="' . $pmaThemeImage . 'b_engine.png"'
46 .' width="16" height="16" alt="" />' : '')
47 . "\n" . $strStorageEngines . "\n"
48 . '</h2>' . "\n";
51 /**
52 * Displays the table header
54 echo '<table>' . "\n"
55 . '<thead>' . "\n"
56 . '<tr><th>' . $strStorageEngine . '</th>' . "\n"
57 . ' <th>' . $strDescription . '</th>' . "\n"
58 . '</tr>' . "\n"
59 . '</thead>' . "\n"
60 . '<tbody>' . "\n";
63 /**
64 * Listing the storage engines
66 $odd_row = true;
67 foreach (PMA_StorageEngine::getStorageEngines() as $engine => $details) {
68 echo '<tr class="'
69 . ($odd_row ? 'odd' : 'even')
70 . ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED'
71 ? ' disabled'
72 : '')
73 . '">' . "\n"
74 . ' <td><a href="./server_engines.php'
75 . PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
76 . ' ' . htmlspecialchars($details['Engine']) . "\n"
77 . ' </a></td>' . "\n"
78 . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
79 . '</tr>' . "\n";
80 $odd_row = !$odd_row;
82 unset($odd_row, $engine, $details);
83 echo '</tbody>' . "\n"
84 . '</table>' . "\n";
86 } else {
88 /**
89 * Displays details about a given Storage Engine
92 $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
93 echo '<h2>' . "\n"
94 . ($GLOBALS['cfg']['MainPageIconic']
95 ? '<img class="icon" src="' . $pmaThemeImage . 'b_engine.png"'
96 .' width="16" height="16" alt="" />' : '')
97 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
98 . ' ' . PMA_showMySQLDocu('', $engine_plugin->getMysqlHelpPage()) . "\n"
99 . '</h2>' . "\n\n";
100 echo '<p>' . "\n"
101 . ' <em>' . "\n"
102 . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
103 . ' </em>' . "\n"
104 . '</p>' . "\n\n";
105 $infoPages = $engine_plugin->getInfoPages();
106 if (!empty($infoPages) && is_array($infoPages)) {
107 echo '<p>' . "\n"
108 . ' <strong>[</strong>' . "\n";
109 if (empty($_REQUEST['page'])) {
110 echo ' <strong>' . $strServerTabVariables . '</strong>' . "\n";
111 } else {
112 echo ' <a href="./server_engines.php'
113 . PMA_generate_common_url(array('engine' => $_REQUEST['engine'])) . '">'
114 . $strServerTabVariables . '</a>' . "\n";
116 foreach ($infoPages as $current => $label) {
117 echo ' <strong>|</strong>' . "\n";
118 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
119 echo ' <strong>' . $label . '</strong>' . "\n";
120 } else {
121 echo ' <a href="./server_engines.php'
122 . PMA_generate_common_url(
123 array('engine' => $_REQUEST['engine'], 'page' => $current))
124 . '">' . htmlspecialchars($label) . '</a>' . "\n";
127 unset($current, $label);
128 echo ' <strong>]</strong>' . "\n"
129 . '</p>' . "\n\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 echo $page_output;
137 } else {
138 echo '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
139 . '</p>' . "\n"
140 . $engine_plugin->getHtmlVariables();
145 * Sends the footer
147 require_once './libraries/footer.inc.php';