<?php

	error_reporting(E_ALL ^ E_NOTICE);
//	error_reporting(E_ALL | E_STRICT);
    include "./inc/config.php"; // die Konfigurationsdateien lesen

	session_start();
	if ( !isset ( $_SESSION['ID'] ) )
		{
?>
			<html><head></head><body onload="self.close()"></body></html>
<?php
		}
	$db = @new MySQLi(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DATABASE);
	if (mysqli_connect_errno()) {
        die('Konnte keine Verbindung zu Datenbank aufbauen, MySQL meldete: '.mysqli_connect_error());
	}
    include "inc/funktionen.php";
	$sql	= "SELECT * FROM objekte WHERE ID = '" . $_GET['obj'] . "' LIMIT 1;";
	$result	= $db->query ( $sql );
	$nt		= $result->fetch_assoc();
    echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n";
    echo "         \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
    echo "<html style=\"background:none;\">\n";
    echo "    <head>\n";
    echo "        <title>".$title."</title>\n";
    echo "        <link rel=\"stylesheet\" media=\"screen, projection\" type=\"text/css\" href=\"css/page.css\" />\n";
    echo "    </head>\n";
    echo "    <body onload=\"moveTo(0,0);\">\n";
	echo "                <div id=\"inhalt_box\" style=\"position:absolute;left:0px;\">\n";
	echo "                    <div id=\"inhalt\">\n";
	$_OV_Typ2 = $nt['O_TYP'] . ' - ' . $nt['V_TYP'];
	if ("Wohnung - Miete" == $_OV_Typ2) {
		include "inhalte/wohn/wmobj.php";
	}
	elseif ("Wohnung - Kauf" == $_OV_Typ2) {
		include "inhalte/wohn/wkobj.php";
	}
	elseif ("Haus - Miete" == $_OV_Typ2) {
		include "inhalte/wohn/hmobj.php";
	}
	elseif ("Haus - Kauf" == $_OV_Typ2) {
		include "inhalte/wohn/hkobj.php";
	}
	elseif ("gewerbe" == $nt['KAT'] AND "Kauf" == $nt['V_TYP'] ) {
		include "inhalte/gewerbe/kauf.php";
	}
	elseif ("gewerbe" == $nt['KAT'] AND "Miete" == $nt['V_TYP'] ) {
		include "inhalte/gewerbe/miete.php";
	}
	elseif ("anlage" == $nt['KAT'] ) {
		include "inhalte/sonstige/anlage.php";
	}
    echo "                    </div>\n";
	echo "                </div>\n";
    echo "    </body>\n";
    echo "</html>\n";
?>