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 | |
ff8a98e7 |
13 | require_once('../src/validate.php'); |
14 | require_once('../functions/display_messages.php'); |
15 | require_once('../functions/imap.php'); |
16 | require_once('../functions/array.php'); |
17 | require_once('../functions/plugin.php'); |
45cfc124 |
18 | require_once('../functions/options.php'); |
19 | |
e8e0acdf |
20 | displayPageHeader($color, 'None'); |
45cfc124 |
21 | $chosen_language = getPref($data_dir, $username, 'language'); |
c36ed9cf |
22 | ?> |
e9f8ea4e |
23 | <br> |
e7db48af |
24 | <table width="95%" align="center" border="0" cellpadding="2" cellspacing="0"> |
25 | <tr><td bgcolor="<?php echo $color[0] ?>" align="center"> |
c36ed9cf |
26 | |
cd41fc8d |
27 | <b><?php echo _("Options") . ' - ' . _("Display Preferences"); ?></b><br> |
e7db48af |
28 | |
cd41fc8d |
29 | <table width="100%" border="0" cellpadding="1" cellspacing="1"> |
30 | <tr><td bgcolor="<?php echo $color[4] ?>" align="center"> |
e7db48af |
31 | |
32 | <form name="f" action="options.php" method="post"><br> |
33 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> |
8442ac08 |
34 | <?php |
45cfc124 |
35 | OptionSelect( _("Theme"), 'chosentheme', $theme, $chosen_theme, 'NAME', 'PATH' ); |
36 | OptionSelect( _("Language"), 'language', $languages, $chosen_language, 'NAME' ); |
37 | OptionRadio( _("Use Javascript or HTML addressbook?"), |
38 | 'javascript_abook', |
39 | array( '1' => _("JavaScript"), |
40 | '0' => _("HTML") ), |
41 | $use_javascript_addr_book ); |
a3ec3c91 |
42 | |
43 | /*** BEGIN OPTIONS CLASS EXPERMINENTATION ***/ |
44 | |
45 | /* Build a simple array with which to start. */ |
46 | $optvals = array(); |
47 | |
48 | |
49 | /* Set values for the "use javascript" option. */ |
50 | $optvals[] = array( |
51 | 'name' => 'javascript_setting', |
52 | 'caption' =>_("Use Javascript"), |
53 | 'type' => SMOPT_TYPE_STRLIST, |
54 | 'refresh' => SMOPT_REFRESH_ALL, |
55 | 'posvals' => array(SMPREF_JS_AUTODETECT => _("Autodetect"), |
56 | SMPREF_JS_ON => _("Always"), |
57 | SMPREF_JS_OFF => _("Never")) |
58 | ); |
59 | |
60 | $js_autodetect_results = SMPREF_JS_OFF; |
61 | $optvals[] = array( |
62 | 'name' => 'js_autodetect_results', |
63 | 'caption' => '', |
64 | 'type' => SMOPT_TYPE_HIDDEN, |
65 | 'refresh' => SMOPT_REFRESH_NONE |
66 | ); |
67 | |
68 | $optvals[] = array( |
69 | 'name' => 'show_num', |
70 | 'caption' => _("Number of Messages to Index"), |
71 | 'type' => SMOPT_TYPE_INTEGER, |
72 | 'refresh' => SMOPT_REFRESH_NONE |
73 | ); |
74 | |
75 | $optvals[] = array( |
76 | 'name' => 'wrap_at', |
77 | 'caption' => _("Wrap Incoming Text At"), |
78 | 'type' => SMOPT_TYPE_INTEGER, |
79 | 'refresh' => SMOPT_REFRESH_NONE |
80 | ); |
81 | |
82 | $optvals[] = array( |
83 | 'name' => 'editor_size', |
84 | 'caption' => _("Size of Editor Window"), |
85 | 'type' => SMOPT_TYPE_INTEGER, |
86 | 'refresh' => SMOPT_REFRESH_NONE |
87 | ); |
88 | |
45cfc124 |
89 | OptionSelect( _("Location of buttons when composing"), |
90 | 'button_new_location', |
91 | array( 'top' => _("Before headers"), |
92 | 'between' => _("Between headers and message body"), |
93 | 'bottom' => _("After message body") ), |
94 | $location_of_buttons ); |
a3ec3c91 |
95 | |
96 | $optvals[] = array( |
97 | 'name' => 'location_of_buttons', |
98 | 'caption' =>_("Location of Buttons when Composing"), |
99 | 'type' => SMOPT_TYPE_STRLIST, |
100 | 'refresh' => SMOPT_REFRESH_NONE, |
101 | 'posvals' => array(SMPREF_LOC_TOP => _("Before headers"), |
102 | SMPREF_LOC_BETWEEN => _("Between headers and message body"), |
103 | SMPREF_LOC_BOTTOM => _("After message body")) |
104 | ); |
105 | |
106 | $optvals[] = array( |
107 | 'name' => 'location_of_bar', |
108 | 'caption' =>_("Location of Folder List"), |
109 | 'type' => SMOPT_TYPE_STRLIST, |
110 | 'refresh' => SMOPT_REFRESH_ALL, |
111 | 'posvals' => array(SMPREF_LOC_LEFT => _("Left"), |
112 | SMPREF_LOC_RIGHT => _("Right")) |
113 | ); |
114 | |
115 | /* Now, build the complete options array. */ |
116 | $options = createOptionArray($optvals); |
117 | |
118 | /* Print the row for each option. */ |
119 | foreach ($options as $option) { |
120 | if ($option->type != SMOPT_TYPE_HIDDEN) { |
121 | echo "<TR>\n"; |
122 | echo ' <TD ALIGN="RIGHT" VALIGN="MIDDLE" NOWRAP><font color=red><b>' |
123 | . $option->caption . "</b></font>:</TD>\n"; |
124 | echo ' <TD>' . $option->createHTMLWidget() . "</TD>\n"; |
125 | echo "</TR>\n"; |
126 | } else { |
127 | echo $option->createHTMLWidget(); |
128 | } |
129 | } |
130 | |
131 | /*** END OPTIONS CLASS EXPERMINENTATION ***/ |
132 | |
45cfc124 |
133 | for ($i = 100; $i <= 300; $i += 10) { |
134 | $res[$i] = $i . _("pixels"); |
176ed7de |
135 | } |
45cfc124 |
136 | OptionSelect( _("Width of folder list"), |
137 | 'leftsize', |
138 | $res, |
139 | $left_size ); |
1de36f81 |
140 | $minutes_str = _("Minutes"); |
45cfc124 |
141 | OptionSelect( _("Auto refresh folder list"), |
142 | 'leftrefresh', |
143 | array( 'None' => _("Never"), |
144 | 30 => '30 '. _("Seconds"), |
145 | 60 => '1 ' . _("Minute"), |
146 | 120 => "2 $minutes_str", |
147 | 180 => "3 $minutes_str", |
148 | 300 => "5 $minutes_str", |
149 | 600 => "10 $minutes_str" ), |
150 | $left_refresh ); |
151 | OptionRadio( _("Use alternating row colors?"), |
152 | 'altIndexColors', |
153 | array( 1 => _("Yes"), |
154 | 0 => _("No") ), |
155 | $alt_index_colors ); |
156 | OptionCheck( _("Show HTML version by default"), |
157 | 'showhtmldefault', |
158 | $show_html_default, |
159 | _("Yes, show me the HTML version of a mail message, if it is available.") ); |
160 | OptionCheck( _("Include Self"), |
161 | 'includeselfreplyall', |
162 | getPref($data_dir, $username, 'include_self_reply_all', FALSE ), |
163 | _("Don't remove me from the CC addresses when I use \"Reply All\"") ); |
164 | $psw = getPref($data_dir, $username, 'page_selector_max', 10 ); |
165 | OptionCheck( _("Page Selector"), |
166 | 'pageselector', |
167 | !getPref($data_dir, $username, 'page_selector', FALSE ), |
168 | _("Show page selector") . |
169 | " <input name=pageselectormax size=3 value=\"$psw\"> " . |
170 | _("pages max") ); |
1de36f81 |
171 | |
2016e645 |
172 | echo '<tr><td colspan=2><hr noshade></td></tr>'; |
173 | do_hook('options_display_inside'); |
84c18709 |
174 | OptionSubmit( 'submit_display' ); |
2016e645 |
175 | ?> |
f1e6f580 |
176 | |
e7db48af |
177 | </table> |
c36ed9cf |
178 | </form> |
e7db48af |
179 | |
e8e0acdf |
180 | <?php do_hook('options_display_bottom'); ?> |
e7db48af |
181 | |
182 | </td></tr> |
183 | </table> |
184 | |
23d6bd09 |
185 | <SCRIPT LANGUAGE="JavaScript"><!-- |
a3ec3c91 |
186 | document.forms[0].new_js_autodetect_results.value = '<?php echo SMPREF_JS_ON; ?>'; |
23d6bd09 |
187 | // --></SCRIPT> |
188 | |
e7db48af |
189 | </td></tr> |
190 | </table> |
23d6bd09 |
191 | </body></html> |