X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Foptions_display.php;h=f009b0c1de24594eee016d21f3f814065a2b7d31;hp=88b8c265083c316dd7b9850fcc0633d0d56e386e;hb=0768773669776e69bc394f265dbb300584c33a29;hpb=73d9de4e9a2d07fcb9725c8ee62691301ddb2126 diff --git a/src/options_display.php b/src/options_display.php index 88b8c265..f009b0c1 100644 --- a/src/options_display.php +++ b/src/options_display.php @@ -1,254 +1,339 @@ -
- - -
-
+/** + * 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"> -
-
- - - -
- -
-