72 lines
3.3 KiB
PHP
72 lines
3.3 KiB
PHP
<h2>Preisliste</h2>
|
|
<h3>Preise für Wohnung Gaby (1. Stock, 75 qm für 2 Personen)</h3>
|
|
<table class="preise">
|
|
<tr>
|
|
<th>Zeitraum</th>
|
|
<th>Buchungen<br/> <br/>3 - 4 Nächte<br/> <br/><small>(2 Pers./Nacht)</small></th>
|
|
<th>Buchungen<br/> <br/>5 -6 Nächte<br/> <br/><small>(2 Pers./Nacht)</small></th>
|
|
<th class="hs">Hauptsaison<br/> <br/>ab 7 Nächte<br/> <br/><small>(2 Pers./Nacht)</small></th>
|
|
<th class="ns">Nebensaison<br/> <br/>ab 7 Nächte<br/> <br/><small>(2 Pers./Nacht)</small></th>
|
|
<th class="aw">Weihnachten<br/> <br/>ab 14 Nächte<br/> <br/><small>(2 Pers./Nacht)</small></th>
|
|
</tr>
|
|
|
|
<?php
|
|
$sql1 = "SELECT * FROM Preise WHERE ID = 1";
|
|
$result1 = $db->query($sql1);
|
|
$nt1 = $result1->fetch_assoc();
|
|
$sql2 = "SELECT Von, Bis, Typ FROM Saison";
|
|
$result2 = $db->query($sql2);
|
|
while ($nt2 = $result2->fetch_assoc()) {
|
|
$Von = date("d.m.y", strtotime($nt2['Von']));
|
|
$Bis = date("d.m.y", strtotime($nt2['Bis']));
|
|
echo " <tr>\n";
|
|
if ('Hauptsaison' == $nt2['Typ']) {
|
|
echo " <td class=\"hs\">$Von - $Bis</td>\n";
|
|
}
|
|
if ('Nebensaison' == $nt2['Typ']) {
|
|
echo " <td class=\"ns\">$Von - $Bis</td>\n";
|
|
}
|
|
if ('Weihnachten' == $nt2['Typ']) {
|
|
echo " <td class=\"aw\">$Von - $Bis</td>\n";
|
|
}
|
|
echo " <td>" . number_format($nt1['Nacht3'], 2, ',', '.') . " €</td>\n";
|
|
echo " <td>" . number_format($nt1['Nacht5'], 2, ',', '.') . " €</td>\n";
|
|
if ('Hauptsaison' == $nt2['Typ']) {
|
|
echo " <td class=\"hs\">" . number_format($nt1['Hauptsaison'], 2, ',', '.') . " €</td>\n";
|
|
echo " <td></td>\n";
|
|
echo " <td></td>\n";
|
|
}
|
|
if ('Nebensaison' == $nt2['Typ']) {
|
|
echo " <td></td>\n";
|
|
echo " <td class=\"ns\">" . number_format($nt1['Nebensaison'], 2, ',', '.') . " €</td>\n";
|
|
echo " <td></td>\n";
|
|
}
|
|
if ('Weihnachten' == $nt2['Typ']) {
|
|
echo " <td></td>\n";
|
|
echo " <td></td>\n";
|
|
echo " <td class=\"aw\">" . number_format($nt1['Weihnachten'], 2, ',', '.') . " €</td>\n";
|
|
}
|
|
echo " </tr>\n";
|
|
}
|
|
|
|
$p1 = $nt1['Nacht3'] + 2 * $nt1['Kurbeitrag'];
|
|
$p2 = $nt1['Nacht5'] + 2 * $nt1['Kurbeitrag'];
|
|
$p3 = $nt1['Hauptsaison'] + 2 * $nt1['Kurbeitrag'];
|
|
$p4 = $nt1['Nebensaison'] + 2 * $nt1['Kurbeitrag'];
|
|
$p5 = $nt1['Weihnachten'] + 2 * $nt1['Kurbeitrag'];
|
|
|
|
echo " <tr>\n";
|
|
echo " <th>Preise inkl. Kurbeitrag</th>\n";
|
|
echo " <th>" . number_format($p1, 2, ',', '.') . " €</th>\n";
|
|
echo " <th>" . number_format($p2, 2, ',', '.') . " €</th>\n";
|
|
echo " <th>" . number_format($p3, 2, ',', '.') . " €</th>\n";
|
|
echo " <th>" . number_format($p4, 2, ',', '.') . " €</th>\n";
|
|
echo " <th>" . number_format($p5, 2, ',', '.') . " €</th>\n";
|
|
echo " </tr>\n";
|
|
?>
|
|
</table>
|
|
<?php include __DIR__ . '/../kalender.php'; ?>
|
|
<br style="clear:right;" />
|
|
<?php include __DIR__ . '/../kal_def.php'; ?>
|
|
<br class="clear" />
|
|
<?php include __DIR__ . '/../preis_def.php'; ?>
|