<?php
include ('logue.php'); 
include ('entete2.php');
include ('evolutionbats.php');
include ('siege.php');
$sql = "SELECT pts,robo_lvl,fer_ressource,or_ressource,ada_ressource FROM matgraph_users WHERE id='$planete' ";
$res = db_mysql_Query($sql)or die('erreur sql<br>'.$sql.'<br>'.mysql_error());
$row = mysql_fetch_array($res); 

if ($row[robo_lvl]  == "0") {
$robo_destruction =  strftime("%Y-%m-%d %H:%M:%S", time()+ (600 / 3 ));
}
else {
$robo_destruction =  strftime("%Y-%m-%d %H:%M:%S", time()+ (round(600 / 3  * (bcpow(1.8, ($row[robo_lvl]),3)))));
} 
if($row['robo_lvl']>0){
if ($evolution < 0) {
$sql = "UPDATE matgraph_users SET robo_destruction='$robo_destruction' WHERE id='$planete'";
$res = db_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>';
?>