0
|
1 |
<?php
|
|
2 |
|
|
3 |
// fix up REMOTE_USER for PHP FPM (FCGI) environment
|
|
4 |
if ( isset($_SERVER['REDIRECT_REMOTE_USER']) && !isset($_SERVER['REMOTE_USER']) )
|
|
5 |
$_SERVER['REMOTE_USER'] =& $_SERVER['REDIRECT_REMOTE_USER'];
|
|
6 |
|
|
7 |
// define root directory
|
|
8 |
define('ACCOUNTS', dirname(dirname(__FILE__)) . '/');
|
|
9 |
|
|
10 |
// include required files
|
|
11 |
require_once(ACCOUNTS . 'includes/functions.php');
|
|
12 |
load_credentials();
|
|
13 |
require_once(ACCOUNTS . 'includes/smarty/Smarty.class.php');
|
|
14 |
require_once(ACCOUNTS . 'includes/template-wrapper.php');
|
|
15 |
require_once(ACCOUNTS . 'includes/ldap.php');
|
|
16 |
require_once(ACCOUNTS . 'includes/kadm5.php');
|
|
17 |
require_once(ACCOUNTS . 'includes/users.php');
|
3
|
18 |
require_once(ACCOUNTS . 'includes/smtp.php');
|
0
|
19 |
|
|
20 |
session_start();
|
|
21 |
|
3
|
22 |
$adm = !empty($_SERVER['REMOTE_USER']) && ldap_test_group_membership($_SERVER['REMOTE_USER'], 'rtp');
|
|
23 |
define('IS_ADMIN', $adm);
|
|
24 |
|
0
|
25 |
if ( !isset($_SESSION['messages']) )
|
|
26 |
$_SESSION['messages'] = array();
|