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