]> git.sur5r.net Git - bacula/bacula/blob - gui/bacula-web/stats.php
commit changes
[bacula/bacula] / gui / bacula-web / stats.php
1 <?
2 /* 
3 +-------------------------------------------------------------------------+
4 | Copyright (C) 2004 Juan Luis Francés Jiménez                            |
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
18 // Create a graph, showing a img.       SP: Genera el gráfico.
19 // $server= Client of backup.           SP: Servidor de Backup
20 // $tipo_dato= Type of data                     SP: Datos a mostar
21 // $title= Title of graph.                      SP: Titulo de la gráfica
22 // $xlabel= Leyend X axis.                      SP: Leyenda eje X
23 // $ylabel= Leyend Y axis.                      SP: Leyenda eje Y
24 // $sizex
25 // $sizey
26 // $MBottom = Margin of the bottom of the graph
27 // $modo_graph= Type of graph (bars, lines, linepoints, area, points, and pie).
28 // $elapsed = Period in seconds to show complex graph (tipo_dato <3) 1 month = 18144000
29 session_start();
30 require ("classes.inc");
31
32 $graph = new BCreateGraph();
33
34
35 if ( isset($_GET['sizey']) && isset($_GET['sizex']) ) {
36         $graph->sizey = $_GET['sizey'];
37         $graph->sizex = $_GET['sizex'];
38 }
39
40 if ( isset($_GET['MBottom']) ) {
41         $graph->MarginBottom = $_GET['MBottom'];
42 }
43
44 if ( isset($_GET['EndDateYear']) )
45         $graph->PrepareDate($_GET['StartDateMonth'],$_GET['StartDateDay'],$_GET['StartDateYear'],$_GET['EndDateMonth'],$_GET['EndDateDay'],$_GET['EndDateYear']);
46
47 if ( isset($_GET['legend']) )
48         $graph->Leg = $_GET['legend'];
49         
50 if ( isset($_GET['elapsed']) )
51         $graph->elapsed = $_GET['elapsed'];
52         
53 if (!isset($_GET['modo_graph']) )
54         $graph->BCreate ($_GET['server'],$_GET['tipo_dato'],$_GET['title']);
55 else if (!isset($_GET['xlabel']))
56         $graph->BCreate ($_GET['server'],$_GET['tipo_dato'],$_GET['title'],$_GET['modo_graph']);
57 else if (!isset($_GET['ylabel']))
58         $graph->BCreate ($_GET['server'],$_GET['tipo_dato'],$_GET['title'],$_GET['modo_graph'],$_GET['xlabel']);
59 else
60         $graph->BCreate ($_GET['server'],$_GET['tipo_dato'],$_GET['title'],$_GET['modo_graph'],$_GET['xlabel'],$_GET['ylabel']);
61
62
63 ?>