Files
wachter/inhalte/objekte/obj_std.php

92 lines
3.3 KiB
PHP

<h1>Sonstige Immobilien</h1>
<h2>Bitte wählen Sie die gewünschte Kategorie</h2>
<?php
$sqlr = 'SELECT Kurz FROM ObR WHERE Wert = "on" AND Sektion = "objekte";';
$resultr = $db->query($sqlr);
while ($ntr = $resultr->fetch_assoc()) {
if ("ao" == $ntr['Kurz']) {
$sql1 = 'SELECT ID FROM objekte WHERE Aktiv = 1 AND O_TYP = "Ausland" ORDER BY ID ASC';
$result1 = $db->query($sql1);
$anzahl1 = $result1->num_rows;
$nt1 = $result1->fetch_assoc();
echo "<a href=\"index.php?section=wohnen&t=wm\" class=\"nounder\">\n";
echo "<div class=\"haupt\">\n";
echo "<table> \n";
echo " <colgroup>\n";
echo " <col width=\"100px\" />\n";
echo " <col width=\"320px\" />\n";
echo " </colgroup>\n";
echo " <tr>\n";
echo " <td rowspan=\"2\">\n";
$file = "img/objekte/".$nt1['ID']."_1.jpg";
if (file_exists($file)) {
echo "<img src=\"img/objekte/".$nt1['ID']."_1.jpg\" width=\"80px\" height=\"60px\" />\n";
}
echo "</td>\n";
echo " <td><h1>Auslandsobjekte</h1></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td><h2>Zur Zeit haben wir $anzahl1 Objekte</h2></td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "</div>\n";
echo "</a>\n";
} elseif ("ro" == $ntr['Kurz']) {
$sql2 = 'SELECT ID FROM objekte WHERE Aktiv = 1 AND O_TYP = "Rendite" ORDER BY ID ASC';
$result2 = $db->query($sql2);
$anzahl2 = $result2->num_rows;
$nt2 = $result2->fetch_assoc();
echo "<a href=\"index.php?section=wohnen&t=wk\" class=\"nounder\">\n";
echo "<div class=\"haupt\">\n";
echo "<table> \n";
echo " <colgroup>\n";
echo " <col width=\"100px\" />\n";
echo " <col width=\"320px\" />\n";
echo " </colgroup>\n";
echo " <tr>\n";
echo " <td rowspan=\"2\">\n";
$file = "img/objekte/".$nt2['ID']."_1.jpg";
if (file_exists($file)) {
echo "<img src=\"img/objekte/".$nt2['ID']."_1.jpg\" width=\"80px\" height=\"60px\" />\n";
}
echo "</td>\n";
echo " <td><h1>Renditeobjekte</h1></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td><h2>Zur Zeit haben wir $anzahl2 Objekte</h2></td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "</div>\n";
echo "</a>\n";
} elseif ("gs" == $ntr['Kurz']) {
$sql3 = 'SELECT ID FROM objekte WHERE Aktiv = 1 AND O_TYP = "Grund" ORDER BY ID ASC';
$result3 = $db->query($sql3);
$anzahl3 = $result3->num_rows;
$nt3 = $result3->fetch_assoc();
echo "<a href=\"index.php?section=wohnen&t=hm\" class=\"nounder\">\n";
echo "<div class=\"haupt\">\n";
echo "<table> \n";
echo " <colgroup>\n";
echo " <col width=\"100px\" />\n";
echo " <col width=\"320px\" />\n";
echo " </colgroup>\n";
echo " <tr>\n";
echo " <td rowspan=\"2\">\n";
$file = "img/objekte/".$nt3['ID']."_1.jpg";
if (file_exists($file)) {
echo "<img src=\"img/objekte/".$nt3['ID']."_1.jpg\" width=\"80px\" height=\"60px\" />\n";
}
echo "</td>\n";
echo " <td><h1>Grundstücke</h1></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td><h2>Zur Zeit haben wir $anzahl3 Objekte</h2></td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "</div>\n";
echo "</a>\n";
}
}
?>