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