Ticket #625: header.inc.php

File header.inc.php, 6.7 KB (added by wmerlotto, 11 years ago)

configurações no header

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/html/trunk');
22        define('PHPGW_INCLUDE_ROOT','/var/www/html/trunk');
23        $GLOBALS['phpgw_info']['server']['header_admin_user'] = 'expresso-admin';
24        $GLOBALS['phpgw_info']['server']['header_admin_password'] = 'bla';
25        $GLOBALS['phpgw_info']['server']['setup_acl'] = '';
26
27        // Opcoes exclusivas a partir da versão 2.0 :: Configurar via setup/header
28        $GLOBALS['phpgw_info']['server']['captcha'] = 1;
29        $GLOBALS['phpgw_info']['server']['num_badlogin'] = 2;
30    $GLOBALS['phpgw_info']['server']['atributoexpiracao'] = '';
31    $GLOBALS['phpgw_info']['server']['atributousuarios'] = '';
32        $GLOBALS['phpgw_info']['server']['certificado'] = 0;
33        $GLOBALS['phpgw_info']['server']['use_assinar_criptografar'] = 0;
34    $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] = 1;
35
36        // Opcoes exlusivas para o Expresso Livre
37        $GLOBALS['phpgw_info']['server']['use_https'] = 1;
38        $GLOBALS['phpgw_info']['server']['sugestoes_email_to'] = 'postmaster@prognus.com.br';
39        $GLOBALS['phpgw_info']['server']['domain_name'] = 'prognus.com.br';
40        $GLOBALS['phpgw_info']['server']['use_prefix_organization'] = False;   
41       
42        // If you want to identify your App Server (recommended for multiple servers):
43        //$GLOBALS['phpgw_info']['server']['use_frontend_id']   = 1024;
44        //$GLOBALS['phpgw_info']['server']['use_frontend_name'] = '01';
45                       
46        /* eGroupWare domain-specific db settings */
47        $GLOBALS['phpgw_domain']['default'] = array(
48                'db_host' => 'bd.expresso.prognus',
49                'db_port' => '5432',
50                'db_name' => 'bla',
51                'db_user' => 'ble',
52                'db_pass' => 'bli',
53                // Look at the README file
54                'db_type' => 'pgsql',
55                // This will limit who is allowed to make configuration modifications
56                'config_user'   => 'expresso-admin',
57                'config_passwd' => 'blo'
58        );
59
60        /*
61        ** If you want to have your domains in a select box, change to True
62        ** If not, users will have to login as user@domain
63        ** Note: This is only for virtual domain support, default domain users can login only using
64        ** there loginid.
65        */
66        $GLOBALS['phpgw_info']['server']['show_domain_selectbox'] = False;
67
68        $GLOBALS['phpgw_info']['server']['db_persistent'] = False;
69
70        /*
71        ** eGroupWare can handle session management using the database or
72        ** the session support built into PHP4 which usually gives better
73        ** performance.
74        ** Your choices are 'db' or 'php4'
75        */
76        $GLOBALS['phpgw_info']['server']['sessions_type'] = 'php4';
77
78        /* Select which login template set you want, most people will use default */
79        $GLOBALS['phpgw_info']['login_template_set'] = 'default';
80
81        /* This is used to control mcrypt's use */
82        $GLOBALS['phpgw_info']['server']['mcrypt_enabled'] = False;
83        /* Set this to 'old' for versions < 2.4, otherwise the exact mcrypt version you use. */
84        $GLOBALS['phpgw_info']['server']['versions']['mcrypt'] = '';
85
86        /*
87        ** This is a random string used as the initialization vector for mcrypt
88        ** feel free to change it when setting up eGrouWare on a clean database,
89        ** but you must not change it after that point!
90        ** It should be around 30 bytes in length.
91        */
92        $GLOBALS['phpgw_info']['server']['mcrypt_iv'] = 'Ngi4u5HOw64uCuhEdAOlZlmdiZasdCRNE12319287asda';
93
94        if(!isset($GLOBALS['phpgw_info']['flags']['nocachecontrol']) || !$GLOBALS['phpgw_info']['flags']['nocachecontrol'])
95        {
96                header('Cache-Control: no-cache, must-revalidate');  // HTTP/1.1
97                header('Pragma: no-cache');                          // HTTP/1.0
98        }
99        else
100        {
101                // allow caching by browser
102                session_cache_limiter(PHP_VERSION >= 4.2 ? 'private_no_expire' : 'private');
103        }
104
105        /* debugging settings */
106        define('DEBUG_APP',  False);
107        define('DEBUG_API',  False);
108        define('DEBUG_DATATYPES',  True);
109        define('DEBUG_LEVEL',  3);
110        define('DEBUG_OUTPUT', 2); /* 1 = screen,  2 = DB. For both use 3. */
111        define('DEBUG_TIMER', False);
112
113        function perfgetmicrotime()
114        {
115                list($usec, $sec) = explode(' ',microtime());
116                return ((float)$usec + (float)$sec);
117        }
118
119        if (DEBUG_TIMER)
120        {
121                $GLOBALS['debug_timer_start'] = perfgetmicrotime();
122        }
123
124        /**************************************************************************\
125        * Do not edit these lines                                                  *
126        \**************************************************************************/
127        define('PHPGW_API_INC',PHPGW_INCLUDE_ROOT.'/phpgwapi/inc');
128        include(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php');
129        $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version'];
130        $GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
131        unset($setup_info);
132        $GLOBALS['phpgw_info']['server']['versions']['header'] = '2.0';
133        /* This is a fix for NT */
134        if(!isset($GLOBALS['phpgw_info']['flags']['noapi']) || !$GLOBALS['phpgw_info']['flags']['noapi'] == True)
135        {
136                include(PHPGW_API_INC . '/functions.inc.php');
137                include(PHPGW_API_INC . '/xml_functions.inc.php');
138                include(PHPGW_API_INC . '/soap_functions.inc.php');
139        }
140        $connection_id = $GLOBALS['phpgw']->session->sessionid;
141        if (!strlen($connection_id) != 32){
142                if (!isset($_SESSION['connection_db_info']))
143                {
144                $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__);
145                $GLOBALS['phpgw']->db->next_record( );
146                $_SESSION['connection_db_info']['user_auth'] = $GLOBALS['phpgw']->db->row( );
147                }
148                include("header.session.inc.php");
149        }
150
151        /*
152          Leave off the final php closing tag, some editors will add
153          a \n or space after which will mess up cookies later on
154        */
155