From: thomppj Date: Mon, 24 Dec 2001 06:11:30 +0000 (+0000) Subject: Various UI tweaks... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c8cc83520dc48c484b8e62250ac9bc26596bfc2a;p=squirrelmail.git Various UI tweaks... ---------------------------------------------------------------------- git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1904 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/folders.php b/src/folders.php index a78fd0b9..26253dd0 100644 --- a/src/folders.php +++ b/src/folders.php @@ -42,7 +42,7 @@ require_once('../functions/plugin.php');
- + \n"; + /** DELETING FOLDERS **/ + echo ""; + echo "\n"; + } else { + echo _("No folders found") . "

"; + } + echo "\n"; + /** UNSUBSCRIBE FOLDERS **/ - echo "
@@ -52,7 +52,7 @@ require_once('../functions/plugin.php'); if ((isset($success) && $success) || (isset($sent_create) && $sent_create == "true") || (isset($trash_create) && $trash_create == "true")) { - echo "\n"; + echo "
\n"; echo " \n"; echo "
\n"; if ($success == "subscribe") { echo "" . _("Subscribed successfully!") . "
"; @@ -69,69 +69,15 @@ require_once('../functions/plugin.php'); echo " " . _("refresh folder list") . ""; echo "

\n"; + } else { + echo "
"; } $imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0); $boxes = sqimap_mailbox_list($imapConnection); - /** DELETING FOLDERS **/ - echo "\n"; - echo ""; - echo "\n"; - } else { - echo _("No folders found") . "

"; - } - - echo "\n"; - /** CREATING FOLDERS **/ + echo "
"; - echo _("Delete Folder"); - echo "
"; - - $count_special_folders = 0; - $num_max = 1; - if (strtolower($imap_server_type) == "courier" || $move_to_trash) - $num_max++; - if ($move_to_sent) - $num_max++; - if ($save_as_draft) - $num_max++; - - for ($p = 0; $p < count($boxes) && $count_special_folders < $num_max; $p++) { - if (strtolower($boxes[$p]["unformatted"]) == "inbox") - $count_special_folders++; - else if (strtolower($imap_server_type) == "courier" && - strtolower($boxes[$p]["unformatted"]) == "inbox.trash") - $count_special_folders++; - else if ($boxes[$p]["unformatted"] == $trash_folder && $trash_folder) - $count_special_folders++; - else if ($boxes[$p]["unformatted"] == $sent_folder && $sent_folder) - $count_special_folders++; - else if ($boxes[$p]["unformatted"] == $draft_folder && $draft_folder) - $count_special_folders++; - } - - if ($count_special_folders < count($boxes)) { - echo "
\n"; - echo "\n"; - echo "\n"; - echo "
 
\n"; + echo ""; @@ -169,7 +115,7 @@ require_once('../functions/plugin.php'); echo "
"; } echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; @@ -187,8 +133,7 @@ require_once('../functions/plugin.php'); if ((strtolower($boxes[$i]["unformatted"]) != "inbox") && ($boxes[$i]["unformatted"] != $trash_folder) && ($boxes[$i]["unformatted"] != $sent_folder) && - ($boxes[$i]["unformatted"] != $draft_folder)) - { + ($boxes[$i]["unformatted"] != $draft_folder)) { $box = $boxes[$i]["unformatted-dm"]; $box2 = str_replace(' ', ' ', $boxes[$i]["unformatted-disp"]); if (strtolower($imap_server_type) != "courier" || strtolower($box) != "inbox.trash") @@ -199,20 +144,75 @@ require_once('../functions/plugin.php'); echo "\n"; - echo "\n"; + echo "\n"; } else { echo _("No folders found") . "

"; } $boxes_sub = $boxes; - echo "
"; echo _("Create Folder"); echo "
 
 
\n"; + echo "
 
"; + echo _("Delete Folder"); + echo "
"; + + $count_special_folders = 0; + $num_max = 1; + if (strtolower($imap_server_type) == "courier" || $move_to_trash) + $num_max++; + if ($move_to_sent) + $num_max++; + if ($save_as_draft) + $num_max++; + + for ($p = 0; $p < count($boxes) && $count_special_folders < $num_max; $p++) { + if (strtolower($boxes[$p]["unformatted"]) == "inbox") + $count_special_folders++; + else if (strtolower($imap_server_type) == "courier" && + strtolower($boxes[$p]["unformatted"]) == "inbox.trash") + $count_special_folders++; + else if ($boxes[$p]["unformatted"] == $trash_folder && $trash_folder) + $count_special_folders++; + else if ($boxes[$p]["unformatted"] == $sent_folder && $sent_folder) + $count_special_folders++; + else if ($boxes[$p]["unformatted"] == $draft_folder && $draft_folder) + $count_special_folders++; + } + + if ($count_special_folders < count($boxes)) { + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
 
\n"; + echo "
\n"; echo "\n"; - echo "\n"; + echo "\n"; } else { echo _("No folders were found to unsubscribe from!") . ""; } $boxes_sub = $boxes; /** SUBSCRIBE TO FOLDERS **/ - echo "
"; echo _("Unsubscribe") . "/" . _("Subscribe"); echo "
\n"; + echo "
\n"; if ($count_special_folders < count($boxes)) { echo "
\n"; echo "\n"; - echo "
"; + echo ""; $imap_stream = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 1); $boxes_all = sqimap_mailbox_list_all ($imap_stream); @@ -272,7 +272,7 @@ require_once('../functions/plugin.php'); } echo "
"; echo "\n"; - echo "

\n"; + echo "

\n"; } else { echo _("No folders were found to subscribe to!") . ""; }