"; for ($i=0; $i < count($okanno); $i++){ if($okanno[$i]!="") echo "
  • $okanno[$i]
  • "; } echo ""; $myhandle = opendir('images/news'); while ($myfile = readdir($myhandle)) { if (!($myfile == "." or $myfile == "..")) { $mymy_modlist.= "$myfile "; } } closedir($myhandle); $mymy_modlist = explode(" ", $mymy_modlist); sort($mymy_modlist); echo "Per argomenti:
    "; } else if(($_GET['year']!="") and ($_GET['month']=="")){ $handle=opendir('news'); while ($file = readdir($handle)) { if (!( $file=="." or $file==".." )) { $my_modlist .= "$file "; } } closedir($handle); $my_modlist = explode(" ", $my_modlist); # vedo quali mesi ci sono nelle news di quest'anno. for ($i=0; $i < sizeof($my_modlist)-1; $i++){ $tmp=str_replace(".php","",$my_modlist[$i]); $mese=date("m",$tmp); if ($mese<10) $mese=str_replace("0","",$mese); if(date("Y",$tmp)==$_GET['year']){ $ok[$mese-1]=1; } } echo ""; echo "<< Indietro"; } else { $handle=opendir('news'); while ($file = readdir($handle)) { if (!( $file=="." or $file==".." )) { $my_modlist .= "$file "; } } closedir($handle); $my_modlist = explode(" ", $my_modlist); rsort($my_modlist); for ($i=0; $i < sizeof($my_modlist)-1; $i++){ $tmp=str_replace(".php","",$my_modlist[$i]); $mese=date("m",$tmp); $anno=date("Y",$tmp); if ($mese<10) $mese=str_replace("0","",$mese); if(($mese==$_GET['month']) and ($anno==$_GET['year'])){ $fd=file('news/'.$my_modlist[$i]); $title=explode("|",$fd[0]); $id=str_replace(".php","",$my_modlist[$i]); echo " $title[0] (". date("d/m/Y - H:i",$id) .") Letto $title[2] volte
    "; } } echo "
    << Indietro"; } ?>