From: Davide Franco Date: Tue, 30 Nov 2010 16:26:25 +0000 (+0100) Subject: bacula-web: Test page in default layout X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d1acdfe6b47682945b7167b97d33f66f9da0f819;p=bacula%2Fbacula bacula-web: Test page in default layout - The test page is part of the default layout now --- 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