function.fon.php
690 Bytes
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* Smarty {math} function plugin
*
* Type: function<br>
* Name: math<br>
* Purpose: handle math computations in template<br>
* @link http://smarty.php.net/manual/en/language.function.math.php {math}
* (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com>
* @param array
* @param Smarty
* @return string
*/
function smarty_function_fon($params, &$smarty)
{ $array = array("fon_body.jpg","fon_kite.jpg","dakine.jpg","fon_all.jpg");
$key = rand(0, 3);
return '.bg{background:url("/img/'.$array[$key].'") top center no-repeat;}';
}
/* vim: set expandtab: */
?>