Location: PHPKode > scripts > Opening hours > oeffnungszeiten2.0/scripte/Ampel.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">



 <meta name="content-language" content="de">


</head>



<body>
<?php


//----- EINSTELLUNGEN:---------------------------------------------------------------------
//----header('Content-Type: text/html; charset=iso-8859-15');

//-----Copyright Praxisampel: Christoph Schwarz,nebulanet-hide@address.com
//-----ueber eine kleine Spende wuerde ich mich freuen:
//-----https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7043154


//Montag-Sonntag:  Uhrzeit---------------------------------------------------------------------------------

$handle = fopen('scripte/texte/ampelwoche.txt', 'r');
  $ampelwoche = fread($handle,60) ;
  fclose($handle) ;


$uebersicht="

<a href=\"javascript:window.open('scripte/aufruf.php', 'woche',
 'width=370, height=200, directories=no, location=no, scrollbars=no,top=5px,left=300px,');void(0);\">
$ampelwoche 
</a> ";

$handle = fopen('scripte/texte/leerzeichen.txt', 'r');
  $leerzeichen = fread($handle,60) ;
  fclose($handle) ;






$handle = fopen('scripte/texte/geschlossen.txt', 'r');
  $geschlossen = fread($handle,15) ;
  fclose($handle) ;


$handle = fopen('scripte/montag/Praxisoeffnung.txt', 'r');
  $time1 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/montag/MittagspauseStart.txt', 'r');
$time2 = fread($handle,5) ;
  fclose($handle) ;
$handle = fopen('scripte/montag/MittagspauseEnde.txt', 'r');
 $time3 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/montag/Praxisgeschlossen.txt', 'r');
  $time4 = fread($handle,5) ;
  fclose($handle) ;
$handle = fopen('scripte/montag/MittagspauseStart.txt', 'r');
$montagpausenlos = fread($handle,2) ;
  fclose($handle) ;




$handle = fopen('scripte/dienstag/Praxisoeffnung.txt', 'r');
  $timed1 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/dienstag/MittagspauseStart.txt', 'r');
$timed2 = fread($handle,5) ;
  fclose($handle) ;
$handle = fopen('scripte/dienstag/MittagspauseEnde.txt', 'r');
 $timed3 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/dienstag/Praxisgeschlossen.txt', 'r');
  $timed4 = fread($handle,5) ;
  fclose($handle) ;
$handle = fopen('scripte/dienstag/MittagspauseStart.txt', 'r');
$dienstagpausenlos = fread($handle,2) ;
  fclose($handle) ;


$handle = fopen('scripte/mittwoch/Praxisoeffnung.txt', 'r');
  $timem1 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/mittwoch/MittagspauseStart.txt', 'r');
$timem2 = fread($handle,5) ;
  fclose($handle) ;
$handle = fopen('scripte/mittwoch/MittagspauseEnde.txt', 'r');
 $timem3 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/mittwoch/Praxisgeschlossen.txt', 'r');
  $timem4 = fread($handle,5) ;
  fclose($handle) ;
$handle = fopen('scripte/mittwoch/MittagspauseStart.txt', 'r');
$mittwochpausenlos = fread($handle,2) ;
  fclose($handle) ;



$handle = fopen('scripte/donnerstag/Praxisoeffnung.txt', 'r');
  $timedo1 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/donnerstag/MittagspauseStart.txt', 'r');
$timedo2 = fread($handle,5) ;
  fclose($handle) ;
$handle = fopen('scripte/donnerstag/MittagspauseEnde.txt', 'r');
 $timedo3 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/donnerstag/Praxisgeschlossen.txt', 'r');
  $timedo4 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/donnerstag/MittagspauseStart.txt', 'r');
$donnerstagpausenlos = fread($handle,2) ;
  fclose($handle) ;




$handle = fopen('scripte/freitag/Praxisoeffnung.txt', 'r');
  $timef1 = fread($handle,5) ;
fclose($handle) ;

$handle = fopen('scripte/freitag/MittagspauseStart.txt', 'r');
$timef2 = fread($handle,5) ;
  fclose($handle) ;
$handle = fopen('scripte/freitag/MittagspauseEnde.txt', 'r');
 $timef3 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/freitag/Praxisgeschlossen.txt', 'r');
  $timef4 = fread($handle,5) ;
  fclose($handle) ;
$handle = fopen('scripte/freitag/MittagspauseStart.txt', 'r');
$freitagpausenlos = fread($handle,2) ;
  fclose($handle) ;




$handle = fopen('scripte/samstag/Samstagoeffnung.txt', 'r');
  $times6 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/samstag/SamstagMittagspauseStart.txt', 'r');
$times7 = fread($handle,5) ;
  fclose($handle) ;
$handle = fopen('scripte/samstag/SamstagMittagspauseEnde.txt', 'r');
 $times8 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/samstag/Samstaggeschlossen.txt', 'r');
  $times9= fread($handle,5) ;
  fclose($handle) ;


$handle = fopen('scripte/samstag/SamstagMittagspauseStart.txt', 'r');
$samstagpausenlos = fread($handle,2) ;
  fclose($handle) ;



$handle = fopen('scripte/sonntag/Praxisoeffnung.txt', 'r');
  $timeso1 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/sonntag/MittagspauseStart.txt', 'r');
$timeso2 = fread($handle,5) ;
  fclose($handle) ;
$handle = fopen('scripte/sonntag/MittagspauseEnde.txt', 'r');
 $timeso3 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/sonntag/Praxisgeschlossen.txt', 'r');
  $timeso4 = fread($handle,5) ;
  fclose($handle) ;

$handle = fopen('scripte/sonntag/MittagspauseStart.txt', 'r');
$sonntagpausenlos = fread($handle,2) ;
  fclose($handle) ;



//---Freitag/Samstag auf Montag

$handle = fopen('scripte/samstag/Samstagoeffnung.txt', 'r');
  $samstagzu = fread($handle,2) ;
  fclose($handle) ;

$handle = fopen('scripte/sonntag/Praxisoeffnung.txt', 'r');
  $sonntagzu = fread($handle,2) ;
  fclose($handle) ;


//-Berechnungswerte

$time1x=str_replace(":",".",$time1);
$time2x=str_replace(":",".",$time2);
$time3x=str_replace(":",".",$time3);
$time4x=str_replace(":",".",$time4);


$timed1x=str_replace(":",".",$timed1);
$timed2x=str_replace(":",".",$timed2);
$timed3x=str_replace(":",".",$timed3);
$timed4x=str_replace(":",".",$timed4);

$timem1x=str_replace(":",".",$timem1);
$timem2x=str_replace(":",".",$timem2);
$timem3x=str_replace(":",".",$timem3);
$timem4x=str_replace(":",".",$timem4);

$timedo1x=str_replace(":",".",$timedo1);
$timedo2x=str_replace(":",".",$timedo2);
$timedo3x=str_replace(":",".",$timedo3);
$timedo4x=str_replace(":",".",$timedo4);

