* @author Joseph Engo * @author Dave Hall skwash at phpgroupware.org * @copyright Copyright (C) 2000-2006 Free Software Foundation, Inc. http://www.fsf.org/ * @license http://www.gnu.org/licenses/gpl.html GNU General Public License * @package phpgroupware * @version $Id: header.inc.php.template,v 1.53 2007/04/13 07:49:12 sigurdne Exp $ */ // ************************************************************************** // !!!!!!! EDIT THESE LINES !!!!!!!! // This setting allows you to easily move the include directory and the // base of the phpGroupWare install. Simple edit the following 2 lines with // the absolute path to fit your site, and you should be up and running. // ************************************************************************** /** * Server root directory */ define('PHPGW_SERVER_ROOT', dirname(__FILE__) ); /** * Include root directory - legacy support */ define('PHPGW_INCLUDE_ROOT', PHPGW_SERVER_ROOT); //We only let preset flags remain everything else is killed $flags = array(); if ( isset($GLOBALS['phpgw_info']['flags']) ) { $flags = $GLOBALS['phpgw_info']['flags']; } unset($GLOBALS['phpgw_info']); /** * @global array $phpgw_info the phpgroupware information array */ $GLOBALS['phpgw_info'] = array('flags' => $flags); unset($flags); /** * @global string $GLOBALS['phpgw_info']['server']['header_admin_password'] Setup administrator password */ $GLOBALS['phpgw_info']['server']['header_admin_password'] = '{HEADER_ADMIN_PASSWORD}'; // phpGroupWare domain-specific db settings {domains} /** * @global boolean $GLOBALS['phpgw_info']['server']['show_domain_selectbox'] * If you want to have your domains in a select box, change to True * If not, users will have to login as user@domain * Note: This is only for virtual domain support, default domain users can login only using * there login id. */ $GLOBALS['phpgw_info']['server']['show_domain_selectbox'] = {DOMAIN_SELECTBOX}; /** * @global $GLOBALS['phpgw_info']['server']['domain_from_host'] * As an alternative to the domain select box, set this option to True * to use the domain name from the browser provided hostname ($_SERVER['HTTP_HOST']) */ $GLOBALS['phpgw_info']['server']['domain_from_host'] = {DOMAIN_FROM_HOST}; /** * @global boolean $GLOBALS['phpgw_info']['server']['db_persistent'] * Use persistent database connection */ $GLOBALS['phpgw_info']['server']['db_persistent'] = {DB_PERSISTENT}; /** * @global string $GLOBALS['phpgw_info']['server']['sessions_type'] * phpGroupWare can handle session management using the database, but if * you are using PHP4+ you can usually get better performance by having phpGroupWare * use the session support built into PHP4. PHP3 users will have to use the database. * Your choices are 'db' or 'php' */ $GLOBALS['phpgw_info']['server']['sessions_type'] = '{SESSIONS_TYPE}'; /** * @global string $GLOBALS['phpgw_info']['login_template_set'] * Select which login template set you want, most people will use 'simple' */ $GLOBALS['phpgw_info']['login_template_set'] = 'simple'; /** * @global boolean $GLOBALS['phpgw_info']['server']['mcrypt_enabled'] * This is used to control mcrypt's use */ $GLOBALS['phpgw_info']['server']['mcrypt_enabled'] = {ENABLE_MCRYPT}; /** * @global string $GLOBALS['phpgw_info']['server']['versions']['mcrypt'] * Set this to 'old' for versions < 2.4, otherwise the exact mcrypt version you use. */ $GLOBALS['phpgw_info']['server']['versions']['mcrypt'] = '{MCRYPT_VERSION}'; /** * @global string $GLOBALS['phpgw_info']['server']['mcrypt_iv'] * This is a random string used as the initialization vector for mcrypt * feel free to change it when setting up phpgroupware on a clean database, * but you must not change it after that point! * It should be around 30 bytes in length. */ $GLOBALS['phpgw_info']['server']['mcrypt_iv'] = '{MCRYPT_IV}'; // This one should fix the IE-problem recognizing charset. header("Content-Type: text/html;charset=utf-8"); // If you want phpGroupWare to be cached by proxy servers, uncomment the following // This is NOT recommended, but phpGroupWare should still work fine. if(!isset($GLOBALS['phpgw_info']['flags']['nocachecontrol']) || !$GLOBALS['phpgw_info']['flags']['nocachecontrol'] == True) { header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 header('Pragma: no-cache'); // HTTP/1.0 } // debugging settings define('DEBUG_APP', False); define('DEBUG_API', False); define('DEBUG_DATATYPES', True); define('DEBUG_LEVEL', 3); define('DEBUG_OUTPUT', 2); // 1 = screen, 2 = DB (not supported with PHP3). For both use 3. define('DEBUG_TIMER', False); /** * Perf get microtime * * @return float Microseconds */ function perfgetmicrotime() { list($usec, $sec) = explode(' ',microtime()); return ((float)$usec + (float)$sec); } if (DEBUG_TIMER) { $GLOBALS['debug_timer_start'] = perfgetmicrotime(); } // ************************************************************************** // Do not edit these lines // ************************************************************************** /** * phpgroupware API include root */ define('PHPGW_API_INC',PHPGW_INCLUDE_ROOT.'/phpgwapi/inc'); /** * Include API setup */ include(PHPGW_SERVER_ROOT . '/phpgwapi/setup/setup.inc.php'); /** * @global string $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] * Installed API version */ $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version']; /** * @global string $GLOBALS['phpgw_info']['server']['versions']['current_header'] * Installed header version */ $GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header']; unset($setup_info); /** * @global string $GLOBALS['phpgw_info']['server']['versions']['header'] * Version of this header file */ $GLOBALS['phpgw_info']['server']['versions']['header'] = '1.27'; // This is a fix for NT if(!isset($GLOBALS['phpgw_info']['flags']['noapi']) || $GLOBALS['phpgw_info']['flags']['noapi'] != True) { /** * Include global general functions */ include(PHPGW_API_INC . '/functions.inc.php'); } // Leave off the final php closing tag, some editors will add // a \n or space after which will mess up cookies later on $GLOBALS['phpgw_domain']['{DB_DOMAIN}'] = array ( 'db_host' => '{DB_HOST}', 'db_name' => '{DB_NAME}', 'db_user' => '{DB_USER}', 'db_pass' => '{DB_PASS}', // Look at the README file 'db_type' => '{DB_TYPE}', // This will limit who is allowed to make configuration modifications 'config_passwd' => '{CONFIG_PASS}' );