X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fleft_main.php;h=a15cec3a95fc3e496fb1a511603f44599ff1a093;hb=889df97071b1c3faec90d59feb00e03fbe29ae50;hp=d6925c100089ea793e80800da8a2b0cc95c5b36d;hpb=a6d2e0ded21942633358a46282260c14746dd8c0;p=squirrelmail.git diff --git a/src/left_main.php b/src/left_main.php index d6925c10..a15cec3a 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -1,14 +1,14 @@ 0) { @@ -73,10 +90,14 @@ } $special_color = false; - if ((strtolower($real_box) == "inbox") || - (($real_box == $trash_folder) && ($move_to_trash)) || - (($real_box == $sent_folder) && ($move_to_sent))) - $special_color = true; + if ($use_special_folder_color) { + if ((strtolower($real_box) == 'inbox') + || (($real_box == $trash_folder) && ($move_to_trash)) + || (($real_box == $sent_folder) && ($move_to_sent)) + || (($real_box == $draft_folder) && ($save_as_draft))) { + $special_color = true; + } + } /* Start off with a blank line. */ $line = ''; @@ -85,7 +106,7 @@ if ($unseen > 0) { $line .= ''; } /* Crate the link for this folder. */ - $line .= ""; + $line .= ""; if ($special_color == true) $line .= ""; $line .= str_replace(' ',' ',$mailbox); @@ -118,7 +139,11 @@ return ($line); } - if (isset($left_refresh) && ($left_refresh != "None") && ($left_refresh != "")) { + /**********************************/ + /* END OF FUNCTION - BACK TO MAIN */ + /**********************************/ + + if (isset($left_refresh) && ($left_refresh != 'None') && ($left_refresh != '')) { echo "\n"; echo "\n"; echo "\n"; @@ -130,14 +155,50 @@ $boxes = sqimap_mailbox_list($imapConnection); - echo "
"; + echo '
'; echo _("Folders") . "
\n\n"; - echo "(
"; + /* First, display the clock. */ + if ($hour_format == 1) { + if ($date_format == 4) { + $hr = "G:i:s"; + } else { + $hr = "G:i"; + } + } else { + if ($date_format == 4) { + $hr = "g:i:s a"; + } else { + $hr = "g:i a"; + } + } + + switch( $date_format ) { + case 1: + $clk = date("m/d/y ".$hr, time()); + break; + case 2: + $clk = date("d/m/y ".$hr, time()); + break; + case 4: + case 5: + $clk = date($hr, time()); + break; + default: + $clk = date("D, ".$hr, time()); + } + $clk = str_replace(' ',' ',$clk); + + echo '
' . str_replace(' ',' ',_("Last Refresh")) + . ": $clk
"; + + /* Next, display the refresh button. */ + echo '(
'; echo _("refresh folder list"); - echo ")

"; + echo ')

'; $delimeter = sqimap_get_delimiter($imapConnection); + /* Lastly, display the folder list. */ if (isset($collapse_folders) && $collapse_folders) { /* If directed, collapse or uncollapse a folder. */ if (isset($fold)) { @@ -176,6 +237,7 @@ if (in_array('noselect', $boxes[$i]['flags'])) { $line .= ""; if (ereg("^( *)([^ ]*)", $mailbox, $regs)) { + $mailbox = str_replace(' ','',$mailbox); $line .= str_replace(' ', ' ', $mailbox); } $line .= ''; @@ -238,7 +300,7 @@ * status and parent (or not parent) status for all children boxes. */ function compute_folder_children(&$parbox, $boxcount) { - global $boxes; + global $boxes, $data_dir, $username; $nextbox = $parbox + 1; /* Retreive the name for the parent box. */ @@ -254,7 +316,10 @@ $boxes[$parbox]['collapse'] = $collapse; /* Otherwise, get the name of the next box. */ - $nextbox_name = $boxes[$nextbox]['unformatted']; + if (isset($boxes[$nextbox]['unformatted'])) + $nextbox_name = $boxes[$nextbox]['unformatted']; + else + $nextbox_name = ''; /* Compute any children boxes for this box. */ while (($nextbox < $boxcount) && @@ -278,5 +343,5 @@ /* Set the parent box to the current next box. */ $parbox = $nextbox; } + echo "\n"; ?> -