$timef1x=str_replace(":",".",$timef1);
$timef2x=str_replace(":",".",$timef2);
$timef3x=str_replace(":",".",$timef3);
$timef4x=str_replace(":",".",$timef4);

$times6x=str_replace(":",".",$times6);
$times7x=str_replace(":",".",$times7);
$times8x=str_replace(":",".",$times8);
$times9x=str_replace(":",".",$times9);

$timeso1x=str_replace(":",".",$timeso1);
$timeso2x=str_replace(":",".",$timeso2);
$timeso3x=str_replace(":",".",$timeso3);
$timeso4x=str_replace(":",".",$timeso4);








// Urlaub-----------------------------------------------------------------------------------------------

$handle = fopen('scripte/texte/urlaubzum.txt', 'r');
  $urlaubzum = fread($handle,100) ;
  fclose($handle) ;



$handle = fopen('scripte/urlaub/Urlaubsstarttag.txt', 'r');
 $urlaubstarttag = fread($handle,2) ;
  fclose($handle) ;

$handle = fopen('scripte/urlaub/Urlaubsstartmonat.txt', 'r');
$urlaubstartmonat = fread($handle,2) ;
  fclose($handle) ;
$handle = fopen('scripte/urlaub/Urlaubsstartjahr.txt', 'r');
 $urlaubstartjahr = fread($handle,4) ;
  fclose($handle) ;


// Letzter Urlaubstag:

$handle = fopen('scripte/urlaub/Urlaubsendtag.txt', 'r');
$urlaubendetag = fread($handle,2) ;
  fclose($handle) ;

$handle = fopen('scripte/urlaub/Urlaubsendmonat.txt', 'r');
$urlaubendemonat = fread($handle,2) ;
  fclose($handle) ;
$handle = fopen('scripte/urlaub/Urlaubsendjahr.txt', 'r');
 $urlaubendejahr = fread($handle,4) ;
  fclose($handle) ;

$handle = fopen('scripte/texte/urlaubgeschlossen.txt', 'r');
  $urlaubgeschlossen = fread($handle,140) ;
  fclose($handle) ;

$handle = fopen('scripte/texte/urlaub.txt', 'r');
  $urlaub = fread($handle,140) ;
  fclose($handle) ;


$urlaub2="$urlaub  $urlaubstarttag.$urlaubstartmonat.$urlaubstartjahr
 $urlaubzum $urlaubendetag.$urlaubendemonat.$urlaubendejahr   $urlaubgeschlossen  ";





//Ende  Zeiteinstellung--------------------------------------------------------------------------------------Ende


//Montag bis Sonntag Texte---------------------------
// Satz Teil1
$handle = fopen('scripte/texte/Satz_Teil1.txt', 'r');
  $institution = fread($handle,100) ;
  fclose($handle) ;


// Satz Teil2 Sektion geschlossen
$handle = fopen('scripte/texte/Satz_Teil2_geschlossen1.txt', 'r');
  $einszwei1 = fread($handle,100) ;
  fclose($handle) ;


$handle = fopen('scripte/texte/Satz_Teil2_geschlossen_3.txt', 'r');
  $einszwei3 = fread($handle,100) ;
  fclose($handle) ;


$handle = fopen('scripte/texte/Satz_Teil2_geschlossen2.txt', 'r');
  $einszwei2 = fread($handle,100) ;
  fclose($handle) ;

// Satz Teil2 Sektion offen

$handle = fopen('scripte/texte/Satz_Teil2_wieder_offen1.txt', 'r');
  $frue2 = fread($handle,100) ;
  fclose($handle) ;


$handle = fopen('scripte/texte/Satz_Teil2_wieder_offen2.txt', 'r');
  $spaet2 = fread($handle,100) ;
  fclose($handle) ;


$handle = fopen('scripte/texte/Satz_Teil2_wieder_offen3.txt', 'r');
  $nacht2 = fread($handle,100) ;
  fclose($handle) ;


$handle = fopen('scripte/texte/Satz_Teil2_wieder_offen4.txt', 'r');
  $institution2 = fread($handle,100) ;
  fclose($handle) ;


$handle = fopen('scripte/texte/samstag.txt', 'r');
  $samstag = fread($handle,100) ;
  fclose($handle) ;
 

$handle = fopen('scripte/texte/sonntag.txt', 'r');
  $sonntag = fread($handle,100) ;
  fclose($handle) ;


$handle = fopen('scripte/texte/montag.txt', 'r');
  $montag = fread($handle,100) ;
  fclose($handle) ;


$handle = fopen('scripte/texte/dienstag.txt', 'r');
  $dienstag = fread($handle,100) ;
  fclose($handle) ;


$handle = fopen('scripte/texte/mittwoch.txt', 'r');
  $mittwoch = fread($handle,100) ;
  fclose($handle) ;


$handle = fopen('scripte/texte/donnerstag.txt', 'r');
  $donnerstag = fread($handle,100) ;
  fclose($handle) ;


$handle = fopen('scripte/texte/freitag.txt', 'r');
  $freitag = fread($handle,100) ;
  fclose($handle) ;


// Teil1 offen:



$handle = fopen('scripte/texte/Satz_Teil1_offen.txt', 'r');
  $geoeffnet = fread($handle,100) ;
  fclose($handle) ;


//Formatierung zweiter Satz
$handle = fopen('scripte/texte/format_Satz_Teil3.txt', 'r');
  $format = fread($handle,100) ;
  fclose($handle) ;


  $formatende ="</font>"  ;



$handle = fopen('scripte/texte/bis.txt', 'r');
  $bis = fread($handle,100) ;
  fclose($handle) ;


$handle = fopen('scripte/texte/uhr.txt', 'r');
  $Uhr = fread($handle,100) ;
  fclose($handle) ;








//Formatierung zweiter Satz
$handle = fopen('scripte/texte/trennzeichen.txt', 'r');
  $trennzeichen = fread($handle,10) ;
  fclose($handle) ;





// Montag
$TextFrueh="  $format $frue2 $time1 $bis $time2 $Uhr, $time3 $bis $time4 $Uhr </font>" ;
$Textspaet=" $format $spaet2 $time3 $bis $time4 $Uhr </font>";
$Textnacht=" $format $nacht2 $timed1 $bis $timed2 $Uhr, $timed3 $bis $timed4 $Uhr </font>";
$TextFrueh2="  $format $frue2 $time1  $bis $time4 $Uhr </font>" ;
$Textnacht2=" $format $nacht2 $timed1 $bis $timed4 $Uhr </font>";

