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