source: branches/2.2/mobile/mobile_header.inc.php @ 3727

Revision 3727, 2.5 KB checked in by eduardoalex, 13 years ago (diff)

Ticket #1523 - Alterando estrutura do mobile para disponibilizar a versão desktop

Line 
1<?php
2        /**************************************************************************\
3        * eGroupWare                                                               *
4        * http://www.egroupware.org                                                *
5        * The file written by Mï¿œrio Cï¿œsar Kolling <mario.kolling@serpro.gov.br>    *
6        * --------------------------------------------                             *
7        *  This program is free software; you can redistribute it and/or modify it *
8        *  under the terms of the GNU General Public License as published by the   *
9        *  Free Software Foundation; either version 2 of the License, or (at your  *
10        *  option) any later version.                                              *
11        \**************************************************************************/
12
13        /*******************************************\
14         * Define a aplicaᅵᅵo mobile preferencial  *
15        \*******************************************/
16        //TODO: Ler do banco do expresso as preferï¿œncias do usuï¿œrio e definir a aplicaᅵᅵo mï¿œvel padrï¿œo
17        // por enquanto isto serï¿œ hardcoded para mobilemail.
18
19        $GLOBALS['phpgw_info']['flags']['currentapp'] = 'mobile';
20        $GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app'] =
21                                                $GLOBALS['phpgw']->session->appsession('mobilemail.folders','mobile')=="mini"?'mobilecalendar':'home'; //home, mobilecalendar, mobilecc ou mobilemail
22
23        if ( is_null($GLOBALS['phpgw_info']['server']['template_set']) )
24                $GLOBALS['phpgw_info']['server']['template_set'] = $GLOBALS['phpgw_info']['login_template_set'];
25        if ( !file_exists( PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set'] ) )
26                $GLOBALS['phpgw_info']['server']['template_set'] = 'default';
27
28        /*
29         * @
30
31         * @abstract Funᅵᅵo que chama a aplicaᅵᅵo mï¿œvel preferencial.
32         * @author Mï¿œrio Cï¿œsar Kolling <mario.kolling@serpro.gov.br>
33         */
34        function start_prefered_app(){
35                //TODO: Determinar qual a aplicaᅵᅵo mï¿œvel preferida e iniciï¿œ-la.                       
36                switch($GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app']){
37                        case home:
38                                $link = "ui_home.index";               
39                                break;                 
40                        case mobilemail:
41                                $link = "ui_mobilemail.change_folder&folder=0";         
42                                break;
43                        case mobilecalendar:
44                                $link = "ui_mobilecalendar.index";
45                                break;
46                        case mobilecc:
47                                $link = "ui_mobilecc.contacts_list";
48                                break;         
49                        default:
50                                break;         
51                }               
52                $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link("index.php?menuaction=mobile.".$link));
53        }
54?>
Note: See TracBrowser for help on using the repository browser.