Changeset 3554 for branches/2.2/mobile/inc
- Timestamp:
- 12/02/10 10:11:46 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/mobile/inc/class.mobiletemplate.inc.php
r3499 r3554 1 1 <?php 2 include_once(PHPGW_INCLUDE_ROOT.'/mobile/inc/class.ui_mobile.inc.php');2 //include_once(PHPGW_INCLUDE_ROOT.'/mobile/inc/class.ui_mobile.inc.php'); 3 3 class mobiletemplate 4 4 { … … 12 12 function mobiletemplate(){ 13 13 $this->template = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']); 14 $this->template->set_file(Array('home_t' => ' home.tpl'));14 $this->template->set_file(Array('home_t' => 'template.tpl')); 15 15 $this->template->set_block('home_t', 'mobile_home'); 16 16 } … … 37 37 include_once($filename); 38 38 $obj = new $class(); 39 $obj -> $method( );39 $obj -> $method($_REQUEST); 40 40 $this->template->pfp('out', 'mobile_home'); 41 41 } … … 47 47 */ 48 48 private function print_navbar(){ 49 $ui_mobilemail = CreateObject('mobile.ui_mobilemail');50 49 51 $this-> template->set_var('href_newmail', 'index.php?menuaction=mobile.ui_mobilemail.new_msg&clk=01'); 52 $this-> template->set_var('lang_newmail', lang('Create mail')); 53 $this-> template->set_var('href_email', "index.php?menuaction=mobile.ui_mobilemail.change_folder&folder=0"); 50 $obj = createobject("expressoMail1_2.functions"); 51 // setting timezone preference 52 $zones = $obj->getTimezones(); 53 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['timezone'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['timezone'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['timezone'] : sprintf("%s", array_search("America/Sao_Paulo", $zones)); 54 55 56 $this-> template->set_var('lang_back', lang('Back')); 57 $this-> template->set_var('lang_home', lang('home')); 54 58 $this-> template->set_var('lang_email', lang('E-mail')); 55 56 $obj = createobject("expressoMail1_2.functions"); 57 // setting timezone preference 58 $zones = $obj->getTimezones(); 59 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['timezone'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['timezone'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['timezone'] : sprintf("%s", array_search("America/Sao_Paulo", $zones)); 60 61 $save_in_folder = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] : "-1"; 62 $save_in_folder = @eregi_replace("INBOX/", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder); 63 $save_in_folder = @eregi_replace("INBOX.", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder); 64 $save_in_folder = $save_in_folder == '' ? 'INBOX/Sent':$save_in_folder; 65 $folder_number = $ui_mobilemail->get_folder_number($save_in_folder); 66 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] = $save_in_folder; 67 68 $this-> template->set_var('href_sent', "index.php?menuaction=mobile.ui_mobilemail.change_folder&folder=".$folder_number); 69 $this-> template->set_var('lang_sent', str_replace('*','',lang(str_replace('INBOX/','',$save_in_folder)))); 70 $this-> template->set_var('href_more', 'index.php?menuaction=mobile.ui_mobilemail.list_folders'); 71 $this-> template->set_var('lang_more_folders', lang('More folders...')); 72 $this-> template->set_var('href_calendar', "index.php?menuaction=mobile.ui_mobilecalendar.index"); 59 $this-> template->set_var('lang_contacts', lang('Contact Center')); 73 60 $this-> template->set_var('lang_calendar', lang('Calendar')); 74 61 $this-> template->set_var('href_cc', 'index.php?menuaction=mobile.ui_mobilecc.contacts_list'); 75 $this-> template->set_var('lang_cc', lang('Contact Center')); 62 $this-> template->set_var('href_email', "index.php?menuaction=mobile.ui_mobilemail.change_folder&folder=0"); 63 $this-> template->set_var('href_calendar', "index.php?menuaction=mobile.ui_mobilecalendar.index"); 64 $this-> template->set_var('href_home', "..."); 65 76 66 } 77 67 … … 84 74 $GLOBALS['phpgw']->accounts->read_repository(); 85 75 $var = Array( 86 'fullname' => $GLOBALS['phpgw']->accounts->data['fullname'],87 'account_lid' => $GLOBALS['phpgw_info']['user']['account_lid'],88 'lang_logout' => lang('Logout'),89 'template_set' => $GLOBALS['phpgw_info']['server']['template_set'],90 76 'css' => $this->get_mobile_css(), 91 'lang_search' => lang('Search')92 77 ); 93 78 $this->template->set_var($var);
Note: See TracChangeset
for help on using the changeset viewer.