<?php
if (!isset($_SESSION['ID'])) {
} else
	{
		$sql	= "SELECT * FROM objekte WHERE ID = '" . $_POST['ID'] . "';";
		$result = $db->query($sql);
		$nt 	= $result->fetch_assoc();

		if ( $nt['Scout'] )
			{
				$_POST['ImmoScout'] = 'loeschen';
			}
		if ( $nt['Welt'] )
			{
				$_POST['ImmoWelt'] = 'loeschen';
			}
		if ( $nt['Net'] )
			{
				$_POST['ImmoNet'] = 'loeschen';
			}
		$_POST['fromDel']  = '1';
		include "inhalte/objekte/aktivieren.php";
		$sql = 'DELETE FROM
					objekte
				WHERE
					ID = "'.$_POST['ID'].'";';
		$result = $db->query($sql);
		if ($result)
			{
				unset($_POST);
				include "inhalte/objekte.php";
			}
		else
			{
				echo "Fehler beim löschen";
			}
		unset ( $_POST );
	}
?>