Exemplo n.º 1
0
function sold() {
	$id=intval($_GET['id']);
	if (isset($_SESSION['user_id'])) {
		Flat::setUserStatus($id,$_SESSION['user_id'],REALTY_STATUS_SOLD);		
	}
	else {
		if (!isset($_SESSION['admin'])) {
			echo "Not admin";		
			//header("Location: /index.html");		
			exit();
		}
		Flat::setStatus($id,REALTY_STATUS_SOLD);
	}
	header("Location: ".$_SERVER['HTTP_REFERER']);
	exit();	
}