]> git.sur5r.net Git - bacula/bacula/blob - gui/bacula-web/config.inc.php
bacula-web: Changed visiblity of bweb class function TriggerDBError()
[bacula/bacula] / gui / bacula-web / config.inc.php
1 <?php
2 /* 
3 +-------------------------------------------------------------------------+
4 | Copyright 2010-2011, Davide Franco                                              |
5 |                                                                         |
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.                  |
10 |                                                                         |
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 +-------------------------------------------------------------------------+ 
16 */
17  define( 'BW_ROOT', getcwd() ); 
18  define( 'BW_OBJ', BW_ROOT . '/includes/' ); 
19  define( 'BW_EXTERNAL', BW_OBJ . 'external' );
20  
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/' );
24  
25  require_once( BW_SMARTY . "Smarty.class.php");                 
26  require_once( BW_PHPLOT . "phplot.php");                               
27  
28  // PEAR-DB classe
29  require_once "DB.php";   
30  
31  // Internal libraries
32  require_once BW_OBJ . "cfg/config.class.php";
33  require_once BW_OBJ . "graph/cgraph.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";
37  
38  // Global constants
39  define('CONFIG_DIR', BW_ROOT . "/config/");
40  define('CONFIG_FILE', CONFIG_DIR . "config.php");
41  
42  // Time intervals in secondes
43  define( 'FIRST_DAY',   mktime( 0, 0, 0, 1, 1, 1970) );
44  define( 'NOW',                 time() );
45  define( 'LAST_DAY',    NOW - 86400 );
46  define( 'LAST_WEEK',   NOW - 604800 );
47  define( 'LAST_MONTH',  NOW - 2678400 );
48  define( 'DAY',                 86400 );
49  define( 'WEEK',                604800 );
50  define( 'MONTH',               2678400 );
51  define( 'ALL',                 -1 );
52  
53  // Job status code
54  define( 'J_NOT_RUNNING',                 'C' );
55  define( 'J_RUNNING',                     'R' );
56  define( 'J_BLOCKED',                     'B' );
57  define( 'J_COMPLETED',                   'T' );
58  define( 'J_COMPLETED_ERROR',     'E' );
59  define( 'J_NO_FATAL_ERROR',      'e' );
60  define( 'J_FATAL',                       'f' );
61  define( 'J_CANCELED',                    'A' );
62  define( 'J_WAITING_CLIENT',      'F' );
63  define( 'J_WAITING_SD',                  'S' );
64  define( 'J_WAITING_NEW_MEDIA',   'm' );
65  define( 'J_WAITING_MOUNT_MEDIA', 'M' );
66  define( 'J_WAITING_STORAGE_RES', 's' );
67  define( 'J_WAITING_JOB_RES',     'j' );
68  define( 'J_WAITING_CLIENT_RES',  'c' );
69  define( 'J_WAITING_MAX_JOBS',    'd' );
70  define( 'J_WAITING_START_TIME',  't' );
71  define( 'J_WAITING_HIGH_PR_JOB', 'p' );
72  
73  // Job levels
74  define( 'J_FULL',      'F' );
75  define( 'J_DIFF',      'D' );
76  define( 'J_INCR',      'I' );
77 ?>