1 | <?php |
---|
2 | /* module_maker/_config.inc.php |
---|
3 | * code by strangecode :: www.strangecode.com :: this document contains copyrighted information. */ |
---|
4 | |
---|
5 | // Determine common site directory. |
---|
6 | $common_base = realpath($_SERVER['argv'][1]); |
---|
7 | |
---|
8 | if ('' != $common_base && is_dir($common_base)) { |
---|
9 | // First arg is path to current site. Realpath removes trailing /s |
---|
10 | define('COMMON_BASE', $common_base); |
---|
11 | } else { |
---|
12 | die("Error: First argument must be the directory path to an existing site (ex: /home/sc/www.strangecode.com).\n"); |
---|
13 | } |
---|
14 | |
---|
15 | // Set include path. |
---|
16 | ini_set('include_path', get_include_path() |
---|
17 | . PATH_SEPARATOR . COMMON_BASE |
---|
18 | ); |
---|
19 | |
---|
20 | // Include core libraries. |
---|
21 | require_once 'codebase/lib/App.inc.php'; |
---|
22 | require_once 'codebase/lib/Utilities.inc.php'; |
---|
23 | require_once 'codebase/lib/Auth_SQL.inc.php'; |
---|
24 | |
---|
25 | $app =& App::getInstance('module_maker'); |
---|
26 | |
---|
27 | $app->setParam(array( |
---|
28 | 'site_name' => 'Module Maker', |
---|
29 | 'site_email' => 'codebase@strangecode.com', |
---|
30 | 'enable_session' => false, |
---|
31 | 'enable_db' => true, |
---|
32 | 'db_always_debug' => false, |
---|
33 | 'db_debug' => true, |
---|
34 | 'db_die_on_failure' => true, |
---|
35 | 'display_errors' => true, |
---|
36 | 'error_reporting' => E_ALL, |
---|
37 | 'log_screen_priority' => LOG_DEBUG, |
---|
38 | )); |
---|
39 | |
---|
40 | require_once 'global/db_auth.inc.php'; |
---|
41 | |
---|
42 | $app->start(); |
---|
43 | |
---|
44 | ?> |
---|