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