// Dienstag
$TextFruehd="  $format $frue2: $timed1 $bis $timed2 $Uhr, $timed3 $bis $timed4 $Uhr </font>";
$Textspaetd=" $format $spaet2 $timed3 $bis $timed4 $Uhr </font>";
$Textnachtd=" $format $nacht2 $timem1 $bis $timem2 $Uhr, $timem3 $bis $timem4 $Uhr </font>";
$TextFruehd2="  $format $frue2: $timed1  $bis $timed4 $Uhr </font>";
$Textnachtd2=" $format $nacht2 $timem1 $bis  $timem4 $Uhr </font>";


// Mittwoch
$TextFruehm="  $format$frue2 $timem1 $bis $timem2 $Uhr, $timem3 $bis $timem4 $Uhr </font>";
$Textspaetm="  $format $spaet2 $timem3 $bis $timem4 $Uhr </font>";
$Textnachtm="  $format $nacht2 $timedo1 $bis $timedo2 $Uhr, $timedo3 $bis $timedo4 $Uhr </font>";
$TextFruehm2="  $format$frue2 $timem1 $bis  $timem4 $Uhr </font>";
$Textnachtm2="  $format $nacht2 $timedo1  $bis $timedo4 $Uhr </font>";


// Donnerstag
$TextFruehdo=" $format $frue2 $timedo1 $bis $timedo2 $Uhr, $timedo3 $bis $timedo4 $Uhr  </font>";
$Textspaetdo=" $format $spaet2 $timedo3 $bis $timedo4 $Uhr </font>";
$Textnachtdo=" $format $nacht2 $timef1 $bis $timef2 $Uhr, $timef3 $bis $timef4 $Uhr </font>";
$TextFruehdo2=" $format $frue2 $timedo1 $bis  $timedo4 $Uhr  </font>";
$Textnachtdo2=" $format $nacht2 $timef1  $bis $timef4 $Uhr </font>";





// Freitag
$TextFruehf=" $format $frue2 $timef1 $bis $timef2 $Uhr, $timef3 $bis $timef4 $Uhr </font>";
$Textspaetf="  $format $spaet2 $timef3 $bis $timef4 $Uhr </font>";
$Textnachtf=" $format $nacht2 $times6 $bis $times7 $Uhr, $times8 $bis $times9 $Uhr </font>";
$TextFruehf2=" $format $frue2 $timef1 $bis $timef4 $Uhr </font>";
$Textnachtf2=" $format $nacht2 $times6 $bis $times9 $Uhr </font>";


//Samstag

$TextSFrueh=" $format  $frue2  $times6 $bis $times7 $Uhr, $times8 $bis $times9 $Uhr  </font>" ;  
$TextSspaet=" $format  $spaet2  $times8 $bis $times9 $Uhr  </font> " ; 
$TextSnacht=" $format  $nacht2 $timeso1 $bis $timeso2 $Uhr, $timeso3 $bis $timeso4 $Uhr </font> " ; 
$TextSFrueh2=" $format  $frue2  $times6 $bis $times9 $Uhr  </font>" ;  
$TextSnacht2=" $format  $nacht2 $timeso1 $bis $timeso4 $Uhr </font> " ; 


// Sonntag
$TextFruehso=" $format $frue2 $timeso1 $bis $timeso2 $Uhr, $timeso3 $bis $timeso4 $Uhr </font>";
$Textspaetso="  $format $spaet2 $timeso3 $bis $timeso4 $Uhr </font>";
$Textnachtso=" $format $nacht2 $time1 $bis $time2 $Uhr, $time3 $bis $time4 $Uhr </font>";
$TextFruehso2=" $format $frue2 $timeso1  $bis $timeso4 $Uhr </font>";
$Textnachtso2=" $format $nacht2 $time1  $bis $time4 $Uhr </font>";

//Wochenende auf Montag

$Montag= "<table border=0><tr><td>$institution $einszwei1 - $format $Wochenende $time1 $bis $time2 $Uhr, $time3 $bis $time4 $Uhr </td></tr></table>";
$Montag2= "<table border=0><tr><td>$institution $einszwei1 - $format $Wochenende $time1  $bis $time4 $Uhr </td></tr></table>";

//Tage komplett geschlossen
$Textdosa1=" $format $samstag$trennzeichen $times6  $bis $times7 $Uhr, $times7  $bis $times8 $Uhr </font>";
$Textdosa2=" $format $samstag$trennzeichen $times6  $bis $times8 $Uhr </font>";
$Textdoso1=" $format $sonntag$trennzeichen $timeso1  $bis $timeso2 $Uhr, $timeso3  $bis $timeso4 $Uhr </font>";
$Textdoso2=" $format $sonntag$trennzeichen  $timeso1  $bis $timeso4 $Uhr </font>";
$Textdomo1=" $format $montag$trennzeichen $time1  $bis $time2 $Uhr, $time3  $bis $time4 $Uhr </font>";
$Textdomo2=" $format $montag$trennzeichen  $time1  $bis $time4 $Uhr </font>";
$Textdodi1=" $format $dienstag$trennzeichen  $timed1  $bis $timed2 $Uhr, $timed3  $bis $timed4 $Uhr </font>";
$Textdodi2=" $format $dienstag$trennzeichen $timed1  $bis $timed4 $Uhr </font>";
$Textdomi1=" $format $mittwoch$trennzeichen  $timem1  $bis $timem2 $Uhr, $timem3  $bis $timem4 $Uhr </font>";
$Textdomi2=" $format $mittwoch$trennzeichen   $timem1  $bis $timem4 $Uhr </font>";
$Textdodo1=" $format $donnerstag$trennzeichen  $timedo1  $bis $timedo2 $Uhr, $timedo3  $bis $timedo4 $Uhr </font>";
$Textdodo2=" $format $donnerstag$trennzeichen   $timedo1  $bis $timedo4 $Uhr </font>";
$Textdofr1=" $format $freitag$trennzeichen  $timef1  $bis $timef2 $Uhr, $timef3  $bis $timef4 $Uhr </font>";
$Textdofr2=" $format $freitag$trennzeichen   $timef1  $bis $timef4 $Uhr </font>";


 //Montag
$zu1= "<table border=0><tr><td>$institution $einszwei1 - $TextFrueh $leerzeichen $uebersicht</td></tr></table>";

$zu2= "<table  border=0><tr><td>$institution $einszwei2 - $Textspaet $leerzeichen $uebersicht</td></tr></table>";

$zu3= "<table  border=0><tr><td >$institution $einszwei3 - $Textnacht $leerzeichen $uebersicht</td></tr></table>";

$zu4= "<table border=0><tr><td>$institution $einszwei1 - $TextFrueh2 $leerzeichen $uebersicht</td></tr></table>";
$zu5= "<table  border=0><tr><td >$institution $einszwei3 - $Textnacht2 $leerzeichen $uebersicht</td></tr></table>";

// Dienstag

$zu1d= "<table border=0><tr><td>$institution $einszwei1 - $TextFruehd $leerzeichen $uebersicht</td></tr></table>";

$zu2d= "<table  border=0><tr><td>$institution $einszwei2 - $Textspaetd $leerzeichen $uebersicht</td></tr></table>";

