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