00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00033
00034 $app_path = dirname(__FILE__)."/";
00035 define("APP_PATH", $app_path);
00036
00037 $script_name = $_SERVER["SCRIPT_NAME"];
00038 $app_url = dirname($script_name);
00039 if ($app_url!='/') $app_url.='/';
00040 define("APP_URL", $app_url);
00041
00042
00043 $up_path = ereg_replace('[^/]+/$', '', APP_PATH);
00044 define("UP_PATH", $up_path);
00045 $up_url = ereg_replace('[^/]+/$', '', APP_URL);
00046 define("UP_URL", $up_url);
00047
00048
00049 define("CONFIG_PATH", APP_PATH."config/");
00050
00051 include CONFIG_PATH."const.Paths.php";
00052
00053
00054 include CONFIG_PATH."const.Options.php";
00055 include CONFIG_PATH."const.Debug.php";
00056
00057
00058 include WEBAPP_PATH."WebApp.php";
00059
00060
00061 $path = APP_PATH.'l10n/';
00062 $domain = 'books';
00063 $l10n = new L10n($path, $domain);
00064
00065 if (WebApp::first_time())
00066 {
00067
00068 $request->targetPage = FIRSTPAGE;
00069 $event->targetPage = FIRSTPAGE;
00070 if (file_exists("init.php")) include_once "init.php";
00071 }
00072
00073 if (file_exists("global.php")) include_once "global.php";
00074
00075 if ($event->target=="none")
00076 {
00077
00078 WebApp::callFreeEvent($event);
00079 }
00080 ?>