lang
[phpmyadmin/crack.git] / libraries / db_config.lib.php3
blob14a6d88cff200dc3a4c8fd094c413f8c03dc9105
1 <?php
2 /* $Id$ */
4 /**
5 * Database based configuration system
6 * Robin Johnson <robbat2@users.sourceforge.net>
7 * May 19, 2002
8 */
10 if (!defined('PMA_DB_CONFIG_LIB_INCLUDED')) {
11 define('PMA_DB_CONFIG_LIB_INCLUDED', 1);
13 /**
14 * Converts attributes of an object to xml code
16 * Original obj2xml() function by <jgettys@gnuvox.com>
17 * as found on http://www.php.net/manual/en/function.get-defined-vars.php
18 * Fixed and improved by Robin Johnson <robbat2@users.sourceforge.net>
20 * @param object the source
21 * @param string identication
23 * @access public
25 function obj2xml($v, $indent = '') {
26 $attr = '';
27 while (list($key, $val) = each($v)) {
28 if (is_string($key) && ($key == '__attr')) {
29 continue;
32 // Check for __attr
33 if (is_object($val->__attr)) {
34 while (list($key2, $val2) = each($val->__attr)) {
35 $attr .= " $key2=\"$val2\"";
37 } else {
38 $attr = '';
41 // Preserve data type information
42 $attr .= ' type="' . gettype($val) . '"';
44 if (is_array($val) || is_object($val)) {
45 echo "$indent<$key$attr>\n";
46 obj2xml($val, $indent . ' ');
47 echo "$indent</$key>\n";
48 } else {
49 if (is_string($val) && ($val == '')) {
50 echo "$indent<$key$attr />\n";
51 } else {
52 echo "$indent<$key$attr>$val</$key>\n";
55 } // end while
56 } // end of the "obj2xml()" function
59 $cfg['DBConfig']['AllowUserOverride'] = array(
60 'Servers/*/bookmarkdb',
61 'Servers/*/bookmarktable',
62 'Servers/*/relation',
63 'Servers/*/pdf_table_position',
64 'ShowSQL',
65 'Confirm',
66 'LeftFrameLight',
67 'ShowTooltip',
68 'ShowBlob',
69 'NavigationBarIconic',
70 'ShowAll',
71 'MaxRows',
72 'Order',
73 'ProtectBinary',
74 'ShowFunctionFields',
75 'LeftWidth',
76 'LeftBgColor',
77 'LeftPointerColor',
78 'RightBgColor',
79 'Border',
80 'ThBgcolor',
81 'BgcolorOne',
82 'BgcolorTwo',
83 'BrowsePointerColor',
84 'BrowseMarkerColor',
85 'TextareaCols',
86 'TextareaRows',
87 'LimitChars',
88 'ModifyDeleteAtLeft',
89 'ModifyDeleteAtRight',
90 'DefaultDisplay',
91 'RepeatCells'
94 } // $__PMA_DB_CONFIG_LIB__