Changeset 5037
- Timestamp:
- 09/05/11 17:12:06 (12 years ago)
- Location:
- trunk/mobile
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mobile/inc/class.ui_mobilecc.inc.php
r4277 r5037 65 65 public function change_max_results($params) { 66 66 $this->page_info['actual_max_contacts'] = $params['results']; 67 $this->save_session(); 67 68 $this->contacts_list(); 69 } 70 71 public function change_letter($params) 72 { 73 if( $params['letter'] ) 74 { 75 $this->page_info['actual_letter'] = $params['letter']; 76 } 77 $this->page_info['actual_max_contacts'] = 10; 68 78 $this->save_session(); 69 } 70 71 public function change_letter($params) { 72 $this->page_info['actual_letter'] = $params['letter']; 79 $this->contacts_list($params); 80 } 81 82 public function change_catalog($params) 83 { 84 $this->page_info['actual_catalog'] = $params['catalog']; 85 $this->page_info['actual_letter'] = 'a'; 73 86 $this->page_info['actual_max_contacts'] = 10; 74 $this->contacts_list();75 87 $this->save_session(); 76 }77 78 public function change_catalog($params) {79 80 if( $params['catalog'] ) $this->page_info['actual_catalog'] = $params['catalog'];81 $this->page_info['actual_max_contacts'] = 10;82 $this->page_info['actual_letter'] = 'a';83 84 88 $this->contacts_list($params); 85 86 $this->save_session();87 89 } 88 90 … … 96 98 $this->set_page_info_to_default(); 97 99 $this->page_info['request_from'] = $params['request_from']; //Para escolher contato vindo de outro modulo, mudo apenas o request_from 100 $this->save_session(); 98 101 $this->contacts_list(); 99 $this->save_session();100 102 } 101 103 … … 108 110 public function init_cc($params) { 109 111 $this->set_page_info_to_default(); 112 $this->save_session(); 110 113 $this->contacts_list($params); 111 $this->save_session();112 114 } 113 115 … … 242 244 */ 243 245 244 function delete_contacts($params) { 246 function delete_contacts($params) 247 { 245 248 $this->bo->set_catalog($params['catalog']); 246 249 … … 369 372 * @return $contact 370 373 */ 371 function contact_view($params) { 372 373 if ( empty($params['id']) || empty($params['catalog']) ){ 374 function contact_view($params) 375 { 376 377 if ( empty($params['id']) || empty($params['catalog']) ) 378 { 374 379 header('Location: ../mobile/index.php?menuaction=mobile.ui_mobilecc.init_cc'); 375 380 } … … 633 638 $view = true; 634 639 635 if ( !isset($params['erro'])){ 640 if ( !isset($params['erro'])) 641 { 636 642 $this->bo->set_catalog($params['catalog']); 637 643 $result = $this->bo->bo->get_single_entry($params['id'], array("given_names"=>true,"names_ordered"=>true,"alias"=>true,"family_names"=>true,"companies"=>true,"relations"=>true,"connections"=>true)); … … 727 733 $data['connections']['default_phone']['connection_value'] = $params['phone']; 728 734 } 729 730 735 $this->bo->set_catalog($params['catalog']); 731 736 $contact_id = $this->bo->bo->quick_add($data); … … 761 766 else 762 767 { 763 764 768 $this->bo->set_catalog($params['catalog']); 765 769 $types = $this->bo->bo->get_all_connections_types(); … … 850 854 851 855 } 852 853 854 856 } 855 856 857 857 ?> -
trunk/mobile/inc/class.ui_mobilemail.inc.php
r4354 r5037 689 689 function new_msg($params) 690 690 { 691 $flagImportant = intval($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_important_flag']); 691 692 $this->template->set_file(array('new_msg_t' => 'new_msg.tpl')); 692 693 $this->template->set_block('new_msg_t', 'page'); … … 702 703 $this->template->set_var('lang_cc', lang("cc")); 703 704 $this->template->set_var('lang_subject', lang("Subject")); 705 $this->template->set_var('visible_important', ( ($flagImportant == 1 ) ? "block" : "none" ) ); 704 706 $this->template->set_var('lang_mark_as_important', lang("mark as important")); 705 707 $this->template->set_var('lang_read_confirmation', lang("read confirmation")); … … 708 710 $this->template->set_var("show_check_add_history","none"); 709 711 710 if(isset($params["error_message"])) { 712 if(isset($params["error_message"])) 713 { 711 714 $this->template->set_var('input_to', $_POST['input_to']); 712 715 $this->template->set_var('input_cc', $_POST['input_cc']); … … 723 726 724 727 $GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]); 725 } else { 726 if (isset($params['msg_number'])) $msg = $this->imap_functions->get_info_msg(array('msg_number' => $params['msg_number'], 'msg_folder' => $params['msg_folder'] ) ); 727 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 } 728 735 729 736 if($params['type']=="clk") … … 790 797 $this->template->set_var("show_forward_attachment","block"); 791 798 $this->template->set_block("new_msg_t","forward_attach_block"); 792 foreach($msg['attachments'] as $forward_attach) { 799 foreach($msg['attachments'] as $forward_attach) 800 { 793 801 $value = rawurlencode(serialize(array(0=>$msg['msg_folder'], 794 802 1=>$msg['msg_number'], … … 802 810 } 803 811 } 804 else if($params['type']=="use_draft"){ 812 else if($params['type']=="use_draft") 813 { 805 814 $this->template->set_var('input_to', $msg['toaddress2']); 806 815 $this->template->set_var('input_cc', $msg['cc']); … … 918 927 if($isImportant) $mail->isImportant(); 919 928 //add history 920 if($addHistory && $msgNumber) { 929 if($addHistory && $msgNumber) 930 { 921 931 $msg = $this->imap_functions->get_info_msg(array('msg_number' => $msgNumber ) ); 922 $mail->Body .= "<br />".$msg['body']."<br />"; 932 933 $_name = ( isset($msg['from']['name']) ) ? $msg['from']['name'] : ""; 934 $_email = ( isset($msg['from']['email']) ) ? " ".$msg['from']['email']." " : ""; 935 936 $history_msg = "<br/><br/><br/>"; 937 $history_msg .= lang('At %1, %2 hours, %3 wrote:', $msg['msg_day'], $msg['msg_hour'],"\"".$_name."\"".$_email ); 938 $history_msg .= "<br/>"; 939 940 $mail->Body .= "<br/>". $history_msg . $msg['body']."<br/>"; 923 941 } 924 942 //read confirmation … … 974 992 header("Location: index.php?menuaction=mobile.ui_mobilemail.index&error_message=".lang("please select one e-mail")); 975 993 } else { 976 $params_messages = array( 977 'msgs_number' => isset($params['msgs'])?implode(",",$params['msgs']):$params['msg_number'], 978 'folder' => $this->folders[$this->current_folder]['folder_name'], 979 'new_folder_name' => 'Trash', 980 'new_folder' => 'INBOX/Trash' 981 ); 994 $msg = ""; 995 996 if($params["msg_folder"] == "INBOX/Trash") { 997 $params_messages = array( 998 'msgs_number' => isset($params['msgs'])?implode(",",$params['msgs']):$params['msg_number'], 999 'folder' => 'INBOX/Trash' 1000 ); 982 1001 983 $this->imap_functions->move_messages($params_messages); 984 header("Location: index.php?menuaction=mobile.ui_mobilemail.index&success_message=".lang("The messages were moved to trash").'&ignore_trace_url=true'); 1002 $this->imap_functions->delete_msgs($params_messages); 1003 1004 $msg = lang("The messages were deleted"); 1005 } else { 1006 $params_messages = array( 1007 'msgs_number' => isset($params['msgs'])?implode(",",$params['msgs']):$params['msg_number'], 1008 'folder' => $this->folders[$this->current_folder]['folder_name'], 1009 'new_folder_name' => 'Trash', 1010 'new_folder' => 'INBOX/Trash' 1011 ); 1012 1013 $this->imap_functions->move_messages($params_messages); 1014 1015 $msg = lang("The messages were moved to trash"); 1016 } 1017 1018 header("Location: index.php?menuaction=mobile.ui_mobilemail.index&success_message=".$msg.'&ignore_trace_url=true'); 985 1019 } 986 1020 } -
trunk/mobile/index.php
r4277 r5037 8 8 //$fwConstruct = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $proxies[0] : $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 9 9 $fwConstruct = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $proxies[0] : $_SERVER['HTTP_HOST']; 10 $REQUEST_URI = substr( $_SERVER['REQUEST_URI'], 0, strpos( $_SERVER['REQUEST_URI'], "/mobile/" ) + 8 ); 10 $REQUEST_URI = substr( $_SERVER['REQUEST_URI'], 0, strpos( $_SERVER['REQUEST_URI'], "/mobile/"+1)); 11 if( strpos( $_SERVER['REQUEST_URI'], "/mobile/" ) !== false ) 12 { 13 $REQUEST_URI = substr($_SERVER['REQUEST_URI'], 0, strpos( $_SERVER['REQUEST_URI'], "/mobile/")); 14 } 15 11 16 $fwConstruct .= $REQUEST_URI; 12 17 … … 21 26 $aux = 'https://'; 22 27 } 23 24 Header('Location: ' . $aux . $fwConstruct . " login.php");25 exit;28 29 Header('Location: ' . $aux . $fwConstruct . "/login.php"); 30 exit; 26 31 } 27 32 … … 29 34 { 30 35 if ($_SERVER['HTTPS'] != 'on') { 31 Header('Location: https://' . $fwConstruct . '/' .$_SERVER['REQUEST_URI']);36 Header('Location: https://' . $fwConstruct . $_SERVER['REQUEST_URI']); 32 37 exit; 33 38 } -
trunk/mobile/login.php
r4277 r5037 158 158 $_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['expressoMail']; 159 159 160 if($_POST['save_login'] == 'yes')160 if($_POST['save_login'] === 'on') 161 161 { 162 162 // Time to keep values into cookies … … 165 165 $GLOBALS['phpgw']->session->phpgw_setcookie('pem', base64_encode($passwd), $ttl); // pem = password 166 166 } 167 start_prefered_app(); 168 } 169 } 170 elseif ($_GET['lang']) 171 { 172 $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $_GET['lang']; 167 168 if( isset($GLOBALS['sessionid']) ) 169 { 170 if( $_GET['cd'] != 10 && $_GET['cd'] != 1 && $_GET['cd'] !== 'logout_mobile' && $_GET['cd'] != 66 ) 171 { 172 start_prefered_app(); 173 } 174 } 175 } 173 176 } 174 177 elseif(!isset($_COOKIE['last_loginid']) || !$prefs->account_id) -
trunk/mobile/setup/phpgw_pt-br.lang
r4277 r5037 1 1 attachment mobile pt-br Anexo 2 2 Add Recipient mobile pt-br Adicionar Destinatário 3 At %1, %2 hours, %3 wrote: mobile pt-br Em %1 às %2 horas, %3 escreveu: 3 4 more attachment mobile pt-br mais anexo 4 5 cancel mobile pt-br Cancelar … … 64 65 This message don't have attachment(s) mobile pt-br Este e-mail não possui anexo(s) 65 66 This message has the follow attachments: mobile pt-br Esta mensagem possui anexo: 67 Tips mobile pt-br Dicas 66 68 Catalog mobile pt-br Catálogo 67 69 Phone mobile pt-br Telefone … … 108 110 No matches found mobile pt-br Contato não localizado 109 111 The message was moved to trash mobile pt-br A mensagem foi movida para a lixeira. 112 The messages were deleted mobile pt-br As mensagens foram apagadas. 110 113 The messages were moved to trash mobile pt-br As mensagens foram movidas para a lixeira. 111 114 The messages were marked as seen mobile pt-br As mensagens foram marcadas como lidas. -
trunk/mobile/templates/default/login.tpl
r4277 r5037 7 7 <meta content="text/html;width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; charset=utf-8;" http-equiv="Content-Type" name="viewport" /> 8 8 <meta name="format-detection" content="telephone=no" /> 9 <link href="templates/css/mobile.css" type="text/css" rel="StyleSheet" /> 9 <!-- link href="templates/css/mobile.css" type="text/css" rel="StyleSheet" /--> 10 <link type="text/css" rel="stylesheet" href="templates/css/login.css"> 10 11 <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/> 11 12 <link rel="apple-touch-icon" href="./templates/default/images/favicon.png" /> -
trunk/mobile/templates/default/new_msg.tpl
r4277 r5037 61 61 <div id="corpo_mensagem" class="limpar_div" style="background:#EFF8FB; display:table; width:100%" > 62 62 <div id="text_area"><textarea id="body" wrap="virtual" name="body" cols="5" rows="5">{body_value}</textarea></div> 63 <div class="limpar_div" > <input type="checkbox" name="check_important" {check_important} />{lang_mark_as_important}</div>63 <div class="limpar_div" style="display:{visible_important} !important;"> <input type="checkbox" name="check_important" {check_important} />{lang_mark_as_important}</div> 64 64 <div class="limpar_div"> <input type="checkbox" name="check_read_confirmation" {check_read_confirmation} />{lang_read_confirmation}</div> 65 65 <div class="limpar_div" style="display:{show_check_add_history}"> <input type="checkbox" name="check_add_history" {check_add_history} />{lang_add_history}</div>
Note: See TracChangeset
for help on using the changeset viewer.