<? include("templates/p1.txt"); ?>
News Archive
<?
$aranz ="<H2>News Archive</H2>";
include("templates/p2.txt");
echo"$aranz";
include("templates/headline.txt");
include("templates/p3.txt");
include("templates/p4.txt");
include("templates/p5.txt");
$php = ".php";
$txt = ".txt";
$jetzt_unix = time();
$n = urlencode($HTTP_GET_VARS["n"]);
$file_ext = '.txt';
###########################################
$folder = openDir($steuerpath); // Öffnet das Archiv
while ($file = readDir($folder)) { // Verzeichnis lesen
if ($file != "." && $file != "..") { // '.' und '..' ausschließen
if($file != substr_count($file, $file_ext)) {
// Dateityp filtern. Es werden nur .txt-Dateien angezeigt
$name = explode(".",$file); // Extension ausfiltern
$input_files_ar1[] = $file; // Array aus Dateinamen erzeugen
}
}
}
closeDir($folder);
if ($input_files[0] != ""){
foreach($input_files_ar1 as $steuerarray){
$zaehlfile = fopen("$aktuellurl$steuerfiles$steuerarray","r");
$inhalt_zaehlfile = fgets($zaehlfile);
fclose($zaehlfile);
$inhalt = explode('ä',$inhalt_zaehlfile);
$datum = $inhalt[0];
$datum_ag= strftime($domains[outform_time] , $datum);
$url = $inhalt[2];
$titel = $inhalt[3];
if ($datum < $jetzt_unix)
{
$aktuelle_files_ar[] = $steuerarray;
}
}
rsort($aktuelle_files_ar);
$counted = count($aktuelle_files_ar);
$count_a = $counted;
if($n <= $count_a)
{$n=0;}
$n_arch=3;
$i= $n;
while ($count_a > $i) {
$subnews[] = $aktuelle_files_ar[$i];
$i++;
$i2=$i;
if($n_arch+$n == $i){$i=$count_a;}
}
foreach($subnews as $anzeige){
$zaehlfile = fopen("$aktuellurl$steuerfiles$anzeige","r");
$inhalt_zaehlfile = fgets($zaehlfile);
fclose($zaehlfile);
$inhalt = explode('ä',$inhalt_zaehlfile);
$datum = $inhalt[0];
$datum_ag= strftime($domains[outform_time] , $datum);
$url = $inhalt[2];
$titel = $inhalt[3];
echo "<A HREF=\"$url\"><I><FONT SIZE=-1>$datum_ag: $titel</FONT></I></A><BR>";
}
echo"hallo";
if($i2 > ($domains[anz_headl]+$n_arch+1))
{
echo"<P><<< .... >>>";
}
}else{
echo "Leider sind zur Zeit keine News vorhanden.";
}
include("templates/p6.txt");
?>