* 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_url4_brend_kite($params, &$smarty) { $str = (isset($_GET['brend']) && strlen($_GET['brend'])>0) ? $_GET['brend'] : ''; if(strlen($str)>0)$l = explode(';',$str); else $l = array(); $f=0; $params['n'] = str_replace(",", ".", $params['n']); foreach($l as $key=>$q){ if($params['s']==$q){$f++;unset($l[$key]);} } if($f==0)$l[] = $params['s']; sort($l); //$param = (count($l)) ? ("brend=".implode(",",$l)) : null; $h = array(); $param=''; if(trim($_GET['search_str'])!='') $h[] = "search_str=".trim($_GET['search_str']); if(count($l))$h[] = ("brend=".implode(",",$l)); if(trim($_GET['sex'])!='') $h[] = "sex=".trim($_REQUEST['sex']); if(trim($_GET['what'])!='') $h[] = "what=".trim($_GET['what']); if(trim($_GET['filter'])!='') $h[] = "filter=".trim($_REQUEST['filter']); if(count($h)>0) $g = ";"; else $g = ""; return '/kite/index.php?rubID='.$_REQUEST['rubID']."&dataFilter=filter;" . implode(";",$h) . $g . $param."/"; } /* vim: set expandtab: */ ?>