strlen(strstr($HTTP_ACCEPT_LANGUAGE,"en"))) $lang="de"; // else $lang="en"; // } // else $lang="en"; //} ?>
de/nav.php"; include "de/nav.php"; //StofF: never include from URL-Paramter } else { echo "en/nav.php"; include "en/nav.php"; $lang= "en"; //fuer weiter unten, koennte auch n Angriff drinstehen } ?> 0) { if (4==strlen($date)){ if (1==chdir($lang."/".substr($date,0,2)."/".substr($date,2,2))){ $dir=opendir ('.'); while ($file = readdir ($dir)){ if($file != "." && $file != ".."){ if(substr($file,0,9).substr($file,11,4) == "diary".$date.".inc"){ //write all the nice little files into the array for later $dirlist[] = substr($file,5,6); } } } closedir($dir); chdir ("../../../"); echo "

Down in Down Under - Diary

"; $monthsde = array(1=>'Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'); $monthsen = array(1=>'January','February','March','April','May','June','July','August','September','October','November','December'); if ("en"==$lang) echo "
".$monthsen[(int)substr($date,2,2)]."
"; else echo "
".$monthsde[(int)substr($date,2,2)]."
"; //navigation //previous entry $month = substr($date,2,2); $year = substr($date,0,2); $foundit = 0; while (0==$foundit){ settype($year,"integer"); settype($month,"integer"); $month=$month-1; if (1>$month) { $year=$year-1; $month="12"; if (0>$year){ $year=99; } } settype($month,"string"); if (1==strlen($month)) $month = "0$month"; settype($year,"string"); if (1==strlen($year)) $year = "0$year"; //now there should be the month before //check with mindate if ($year > substr($mindate,0,2)){ if (1==chdir($lang."/".$year."/".$month)){ $foundit=1; $prev=$year.$month; chdir("../../../"); } else { $foundit=2; $prev=""; } } elseif (($year==substr($mindate,0,2)) && ($month>=substr($mindate,2,2))){ if (1==chdir($lang."/".$year."/".$month)){ $foundit=1; $prev=$year.$month; chdir("../../../"); } else { $foundit=2; $prev=""; } } else { $foundit=2; $prev=""; } } //next entry $month = substr($date,2,2); $year = substr($date,0,2); $foundit = 0; while (0==$foundit){ settype($year,"integer"); settype($month,"integer"); $month=$month+1; if (12<$month) { $year=$year+1; $month="1"; if (99<$year){ $year=0; } } settype($month,"string"); if (1==strlen($month)) $month = "0$month"; settype($year,"string"); if (1==strlen($year)) $year = "0$year"; //now there should be the month before //check with maxdate if ($year < substr($maxdate,0,2)){ if (1==chdir($lang."/".$year."/".$month)){ $foundit=1; $next=$year.$month; chdir("../../../"); } else { $foundit=2; $next=""; } } elseif (($year==substr($maxdate,0,2)) && ($month <= substr($maxdate,2,2))){ if (1==chdir($lang."/".$year."/".$month)){ $foundit=1; $next=$year.$month; chdir("../../../"); } else { $foundit=2; $next=""; } } else { $foundit=2; $next=""; } } echo "

"; if ("" != $prev){ if ("en" == $lang) echo " --- ".$monthsen[(int)substr($prev,2,2)]." --- | "; else echo " --- ".$monthsde[(int)substr($prev,2,2)]." --- | "; } if ($lang=="en") echo "table of content"; else echo "zum Verzeichnis"; if ("" != $next){ if ("en" == $lang) echo " | --- ".$monthsen[(int)substr($next,2,2)]." ---"; else echo " | --- ".$monthsde[(int)substr($next,2,2)]." ---"; } echo "

"; //sort the dirlist array before echo the several dates sort($dirlist); //do the several headers and links to the months' entries chdir($lang."/".substr($date,0,2)."/".substr($date,2,2)); for ($x=0;$x"); $end = strpos($buffer,""); $header = substr($buffer,$start+4,$end-($start+4)); $dispdate = $dirlist[$x]; echo "   --- $dispdate[4]$dispdate[5]/$dispdate[2]$dispdate[3]/$dispdate[0]$dispdate[1] - $header ---
"; } chdir ("../../../"); //display nav again underneath the whole shit echo "

"; if ("" != $prev){ if ("en" == $lang) echo " --- ".$monthsen[(int)substr($prev,2,2)]." --- | "; else echo " --- ".$monthsde[(int)substr($prev,2,2)]." --- | "; } if ($lang=="en") echo "table of content"; else echo "zum Verzeichnis"; if ("" != $next){ if ("en" == $lang) echo " | --- ".$monthsen[(int)substr($next,2,2)]." ---"; else echo " | --- ".$monthsde[(int)substr($next,2,2)]." ---"; } echo "

"; } } //display a day else if (6==strlen($date)) { echo "

