Translation update done using Pootle.
[phpmyadmin/tyronm.git] / server_engines.php
blob4e5eeb3f0d8eb5fe748a800f911f5e149916c93a
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']
45 ? '<img class="icon ic_b_engine" src="themes/dot.gif" alt="" />' : '')
46 . "\n" . __('Storage Engines') . "\n"
47 . '</h2>' . "\n";
50 /**
51 * Displays the table header
53 echo '<table class="noclick">' . "\n"
54 . '<thead>' . "\n"
55 . '<tr><th>' . __('Storage Engine') . '</th>' . "\n"
56 . ' <th>' . __('Description') . '</th>' . "\n"
57 . '</tr>' . "\n"
58 . '</thead>' . "\n"
59 . '<tbody>' . "\n";
62 /**
63 * Listing the storage engines
65 $odd_row = true;
66 foreach (PMA_StorageEngine::getStorageEngines() as $engine => $details) {
67 echo '<tr class="'
68 . ($odd_row ? 'odd' : 'even')
69 . ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED'
70 ? ' disabled'
71 : '')
72 . '">' . "\n"
73 . ' <td><a href="./server_engines.php'
74 . PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
75 . ' ' . htmlspecialchars($details['Engine']) . "\n"
76 . ' </a></td>' . "\n"
77 . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
78 . '</tr>' . "\n";
79 $odd_row = !$odd_row;
82 $PMA_Config = $GLOBALS['PMA_Config'];
83 if ($PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST')) {
84 // Special case for PBMS daemon which is not listed as an engine
85 echo '<tr class="'
86 . ($odd_row ? 'odd' : 'even')
87 . '">' . "\n"
88 . ' <td><a href="./server_engines.php'
89 . PMA_generate_common_url(array('engine' => "PBMS")) . '">' . "\n"
90 . ' ' . "PBMS\n"
91 . ' </a></td>' . "\n"
92 . ' <td>' . htmlspecialchars("PrimeBase MediaStream (PBMS) daemon") . '</td>' . "\n"
93 . '</tr>' . "\n";
96 unset($odd_row, $engine, $details);
97 echo '</tbody>' . "\n"
98 . '</table>' . "\n";
100 } else {
103 * Displays details about a given Storage Engine
106 $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
107 echo '<h2>' . "\n"
108 . ($GLOBALS['cfg']['MainPageIconic']
109 ? '<img class="icon ic_b_engine" src="themes/dot.gif" alt="" />' : '')
110 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
111 . ' ' . PMA_showMySQLDocu('', $engine_plugin->getMysqlHelpPage()) . "\n"
112 . '</h2>' . "\n\n";
113 echo '<p>' . "\n"
114 . ' <em>' . "\n"
115 . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
116 . ' </em>' . "\n"
117 . '</p>' . "\n\n";
118 $infoPages = $engine_plugin->getInfoPages();
119 if (!empty($infoPages) && is_array($infoPages)) {
120 echo '<p>' . "\n"
121 . ' <strong>[</strong>' . "\n";
122 if (empty($_REQUEST['page'])) {
123 echo ' <strong>' . __('Variables') . '</strong>' . "\n";
124 } else {
125 echo ' <a href="./server_engines.php'
126 . PMA_generate_common_url(array('engine' => $_REQUEST['engine'])) . '">'
127 . __('Variables') . '</a>' . "\n";
129 foreach ($infoPages as $current => $label) {
130 echo ' <strong>|</strong>' . "\n";
131 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
132 echo ' <strong>' . $label . '</strong>' . "\n";
133 } else {
134 echo ' <a href="./server_engines.php'
135 . PMA_generate_common_url(
136 array('engine' => $_REQUEST['engine'], 'page' => $current))
137 . '">' . htmlspecialchars($label) . '</a>' . "\n";
140 unset($current, $label);
141 echo ' <strong>]</strong>' . "\n"
142 . '</p>' . "\n\n";
144 unset($infoPages, $page_output);
145 if (!empty($_REQUEST['page'])) {
146 $page_output = $engine_plugin->getPage($_REQUEST['page']);
148 if (!empty($page_output)) {
149 echo $page_output;
150 } else {
151 echo '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
152 . '</p>' . "\n"
153 . $engine_plugin->getHtmlVariables();
158 * Sends the footer
160 require './libraries/footer.inc.php';