Einchecken des Online-Codes

This commit is contained in:
2017-05-07 14:37:49 +00:00
parent 9c1d71cea6
commit 85cc95c574
635 changed files with 76260 additions and 0 deletions

320
inhalte/sonstige/anlage.php Normal file
View File

@@ -0,0 +1,320 @@
<?php
$a = true;
$b = true;
$sql1="SELECT * FROM objekte WHERE ID = '" . $_GET['obj'] . "' ";
$result1 = $db->query($sql1);
$nt1 = $result1->fetch_assoc();
$sql2="SELECT Firma AS Vorname, Telefon, EMail FROM Firma WHERE ID = 2 ";
$result2 = $db->query($sql2);
$nt2 = $result2->fetch_assoc();
echo "<h2>" . $nt1['Kurz'] . "<br />Objekt-Nr: " . $nt1['ID'] . "</h2>\n";
echo "<h2 style=\"float:left;\">" . $nt1['O_TYP'] . "</h2>";
echo "<span style=\"float: right;\">\n";
echo " <a style=\"height: 24px; line-height: 24px; float:right;\" href=\"index.php?section=anlage&topic=rkauf&obj=".$_GET['obj']."&pdf=create\" target=\"_blank\"><img style=\"float:right;margin-right:10px;\" src=\"img/small_pdf.png\" alt=\"Expose zum Objekt als PDF anzeigen\" title=\"Expose zum Objekt als PDF anzeigen\" /></a>\n";
echo " <a style=\"height: 24px; line-height: 24px;float:right;\" href=\"index.php?section=anlage&topic=rkauf&obj=".$_GET['obj']."&pdf=create\" target=\"_blank\">PDF-Expose --></a>\n";
echo "</span><br style=\"clear:both;\" />\n";
if (isset($_GET['f'])) {
$pic = "img/objekte/".$_GET['obj']."_".$_GET['f'].".jpg";
}
else
{
$pic = '';
}
?>
<table class="uebersicht">
<colgroup>
<col width="130" />
<col width="110" />
<col width="120" />
<col width="130" />
<col width="130" />
<col width="70" />
</colgroup>
<tr>
<td colspan="6"><hr style="margin-top: 0px; margin-left: -5px; margin-right: -5px;"/></td>
</tr>
<tr>
<th colspan="4">Übersicht</th>
<th colspan="2">Kontakt</th>
</tr>
<tr>
<td>Gesamtfläche:</td><td colspan="3"><?php echo $nt1['WohnF']; ?> m&sup2;</td>
<td colspan="2"><?php echo fnc_getUsernameById ( $nt1['TID'], 'welcome' ); ?></td><td rowspan="3">
</tr>
<tr>
<td>Gewerbefläche:</td><td colspan="3"><?php echo $nt1['GrundF']; ?> m&sup2;</td>
<td colspan="2"><?php echo $nt2['Telefon']; ?></td>
</tr>
<tr>
<td>Wohnfläche:</td><td colspan="3"><?php echo $nt1['AnzGarStell']; ?> m&sup2;</td>
<td colspan="2"><?php echo $nt2['EMail']; ?></td>
</tr>
<tr>
<td>Kaufpreis:</td><td colspan="3"><?php echo number_format ( $nt1['Mkalt'], 0, ',', '.' ); ?> &euro;</td>
<td colspan="2"></td>
</tr>
<tr>
<td colspan="6"><hr style="margin-bottom: 0px; margin-left: -5px; margin-right: -5px;"/></td>
</tr>
</table><br />
<table class="foto">
<colgroup>
<col width="480px" />
<col span="2" width="110px" />
</colgroup>
<tr>
<?php
$count = 0;
for ( $i = 1; $i < 11; $i++ )
{
$file = "img/objekte/".$_GET['obj']."_".$i.".jpg";
if ( ( "1" == $i ) AND ( isset ( $_GET['f'] ) ) )
{
echo "<td rowspan=\"5\"><img id=\"showImg\" src=\"" . $pic . "?ts=" . date ( 'YmdHis' ) . "\" title=\"" .$nt1['Foto' . $i ] . "\" alt=\"" . $nt1[ 'Foto' . $i ] . "\" /></td>\n";
}
if ( file_exists ( $file ) )
{
if ( "" == $pic )
{
$pic = $file;
echo "<td rowspan=\"5\"><img id=\"showImg\" src=\"" . $file . "?ts=" . date ( 'YmdHis' ) . "\" title=\"" . $nt1['Foto' . $i ] . "\" alt=\"" . $nt1['Foto' . $i ] . "\" /></td>\n";
}
echo "<td style=\"text-align:right;\"><img style=\"cursor:pointer;\" onclick=\"document.getElementById('showImg').setAttribute('src' , this.getAttribute('src'));document.getElementById('showImg').setAttribute('title' , this.getAttribute('title'));\" src=\"" . $file . "?ts=" . date ( 'YmdHis' ) . "\" title=\"" . $nt1['Foto' . $i ] . "\" alt=\"" . $nt1['Foto' . $i ] . "\" width=\"100px\" height=\"75px\" /></td>\n";
if ( !$a )
{
echo "</tr>\n<tr>\n";
}
$a = ( $a xor $b );
$count++;
}
}
for ( $count; $count < 11; $count++ )
{
echo "<td>&nbsp</td>\n";
if ( !$a )
{
echo "</tr>\n<tr>\n";
}
$a = ( $a xor $b );
}
?>
</tr>
</table><br />
<table class="expose">
<colgroup>
<col width="200" />
<col width="150" />
<col width="200" />
<col width="150" />
</colgroup>
<tr>
<th colspan="4">Beschreibung</th>
</tr>
<tr>
<td colspan="4"><?php echo nl2br($nt1['OBeschreibung']); ?><br />&nbsp;<br /></td>
</tr>
<tr>
<?php
if ( 'keineAngabe' == $nt1['Zustand'] )
{
echo "<td colspan=\"2\"></td>";
}
else
{
echo "<td>Zustand:</td><td>" . $nt1['Zustand'] . "</td>";
}
if ( 'keineAngabe' == $nt1['Quali'] )
{
echo "<td colspan=\"2\"></td>";
}
else
{
echo "<td>Qualität der Ausstattung:</td><td>" . $nt1['Quali'] . "</td>";
}
?>
</tr>
<tr>
<td>Baujahr:</td><td><?php echo $nt1['Baujahr']; ?></td><td>Modernisiert:</td><td><?php echo $nt1['Modern']; ?></td>
</tr>
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr>
<th colspan="4">Kosten</th>
</tr>
<?php
if ( '1' == $nt['ProvisionsPflichtig'] )
{
?>
<tr>
<td>Provision:</td>
<td colspan="3"><?php echo $nt1['Provision']; ?></td>
</tr>
<tr>
<td>Provisionshinweis:</td>
<td colspan="3"><?php echo $nt1['ProvisionsHinweis']; ?></td>
</tr>
<?php
}
?>
<tr>
<td>Kaufpreis:</td>
<td><?php echo number_format ( $nt1['Mkalt'], 0, ',', '.' ); ?> &euro;</td>
<td>zzgl. Stellplatz:</td>
<td><?php echo number_format ( $nt1['StellK'], 0, ',', '.') ; ?> &euro;</td>
</tr>
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr>
<th colspan="4">Rendite</th>
</tr>
<tr>
<td>Vermietbare Fläche:</td>
<td><?php echo $nt1['VermietbareFlaeche']; ?> &euro;</td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td>Mieteinnahme pa IST:</td>
<td><?php echo number_format ( $nt1['MietEinnahmePaIst'], 0, ',', '.' ); ?> &euro;</td>
<td>Mieteinnahme pa SOLL:</td>
<td><?php echo number_format ( $nt1['MietEinnahmePaSoll'], 0, ',', '.' ); ?> &euro;</td>
</tr>
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr>
<th colspan="4">Lage</th>
</tr>
<tr>
<td>Fussweg öff. Verkehrsmitteln</td>
<td><?php echo $nt1['FusswegOeNV']; ?> Min.</td>
<td>Fahrzeit HBF</td>
<td><?php echo $nt1['FahrBHF']; ?> Min.</td>
</tr>
<tr>
<td>Fahrzeit BAB</td>
<td><?php echo $nt1['FahrBAB']; ?> Min.</td>
<td>Fahrzeit Flughafen</td>
<td><?php echo $nt1['Fahrflug']; ?> Min.<br />&nbsp;<br /></td>
</tr>
<tr>
<td colspan="4"> <?php echo nl2br( $nt1['Lage'] ); ?></td>
</tr>
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr>
<th colspan="4">Ausstattung innen</th>
</tr>
<tr>
<?php
$a = true;
if ('1' == $nt1['EinbauK']) {
echo "<td>Einbauküche:</td><td><img src=\"img/1.png\" alt=\"ja\" /></td> \n";
$a = ($a xor $b);
if ($a) {
echo "</tr>\n<tr>\n";
}
}
if ('1' == $nt1['Speise']) {
echo "<td>Speisekammer:</td><td><img src=\"img/1.png\" alt=\"ja\" /></td> \n";
$a = ($a xor $b);
if ($a) {
echo "</tr>\n<tr>\n";
}
}
if ('1' == $nt1['BadeW']) {
echo "<td>Badewanne:</td><td><img src=\"img/1.png\" alt=\"ja\" /></td> \n";
$a = ($a xor $b);
if ($a) {
echo "</tr>\n<tr>\n";
}
}
if ('1' == $nt1['DuschK']) {
echo "<td>Duschkabine:</td><td><img src=\"img/1.png\" alt=\"ja\" /></td> \n";
$a = ($a xor $b);
if ($a) {
echo "</tr>\n<tr>\n";
}
}
if ('1' == $nt1['WCsep']) {
echo "<td>WC separat:</td><td><img src=\"img/1.png\" alt=\"ja\" /></td> \n";
$a = ($a xor $b);
if ($a) {
echo "</tr>\n<tr>\n";
}
}
if ('1' == $nt1['WCbad']) {
echo "<td>WC im Bad:</td><td><img src=\"img/1.png\" alt=\"ja\" /></td> \n";
$a = ($a xor $b);
if ($a) {
echo "</tr>\n<tr>\n";
}
}
if ('1' == $nt1['Abstell']) {
echo "<td>Abstellraum:</td><td><img src=\"img/1.png\" alt=\"ja\" /></td> \n";
$a = ($a xor $b);
if ($a) {
echo "</tr>\n<tr>\n";
}
}
if ('1' == $nt1['DachB']) {
echo "<td>Dachboden:</td><td><img src=\"img/1.png\" alt=\"ja\" /></td> \n";
$a = ($a xor $b);
if ($a) {
echo "</tr>\n<tr>\n";
}
}
if ('1' == $nt1['Keller']) {
echo "<td>Keller:</td><td><img src=\"img/1.png\" alt=\"ja\" /></td> \n";
$a = ($a xor $b);
}
?>
</tr>
<tr>
<td>Heizart:</td><td colspan="3"><?php echo $nt1['Heizart']; ?></td>
</tr>
<?php
if ( 'keineAngabe' != $nt1['EnerTyp'] )
{
?>
<tr>
<td>Energieausweistyp:</td><td colspan="3"><?php echo $nt1['EnerTyp']; ?></td>
</tr>
<tr>
<td>Verbrauchskennwert:</td><td colspan="3"><?php echo $nt1['EnerVKW']; ?></td>
</tr>
<tr>
<td>Warmwasser enthalten:</td><td colspan="3"><?php echo ( '1' == $nt1['EnerWWEnt'] ) ? "<img src=\"img/1.png\" alt=\"ja\" />" : "<img src=\"img/0.png\" alt=\"nein\" />"; ?></td>
</tr>
<?php
}
?>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<th colspan="4">Ausstattung</th>
</tr>
<tr>
<td colspan="4"><?php echo nl2br($nt1['Ausstatt']); ?></td>
</tr>
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr>
<th colspan="4">Sonstiges</th>
</tr>
<tr>
<td colspan="4"><?php echo nl2br($nt1['Sonstiges']); ?></td>
</tr>
</table><br />

