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