Translation update done using Pootle.
[phpmyadmin/madhuracj.git] / server_engines.php
blob9dcfc12cf45561a8c6c4fe63cef2303ad2e0bf76
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 $PMA_Config = $GLOBALS['PMA_Config'];
82 if ($PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST')) {
83 // Special case for PBMS daemon which is not listed as an engine
84 echo '<tr class="'
85 . ($odd_row ? 'odd' : 'even')
86 . '">' . "\n"
87 . ' <td><a href="./server_engines.php'
88 . PMA_generate_common_url(array('engine' => "PBMS")) . '">' . "\n"
89 . ' ' . "PBMS\n"
90 . ' </a></td>' . "\n"
91 . ' <td>' . htmlspecialchars("PrimeBase MediaStream (PBMS) daemon") . '</td>' . "\n"
92 . '</tr>' . "\n";
95 unset($odd_row, $engine, $details);
96 echo '</tbody>' . "\n"
97 . '</table>' . "\n";
99 } else {
102 * Displays details about a given Storage Engine
105 $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
106 echo '<h2>' . "\n"
107 . ($GLOBALS['cfg']['MainPageIconic'] ? PMA_getImage('b_engine.png') : '')
108 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
109 . ' ' . PMA_showMySQLDocu('', $engine_plugin->getMysqlHelpPage()) . "\n"
110 . '</h2>' . "\n\n";
111 echo '<p>' . "\n"
112 . ' <em>' . "\n"
113 . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
114 . ' </em>' . "\n"
115 . '</p>' . "\n\n";
116 $infoPages = $engine_plugin->getInfoPages();
117 if (!empty($infoPages) && is_array($infoPages)) {
118 echo '<p>' . "\n"
119 . ' <strong>[</strong>' . "\n";
120 if (empty($_REQUEST['page'])) {
121 echo ' <strong>' . __('Variables') . '</strong>' . "\n";
122 } else {
123 echo ' <a href="./server_engines.php'
124 . PMA_generate_common_url(array('engine' => $_REQUEST['engine'])) . '">'
125 . __('Variables') . '</a>' . "\n";
127 foreach ($infoPages as $current => $label) {
128 echo ' <strong>|</strong>' . "\n";
129 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
130 echo ' <strong>' . $label . '</strong>' . "\n";
131 } else {
132 echo ' <a href="./server_engines.php'
133 . PMA_generate_common_url(
134 array('engine' => $_REQUEST['engine'], 'page' => $current))
135 . '">' . htmlspecialchars($label) . '</a>' . "\n";
138 unset($current, $label);
139 echo ' <strong>]</strong>' . "\n"
140 . '</p>' . "\n\n";
142 unset($infoPages, $page_output);
143 if (!empty($_REQUEST['page'])) {
144 $page_output = $engine_plugin->getPage($_REQUEST['page']);
146 if (!empty($page_output)) {
147 echo $page_output;
148 } else {
149 echo '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
150 . '</p>' . "\n"
151 . $engine_plugin->getHtmlVariables();
156 * Sends the footer
158 require './libraries/footer.inc.php';