Ignore:
Timestamp:
01/03/08 14:09:58 (16 years ago)
Author:
niltonneto
Message:

Vide ocorrencias no Trac.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/hook_home.inc.php

    r2 r139  
    11<?php 
     2         
    23        $current_app = 'expressoMail1_2'; 
    34        $current_name    = 'ExpressoMail 1.2'; 
    45        $homedisplay = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['mainscreen_showmail']; 
    5          
     6        $homedisplay = 'True'; 
    67        if($homedisplay=='True') 
    78        { 
     
    2223                $expressoMail   = CreateObject($current_app.'.imap_functions'); 
    2324                $mbox_stream = $expressoMail-> open_mbox();              
    24                 $messages        = imap_sort($mbox_stream, SORTARRIVAL, false, SE_UID); 
     25                $messages        = imap_sort($mbox_stream, SORTARRIVAL, true, SE_UID); 
    2526                $num_new_messages = 0; 
    2627                $subjects = array(); 
     28                 
    2729                for ($i = 0; $i < count($messages);$i++) 
    2830                { 
     
    3638                        $new_m++; 
    3739                        if($new_m <= 10) {                               
    38                                 $subject = $expressoMail->decode_string($header->fetchsubject);                  
    39                                 if(strlen($subject) > 65) 
    40                                         $subject = substr($subject,0,65).' ...'; 
     40                                $date_msg = date("d/m/Y",$header->udate); 
     41                                if (date("d/m/Y") == $date_msg) 
     42                                        $date = date("H:i",$header->udate); 
     43                                else 
     44                                        $date = $date_msg; 
     45                                $subject = $expressoMail->decode_string($header->fetchsubject);                          
     46                                $text = "<div style='overflow:hidden;white-space:nowrap'>".$date." .: ".$subject."</div>"; 
     47                                if(strlen($text) > 105) 
     48                                        $text = substr($text,0,105).' ...'; 
    4149                         
    4250                                $link_msg = $GLOBALS['phpgw']->link( 
    4351                                                '/'.$current_app.'/index.php', 
    4452                                                'msgball[msgnum]='.$msg_number.'&msgball[folder]=INBOX'); 
    45                                 $data[] = array('text' => $subject,     'link' => $link_msg     );               
    46                         } 
     53                                $data[] = array('text' => $text, 'link' => $link_msg);           
     54                        }                        
    4755                } 
    48                  
     56                                 
    4957                imap_close($mbox_stream); 
    50                  
    51                 $title = $current_name." - ".($new_m > 1 ? lang("you have %1 new messages!",$new_m) : ($new_m == 1 ? lang("you have 1 new message!") : lang("you have no new messages")));                       
     58                                 
     59                $title = $current_name." - ".($new_m > 1 ? lang("You have %1 new messages!","<font color=red>".$new_m."</font>") : ($new_m == 1 ? str_replace("1","<font color=red>1</font>",lang("you have 1 new message!")) : lang("you have no new messages")));                      
    5260                $GLOBALS['phpgw']->translation->add_app($current_app); 
    5361 
     
    8189                        $portalbox->set_controls($key,$value); 
    8290 
    83                 $portalbox->data = $data;                        
     91                $portalbox->data = $data; 
     92                                         
    8493                echo "\n".'<!-- BEGIN Mailbox info -->'."\n".$portalbox->draw($extra_data).'<!-- END Mailbox info -->'."\n"; 
    8594        } 
Note: See TracChangeset for help on using the changeset viewer.