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