<?php\r
session_start();\r
- require_once ("paths.php");\r
- require_once ($smarty_path."Smarty.class.php");\r
- require_once ("bweb.inc.php");\r
- require_once ("config.inc.php"); \r
+ require_once('paths.php');
+ include_once( 'bweb.inc.php' );
\r
- $smarty = new Smarty(); \r
$dbSql = new Bweb();\r
\r
- // Smarty configuration\r
- $smarty->compile_check = true;\r
- $smarty->debugging = false;\r
- $smarty->force_compile = true;\r
-\r
- $smarty->template_dir = "./templates";\r
- $smarty->compile_dir = "./templates_c";\r
- $smarty->config_dir = "./configs";\r
-\r
$backupjob_name = "";\r
$days = array();\r
\r
$graph->SetGraphSize( 400, 230 );\r
\r
$graph->Render();\r
- $smarty->assign('graph_stored_bytes', $graph->Get_Image_file() ); \r
+ $dbSql->tpl->assign('graph_stored_bytes', $graph->Get_Image_file() );
\r
// Getting last 7 days stored files graph\r
$graph = new BGraph("graph3.png" );\r
$graph->SetGraphSize( 400, 230 );\r
\r
$graph->Render();\r
- $smarty->assign('graph_stored_files', $graph->Get_Image_file() );\r
+ $dbSql->tpl->assign('graph_stored_files', $graph->Get_Image_file() );
\r
// Last 10 jobs\r
$query = "SELECT JobId, Level, JobFiles, JobBytes, JobStatus, EndTime, Name "; \r
}else\r
die( "Unable to get last jobs from catalog " . $result->getMessage() );\r
\r
- $smarty->assign('jobs', $jobs );\r
+ $dbSql->tpl->assign('jobs', $jobs );
\r
- $smarty->assign('backupjob_name', $backupjob_name );\r
- $smarty->assign('backupjob_period', $backupjob_period );\r
- $smarty->assign('backupjob_bytes', $backupjob_bytes );\r
- $smarty->assign('backupjob_files', $backupjob_files );\r
+ $dbSql->tpl->assign('backupjob_name', $backupjob_name );
+ $dbSql->tpl->assign('backupjob_period', $backupjob_period );
+ $dbSql->tpl->assign('backupjob_bytes', $backupjob_bytes );
+ $dbSql->tpl->assign('backupjob_files', $backupjob_files );
\r
// Process and display the template \r
- $smarty->display('backupjob-report.tpl'); \r
+ $dbSql->tpl->display('backupjob-report.tpl');
\r
?>\r
<?php
session_start();
- require_once ("paths.php");
- require_once ($smarty_path."Smarty.class.php");
- require_once ("bweb.inc.php");
- require_once ("config.inc.php");
+ require_once('paths.php');
+ include_once( 'bweb.inc.php' );
- $smarty = new Smarty();
$dbSql = new Bweb();
-
- // 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";
-
// Jobs list
$query = "";
$last_jobs = array();
// Job Status list
$job_status = array( 'Any', 'Waiting', 'Running', 'Completed', 'Failed', 'Canceled' );
- $smarty->assign( 'job_status', $job_status );
+ $dbSql->tpl->assign( 'job_status', $job_status );
// Jobs per page
$jobs_per_page = array( 25,50,75,100,150 );
- $smarty->assign( 'jobs_per_page', $jobs_per_page );
+ $dbSql->tpl->assign( 'jobs_per_page', $jobs_per_page );
// Global variables
$job_level = array( 'D' => 'Diff', 'I' => 'Incr', 'F' => 'Full' );
array_push( $last_jobs, $job);
}
}
- $smarty->assign( 'last_jobs', $last_jobs );
+ $dbSql->tpl->assign( 'last_jobs', $last_jobs );
// Count jobs
if( isset( $_POST['status'] ) )
else
$total_jobs = $dbSql->CountJobs( ALL );
- $smarty->assign( 'total_jobs', $total_jobs );
+ $dbSql->tpl->assign( 'total_jobs', $total_jobs );
// Process and display the template
- $smarty->display('jobs.tpl');
+ $dbSql->tpl->display('jobs.tpl');
?>
<?php
session_start();
- require_once ("paths.php");
- require_once ($smarty_path."Smarty.class.php");
- require_once ("bweb.inc.php");
- require_once ("config.inc.php");
+ require_once('paths.php');
+ include_once( 'bweb.inc.php' );
- $smarty = new Smarty();
$dbSql = new Bweb();
- // 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";
-
// Get volumes list (pools.tpl)
- $smarty->assign('pools',$dbSql->GetVolumeList() );
+ $dbSql->tpl->assign('pools',$dbSql->GetVolumeList() );
- $smarty->display('pools.tpl');
+ $dbSql->tpl->display('pools.tpl');
?>
+-------------------------------------------------------------------------+
*/
session_start();
-require ("paths.php");
-require($smarty_path."Smarty.class.php");
-include "bweb.inc.php";
-
-$smarty = new Smarty;
-
-//$smarty->compile_check = true;
-//$smarty->debugging = true;
-
-$smarty->template_dir = "./templates";
-$smarty->compile_dir = "./templates_c";
-$smarty->config_dir = "./configs";
-$smarty->config_load("bacula.conf");
+require_once('paths.php');
+include_once( 'bweb.inc.php' );
$dbSql = new Bweb();
-$smarty->display('report.tpl');
+$dbSql->tpl->display('report.tpl');
?>