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 options relating to folders
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');
22 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
23 $boxes = sqimap_mailbox_list($imapConnection);
24 sqimap_logout($imapConnection);
27 <table width
="95%" align
="center" border
="0" cellpadding
="2" cellspacing
="0">
28 <tr
><td bgcolor
="<?php echo $color[0] ?>" align
="center">
30 <b
><?php
echo _("Options") . " - " . _("Folder Preferences"); ?
></b
>
32 <table width
="100%" border
="0" cellpadding
="1" cellspacing
="1">
33 <tr
><td bgcolor
="<?php echo $color[4] ?>" align
="center">
35 <form name
="f" action
="options.php" method
="post"><br
>
37 <table width
="100%" cellpadding
="2" cellspacing
="0" border
="0">
39 <?php
if ($show_prefix_option == true) { ?
>
41 <td align
=right nowrap
><?php
echo _("Folder Path"); ?
>:
43 <?php
if (isset ($folder_prefix))
44 echo ' <input type="text" name="folderprefix" value="'.$folder_prefix.'" size="35"><br>';
46 echo ' <input type="text" name="folderprefix" value="'.$default_folder_prefix.'" size="35"><br>';
53 echo '<tr><td nowrap align="right">';
54 echo _("Trash Folder:");
56 echo "<TT><SELECT NAME=trash>\n";
57 if ($move_to_trash == true) {
58 echo '<option value="none">' . _("Do not use Trash");
60 echo '<option value="none" selected>' . _("Do not use Trash");
63 for ($i = 0; $i < count($boxes); $i++
) {
65 if (strtolower($boxes[$i]['unformatted']) == 'inbox') {
68 if ($use_folder == true) {
69 $box = $boxes[$i]['unformatted-dm'];
70 $box2 = str_replace(' ', ' ', $boxes[$i]['formatted']);
71 if (($boxes[$i]['unformatted'] == $trash_folder) && ($move_to_trash == true))
72 echo " <OPTION SELECTED VALUE=\"$box\">$box2\n";
74 echo " <OPTION VALUE=\"$box\">$box2\n";
77 echo "</SELECT></TT>\n";
82 echo '<tr><td nowrap align="right">';
83 echo _("Sent Folder:");
85 echo '<TT><SELECT NAME="sent">' . "\n";
86 if ($move_to_sent == true)
87 echo '<option value="none">' . _("Do not use Sent");
89 echo "<option value=none selected>" . _("Do not use Sent");
91 for ($i = 0; $i < count($boxes); $i++
) {
93 if (strtolower($boxes[$i]['unformatted']) == 'inbox') {
96 if ($use_folder == true) {
97 $box = $boxes[$i]['unformatted-dm'];
98 $box2 = str_replace(' ', ' ', $boxes[$i]['formatted']);
99 if (($boxes[$i]['unformatted'] == $sent_folder) && ($move_to_sent == true))
100 echo " <OPTION SELECTED VALUE=\"$box\">$box2\n";
102 echo " <OPTION VALUE=\"$box\">$box2\n";
105 echo "</SELECT></TT>\n";
109 echo '<tr><td nowrap align="right">';
110 echo _("Drafts Folder:");
112 echo '<TT><SELECT NAME="draft">';
113 if ($save_as_draft == true)
114 echo '<option value="none">' . _("Do not use Drafts");
116 echo '<option value="none selected">' . _("Do not use Drafts");
118 for ($i = 0; $i < count($boxes); $i++
) {
120 if (strtolower($boxes[$i]['unformatted']) == 'inbox') {
123 if ($use_folder == true) {
124 $box = $boxes[$i]['unformatted-dm'];
125 $box2 = str_replace(' ', ' ', $boxes[$i]['formatted']);
126 $select_draft_value = rtrim($boxes[$i]['unformatted']);
127 if (($select_draft_value == $draft_folder) && ($save_as_draft == true)) {
128 echo " <OPTION SELECTED VALUE=\"$box\">$box2\n";
130 echo " <OPTION VALUE=\"$box\">$box2\n";
134 echo "</SELECT></TT>\n";
136 // if( $unseen_notify == '' )
137 // $unseen_notify = '2';
138 OptionRadio( _("Unseen message notification"),
140 array( 1 => _("No notification"),
141 2 => _("Only INBOX"),
142 3 => _("All Folders") ),
143 $unseen_notify, '', '',
145 OptionRadio( _("Unseen message notification type"),
147 array( 1 => _("Only unseen"),
148 2 => _("Unseen and Total") ),
149 $unseen_type, '', '',
151 OptionCheck( _("Collapseable folders"),
154 _("Enable Collapseable Folders") );
155 OptionSelect( '<b>' . _("Show Clock on Folders Panel") . '</b> ' . _("Date format"),
157 array( '1' => 'MM/DD/YY HH:MM',
158 '2' => 'DD/MM/YY HH:MM',
162 '6' => _("No Clock") ),
164 OptionSelect( _("Hour format"),
166 array( '1' => _("24-hour clock"),
167 '2' => _("12-hour clock") ),
170 echo '<tr><td colspan=2><hr noshade></td></tr>';
171 do_hook("options_folders_inside");
172 OptionSubmit( 'submit_folder' );
178 <?php
do_hook('options_folders_bottom'); ?
>