]>
Commit | Line | Data |
---|---|---|
40f57a9f | 1 | --- agata/agata.php.old Fri Dec 13 19:18:15 2002 |
2 | +++ agata/agata.php Fri Dec 13 19:44:39 2002 | |
3 | @@ -175,6 +175,8 @@ | |
4 | ||
5 | ||
6 | //Gtk::rc_parse('./AquaGraphite/gtk/gtkrc'); | |
7 | + | |
8 | +$aAgataConfig = parse_ini_file(getenv("HOME")."/.agata",TRUE); | |
9 | $agapp = new AgataMain(&$aAgataConfig, $aDescription, $setupScreenLanguage); | |
10 | Gtk::main(); | |
11 | ?> | |
12 | --- agata/config.php.old Fri Dec 13 19:43:24 2002 | |
13 | +++ agata/config.php Fri Dec 13 19:43:38 2002 | |
14 | @@ -1,105 +1,6 @@ | |
15 | <? | |
16 | $setupScreenLanguage = 'en'; | |
17 | ||
18 | -$aAgataConfig['sagu']['Project'] = 'Sagu'; | |
19 | -$aAgataConfig['sagu']['LoginHOST'] = '192.168.0.62'; | |
20 | -$aAgataConfig['sagu']['LoginDB'] = 'sagu'; | |
21 | -$aAgataConfig['sagu']['LoginUID'] = 'postgres'; | |
22 | -$aAgataConfig['sagu']['LoginPWD'] = ''; | |
23 | -$aAgataConfig['sagu']['Language'] = 'en'; | |
24 | -$aAgataConfig['sagu']['DataBase'] = 'pgsql'; | |
25 | -$aAgataConfig['sagu']['Theme'] = 'AquaGraphite'; | |
26 | -$aAgataConfig['sagu']['PsSoft'] = 'gv'; | |
27 | -$aAgataConfig['sagu']['TxtSoft'] = 'kwrite'; | |
28 | -$aAgataConfig['sagu']['DiaSoft'] = 'dia'; | |
29 | -$aAgataConfig['sagu']['BrowserSoft'] = 'konqueror'; | |
30 | -$aAgataConfig['sagu']['SpreadSoft'] = 'kspread'; | |
31 | -$aAgataConfig['sagu']['Precision'] = '2'; | |
32 | -$aAgataConfig['sagu']['ThouSep'] = '.'; | |
33 | -$aAgataConfig['sagu']['DecSep'] = ','; | |
34 | -$aAgataConfig['sagu']['DateFmt'] = 'd/m/Y'; | |
35 | -$aAgataConfig['sagu']['DateTimeFmt'] = 'd/m/Y'; | |
36 | -$aAgataConfig['sagu']['Orientation'] = 'Portrait'; | |
37 | -$aAgataConfig['sagu']['PsLineLen'] = '500'; | |
38 | - | |
39 | -$aAgataConfig['siga']['Project'] = 'Siga'; | |
40 | -$aAgataConfig['siga']['LoginHOST'] = '192.168.0.6'; | |
41 | -$aAgataConfig['siga']['LoginDB'] = 'dadosadv'; | |
42 | -$aAgataConfig['siga']['LoginUID'] = 'postgres'; | |
43 | -$aAgataConfig['siga']['LoginPWD'] = ''; | |
44 | -$aAgataConfig['siga']['Language'] = 'en'; | |
45 | -$aAgataConfig['siga']['DataBase'] = 'pgsql'; | |
46 | -$aAgataConfig['siga']['Theme'] = '4Missy'; | |
47 | -$aAgataConfig['siga']['PsSoft'] = 'gv'; | |
48 | -$aAgataConfig['siga']['TxtSoft'] = 'kwrite'; | |
49 | -$aAgataConfig['siga']['DiaSoft'] = 'dia'; | |
50 | -$aAgataConfig['siga']['BrowserSoft'] = 'konqueror'; | |
51 | -$aAgataConfig['siga']['SpreadSoft'] = 'kspread'; | |
52 | -$aAgataConfig['siga']['Precision'] = '2'; | |
53 | -$aAgataConfig['siga']['ThouSep'] = '.'; | |
54 | -$aAgataConfig['siga']['DecSep'] = ','; | |
55 | -$aAgataConfig['siga']['DateFmt'] = 'd/m/Y'; | |
56 | -$aAgataConfig['siga']['DateTimeFmt'] = 'd/m/Y'; | |
57 | -$aAgataConfig['siga']['Orientation'] = 'Portrait'; | |
58 | -$aAgataConfig['siga']['PsLineLen'] = '500'; | |
59 | - | |
60 | -$aAgataConfig['test']['Project'] = 'Teste'; | |
61 | -$aAgataConfig['test']['LoginHOST'] = 'SAMPLE'; | |
62 | -$aAgataConfig['test']['LoginDB'] = 'SAMPLE'; | |
63 | -$aAgataConfig['test']['LoginUID'] = 'db2inst1'; | |
64 | -$aAgataConfig['test']['LoginPWD'] = 'db2inst1'; | |
65 | -$aAgataConfig['test']['Language'] = 'pt'; | |
66 | -$aAgataConfig['test']['DataBase'] = 'odbc'; | |
67 | -$aAgataConfig['test']['Theme'] = '4Missy'; | |
68 | -$aAgataConfig['test']['PsSoft'] = 'gv'; | |
69 | -$aAgataConfig['test']['TxtSoft'] = 'kwrite'; | |
70 | -$aAgataConfig['test']['DiaSoft'] = 'dia'; | |
71 | -$aAgataConfig['test']['BrowserSoft'] = 'konqueror'; | |
72 | -$aAgataConfig['test']['SpreadSoft'] = 'kspread'; | |
73 | -$aAgataConfig['test']['Precision'] = '2'; | |
74 | -$aAgataConfig['test']['ThouSep'] = '.'; | |
75 | -$aAgataConfig['test']['DecSep'] = ','; | |
76 | -$aAgataConfig['test']['DateFmt'] = 'd/m/Y'; | |
77 | -$aAgataConfig['test']['DateTimeFmt'] = 'd/m/Y'; | |
78 | -$aAgataConfig['test']['Orientation'] = 'Portrait'; | |
79 | -$aAgataConfig['test']['PsLineLen'] = '500'; | |
80 | - | |
81 | -$aAgataConfig['gnuteca']['Project'] = 'Gnuteca'; | |
82 | -$aAgataConfig['gnuteca']['LoginHOST'] = '192.168.0.54'; | |
83 | -$aAgataConfig['gnuteca']['LoginDB'] = 'gnuteca'; | |
84 | -$aAgataConfig['gnuteca']['LoginUID'] = 'postgres'; | |
85 | -$aAgataConfig['gnuteca']['LoginPWD'] = ''; | |
86 | -$aAgataConfig['gnuteca']['Language'] = 'se'; | |
87 | -$aAgataConfig['gnuteca']['DataBase'] = 'pgsql'; | |
88 | -$aAgataConfig['gnuteca']['Theme'] = 'No theme'; | |
89 | -$aAgataConfig['gnuteca']['PsSoft'] = 'gv'; | |
90 | -$aAgataConfig['gnuteca']['TxtSoft'] = 'kwrite'; | |
91 | -$aAgataConfig['gnuteca']['DiaSoft'] = 'dia'; | |
92 | -$aAgataConfig['gnuteca']['BrowserSoft'] = 'konqueror'; | |
93 | -$aAgataConfig['gnuteca']['SpreadSoft'] = 'kspread'; | |
94 | -$aAgataConfig['gnuteca']['Precision'] = '2'; | |
95 | -$aAgataConfig['gnuteca']['ThouSep'] = '.'; | |
96 | -$aAgataConfig['gnuteca']['DecSep'] = ','; | |
97 | -$aAgataConfig['gnuteca']['DateFmt'] = 'd/m/Y'; | |
98 | -$aAgataConfig['gnuteca']['DateTimeFmt'] = 'd/m/Y'; | |
99 | -$aAgataConfig['gnuteca']['Orientation'] = 'Portrait'; | |
100 | -$aAgataConfig['gnuteca']['PsLineLen'] = '500'; | |
101 | - | |
102 | -$aAgataConfig['mysql']['Project'] = 'mysql'; | |
103 | -$aAgataConfig['mysql']['LoginHOST'] = '192.168.0.54'; | |
104 | -$aAgataConfig['mysql']['LoginDB'] = 'test'; | |
105 | -$aAgataConfig['mysql']['LoginUID'] = 'mysql'; | |
106 | -$aAgataConfig['mysql']['LoginPWD'] = ''; | |
107 | -$aAgataConfig['mysql']['Language'] = 'pt'; | |
108 | -$aAgataConfig['mysql']['DataBase'] = 'mysql'; | |
109 | -$aAgataConfig['mysql']['Theme'] = '4Missy'; | |
110 | -$aAgataConfig['mysql']['PsSoft'] = ''; | |
111 | -$aAgataConfig['mysql']['TxtSoft'] = ''; | |
112 | -$aAgataConfig['mysql']['BrowserSoft'] = ''; | |
113 | -$aAgataConfig['mysql']['SpreadSoft'] = ''; | |
114 | - | |
115 | - | |
116 | - | |
117 | $aDescription['Project'] = 'Project Name'; | |
118 | $aDescription['LoginHOST'] = 'IP Address of Database'; | |
119 | $aDescription['LoginDB'] = 'Database Name'; | |
120 | --- agata/config.ini.old Thu Jan 1 01:00:00 1970 | |
121 | +++ agata/config.ini Fri Dec 13 19:49:12 2002 | |
122 | @@ -0,0 +1,22 @@ | |
123 | +# [database] | |
124 | +# | |
125 | +# Project = Sagu | |
126 | +# LoginHOST = 192.168.0.62 | |
127 | +# LoginDB = sagu | |
128 | +# LoginUID = postgres | |
129 | +# LoginPWD = | |
130 | +# Language = en | |
131 | +# DataBase = pgsql | |
132 | +# Theme = AquaGraphite | |
133 | +# PsSoft = gv | |
134 | +# TxtSoft = kwrite | |
135 | +# DiaSoft = dia | |
136 | +# BrowserSoft = konqueror | |
137 | +# SpreadSoft = kspread | |
138 | +# Precision = 2 | |
139 | +# ThouSep = . | |
140 | +# DecSep = , | |
141 | +# DateFmt = d/m/Y | |
142 | +# DateTimeFmt = d/m/Y | |
143 | +# Orientation = Portrait | |
144 | +# PsLineLen = 500 | |
6e945261 | 145 | --- agata/classes/AgataCore.class.old Fri Dec 13 20:17:06 2002 |
146 | +++ agata/classes/AgataCore.class Fri Dec 13 20:23:32 2002 | |
147 | @@ -120,7 +120,7 @@ | |
148 | ||
149 | function GravaConfig($project, $Language = null) | |
150 | { | |
151 | - $fd = fopen ("config.php", "w"); | |
152 | + $fd = @fopen ("config.php", "w"); | |
153 | if ($fd) | |
154 | { | |
155 | fwrite ($fd, "<?\n"); | |
156 | @@ -133,6 +133,20 @@ | |
157 | fwrite ($fd, '$setupScreenLanguage = ' . "'" . $this->aAgataConfig[$project]['Language'] . "';\n\n"); | |
158 | } | |
159 | ||
160 | + fwrite($fd, "\n\n"); | |
161 | + | |
162 | + foreach($this->aDescription as $key => $Config) | |
163 | + { | |
164 | + $Description = $this->aDescription[$key]; | |
165 | + fwrite($fd, '$aDescription' . "['$key'] = '$Description';\n"); | |
166 | + } | |
167 | + fwrite ($fd, "?>\n"); | |
168 | + fclose($fd); | |
169 | + } | |
170 | + | |
171 | + $fd = @fopen (getenv("HOME")."/.agata", "w"); | |
172 | + if ($fd) | |
173 | + { | |
174 | if ($project=='+') | |
175 | { | |
176 | $project = $this->aAgataConfig[$project]['Project']; | |
177 | @@ -142,33 +156,24 @@ | |
178 | { | |
179 | if (is_array($Content)) | |
180 | { | |
181 | + if ($key=='+') | |
182 | + { | |
183 | + $key = $project; | |
184 | + } | |
185 | + fwrite($fd, "[$key]\n"); | |
186 | foreach ($Content as $Config => $Value) | |
187 | { | |
188 | - if ($key=='+') | |
189 | - { | |
190 | - $key = $project; | |
191 | - } | |
192 | - fwrite($fd, str_pad('$aAgataConfig' . "['$key']['$Config'] ",40, ' ', STR_PAD_RIGHT) . "= '$Value';\n"); | |
193 | + fwrite($fd, str_pad($Config,40,' ',STR_PAD_RIGHT)."= $Value\n"); | |
194 | } | |
195 | fwrite($fd, "\n"); | |
196 | } | |
197 | else if (($key != 'defaultConfiguration') && ($content)) | |
198 | { | |
199 | - fwrite($fd, '$aAgataConfig' . "['$key'] = '$Content';\n"); | |
200 | - fwrite($fd, "\n"); | |
201 | + fwrite($fd, "[$key]\n\n$Content\n"); // TESTME!!! | |
202 | } | |
203 | } | |
204 | - | |
205 | - fwrite($fd, "\n\n"); | |
206 | - | |
207 | - foreach($this->aDescription as $key => $Config) | |
208 | - { | |
209 | - $Description = $this->aDescription[$key]; | |
210 | - fwrite($fd, '$aDescription' . "['$key'] = '$Description';\n"); | |
211 | - } | |
212 | - fwrite ($fd, "?>\n"); | |
213 | - fclose($fd); | |
214 | } | |
215 | + | |
216 | } | |
217 | } | |
218 | ?> | |
219 | \ No newline at end of file |