source: trunk/header.inc.php.template @ 2855

Revision 2855, 6.5 KB checked in by niltonneto, 12 years ago (diff)

Ticket #1041 - Corrigido problema na validação da sessão por IP.

Line 
1<?php
2        /**************************************************************************\
3        * eGroupWare                                                               *
4        * http://www.egroupware.org                                                *
5        * This file was originaly written by Dan Kuykendall                        *
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        /* $Id: header.inc.php.template,v 1.55.2.1 2004/08/03 14:05:35 reinerj Exp $ */
13
14        /**************************************************************************\
15        * !!!!!!! EDIT THESE LINES !!!!!!!!                                        *
16        * This setting allows you to easily move the include directory and the     *
17        * base of the eGroupWare install. Simple edit the following 2 lines with   *
18        * the absolute path to fit your site, and you should be up and running.    *
19        \**************************************************************************/
20        ob_start();
21
22        define('PHPGW_SERVER_ROOT','{SERVER_ROOT}');
23        define('PHPGW_INCLUDE_ROOT','{INCLUDE_ROOT}');
24        $GLOBALS['phpgw_info']['server']['header_admin_user'] = '{HEADER_ADMIN_USER}';
25        $GLOBALS['phpgw_info']['server']['header_admin_password'] = '{HEADER_ADMIN_PASSWORD}';
26        $GLOBALS['phpgw_info']['server']['setup_acl'] = '{SETUP_ACL}';
27
28        // Opcoes exclusivas a partir da versão 2.0 :: Configurar via setup/header
29        $GLOBALS['phpgw_info']['server']['captcha'] = {CAPTCHA};
30        $GLOBALS['phpgw_info']['server']['num_badlogin'] = {NUM_BADLOGIN};
31    $GLOBALS['phpgw_info']['server']['atributoexpiracao'] = '{ATRIBUTOEXPIRACAO}';
32    $GLOBALS['phpgw_info']['server']['atributousuarios'] = '{ATRIBUTOUSUARIOS}';
33        $GLOBALS['phpgw_info']['server']['certificado'] = {CERTIFICADO};
34        $GLOBALS['phpgw_info']['server']['use_assinar_criptografar'] = {USE_ASSINAR_CRIPTOGRAFAR};
35    $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] = {NUM_MAX_CERTS_TO_CIPHER};
36
37        // Opcoes exlusivas para o Expresso Livre
38        $GLOBALS['phpgw_info']['server']['use_https'] = {USE_HTTPS};
39        $GLOBALS['phpgw_info']['server']['sugestoes_email_to'] = '{SUGESTOES_EMAIL_TO}';
40        $GLOBALS['phpgw_info']['server']['domain_name'] = '{DOMAIN_NAME}';
41        $GLOBALS['phpgw_info']['server']['use_prefix_organization'] = {USE_PREFIX_ORGANIZATION};   
42       
43        // If you want to identify your App Server (recommended for multiple servers):
44        //$GLOBALS['phpgw_info']['server']['use_frontend_id']   = 1024;
45        //$GLOBALS['phpgw_info']['server']['use_frontend_name'] = '01';
46                       
47        /* eGroupWare domain-specific db settings */{domains}
48        /*
49        ** If you want to have your domains in a select box, change to True
50        ** If not, users will have to login as user@domain
51        ** Note: This is only for virtual domain support, default domain users can login only using
52        ** there loginid.
53        */
54        $GLOBALS['phpgw_info']['server']['show_domain_selectbox'] = {DOMAIN_SELECTBOX};
55
56        $GLOBALS['phpgw_info']['server']['db_persistent'] = {DB_PERSISTENT};
57
58        /*
59        ** eGroupWare can handle session management using the database or
60        ** the session support built into PHP4 which usually gives better
61        ** performance.
62        ** Your choices are 'db' or 'php4'
63        */
64        $GLOBALS['phpgw_info']['server']['sessions_type'] = '{SESSIONS_TYPE}';
65
66        /* Select which login template set you want, most people will use default */
67        $GLOBALS['phpgw_info']['login_template_set'] = 'default';
68
69        /* This is used to control mcrypt's use */
70        $GLOBALS['phpgw_info']['server']['mcrypt_enabled'] = {ENABLE_MCRYPT};
71        /* Set this to 'old' for versions < 2.4, otherwise the exact mcrypt version you use. */
72        $GLOBALS['phpgw_info']['server']['versions']['mcrypt'] = '{MCRYPT_VERSION}';
73
74        /*
75        ** This is a random string used as the initialization vector for mcrypt
76        ** feel free to change it when setting up eGrouWare on a clean database,
77        ** but you must not change it after that point!
78        ** It should be around 30 bytes in length.
79        */
80        $GLOBALS['phpgw_info']['server']['mcrypt_iv'] = '{MCRYPT_IV}';
81
82        if(!isset($GLOBALS['phpgw_info']['flags']['nocachecontrol']) || !$GLOBALS['phpgw_info']['flags']['nocachecontrol'])
83        {
84                header('Cache-Control: no-cache, must-revalidate');  // HTTP/1.1
85                header('Pragma: no-cache');                          // HTTP/1.0
86        }
87        else
88        {
89                // allow caching by browser
90                session_cache_limiter(PHP_VERSION >= 4.2 ? 'private_no_expire' : 'private');
91        }
92
93        /* debugging settings */
94        define('DEBUG_APP',  False);
95        define('DEBUG_API',  False);
96        define('DEBUG_DATATYPES',  True);
97        define('DEBUG_LEVEL',  3);
98        define('DEBUG_OUTPUT', 2); /* 1 = screen,  2 = DB. For both use 3. */
99        define('DEBUG_TIMER', False);
100
101        function perfgetmicrotime()
102        {
103                list($usec, $sec) = explode(' ',microtime());
104                return ((float)$usec + (float)$sec);
105        }
106
107        if (DEBUG_TIMER)
108        {
109                $GLOBALS['debug_timer_start'] = perfgetmicrotime();
110        }
111
112        /**************************************************************************\
113        * Do not edit these lines                                                  *
114        \**************************************************************************/
115        define('PHPGW_API_INC',PHPGW_INCLUDE_ROOT.'/phpgwapi/inc');
116        include(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php');
117        $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version'];
118        $GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
119        unset($setup_info);
120        $GLOBALS['phpgw_info']['server']['versions']['header'] = '2.2';
121        /* This is a fix for NT */
122        if(!isset($GLOBALS['phpgw_info']['flags']['noapi']) || !$GLOBALS['phpgw_info']['flags']['noapi'] == True)
123        {
124                include(PHPGW_API_INC . '/functions.inc.php');
125        }
126        $connection_id = $GLOBALS['phpgw']->session->sessionid;
127        if (!strlen($connection_id) != 32){
128                include("header.session.inc.php");
129        }
130
131        /*
132          Leave off the final php closing tag, some editors will add
133          a \n or space after which will mess up cookies later on
134        */
135        <!-- BEGIN domain -->
136        $GLOBALS['phpgw_domain']['{DB_DOMAIN}'] = array(
137                'db_host' => '{DB_HOST}',
138                'db_port' => '{DB_PORT}',
139                'db_name' => '{DB_NAME}',
140                'db_user' => '{DB_USER}',
141                'db_pass' => '{DB_PASS}',
142                // Look at the README file
143                'db_type' => '{DB_TYPE}',
144                // This will limit who is allowed to make configuration modifications
145                'config_user'   => '{CONFIG_USER}',
146                'config_passwd' => '{CONFIG_PASS}'
147        );
148
149<!-- END domain -->
Note: See TracBrowser for help on using the repository browser.