Subversion Repositories ALCASAR

Rev

Rev 1533 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 1533 Rev 1675
Line 25... Line 25...
25
    //
25
    //
26
    // configuration parameters
26
    // configuration parameters
27
    //
27
    //
28
    // edit these to reflect your particular situation
28
    // edit these to reflect your particular situation
29
    //
29
    //
-
 
30
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
-
 
31
{
-
 
32
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
-
 
33
	$Language = strtolower(substr(chop($Langue[0]),0,2));
-
 
34
}
-
 
35
if($Language == 'fr')
-
 
36
{
-
 
37
    $locale = 'fr_FR.UTF-8';
-
 
38
    $language = 'fr';
-
 
39
    $title = 'Traffic Internet sortant';
-
 
40
    date_default_timezone_set("Europe/Paris");
-
 
41
}
-
 
42
else
-
 
43
{
30
   $locale = 'en_US.UTF-8';
44
    $locale = 'en_US.UTF-8';
31
   $language = 'en';
45
    $language = 'en';
-
 
46
    $title = 'Internet outbound';
-
 
47
    date_default_timezone_set("Europe/London");
-
 
48
}
32
 
49
 
33
    // list of network interfaces monitored by vnStat
50
    // list of network interfaces monitored by vnStat
34
    $iface_list = array('eth0');
51
    $iface_list = array('enp0s3');
35
 
52
 
36
    //
53
    //
37
    // optional names for interfaces
54
    // optional names for interfaces
38
    // if there's no name set for an interface then the interface identifier
55
    // if there's no name set for an interface then the interface identifier
39
    // will be displayed instead
56
    // will be displayed instead
40
    //    
57
    //
41
    $iface_title['eth0'] = 'Wire';
58
    $iface_title['enp0s3'] = $title;
42
 
59
 
43
    //
60
    //
44
    // There are two possible sources for vnstat data. If the $vnstat_bin
61
    // There are two possible sources for vnstat data. If the $vnstat_bin
45
    // variable is set then vnstat is called directly from the PHP script
62
    // variable is set then vnstat is called directly from the PHP script
46
    // to get the interface data. 
63
    // to get the interface data.
Line 53... Line 70...
53
    // You can generate vnstat dumps with the command:
70
    // You can generate vnstat dumps with the command:
54
    //   vnstat --dumpdb -i $iface > /path/to/data_dir/vnstat_dump_$iface
71
    //   vnstat --dumpdb -i $iface > /path/to/data_dir/vnstat_dump_$iface
55
    // 
72
    //
56
    $vnstat_bin = '/usr/bin/vnstat';
73
    $vnstat_bin = '/usr/bin/vnstat';
57
    $data_dir = './dumps';
74
    $data_dir = './dumps';
58
    $data_dir = '/var/spool/vnstat';
-
 
59
 
75
 
60
    // graphics format to use: svg or png
76
    // graphics format to use: svg or png
61
    $graph_format='svg';
77
    $graph_format='svg';
62
    
78
 
-
 
79
    // preferred byte notation. null auto chooses. otherwise use one of
-
 
80
    // 'TB','GB','MB','KB'
-
 
81
    $byte_notation = null;
-
 
82
 
63
    // Font to use for PNG graphs
83
    // Font to use for PNG graphs
64
    define('GRAPH_FONT',dirname(__FILE__).'/VeraBd.ttf');
84
    define('GRAPH_FONT',dirname(__FILE__).'/VeraBd.ttf');
65
 
85
 
66
    // Font to use for SVG graphs
86
    // Font to use for SVG graphs
67
    define('SVG_FONT', 'Verdana');
87
    define('SVG_FONT', 'Verdana');
68
 
88
 
69
    // Default theme
89
    // Default theme
70
    define('DEFAULT_COLORSCHEME', 'light');
90
    define('DEFAULT_COLORSCHEME', 'light');
71
 
91
    
-
 
92
    // SVG Depth scaling factor
-
 
93
    define('SVG_DEPTH_SCALING', 1);
-
 
94
 
72
?>
95
?>