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