- Timestamp:
- 09/05/11 15:33:41 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/expressoMail1_2/MailArchiver/2.2/mobile/inc/class.ui_mobilemail.inc.php
r4644 r5035 487 487 function print_mails_list($messages,$print_checkbox=false) 488 488 { 489 $flagImportant = intval($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_important_flag']); 490 491 $functions = $this->common; 489 $functions = $this->common; 492 490 $p = $this->template; 493 491 $p->set_file( array( 'mobilemail_t' => 'mails_list.tpl' ) ); … … 524 522 $flag="email-lido "; 525 523 526 if( $message["Flagged"]==="F" && $flagImportant == 1)524 if( $message["Flagged"]==="F" ) 527 525 $flag.="email-importante"; 528 526 … … 691 689 function new_msg($params) 692 690 { 691 $flagImportant = intval($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_important_flag']); 693 692 $this->template->set_file(array('new_msg_t' => 'new_msg.tpl')); 694 693 $this->template->set_block('new_msg_t', 'page'); … … 704 703 $this->template->set_var('lang_cc', lang("cc")); 705 704 $this->template->set_var('lang_subject', lang("Subject")); 705 $this->template->set_var('visible_important', ( ($flagImportant == 1 ) ? "block" : "none" ) ); 706 706 $this->template->set_var('lang_mark_as_important', lang("mark as important")); 707 707 $this->template->set_var('lang_read_confirmation', lang("read confirmation")); … … 710 710 $this->template->set_var("show_check_add_history","none"); 711 711 712 if(isset($params["error_message"])) { 712 if(isset($params["error_message"])) 713 { 713 714 $this->template->set_var('input_to', $_POST['input_to']); 714 715 $this->template->set_var('input_cc', $_POST['input_cc']); … … 725 726 726 727 $GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]); 727 } else { 728 if (isset($params['msg_number'])) $msg = $this->imap_functions->get_info_msg(array('msg_number' => $params['msg_number'], 'msg_folder' => $params['msg_folder'] ) ); 729 728 } 729 else 730 { 731 if (isset($params['msg_number']) ) 732 { 733 $msg = $this->imap_functions->get_info_msg(array('msg_number' => $params['msg_number'], 'msg_folder' => $params['msg_folder'] ) ); 734 } 730 735 731 736 if($params['type']=="clk") … … 779 784 $params["type"] = $params['mobile_add_contact']['type']; 780 785 } 781 else if($params['type']=="forward"){ 786 else if($params['type']=="forward") 787 { 782 788 $this->template->set_var('from', $msg['toaddress2']); 783 784 789 $this->template->set_var('subject', "Enc:" . $msg['subject']); 785 $this->template->set_var('body_value', strip_tags($msg['body'])); // Usa a função strip_tags() para filtrar 790 791 $_name = ( isset($msg['from']['name']) ) ? $msg['from']['name'] : ""; 792 $_email = ( isset($msg['from']['email']) ) ? " ".$msg['from']['email']." " : ""; 793 $forward_msg = "\n" . lang('At %1, %2 hours, %3 wrote:', $msg['msg_day'], $msg['msg_hour'],"\"".$_name."\"".$_email ); 794 795 // Usa a função strip_tags() para filtrar 786 796 // as tags que estão presentes no corpo do e-mail. 797 $this->template->set_var('body_value', "\n\n\n" . $forward_msg . "\n" . strip_tags($msg['body']) ); 787 798 788 799 $this->template->set_var('msg_number', $_GET['msg_number']); … … 792 803 $this->template->set_var("show_forward_attachment","block"); 793 804 $this->template->set_block("new_msg_t","forward_attach_block"); 794 foreach($msg['attachments'] as $forward_attach) { 805 foreach($msg['attachments'] as $forward_attach) 806 { 795 807 $value = rawurlencode(serialize(array(0=>$msg['msg_folder'], 796 808 1=>$msg['msg_number'], … … 804 816 } 805 817 } 806 else if($params['type']=="use_draft"){ 818 else if($params['type']=="use_draft") 819 { 807 820 $this->template->set_var('input_to', $msg['toaddress2']); 808 821 $this->template->set_var('input_cc', $msg['cc']); … … 812 825 $this->template->set_var('msg_folder', $_GET['msg_folder']); 813 826 } 814 else if($params['type']=="reply"){ 827 else if($params['type']=="reply") 828 { 815 829 $this->template->set_var('from', $msg['toaddress2']); 816 830 $this->template->set_var('input_to', $msg['from']['email']); 817 818 831 $this->template->set_var('subject', "Re:" . $msg['subject']); 819 820 832 $this->template->set_var('msg_number', $_GET['msg_number']); 821 833 $this->template->set_var('msg_folder', $_GET['msg_folder']); 822 } else { 834 } 835 else 836 { 823 837 $this->template->set_var('input_to', ""); 824 838 $this->template->set_var('input_cc', ""); … … 827 841 } 828 842 829 830 843 if($params['type']=="reply" || $params['type']=="forward" || $params['type']=="reply_all" ) 844 $this->template->set_var("show_check_add_history","block"); 831 845 832 846 //tem que ser realizado no final, pois o tipo user_add é modificado para o tipo que o originou … … 920 934 if($isImportant) $mail->isImportant(); 921 935 //add history 922 if($addHistory && $msgNumber) { 936 if($addHistory && $msgNumber) 937 { 923 938 $msg = $this->imap_functions->get_info_msg(array('msg_number' => $msgNumber ) ); 924 $mail->Body .= "<br />".$msg['body']."<br />"; 939 940 $_name = ( isset($msg['from']['name']) ) ? $msg['from']['name'] : ""; 941 $_email = ( isset($msg['from']['email']) ) ? " ".$msg['from']['email']." " : ""; 942 943 $history_msg = "<br/><br/><br/>"; 944 $history_msg .= lang('At %1, %2 hours, %3 wrote:', $msg['msg_day'], $msg['msg_hour'],"\"".$_name."\"".$_email ); 945 $history_msg .= "<br/>"; 946 947 $mail->Body .= "<br/>". $history_msg . $msg['body']."<br/>"; 925 948 } 926 949 //read confirmation … … 976 999 header("Location: index.php?menuaction=mobile.ui_mobilemail.index&error_message=".lang("please select one e-mail")); 977 1000 } else { 978 $params_messages = array( 979 'msgs_number' => isset($params['msgs'])?implode(",",$params['msgs']):$params['msg_number'], 980 'folder' => $this->folders[$this->current_folder]['folder_name'], 981 'new_folder_name' => 'Trash', 982 'new_folder' => 'INBOX/Trash' 983 ); 1001 $msg = ""; 1002 1003 if($params["msg_folder"] == "INBOX/Trash") { 1004 $params_messages = array( 1005 'msgs_number' => isset($params['msgs'])?implode(",",$params['msgs']):$params['msg_number'], 1006 'folder' => 'INBOX/Trash' 1007 ); 984 1008 985 $this->imap_functions->move_messages($params_messages); 986 header("Location: index.php?menuaction=mobile.ui_mobilemail.index&success_message=".lang("The messages were moved to trash").'&ignore_trace_url=true'); 1009 $this->imap_functions->delete_msgs($params_messages); 1010 1011 $msg = lang("The messages were deleted"); 1012 } else { 1013 $params_messages = array( 1014 'msgs_number' => isset($params['msgs'])?implode(",",$params['msgs']):$params['msg_number'], 1015 'folder' => $this->folders[$this->current_folder]['folder_name'], 1016 'new_folder_name' => 'Trash', 1017 'new_folder' => 'INBOX/Trash' 1018 ); 1019 1020 $this->imap_functions->move_messages($params_messages); 1021 1022 $msg = lang("The messages were moved to trash"); 1023 } 1024 1025 header("Location: index.php?menuaction=mobile.ui_mobilemail.index&success_message=".$msg.'&ignore_trace_url=true'); 987 1026 } 988 1027 }
Note: See TracChangeset
for help on using the changeset viewer.