assign("Sezione",(int)$_GET['section']); $section=$_GET['section']; }else $section=1; if(isset($_GET['sub']) and is_numeric($_GET['sub'])){ $smarty->assign("Sub",(int)$_GET['sub']); $sub=$_GET['sub']; }else $sub=0; if(isset($_GET['last']) and is_numeric($_GET['last'])){ $smarty->assign("Last",(int)$_GET['last']); $last=$_GET['last']; }else $last=0; #giorni $tmp_exp=Vari::getGiorniExp(); $smarty->assign("expAnni",$tmp_exp[0]); $smarty->assign("expGiorni",$tmp_exp[1]); $tmp=Vari::getTesti($db,$section,$sub,$last,$lng->getLng()); // if($section==3 and $sub==2 and $last==0){ $tmp[0][1]=str_replace("##GIORNI##" , $tmp_exp[1], $tmp[0][1]); $tmp[0][1]=str_replace("##ANNI##", $tmp_exp[0], $tmp[0][1]); } if(count($tmp)>0)$smarty->assign("Testi",$tmp); else $smarty->assign("Testi",false); #tab... $smarty->assign("Tab",Vari::getTab($db,$lng->getLng())); #lastnews... $elenco_totale=Vari::elencoNews($db,2,1,0,$lng->getLng()); foreach ($elenco_totale as $k => $v) foreach ($v as $kf => $vf) if($kf==2 or $kf==3) $elenco_totale[$k][$kf]=convertiData($vf); $smarty->assign("News",$elenco_totale); #mando in output il template $smarty->display('main.tpl'); #chiudo db $db->Close(); ?>