source: trunk/doc-expressolivre/debian/arqs-conf/header.inc.php @ 1254

Revision 1254, 7.7 KB checked in by niltonneto, 15 years ago (diff)

Ticket #596 - Atualização de segurança e correção do template_set.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
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
21        define('PHPGW_SERVER_ROOT','/var/www/expresso');
22        define('PHPGW_INCLUDE_ROOT','/var/www/expresso');
23        $GLOBALS['phpgw_info']['server']['header_admin_user'] = 'expresso-admin';
24        $GLOBALS['phpgw_info']['server']['header_admin_password'] = 'e8d95a51f3af4a3b134bf6bb680a213a';
25        $GLOBALS['phpgw_info']['server']['setup_acl'] = '';
26
27        // Opcoes exlusivas para o Carteiro Expresso
28        $GLOBALS['phpgw_info']['server']['captcha'] = 1;       /* troque para 1 para usar o captcha     */
29        $GLOBALS['phpgw_info']['server']['num_badlogin'] = 2;       /*Numero de falhas no login antes de pedir o captcha */
30        $GLOBALS['phpgw_info']['server']['atributoexpiracao'] = 'phpgwLastPasswdChange';
31        $GLOBALS['phpgw_info']['server']['atributousuarios'] = 'person';
32        $GLOBALS['phpgw_info']['server']['politicasenhas'] = 'expresso';  /* expresso ou diretorio */
33        $GLOBALS['phpgw_info']['server']['diretorioescravo'] = 'nao'; /* 1 ou 0  */
34        $GLOBALS['phpgw_info']['server']['certificado'] = 1;    /* troque para 1 para usar o Certificado */
35        $GLOBALS['phpgw_info']['server']['use_assinar_criptografar'] = 1;       
36        $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] = 10;
37        #$GLOBALS['phpgw_info']['server']['corporative_certificate'] = '{CORPORATIVE_CERTIFICATE}';     
38        $GLOBALS['phpgw_info']['server']['versao-Serpro'] = '1.0';           /* soh para o SERPRO */
39       
40        // Opcoes exlusivas para o Expresso Livre
41        $GLOBALS['phpgw_info']['server']['use_https'] = 2;
42        $GLOBALS['phpgw_info']['server']['sugestoes_email_to'] = '';      /* email para receber sugestoes  */
43        $GLOBALS['phpgw_info']['server']['domain_name'] = '';
44        $GLOBALS['phpgw_info']['server']['use_prefix_organization'] = False;
45        $GLOBALS['phpgw_info']['server']['use_mailman'] = 0;
46        $GLOBALS['phpgw_info']['server']['contexto_geral'] = '{CONTEXTO_GERAL}';
47
48
49        /********** INICIO BLOCO MAILMAN ************/
50
51        // Opcoes usadas com servidor de listas Mailman
52        $GLOBALS['phpgw_info']['server']['use_mailman'] = '0';
53        $GLOBALS['phpgw_info']['server']['dn_listas'] = '';
54        $GLOBALS['phpgw_info']['server']['dn_listadmin'] = '';
55        $GLOBALS['phpgw_info']['server']['dominio_listas'] = '';
56        $GLOBALS['phpgw_info']['server']['porta_mailman'] = '';
57        $GLOBALS['phpgw_info']['server']['host_mailman'] = '';
58        $GLOBALS['phpgw_info']['server']['url_mailman'] = '';
59
60        /********** FIM BLOCO MAILMAN ***************/
61
62
63        /* eGroupWare domain-specific db settings */
64        $GLOBALS['phpgw_domain']['default'] = array(
65                'db_host' => 'localhost',
66                'db_port' => '5432',
67                'db_name' => 'expresso',
68                'db_user' => 'postgres',
69                'db_pass' => '',
70                // Look at the README file
71                'db_type' => 'pgsql',
72                // This will limit who is allowed to make configuration modifications
73                'config_user'   => 'expresso-admin',
74                'config_passwd' => 'e8d95a51f3af4a3b134bf6bb680a213a'
75        );
76
77        /*
78        ** If you want to have your domains in a select box, change to True
79        ** If not, users will have to login as user@domain
80        ** Note: This is only for virtual domain support, default domain users can login only using
81        ** there loginid.
82        */
83        $GLOBALS['phpgw_info']['server']['show_domain_selectbox'] = False;
84
85        $GLOBALS['phpgw_info']['server']['db_persistent'] = False;
86
87        /*
88        ** eGroupWare can handle session management using the database or
89        ** the session support built into PHP4 which usually gives better
90        ** performance.
91        ** Your choices are 'db' or 'php4'
92        */
93        $GLOBALS['phpgw_info']['server']['sessions_type'] = 'php4';
94
95        /* Select which login template set you want, most people will use default */
96        $GLOBALS['phpgw_info']['login_template_set'] = 'default';
97
98        /* This is used to control mcrypt's use */
99        $GLOBALS['phpgw_info']['server']['mcrypt_enabled'] = False;
100        /* Set this to 'old' for versions < 2.4, otherwise the exact mcrypt version you use. */
101        $GLOBALS['phpgw_info']['server']['versions']['mcrypt'] = '';
102
103        /*
104        ** This is a random string used as the initialization vector for mcrypt
105        ** feel free to change it when setting up eGrouWare on a clean database,
106        ** but you must not change it after that point!
107        ** It should be around 30 bytes in length.
108        */
109        $GLOBALS['phpgw_info']['server']['mcrypt_iv'] = 'Ngi4u5HOw64uCuhEdAOlZlmdiZCRNE';
110
111        if(!isset($GLOBALS['phpgw_info']['flags']['nocachecontrol']) || !$GLOBALS['phpgw_info']['flags']['nocachecontrol'])
112        {
113                header('Cache-Control: no-cache, must-revalidate');  // HTTP/1.1
114                header('Pragma: no-cache');                          // HTTP/1.0
115        }
116        else
117        {
118                // allow caching by browser
119                session_cache_limiter(PHP_VERSION >= 4.2 ? 'private_no_expire' : 'private');
120        }
121
122        /* debugging settings */
123        define('DEBUG_APP',  False);
124        define('DEBUG_API',  False);
125        define('DEBUG_DATATYPES',  True);
126        define('DEBUG_LEVEL',  3);
127        define('DEBUG_OUTPUT', 2); /* 1 = screen,  2 = DB. For both use 3. */
128        define('DEBUG_TIMER', False);
129
130        function perfgetmicrotime()
131        {
132                list($usec, $sec) = explode(' ',microtime());
133                return ((float)$usec + (float)$sec);
134        }
135
136        if (DEBUG_TIMER)
137        {
138                $GLOBALS['debug_timer_start'] = perfgetmicrotime();
139        }
140
141        /**************************************************************************\
142        * Do not edit these lines                                                  *
143        \**************************************************************************/
144        define('PHPGW_API_INC',PHPGW_INCLUDE_ROOT.'/phpgwapi/inc');
145        include(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php');
146        $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version'];
147        $GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
148        unset($setup_info);
149        $GLOBALS['phpgw_info']['server']['versions']['header'] = '1.27';
150        /* This is a fix for NT */
151        if(!isset($GLOBALS['phpgw_info']['flags']['noapi']) || !$GLOBALS['phpgw_info']['flags']['noapi'] == True)
152        {
153                include(PHPGW_API_INC . '/functions.inc.php');
154                include(PHPGW_API_INC . '/xml_functions.inc.php');
155                include(PHPGW_API_INC . '/soap_functions.inc.php');
156        }
157        $connection_id = $GLOBALS['phpgw']->session->sessionid;
158        if (!strlen($connection_id) != 32){
159                if (!isset($_SESSION['connection_db_info']))
160                {
161                $GLOBALS['phpgw']->db->query("select sessionid, ip, browser from phpgw_access_log where account_id <> 0 and lo = 0 and sessionid='{$GLOBALS['phpgw']->session->sessionid}' limit 1",__LINE__,__FILE__);
162                $GLOBALS['phpgw']->db->next_record( );
163                $_SESSION['connection_db_info']['user_auth'] = $GLOBALS['phpgw']->db->row( );
164                }
165                include("header.session.inc.php");
166        }
167
168        /*
169          Leave off the final php closing tag, some editors will add
170          a \n or space after which will mess up cookies later on
171        */
Note: See TracBrowser for help on using the repository browser.