* <div> tags were unneeded. Centering was already done in the table.
[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>
e7db48af 25<table width="95%" align="center" border="0" cellpadding="2" cellspacing="0">
26<tr><td bgcolor="<?php echo $color[0] ?>" align="center">
c36ed9cf 27
e7db48af 28 <b><?php echo _("Options") . ' - ' . _("Display Preferences"); ?></b><br>
29
30 <table width="100%" border="0" cellpadding="1" cellspacing="1">
31 <tr><td bgcolor="<?php echo $color[4] ?>" align="center">
32
33 <form name="f" action="options.php" method="post"><br>
34 <table width="100%" cellpadding="2" cellspacing="0" border="0">
c36ed9cf 35 <tr>
e8e0acdf 36 <td align="right" nowrap><?php echo _("Theme"); ?>:
c36ed9cf 37 </td><td>
8442ac08 38<?php
e8e0acdf 39 echo ' <tt><select name="chosentheme">' . "\n";
c36ed9cf 40 for ($i = 0; $i < count($theme); $i++) {
e8e0acdf 41 if ($theme[$i]['PATH'] == $chosen_theme)
42 echo ' <option selected value="'.$theme[$i]['PATH'].'">'.$theme[$i]['NAME']."\n";
c36ed9cf 43 else
e8e0acdf 44 echo ' <option value="'.$theme[$i]['PATH'].'">'.$theme[$i]['NAME']."\n";
c36ed9cf 45 }
e8e0acdf 46 echo ' </select></tt>';
c36ed9cf 47?>
48 </td>
49 </tr>
50 <tr>
ac53fb56 51 <td align="right" nowrap><?php echo _("Language"); ?>:
c36ed9cf 52 </td><td>
8442ac08 53<?php
e8e0acdf 54 echo ' <tt><select name="language">' . "\n";
441f2d33 55 foreach ($languages as $code => $name) {
c36ed9cf 56 if ($code==$chosen_language)
e8e0acdf 57 echo ' <OPTION SELECTED VALUE="'.$code.'">'.$languages[$code]['NAME']."\n";
c36ed9cf 58 else
f3b4824b 59 echo ' <OPTION VALUE="'.$code.'">'.$languages[$code]['NAME']."\n";
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>&nbsp;
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") . '&nbsp;&nbsp;&nbsp;&nbsp;';
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") . '&nbsp;&nbsp;&nbsp;&nbsp;';
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>
112 </tr>
113 <tr>
e8e0acdf 114 <td align="right" nowrap><?PHP echo _("Location of folder list") ?>:</td>
9a732bb6 115 <td><select name="folder_new_location">
116 <option value="left"<?PHP
117 if ($location_of_bar != 'right') echo ' SELECTED';
e190b5b0 118 ?>><?PHP echo _("Left"); ?></option>
9a732bb6 119 <option value="right"<?PHP
120 if ($location_of_bar == 'right') echo ' SELECTED';
e190b5b0 121 ?>><?PHP echo _("Right"); ?></option>
9a732bb6 122 </select>
123 </td>
124 </tr>
125 <tr>
e8e0acdf 126 <td align="right" nowrap><?PHP echo _("Location of buttons when composing") ?>:</td>
441f2d33 127 <td><select name="button_new_location">
128 <option value="top"<?PHP
129 if ($location_of_buttons == 'top') echo ' SELECTED';
e190b5b0 130 ?>><?PHP echo _("Before headers"); ?></option>
441f2d33 131 <option value="between"<?PHP
132 if ($location_of_buttons == 'between') echo ' SELECTED';
e190b5b0 133 ?>><?PHP echo _("Between headers and message body"); ?></option>
441f2d33 134 <option value="bottom"<?PHP
135 if ($location_of_buttons == 'bottom') echo ' SELECTED';
e190b5b0 136 ?>><?PHP echo _("After message body"); ?></option>
441f2d33 137 </select>
138 </td>
139 </tr>
140 <tr>
9a732bb6 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">';
166 if (($left_refresh == 'None') || ($left_refresh == ''))
167 echo ' <OPTION VALUE="None" SELECTED>'.$none_str;
c36ed9cf 168 else
38bb54ba 169 echo ' <OPTION VALUE="None">'.$none_str;
c36ed9cf 170
e7db48af 171 if (($left_refresh <= 300))
38bb54ba 172 echo ' <OPTION VALUE="300" SELECTED>5 '.$minutes_str;
c36ed9cf 173 else
38bb54ba 174 echo ' <OPTION VALUE="300">5 '.$minutes_str;
c36ed9cf 175
38bb54ba 176 if (($left_refresh == 720))
177 echo ' <OPTION VALUE="720" SELECTED>12 '.$minutes_str;
c36ed9cf 178 else
38bb54ba 179 echo ' <OPTION VALUE="720">12 '.$minutes_str;
c36ed9cf 180
38bb54ba 181 if (($left_refresh == 1200))
182 echo ' <OPTION VALUE="1200" SELECTED>20 '.$minutes_str;
c36ed9cf 183 else
38bb54ba 184 echo ' <OPTION VALUE="1200">20 '.$minutes_str;
c36ed9cf 185
e7db48af 186 if (($left_refresh == 3600))
187 echo ' <OPTION VALUE="3600" SELECTED>60 '.$minutes_str;
c36ed9cf 188 else
e7db48af 189 echo ' <OPTION VALUE="3600">60 '.$minutes_str;
c36ed9cf 190
e8e0acdf 191 echo ' </SELECT>';
c36ed9cf 192?>
193 </td>
194 </tr>
e2ab93e5 195 <tr>
ac53fb56 196 <td align="right">
197 <?php echo _("Use alternating row colors?") ?>
198 </td><td>
199<?php
200 if (isset($alt_index_colors) && $alt_index_colors == 1) {
201 $a = " checked";
202 $b = "";
203 } else {
204 $a = "";
205 $b = " checked";
206 }
207?>
208 <input type="radio" name="altIndexColors" value="1"<?php echo $a ?>> <?php echo _("Yes") ?> &nbsp;&nbsp;
209 <input type="radio" name="altIndexColors" value="0"<?php echo $b ?>> <?php echo _("No") ?><br>
210 </td>
211 </tr>
212 <tr>
213 <td align=right>
e2ab93e5 214 <?php echo _("Show HTML version by default"); ?>:
215 </td>
216 <td>
217 <input type=checkbox name=showhtmldefault <?php
218 if (isset($show_html_default) && $show_html_default)
219 echo " checked"; ?>>
220 <?php
221echo _("Yes, show me the HTML version of a mail message, if it is available.");
222 ?>
223 </td>
224 </tr>
e8e0acdf 225 <?php do_hook('options_display_inside'); ?>
c36ed9cf 226 <tr>
227 <td>&nbsp;
228 </td><td>
32f4685b 229 <input type="submit" value="<?php echo _("Submit"); ?>"name="submit_display">
c36ed9cf 230 </td>
231 </tr>
e7db48af 232 </table>
c36ed9cf 233 </form>
e7db48af 234
e8e0acdf 235 <?php do_hook('options_display_bottom'); ?>
e7db48af 236
237 </td></tr>
238 </table>
239
240</td></tr>
241</table>
c36ed9cf 242</body></html>