- Timestamp:
- 05/17/11 16:26:32 (13 years ago)
- Location:
- sandbox/2.2.0.2/expressoMail1_2/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.2.0.2/expressoMail1_2/inc/class.attachment.inc.php
r4414 r4436 1 1 <?php 2 /** 3 * Classe que manipula e gerencia toda a parte de anexos. 4 * 5 * @package ExpressoMail 6 * @license http://www.gnu.org/copyleft/gpl.html GPL 7 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 8 * @author Cristiano Correa 9 */ 2 10 3 11 class attachment … … 19 27 /** 20 28 * Constructor 29 * @license http://www.gnu.org/copyleft/gpl.html GPL 30 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 21 31 * @param string $folder Imap folder name 22 32 * @param integer $msgNumber Imap menssagem number … … 49 59 /** 50 60 * Open mail from Imap and parse structure 51 * @return string menssagem 61 * @license http://www.gnu.org/copyleft/gpl.html GPL 62 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 63 * @return string menssagem 52 64 */ 53 65 public function setStructureFromMail($folder,$msgNumber) … … 84 96 85 97 /** 86 * Set Stucture from Mail_mimeDecode Structure 87 * @param Mail_mimeDecode $structure 98 * Set Stucture from Mail_mimeDecode Structure 99 * @license http://www.gnu.org/copyleft/gpl.html GPL 100 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 101 * @param Mail_mimeDecode $structure 88 102 */ 89 103 public function setStructure($structure) … … 94 108 /** 95 109 * Set Stucture from raw mail code 110 * @license http://www.gnu.org/copyleft/gpl.html GPL 111 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 96 112 * @param Mail_mimeDecode $structure 97 113 */ … … 104 120 /** 105 121 * Returns Attachment Decoded 106 * @param string $partNumber Index part 122 * @license http://www.gnu.org/copyleft/gpl.html GPL 123 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 124 * @param string $partNumber Index part 107 125 * @return string Attachment Decoded 108 126 */ … … 116 134 /** 117 135 * Returns EmbeddedImages Infos 118 * @return array EmbeddedImages 136 * @license http://www.gnu.org/copyleft/gpl.html GPL 137 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 138 * @return array EmbeddedImages 119 139 */ 120 140 public function getEmbeddedImagesInfo() … … 127 147 /** 128 148 * Returns Attachments Infos 129 * @return array 149 * @license http://www.gnu.org/copyleft/gpl.html GPL 150 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 151 * @return array 130 152 */ 131 153 public function getAttachmentsInfo() … … 138 160 /** 139 161 * Returns Attachment Info 140 * @param string $partNumber Index part 162 * @license http://www.gnu.org/copyleft/gpl.html GPL 163 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 164 * @param string $partNumber Index part 141 165 * @return array 142 166 */ … … 150 174 /** 151 175 * returns the source code menssagem 152 * @return string menssagem 176 * @license http://www.gnu.org/copyleft/gpl.html GPL 177 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 178 * @return string menssagem 153 179 */ 154 180 private function _getRaw() … … 159 185 /** 160 186 * Returns content from the searched 161 * @param pointer $structure Structure object 187 * @license http://www.gnu.org/copyleft/gpl.html GPL 188 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 189 * @param pointer $structure Structure object 162 190 * @param string $soughtIndex 163 191 * @param pointer $body Content … … 192 220 } 193 221 222 /** 223 * @license http://www.gnu.org/copyleft/gpl.html GPL 224 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 225 */ 194 226 private function _getPartInfo(&$structure, $soughtIndex,&$info,$pIndex = '0') 195 227 { … … 353 385 } 354 386 355 356 357 358 387 } 359 388 360 361 389 ?> -
sandbox/2.2.0.2/expressoMail1_2/inc/class.imap_functions.inc.php
r4429 r4436 576 576 } 577 577 578 /** 579 * @license http://www.gnu.org/copyleft/gpl.html GPL 580 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 581 * @param $msg_number numero da mensagem 582 */ 578 583 function getRawHeader($msg_number) 579 584 { … … 581 586 } 582 587 588 /** 589 * @license http://www.gnu.org/copyleft/gpl.html GPL 590 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 591 * @param $msg_number numero da mensagem 592 */ 583 593 function getRawBody($msg_number) 584 594 { … … 586 596 } 587 597 598 599 /** 600 * @license http://www.gnu.org/copyleft/gpl.html GPL 601 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 602 * @param $msg mensagem 603 */ 588 604 function builderMsgHeader($msg) 589 605 { … … 615 631 } 616 632 617 /**633 /** 618 634 * Constroe o corpo da msg direto na variavel de conteudo 619 635 * @param Mail_mimeDecode $structure … … 741 757 742 758 743 function get_msg_sample($msg_number) 759 /** 760 * @license http://www.gnu.org/copyleft/gpl.html GPL 761 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 762 * @param $msg_number numero da mensagem 763 */ 764 function get_msg_sample($msg_number) 744 765 { 745 766 … … 1350 1371 } 1351 1372 1373 1374 /** 1375 * @license http://www.gnu.org/copyleft/gpl.html GPL 1376 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 1377 * @param $images 1378 * @param $msgno 1379 * @param $body 1380 * @param $msg_folder 1381 */ 1352 1382 function process_embedded_images($images, $msgno, $body, $msg_folder) 1353 1383 { … … 1448 1478 } 1449 1479 1450 function replace_links(&$body) 1480 1481 1482 /** 1483 * @license http://www.gnu.org/copyleft/gpl.html GPL 1484 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 1485 * @param $body corpo da mensagem 1486 */ 1487 function replace_links(&$body) 1451 1488 { 1452 1489 // Domains and IPs addresses found in the text and which is not a link yet should be replaced by one. … … 1621 1658 } 1622 1659 1660 1661 /** 1662 * @license http://www.gnu.org/copyleft/gpl.html GPL 1663 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 1664 * @param $images 1665 * @param $msg_number 1666 * @param $msg_folder 1667 */ 1623 1668 function get_thumbs($images, $msg_number, $msg_folder) 1624 1669 { … … 2429 2474 } 2430 2475 2476 2477 /** 2478 * @license http://www.gnu.org/copyleft/gpl.html GPL 2479 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 2480 * @param $mail email 2481 * @param $msg_uid uid da mensagem 2482 * @param $forwarding_attachments anexos 2483 */ 2431 2484 function buildEmbeddedImages(&$mail,$msg_uid,&$forwarding_attachments) 2432 2485 { … … 3946 3999 } 3947 4000 3948 function spam($params) 4001 4002 /** 4003 * @license http://www.gnu.org/copyleft/gpl.html GPL 4004 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 4005 * @param $params 4006 */ 4007 function spam($params) 3949 4008 { 3950 4009 … … 4010 4069 return false; 4011 4070 } 4012 function get_header($msg_number){ 4013 $header = @imap_headerinfo($this->mbox, imap_msgno($this->mbox, $msg_number), 80, 255); 4071 4072 4073 function get_header($msg_number) 4074 { 4075 $header = @imap_headerinfo($this->mbox, imap_msgno($this->mbox, $msg_number), 80, 255); 4014 4076 if (!is_object($header)) 4015 4077 return false; … … 4040 4102 } 4041 4103 if($timestamp){ 4042 $tempDir = ini_get("session.save_path"); 4043 $file = $tempDir."imap_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]; 4104 $pdate = date_parse(date('r')); // pega a data atual do servidor (TODO: pegar a data da mensagem local) 4105 $file = $tempDir."imap_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]; 4106 $timestamp += $pdate['zone']*(60); //converte a data da mensagem para o fuso horário GMT 0. Isto é feito devido ao Expresso Mail armazenar a data no fuso horário GMT 0 e para exibi-la converte ela para o fuso horário local. 4107 4108 /* TODO: o diretorio /tmp deve ser substituido pelo diretorio temporario configurado no setup */ 4109 $file = "/tmp/sess_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]; 4044 4110 $f = fopen($file,"w"); 4045 4111 fputs($f,base64_encode($source)); 4046 4112 fclose($f); 4047 $command = "python ".$_SE RVER['DOCUMENT_ROOT']."/expressoMail1_2/imap.py ".escapeshellarg($imap_server)." ".escapeshellarg($imap_port)." ".escapeshellarg($username)." ".escapeshellarg($password)." ".escapeshellarg($timestamp)." ".escapeshellarg($folder)." ".escapeshellarg($file);4113 $command = "python ".$_SESSION['rootPatch']."/expressoMail1_2/imap.py ".escapeshellarg($imap_server)." ".escapeshellarg($imap_port)." ".escapeshellarg($username)." ".escapeshellarg($password)." ".escapeshellarg($timestamp)." ".escapeshellarg($folder)." ".escapeshellarg($file); 4048 4114 $return['command']=exec(escapeshellcmd($command)); 4049 4115 }else{
Note: See TracChangeset
for help on using the changeset viewer.