Changeset 91 for trunk/expressoMail1_2
- Timestamp:
- 11/07/07 15:19:35 (17 years ago)
- Location:
- trunk/expressoMail1_2
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.exporteml.inc.php
r64 r91 183 183 function remove_accents($string) { 184 184 return strtr($string, 185 "?Ó??ó?Ý?úÁÀÃÂÄÇÉÈÊËÍÌ?ÎÏÑÕÔÓÒÖÚÙ?ÛÜ?áàãâäçéèêëíì?îïñóòõôöúù?ûüýÿ '\"",186 "SOZsozYYuAAAAACEEEEIIIIINOOOOOUUUUUsaaaaaceeeeiiiiinooooouuuuuyy__ ");185 "?Ó??ó?Ý?úÁÀÃÂÄÇÉÈÊËÍÌ?ÎÏÑÕÔÓÒÖÚÙ?ÛÜ?áàãâäçéèêëíì?îïñóòõôöúù?ûüýÿ:'\"", 186 "SOZsozYYuAAAAACEEEEIIIIINOOOOOUUUUUsaaaaaceeeeiiiiinooooouuuuuyy___"); 187 187 } 188 188 -
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r86 r91 2 2 include_once("class.functions.inc.php"); 3 3 include_once("class.ldap_functions.inc.php"); 4 include_once("class.exporteml.inc.php"); 5 4 6 class imap_functions 5 7 { … … 157 159 $return['body'] = $return_get_body['body']; 158 160 $return['attachments'] = $return_get_body['attachments']; 159 $return['thumbs'] = $return_get_body['thumbs']; 161 $return['thumbs'] = $return_get_body['thumbs']; 162 $return['signature'] = $return_get_body['signature']; 160 163 161 164 foreach($all_header as $line) { … … 353 356 $return['attachments'] = $this-> download_attachment($msg,$msg_number); 354 357 if(!$this->has_cid) 355 $return['thumbs'] = $this->get_thumbs($msg,$msg_number,$msg_folder); 358 { 359 $return['thumbs'] = $this->get_thumbs($msg,$msg_number,$msg_folder); 360 $return['signature'] = $this->get_signature($msg,$msg_number,$msg_folder); 361 } 356 362 357 363 if(!$msg->structure[$msg_number]->parts) //Simple message, only 1 piece … … 689 695 } 690 696 return $body; 697 } 698 699 function get_signature($msg, $msg_number, $msg_folder) 700 { 701 foreach ($msg->file_type[$msg_number] as $index => $file_type) 702 { 703 $file_type = strtolower($file_type); 704 if(strtolower($msg->encoding[$msg_number][$index]) == 'base64') 705 { 706 if ($file_type == 'application/x-pkcs7-signature') 707 { 708 $export_mail = new ExportEml(); 709 $params['folder'] = $msg_folder; 710 $params['msgs_to_export'] = $msg_number; 711 $result = openssl_pkcs7_verify ($export_mail->export_msg($params),PKCS7_NOVERIFY); 712 713 /* Message verified */ 714 if ($result === true) 715 $sign = "signed"; 716 else 717 $sign = "void"; 718 } 719 } 720 } 721 return $sign; 691 722 } 692 723 -
trunk/expressoMail1_2/js/draw_api.js
r88 r91 719 719 if (info_msg.attachments.length > 0) 720 720 td.innerHTML += " <img style='cursor:pointer' onclick='javascript:Element(\"option_hide_more_"+ID+"\").onclick()' src ='templates/default/images/clip.gif' title='"+info_msg.attachments.names+"'>"; 721 722 if (typeof(info_msg.signature) == 'string') 723 { 724 if (info_msg.signature == "signed") 725 td.innerHTML += " <img style='cursor:pointer' onclick='alert(\""+get_lang("This message is signed, and you can trust.")+"\");' title='"+get_lang("Signed message")+"' src='templates/default/images/signed.gif'>"; 726 else 727 td.innerHTML += " <img style='cursor:pointer' onclick='alert(\""+get_lang("This message is signed, but it is invalid. You should not trust on it.")+"\");' title='"+get_lang("Voided message")+"' src='templates/default/images/invalid.gif'>"; 728 } 721 729 722 730 // NORMAL MSG
Note: See TracChangeset
for help on using the changeset viewer.