c36ed9cf |
1 | <?php |
2 | /** |
3 | ** options_display.php |
4 | ** |
5 | ** Copyright (c) 1999-2000 The SquirrelMail development team |
6 | ** Licensed under the GNU GPL. For full terms see the file COPYING. |
7 | ** |
8 | ** Displays all optinos about display preferences |
9 | ** |
245a6892 |
10 | ** $Id$ |
c36ed9cf |
11 | **/ |
12 | |
f740c049 |
13 | include('../src/validate.php'); |
14 | include('../functions/strings.php'); |
15 | include('../config/config.php'); |
16 | include('../functions/page_header.php'); |
17 | include('../functions/display_messages.php'); |
18 | include('../functions/imap.php'); |
19 | include('../functions/array.php'); |
20 | include('../functions/i18n.php'); |
176ed7de |
21 | include('../functions/plugin.php'); |
e8e0acdf |
22 | include('../src/load_prefs.php'); |
f740c049 |
23 | |
e8e0acdf |
24 | displayPageHeader($color, 'None'); |
25 | $chosen_language = getPref($data_dir, $username, 'language'); |
c36ed9cf |
26 | ?> |
e9f8ea4e |
27 | <br> |
e8e0acdf |
28 | <table width="95%" align="center" border="0" cellpadding="2" cellspacing="0"><tr><td bgcolor="<?php echo $color[0] ?>"> |
29 | <center><b><?php echo _("Options") . ' - ' . _("Display Preferences"); ?></b></center> |
c36ed9cf |
30 | </td></tr></table> |
31 | |
e8e0acdf |
32 | <form name="f" action="options.php" method="post"> |
33 | <table width="100%" cellpadding="0" cellspacing="2" border="0"> |
c36ed9cf |
34 | <tr> |
e8e0acdf |
35 | <td align="right" nowrap><?php echo _("Theme"); ?>: |
c36ed9cf |
36 | </td><td> |
8442ac08 |
37 | <?php |
e8e0acdf |
38 | echo ' <tt><select name="chosentheme">' . "\n"; |
c36ed9cf |
39 | for ($i = 0; $i < count($theme); $i++) { |
e8e0acdf |
40 | if ($theme[$i]['PATH'] == $chosen_theme) |
41 | echo ' <option selected value="'.$theme[$i]['PATH'].'">'.$theme[$i]['NAME']."\n"; |
c36ed9cf |
42 | else |
e8e0acdf |
43 | echo ' <option value="'.$theme[$i]['PATH'].'">'.$theme[$i]['NAME']."\n"; |
c36ed9cf |
44 | } |
e8e0acdf |
45 | echo ' </select></tt>'; |
c36ed9cf |
46 | ?> |
47 | </td> |
48 | </tr> |
49 | <tr> |
e8e0acdf |
50 | <td valign="top" align="right" nowrap><?php echo _("Language"); ?>: |
c36ed9cf |
51 | </td><td> |
8442ac08 |
52 | <?php |
e8e0acdf |
53 | echo ' <tt><select name="language">' . "\n"; |
441f2d33 |
54 | foreach ($languages as $code => $name) { |
c36ed9cf |
55 | if ($code==$chosen_language) |
e8e0acdf |
56 | echo ' <OPTION SELECTED VALUE="'.$code.'">'.$languages[$code]['NAME']."\n"; |
c36ed9cf |
57 | else |
f3b4824b |
58 | echo ' <OPTION VALUE="'.$code.'">'.$languages[$code]['NAME']."\n"; |
441f2d33 |
59 | } |
e8e0acdf |
60 | echo ' </select></tt>'; |
441f2d33 |
61 | if (! $use_gettext) |
b61ed24d |
62 | echo '<br><small>This system doesn\'t support multiple languages</small>'; |
441f2d33 |
63 | |
c36ed9cf |
64 | ?> |
65 | </td> |
66 | <tr> |
67 | <td align=right nowrap> |
e8e0acdf |
68 | <?php echo _("Use Javascript or HTML addressbook?") . '</td><td>'; |
c36ed9cf |
69 | if ($use_javascript_addr_book == true) { |
e8e0acdf |
70 | echo ' <input type="radio" name="javascript_abook" value="1" checked> ' . _("JavaScript") . ' '; |
71 | echo ' <input type="radio" name="javascript_abook" value="0"> ' . _("HTML"); |
c36ed9cf |
72 | } else { |
e8e0acdf |
73 | echo ' <input type="radio" name="javascript_abook" value="1"> ' . _("JavaScript") . ' '; |
74 | echo ' <input type="radio" name="javascript_abook" value="0" checked> ' . _("HTML"); |
c36ed9cf |
75 | } |
76 | ?> |
77 | </td> |
78 | </tr> |
79 | <tr> |
6170c5b6 |
80 | <td align=right nowrap><?php echo _("Number of Messages to Index"); ?>: |
c36ed9cf |
81 | </td><td> |
8442ac08 |
82 | <?php |
c36ed9cf |
83 | if (isset($show_num)) |
e8e0acdf |
84 | echo ' <tt><input type="text" size="5" name="shownum" value="'.$show_num.'"></tt><br>'; |
c36ed9cf |
85 | else |
e8e0acdf |
86 | echo ' <tt><input type="text" size="5" name="shownum" value="25"></tt><br>'; |
c36ed9cf |
87 | ?> |
88 | </td> |
89 | </tr> |
90 | <tr> |
e8e0acdf |
91 | <td align="right" nowrap><?php echo _("Wrap incoming text at"); ?>: |
c36ed9cf |
92 | </td><td> |
8442ac08 |
93 | <?php |
c36ed9cf |
94 | if (isset($wrap_at)) |
e8e0acdf |
95 | echo ' <tt><input type="text" size="5" name="wrapat" value="'.$wrap_at.'"></tt><br>'; |
c36ed9cf |
96 | else |
e8e0acdf |
97 | echo ' <tt><input type="tex" size="5" name="wrapat" value="86"></tt><br>'; |
c36ed9cf |
98 | ?> |
99 | </td> |
100 | </tr> |
101 | <tr> |
e8e0acdf |
102 | <td align="right" nowrap><?php echo _("Size of editor window"); ?>: |
c36ed9cf |
103 | </td><td> |
8442ac08 |
104 | <?php |
c36ed9cf |
105 | if ($editor_size >= 10 && $editor_size <= 255) |
e8e0acdf |
106 | echo ' <tt><input type="text" size="5" name="editorsize" value="'.$editor_size.'"></tt><br>'; |
c36ed9cf |
107 | else |
e8e0acdf |
108 | echo ' <tt><input type="text" size="5" name="editorsize" value="76"></tt><br>'; |
c36ed9cf |
109 | ?> |
110 | </td> |
111 | </tr> |
112 | <tr> |
e8e0acdf |
113 | <td align="right" nowrap><?PHP echo _("Location of folder list") ?>:</td> |
9a732bb6 |
114 | <td><select name="folder_new_location"> |
115 | <option value="left"<?PHP |
116 | if ($location_of_bar != 'right') echo ' SELECTED'; |
e190b5b0 |
117 | ?>><?PHP echo _("Left"); ?></option> |
9a732bb6 |
118 | <option value="right"<?PHP |
119 | if ($location_of_bar == 'right') echo ' SELECTED'; |
e190b5b0 |
120 | ?>><?PHP echo _("Right"); ?></option> |
9a732bb6 |
121 | </select> |
122 | </td> |
123 | </tr> |
441f2d33 |
124 | <tr> |
e8e0acdf |
125 | <td align="right" nowrap><?PHP echo _("Location of buttons when composing") ?>:</td> |
441f2d33 |
126 | <td><select name="button_new_location"> |
127 | <option value="top"<?PHP |
128 | if ($location_of_buttons == 'top') echo ' SELECTED'; |
e190b5b0 |
129 | ?>><?PHP echo _("Before headers"); ?></option> |
441f2d33 |
130 | <option value="between"<?PHP |
131 | if ($location_of_buttons == 'between') echo ' SELECTED'; |
e190b5b0 |
132 | ?>><?PHP echo _("Between headers and message body"); ?></option> |
441f2d33 |
133 | <option value="bottom"<?PHP |
134 | if ($location_of_buttons == 'bottom') echo ' SELECTED'; |
e190b5b0 |
135 | ?>><?PHP echo _("After message body"); ?></option> |
441f2d33 |
136 | </select> |
137 | </td> |
138 | </tr> |
9a732bb6 |
139 | <tr> |
140 | <td align=right nowrap><?php echo _("Width of folder list"); ?>: |
c36ed9cf |
141 | </td><td> |
8442ac08 |
142 | <?php |
e8e0acdf |
143 | echo ' <select name="leftsize">' . "\n"; |
176ed7de |
144 | for ($i = 100; $i <= 300; $i += 10) |
145 | { |
146 | if ($left_size >= $i && $left_size < $i + 10) |
147 | echo "<option value=\"$i\" selected>$i pixels\n"; |
148 | else |
149 | echo "<option value=\"$i\">$i pixels\n"; |
150 | } |
38bb54ba |
151 | echo ' </select>'; |
c36ed9cf |
152 | ?> |
153 | </td> |
154 | </tr> |
155 | <tr> |
38bb54ba |
156 | <td align="right" nowrap><?php echo _("Auto refresh folder list"); ?>: |
c36ed9cf |
157 | </td><td> |
8442ac08 |
158 | <?php |
1de36f81 |
159 | $seconds_str = _("Seconds"); |
160 | $none_str = _("None"); |
161 | $minute_str = _("Minute"); |
162 | $minutes_str = _("Minutes"); |
163 | |
38bb54ba |
164 | echo ' <SELECT name="leftrefresh">'; |
165 | if (($left_refresh == 'None') || ($left_refresh == '')) |
166 | echo ' <OPTION VALUE="None" SELECTED>'.$none_str; |
c36ed9cf |
167 | else |
38bb54ba |
168 | echo ' <OPTION VALUE="None">'.$none_str; |
c36ed9cf |
169 | |
38bb54ba |
170 | if (($left_refresh == 10)) |
171 | echo ' <OPTION VALUE="10" SELECTED>10 '.$seconds_str; |
c36ed9cf |
172 | else |
38bb54ba |
173 | echo ' <OPTION VALUE="10">10 '.$seconds_str; |
c36ed9cf |
174 | |
38bb54ba |
175 | if (($left_refresh == 20)) |
176 | echo ' <OPTION VALUE="20" SELECTED>20 '.$seconds_str; |
c36ed9cf |
177 | else |
38bb54ba |
178 | echo ' <OPTION VALUE="20">20 '.$seconds_str; |
c36ed9cf |
179 | |
38bb54ba |
180 | if (($left_refresh == 30)) |
181 | echo ' <OPTION VALUE="30" SELECTED>30 '.$seconds_str; |
c36ed9cf |
182 | else |
38bb54ba |
183 | echo ' <OPTION VALUE="30">30 '.$seconds_str; |
c36ed9cf |
184 | |
38bb54ba |
185 | if (($left_refresh == 60)) |
186 | echo ' <OPTION VALUE="60" SELECTED>1 '.$minute_str; |
c36ed9cf |
187 | else |
38bb54ba |
188 | echo ' <OPTION VALUE="60">1 '.$minute_str; |
c36ed9cf |
189 | |
38bb54ba |
190 | if (($left_refresh == 120)) |
191 | echo ' <OPTION VALUE="120" SELECTED>2 '.$minutes_str; |
c36ed9cf |
192 | else |
38bb54ba |
193 | echo ' <OPTION VALUE="120">2 '.$minutes_str; |
c36ed9cf |
194 | |
38bb54ba |
195 | if (($left_refresh == 180)) |
196 | echo ' <OPTION VALUE="180" SELECTED>3 '.$minutes_str; |
c36ed9cf |
197 | else |
38bb54ba |
198 | echo ' <OPTION VALUE="180">3 '.$minutes_str; |
c36ed9cf |
199 | |
38bb54ba |
200 | if (($left_refresh == 240)) |
201 | echo ' <OPTION VALUE="240" SELECTED>4 '.$minutes_str; |
c36ed9cf |
202 | else |
38bb54ba |
203 | echo ' <OPTION VALUE="240">4 '.$minutes_str; |
c36ed9cf |
204 | |
38bb54ba |
205 | if (($left_refresh == 300)) |
206 | echo ' <OPTION VALUE="300" SELECTED>5 '.$minutes_str; |
c36ed9cf |
207 | else |
38bb54ba |
208 | echo ' <OPTION VALUE="300">5 '.$minutes_str; |
c36ed9cf |
209 | |
38bb54ba |
210 | if (($left_refresh == 420)) |
211 | echo ' <OPTION VALUE="420" SELECTED>7 '.$minutes_str; |
c36ed9cf |
212 | else |
38bb54ba |
213 | echo ' <OPTION VALUE="420">7 '.$minutes_str; |
c36ed9cf |
214 | |
38bb54ba |
215 | if (($left_refresh == 600)) |
216 | echo ' <OPTION VALUE="600" SELECTED>10 '.$minutes_str; |
c36ed9cf |
217 | else |
b61ed24d |
218 | echo ' <OPTION VALUE="600">10 '.$minutes_str; |
c36ed9cf |
219 | |
38bb54ba |
220 | if (($left_refresh == 720)) |
221 | echo ' <OPTION VALUE="720" SELECTED>12 '.$minutes_str; |
c36ed9cf |
222 | else |
38bb54ba |
223 | echo ' <OPTION VALUE="720">12 '.$minutes_str; |
c36ed9cf |
224 | |
38bb54ba |
225 | if (($left_refresh == 900)) |
226 | echo ' <OPTION VALUE="900" SELECTED>15 '.$minutes_str; |
c36ed9cf |
227 | else |
38bb54ba |
228 | echo ' <OPTION VALUE="900">15 '.$minutes_str; |
c36ed9cf |
229 | |
38bb54ba |
230 | if (($left_refresh == 1200)) |
231 | echo ' <OPTION VALUE="1200" SELECTED>20 '.$minutes_str; |
c36ed9cf |
232 | else |
38bb54ba |
233 | echo ' <OPTION VALUE="1200">20 '.$minutes_str; |
c36ed9cf |
234 | |
38bb54ba |
235 | if (($left_refresh == 1500)) |
236 | echo ' <OPTION VALUE="1500" SELECTED>25 '.$minutes_str; |
c36ed9cf |
237 | else |
38bb54ba |
238 | echo' <OPTION VALUE="1500">25 '.$minutes_str; |
c36ed9cf |
239 | |
38bb54ba |
240 | if (($left_refresh == 1800)) |
241 | echo ' <OPTION VALUE="1800" SELECTED>30 '.$minutes_str; |
c36ed9cf |
242 | else |
38bb54ba |
243 | echo ' <OPTION VALUE="1800">30 '.$minutes_str; |
c36ed9cf |
244 | |
e8e0acdf |
245 | echo ' </SELECT>'; |
c36ed9cf |
246 | ?> |
247 | </td> |
248 | </tr> |
e2ab93e5 |
249 | <tr> |
250 | <td valign=top align=right> |
251 | <?php echo _("Show HTML version by default"); ?>: |
252 | </td> |
253 | <td> |
254 | <input type=checkbox name=showhtmldefault <?php |
255 | if (isset($show_html_default) && $show_html_default) |
256 | echo " checked"; ?>> |
257 | <?php |
258 | echo _("Yes, show me the HTML version of a mail message, if it is available."); |
259 | ?> |
260 | </td> |
261 | </tr> |
e8e0acdf |
262 | <?php do_hook('options_display_inside'); ?> |
c36ed9cf |
263 | <tr> |
264 | <td> |
265 | </td><td> |
32f4685b |
266 | <input type="submit" value="<?php echo _("Submit"); ?>"name="submit_display"> |
c36ed9cf |
267 | </td> |
268 | </tr> |
269 | </table> |
270 | </form> |
e8e0acdf |
271 | <?php do_hook('options_display_bottom'); ?> |
c36ed9cf |
272 | </body></html> |