- Timestamp:
- 05/12/10 09:23:03 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/expressoMail1_2/inc/class.imap_functions.inc.php
r2740 r2758 3022 3022 3023 3023 function search_msg($params = ''){ 3024 $retorno = "";3025 3024 $mbox_stream = ""; 3026 3025 if(strpos($params['condition'],"#")===false) { //local messages … … 3076 3075 { 3077 3076 foreach($search_criteria as $new_search){ 3078 $m_token = trim("##".mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ) . "--" . $this->get_msg($new_search,$name_box,$mbox_stream) . "--".$new_search."##"."\n"); 3079 if(!@strstr($retorno,$m_token)) 3080 $retorno .= $m_token; 3077 $elem = $this->get_msg_detail($new_search,$name_box,$mbox_stream); 3078 $elem['boxname'] = mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ); 3079 $elem['uid'] = $new_search; 3080 $retorno[] = $elem; 3081 3081 } 3082 3082 } … … 3090 3090 { 3091 3091 foreach($search_criteria as $new_search) 3092 $retorno .= trim("##".mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ) . "--" . $this->get_msg($new_search,$name_box,$mbox_stream) . "--" . $new_search."##"."\n"); 3092 { 3093 $elem = $this->get_msg_detail($new_search,$name_box,$mbox_stream); 3094 $elem['boxname'] = mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ); 3095 $elem['uid'] = $new_search; 3096 $retorno[] = $elem; 3097 } 3093 3098 } 3094 3099 } … … 3097 3102 if($mbox_stream) 3098 3103 imap_close($mbox_stream); 3099 3100 3104 return $retorno ? $retorno : "none"; 3101 3105 } 3102 3106 3103 function get_msg ($uid_msg,$name_box, $mbox_stream )3107 function get_msg_detail($uid_msg,$name_box, $mbox_stream ) 3104 3108 { 3105 3109 $header = $this->get_header($uid_msg); 3106 include_once("class.imap_attachment.inc.php");3110 require_once("class.imap_attachment.inc.php"); 3107 3111 $imap_attachment = new imap_attachment(); 3108 3112 $attachments = $imap_attachment->get_attachment_headerinfo($mbox_stream, $uid_msg); … … 3121 3125 if($header->from[0]->personal != "") 3122 3126 $from = $header->from[0]->personal; 3123 $ret_msg = $this->decode_string($from) . "--" . $subject . "--". gmdate("d/m/Y",$header ->udate)."--". $this->size_msg($header->Size) ."--". $flag; 3127 $ret_msg['from'] = $this->decode_string($from); 3128 $ret_msg['subject'] = $subject; 3129 $ret_msg['udate'] = $header ->udate; 3130 $ret_msg['size'] = $header->Size; 3131 $ret_msg['flag'] = $flag; 3124 3132 return $ret_msg; 3125 3133 } 3126 3127 function size_msg($size){3128 $var = floor($size/1024);3129 if($var >= 1){3130 return $var." kb";3131 }else{3132 return $size ." b";3133 }3134 }3135 3134 3136 3135 function ob_array($the_object)
Note: See TracChangeset
for help on using the changeset viewer.