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

Revision 1314, 6.4 KB checked in by niltonneto, 15 years ago (diff)

Ticket #596 - Correção para gerar senha correta no arquivo header.inc.php

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