X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Foptions_display.php;h=bf464856a16b1af366e70aa96715b54aa76a24a1;hp=a117f118009dd6e9989a6c788c49f197a0f4d0ee;hb=833eb397db11081dabf144d2ffd0c398c1f6f9eb;hpb=8df1b65b3b58936dfe1bd9671edc05f0e7fc038e diff --git a/src/options_display.php b/src/options_display.php index a117f118..bf464856 100644 --- a/src/options_display.php +++ b/src/options_display.php @@ -1,254 +1,276 @@ -
- - -
-
+/** + * options_display.php + * + * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Licensed under the GNU GPL. For full terms see the file COPYING. + * + * Displays all optinos about display preferences + * + * $Id$ + */ - - -
+/* Define the group constants for the display options page. */ +define('SMOPT_GRP_GENERAL', 0); +define('SMOPT_GRP_MAILBOX', 1); +define('SMOPT_GRP_MESSAGE', 2); -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
: - -'; -?> -
: - -'; - if (! $use_gettext) - echo '
This system doesn\'t support multiple languages'; - -?> -
  - '; - if ($use_javascript_addr_book == true) { - echo ' ' . _("JavaScript") . '    '; - echo ' ' . _("HTML"); - } else { - echo ' ' . _("JavaScript") . '    '; - echo ' ' . _("HTML"); - } - ?> -
: - -
'; - else - echo '
'; -?> -
: - -
'; - else - echo '
'; -?> -
: - -= 10 && $editor_size <= 255) - echo '
'; - else - echo '
'; -?> -
: -
: -
: - -' . "\n"; - for ($i = 100; $i <= 300; $i += 10) - { - if ($left_size >= $i && $left_size < $i + 10) - echo "
: - -'; - - if ($left_refresh == '') - $left_refresh = 'None'; - if ($left_refresh > 600) - $left_refresh = 600; - RefreshOption($left_refresh, '', 'None', _("None")); - RefreshOption($left_refresh, 30); - RefreshOption($left_refresh, 60); - RefreshOption($left_refresh, 120); - RefreshOption($left_refresh, 180); - RefreshOption($left_refresh, 300); - RefreshOption($left_refresh, 600); - // Refreshes after the session auto-timeout (default 15 min) is pointless - -function RefreshOption(&$current, $val, $str = '') { - static $lastVal = 0; - - if (is_int($val) && is_int($current)) { - if ($current > $lastVal && $current <= $val) - $current = $val; - } - - if ($str == '') { - if ($val > 60) { - $str = ($val / 60) . ' ' . _("Minutes"); - } elseif ($val == 60) { - $str = '1 ' . _("Minute"); - } else { - $str = $val . ' ' . _("Seconds"); - } - } - - echo '
- - -new_value) { + $theme_in_array = true; + break; + } + } + + if (!$theme_in_array) { + $option->new_value = ''; + } + + /* Save the option like normal. */ + save_option($option); +} + +function save_option_javascript_autodetect($option) { + global $data_dir, $username, $new_javascript_setting; + + /* Set javascript either on or off. */ + if ($new_javascript_setting == SMPREF_JS_AUTODETECT) { + if ($option->new_value == SMPREF_JS_ON) { + setPref($data_dir, $username, 'javascript_on', SMPREF_JS_ON); + } else { + setPref($data_dir, $username, 'javascript_on', SMPREF_JS_OFF); + } } else { - $a = ""; - $b = " checked"; + setPref($data_dir, $username, 'javascript_on', $new_javascript_setting); } +} + ?> - >    - >
-
- : - - > - -
  - - "name="submit_display"> -
-
- - - -
- -
-