Translated using Weblate (Estonian)
[phpmyadmin.git] / server_engines.php
blobb0f695534160a2aacca95b9c89704606db80c3bc
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * display list of server engines and additional information about them
6 * @package PhpMyAdmin
7 */
9 /**
10 * requirements
12 require_once 'libraries/common.inc.php';
14 /**
15 * Does the common work
17 require 'libraries/server_common.inc.php';
18 require 'libraries/StorageEngine.class.php';
20 /**
21 * Did the user request information about a certain storage engine?
23 $html = '';
24 if (empty($_REQUEST['engine'])
25 || ! PMA_StorageEngine::isValid($_REQUEST['engine'])
26 ) {
28 /**
29 * Displays the sub-page heading
31 $html .= '<h2>' . "\n"
32 . PMA_Util::getImage('b_engine.png')
33 . "\n" . __('Storage Engines') . "\n"
34 . '</h2>' . "\n";
37 /**
38 * Displays the table header
40 $html .= '<table class="noclick">' . "\n"
41 . '<thead>' . "\n"
42 . '<tr><th>' . __('Storage Engine') . '</th>' . "\n"
43 . ' <th>' . __('Description') . '</th>' . "\n"
44 . '</tr>' . "\n"
45 . '</thead>' . "\n"
46 . '<tbody>' . "\n";
49 /**
50 * Listing the storage engines
52 $odd_row = true;
53 foreach (PMA_StorageEngine::getStorageEngines() as $engine => $details) {
54 $html .= '<tr class="'
55 . ($odd_row ? 'odd' : 'even')
56 . ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED'
57 ? ' disabled' : '')
58 . '">' . "\n"
59 . ' <td><a rel="newpage" href="server_engines.php'
60 . PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
61 . ' ' . htmlspecialchars($details['Engine']) . "\n"
62 . ' </a></td>' . "\n"
63 . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
64 . '</tr>' . "\n";
65 $odd_row = !$odd_row;
68 unset($odd_row, $engine, $details);
69 $html .= '</tbody>' . "\n"
70 . '</table>' . "\n";
72 } else {
74 /**
75 * Displays details about a given Storage Engine
78 $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
79 $html .= '<h2>' . "\n"
80 . PMA_Util::getImage('b_engine.png')
81 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
82 . ' ' . PMA_Util::showMySQLDocu('', $engine_plugin->getMysqlHelpPage())
83 . "\n" . '</h2>' . "\n\n";
84 $html .= '<p>' . "\n"
85 . ' <em>' . "\n"
86 . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
87 . ' </em>' . "\n"
88 . '</p>' . "\n\n";
89 $infoPages = $engine_plugin->getInfoPages();
90 if (! empty($infoPages) && is_array($infoPages)) {
91 $html .= '<p>' . "\n"
92 . ' <strong>[</strong>' . "\n";
93 if (empty($_REQUEST['page'])) {
94 $html .= ' <strong>' . __('Variables') . '</strong>' . "\n";
95 } else {
96 $html .= ' <a href="server_engines.php'
97 . PMA_generate_common_url(array('engine' => $_REQUEST['engine']))
98 . '">' . __('Variables') . '</a>' . "\n";
100 foreach ($infoPages as $current => $label) {
101 $html .= ' <strong>|</strong>' . "\n";
102 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
103 $html .= ' <strong>' . $label . '</strong>' . "\n";
104 } else {
105 $html .= ' <a href="server_engines.php'
106 . PMA_generate_common_url(
107 array('engine' => $_REQUEST['engine'], 'page' => $current)
109 . '">' . htmlspecialchars($label) . '</a>' . "\n";
112 unset($current, $label);
113 $html .= ' <strong>]</strong>' . "\n"
114 . '</p>' . "\n\n";
116 unset($infoPages, $page_output);
117 if (! empty($_REQUEST['page'])) {
118 $page_output = $engine_plugin->getPage($_REQUEST['page']);
120 if (! empty($page_output)) {
121 $html .= $page_output;
122 } else {
123 $html .= '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
124 . '</p>' . "\n"
125 . $engine_plugin->getHtmlVariables();
129 $response = PMA_Response::getInstance();
130 $response->addHTML($html);