* 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_issex($params, &$smarty)
{
$filter = (isset($_GET['sex']) && strlen($_GET['sex'])>0) ? $_GET['sex'] : array();
$l = explode(';',$filter);
$f = 0;
$params['n'] = str_replace(",", ".", $params['n']);
foreach($l as $key=>$q){
if($params['s']==$q){$f++;}
}
if($f==0) return;
else return 'checked';
}
/* vim: set expandtab: */
?>