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

// defense
if ($row[defense_lvl] =="0") {
$defense_lvl = "0";
}
else {
$defense_lvl = $row[defense_lvl];
}
// chantier
if ($row[chantier_lvl] =="0") {
$chantier_lvl = "0";
}
else {
$chantier_lvl = $row[chantier_lvl];
}
// siege
if ($row[siege_lvl] =="0") {
	$siege_lvl = "0";
}else{
	$siege_lvl = $row[siege_lvl];
}
// poste avancé des anciens
if ($row[postav_lvl] =="0") {
$postav_lvl = "0";
}
else {
$postav_lvl = $row[postav_lvl];
}
 // robo
if ($row[robo_lvl] =="0") {
$robo_lvl = "0";
}
else {
$robo_lvl = $row[robo_lvl];
}
// labo
if ($row[labo_lvl] =="0") {
$labo_lvl = "0";
}
else {
$labo_lvl = $row[labo_lvl];
}
// fer
if ($row[fer_lvl] =="0") {
$fer_lvl = "0";
}
else {
$fer_lvl = $row[fer_lvl];
}
// or
if ($row[or_lvl] =="0") {
$or_lvl = "0";
}
else {
$or_lvl = $row[or_lvl];
}
// ada
if ($row[ada_lvl] =="0") {
$ada_lvl = "0";
}
else {
$ada_lvl = $row[ada_lvl];
}
// ada
if ($row[ura_lvl] =="0") {
$ura_lvl = "0";
}
else {
$ura_lvl = $row[ura_lvl];
}
// techenergie
if ($row2[techenergie_lvl] =="0") {
$techenergie_lvl = "0";
}
else {
$techenergie_lvl = $row2[techenergie_lvl];
}
// techlaser
if ($row2[techlaser_lvl] =="0") {
$techlaser_lvl = "0";
}
else {
$techlaser_lvl = $row2[techlaser_lvl];
}
// techions
if ($row2[techions_lvl] =="0") {
$techions_lvl = "0";
}
else {
$techions_lvl = $row2[techions_lvl];
}
// techplasma
if ($row2[techplasma_lvl] =="0") {
$techplasma_lvl = "0";
}
else {
$techplasma_lvl = $row2[techplasma_lvl];
}
// techordi
if ($row2[techordi_lvl] =="0") {
$techordi_lvl = "0";
}
else {
$techordi_lvl = $row2[techordi_lvl];
}
// techcombustion
if ($row2[techcombustion_lvl] =="0") {
$techcombustion_lvl = "0";
}
else {
$techcombustion_lvl = $row2[techcombustion_lvl];
}
// techAsgaards
if ($row2[techAsgaards_lvl] =="0") {
$techAsgaards_lvl = "0";
}
else {
$techAsgaards_lvl = $row2[techAsgaards_lvl];
}
// techhyperespace
if ($row2[techhyperespace_lvl] =="0") {
$techhyperespace_lvl = "0";
}
else {
$techhyperespace_lvl = $row2[techhyperespace_lvl];
}
// techespio1
if ($row2[techespio1_lvl] =="0") {
$techespio1_lvl = "0";
}
else {
$techespio1_lvl = $row2[techespio1_lvl];
}
// techespio2
if ($row2[techespio2_lvl] =="0") {
$techespio2_lvl = "0";
}
else {
$techespio2_lvl = $row2[techespio2_lvl];
}
// techArmement
if ($row2[techArmement_lvl] =="0") {
$techArmement_lvl = "0";
}
else {
$techArmement_lvl = $row2[techArmement_lvl];
}
// techBouclier
if ($row2[techBouclier_lvl] =="0") {
$techBouclier_lvl = "0";
}
else {
$techBouclier_lvl = $row2[techBouclier_lvl];
}
// techcoque
if ($row2[techcoque_lvl] =="0") {
$techcoque_lvl = "0";
}
else {
$techcoque_lvl = $row2[techcoque_lvl];
}
// techproAsgaard
if ($row2[techproAsgaard_lvl] =="0") {
$techproAsgaard_lvl = "0";
}
else {
$techproAsgaard_lvl = $row2[techproAsgaard_lvl];
}
// techproAncien
if ($row2[techproAncien_lvl] =="0") {
$techproAncien_lvl = "0";
}
else {
$techproAncien_lvl = $row2[techproAncien_lvl];
}
// techinfra
if ($row2[techinfra_lvl] =="0") {
$techinfra_lvl = "0";
}
else {
$techinfra_lvl = $row2[techinfra_lvl];
}
// technaqua
if ($row2[technaqua_lvl] =="0") {
$technaqua_lvl = "0";
}
else {
$technaqua_lvl = $row2[technaqua_lvl];
}

