3 +-------------------------------------------------------------------------+
4 | Copyright 2010-2011, Davide Franco |
6 | This program is free software; you can redistribute it and/or |
7 | modify it under the terms of the GNU General Public License |
8 | as published by the Free Software Foundation; either version 2 |
9 | of the License, or (at your option) any later version. |
11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. |
15 +-------------------------------------------------------------------------+
17 define( 'BW_ROOT', getcwd() );
18 define( 'BW_OBJ', BW_ROOT . '/includes/' );
19 define( 'BW_EXTERNAL', BW_OBJ . 'external' );
21 define( 'BW_PHPLOT', BW_EXTERNAL . '/phplot/' );
22 define( 'BW_SMARTY', BW_EXTERNAL . '/smarty/libs/' );
23 define( 'BW_SMARTY_GETTEXT', BW_EXTERNAL . '/smarty_gettext-0.9/' );
25 require_once( BW_SMARTY . "Smarty.class.php");
26 require_once( BW_PHPLOT . "phplot.php");
29 require_once "DB.php";
32 require_once BW_OBJ . "cfg/config.class.php";
33 require_once BW_OBJ . "graph/bgraph.class.php";
34 require_once BW_OBJ . "bweb.inc.php";
35 require_once BW_OBJ . "utils/cutils.class.php";
36 require_once BW_OBJ . "utils/ctimeutils.class.php";
39 define('CONFIG_DIR', BW_ROOT . "/config/");
40 define('CONFIG_FILE', CONFIG_DIR . "config.php");
42 // Time intervals in secondes
43 define( 'LAST_DAY', 86400 );
44 define( 'LAST_WEEK', 604800 );
45 define( 'LAST_MONTH', 2678400 );
49 define( 'J_NOT_RUNNING', 'C' );
50 define( 'J_RUNNING', 'R' );
51 define( 'J_BLOCKED', 'B' );
52 define( 'J_COMPLETED', 'T' );
53 define( 'J_COMPLETED_ERROR', 'E' );
54 define( 'J_NO_FATAL_ERROR', 'e' );
55 define( 'J_FATAL', 'f' );
56 define( 'J_CANCELED', 'A' );
57 define( 'J_WAITING_CLIENT', 'F' );
58 define( 'J_WAITING_SD', 'S' );
59 define( 'J_WAITING_NEW_MEDIA', 'm' );
60 define( 'J_WAITING_MOUNT_MEDIA', 'M' );
61 define( 'J_WAITING_STORAGE_RES', 's' );
62 define( 'J_WAITING_JOB_RES', 'j' );
63 define( 'J_WAITING_CLIENT_RES', 'c' );
64 define( 'J_WAITING_MAX_JOBS', 'd' );
65 define( 'J_WAITING_START_TIME', 't' );
66 define( 'J_WAITING_HIGH_PR_JOB', 'p' );