<?php
include ('logue.php'); 
include ('entete2.php');

$sql = "SELECT or_destruction FROM matgraph_users WHERE id='$planete' ";
$res = mysql_query($sql)or die('erreur sql<br>'.$sql.'<br>'.mysql_error());
$row = mysql_fetch_array($res); 

if ($row[or_destruction] !== "0000-00-00 00:00:00") {
$sql = "UPDATE matgraph_users SET  or_destruction='0000-00-00 00:00:00' WHERE id='$planete'";
$res = mysql_query($sql)or die('erreur sql<br>'.$sql.'<br>'.mysql_error()); }
echo '<script language="javascript" type="text/javascript">
<!--
window.location.replace("batiments.php");
-->
</script>';
?>