Down in Down Under - Diary - $date[4]$date[5]/$date[2]$date[3]/$date[0]$date[1]

";?>

$day){ $month=$month-1; $day="31"; if (1>$month){ $year=$year-1; $month="12"; if (0>$year){ $year="99"; } } } settype($day,"string"); if (1==strlen($day)) $day = "0$day"; settype($month,"string"); if (1==strlen($month)) $month = "0$month"; settype($year,"string"); if (1==strlen($year)) $year = "0$year"; //now there should be the day before //check for text-entry if (1==chdir("$lang/$year/$month")){ $dir=opendir ('.'); while ($file = readdir ($dir)){ if($file == "diary$year$month$day.inc"){ $foundit = 1; $prev = "$year$month$day"; } elseif ($mindate > "$year$month$day"){ $foundit = 2; $prev = ""; } elseif ($maxdate < "$year$month$day"){ $foundit = 2; $prev = ""; } } closedir($dir); chdir ("../../../"); } elseif(1!=chdir("$lang/$year/$month")){ $foundit = 2; $prev = ""; } if (1 != $foundit){ if (1==chdir("common/images/$year/$month")){ $dir=opendir ('.'); while ($file = readdir ($dir)){ if ($file == "pics$year$month$day.inc"){ $foundit = 1; $prev = "$year$month$day"; } elseif ($mindate > "$year$month$day"){ $foundit = 2; $prev = ""; } elseif ($maxdate < "$year$month$day"){ $foundit = 2; $prev = ""; } } closedir($dir); chdir ("../../../../"); } elseif(1!=chdir("common/images/$year/$month")){ $foundit = 2; $prev = ""; } } } //next entry? $day = "$date[4]$date[5]"; $month = "$date[2]$date[3]"; $year = "$date[0]$date[1]"; $foundit = 0; while (0==$foundit){ settype($day,"integer"); settype($month,"integer"); settype($year,"integer"); $day=$day+1; if (31<$day){ $month=$month+1; $day="1"; if (12<$month){ $year=$year+1; $month="1"; if (99<$year){ $year="0"; } } } settype($day,"string"); if (1==strlen($day)) $day = "0$day"; settype($month,"string"); if (1==strlen($month)) $month = "0$month"; settype($year,"string"); if (1==strlen($year)) $year = "0$year"; //now there should be the day before //check for text-entry if (1==chdir("$lang/$year/$month")){ $dir=opendir ('.'); while ($file = readdir ($dir)){ if($file == "diary$year$month$day.inc"){ $foundit = 1; $next = "$year$month$day"; } elseif ($mindate > "$year$month$day"){ $foundit = 2; $next = ""; } elseif ($maxdate < "$year$month$day"){ $foundit = 2; $next = ""; } } closedir($dir); chdir ("../../../"); } elseif (1!=chdir("$lang/$year/$month")){ $foundit = 2; $next = ""; } if (1 != $foundit){ if (1==chdir("common/images/$year/$month")){ $dir=opendir ('.'); while ($file = readdir ($dir)){ if ($file == "pics$year$month$day.inc"){ $foundit = 1; $next = "$year$month$day"; } elseif ($mindate > "$year$month$day"){ $foundit = 2; $next = ""; } elseif ($maxdate < "$year$month$day"){ $foundit = 2; $next = ""; } } closedir($dir); chdir ("../../../../"); } elseif (1!=chdir("common/images/$year/$month")){ $foundit = 2; $next = ""; } } } if ("" != $prev) echo "---$prev[4]$prev[5]/$prev[2]$prev[3]/$prev[0]$prev[1]--- | "; if ($lang=="en") echo "table of content"; else echo "zum Verzeichnis"; if ("" != $next) echo " | ---$next[4]$next[5]/$next[2]$next[3]/$next[0]$next[1]---

"; //content //is there a text-include? if, then add it echo ""; $path="$lang/$date[0]$date[1]/$date[2]$date[3]"; if (1==chdir($path)){ $dir=opendir ('.'); while ($file = readdir ($dir)){ if($file == "diary$date.inc"){ include "$path/diary$date.inc"; } } closedir($dir); chdir ("../../../"); } //is there a pic-include? if, then add it $path="common/images/$date[0]$date[1]/$date[2]$date[3]"; if (1==chdir($path)){ $dir=opendir ('.'); while ($file = readdir ($dir)){ if($file == "pics$date.inc"){ include "$path/pics$date.inc"; $inctop = 1; } } closedir($dir); chdir ("../../../../"); //add the "to the top-link" if (1 == $inctop){ include "$lang/top.inc"; } } echo "
"; echo "
"; echo "

"; if ("" != $prev) echo "---$prev[4]$prev[5]/$prev[2]$prev[3]/$prev[0]$prev[1]--- | "; if ($lang=="en") echo "table of content"; else echo "zum Verzeichnis"; if ("" != $next) echo " | ---$next[4]$next[5]/$next[2]$next[3]/$next[0]$next[1]---

"; ?>