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