Fix PHP checker fails

This commit is contained in:
Florian Pesth 2024-01-14 11:13:00 +01:00
parent b50594075d
commit 59207ee5a3
1 changed files with 65 additions and 79 deletions

View File

@ -28,136 +28,122 @@ if ($AdminStatus != 1) {
<?php
setlocale (LC_ALL, 'de_DE.UTF-8') or die("Locale not installed");
setlocale(LC_ALL, 'de_DE.UTF-8') or die("Locale not installed");
$unixtime=strtotime('2023-09-15');
for($day=0; $day<3; $day++)
{
$datestring=date('Y-m-d',$unixtime+$day*24*60*60);
echo "<h1>".strftime('%A, %e. %B %Y',$unixtime+$day*24*60*60)."</h1>";
$db_erg = GetDiensteForDay($db_link,2,$datestring);
while ($zeile = mysqli_fetch_array( $db_erg, MYSQLI_ASSOC))
{
$db_erg2 = GetSchichtenForDienstForDay($db_link,$zeile["DienstId"],$datestring);
$unixtime = strtotime('2023-09-15');
for ($day = 0; $day < 3; $day++) {
$datestring = date('Y-m-d', $unixtime + $day * 24 * 60 * 60);
echo "<h1>" . strftime('%A, %e. %B %Y', $unixtime + $day * 24 * 60 * 60) . "</h1>";
$db_erg = GetDiensteForDay($db_link, 2, $datestring);
while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
$db_erg2 = GetSchichtenForDienstForDay($db_link, $zeile["DienstId"], $datestring);
echo "<table id='customers'>";
echo "<tr><th colspan=3>".$zeile["Was"]."</th></tr>";
$schichten=0;
$OldVon=0;
$OldSoll=0;
while($zeile2 = mysqli_fetch_array($db_erg2, MYSQLI_ASSOC))
{
if($zeile2["Von"]!=$OldVon && $schichten!=0)
{
while($schichten<$OldSoll)
{
echo "<tr><th colspan=3>" . $zeile["Was"] . "</th></tr>";
$schichten = 0;
$OldVon = 0;
$OldSoll = 0;
while ($zeile2 = mysqli_fetch_array($db_erg2, MYSQLI_ASSOC)) {
if ($zeile2["Von"] != $OldVon && $schichten != 0) {
while ($schichten < $OldSoll) {
$schichten++;
echo "<tr>";
echo "<td rowspan='3' style='width:0.1%; white-space:nowrap;' valign='top'><strong>".$schichten."/".$OldSoll."</strong> ".date('H:i',strtotime($OldVon))." - ".date('H:i',strtotime($OldBis))."</td>";
echo "<td rowspan='3' style='width:0.1%; white-space:nowrap;' valign='top'><strong>" . $schichten . "/" . $OldSoll . "</strong> " . date('H:i', strtotime($OldVon)) . " - " . date('H:i', strtotime($OldBis)) . "</td>";
echo "<td rowspan='3' valign='top'></td>";
echo "<td width='50%'>".strftime('%a %H:%M',strtotime($OldVon))." <strong>".$zeile["Was"]."</strong></td>";
echo "<td width='50%'>" . strftime('%a %H:%M', strtotime($OldVon)) . " <strong>" . $zeile["Was"] . "</strong></td>";
echo "</tr>";
echo "<tr><td><i>".$zeile["Wo"]."</i></td></tr>";
echo "<tr><td>".$zeile["Info"]."</td></tr>";
echo "<tr><td><i>" . $zeile["Wo"] . "</i></td></tr>";
echo "<tr><td>" . $zeile["Info"] . "</td></tr>";
echo "<tr height='10mm'></tr>";
}
$schichten=0;
$schichten = 0;
}
$schichten++;
echo "<tr>";
echo "<td rowspan='3' style='width:0.1%; white-space:nowrap;' valign='top'><strong>".$schichten."/".$zeile2["Soll"]."</strong> ".date('H:i',strtotime($zeile2["Von"]))." - ".date('H:i',strtotime($zeile2["Bis"]))."</td>";
echo "<td rowspan='3' valign='top'><strong>".$zeile2["Name"]."</strong> ".$zeile2["Handy"]."</td>";
echo "<td width='50%'>".strftime('%a %H:%M',strtotime($zeile2["Von"]))." <strong>".$zeile["Was"]."</strong></td>";
echo "<td rowspan='3' style='width:0.1%; white-space:nowrap;' valign='top'><strong>" . $schichten . "/" . $zeile2["Soll"] . "</strong> " . date('H:i', strtotime($zeile2["Von"])) . " - " . date('H:i', strtotime($zeile2["Bis"])) . "</td>";
echo "<td rowspan='3' valign='top'><strong>" . $zeile2["Name"] . "</strong> " . $zeile2["Handy"] . "</td>";
echo "<td width='50%'>" . strftime('%a %H:%M', strtotime($zeile2["Von"])) . " <strong>" . $zeile["Was"] . "</strong></td>";
echo "</tr>";
echo "<tr><td><i>".$zeile["Wo"]."</i></td></tr>";
echo "<tr><td>".$zeile["Info"]."</td></tr>";
echo "<tr><td><i>" . $zeile["Wo"] . "</i></td></tr>";
echo "<tr><td>" . $zeile["Info"] . "</td></tr>";
echo "<tr height='10mm'></tr>";
$OldVon = $zeile2["Von"];
$OldBis = $zeile2["Bis"];
$OldSoll = $zeile2["Soll"];
if(empty($zeile2["Name"]))
{
while($schichten<$OldSoll)
{
if (empty($zeile2["Name"])) {
while ($schichten < $OldSoll) {
$schichten++;
echo "<tr>";
echo "<td rowspan='3' style='width:0.1%; white-space:nowrap;' valign='top'><strong>".$schichten."/".$OldSoll."</strong> ".date('H:i',strtotime($OldVon))." - ".date('H:i',strtotime($OldBis))."</td>";
echo "<td rowspan='3' style='width:0.1%; white-space:nowrap;' valign='top'><strong>" . $schichten . "/" . $OldSoll . "</strong> " . date('H:i', strtotime($OldVon)) . " - " . date('H:i', strtotime($OldBis)) . "</td>";
echo "<td rowspan='3' valign='top'></td>";
echo "<td width='50%'>".strftime('%a %H:%M',strtotime($OldVon))." <strong>".$zeile["Was"]."</strong></td>";
echo "<td width='50%'>" . strftime('%a %H:%M', strtotime($OldVon)) . " <strong>" . $zeile["Was"] . "</strong></td>";
echo "</tr>";
echo "<tr><td><i>".$zeile["Wo"]."</i></td></tr>";
echo "<tr><td>".$zeile["Info"]."</td></tr>";
echo "<tr><td><i>" . $zeile["Wo"] . "</i></td></tr>";
echo "<tr><td>" . $zeile["Info"] . "</td></tr>";
echo "<tr height='10mm'></tr>";
}
}
}
echo "</table>";
}
}
}
$unixtime=strtotime('2023-09-15');
for($day=0; $day<3; $day++)
{
$datestring=date('Y-m-d',$unixtime+$day*24*60*60);
echo "<h1>".strftime('%A, %e. %B %Y',$unixtime+$day*24*60*60)."</h1>";
$db_erg = GetDiensteForDay($db_link,1,$datestring);
while ($zeile = mysqli_fetch_array( $db_erg, MYSQLI_ASSOC))
{
$db_erg2 = GetSchichtenForDienstForDay($db_link,$zeile["DienstId"],$datestring);
$unixtime = strtotime('2023-09-15');
for ($day = 0; $day < 3; $day++) {
$datestring = date('Y-m-d', $unixtime + $day * 24 * 60 * 60);
echo "<h1>" . strftime('%A, %e. %B %Y', $unixtime + $day * 24 * 60 * 60) . "</h1>";
$db_erg = GetDiensteForDay($db_link, 1, $datestring);
while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
$db_erg2 = GetSchichtenForDienstForDay($db_link, $zeile["DienstId"], $datestring);
echo "<table id='customers'>";
echo "<tr><th colspan=3>".$zeile["Was"]."</th></tr>";
$schichten=0;
$OldVon=0;
$OldSoll=0;
while($zeile2 = mysqli_fetch_array($db_erg2, MYSQLI_ASSOC))
{
if($zeile2["Von"]!=$OldVon && $schichten!=0)
{
while($schichten<$OldSoll)
{
echo "<tr><th colspan=3>" . $zeile["Was"] . "</th></tr>";
$schichten = 0;
$OldVon = 0;
$OldSoll = 0;
while ($zeile2 = mysqli_fetch_array($db_erg2, MYSQLI_ASSOC)) {
if ($zeile2["Von"] != $OldVon && $schichten != 0) {
while ($schichten < $OldSoll) {
$schichten++;
echo "<tr>";
echo "<td rowspan='3' style='width:0.1%; white-space:nowrap;' valign='top'><strong>".$schichten."/".$OldSoll."</strong> ".date('H:i',strtotime($OldVon))." - ".date('H:i',strtotime($OldBis))."</td>";
echo "<td rowspan='3' style='width:0.1%; white-space:nowrap;' valign='top'><strong>" . $schichten . "/" . $OldSoll . "</strong> " . date('H:i', strtotime($OldVon)) . " - " . date('H:i', strtotime($OldBis)) . "</td>";
echo "<td rowspan='3' valign='top'></td>";
echo "<td width='50%'>".strftime('%a %H:%M',strtotime($OldVon))." <strong>".$zeile["Was"]."</strong></td>";
echo "<td width='50%'>" . strftime('%a %H:%M', strtotime($OldVon)) . " <strong>" . $zeile["Was"] . "</strong></td>";
echo "</tr>";
echo "<tr><td><i>".$zeile["Wo"]."</i></td></tr>";
echo "<tr><td>".$zeile["Info"]."</td></tr>";
echo "<tr><td><i>" . $zeile["Wo"] . "</i></td></tr>";
echo "<tr><td>" . $zeile["Info"] . "</td></tr>";
echo "<tr height='10mm'></tr>";
}
$schichten=0;
$schichten = 0;
}
$schichten++;
echo "<tr>";
echo "<td rowspan='3' style='width:0.1%; white-space:nowrap;' valign='top'><strong>".$schichten."/".$zeile2["Soll"]."</strong> ".date('H:i',strtotime($zeile2["Von"]))." - ".date('H:i',strtotime($zeile2["Bis"]))."</td>";
echo "<td rowspan='3' valign='top'><strong>".$zeile2["Name"]."</strong> ".$zeile2["Handy"]."</td>";
echo "<td width='50%'>".strftime('%a %H:%M',strtotime($zeile2["Von"]))." <strong>".$zeile["Was"]."</strong></td>";
echo "<td rowspan='3' style='width:0.1%; white-space:nowrap;' valign='top'><strong>" . $schichten . "/" . $zeile2["Soll"] . "</strong> " . date('H:i', strtotime($zeile2["Von"])) . " - " . date('H:i', strtotime($zeile2["Bis"])) . "</td>";
echo "<td rowspan='3' valign='top'><strong>" . $zeile2["Name"] . "</strong> " . $zeile2["Handy"] . "</td>";
echo "<td width='50%'>" . strftime('%a %H:%M', strtotime($zeile2["Von"])) . " <strong>" . $zeile["Was"] . "</strong></td>";
echo "</tr>";
echo "<tr><td><i>".$zeile["Wo"]."</i></td></tr>";
echo "<tr><td>".$zeile["Info"]."</td></tr>";
echo "<tr><td><i>" . $zeile["Wo"] . "</i></td></tr>";
echo "<tr><td>" . $zeile["Info"] . "</td></tr>";
echo "<tr height='10mm'></tr>";
$OldVon = $zeile2["Von"];
$OldBis = $zeile2["Bis"];
$OldSoll = $zeile2["Soll"];
if(empty($zeile2["Name"]))
{
while($schichten<$OldSoll)
{
if (empty($zeile2["Name"])) {
while ($schichten < $OldSoll) {
$schichten++;
echo "<tr>";
echo "<td rowspan='3' style='width:0.1%; white-space:nowrap;' valign='top'><strong>".$schichten."/".$OldSoll."</strong> ".date('H:i',strtotime($OldVon))." - ".date('H:i',strtotime($OldBis))."</td>";
echo "<td rowspan='3' style='width:0.1%; white-space:nowrap;' valign='top'><strong>" . $schichten . "/" . $OldSoll . "</strong> " . date('H:i', strtotime($OldVon)) . " - " . date('H:i', strtotime($OldBis)) . "</td>";
echo "<td rowspan='3' valign='top'></td>";
echo "<td width='50%'>".strftime('%a %H:%M',strtotime($OldVon))." <strong>".$zeile["Was"]."</strong></td>";
echo "<td width='50%'>" . strftime('%a %H:%M', strtotime($OldVon)) . " <strong>" . $zeile["Was"] . "</strong></td>";
echo "</tr>";
echo "<tr><td><i>".$zeile["Wo"]."</i></td></tr>";
echo "<tr><td>".$zeile["Info"]."</td></tr>";
echo "<tr><td><i>" . $zeile["Wo"] . "</i></td></tr>";
echo "<tr><td>" . $zeile["Info"] . "</td></tr>";
echo "<tr height='10mm'></tr>";
}
}
}
echo "</table>";
}
}
}
?>