//

include ('entete.php');
echo"<STYLE TYPE=text/css>
.Style1 {color: #00CC00}
.Style2 {color: #FF0000}
.Style3 {color: #0000FF}
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>";
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'); 
echo"<div align=\center\"><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
  <tr>
    <td colspan=\"3\" style =\"background-color:#222222;\"><div align=\"center\">Voir les technologies pour : </div></td>
  </tr>
  <tr>
    <td height=\"21\"><div align=\"center\"><a href=\"technologies_bats.php\" target=\"_parent\">Les Batiments</a></div></td>
    <td><div align=\"center\"><a href=\"technologies_equipement.php\" target=\"_parent\">L'&eacute;quipement des vaisseaux</a> </div></td>
    <td><div align=\"center\"><a href=\"technologies_def.php\" target=\"_parent\">Les d&eacute;fenses</a> </div></td>
  </tr>
  <tr style =\"background-color:#111111;\">
    <td height=\"21\"><div align=\"center\"><a href=\"technologies_tech.php\" target=\"_parent\">Le centre de recherche</a> </div></td>
    <td><div align=\"center\"><a href=\"technologies_infra.php\" target=\"_parent\">Les infrastructures</a> </div></td>
    <td><div align=\"center\"><a href=\"technologies_spe.php\" target=\"_parent\">Le chantier Sp&eacute;cialis&eacute;</a> </div></td>
  </tr>
</table><br><br>";
echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\"><b>
  <tr style =\"background-color:#222222;\">
    <td width=\"328\" height=\"35\"><div align=\"left\"><font color=\"0000FF\">Batiments : </font></div></td>
    <td width=\"660\"><font color=\"0000FF\">Conditions : </font></td>
  </tr>
  <tr>
    <td><a href=\"desfer.php\" target=\"_parent\">Mine de Fer </a></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><a href=\"desexfer.php\" target=\"_parent\">Centre d'extraction du fer </a></td>";
if ($fer_lvl > "19" ) {
    echo"<td><font color=\"00CC00\">Mine de fer niveau 20</font></td>"; } else {
	echo"<td><font color=\"FF0000\">Mine de fer niveau 20</font></td>";}
  echo"</tr>
  <tr style =\"background-color:#111111;\">
    <td><a href=\"desor.php\" target=\"_parent\">Mine d'or </a></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><a href=\"desexor.php\" target=\"_parent\">Centre d'extraction d'or </a></td>";
if ($or_lvl > "19" ) {
    echo"<td><font color=\"00CC00\">Mine d'or niveau 20</font></td>"; } else {
	echo"<td><font color=\"FF0000\">Mine d'or niveau 20</font></td>";}
  echo"</tr>
  <tr style =\"background-color:#111111;\">
    <td><a href=\"desada.php\" target=\"_parent\">Mine de Cristal </a></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><a href=\"desura.php\" target=\"_parent\">Mine de Naquadah </a></td>
    <td>&nbsp;</td>
  </tr>
  <tr style =\"background-color:#111111;\">
    <td><a href=\"descentral.php\" target=\"_parent\">Centrale d'énergie thermique </a></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><a href=\"desfission.php\" target=\"_parent\">Centrale énergétique au Naquadah </a></td>";
if ($techenergie_lvl > "3" ) {
    echo"<td><font color=\"00CC00\">Technologie de ma&icirc;trise de l'Energie 4</font>"; } else { 
	echo"<td><font color=\"FF0000\">Technologie de ma&icirc;trise de l'Energie 4</font>"; }
if ($ura_lvl > "4" ) {
echo"<br><font color=\"00CC00\">Mine de Naquadah niveau 5</font></td>"; } else { 
echo"<br><font color=\"FF0000\">Mine de Naquadah niveau 5</font></td>"; }
  echo"</tr>
  <tr style =\"background-color:#111111;\">
    <td><a href=\"desrobo.php\" target=\"_parent\">Usine Robotique </a></td>
    <td>&nbsp;</td>
  </tr>
    <tr>
    <td><a href=\"desmili.php\" target=\"_parent\">Caserne Militaire </a></td>";
if ($robo_lvl > "0" ) {
    echo"<td><font color=\"00CC00\">Usine Robotique niveau 1</font></td>"; } else { 
	echo"<td><font color=\"FF0000\">Usine Robotique niveau 1</font></td>"; }
	echo"</tr>
  <tr style =\"background-color:#111111;\">
    <td><a href=\"deschantier.php\" target=\"_parent\">Chantier spatial </a></td>";
if ($robo_lvl > "1" ) {
    echo"<td><font color=\"00CC00\">Usine Robotique niveau 2</font></td>"; } else { 
	echo"<td><font color=\"FF0000\">Usine Robotique niveau 2</font></td>"; }
	echo"</tr>
    <tr>
    <td><a href=\"desdefense.php\" target=\"_parent\">Centre Militaire de Defense Interplanétaire </a></td>";
if ($robo_lvl > "2" ) {
    echo"<td><font color=\"00CC00\">Usine Robotique niveau 3</font></td>"; } else { 
	echo"<td><font color=\"FF0000\">Usine Robotique niveau 3</font></td>"; }
	echo"</tr>
  <tr style =\"background-color:#111111;\">
    <td><a href=\"deshangarfer.php\" target=\"_parent\">Zone de Stockage du fer </a></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><a href=\"deshangaror.php\" target=\"_parent\">Zone de Stockage de l’or </a></td>
    <td>&nbsp;</td>
  </tr>
  <tr style =\"background-color:#111111;\">
    <td><a href=\"deshangarada.php\" target=\"_parent\">Zone de Stockage du Cristal </a></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><a href=\"deshangarura.php\" target=\"_parent\">Cuve de Stockage du Naquadah </a></td>
    <td>&nbsp;</td>
  </tr>
  <tr style =\"background-color:#111111;\">
    <td><a href=\"deslabo.php\" target=\"_parent\">Centre de recherches scientifiques </a></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><a href=\"desbabel.php\" target=\"_parent\">Temple de Dakara </a></td>
    <td>&nbsp;</td>
  </tr>
    <tr style =\"background-color:#111111;\">
    <td><a href=\"porte.php\" target=\"_parent\">Porte des étoiles </a></td>";
if ($labo_lvl > "4" ) {
    echo"<td><font color=\"00CC00\">Centre de recherches scientifiques niveau 5</font></td>"; } else { 
	echo"<td><font color=\"FF0000\">Centre de recherches scientifiques niveau 5</font></td>"; }
	echo"</tr>
  	<tr>
    <td><a href=\"dessiege.php\" target=\"_parent\">Siège des Anciens </a></td>";
if ($techproAncien_lvl > "4" ) {
    echo"<td><font color=\"00CC00\">Technologie \"Les Anciens\" niveau 5</font>"; } else { 
	echo"<td><font color=\"FF0000\">Technologie \"Les Anciens\" niveau 5</font>"; }
if ($techordi_lvl > "9" ) {
    echo"<br><font color=\"00CC00\">Technologie Salle de contrôle 10</font>"; } else { 
	echo"<br><font color=\"FF0000\">Technologie Salle de contrôle 10</font>"; }
if ($labo_lvl > "7" ) {
echo"<br><font color=\"00CC00\">Centre de recherches scientifiques niveau 8</font></td>"; } else { 
echo"<br><font color=\"FF0000\">Centre de recherches scientifiques niveau 8</font></td>"; }
  echo"</tr>
      <tr style =\"background-color:#111111;\">
    <td><a href=\"despostav.php\" target=\"_parent\">Poste Avancé des Anciens</a></td>";
if ($labo_lvl >= "15" ) {
    echo"<td><font color=\"00CC00\">Centre de recherches scientifiques niveau 15</font>"; } else { 
	echo"<td><font color=\"FF0000\">Centre de recherches scientifiques niveau 15</font>"; }
if ($siege_lvl >= "6" ) {
	echo"<br/><font color=\"00CC00\">Siège des Anciens niveau 6</font>"; } else { 
	echo"<br/><font color=\"FF0000\">Siège des Anciens niveau 6</font>"; }
if ($defenses >= "13" ) {
    echo"<br/><font color=\"00CC00\">Centre de Défenses 13</font></td>"; } else { 
	echo"<br/><font color=\"FF0000\">Centre de Défenses 13</font></td>"; }
if ($techproAncien_lvl >= "12" ) {
    echo"<br/><font color=\"00CC00\">Technologie \"Les Anciens\" niveau 12</font>"; } else { 
	echo"<br/><font color=\"FF0000\">Technologie \"Les Anciens\" niveau 12</font>"; }
if ($techordi_lvl >= "15" ) {
    echo"<br/><font color=\"00CC00\">Technologie Salle de contrôle 15</font></td>"; } else { 
	echo"<br/><font color=\"FF0000\">Technologie Salle de contrôle 15</font></td>"; }
  echo"</tr>
</b></table>";

?>