Translated using Weblate.
[phpmyadmin.git] / server_engines.php
blobd7fd4ce4e0755552e8416e8ab8efaef6eee6f5aa
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * display list of server engines and additonal information about them
6 * @package PhpMyAdmin
7 */
9 /**
10 * no need for variables importing
11 * @ignore
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'] ? PMA_getImage('b_engine.png') : '')
45 . "\n" . __('Storage Engines') . "\n"
46 . '</h2>' . "\n";
49 /**
50 * Displays the table header
52 echo '<table class="noclick">' . "\n"
53 . '<thead>' . "\n"
54 . '<tr><th>' . __('Storage Engine') . '</th>' . "\n"
55 . ' <th>' . __('Description') . '</th>' . "\n"
56 . '</tr>' . "\n"
57 . '</thead>' . "\n"
58 . '<tbody>' . "\n";
61 /**
62 * Listing the storage engines
64 $odd_row = true;
65 foreach (PMA_StorageEngine::getStorageEngines() as $engine => $details) {
66 echo '<tr class="'
67 . ($odd_row ? 'odd' : 'even')
68 . ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED'
69 ? ' disabled'
70 : '')
71 . '">' . "\n"
72 . ' <td><a href="./server_engines.php'
73 . PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
74 . ' ' . htmlspecialchars($details['Engine']) . "\n"
75 . ' </a></td>' . "\n"
76 . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
77 . '</tr>' . "\n";
78 $odd_row = !$odd_row;
81 unset($odd_row, $engine, $details);
82 echo '</tbody>' . "\n"
83 . '</table>' . "\n";
85 } else {
87 /**
88 * Displays details about a given Storage Engine
91 $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
92 echo '<h2>' . "\n"
93 . ($GLOBALS['cfg']['MainPageIconic'] ? PMA_getImage('b_engine.png') : '')
94 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
95 . ' ' . PMA_showMySQLDocu('', $engine_plugin->getMysqlHelpPage()) . "\n"
96 . '</h2>' . "\n\n";
97 echo '<p>' . "\n"
98 . ' <em>' . "\n"
99 . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
100 . ' </em>' . "\n"
101 . '</p>' . "\n\n";
102 $infoPages = $engine_plugin->getInfoPages();
103 if (!empty($infoPages) && is_array($infoPages)) {
104 echo '<p>' . "\n"
105 . ' <strong>[</strong>' . "\n";
106 if (empty($_REQUEST['page'])) {
107 echo ' <strong>' . __('Variables') . '</strong>' . "\n";
108 } else {
109 echo ' <a href="./server_engines.php'
110 . PMA_generate_common_url(array('engine' => $_REQUEST['engine'])) . '">'
111 . __('Variables') . '</a>' . "\n";
113 foreach ($infoPages as $current => $label) {
114 echo ' <strong>|</strong>' . "\n";
115 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
116 echo ' <strong>' . $label . '</strong>' . "\n";
117 } else {
118 echo ' <a href="./server_engines.php'
119 . PMA_generate_common_url(
120 array('engine' => $_REQUEST['engine'], 'page' => $current))
121 . '">' . htmlspecialchars($label) . '</a>' . "\n";
124 unset($current, $label);
125 echo ' <strong>]</strong>' . "\n"
126 . '</p>' . "\n\n";
128 unset($infoPages, $page_output);
129 if (!empty($_REQUEST['page'])) {
130 $page_output = $engine_plugin->getPage($_REQUEST['page']);
132 if (!empty($page_output)) {
133 echo $page_output;
134 } else {
135 echo '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
136 . '</p>' . "\n"
137 . $engine_plugin->getHtmlVariables();
142 * Sends the footer
144 require './libraries/footer.inc.php';