37 lines
820 B
PHP
37 lines
820 B
PHP
<?php
|
|
/*
|
|
* Smarty plugin
|
|
* -------------------------------------------------------------
|
|
* File: function.generateHeaders.php
|
|
* Type: function
|
|
* Name: link
|
|
* Purpose: zwraca naglowki
|
|
* -------------------------------------------------------------
|
|
*/
|
|
|
|
|
|
function smarty_function_generateHeaders($params, &$smarty){
|
|
|
|
$headers = $smarty->get_template_vars('pageHeaders');
|
|
$return = null;
|
|
|
|
foreach($headers as $type=>$header) {
|
|
if($header!=null) {
|
|
|
|
foreach($header as $headerItem) {
|
|
$return .= "<".$type." ";
|
|
foreach($headerItem as $var=>$val) {
|
|
$return .=$var."=\"".$val."\" ";
|
|
}
|
|
$return .="/>
|
|
";
|
|
}
|
|
}
|
|
}
|
|
|
|
//print_r($headers);
|
|
|
|
return $return;
|
|
|
|
}
|
|
?>
|