Direct Messaging Module updates for improved reliability, security, and useability
[openemr.git] / phpmyadmin / server_engines.php
blob7ca28d10aa9994f2eca189ca5d8e0ce90ebd7c86
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 * 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 if (empty($_REQUEST['engine'])
24 || ! PMA_StorageEngine::isValid($_REQUEST['engine'])
25 ) {
27 /**
28 * Displays the sub-page heading
30 echo '<h2>' . "\n"
31 . PMA_Util::getImage('b_engine.png')
32 . "\n" . __('Storage Engines') . "\n"
33 . '</h2>' . "\n";
36 /**
37 * Displays the table header
39 echo '<table class="noclick">' . "\n"
40 . '<thead>' . "\n"
41 . '<tr><th>' . __('Storage Engine') . '</th>' . "\n"
42 . ' <th>' . __('Description') . '</th>' . "\n"
43 . '</tr>' . "\n"
44 . '</thead>' . "\n"
45 . '<tbody>' . "\n";
48 /**
49 * Listing the storage engines
51 $odd_row = true;
52 foreach (PMA_StorageEngine::getStorageEngines() as $engine => $details) {
53 echo '<tr class="'
54 . ($odd_row ? 'odd' : 'even')
55 . ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED'
56 ? ' disabled'
57 : '')
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 echo '</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 echo '<h2>' . "\n"
80 . PMA_Util::getImage('b_engine.png')
81 . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
82 . ' ' . PMA_Util::showMySQLDocu('', $engine_plugin->getMysqlHelpPage()) . "\n"
83 . '</h2>' . "\n\n";
84 echo '<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 echo '<p>' . "\n"
92 . ' <strong>[</strong>' . "\n";
93 if (empty($_REQUEST['page'])) {
94 echo ' <strong>' . __('Variables') . '</strong>' . "\n";
95 } else {
96 echo ' <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 echo ' <strong>|</strong>' . "\n";
102 if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
103 echo ' <strong>' . $label . '</strong>' . "\n";
104 } else {
105 echo ' <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 echo ' <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 echo $page_output;
122 } else {
123 echo '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
124 . '</p>' . "\n"
125 . $engine_plugin->getHtmlVariables();