Changeset 623 for trunk/mobile/login.php


Ignore:
Timestamp:
01/26/09 14:47:04 (15 years ago)
Author:
niltonneto
Message:

Resolve #399.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mobile/login.php

    r588 r623  
    1111                'noheader'               => True 
    1212        ); 
    13  
    14         include('../header.inc.php'); 
     13         
     14        include('../header.inc.php');    
     15        include('./mobile_header.inc.php');      
    1516        $GLOBALS['sessionid'] = @$_GET['sessionid'] ? $_GET['sessionid'] : @$_COOKIE['sessionid']; 
     17         
    1618        if(isset($GLOBALS['sessionid']) && $_GET['cd'] != 10 && $_GET['cd'] != 1) 
    17                 //$GLOBALS['phpgw']->redirect_link($GLOBALS['phpgw_info']['flags']['currentdir'].'/calendar.php'); 
    18                 //session_start(); 
    19                 $GLOBALS['phpgw']->redirect_link($GLOBALS['phpgw_info']['flags']['currentdir'].'/home.php'); 
    20         if ($GLOBALS['phpgw_info']['server']['use_https'] > 0)  { 
     19                start_prefered_app();            
     20                if ($GLOBALS['phpgw_info']['server']['use_https'] > 0)  { 
    2121                if ($_SERVER['HTTPS'] != 'on') { 
    2222                        Header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 
     
    2424                } 
    2525        } 
    26  
    27         $GLOBALS['phpgw']->session = CreateObject('phpgwapi.sessions'); 
    28         //$GLOBALS['phpgw_info']['server']['template_dir'] = PHPGW_SERVER_ROOT.$GLOBALS['phpgw_info']['flags']['currentdir'].'/templates/'.$GLOBALS['phpgw_info']['login_template_set']; 
    29         $GLOBALS['phpgw_info']['server']['template_dir'] = PHPGW_SERVER_ROOT.$GLOBALS['phpgw_info']['flags']['currentdir'].'/templates/'; 
     26         
     27        $GLOBALS['phpgw']->session = CreateObject('phpgwapi.sessions');  
     28        $GLOBALS['phpgw_info']['server']['template_dir'] = PHPGW_SERVER_ROOT.$GLOBALS['phpgw_info']['flags']['currentdir'].'/templates/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'];        
    3029        $tmpl = CreateObject('phpgwapi.Template', $GLOBALS['phpgw_info']['server']['template_dir']); 
    3130        $GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'] = $GLOBALS['phpgw_info']['login_template_set']; 
    3231        $tmpl->set_file(array('login_form' => 'login.tpl')); 
    3332        $tmpl->set_var('cd',check_logoutcode($_GET['cd'])); 
    34  
     33         
    3534        function check_logoutcode($code) { 
    3635                switch($code) { 
     
    9695                        $GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'] .$GLOBALS['phpgw_info']['flags']['currentdir'].'/login.php?cd=' . $GLOBALS['phpgw']->session->cd_reason); 
    9796                } 
    98                 else{ 
    99                         //$GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'] .$GLOBALS['phpgw_info']['flags']['currentdir'].'/calendar.php'); 
    100                         $GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'] .$GLOBALS['phpgw_info']['flags']['currentdir'].'/home.php'); 
     97                else{            
     98                        start_prefered_app(); 
    10199                } 
    102100        } 
     
    117115        $tmpl->set_var('lang_username',"Usuário"); 
    118116        $tmpl->set_var('lang_password',"Senha"); 
    119         $tmpl->set_var('lang_login',"Login"); 
    120          
     117        $tmpl->set_var('lang_login',"Login");    
    121118        $tmpl->set_var('website_title', $GLOBALS['phpgw_info']['server']['site_title']); 
    122119        $tmpl->set_var('template_set',$GLOBALS['phpgw_info']['login_template_set']); 
     
    126123        $tmpl->pfp('loginout','login_form'); 
    127124 
    128         function logout(){ 
     125        function logout(){               
    129126                $verified = $GLOBALS['phpgw']->session->verify(); 
    130127                if ($verified) 
Note: See TracChangeset for help on using the changeset viewer.