"; if ($infoprint) { $tmp = explode("/",$dir) ; $tmp2 = count($tmp)-1 ; $date = explode("-",$tmp[$tmp2]) ; $info = @file($dir."/info.txt") ; print "$date[2].$date[1].$date[0]".utf8_encode($info[0]).""; print "
"; } $d = dir($dir); while (false !== ($entry = $d->read())) { if (strlen($entry)>5 && $entry!="info.txt") { $tmp = explode("_",$entry) ; $i = $tmp[0] ; if ($detail = file($dir."/".$entry."/info.txt")) { #unset($link) ; $timer[$i] = trim($detail[0]) ; $details[$i] = "".trim($detail[1])."" ; if (trim($detail[2])) $details[$i] .= "
".trim($detail[2]) ; if (trim($detail[3])) $details[$i] .= "
".trim($detail[3]) ; if (trim($detail[4])) $details[$i] .= "
".trim($detail[4]) ; if (trim($detail[5])) $details[$i] .= "
".trim($detail[5]) ; if (is_file($dir."/".$entry."/Starterliste.pdf")) { $sact = date("d.m.Y H:i",filectime($dir."/".$entry."/Starterliste.pdf")) ; $link[$i] .= " "; } else $link[$i] .= " "; if (is_file($dir."/".$entry."/Parcour.pdf")) $link[$i] .= " "; else $link[$i] .= " "; if (is_file($dir."/".$entry."/Ergebnis.pdf")) $link[$i] .= "  "; else $link[$i] .= " "; } } } $d->close(); asort($timer) ; while (list($lauf,$zeit)=each($timer)) { print "$zeit Uhr$lauf".utf8_encode($details[$lauf])."$link[$lauf]"; } # print_r($timer) ; # print_r($details) ; print "
"; # print_r($link) ; } switch ($_SERVER["SCRIPT_URL"]) { case "/turnier-live/": { $d = dir($datdir); while (false !== ($entry = $d->read())) { if (strlen($entry)>5) $liste[] = $entry ; } $d->close(); # print_r($liste) ; rsort($liste) ; $subdir = $liste[0] ; if (!$info = file($datdir."/".$subdir."/info.txt")) die ("Noch keine Daten") ; print "

$info[0]

"; $count = count($info) ; for ($tc = 1; $tc<=$count ; $tc++) print trim(utf8_encode($info[$tc]))."
" ; $d2 = dir($datdir."/".$subdir); while (false !== ($entry = $d2->read())) { $daylist[] = $entry ; } $d2->close(); sort($daylist) ; foreach($daylist as $entry) { if (strlen($entry)>5 && $entry!="info.txt" ) { $testdat = explode("-",$entry) ; if ($testdat[1]) readday($datdir."/".$subdir."/".$entry,1) ; else { readday($datdir."/".$subdir,0) ; break ; } } } break ; } case "/turnier-archiv/": { print "

Turnierarchiv

"; if ($_GET["turnier"]) { print "zurück" ; $checker = explode(":",base64_decode($_GET["turnier"])) ; if (md5(substr($checker[0],0,30)."ug9fzi")!=$checker[1]) die ("sorry") ; $subdir=$checker[0] ; if (!$info = file($datdir."/".$subdir."/info.txt")) die ("Noch keine Daten") ; print "

$info[0]

"; $count = count($info) ; for ($tc = 1; $tc<=$count ; $tc++) print trim(utf8_encode($info[$tc]))."
" ; $d2 = dir($datdir."/".$subdir); while (false !== ($entry = $d2->read())) { if (strlen($entry)>5 && $entry!="info.txt" ) { $testdat = explode("-",$entry) ; if ($testdat[1]) readday($datdir."/".$subdir."/".$entry,1) ; else { readday($datdir."/".$subdir,0) ; break ; } } } $d2->close(); } else { $d = dir($datdir); while (false !== ($entry = $d->read())) { if (strlen($entry)>5) $liste[] = $entry ; } $d->close(); rsort($liste) ; unset($liste[0]) ; foreach ($liste as $leintrag) { $tmp = explode("_",$leintrag) ; $tmp2 = explode("-",$tmp[0]) ; $hashi = base64_encode($leintrag.":".md5(substr($leintrag,0,30)."ug9fzi")); print utf8_encode("\n

$tmp2[2].$tmp2[1].$tmp2[0] - $tmp[1]

") ; } } break; } default : print $_SERVER["SCRIPT_URL"] ; } ?>