From d1acdfe6b47682945b7167b97d33f66f9da0f819 Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Tue, 30 Nov 2010 17:26:25 +0100 Subject: [PATCH] bacula-web: Test page in default layout - The test page is part of the default layout now --- gui/bacula-web/templates/header.tpl | 2 +- gui/bacula-web/templates/test.tpl | 53 ++++++++++++++ gui/bacula-web/test.php | 107 ++++++---------------------- 3 files changed, 74 insertions(+), 88 deletions(-) create mode 100644 gui/bacula-web/templates/test.tpl diff --git a/gui/bacula-web/templates/header.tpl b/gui/bacula-web/templates/header.tpl index ecc1fd6fae..55f0d54211 100644 --- a/gui/bacula-web/templates/header.tpl +++ b/gui/bacula-web/templates/header.tpl @@ -17,7 +17,7 @@ {if $dbs > 1}
  • - {t}Catalog{/t}  + Catalog 
  • {/if} diff --git a/gui/bacula-web/templates/test.tpl b/gui/bacula-web/templates/test.tpl new file mode 100644 index 0000000000..fa1a19e33b --- /dev/null +++ b/gui/bacula-web/templates/test.tpl @@ -0,0 +1,53 @@ + + + +bacula-web + + + +{include file=header.tpl} + +
    +
    +

    Testing required components

    + + + + + + + + + + + + + + + + + + +
    + {php}Check( "php-gettext", "PHP Gettext support", "If you want Bacula-web in your language, please compile PHP with Gettext support" );{/php} +
    + {php}Check("pear-db", "PEAR DB support", "PEAR DB support not found, please read the Bacula-web installation document");{/php} +
    + {php}Check( "php-gd", "PHP GD support", "This is required by phplot, please compile php with GD support" );{/php} +
    + {php}Check( "smarty-cache", "Smarty cache folder write permission", "Smarty template engine need write permissions to templates_c folder" );{/php} +
    +
    + Testing your graph system capabilities (Bacula-web only use PNG)
    + +
    +
    + + +
    +
    + + \ No newline at end of file diff --git a/gui/bacula-web/test.php b/gui/bacula-web/test.php index c24df4c4b4..840c109e38 100644 --- a/gui/bacula-web/test.php +++ b/gui/bacula-web/test.php @@ -1,17 +1,24 @@ ".$text." disabled " . $description; - else - echo " " . $text . " enabled "; - } - + require_once ("paths.php"); + require_once ($smarty_path."Smarty.class.php"); + require_once ("classes.inc.php"); + + $smarty = new Smarty(); + + //require_once ("lang.php"); + + // 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"; + function Check( $support, $description, $error_message ) { - $result = "Checking " . $description . " "; + $result = $description . " "; $ok = false; switch( $support ) @@ -40,79 +47,5 @@ echo $result; } -?> - - - - - Bacula-web - Test page - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - -
    - -
    -
    - Testing your graph system capabilities (Bacula-web only use PNG)
    - -
    -
    - - - - + $smarty->display('test.tpl'); +?> \ No newline at end of file -- 2.39.5