X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Foptions_folder.php;h=f986b91086c183442adbcd8d96d4d0f0c0345f89;hb=bbcafebdf79e848a696405cdb232e93c38d32fd6;hp=a6a035398366a3a04a98d65fe3eecda26548d592;hpb=24fc5dd2a66bd6fa6c3885f0222b87379b5644b1;p=squirrelmail.git diff --git a/src/options_folder.php b/src/options_folder.php index a6a03539..f986b910 100644 --- a/src/options_folder.php +++ b/src/options_folder.php @@ -7,136 +7,212 @@ ** ** Displays all options relating to folders ** + ** $Id$ **/ - session_start(); - - if (!isset($config_php)) - include("../config/config.php"); - if (!isset($strings_php)) - include("../functions/strings.php"); - if (!isset($page_header_php)) - include("../functions/page_header.php"); - if (!isset($display_messages_php)) - include("../functions/display_messages.php"); - if (!isset($imap_php)) - include("../functions/imap.php"); - if (!isset($array_php)) - include("../functions/array.php"); - if (!isset($i18n_php)) - include("../functions/i18n.php"); - - include("../src/load_prefs.php"); - displayPageHeader($color, "None"); + require_once('../src/validate.php'); + require_once('../functions/display_messages.php'); + require_once('../functions/imap.php'); + require_once('../functions/array.php'); + require_once('../functions/plugin.php'); + require_once('../functions/options.php'); + + displayPageHeader($color, 'None'); $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); - $boxes = sqimap_mailbox_list($imapConnection, $boxes); + $boxes = sqimap_mailbox_list($imapConnection); sqimap_logout($imapConnection); ?>
-
-
-
+ + +
-
- + - +
+ +
+ +
+ + + + - - -"; - - - // SENT FOLDER - echo ""; + echo '
'; ?> - - - - - - - - - - + _("Do not use Trash")); + $trash_folder_values = array_merge($trash_none, $special_folder_values); + $optvals[SMOPT_GRP_SPCFOLDER][] = array( + 'name' => 'trash_folder', + 'caption' => _("Trash Folder"), + 'type' => SMOPT_TYPE_STRLIST, + 'refresh' => SMOPT_REFRESH_FOLDERLIST, + 'posvals' => $trash_folder_values + ); + + $sent_none = array(SMPREF_NONE => _("Do not use Sent")); + $sent_folder_values = array_merge($sent_none, $special_folder_values); + $optvals[SMOPT_GRP_SPCFOLDER][] = array( + 'name' => 'sent_folder', + 'caption' => _("Sent Folder"), + 'type' => SMOPT_TYPE_STRLIST, + 'refresh' => SMOPT_REFRESH_FOLDERLIST, + 'posvals' => $sent_folder_values + ); + + $drafts_none = array(SMPREF_NONE => _("Do not use Drafts")); + $draft_folder_values = array_merge($draft_none, $special_folder_values); + $optvals[SMOPT_GRP_SPCFOLDER][] = array( + 'name' => 'draft_folder', + 'caption' => _("Draft Folder"), + 'type' => SMOPT_TYPE_STRLIST, + 'refresh' => SMOPT_REFRESH_FOLDERLIST, + 'posvals' => $draft_folder_values + ); + + /*** Load the General Options into the array ***/ + $optgrps[SMOPT_GRP_FOLDERLIST] = _("Folder List Options"); + $optvals[SMOPT_GRP_FOLDERLIST] = array(); + + $optvals[SMOPT_GRP_FOLDERLIST][] = array( + 'name' => 'location_of_bar', + 'caption' => _("Location of Folder List"), + 'type' => SMOPT_TYPE_STRLIST, + 'refresh' => SMOPT_REFRESH_ALL, + 'posvals' => array(SMPREF_LOC_LEFT => _("Left"), + SMPREF_LOC_RIGHT => _("Right")) + ); + + $left_size_values = array(); + for ($lsv = 100; $lsv <= 300; $lsv += 10) { + $left_size_values[$lsv] = "$lsv " . _("pixels"); + } + $optvals[SMOPT_GRP_FOLDERLIST][] = array( + 'name' => 'left_size', + 'caption' => _("Width of Folder List"), + 'type' => SMOPT_TYPE_STRLIST, + 'refresh' => SMOPT_REFRESH_ALL, + 'posvals' => $left_size_values + ); + + $minute_str = _("Minutes"); + $left_refresh_values = array(SMPREF_NONE => _("Never")); + foreach (array(30,60,120,180,300,600) as $lr_val) { + if ($lr_val < 60) { + $left_refresh_values[$lr_val] = "$lr_val " . _("Seconds"); + } else if ($lr_val == 60) { + $left_refresh_values[$lr_val] = "1 " . _("Minute"); + } else { + $left_refresh_values[$lr_val] = ($lr_val/60) . " $minute_str"; + } + } + $optvals[SMOPT_GRP_FOLDERLIST][] = array( + 'name' => 'left_refresh', + 'caption' => _("Auto Refresh Folder List"), + 'type' => SMOPT_TYPE_STRLIST, + 'refresh' => SMOPT_REFRESH_FOLDERLIST, + 'posvals' => $left_refresh_values + ); + + $optvals[SMOPT_GRP_FOLDERLIST][] = array( + 'name' => 'unseen_notify', + 'caption' => _("Enable Unseen Message Notification"), + 'type' => SMOPT_TYPE_STRLIST, + 'refresh' => SMOPT_REFRESH_FOLDERLIST, + 'posvals' => array(SMPREF_UNSEEN_NONE => _("No Notification"), + SMPREF_UNSEEN_INBOX => _("Only INBOX"), + SMPREF_UNSEEN_ALL => _("All Folders")) + ); + + $optvals[SMOPT_GRP_FOLDERLIST][] = array( + 'name' => 'unseen_type', + 'caption' => _("Unseen Message Notification Type"), + 'type' => SMOPT_TYPE_STRLIST, + 'refresh' => SMOPT_REFRESH_FOLDERLIST, + 'posvals' => array(SMPREF_UNSEEN_ONLY => _("Only Unseen"), + SMPREF_UNSEEN_TOTAL => _("Unseen and Total")) + ); + + $optvals[SMOPT_GRP_FOLDERLIST][] = array( + 'name' => 'collapse_folders', + 'caption' => _("Enable Collapsable Folders"), + 'type' => SMOPT_TYPE_BOOLEAN, + 'refresh' => SMOPT_REFRESH_FOLDERLIST + ); + + $optvals[SMOPT_GRP_FOLDERLIST][] = array( + 'name' => 'date_format', + 'caption' => _("Show Clock on Folders Panel"), + 'type' => SMOPT_TYPE_STRLIST, + 'refresh' => SMOPT_REFRESH_FOLDERLIST, + 'posvals' => array( '1' => 'MM/DD/YY HH:MM', + '2' => 'DD/MM/YY HH:MM', + '3' => 'DDD, HH:MM', + '4' => 'HH:MM:SS', + '5' => 'HH:MM', + '6' => _("No Clock")), + ); + + $optvals[SMOPT_GRP_FOLDERLIST][] = array( + 'name' => 'hour_format', + 'caption' => _("Hour Format"), + 'type' => SMOPT_TYPE_STRLIST, + 'refresh' => SMOPT_REFRESH_FOLDERLIST, + 'posvals' => array(SMPREF_TIME_12HR => _("12-hour clock"), + SMPREF_TIME_24HR => _("24-hour clock")) + ); + + + /* Build and output the option groups. */ + $option_groups = createOptionGroups($optgrps, $optvals); + printOptionGroups($option_groups); + + echo '\n"; + OptionSubmit( 'submit_folder' ); +?> +
: + : -
"; +
'; else - echo "
"; -?> -
"; - echo _("Trash Folder:"); - echo ""; - echo "\n"; - echo "
"; - echo _("Sent Folder:"); - echo ""; - echo "\n"; - echo "
-
- : -
- >
- >
- >
-
-
-
- : -
- 2) echo " checked"; ?>> - (4)
- > - (4/27) -
  - -
' + . _("Plugin Options") . "
+ + + +
+ +