<?php
include ('logue.php'); 
include ('entete2.php');
include ('entete.php');
include ('ressource.php');
include ('calcullabo.php');

$sql2 = "SELECT robo_lvl,chantier_lvl,hangarfer_lvl,hangarfer_evolution,hangaror_lvl,hangaror_evolution,hangarada_lvl,hangarada_evolution,hangaror_lvl,hangarura_lvl,hangarura_evolution,labo_lvl,labo_evolution,fer_energie,or_energie,ada_energie,ura_energie,exfer_energie,exor_energie,central_energie FROM matgraph_users WHERE id='$planete' ";
$res2 = db_mysql_Query($sql2)or die('erreur sql<br>'.$sql2.'<br>'.mysql_error());
$row2 = mysql_fetch_array($res2); 
$Total_energie_consom = $row2[fer_energie] + $row2[or_energie] + $row2[exfer_energie] + $row2[exor_energie] + $row2[ada_energie] + $row2[ura_energie] ;
$Total_energie_reste =  round(($New_central_energie + $New_fission_energie + $Total_energie_consom),0);
$Total_energie_prod = round(($New_central_energie + $New_fission_energie),0);

echo"
<style>
input {
border:1px solid #7E7E7E;
background-color:#000000;
font-family:'trebuchet ms',sans-serif;
color:white;
}
textarea {
border:1px solid #7E7E7E;
background-color:#000000;
font-family:'trebuchet ms',sans-serif;
color:white;
}
select, option {
background-color:#000000;
color:white;
}
</style>
<STYLE TYPE=text/css>
.Style1 {color: #0000FF}
.Style2 {color: #FF0000}
.Style3 {color: #00CC00}
</STYLE>";
echo"<div align=\"center\"><form name=\"colo\" method=\"post\" action=\"colonie.php\" target=\"_parent\">
<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td width=\"100\" rowspan=\"2\" valign=\"middle\">
       <div align=\"center\">
         <input name=\"page\" value=\"" . $PHP_SELF . "\" type=\"hidden\" id=\"page\">
         <select name=\"idcolo\" onchange=submit()>";
include ('colo2.php'); 

$sql = "SELECT galaxi,system,position,planete 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); 

echo"<form name=\"changename\" method=\"post\" action=\"changename_action.php\" target=\"_parent\">
<table width=\"618\"  border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
  <tr style =\"background-color:#222222;\">
    <td width=\"21%\"><div align=\"center\">Position</div></td>
    <td width=\"65%\"><div align=\"center\">Nom : </div></td>
    <td width=\"14%\" align=\"center\"><div align=\"center\">Action : </div></td>
  </tr>
  <tr height=\"50\" style =\"background-color:#111111;\">
    <td><div align=\"center\">$row[galaxi]:$row[system]:$row[position]</div></td>
    <td align=\"center\">
      <input name=\"newname\" type=\"text\" id=\"newname\" value=\"$row[planete]\" maxlength=\"15\">
    </td>
	<td width=\"14%\" align=\"center\"><input type=\"submit\" name=\"Submit\" value=\"Changer\"></td>
  </tr>
</table>
</form>";
?>