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