<?php\r
session_start();\r
- require_once('paths.php');
include_once( 'bweb.inc.php' );
\r
$dbSql = new Bweb();\r
<?php
-require_once ("external_packages/phplot/phplot.php");
class BGraph{
private $title;
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
*/
-require_once "paths.php";
-require_once($smarty_path."Smarty.class.php");
-
-require_once "DB.php"; // Pear DB
require_once "config.inc.php";
-require_once "bgraph.inc.php";
class Bweb extends DB {
<?php
+ // PhPlot (version 5.3.1)
+ // http://www.phplot.com
+ $phplot_path = "external_packages/phplot/";
+
+ // Smarty (version 2.6.26)
+ // http://smarty.php.net
+ $smarty_path = "external_packages/smarty/libs/";
+
+ // Smarty_gettext (version 0.9)
+ // http://www.boom.org.il/smarty/gettext/
+ $smarty_gettext_path = "external_packages/smarty_gettext-0.9/";
+
+ require_once( $smarty_path . "Smarty.class.php");
+ require_once( $phplot_path . "phplot.php");
+
+ require_once "DB.php";
+ require_once "bgraph.inc.php";
+
// Global constants
define('CONFIG_DIR', "configs");
define('CONFIG_FILE', "bacula.conf");
define('BACULA_TYPE_FILES_JOBID', 2);
define('BACULA_TYPE_BYTES_ENDTIME_ALLJOBS', 69);
- // Intervalles in secondes
+ // Time intervals in secondes
define( 'LAST_DAY', 86400 );
define( 'LAST_WEEK', 604800 );
define( 'LAST_MONTH', 2678400 );
+-------------------------------------------------------------------------+
*/
session_start();
-require_once('paths.php');
include_once( 'bweb.inc.php' );
$dbSql = new Bweb();
<?php
session_start();
- require_once('paths.php');
include_once( 'bweb.inc.php' );
$dbSql = new Bweb();
+++ /dev/null
-<?php
-// LOCATION OF EXTERNAL PACKAGES
-// -----------------------------
-
-// PhPlot package. version 5.0RC1. http://www.phplot.com
-$phplot_path = "external_packages/phplot/";
-
-//Smarty package. version 2.6.10. http://smarty.php.net
-$smarty_path = "external_packages/smarty/libs/";
-
-//Smarty_gettext. version 0.9. http://www.boom.org.il/smarty/gettext/
-$smarty_gettext_path = "external_packages/smarty_gettext-0.9/";
-
-?>
\ No newline at end of file
<?php
session_start();
- require_once('paths.php');
include_once( 'bweb.inc.php' );
$dbSql = new Bweb();
+-------------------------------------------------------------------------+
*/
session_start();
-require_once('paths.php');
include_once( 'bweb.inc.php' );
$dbSql = new Bweb();
<?php
- require_once ("paths.php");
- require_once ($smarty_path."Smarty.class.php");
require_once ("bweb.inc.php");
-
- $smarty = new Smarty();
-
- // Smarty configuration
- $smarty->compile_check = true;
- $smarty->debugging = false;
- $smarty->force_compile = true;
-
- $smarty->template_dir = "./templates";
- $smarty->compile_dir = "./templates_c";
- $smarty->config_dir = "./configs";
-
+ $bw = new Bweb();
+
// Check result icon
$check_result = array( true => 's_ok.png', false => 's_error.gif' );
$graph->Render();
// Parse to template
- $smarty->assign( 'checks', $check_list );
- $smarty->assign('graph_test', $graph->Get_Image_file() );
- $smarty->display('test.tpl');
+ $bw->tpl->assign( 'checks', $check_list );
+ $bw->tpl->assign('graph_test', $graph->Get_Image_file() );
+ $bw->tpl->display('test.tpl');
?>