- Added new parameter refresh to the view /views/templates/FHC-Header.php

- /views/templates/FHC-Header.php calls the helper function printRefreshMeta
- Added new function printRefreshMeta to application/helpers/hlp_header_helper.php
This commit is contained in:
Paolo
2022-03-08 14:46:38 +01:00
parent 4bd98fd10a
commit 78a5f65025
2 changed files with 18 additions and 0 deletions
+15
View File
@@ -39,6 +39,21 @@ function printPageTitle($title)
}
}
/**
* Print the meta tag http-equiv refresh having as content the value of the given parameter
*/
function printRefreshMeta($refresh)
{
if (is_numeric($refresh) && $refresh > 0)
{
echo '<meta http-equiv="refresh" content="'.$refresh.'">';
}
else
{
show_error('The provided refresh parameter has to be a number greater then 0');
}
}
/**
* Generates tags for the style sheets you want to include, the parameter could by a string or an array of strings
*/
@@ -10,6 +10,7 @@
// By default set the parameters to null
$title = isset($title) ? $title : null;
$refresh = isset($refresh) ? $refresh : null;
$customCSSs = isset($customCSSs) ? $customCSSs : null;
$customJSs = isset($customJSs) ? $customJSs : null;
$phrases = isset($phrases) ? $phrases : null;
@@ -48,6 +49,8 @@
<meta charset="UTF-8">
<?php printRefreshMeta($refresh); ?>
<?php
// --------------------------------------------------------------------------------------------------------
// CSS