1 |
joko |
1.1 |
<? |
2 |
|
|
// --------------------------------------------------------------------------- |
3 |
joko |
1.4 |
// $Id: includes.php,v 1.3 2003/02/04 08:26:18 joko Exp $ |
4 |
joko |
1.1 |
// --------------------------------------------------------------------------- |
5 |
joko |
1.2 |
// $Log: includes.php,v $ |
6 |
joko |
1.4 |
// Revision 1.3 2003/02/04 08:26:18 joko |
7 |
|
|
// + fixed comment |
8 |
|
|
// |
9 |
joko |
1.3 |
// Revision 1.2 2003/02/04 08:25:43 joko |
10 |
|
|
// + minor modification regarding configuration/resource variable hierarchy |
11 |
|
|
// |
12 |
joko |
1.2 |
// Revision 1.1 2003/02/03 14:39:58 joko |
13 |
|
|
// + initial commit |
14 |
|
|
// |
15 |
joko |
1.1 |
// --------------------------------------------------------------------------- |
16 |
|
|
|
17 |
|
|
|
18 |
joko |
1.2 |
$smarty = $config['_startup'][path][lib][smarty]; |
19 |
|
|
$pear = $config['_startup'][path][lib][pear]; |
20 |
|
|
$flib = $config['_startup'][path][lib][flib]; |
21 |
|
|
$glib = $config['_startup'][path][lib][glib]; |
22 |
joko |
1.1 |
|
23 |
|
|
|
24 |
joko |
1.4 |
// ------ override/expand php's 'include_path' setting ------ |
25 |
joko |
1.1 |
// determine OS |
26 |
|
|
$os = 'linux'; |
27 |
|
|
if (stristr($_SERVER["SERVER_SOFTWARE"], 'win32')) { |
28 |
|
|
$os = 'windows'; |
29 |
|
|
} |
30 |
|
|
|
31 |
|
|
$path_delimiter = ':'; |
32 |
|
|
// change path-delimiter for win32 |
33 |
|
|
if ($os == 'windows') { $path_delimiter = ';'; } |
34 |
|
|
// build new 'include_path'-string |
35 |
|
|
$path_new = join($path_delimiter, array($pear, $flib, $glib, ini_get("include_path"))); |
36 |
|
|
ini_set("include_path", $path_new); |
37 |
|
|
|
38 |
|
|
|
39 |
joko |
1.4 |
// ======================================= |
40 |
joko |
1.1 |
// ------ pear libs ------ |
41 |
|
|
// benchmarking |
42 |
|
|
require_once("Benchmark/Timer.php"); |
43 |
|
|
$timer = new Benchmark_Timer; |
44 |
|
|
$timer->start(); |
45 |
|
|
$timer->setMarker("pear libraries: including"); |
46 |
|
|
|
47 |
|
|
// logging |
48 |
|
|
require_once 'Log.php'; |
49 |
|
|
require_once 'Log/file.php'; |
50 |
|
|
// date-handling and -manipulation ... 0.02 execution time for inclusion |
51 |
|
|
require_once 'Date.php'; |
52 |
|
|
// database... 0.03 execution time for inclusion |
53 |
|
|
require_once 'DB.php'; |
54 |
|
|
// rpc - standard |
55 |
|
|
require_once 'XML/RPC/RPC.php'; |
56 |
|
|
|
57 |
|
|
$timer->setMarker("pear libraries: ready"); |
58 |
|
|
|
59 |
|
|
|
60 |
joko |
1.4 |
|
61 |
|
|
// ======================================= |
62 |
|
|
// ------ glib libraries/classes/components ------ |
63 |
joko |
1.1 |
|
64 |
joko |
1.2 |
// abstract base classes - lowlevel |
65 |
joko |
1.4 |
require_once("DesignPattern/Object.php"); |
66 |
|
|
loadModule('DesignPattern::Logger'); |
67 |
|
|
loadModule('DesignPattern::Bridge'); |
68 |
|
|
loadModule('DesignPattern::Loader'); |
69 |
joko |
1.2 |
|
70 |
|
|
// abstract base classes - application level |
71 |
joko |
1.4 |
loadModule('Application::AbstractBase'); |
72 |
|
|
loadModule('Application::AbstractRequest'); |
73 |
|
|
loadModule('Application::AbstractHandler'); |
74 |
joko |
1.2 |
|
75 |
joko |
1.4 |
// concrete classes |
76 |
|
|
|
77 |
|
|
// helper: data-manipulation and -encoding |
78 |
|
|
loadModule('Data::Encode'); |
79 |
|
|
loadModule('Data::Deep'); |
80 |
|
|
|
81 |
|
|
// helper: CreditCard Validator |
82 |
|
|
loadModule('Data::Validator::CreditCard'); |
83 |
|
|
|
84 |
|
|
// core/transport: rpc-xml communication |
85 |
|
|
loadModule('Data::Driver::Proxy'); |
86 |
|
|
loadModule('Data::Driver::RPC::Remote'); |
87 |
joko |
1.2 |
|
88 |
joko |
1.1 |
|
89 |
|
|
|
90 |
joko |
1.4 |
// ======================================= |
91 |
joko |
1.1 |
// ------ flib libraries/classes ------ |
92 |
|
|
// error handling |
93 |
|
|
require_once("Application/ErrorHandler.php"); |
94 |
|
|
// misc |
95 |
|
|
require_once("utils/helper.php"); |
96 |
|
|
require_once("utils/shortcuts.php"); |
97 |
|
|
// array manipulation |
98 |
|
|
require_once("utils/Array_Manip.php"); |
99 |
|
|
|
100 |
|
|
// utf8-encodings (Internationalization) |
101 |
|
|
// iso <-> utf8 |
102 |
|
|
//require_once("Application/i18n/TextEncode.php"); |
103 |
|
|
// language (Localization) |
104 |
|
|
require_once("Application/l10n/LocaleText.php"); |
105 |
|
|
// site |
106 |
|
|
require_once("Site.php"); |
107 |
|
|
// user |
108 |
|
|
require_once("Tracker/Session.php"); |
109 |
|
|
require_once("Tracker/User.php"); |
110 |
|
|
// tablebrowser |
111 |
|
|
require_once("$flib/Site/Widget/TableBrowser.php"); |
112 |
|
|
|
113 |
|
|
// ------ local libs - abstract ------ |
114 |
|
|
// site |
115 |
|
|
//require_once ("$lib"."content/Site.class.php"); |
116 |
|
|
// page |
117 |
|
|
// smarty |
118 |
|
|
//define(SMARTY_DIR, $lib . 'external/smarty/'); |
119 |
|
|
define(SMARTY_DIR, $smarty); |
120 |
|
|
require_once(SMARTY_DIR . 'Smarty.class.php'); |
121 |
joko |
1.4 |
|
122 |
|
|
|
123 |
joko |
1.1 |
?> |