]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Renammed some php filename's under classes folder
authorDavide Franco <bacula-dev@dflc.ch>
Thu, 24 Mar 2011 16:17:05 +0000 (17:17 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:11 +0000 (14:49 +0200)
13 files changed:
gui/bacula-web/classes/cfg/config.class.php [new file with mode: 0644]
gui/bacula-web/classes/cfg/config.classe.php [deleted file]
gui/bacula-web/classes/db/db.class.php [new file with mode: 0644]
gui/bacula-web/classes/db/db.classe.php [deleted file]
gui/bacula-web/classes/db/db.mysql.class.php [new file with mode: 0644]
gui/bacula-web/classes/db/db.mysql.classe.php [deleted file]
gui/bacula-web/classes/db/db.pgsql.class.php [new file with mode: 0644]
gui/bacula-web/classes/db/db.pgsql.classe.php [deleted file]
gui/bacula-web/classes/db/db.sqlite.class.php [new file with mode: 0644]
gui/bacula-web/classes/db/db.sqlite.classe.php [deleted file]
gui/bacula-web/classes/graph/bgraph.class.php [new file with mode: 0644]
gui/bacula-web/classes/graph/bgraph.inc.php [deleted file]
gui/bacula-web/config.inc.php

diff --git a/gui/bacula-web/classes/cfg/config.class.php b/gui/bacula-web/classes/cfg/config.class.php
new file mode 100644 (file)
index 0000000..a927384
--- /dev/null
@@ -0,0 +1,77 @@
+<?php
+
+ class BW_Config {
+       private $config_params;
+       private $config;
+       private $catalogs = array();
+       
+       function __construct()
+       {
+               global $config;
+               $this->config = $config;
+       }
+       
+       public function Check_Config_file()
+       {
+               // Check if config file exist and is readable
+               return is_readable( CONFIG_FILE );
+       }
+       
+       public function Load_Config()
+       {
+               global $config;
+               
+               if( is_array($config) && !empty($config) ) {
+                       // Loading database connection information
+                       foreach( $config as $parameter => $value )
+                       {
+                               if( is_array($value) )          // Parsing database section
+                                       array_push( $this->catalogs, $value );
+                       }
+                       return true;
+               }else {
+                       return false;           
+               }
+       }
+       
+       public function Get_Config_Param( $param )
+       {
+               if( isset( $config[$param] ) )
+                       return $config[$param];
+       }
+       
+       public function Get_Catalogs()
+       {
+               $result = array();
+               foreach( $this->catalogs as $db )
+                       array_push( $result, $db['label']);
+               
+               return $result;
+       }
+       
+       public function Count_Catalogs()
+       {
+               return count( $this->catalogs );
+       }
+       
+       public function Get_Dsn( $catalog_id )
+       {
+               // Construct a valid dsn
+               $dsn = array();
+        $dsn['hostspec'] = $this->catalogs[$catalog_id]["host"];
+        $dsn['username'] = $this->catalogs[$catalog_id]["login"];
+               $dsn['password'] = $this->catalogs[$catalog_id]["password"];
+               $dsn['database'] = $this->catalogs[$catalog_id]["db_name"];
+               $dsn['phptype']  = $this->catalogs[$catalog_id]["db_type"];
+               return $dsn;
+       }
+               
+       function __destruct()
+       {
+               
+       }
+       
+ } // end classe BW_Config
+?>
diff --git a/gui/bacula-web/classes/cfg/config.classe.php b/gui/bacula-web/classes/cfg/config.classe.php
deleted file mode 100644 (file)
index a927384..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-
- class BW_Config {
-       private $config_params;
-       private $config;
-       private $catalogs = array();
-       
-       function __construct()
-       {
-               global $config;
-               $this->config = $config;
-       }
-       
-       public function Check_Config_file()
-       {
-               // Check if config file exist and is readable
-               return is_readable( CONFIG_FILE );
-       }
-       
-       public function Load_Config()
-       {
-               global $config;
-               
-               if( is_array($config) && !empty($config) ) {
-                       // Loading database connection information
-                       foreach( $config as $parameter => $value )
-                       {
-                               if( is_array($value) )          // Parsing database section
-                                       array_push( $this->catalogs, $value );
-                       }
-                       return true;
-               }else {
-                       return false;           
-               }
-       }
-       
-       public function Get_Config_Param( $param )
-       {
-               if( isset( $config[$param] ) )
-                       return $config[$param];
-       }
-       
-       public function Get_Catalogs()
-       {
-               $result = array();
-               foreach( $this->catalogs as $db )
-                       array_push( $result, $db['label']);
-               
-               return $result;
-       }
-       
-       public function Count_Catalogs()
-       {
-               return count( $this->catalogs );
-       }
-       
-       public function Get_Dsn( $catalog_id )
-       {
-               // Construct a valid dsn
-               $dsn = array();
-        $dsn['hostspec'] = $this->catalogs[$catalog_id]["host"];
-        $dsn['username'] = $this->catalogs[$catalog_id]["login"];
-               $dsn['password'] = $this->catalogs[$catalog_id]["password"];
-               $dsn['database'] = $this->catalogs[$catalog_id]["db_name"];
-               $dsn['phptype']  = $this->catalogs[$catalog_id]["db_type"];
-               return $dsn;
-       }
-               
-       function __destruct()
-       {
-               
-       }
-       
- } // end classe BW_Config
-?>
diff --git a/gui/bacula-web/classes/db/db.class.php b/gui/bacula-web/classes/db/db.class.php
new file mode 100644 (file)
index 0000000..62a2de0
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+
+?>
diff --git a/gui/bacula-web/classes/db/db.classe.php b/gui/bacula-web/classes/db/db.classe.php
deleted file mode 100644 (file)
index 62a2de0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-?>
diff --git a/gui/bacula-web/classes/db/db.mysql.class.php b/gui/bacula-web/classes/db/db.mysql.class.php
new file mode 100644 (file)
index 0000000..62a2de0
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+
+?>
diff --git a/gui/bacula-web/classes/db/db.mysql.classe.php b/gui/bacula-web/classes/db/db.mysql.classe.php
deleted file mode 100644 (file)
index 62a2de0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-?>
diff --git a/gui/bacula-web/classes/db/db.pgsql.class.php b/gui/bacula-web/classes/db/db.pgsql.class.php
new file mode 100644 (file)
index 0000000..62a2de0
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+
+?>
diff --git a/gui/bacula-web/classes/db/db.pgsql.classe.php b/gui/bacula-web/classes/db/db.pgsql.classe.php
deleted file mode 100644 (file)
index 62a2de0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-?>
diff --git a/gui/bacula-web/classes/db/db.sqlite.class.php b/gui/bacula-web/classes/db/db.sqlite.class.php
new file mode 100644 (file)
index 0000000..62a2de0
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+
+?>
diff --git a/gui/bacula-web/classes/db/db.sqlite.classe.php b/gui/bacula-web/classes/db/db.sqlite.classe.php
deleted file mode 100644 (file)
index 62a2de0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-?>
diff --git a/gui/bacula-web/classes/graph/bgraph.class.php b/gui/bacula-web/classes/graph/bgraph.class.php
new file mode 100644 (file)
index 0000000..c88945b
--- /dev/null
@@ -0,0 +1,117 @@
+<?php
+
+class BGraph{
+       private $title;
+       
+       private $data;
+       private $data_type;
+       private $type;
+       
+       private $colors;
+       private $shading;
+       
+       private $width;
+       private $height;
+       private $output_file;
+       private $plot;
+       
+       function __construct( $filename = "graph.png" )
+       {
+               $this->output_file = 'templates_c/' . $filename;
+       }
+       
+       public function SetData( $data_in, $type, $data_type, $shading = 5 )
+       {
+               $this->data             = $data_in;
+               $this->type             = $type;
+               $this->data_type        = $data_type;
+               $this->shadding         = $shading;
+       }
+       
+       public function SetGraphSize( $width, $height )
+       {
+               $this->width  = $width;
+               $this->height = $height;
+       }
+       
+       public function SetTitle( $title )
+       {
+               if( !empty($title) )
+                       $this->title = $title;
+               else
+                       die( "Please provide a non empty title for the graph" );
+       }
+       
+       public function SetColors( $colors )
+       {
+               if( is_array( $colors ) )
+                       $this->colors = $colors;
+               else
+                       die( "Please provide a array in BGraph->SetColors()" );
+       }
+       
+       public function Get_Image_file()
+       {
+               return $this->output_file;
+       }
+       
+       public function Render()
+       {
+               // Setting the size
+               $this->plot = new PHPlot( $this->width, $this->height );
+               
+               // Render to file instead of screen
+               $this->plot->SetOutputFile( $this->output_file );
+               $this->plot->SetFileFormat("png");
+               $this->plot->SetIsInline( true );
+               
+               
+               $this->plot->SetImageBorderType('plain');
+
+               // Data, type and data type
+               $this->plot->SetPlotType( $this->type );
+               $this->plot->SetDataType( $this->data_type );
+               $this->plot->SetDataValues( $this->data );
+               
+               // Plot colors
+               $this->plot->SetDataColors( $this->colors );
+               
+               // Plot shading
+               $this->plot->SetShading( $this->shading );
+               
+               // Image border
+               $this->plot->SetImageBorderType( 'none' );
+
+               // Plot area (calculated regarding the width and height of the graph)
+               if( $this->type == 'pie' )
+                       $this->plot->SetPlotAreaPixels( 10, 10, ($this->width / 2), $this->height-10 );
+               
+               // Legend position (calculated regarding the width and height of the graph)
+               $this->plot->SetLegendPixels( ($this->width / 2) + 10, 25 );
+
+               // Labels scale position
+               if( $this->type == 'pie' )
+                       $this->plot->SetLabelScalePosition( 0.2 );
+               
+               // Graph title
+               $this->plot->SetTitle( $this->title );
+
+               // Setting up legends
+               if( $this->type != 'bars' ) {
+                       $legends = array();
+                       foreach( $this->data as $key => $legend ) {
+                               $this->plot->SetLegend( implode(': ',$legend) );
+                       }
+               }
+
+               # Turn off X tick labels and ticks because they don't apply here:
+               $this->plot->SetXTickLabelPos('none');
+               $this->plot->SetXTickPos('none');
+               $this->plot->SetPlotAreaWorld(NULL, 0, NULL, NULL);
+
+
+               $this->plot->DrawGraph();
+       } // end function Render()
+} // end BGraph classe
+
+?>
diff --git a/gui/bacula-web/classes/graph/bgraph.inc.php b/gui/bacula-web/classes/graph/bgraph.inc.php
deleted file mode 100644 (file)
index c88945b..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-
-class BGraph{
-       private $title;
-       
-       private $data;
-       private $data_type;
-       private $type;
-       
-       private $colors;
-       private $shading;
-       
-       private $width;
-       private $height;
-       private $output_file;
-       private $plot;
-       
-       function __construct( $filename = "graph.png" )
-       {
-               $this->output_file = 'templates_c/' . $filename;
-       }
-       
-       public function SetData( $data_in, $type, $data_type, $shading = 5 )
-       {
-               $this->data             = $data_in;
-               $this->type             = $type;
-               $this->data_type        = $data_type;
-               $this->shadding         = $shading;
-       }
-       
-       public function SetGraphSize( $width, $height )
-       {
-               $this->width  = $width;
-               $this->height = $height;
-       }
-       
-       public function SetTitle( $title )
-       {
-               if( !empty($title) )
-                       $this->title = $title;
-               else
-                       die( "Please provide a non empty title for the graph" );
-       }
-       
-       public function SetColors( $colors )
-       {
-               if( is_array( $colors ) )
-                       $this->colors = $colors;
-               else
-                       die( "Please provide a array in BGraph->SetColors()" );
-       }
-       
-       public function Get_Image_file()
-       {
-               return $this->output_file;
-       }
-       
-       public function Render()
-       {
-               // Setting the size
-               $this->plot = new PHPlot( $this->width, $this->height );
-               
-               // Render to file instead of screen
-               $this->plot->SetOutputFile( $this->output_file );
-               $this->plot->SetFileFormat("png");
-               $this->plot->SetIsInline( true );
-               
-               
-               $this->plot->SetImageBorderType('plain');
-
-               // Data, type and data type
-               $this->plot->SetPlotType( $this->type );
-               $this->plot->SetDataType( $this->data_type );
-               $this->plot->SetDataValues( $this->data );
-               
-               // Plot colors
-               $this->plot->SetDataColors( $this->colors );
-               
-               // Plot shading
-               $this->plot->SetShading( $this->shading );
-               
-               // Image border
-               $this->plot->SetImageBorderType( 'none' );
-
-               // Plot area (calculated regarding the width and height of the graph)
-               if( $this->type == 'pie' )
-                       $this->plot->SetPlotAreaPixels( 10, 10, ($this->width / 2), $this->height-10 );
-               
-               // Legend position (calculated regarding the width and height of the graph)
-               $this->plot->SetLegendPixels( ($this->width / 2) + 10, 25 );
-
-               // Labels scale position
-               if( $this->type == 'pie' )
-                       $this->plot->SetLabelScalePosition( 0.2 );
-               
-               // Graph title
-               $this->plot->SetTitle( $this->title );
-
-               // Setting up legends
-               if( $this->type != 'bars' ) {
-                       $legends = array();
-                       foreach( $this->data as $key => $legend ) {
-                               $this->plot->SetLegend( implode(': ',$legend) );
-                       }
-               }
-
-               # Turn off X tick labels and ticks because they don't apply here:
-               $this->plot->SetXTickLabelPos('none');
-               $this->plot->SetXTickPos('none');
-               $this->plot->SetPlotAreaWorld(NULL, 0, NULL, NULL);
-
-
-               $this->plot->DrawGraph();
-       } // end function Render()
-} // end BGraph classe
-
-?>
index 2035808a94b1596c25c1e0d80e7c6e3a11993d72..0a5cdb13d4b4ded8b9a3d05494a429b9dbfd4c86 100644 (file)
@@ -14,8 +14,8 @@
  require_once "DB.php";   
  
  // Internal libs
- require_once BW_OBJ . "cfg/config.classe.php";
- require_once BW_OBJ . "graph/bgraph.inc.php";
+ require_once BW_OBJ . "cfg/config.class.php";
+ require_once BW_OBJ . "graph/bgraph.class.php";
  require_once BW_OBJ . "bweb.inc.php";
  
  // Global constants