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

Revision 8142, 6.7 KB checked in by acoutinho, 8 years ago (diff)

Ticket #3443 - Atualizacao de todos os modulos para versao 2.5.1

  • Property svn:executable set to *
  • Property svn:mime-type set to txt/php
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        define('PHPGW_SERVER_ROOT','{SERVER_ROOT}');
22        define('PHPGW_INCLUDE_ROOT','{INCLUDE_ROOT}');
23        $GLOBALS['phpgw_info']['server']['header_admin_user'] = '{HEADER_ADMIN_USER}';
24        $GLOBALS['phpgw_info']['server']['header_admin_password'] = '{HEADER_ADMIN_PASSWORD}';
25        $GLOBALS['phpgw_info']['server']['setup_acl'] = '{SETUP_ACL}';
26
27        // Opcoes exclusivas a partir da versão 2.0 :: Configurar via setup/header
28        $GLOBALS['phpgw_info']['server']['captcha'] = {CAPTCHA};
29        $GLOBALS['phpgw_info']['server']['num_badlogin'] = {NUM_BADLOGIN};
30        $GLOBALS['phpgw_info']['server']['atributoexpiracao'] = '{ATRIBUTOEXPIRACAO}';
31        $GLOBALS['phpgw_info']['server']['atributousuarios'] = '{ATRIBUTOUSUARIOS}';
32        $GLOBALS['phpgw_info']['server']['certificado'] = {CERTIFICADO};
33        $GLOBALS['phpgw_info']['server']['certificado_atributo_cpf'] = '{CERTIFICADO_ATRIBUTO_CPF}';
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        if(!function_exists('perfgetmicrotime'))
82        {
83        if(!isset($GLOBALS['phpgw_info']['flags']['nocachecontrol']) || !$GLOBALS['phpgw_info']['flags']['nocachecontrol'])
84        {
85                header('Cache-Control: no-cache, must-revalidate');  // HTTP/1.1
86                header('Pragma: no-cache');                          // HTTP/1.0
87        }
88        else
89        {
90                // allow caching by browser
91                session_cache_limiter(PHP_VERSION >= 4.2 ? 'private_no_expire' : 'private');
92        }
93        }
94        /* debugging settings */
95        define('DEBUG_APP',  False);
96        define('DEBUG_API',  False);
97        define('DEBUG_DATATYPES',  False);
98        define('DEBUG_LEVEL',  3);
99        define('DEBUG_OUTPUT', 2); /* 1 = screen,  2 = DB. For both use 3. */
100        define('DEBUG_TIMER', False);
101
102        function perfgetmicrotime()
103        {
104                list($usec, $sec) = explode(' ',microtime());
105                return ((float)$usec + (float)$sec);
106        }
107
108        if (DEBUG_TIMER)
109        {
110                $GLOBALS['debug_timer_start'] = perfgetmicrotime();
111        }
112
113        /**************************************************************************\
114        * Do not edit these lines                                                  *
115        \**************************************************************************/
116        define('PHPGW_API_INC',PHPGW_INCLUDE_ROOT.'/phpgwapi/inc');
117        include(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php');
118        $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version'];
119        $GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
120        unset($setup_info);
121        $GLOBALS['phpgw_info']['server']['versions']['header'] = '2.5.1';
122        /* This is a fix for NT */
123        if(!isset($GLOBALS['phpgw_info']['flags']['noapi']) || !$GLOBALS['phpgw_info']['flags']['noapi'] == True)
124        {
125                include(PHPGW_API_INC . '/functions.inc.php');
126        }
127        $connection_id = $GLOBALS['phpgw']->session->sessionid;
128        if (!strlen($connection_id) != 32){
129                include("header.session.inc.php");
130        }
131
132        /*
133          Leave off the final php closing tag, some editors will add
134          a \n or space after which will mess up cookies later on
135        */
136        <!-- BEGIN domain -->
137        $GLOBALS['phpgw_domain']['{DB_DOMAIN}'] = array(
138                'db_host' => '{DB_HOST}',
139                'db_port' => '{DB_PORT}',
140                'db_name' => '{DB_NAME}',
141                'db_user' => '{DB_USER}',
142                'db_pass' => '{DB_PASS}',
143                // Look at the README file
144                'db_type' => '{DB_TYPE}',
145                // This will limit who is allowed to make configuration modifications
146                'config_user'   => '{CONFIG_USER}',
147                'config_passwd' => '{CONFIG_PASS}'
148        );
149
150<!-- END domain -->
Note: See TracBrowser for help on using the repository browser.