* Name: math
* Purpose: handle math computations in template
* @link http://smarty.php.net/manual/en/language.function.math.php {math} * (Smarty online manual) * @author Monte Ohrt * @param array * @param Smarty * @return string */ function smarty_function_fonl($params, &$smarty) { /*$array = array("kurtki_new.jpg","kid_all.jpg"); $array_link = array( "http://extremstyle.ua/kurtki-catalogs/", "http://extremstyle.ua/kurtki-catalogs/filter;brend=Rossignol;filter=g48_novaya-kollektsiya/" ); */ global $objFon; $row = $objFon->getFonRand(); //$key = rand(0, 1); $out = 'style="'; $out .= 'width:100%;'; $out .= 'height: 2126px;'; $out .= 'position:absolute;'; $out .= 'z-index:1;'; $out .= 'background: url(/uploaded/pic/fon/'.$row['pic'].') top center no-repeat;'; $out .= '" '; $out .= 'href="'.$row['url'].'"'; return $out; } /* vim: set expandtab: */ ?>