".$title[0]); echo "\"$title[1]\""; for($j=1; $j
"; else if(stristr($fd[$j],"%%%")){ echo "

"; OpenTable(); echo "COMMENTI | Aggiungi Commento | Stampa"; CloseTable(); } else if(stristr($fd[$j],"###")){ echo "
"; OpenTable(); echo "Da: ".$fd[$j+1]."

".$fd[$j+2]."
"; $j+=2; CloseTable(); } else echo $fd[$j]; } CloseTableTitle(); } function count_comment($news){ $com=0; $fd=file("news/$news.php"); for($j=1; $j0 and ($j!=$i)){ $mypath.=$albero[$j]."/"; } else{ $mypath.=$albero[$j]; } } $tmp=str_replace("none_","",$albero[$i]); $tmp=eregi_replace("^[0-9][0-9]_","",$tmp); if($i!=(sizeof($albero)-1)){ $tit.= "$tmp/"; } else{ $tit.= "$tmp"; } } OpenTableTitle("\"Section\" ".$tit); #$fd=file('sections/'.$section.'/section.php'); #for($j=0; $j1){ echo "

"; OpenTable(); # echo "
    "; for ($i=1; $i < sizeof($modlist); $i++) { if(stristr($modlist[$i],"_")) $tmp=eregi_replace("^[0-9][0-9]_","",$modlist[$i]); # per compatibilitą con le vecchie versioni... else $tmp=$modlist[$i]; echo " \"Subsection\" $tmp
    "; } # echo "
"; CloseTable(); } CloseTableTitle(); } function create_menu(){ global $theme; $handle=opendir('sections'); while ($file = readdir($handle)) { if (!( $file=="." or $file==".." ) and (!ereg("^\.",$file) and ($file!="CVS") )) { $modlist .= "$file "; } } closedir($handle); $modlist = explode(" ", $modlist); sort($modlist); OpenTableTitle("\"Menu\" Menu"); echo "Home
"; for ($i=1; $i < sizeof($modlist); $i++) { if(!stristr($modlist[$i],"none_")){ if(stristr($modlist[$i],"_")) $tmp=eregi_replace("^[0-9][0-9]_","",$modlist[$i]); else $tmp=$modlist[$i]; echo "$tmp
"; } } CloseTableTitle(); echo "
"; } # inserisce i blocchi di sinistra o destra. function create_blocks($edge){ global $theme; $handle=opendir('blocks/'.$edge); while ($file = readdir($handle)) { if (!is_dir("blocks/$edge/$file") and (!ereg("^\.",$file))) { $modlist .= "$file "; } } closedir($handle); $modlist = explode(" ", $modlist); sort($modlist); for ($i=1; $i < sizeof($modlist); $i++) { $tmp=eregi_replace("^[0-9][0-9]_","",$modlist[$i]); OpenTableTitle("\"Block\" ".str_replace(".php","",$tmp)); include ("blocks/$edge/$modlist[$i]"); CloseTableTitle(); echo "
"; } } # legge tutte le news e le inserisce function create_news(){ global $newspp,$theme; OpenTable(); echo "\"Motd\""; #"; include ("misc/motd.php"); #echo ""; CloseTable(); $handle=opendir('news'); while ($file = readdir($handle)) { if (!( $file=="." or $file==".." ) and (!ereg("^\.",$file)and ($file!="CVS"))) { $modlist .= "$file "; } } closedir($handle); $modlist = explode(" ", $modlist); rsort($modlist); for ($i=0; $i < sizeof($modlist)-1; $i++) { if ($i>=$newspp) break; # echo $modlist[$i]."
"; $fd=file("news/$modlist[$i]"); echo "
"; $title=explode("|",$fd[0]); OpenTableTitle("\"News\" ".$title[0]); echo "
"; for($j=1; $j\"$title[1]\"
"; CloseTableTitle2("$modlist[$i]"); } } function verify($pass){ global $password; if($pass==$password){ return 1; } else { return 0; } } function insert_news(){ OpenTableTitle("Insert News"); echo "
Titolo news


Argomento
\"Argomento\"


echo "

Intestazione messaggio


Corpo messaggio


Password


"; echo " "; echo "



NEWS SEGNALATE

Password


"; CloseTableTitle(); } function insert_comment($news){ OpenTableTitle("Insert comment"); echo "
Nome


Commento


"; CloseTableTitle(); } function insert_motd(){ OpenTableTitle("Insert motd"); echo "
Message of the Day


Password


"; CloseTableTitle(); } function parse_RSS($url){ if ($url != "") { if (!ereg("http://",$url)) { $url = "http://$url"; } $rdf = parse_url($url); $fp = fsockopen($rdf['host'], 80, $errno, $errstr, 15); if (!$fp) { die("Non trovo RSS"); exit; } if ($fp) { fputs($fp, "GET " . $rdf['path'] . "?" . $rdf['query'] . " HTTP/1.0\r\n"); fputs($fp, "HOST: " . $rdf['host'] . "\r\n\r\n"); $string = ""; while(!feof($fp)) { $pagetext = fgets($fp,228); $string .= chop($pagetext); } fputs($fp,"Connection: close\r\n\r\n"); fclose($fp); $items = explode("",$string); $content = ""; for ($i=0;$i<10;$i++) { $link = ereg_replace(".*","",$items[$i]); $link = ereg_replace(".*","",$link); $title2 = ereg_replace(".*","",$items[$i]); $title2 = ereg_replace(".*","",$title2); if ($items[$i] == "" AND $cont != 1) { $content = ""; } else { if (strcmp($link,$title2) AND $items[$i] != "") { $cont = 1; $content .= "· $title2
\n"; } } } } } # $content = FixQuotes($content); return $content; } function generate_RSS(){ global $sitename,$siteurl,$newspp; $body=" $sitename $sitename headlines $siteurl \n\n"; $handle=opendir('news'); while ($file = readdir($handle)) { if (!( $file=="." or $file=="..") and (!ereg("^\.",$file)and ($file!="CVS"))) { $modlist .= "$file "; } } closedir($handle); $modlist = explode(" ", $modlist); rsort($modlist); for ($i=0; $i < sizeof($modlist)-1; $i++) { if ($i>=$newspp) break; $fd=file("news/$modlist[$i]"); $mytitle=explode("|",$fd[0]); $id=str_replace(".php","",$modlist[$i]); $body.=" $mytitle[0] $sitename Headlines $siteurl/index.php?mod=read&id=$id \n\n"; } $body.=""; #echo str_replace("\n","
",htmlspecialchars($body)); $fp=fopen("misc/backend.rss","w"); fwrite($fp,"$body"); fclose($fp); } ?>