$zu3d= "<table  border=0><tr><td >$institution $einszwei3 - $Textnachtd $leerzeichen $uebersicht</td></tr></table>";


$zu4d= "<table border=0><tr><td>$institution $einszwei1 - $TextFruehd2 $leerzeichen $uebersicht</td></tr></table>";
$zu5d= "<table  border=0><tr><td >$institution $einszwei3 - $Textnachtd2 $leerzeichen $uebersicht</td></tr></table>";

// Mittwoch
$zu1m= "<table border=0><tr><td>$institution $einszwei1  $TextFruehm $leerzeichen $uebersicht</td></tr></table>";

$zu2m= "<table  border=0><tr><td>$institution  $einszwei2   $Textspaetm $leerzeichen $uebersicht</td></tr></table>";

$zu3m= "<table  border=0><tr><td >$institution $einszwei3  $Textnachtm $leerzeichen $uebersicht</td></tr></table>";


$zu4m= "<table border=0><tr><td>$institution $einszwei1  $TextFruehm2 $leerzeichen $uebersicht</td></tr></table>";
$zu5m= "<table  border=0><tr><td >$institution $einszwei3  $Textnachtm2 $leerzeichen $uebersicht</td></tr></table>";

// Donnerstag
$zu1do= "<table border=0><tr><td>$institution $einszwei1 - $TextFruehdo $leerzeichen $uebersicht</td></tr></table>";

$zu2do= "<table  border=0><tr><td>$institution $einszwei2 - $Textspaetdo $leerzeichen $uebersicht</td></tr></table>";

$zu3do= "<table  border=0><tr><td >$institution $einszwei3 - $Textnachtdo $leerzeichen $uebersicht</td></tr></table>";


$zu4do= "<table border=0><tr><td>$institution2 $einszwei1 - $TextFruehdo2 $leerzeichen $uebersicht</td></tr></table>";
$zu5do= "<table  border=0><tr><td >$institution2 $einszwei3 - $Textnachtdo2 $leerzeichen $uebersicht</td></tr></table>";


// Freitag
$zu1f= "<table border=0><tr><td>$institution $einszwei1 - $TextFruehf $leerzeichen $uebersicht</td></tr></table>";

$zu2f= "<table  border=0><tr><td>$institution $einszwei2 - $Textspaetf $leerzeichen $uebersicht</td></tr></table>";

$zu3f= "<table  border=0><tr><td >$institution $einszwei3 - $Textnachtf $leerzeichen $uebersicht</td></tr></table>";

$zu9= "<table  border=0><tr><td>$institution $einszwei3 - $Textnachtfreitag $leerzeichen $uebersicht</td></tr></table>";


$zu4f= "<table border=0><tr><td>$institution $einszwei1 - $TextFruehf2 $leerzeichen $uebersicht</td></tr></table>";
$zu5f= "<table  border=0><tr><td >$institution $einszwei3 - $Textnachtf2 $leerzeichen $uebersicht</td></tr></table>";


//Samstag Texte---------------------------------------
$zu3s= "<table  border=0><tr><td>$institution $einszwei1  $TextSFrueh $leerzeichen $uebersicht</td></tr></table>";
$zu2s= "<table  border=0><tr><td>$institution $einszwei3  $TextSspaet $leerzeichen $uebersicht</td></tr></table>";
$zu1s= "<table  border=0><tr><td>$institution $einszwei2  $TextSnacht $leerzeichen $uebersicht</td></tr></table>";

$zu4s= "<table  border=0><tr><td>$institution $einszwei1  $TextSFrueh2 $leerzeichen $uebersicht</td></tr></table>";
$zu5s= "<table  border=0><tr><td>$institution $einszwei2  $TextSnacht2 $leerzeichen $uebersicht</td></tr></table>";


// Sonntag
 $zu1so= "<table border=0><tr><td>$institution $einszwei1 - $TextFruehso $leerzeichen $uebersicht</td></tr></table>";

 $zu2so= "<table  border=0><tr><td>$institution $einszwei2 - $Textspaetso $leerzeichen $uebersicht</td></tr></table>";

 $zu3so= "<table  border=0><tr><td >$institution $einszwei3 - $Textnachtso $leerzeichen $uebersicht</td></tr></table>";

 
$zu4so= "<table border=0><tr><td>$institution $einszwei1 - $TextFruehso2 $leerzeichen $uebersicht</td></tr></table>";
 $zu5so= "<table  border=0><tr><td >$institution $einszwei3 - $Textnachtso2 $leerzeichen $uebersicht</td></tr></table>";

// Tage komplett geschlossen
$zudodo1= "<table border=0><tr><td>$institution $einszwei3 -   $institution2   $Textdodo1 $leerzeichen $uebersicht</td></tr></table>";
$zudodo2= "<table  border=0><tr><td >$institution $einszwei3 -   $institution2   $Textdodo2 $leerzeichen $uebersicht</td></tr></table>";
$zudofr1= "<table border=0><tr><td>$institution $einszwei3 -    $institution2  $Textdofr1  $leerzeichen $uebersicht</td></tr></table>";
$zudofr2= "<table  border=0><tr><td >$institution $einszwei3 -   $institution2  $Textdofr2  $leerzeichen $uebersicht</td></tr></table>";
$zudosa1= "<table border=0><tr><td>$institution $einszwei3 -  $institution2  $Textdosa1 $leerzeichen $uebersicht</td></tr></table>";
$zudosa2= "<table  border=0><tr><td >$institution $einszwei3 -   $institution2  $Textdosa2 $leerzeichen $uebersicht</td></tr></table>";


$zudoso1= "<table border=0><tr><td>  $institution $einszwei3 -    $institution2  $Textdoso1  $leerzeichen $uebersicht</td></tr></table>";
$zudoso2= "<table  border=0><tr><td >$institution $einszwei3 -   $institution2  $Textdoso2  $leerzeichen $uebersicht</td></tr></table>";

$zudomo1= "<table border=0><tr><td>$institution $einszwei3 -   $institution2  $Textdomo1 $leerzeichen $uebersicht</td></tr></table>";
$zudomo2= "<table  border=0><tr><td >$institution $einszwei3 -   $institution2  $Textdomo2 $leerzeichen $uebersicht</td></tr></table>";
$zudodi1= "  <table border=0><tr><td>$institution $einszwei3 -   $institution2  $Textdodi1 $leerzeichen $uebersicht</td></tr></table>";
$zudodi2= "  <table  border=0><tr><td >$institution $einszwei3 -   $institution2  $Textdodi2 $leerzeichen $uebersicht</td></tr></table>";
$zudomi1= " <table border=0><tr><td>$institution $einszwei3 -   $institution2  $Textdomi1 $leerzeichen $uebersicht</td></tr></table>";
$zudomi2= " <table  border=0><tr><td >$institution $einszwei3 -   $institution2 $Textdomi2 $leerzeichen $uebersicht</td></tr></table>";


