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