This repository has been archived by the owner on Jun 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathincludes.inc.php
113 lines (89 loc) · 4.03 KB
/
includes.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
/*
+----------------------------------------------------------------------+
| DILPS - Distributed Image Library System |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2004 Juergen Enge |
| http://www.dilps.net |
+----------------------------------------------------------------------+
| This source file is subject to the GNU General Public License as |
| published by the Free Software Foundation; either version 2 of the |
| License, or (at your option) any later version. |
| |
| Distributed Playout Infrastructure is distributed in the hope that |
| it will be useful,but WITHOUT ANY WARRANTY; without even the implied |
| warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU General Public License for more details. |
| |
| You should have received a copy of the GNU General Public License |
| along with this program; if not, write to the Free Software |
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 02111-1307, USA |
+----------------------------------------------------------------------+
*/
/*
* dilps includes
* -------------------------------------------------------------
* File: includes.inc.php
* Purpose: central place to configure all
* standard includes and their order
* -------------------------------------------------------------
*/
//error_reporting(E_ALL);
/* configuration start */
// read db-config from file
$config = array();
include('config.inc.php');
// read config-variables from db and connect
include( $config['includepath'].'db.inc.php' );
// read the rest of the configuration
include( 'globals.inc.php' );
// session management
if (!defined('DILPS_SOAP_QUERY') && !defined('DILPS_INTER_DILPS_IMAGE_REQUEST')) {
include( $config['includepath'].'session.inc.php' );
// user management
/*
include( $config['includepath'].'userList.class.php' );
include( $config['includepath'].'authUser.class.php' );
include( $config['includepath'].'authStaticUser.class.php' );
*/
// authentication handling
include( $config['includepath'].'auth.inc.php' );
// smarty base include
include( $config['includepath'].'smarty/Smarty.class.php' );
// smarty customization
include( $config['includepath'].'smarty.inc.php' );
}
// add some libraries to include path
$lib_include_path = ini_get('include_path');
if(!defined('PATH_SEPARATOR')) {
define('PATH_SEPARATOR',(preg_match('/WIN/i',PHP_OS) ? ';' : ':'));
}
//bk: use the pear classes included with dilps code before any installed in system-default locations
$new_include_path = $config['includepath'].'pear'.PATH_SEPARATOR
.$lib_include_path.PATH_SEPARATOR
.$config['includepath'].'xml'.PATH_SEPARATOR
.$config['includepath'].'mime'.PATH_SEPARATOR
.$config['includepath'].'console'.PATH_SEPARATOR
.$config['includepath'].'system'.PATH_SEPARATOR
.$config['includepath'].PATH_SEPARATOR
.$config['dilpsdir'];
ini_set('include_path', $new_include_path);
// we use this nearly everywhere
global $db, $db_prefix, $user;
/* configuration end */
// this may be useful for debugging purposes
function print_html($value, $key)
{
if (is_array($value))
{
array_walk($value,"print_html");
}
else
{
echo ($key." => ".$value."\n<br>\n");
}
return;
}
?>