// 2ter Teil erster Satz:
$offen1= "<table  border=0><tr><td>$institution <b> $geoeffnet $leerzeichen $uebersicht</td></tr></table>";

$offen2= "<table  border=0><tr><td>$institution $geoeffnet $leerzeichen $uebersicht</td></tr></table>";











// Ampeldeaktivierungstext:



$handle = fopen('scripte/texte/deaktivierungoffen.txt', 'r');
  $text2 = fread($handle,100) ;
  fclose($handle) ;
$handle = fopen('scripte/texte/deaktivierungzu.txt', 'r');
  $text = fread($handle,100) ;
  fclose($handle) ;


// Ende Konfiguration!!!!!!!!







// Funktion zur Deaktivierung der Ampel

$handle = fopen('scripte/schalter/schalter.txt', 'r');
  $ge1 = fread($handle,8) ;
   fclose($handle) ;
//Status: offen=0, geschlossen=1  $ge1






//Die Funktion unterteilt nach Wochentagen und der Uhrzeit

//Variablen

$Tag = date("d");
$Monat = date("m");
$Jahr= date("Y");
$Datum = date("r");
$time = date("H.i"); 
$d = date("D");date("G");date("r");

switch ($d)
{



case $ge1 == 1:

echo ("$text");

break;

case $ge1 == 2:

echo ("$text2");

break;



case  $urlaubendejahr > $Jahr: 
echo ("$urlaub2");
break;


case  $urlaubendejahr == $Jahr and 
 $urlaubendemonat > $Monat:
echo ("$urlaub2");
break;



case  $urlaubendejahr == $Jahr 
and $urlaubendemonat == $Monat and
$urlaubendetag > $Tag:
echo ("$urlaub2 ");
break;







case Mon:
// Abfrage montag geschlossen gesetzt und div. folgende Tage auch
if ($time1x == $geschlossen  and  $timed1x == $geschlossen  and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso2x == $geschlossen ) echo ("$zudoso2");
else
if ($time1x == $geschlossen  and  $timed1x == $geschlossen  and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times6 == $geschlossen) echo ("$zudoso1");
else
if ($time1x == $geschlossen  and  $timed1x == $geschlossen  and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times7 == $geschlossen ) echo ("$zudosa2");
else
if ($time1x == $geschlossen  and $timed1x== $geschlossen  and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef1x == $geschlossen ) echo ("$zudosa1");
else
if ($time1x == $geschlossen  and   $timed1x == $geschlossen  and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef2x == $geschlossen ) echo ("$zudofr2");
else
if ($time1x == $geschlossen  and  $timed1x == $geschlossen  and $timem1x == $geschlossen and $timedo1x == $geschlossen ) echo ("$zudofr1");
else
if ($time1x == $geschlossen  and  $timed1x == $geschlossen  and $timem1x == $geschlossen and $timedo2x == $geschlossen ) echo ("$zudodo2");
else
if ($time1x == $geschlossen  and  $timed1x == $geschlossen and $timem1x == $geschlossen  ) echo ("$zudodo1");
else
if ($time1x == $geschlossen  and  $timed1x == $geschlossen and $timem2x == $geschlossen ) echo ("$zudomi2");
else
if  ($time1x == $geschlossen  and $timed1x == $geschlossen  ) echo ("$zudomi1");
else
if ($time1x ==  $geschlossen and $timed2x == $geschlossen)  echo ("$zudodi2");
else
if ($time1x ==  $geschlossen )  echo ("$zudodi1");
else



// Abfrage Montag geschlossen(Uhrzeit4) und div. folgende Tage auch
if ($time>= $time4x  and  $timed1x == $geschlossen  and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso2x == $geschlossen ) echo ("$zudoso2");
else
if ($time>= $time4x   and  $timed1x == $geschlossen  and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times6 == $geschlossen) echo ("$zudoso1");
else
if ($time>= $time4x   and  $timed1x == $geschlossen  and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times7 == $geschlossen ) echo ("$zudosa2");
else
if ($time>= $time4x   and $timed1x== $geschlossen  and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef1x == $geschlossen ) echo ("$zudosa1");
else
if ($time>= $time4x   and   $timed1x == $geschlossen  and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef2x == $geschlossen ) echo ("$zudofr2");
else
if ($time>= $time4x   and  $timed1x == $geschlossen  and $timem1x == $geschlossen and $timedo1x == $geschlossen ) echo ("$zudofr1");
else
if ($time>= $time4x   and  $timed1x == $geschlossen  and $timem1x == $geschlossen and $timedo2x == $geschlossen ) echo ("$zudodo2");
else
if ($time>= $time4x   and  $timed1x == $geschlossen and $timem1x == $geschlossen  ) echo ("$zudodo1");
else
if ($time>= $time4x   and  $timed1x == $geschlossen and $timem2x == $geschlossen ) echo ("$zudomi2");
else
if  ($time>= $time4x   and $timed1x == $geschlossen  ) echo ("$zudomi1");
else

//Abfrage der 4 Uhrzeiten


if ($timed2x == $geschlossen and $time>= $time4x) echo ("$zu5");
else
 if ($time>= $time4x) echo ("$zu3");
else
if ($time2x == $geschlossen and $time < $time1x)  echo ("$zu4");
else
if ($time < $time1x) echo ("$zu1");
else
 if ($time< $time2x  and $time2x != $geschlossen and $time < $time4x )  echo ("$offen1");
else
 if ($time< $time3x and $time2x != $geschlossen)echo ("$zu2");
else
 if ($time < $time4x) echo ("$offen2");



break;




case Tue:

if ($timed1x == $geschlossen  and  $timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso1x == $geschlossen and $time2x == $geschlossen ) echo ("$zudomo2");
else
if ($timed1x == $geschlossen  and  $timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso1x == $geschlossen) echo ("$zudomo1");
else
if ($timed1x == $geschlossen  and  $timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso2x == $geschlossen ) echo ("$zudoso2");
else
if ($timed1x == $geschlossen  and $timem1x== $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times6 == $geschlossen ) echo ("$zudoso1");
else
if ($timed1x == $geschlossen  and   $timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times7 == $geschlossen ) echo ("$zudosa2");
else
if ($timed1x == $geschlossen  and  $timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen ) echo ("$zudosa1");
else
if ($timed1x == $geschlossen  and  $timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef2x == $geschlossen ) echo ("$zudofr2");
else
if ($timed1x == $geschlossen  and  $timem1x == $geschlossen and $timedo1x == $geschlossen  ) echo ("$zudofr1");
else
if ($timed1x == $geschlossen  and  $timem1x == $geschlossen and $timedo2x == $geschlossen ) echo ("$zudodo2");
else
if  ($timed1x == $geschlossen  and $timem1x == $geschlossen  ) echo ("$zudodo1");
else

if ($timed1x ==  $geschlossen and $timem2x ==$geschlossen)  echo ("$zudomi2");
else
if ($timed1x ==  $geschlossen )  echo ("$zudomi1");
else


if ($time >= $timed4x  and  $timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso1x == $geschlossen and $time2x == $geschlossen ) echo ("$zudomo2");
else
if ($time >= $timed4x  and  $timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso1x == $geschlossen) echo ("$zudomo1");
else
if ($time >= $timed4x  and  $timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso2x == $geschlossen ) echo ("$zudoso2");
else
if ($time >= $timed4x  and $timem1x== $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times6 == $geschlossen ) echo ("$zudoso1");
else
if ($time >= $timed4x  and   $timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times7 == $geschlossen ) echo ("$zudosa2");
else
if ($time >= $timed4x  and  $timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen ) echo ("$zudosa1");
else
if ($time >= $timed4x  and  $timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef2x == $geschlossen ) echo ("$zudofr2");
else
if ($time >= $timed4x  and  $timem1x == $geschlossen and $timedo1x == $geschlossen  ) echo ("$zudofr1");
else
if ($time >= $timed4x  and  $timem1x == $geschlossen and $timedo2x == $geschlossen ) echo ("$zudodo2");
else
if  ($time >= $timed4x  and $timem1x == $geschlossen  ) echo ("$zudodo1");
else



if ($timem2x == $geschlossen and $time>= $timed4x) echo ("$zu5d");
else
if ($time>= $timed4x) echo ("$zu3d");
else
if ($timed2x == $geschlossen and $time< $timed1x) echo ("$zu4d");
else
if ($time< $timed1x)echo ("$zu1d");
else
if ($time< $timed2x  and $timed2x != $geschlossen and $time < $timed4x)  echo ("$offen1");
else
if ($time < $timed3x and $timed2x != $geschlossen) echo ("$zu2d");
else
if ($time< $timed4x) echo ("$offen2");

break;




case Wed:

if ($timem1x == $geschlossen  and $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso1x == $geschlossen and $time1x == $geschlossen and $timed2x == $geschlossen ) echo ("$zudodi2");
else
if ($timem1x == $geschlossen  and $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso1x == $geschlossen and $time1x == $geschlossen) echo ("$zudodi1");
else
if ($timem1x == $geschlossen  and $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso1x == $geschlossen and $time2x == $geschlossen ) echo ("$zudomo2");
else
if ($timem1x == $geschlossen  and $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso1x == $geschlossen ) echo ("$zudomo1");
else
if ($timem1x == $geschlossen  and  $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso2x == $geschlossen ) echo ("$zudoso2");
else
if ($timem1x == $geschlossen  and $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen ) echo ("$zudoso1");
else
if ($timem1x == $geschlossen  and $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times7 == $geschlossen ) echo ("$zudosa2");
else
if ($timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef1x == $geschlossen  ) echo ("$zudosa1");
else
if ($timem1x == $geschlossen  and $timedo1x == $geschlossen and $timef2x == $geschlossen ) echo ("$zudofr2");
else
if ($timem1x == $geschlossen  and $timedo1x == $geschlossen  ) echo ("$zudofr1");
else

if ($timem1x ==  $geschlossen and $timedo2x ==$geschlossen)  echo ("$zudodo2");
else
if ($timem1x ==  $geschlossen )  echo ("$zudodo1");
else



if ($time >= $timem4x  and $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso1x == $geschlossen and $time1x == $geschlossen and $timed2x == $geschlossen ) echo ("$zudodi2");
else
if ($time >= $timem4x  and $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso1x == $geschlossen and $time1x == $geschlossen) echo ("$zudodi1");
else
if ($time >= $timem4x  and $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso1x == $geschlossen and $time2x == $geschlossen ) echo ("$zudomo2");
else
if ($time >= $timem4x  and $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso1x == $geschlossen ) echo ("$zudomo1");
else
if ($time >= $timem4x  and  $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen and $timeso2x == $geschlossen ) echo ("$zudoso2");
else
if ($time >= $timem4x  and $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen ) echo ("$zudoso1");
else
if ($time >= $timem4x  and $timedo1x == $geschlossen  and $timef1x == $geschlossen and $times7 == $geschlossen ) echo ("$zudosa2");
else
if ($time >= $timem4x  and $timedo1x == $geschlossen and $timef1x == $geschlossen  ) echo ("$zudosa1");
else
if ($time >= $timem4x  and $timedo1x == $geschlossen and $timef2x == $geschlossen ) echo ("$zudofr2");
else
if ($time >= $timem4x  and $timedo1x == $geschlossen  ) echo ("$zudofr1");
else



if ($timedo2x == $geschlossen and $time>= $timem4x) echo ("$zu5m");
else
if ($time>= $timem4x) echo ("$zu3m");
else
if ($timem2x == $geschlossen and $time < $timem1x) echo ("$zu4m");
else
if ($time < $timem1x) echo ("$zu1m");
else
if ($time < $timem2x and $timem2x != $geschlossen and $time < $timem4x)  echo ("$offen1");
else
if ($time < $timem3x and $timem2x != $geschlossen) echo ("$zu2m");
else
if ($time < $timem4x) echo ("$offen2");

break;




case Thu:


if ($timedo1x == $geschlossen  and $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed1x == $geschlossen and $timem2x == $geschlossen ) echo ("$zudomi2");
else
if ($timedo1x == $geschlossen  and $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed1x == $geschlossen) echo ("$zudomi1");
else
if ($timedo1x == $geschlossen  and $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed2x == $geschlossen ) echo ("$zudodi2");
else
if ($timedo1x == $geschlossen  and $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen and $time1x == $geschlossen ) echo ("$zudodi1");
else
if ($timedo1x == $geschlossen  and  $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen and $time2x == $geschlossen ) echo ("$zudomo2");
else
if ($timedo1x == $geschlossen  and $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen ) echo ("$zudomo1");
else
if ($timedo1x == $geschlossen  and $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso2 == $geschlossen ) echo ("$zudoso2");
else
if ($timedo1x == $geschlossen  and $timef1x == $geschlossen and $times6 == $geschlossen  ) echo ("$zudoso1");
else
if ($timedo1x == $geschlossen  and  $timef1x == $geschlossen and $times7 == $geschlossen ) echo ("$zudosa2");
else
if  ($timedo1x == $geschlossen  and $timef1x == $geschlossen  ) echo ("$zudosa1");
else


if ($timedo1x ==  $geschlossen and  $timef2x == $geschlossen)  echo ("$zudofr2");
else
if ($timedo1x ==  $geschlossen )  echo ("$zudofr1");
else

if ($time >= $timedo4x  and $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed1x == $geschlossen and $timem2x == $geschlossen ) echo ("$zudomi2");
else
if ($time >= $timedo4x  and $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed1x == $geschlossen) echo ("$zudomi1");
else
if ($time >= $timedo4x  and $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed2x == $geschlossen ) echo ("$zudodi2");
else
if ($time >= $timedo4x  and $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen and $time1x == $geschlossen ) echo ("$zudodi1");
else
if ($time >= $timedo4x  and  $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen and $time2x == $geschlossen ) echo ("$zudomo2");
else
if ($time >= $timedo4x  and $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen ) echo ("$zudomo1");
else
if ($time >= $timedo4x  and $timef1x == $geschlossen  and $times6 == $geschlossen and $timeso2 == $geschlossen ) echo ("$zudoso2");
else
if ($time >= $timedo4x  and $timef1x == $geschlossen and $times6 == $geschlossen  ) echo ("$zudoso1");
else
if ($time >= $timedo4x  and  $timef1x == $geschlossen and $times7 == $geschlossen ) echo ("$zudosa2");
else
if  ($time >= $timedo4x  and $timef1x == $geschlossen  ) echo ("$zudosa1");
else



if ($timef2x == $geschlossen and $time>= $timedo4x) echo ("$zu5do");
else
if ($time>= $timedo4x) echo ("$zu3do");
else
if ($timedo2x ==  $geschlossen and $time < $timedo1x) echo ("$zu4do");
else
if ($time < $timedo1x) echo ("$zu1do");
else
if ($time < $timedo2x and $timedo2x != $geschlossen and $time < $timedo4x)  echo ("$offen1");
else
if ($time< $timedo3x and $timedo2x != $geschlossen) echo ("$zu2do");
else
if ($time < $timedo4x) echo ("$offen2");

break;


case Fri:

if ($timef1x == $geschlossen  and $times6 == $geschlossen  and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo2x == $geschlossen ) echo ("$zudodo2");
else
if ($timef1x == $geschlossen  and $times6 == $geschlossen  and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed1x == $geschlossen and $timem1x == $geschlossen) echo ("$zudodo1");
else
if ($timef1x == $geschlossen  and $times6 == $geschlossen  and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed1x == $geschlossen and $timem2x == $geschlossen ) echo ("$zudomi2");
else
if ($timef1x == $geschlossen  and $times6 == $geschlossen  and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed1x == $geschlossen ) echo ("$zudomi1");
else
if ($timef1x == $geschlossen  and  $times6 == $geschlossen  and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed2x == $geschlossen ) echo ("$zudodi2");
else
if ($timef1x == $geschlossen  and $times6 == $geschlossen  and $timeso1 == $geschlossen and $time1x == $geschlossen ) echo ("$zudodi1");
else
if ($timef1x == $geschlossen  and $times6 == $geschlossen  and $timeso1 == $geschlossen and $time2x == $geschlossen ) echo ("$zudomo2");
else
if ($timef1x == $geschlossen  and $times6 == $geschlossen and $timeso1 == $geschlossen  ) echo ("$zudomo1");
else
if ($timef1x == $geschlossen  and  $times6 == $geschlossen and $timeso2 == $geschlossen ) echo ("$zudoso2");
else
if  ($timef1x == $geschlossen  and $times6 == $geschlossen  ) echo ("$zudoso1");
else

if ($timef1x ==  $geschlossen and  $times7x == $geschlossen)  echo ("$zudosa2");
else
if ($timef1x ==  $geschlossen )  echo ("$zudosa1");
else

if ($time >= $timef4x  and $times6 == $geschlossen  and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo2x == $geschlossen ) echo ("$zudodo2");
else
if ($time >= $timef4x  and $times6 == $geschlossen  and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed1x == $geschlossen and $timem1x == $geschlossen) echo ("$zudodo1");
else
if ($time >= $timef4x  and $times6 == $geschlossen  and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed1x == $geschlossen and $timem2x == $geschlossen ) echo ("$zudomi2");
else
if ($time >= $timef4x   and $times6 == $geschlossen  and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed1x == $geschlossen ) echo ("$zudomi1");
else
if ($time >= $timef4x   and  $times6 == $geschlossen  and $timeso1 == $geschlossen and $time1x == $geschlossen and $timed2x == $geschlossen ) echo ("$zudodi2");
else
if ($time >= $timef4x   and $times6 == $geschlossen  and $timeso1 == $geschlossen and $time1x == $geschlossen ) echo ("$zudodi1");
else
if ($time >= $timef4x   and $times6 == $geschlossen  and $timeso1 == $geschlossen and $time2x == $geschlossen ) echo ("$zudomo2");
else
if ($time >= $timef4x   and $times6 == $geschlossen and $timeso1 == $geschlossen  ) echo ("$zudomo1");
else
if ($time >= $timef4x   and  $times6 == $geschlossen and $timeso2 == $geschlossen ) echo ("$zudoso2");
else
if  ($time >=  $timef4x   and $times6 == $geschlossen  ) echo ("$zudoso1");
else




if ($times7 == $geschlossen and $time>= $timef4x) echo ("$zu5f");
else
if ($time>= $timef4x) echo ("$zu3f");
else
if ($timef2x == $geschlossen and $time < $timef1x) echo ("$zu4f");
else
if ($time < $timef1x) echo ("$zu1f");
else
if ($time < $timef2x and $timef2x != $geschlossen and $time < $timef4x  )  echo ("$offen1");
else
if ($time< $timef3x and $timef2x != $geschlossen) echo ("$zu2f");
else
if ($time < $timef4x) echo ("$offen2");
else
if ($samstagzu == $geschlossen and $montagpausenlos ==$geschlossen)  echo  ("$Montag2");
else
if ($samstagzu == $geschlossen)  echo  ("$Montag");

break;



case Sat:
if ($times6 == $geschlossen  and   $timeso1x == $geschlossen  and $time1x == $geschlossen and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef2x == $geschlossen ) echo ("$zudofr2");
else
if ($times6 == $geschlossen  and  $timeso1x == $geschlossen  and $time1x == $geschlossen and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo1x == $geschlossen) echo ("$zudofr1");
else
if ($times6 == $geschlossen  and  $timeso1x == $geschlossen  and $time1x == $geschlossen and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo2x == $geschlossen ) echo ("$zudodo2");
else
if ($times6 == $geschlossen  and $timeso1x== $geschlossen  and $time1x == $geschlossen and $timed1x == $geschlossen and $timem1x == $geschlossen ) echo ("$zudodo1");
else
if ($times6 == $geschlossen  and   $timeso1x == $geschlossen  and $time1x == $geschlossen and $timed1x == $geschlossen and $timem2x == $geschlossen ) echo ("$zudomi2");
else
if ($times6 == $geschlossen  and  $timeso1x == $geschlossen  and $time1x == $geschlossen and $timed1x == $geschlossen ) echo ("$zudomi1");
else
if ($times6 == $geschlossen  and  $timeso1x == $geschlossen  and $time1x == $geschlossen and $timed2x == $geschlossen ) echo ("$zudodi2");
else
if ($times6 == $geschlossen  and  $timeso1x == $geschlossen and $time1x == $geschlossen  ) echo ("$zudodi1");
else
if ($times6 == $geschlossen  and  $timeso1x == $geschlossen and $time2x == $geschlossen ) echo ("$zudomo2");
else
if  ($times6 == $geschlossen  and $timeso1x == $geschlossen  ) echo ("$zudomo1");
else

if ($times6 == $geschlossen and $timeso2x == $geschlossen)  echo  ("$zudoso2");
else
if ($times6 == $geschlossen)  echo  ("$zudoso1");
else



if ($time >=$times9  and   $timeso1x == $geschlossen  and $time1x == $geschlossen and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef2x == $geschlossen ) echo ("$zudofr2");
else
if ($time >=$times9  and  $timeso1x == $geschlossen  and $time1x == $geschlossen and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo1x == $geschlossen) echo ("$zudofr1");
else
if ($time >=$times9  and  $timeso1x == $geschlossen  and $time1x == $geschlossen and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo2x == $geschlossen ) echo ("$zudodo2");
else
if ($time >=$times9  and  $timeso1x== $geschlossen  and $time1x == $geschlossen and $timed1x == $geschlossen and $timem1x == $geschlossen ) echo ("$zudodo1");
else
if ($time >=$times9  and  $timeso1x == $geschlossen  and $time1x == $geschlossen and $timed1x == $geschlossen and $timem2x == $geschlossen ) echo ("$zudomi2");
else
if ($time >=$times9  and  $timeso1x == $geschlossen  and $time1x == $geschlossen and $timed1x == $geschlossen ) echo ("$zudomi1");
else
if ($time >=$times9  and  $timeso1x == $geschlossen  and $time1x == $geschlossen and $timed2x == $geschlossen ) echo ("$zudodi2");
else
if ($time >=$times9  and  $timeso1x == $geschlossen and $time1x == $geschlossen  ) echo ("$zudodi1");
else
if ($time >=$times9  and   $timeso1x == $geschlossen and $time2x == $geschlossen ) echo ("$zudomo2");
else
if  ($time >=$times9  and  $timeso1x == $geschlossen  ) echo ("$zudomo1");
else





if ($timeso2x == $geschlossen and $time >= $times9x) echo ("$zu5s");
else
if ($time >= $times9x) echo ("$zu3s");
else
if ($times7x == $geschlossen and $time < $times6x) echo ("$zu4s");
else
if ($time < $times6x) echo ("$zu1s");
else
if ($time < $times7x and $times7x != $geschlossen and $time < $times9x )  echo ("$offen1");
else
if ($time< $times8x and $times7x != $geschlossen  ) echo ("$zu2s");
else
if ($time < $times9x) echo ("$offen2");
else
if ($sonntagzu == $geschlossen and $time2x == $geschlossen)  echo  ("$Montag2");
else
if ($sonntagzu == $geschlossen)  echo  ("$Montag");


break;


case Sun:


if ($timeso1x == $geschlossen  and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times7 == $geschlossen ) echo ("$zudosa2");
else
if ($timeso1x == $geschlossen and  $time1x == $geschlossen  and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef1x == $geschlossen) echo ("$zudosa1");
else
if ($timeso1x == $geschlossen and   $time1x == $geschlossen  and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef2x == $geschlossen ) echo ("$zudofr2");
else
if ($timeso1x == $geschlossen and  $time1x== $geschlossen  and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo1x == $geschlossen ) echo ("$zudofr1");
else
if ($timeso1x == $geschlossen and    $time1x == $geschlossen  and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo2x == $geschlossen ) echo ("$zudodo2");
else
if ($timeso1x == $geschlossen and   $time1x == $geschlossen  and $timed1x == $geschlossen and $timem1x == $geschlossen ) echo ("$zudodo1");
else
if ($timeso1x == $geschlossen and   $time1x == $geschlossen  and $timed1x == $geschlossen and $timem2x == $geschlossen ) echo ("$zudomi2");
else
if ($timeso1x == $geschlossen and   $time1x == $geschlossen and $timed1x == $geschlossen  ) echo ("$zudomi1");
else
if ($timeso1x == $geschlossen and   $time1x == $geschlossen and $timed2x == $geschlossen ) echo ("$zudodi2");
else
if  ($timeso1x == $geschlossen and  $time1x == $geschlossen  ) echo ("$zudodi1");
else
if ($timeso1x == $geschlossen and $time2x  == $geschlossen)  echo  ("$zudomo2");
else
if ($timeso1x == $geschlossen )  echo  ("$zudomo1");
else




if (  $time >= $timeso4x  and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef1x == $geschlossen and $times7 == $geschlossen ) echo ("$zudosa2");
else
if ($time >= $timeso4x and  $time1x == $geschlossen  and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef1x == $geschlossen) echo ("$zudosa1");
else
if ($time >= $timeso4x and   $time1x == $geschlossen  and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo1x == $geschlossen and $timef2x == $geschlossen ) echo ("$zudofr2");
else
if ($time >= $timeso4x and  $time1x== $geschlossen  and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo1x == $geschlossen ) echo ("$zudofr1");
else
if ($time >= $timeso4x and    $time1x == $geschlossen  and $timed1x == $geschlossen and $timem1x == $geschlossen and $timedo2x == $geschlossen ) echo ("$zudodo2");
else
if ($time >= $timeso4x and   $time1x == $geschlossen  and $timed1x == $geschlossen and $timem1x == $geschlossen ) echo ("$zudodo1");
else
if ($time >= $timeso4x and   $time1x == $geschlossen  and $timed1x == $geschlossen and $timem2x == $geschlossen ) echo ("$zudomi2");
else
if ($time >= $timeso4x and   $time1x == $geschlossen and $timed1x == $geschlossen  ) echo ("$zudomi1");
else
if ($time >= $timeso4x and   $time1x == $geschlossen and $timed2x == $geschlossen ) echo ("$zudodi2");
else
if  ($time >= $timeso4x and  $time1x == $geschlossen  ) echo ("$zudodi1");
else



if ($time>= $timeso4x and $time2x == $geschlossen) echo ("$zu5so");
else
 if ($time>= $timeso4x) echo ("$zu3so");
else
if ($timeso2x == $geschlossen and $time < $timeso1x) echo ("$zu4so");
else
if ($time < $timeso1x) echo ("$zu1so");
else
if ($time < $timeso2x and $timeso2x != $geschlossen and $time < $timeso4x   )  echo ("$offen1");
else
if ($time< $timeso3x and $timeso2x != $geschlossen  ) echo ("$zu2so");
else
 if ($time < $timeso4x) echo ("$offen2");







break;


default:


echo ("$zu1");


}



//End
?>
</body>
</htm>
Return current item: Opening hours