2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Common header for user preferences pages
8 if (!defined('PHPMYADMIN')) {
13 require './libraries/server_links.inc.php';
15 // build user preferences menu
17 $form_param = filter_input(INPUT_GET
, 'form');
18 if (! isset($forms[$form_param])) {
19 $forms_keys = array_keys($forms);
20 $form_param = array_shift($forms_keys);
23 'Features' => 'ic_b_tblops',
24 'Sql_queries' => 'ic_b_sql',
25 'Left_frame' => 'ic_b_select',
26 'Main_frame' => 'ic_b_props',
27 'Import' => 'ic_b_import',
28 'Export' => 'ic_b_export');
29 echo '<ul id="topmenu2">';
30 echo PMA_generate_html_tab(
32 'link' => 'prefs_manage.php',
33 'text' => __('Manage your settings')
36 echo '<li> </li>' . "\n";
37 $script_name = basename($GLOBALS['PMA_PHP_SELF']);
38 foreach (array_keys($forms) as $formset) {
40 'link' => 'prefs_forms.php',
41 'text' => PMA_lang('Form_' . $formset),
42 'icon' => $tabs_icons[$formset],
43 'active' => ($script_name == 'prefs_forms.php' && $formset == $form_param));
44 echo PMA_generate_html_tab($tab, array('form' => $formset)) . "\n";
46 echo '</ul><div class="clearfloat"></div>';
48 // show "configuration saved" message and reload navigation frame if needed
49 if (!empty($_GET['saved'])) {
50 $message = PMA_Message
::rawSuccess(__('Configuration has been saved'));
55 $arr = ConfigFile::getInstance()->getConfigArray();
57 foreach ($arr as $k => $v) {
58 $arr2[] = "<b>$k</b> " . var_export($v, true);
60 $arr2 = implode(', ', $arr2);
61 $arr2 .= '<br />Blacklist: ' . (empty($cfg['UserprefsDisallow'])
63 : implode(', ', $cfg['UserprefsDisallow']));
64 $msg = PMA_Message::notice('Settings: ' . $arr2);
68 // warn about using session storage for settings
69 $cfgRelation = PMA_getRelationsParam();
70 if (! $cfgRelation['userconfigwork']) {
71 $msg = __('Your preferences will be saved for current session only. Storing them permanently requires %sphpMyAdmin configuration storage%s.');
72 $msg = PMA_sanitize(sprintf($msg, '[a@./Documentation.html#linked-tables@_blank]', '[/a]'));
73 PMA_Message
::notice($msg)->display();