5 ** Copyright (c) 1999-2000 The SquirrelMail development team
6 ** Licensed under the GNU GPL. For full terms see the file COPYING.
8 ** Displays all optinos about display preferences
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');
18 require_once('../functions/options.php');
20 displayPageHeader($color, 'None');
21 $language = getPref($data_dir, $username, 'language');
24 <table width
="95%" align
="center" border
="0" cellpadding
="2" cellspacing
="0">
25 <tr
><td bgcolor
="<?php echo $color[0] ?>" align
="center">
27 <b
><?php
echo _("Options") . ' - ' . _("Display Preferences"); ?
></b
><br
>
29 <table width
="100%" border
="0" cellpadding
="1" cellspacing
="1">
30 <tr
><td bgcolor
="<?php echo $color[4] ?>" align
="center">
32 <form name
="f" action
="options.php" method
="post"><br
>
33 <table width
="100%" cellpadding
="2" cellspacing
="0" border
="0">
36 /* Build a simple array into which we will build options. */
39 $theme_values = array();
40 foreach ($theme as $theme_key => $theme_attributes) {
41 $theme_values[$theme_attributes['PATH']] = $theme_attributes['NAME'];
44 'name' => 'chosen_theme',
45 'caption' => _("Theme"),
46 'type' => SMOPT_TYPE_STRLIST
,
47 'refresh' => SMOPT_REFRESH_ALL
,
48 'posvals' => $theme_values
51 $language_values = array();
52 foreach ($languages as $lang_key => $lang_attributes) {
53 if (isset($lang_attributes['NAME'])) {
54 $language_values[$lang_key] = $lang_attributes['NAME'];
59 'caption' => _("Language"),
60 'type' => SMOPT_TYPE_STRLIST
,
61 'refresh' => SMOPT_REFRESH_ALL
,
62 'posvals' => $language_values
65 /* Set values for the "use javascript" option. */
67 'name' => 'javascript_setting',
68 'caption' => _("Use Javascript"),
69 'type' => SMOPT_TYPE_STRLIST
,
70 'refresh' => SMOPT_REFRESH_ALL
,
71 'posvals' => array(SMPREF_JS_AUTODETECT
=> _("Autodetect"),
72 SMPREF_JS_ON
=> _("Always"),
73 SMPREF_JS_OFF
=> _("Never"))
76 $js_autodetect_results = SMPREF_JS_OFF
;
78 'name' => 'js_autodetect_results',
80 'type' => SMOPT_TYPE_HIDDEN
,
81 'refresh' => SMOPT_REFRESH_NONE
86 'caption' => _("Number of Messages to Index"),
87 'type' => SMOPT_TYPE_INTEGER
,
88 'refresh' => SMOPT_REFRESH_NONE
92 'name' => 'alt_index_colors',
93 'caption' => _("Enable Alternating Row Colors"),
94 'type' => SMOPT_TYPE_BOOLEAN
,
95 'refresh' => SMOPT_REFRESH_NONE
99 'name' => 'page_selector',
100 'caption' => _("Enable Page Selector"),
101 'type' => SMOPT_TYPE_BOOLEAN
,
102 'refresh' => SMOPT_REFRESH_NONE
106 'name' => 'page_selector_max',
107 'caption' => _("Maximum Number of Pages to Show"),
108 'type' => SMOPT_TYPE_INTEGER
,
109 'refresh' => SMOPT_REFRESH_NONE
114 'caption' => _("Wrap Incoming Text At"),
115 'type' => SMOPT_TYPE_INTEGER
,
116 'refresh' => SMOPT_REFRESH_NONE
120 'name' => 'editor_size',
121 'caption' => _("Size of Editor Window"),
122 'type' => SMOPT_TYPE_INTEGER
,
123 'refresh' => SMOPT_REFRESH_NONE
127 'name' => 'location_of_buttons',
128 'caption' => _("Location of Buttons when Composing"),
129 'type' => SMOPT_TYPE_STRLIST
,
130 'refresh' => SMOPT_REFRESH_NONE
,
131 'posvals' => array(SMPREF_LOC_TOP
=> _("Before headers"),
132 SMPREF_LOC_BETWEEN
=> _("Between headers and message body"),
133 SMPREF_LOC_BOTTOM
=> _("After message body"))
137 'name' => 'use_javascript_addr_book',
138 'caption' => _("Addressbook Display Format"),
139 'type' => SMOPT_TYPE_STRLIST
,
140 'refresh' => SMOPT_REFRESH_NONE
,
141 'posvals' => array('1' => _("Javascript"),
146 'name' => 'show_html_default',
147 'caption' => _("Show HTML Version by Default"),
148 'type' => SMOPT_TYPE_BOOLEAN
,
149 'refresh' => SMOPT_REFRESH_NONE
153 'name' => 'include_self_reply_all',
154 'caption' => _("Remove Me from CC when I Reply All"),
155 'type' => SMOPT_TYPE_BOOLEAN
,
156 'refresh' => SMOPT_REFRESH_NONE
160 'name' => 'show_xmailer_default',
161 'caption' => _("Enable Mailer Display"),
162 'type' => SMOPT_TYPE_BOOLEAN
,
163 'refresh' => SMOPT_REFRESH_NONE
166 /* Build all these values into an array of SquirrelOptions objects. */
167 $options = createOptionArray($optvals);
169 /* Print the row for each option. */
170 foreach ($options as $option) {
171 if ($option->type
!= SMOPT_TYPE_HIDDEN
) {
173 echo ' <TD ALIGN="RIGHT" VALIGN="MIDDLE" NOWRAP>'
174 . $option->caption
. ":</TD>\n";
175 echo ' <TD>' . $option->createHTMLWidget() . "</TD>\n";
178 echo $option->createHTMLWidget();
182 echo '<tr><td colspan=2><hr noshade></td></tr>';
183 do_hook('options_display_inside');
184 OptionSubmit( 'submit_display' );
190 <?php
do_hook('options_display_bottom'); ?
>
195 <SCRIPT LANGUAGE
="JavaScript"><!--
196 document
.forms
[0].new_js_autodetect_results
.value
= '<?php echo SMPREF_JS_ON; ?>';