Changeset 1709
- Timestamp:
- 11/26/09 10:27:48 (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r1707 r1709 2934 2934 return $return; 2935 2935 } 2936 2937 2938 function mobile_search($params) 2939 { 2940 include("class.imap_attachment.inc.php"); 2941 $imap_attachment = new imap_attachment(); 2942 $criterias = array ("TO","SUBJECT","FROM","CC"); 2943 $return = array(); 2944 $folders = $this->get_folders_list(); 2945 $num_msgs = 0; 2946 2947 foreach($folders as $id =>$folder) 2948 { 2949 if(strpos($folder['folder_id'],'user')===false && is_array($folder)) { 2950 foreach($criterias as $criteria_fixed) 2951 { 2952 $_filter = $criteria_fixed . ' "'.$params['filter'].'"'; 2953 $mbox_stream = $this->open_mbox($folder['folder_name']); 2954 2955 $messages = imap_search($mbox_stream, $_filter, SE_UID); 2956 2957 if ($messages == ''){ 2958 if($mbox_stream) 2959 imap_close($mbox_stream); 2960 continue; 2961 } 2962 2963 foreach($messages as $msg_number) 2964 { 2965 $temp = $this->get_info_head_msg($msg_number); 2966 if(!$temp) 2967 return false; 2968 2969 $return[$num_msgs] = $temp; 2970 $num_msgs++; 2971 } 2972 $return['num_msgs'] = $num_msgs; 2973 2974 if($mbox_stream) 2975 imap_close($mbox_stream); 2976 } 2977 } 2978 2979 } 2980 return $return; 2981 } 2936 2982 2937 2983 function delete_and_show_previous_message($params) -
trunk/mobile/inc/class.mobiletemplate.inc.php
r1499 r1709 81 81 'account_lid' => $GLOBALS['phpgw_info']['user']['account_lid'], 82 82 'lang_logout' => lang('Logout'), 83 'template_set' => $GLOBALS['phpgw_info']['server']['template_set'] 83 'template_set' => $GLOBALS['phpgw_info']['server']['template_set'], 84 'lang_search' => lang('Search') 84 85 ); 85 86 $this->template->set_var($var); -
trunk/mobile/inc/class.ui_mobilemail.inc.php
r1474 r1709 428 428 $this->pages = ceil($this->number_of_messages/$this->messages_per_page); 429 429 $page = $this->current_page; 430 431 $params = array( 432 'folder' => $this->folders[$this->current_folder]['folder_id'], 433 'msg_range_begin' => $this->current_page * $this->messages_per_page - ($this->messages_per_page - 1), 434 'msg_range_end' => $this->current_page * $this->messages_per_page, 435 'sort_box_type' => 'SORTARRIVAL', 436 'sort_box_reverse' => 1 437 ); 438 439 $messages = $this->imap_functions->get_range_msgs2($params); 430 431 if($_POST["searchEmail"]){ 432 $params = array( 433 'filter' => $_POST["searchEmail"] 434 ); 435 436 $messages = $this->imap_functions->mobile_search($params); 437 }else{ 438 $params = array( 439 'folder' => $this->folders[$this->current_folder]['folder_id'], 440 'msg_range_begin' => $this->current_page * $this->messages_per_page - ($this->messages_per_page - 1), 441 'msg_range_end' => $this->current_page * $this->messages_per_page, 442 'sort_box_type' => 'SORTARRIVAL', 443 'sort_box_reverse' => 1 444 ); 445 446 $messages = $this->imap_functions->get_range_msgs2($params); 447 } 440 448 $this->print_mails_list($messages); 441 449 $this->print_page_navigation($this->pages, $this->current_page); -
trunk/mobile/templates/celepar/home.tpl
r623 r1709 10 10 <body style="background-color:white !important"> 11 11 <p> <strong>{fullname}: [{account_lid}]</strong></p> 12 <form action="index.php?menuaction=mobile.ui_mobilemail.mail_list" method="post"> 13 <p> <input type="text" size="15" name="searchEmail"/><br/> 14 <input type="submit" id="btnSearch" value="{lang_search}"/></p> 15 </form> 12 16 <hr /> 13 17 <p> -
trunk/mobile/templates/default/home.tpl
r1474 r1709 12 12 <!-- END mobile_home_content --> 13 13 <p> <strong>{fullname}: [{account_lid}]</strong></p> 14 <form action="index.php?menuaction=mobile.ui_mobilemail.mail_list" method="post"> 15 <p> <input type="text" size="15" name="searchEmail"/><br/> 16 <input type="submit" id="btnSearch" value="{lang_search}"/></p> 17 </form> 14 18 <hr /> 15 19 <!-- TODO: Yep! Deveria ser flexível, não hardcoded do jeito que tá -->
Note: See TracChangeset
for help on using the changeset viewer.