<?
include("templates/drueber.inc.php");
$php = ".php";
$txt = ".txt";
$jetzt_unix = time();
$n = urlencode($HTTP_GET_VARS["n"]);
$n = 0;
$file_ext = '.txt';
$steuerfiles = "steuerfiles/";
###########################################
$folder = openDir($steuerfiles); // Ö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;
$n_arch=$domains[count_arch];
$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\" TARGET=\"_blank\"><I><FONT SIZE=-1>$datum_ag: $titel</FONT></I></A><BR>";
}
if($i2 > ($a+$n_arch))
{
$n_z= $n-$n_arch;
echo"<P><A HREF=\"archive.php?n=$n_z\"><<<.. </A>";
}else{
echo"<P><A HREF=\"../aktuell/\"> <<< ..</A>";
}
if($i2 < $counted )
{
$n_v= $n+$n_arch;
echo"<A HREF=\"archive.php?n=$i2\">..>>></A>";
}
}else{
echo "Leider sind zur Zeit keine News vorhanden.";
}
?>