]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/bacula-web/index.php
bacula-web: Added / updated GPL copyright header in php scripts
[bacula/bacula] / gui / bacula-web / index.php
index 57f26244ee1fc8682508392097460ec53cb302e7..a6e2b069401c2125edfd3f14f78875dd5eaf562a 100644 (file)
@@ -1,7 +1,8 @@
 <?php
 /* 
 +-------------------------------------------------------------------------+
-| Copyright (C) 2004 Juan Luis Francés Jiménez                            |
+| Copyright (C) 2004 Juan Luis Francés Jiménez                                                   |
+| Copyright 2010-2011, Davide Franco                                             |
 |                                                                         |
 | This program is free software; you can redistribute it and/or           |
 | modify it under the terms of the GNU General Public License             |
 +-------------------------------------------------------------------------+ 
 */
 session_start();
-require_once('paths.php');
-include_once( 'bweb.inc.php' );
+include_once( 'config.inc.php' );
 
 $dbSql = new Bweb();
 
-//require("lang.php");
-
-$mode = "";                            
-
-/*
-// Getting mode from config file
-$mode = $dbSql->get_config_param("mode");
-if( $mode == false )
-       $mode = "Lite";
-
-$smarty->assign( "mode", $mode );
-*/
-
 // Assign to template catalogs number
-$dbSql->tpl->assign( "dbs", $dbSql->Get_Nb_Catalogs() );
-
-//Assign dbs
+//$dbSql->tpl->assign( "dbs", $dbSql->bwcfg->Count_Catalogs() );
+// Assign dbs
 /*
 if ( count($dbSql->dbs) >1 ) {
   $smarty->assign("dbs", $dbSql->dbs);
   $smarty->assign("dbs_now", $_SESSION['DATABASE']);
 }
 */
+// Catalog count
+$catalog_nb = $dbSql->catalog_nb;
+$dbSql->tpl->assign( 'catalog_nb', $catalog_nb );
 
 // Stored files number 
 $totalfiles = $dbSql->GetStoredFiles( ALL );
@@ -114,7 +103,7 @@ $graph = new BGraph( "graph1.png" );
 $pools = $dbSql->Get_Pools_List();
 
 foreach( $pools as $pool ) {
-       array_push( $data, $dbSql->GetPoolsStatistics( $pool ) );
+       array_push( $data, $dbSql->CountVolumesByPool( $pool ) );
 }
 
 $graph->SetData( $data, 'pie', 'text-data-single' );