Ignore:
Timestamp:
11/03/10 08:01:49 (13 years ago)
Author:
rodsouza
Message:

Ticket #990 - Utilizando 'Magic constants' para definir o path.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/login.php

    r3446 r3447  
    9999                $GLOBALS['phpgw']->session->phpgw_setcookie('serverID', $GLOBALS['phpgw_info']['server']['use_frontend_id']); 
    100100        } 
    101 if($GLOBALS['phpgw_info']['server']['captcha']==1) 
    102   { 
    103     $key_convert = md5_file( __DIR__ . '/header.inc.php'); 
    104     if(!$key_convert) 
    105         { 
    106             echo '<b>' . lang('Error in access. Please, alert the Administrator.') . '</b>'; 
    107             exit(); 
    108         } 
    109     session_name('ZABX'); 
    110     if($_COOKIE['ZABX'] && $key_convert) 
    111         { 
    112             $aux = session_convert(base64_decode($_COOKIE['ZABX']),$key_convert); 
    113             if(substr($aux,0,32) == $key_convert) 
    114                 { 
    115                     session_id(substr($aux,32)); 
    116                 } 
    117             else 
    118                 { 
    119                     $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/login.php','cd=5')); 
    120                 } 
    121         } 
    122      session_start(); 
    123   } 
     101 
     102if( $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'captcha' ] == 1 ) 
     103{ 
     104        $key_convert = md5_file( dirname( __FILE__ ) . '/header.inc.php' ); 
     105        if ( ! $key_convert ) 
     106        { 
     107                echo '<b>' . lang( 'Error in access. Please, alert the Administrator.' ) . '</b>'; 
     108                exit; 
     109        } 
     110        session_name('ZABX'); 
     111        if($_COOKIE['ZABX'] && $key_convert) 
     112        { 
     113                $aux = session_convert(base64_decode($_COOKIE['ZABX']),$key_convert); 
     114                if(substr($aux,0,32) == $key_convert) 
     115                { 
     116                        session_id(substr($aux,32)); 
     117                } 
     118                else 
     119                { 
     120                        $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/login.php','cd=5')); 
     121                } 
     122        } 
     123        session_start(); 
     124} 
     125 
    124126include(personalize_include_path('phpgwapi','login')); 
    125127?> 
Note: See TracChangeset for help on using the changeset viewer.