*/ function mobiletemplate(){ $this->template = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']); $this->template->set_file(Array('home_t' => 'home.tpl')); $this->template->set_block('home_t', 'mobile_home'); } /* * @function set_content * @abstract Carrega o atributo "content" do template principal * @author Nilton Emilio Buhrer Neto */ public function set_content($content){ $pre_content = $this->template->get_var("content"); $this->template->set_var("content", $pre_content.$content); } /* * @function print_all * @abstract Imprime toda tela do Expresso Mini * @author Nilton Emilio Buhrer Neto */ public function print_page($class, $method){ $this->print_header(); $this->print_navbar(); $filename = 'inc/class.'.$class.'.inc.php'; include_once($filename); $obj = new $class(); $obj -> $method(); $this->template->pfp('out', 'mobile_home'); } /* * @function print_navbar * @abstract Imprime o início da tela do Expresso Mini => barra de navegação * @author Mário César Kolling */ private function print_navbar(){ $this-> template->set_var('href_newmail', 'index.php?menuaction=mobile.ui_mobilemail.new_msg&clk=01'); $this-> template->set_var('lang_newmail', lang('Create mail')); $this-> template->set_var('href_email', "index.php?menuaction=mobile.ui_mobilemail.mail_list"); $this-> template->set_var('lang_email', lang('E-mail')); $this-> template->set_var('href_calendar', "index.php?menuaction=mobile.ui_mobilecalendar.index"); $this-> template->set_var('lang_calendar', lang('Calendar')); $this-> template->set_var('href_cc', 'index.php?menuaction=mobile.ui_mobilecc.contacts_list'); $this-> template->set_var('lang_cc', lang('Contact Center')); } /* * @function print_header * @abstract Imprime o início da tela do Expresso Mini => headers html * @author Mário César Kolling */ private function print_header(){ $GLOBALS['phpgw']->accounts->read_repository(); $var = Array( 'fullname' => $GLOBALS['phpgw']->accounts->data['fullname'], 'account_lid' => $GLOBALS['phpgw_info']['user']['account_lid'], 'lang_logout' => lang('Logout'), 'template_set' => $GLOBALS['phpgw_info']['server']['template_set'] ); $this->template->set_var($var); } } ?>