Translation update done using Pootle.
[phpmyadmin/crack.git] / server_engines.php
blobf9664ca02d0c2a82ea8f5b05b150c7ac9ba0952c
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 * @todo falcon storage enginge is not listed under dev.mysql.com/doc/refman but dev.mysql.com/doc/falcon/
7 * @package phpMyAdmin
8 */
10 /**
11 * no need for variables importing
12 * @ignore
14 if (! defined('PMA_NO_VARIABLES_IMPORT')) {
15 define('PMA_NO_VARIABLES_IMPORT', true);
18 /**
19 * requirements
21 require_once './libraries/common.inc.php';
23 /**
24 * Does the common work
26 require './libraries/server_common.inc.php';
27 require './libraries/StorageEngine.class.php';
30 /**
31 * Displays the links
33 require './libraries/server_links.inc.php';
35 /**
36 * Did the user request information about a certain storage engine?
38 if (empty($_REQUEST['engine'])
39 || ! PMA_StorageEngine::isValid($_REQUEST['engine'])) {
41 /**
42 * Displays the sub-page heading
44 echo '<h2>' . "\n"
45 . ($GLOBALS['cfg']['MainPageIconic']
46 ? '<img class="icon" src="' . $pmaThemeImage . 'b_engine.png"'
47 .' width="16" height="16" alt="" />' : '')
48 . "\n" . __('Storage Engines') . "\n"
49 . '</h2>' . "\n";
52 /**
53 * Displays the table header
55 echo '<table>' . "\n"
56 . '<thead>' . "\n"
57 . '<tr><th>' . __('Storage Engine') . '</th>' . "\n"
58 . ' <th>' . __('Description') . '</th>' . "\n"
59 . '</tr>' . "\n"
60 . '</thead>' . "\n"
61 . '<tbody>' . "\n";
64 /**
65 * Listing the storage engines
67 $odd_row = true;
68 foreach (PMA_StorageEngine::getStorageEngines() as $engine => $details) {
69 echo '<tr class="'
70 . ($odd_row ? 'odd' : 'even')
71 . ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED'
72 ? ' disabled'
73 : '')
74 . '">' . "\n"
75 . ' <td><a href="./server_engines.php'
76 . PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
77 . ' ' . htmlspecialchars($details['Engine']) . "\n"
78 . ' </a></td>' . "\n"
79 . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
80 . '</tr>' . "\n";
81 $odd_row = !$odd_row;
83 unset($odd_row, $engine, $details);
84 echo '</tbody>' . "\n"
85 . '</table>' . "\n";
87 } else {
89 /**
90 * Displays details about a given Storage Engine
93 $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
94 echo '<h2>' . "\n"
95 . ($GLOBALS['cfg']['MainPageIconic']
96 ? '<img class="icon" src="' . $pmaThemeImage . 'b_engine.png"'
97 .' width="16" height="16" alt="" />' : '')
98 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
99 . ' ' . PMA_showMySQLDocu('', $engine_plugin->getMysqlHelpPage()) . "\n"
100 . '</h2>' . "\n\n";
101 echo '<p>' . "\n"
102 . ' <em>' . "\n"
103 . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
104 . ' </em>' . "\n"
105 . '</p>' . "\n\n";
106 $infoPages = $engine_plugin->getInfoPages();
107 if (!empty($infoPages) && is_array($infoPages)) {
108 echo '<p>' . "\n"
109 . ' <strong>[</strong>' . "\n";
110 if (empty($_REQUEST['page'])) {
111 echo ' <strong>' . __('Variables') . '</strong>' . "\n";
112 } else {
113 echo ' <a href="./server_engines.php'
114 . PMA_generate_common_url(array('engine' => $_REQUEST['engine'])) . '">'
115 . __('Variables') . '</a>' . "\n";
117 foreach ($infoPages as $current => $label) {
118 echo ' <strong>|</strong>' . "\n";
119 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
120 echo ' <strong>' . $label . '</strong>' . "\n";
121 } else {
122 echo ' <a href="./server_engines.php'
123 . PMA_generate_common_url(
124 array('engine' => $_REQUEST['engine'], 'page' => $current))
125 . '">' . htmlspecialchars($label) . '</a>' . "\n";
128 unset($current, $label);
129 echo ' <strong>]</strong>' . "\n"
130 . '</p>' . "\n\n";
132 unset($infoPages, $page_output);
133 if (!empty($_REQUEST['page'])) {
134 $page_output = $engine_plugin->getPage($_REQUEST['page']);
136 if (!empty($page_output)) {
137 echo $page_output;
138 } else {
139 echo '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
140 . '</p>' . "\n"
141 . $engine_plugin->getHtmlVariables();
146 * Sends the footer
148 require_once './libraries/footer.inc.php';