<?php
include("../sessionreserved.php");
include("../../db.php");
mysql_query("DELETE FROM visite WHERE idvisita = ".intval($_REQUEST['id'])." AND userid = ".$_SESSION['user']['id']);
if(mysql_affected_rows() == 1){
	//elimino imprese	
	mysql_query("DELETE FROM visite_imp WHERE idvisita = ".intval($_REQUEST['id']));
	//elimino prox visite	
	mysql_query("DELETE FROM visite_prox WHERE idvisita = ".intval($_REQUEST['id']));

}
$goto = base64_decode($_REQUEST['url']);

echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script language="javascript">
window.location = "'.$goto.'";
</script>
</head>

<body>
</body>
</html>
';
?>