View File

@@ -0,0 +1,184 @@
<?php
if (!isset($_GET['obj'])) {
if (isset($_POST['formaction'])) {
if (("" == $_POST['Zvon']) AND ("" == $_POST['Zbis'])) {
}
elseif (("" !== $_POST['Zvon']) AND ("" == $_POST['Zbis'])) {
$filter = $filter. "AND Zimmer >= ".$_POST['Zvon']." ";
$zimmer = "mehr als ".$_POST['Zvon']." Zimmer";
}
elseif (("" == $_POST['Zvon']) AND ("" !== $_POST['Zbis'])) {
$filter = $filter. "AND Zimmer <= ".$_POST['Zbis']." ";
$zimmer = "bis ".$_POST['Zbis']." Zimmer";
}
else {
$filter = $filter. "AND Zimmer BETWEEN ".$_POST['Zvon']." AND ".$_POST['Zbis']." ";
$zimmer = $_POST['Zvon']." bis ".$_POST['Zbis']." Zimmer";
}
if (("" == $_POST['Wvon']) AND ("" == $_POST['Wbis'])) {
}
elseif (("" !== $_POST['Wvon']) AND ("" == $_POST['Wbis'])) {
$filter = $filter. "AND WohnF >= ".$_POST['Wvon']." ";
$wohn = "mehr als ".$_POST['Wvon']." m&sup2;";
}
elseif (("" == $_POST['Wvon']) AND ("" !== $_POST['Wbis'])) {
$filter = $filter. "AND WohnF <= ".$_POST['Wbis']." ";
$wohn = "bis ".$_POST['Wbis']." m&sup2;";
}
else {
$filter = $filter. "AND WohnF BETWEEN ".$_POST['Wvon']." AND ".$_POST['Wbis']." ";
$wohn = $_POST['Wvon']." bis ".$_POST['Wbis']." m&sup2;";
}
if (("" == $_POST['Kvon']) AND ("" == $_POST['Kbis'])) {
}
elseif (("" !== $_POST['Kvon']) AND ("" == $_POST['Kbis'])) {
$filter = $filter. "AND Mkalt >= ".$_POST['Kvon']." ";
$kalt = "mehr als ".$_POST['Kvon']." EUR";
}
elseif (("" == $_POST['Kvon']) AND ("" !== $_POST['Kbis'])) {
$filter = $filter. "AND Mkalt <= ".$_POST['Kbis']." ";
$kalt = "bis ".$_POST['Kbis']." EUR";
}
else {
$filter = $filter. "AND Mkalt BETWEEN ".$_POST['Kvon']." AND ".$_POST['Kbis']." ";
$kalt = $_POST['Kvon']." bis ".$_POST['Kbis']." EUR";
}
}
else
{
$zimmer = '';
$wohn = '';
$kalt = '';
$filter = '';
}
echo "<h1>Sonstige Objekte</h1>\n";
$sql = 'SELECT * FROM objekte WHERE Aktiv = "1" AND Deaktiv = "0" AND Kat != "wohnen" '.$filter.' ORDER BY Akt_Datum DESC';
$result = $db->query($sql);
$anzahl = $result->num_rows;
echo "<form class=\"suche\" action=\"index.php?section=immobilien&topic=sonstige_objekte\" method=\"post\">\n";
echo "<table>\n";
echo " <colgroup>\n";
echo " <col width=\"105px\" />\n";
echo " <col width=\"75px\" />\n";
echo " <col width=\"42px\" />\n";
echo " <col width=\"80px\" />\n";
echo " <col width=\"152px\" />\n";
echo " <col width=\"232px\" />\n";
echo " </colgroup>\n";
echo " <tr>\n";
echo " <th colspan=\"5\">Suchkriterien</th>\n";
if (1 !== $anzahl) {
echo " <th>$anzahl Objekte im Angebot</th>\n";
}
else {
echo " <th>$anzahl Objekt im Angebot</th>\n";
}
echo " </tr>\n";
echo " <tr>\n";
echo " <td>Zimmer:</td>\n";
echo " <td><input type=\"text\" name=\"Zvon\" size=\"5\" /></td>\n";
echo " <td>bis</td>\n";
echo " <td><input type=\"text\" name=\"Zbis\" size=\"5\" /></td>\n";
echo " <td></td>\n";
if (isset($_POST['formaction'])) {
echo " <td>mit folgenden Kriterien:</td>\n";
}
echo " </tr>\n";
echo " <tr>\n";
echo " <td>Fläche:</td>\n";
echo " <td><input type=\"text\" name=\"Wvon\" size=\"5\" /></td>\n";
echo " <td>bis</td>\n";
echo " <td><input type=\"text\" name=\"Wbis\" size=\"5\" /></td>\n";
echo " <td>m&sup2;</td>\n";
echo " <td>$zimmer</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td colspan=\"5\"><input type=\"submit\" name=\"formaction\" value=\"Suchen\" /></td>\n";
echo " <td>$wohn</td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "<br />\n";
echo "</form>\n";
echo "<br />\n";
echo "<table class=\"overview\">\n";
echo " <colgroup>\n";
echo " <col width=\"125\" />\n";
echo " <col span=\"5\" width=\"117\" />\n";
echo " </colgroup>\n";
echo " <tr>\n";
echo " <th>&nbsp;</th>\n";
echo " <th>&nbsp;</th>\n";
echo " <th>Nutzfläche</th>\n";
echo " <th>Kaltmiete</th>\n";
echo " <th>Kaufpreis</th>\n";
echo " <th style=\"text-align:right;padding-right:10px;\">Objekt-Typ</th>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td colspan=\"6\"><hr class=\"noDisplay\" /> &nbsp;</td>\n";
echo " <tr>\n";
while ($nt = $result->fetch_assoc()) {
if ( "anlage" == $nt['KAT'] )
{
$form = "<form action=\"index.php?section=immobilien&topic=anlage&obj=".$nt['ID']."\" method=\"post\">\n";
}
if ( "gewerbe" == $nt['KAT'] )
{
if ('Kauf' == $nt['V_TYP']) {
$form = "<form action=\"index.php?section=immobilien&topic=gewerbe_kauf&obj=".$nt['ID']."\" method=\"post\">\n";
}
else {
$form = "<form action=\"index.php?section=immobilien&topic=gewerbe_miete&obj=".$nt['ID']."\" method=\"post\">\n";
}
}
echo $form;
echo "<input type=\"hidden\" name=\"ID\" value=\"".$nt['ID']."\" />\n";
echo "<input type=\"hidden\" name=\"Count\" value=\"".$nt['Count']."\" />\n";
echo " <tr>\n";
echo " <td rowspan=\"4\"><input type=\"image\" value=\"Zum Objekt\" src=\"img/objekte/".$nt['ID']."_1.jpg\" width=\"80px\" height=\"60px\" /></td>\n";
echo " <td colspan=\"5\"><input class=\"overview\" type=\"submit\" value=\"".$nt['Kurz']."\" /></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td>" . strtoupper(substr($nt['KAT'], 0,1)).substr($nt['KAT'], 1) . "</td>\n";
echo " <td>" . $nt['WohnF'] . " m&sup2;</td>\n";
if ('Kauf' == $nt['V_TYP']) {
echo " <td>&nbsp;</td>\n";
echo " <td>" . number_format ( $nt['Mkalt'], 0, '', '.') . " &euro;</td>\n";
echo " <td style=\"text-align:right;padding-right:10px;color:#660000;\">Kauf</td>\n";
}
else {
echo " <td>&nbsp;</td>\n";
echo " <td>" . number_format ( $nt['Mkalt'], 0, '', '.') . " &euro;</td>\n";
echo " <td style=\"text-align:right;padding-right:10px;color:#660000;\">Miete</td>\n";
}
echo " </tr>\n";
echo " <tr>\n";
echo " <td colspan=\"3\">" . $nt['Ort'] . "</td>\n";
echo " <td colspan=\"2\" style=\"text-align:right;padding-right:10px;\">" . $nt['O_TYP'] . "</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td colspan=\"6\"><hr /></td>\n";
echo " </tr>\n";
echo "</form>\n";
}
echo "</table>\n";
} else {
if (isset($_POST['ID'])) {
$Zaehler = (int)($_POST['Count']) + 1;
$sqlu = "UPDATE objekte SET Count = \"".$Zaehler."\" WHERE ID = \"".$_POST['ID']."\";";
$stmtu = $db->prepare($sqlu);
if ($stmtu) {
if ($stmtu->execute()) {
}
}
unset($_POST);
}
include "inhalte/wohn/wmobj.php";
}
?>