<?php
include ('logue.php'); 
include ('entete2.php');
include ('ressource.php');
include ('entete.php');
echo"
<STYLE TYPE=text/css>
.Style1 {color: #0000FF}
.Style2 {color: #FF0000}
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;
}
A.menulink2 {
width: 150px;
text-decoration: none;
font-family:Verdana;
font-size:11px;
color: #FF3300;
BORDER: none;
border: solid 1px #000000;
}

A.menulink2:hover {
border: solid 1px #000000;
background-color:#000000;
}
</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'); 

$sql2 = "SELECT ally,statut FROM matgraph_users WHERE id='$idlogin'";
$res2 = db_mysql_Query($sql2)or die('erreur sql<br>'.$sql2.'<br>'.mysql_error());
$row2 = mysql_fetch_array($res2); 

$sql_options = "SELECT admin FROM matgraph_ally_statut WHERE id='$row2[statut]'";
$res_options = db_mysql_Query($sql_options)or die('erreur sql<br>'.$sql_options.'<br>'.mysql_error());
$row_options = mysql_fetch_array($res_options); 

if($row2[ally] == "no") {
	echo '<script language="javascript" type="text/javascript">
	<!--
	window.location.replace("ally_index.php");
	-->
	</script>';
	exit;
}

if($row2[statut] !== "0" AND $row_options[admin] == "1" OR $row2[statut] == "-1") {

	$sql = "SELECT * FROM matgraph_ally WHERE id='$row2[ally]'";
	$res = db_mysql_Query($sql)or die('erreur sql<br>'.$sql.'<br>'.mysql_error());
	$row = mysql_fetch_array($res);

	echo"<div align=\"left\"><a href=\"ally_index.php\" target=\"_parent\"> Retour</a></div><br>";
	echo"Contraction des termes DEFense et CONdition , désignant le niveau d'alerte militaire des troupes alliées : 
	<br><br><div align=\left\">
	<br><font color=\"009900\">DEFCON 5 : Préparation normale en temps de paix.</font>
	<br><font color=\"999933\">DEFCON 4 : Renseignement accru et mesures de sécurité renforcées.</font>
	<br><font color=\"FFFF00\">DEFCON 3 : Accroissement de la préparation des forces.</font>
	<br><font color=\"FF9900\">DEFCON 2 : Accroissement supplémentaire dans la préparation des forces, mais inférieure à la préparation maximale.</font>
	<br><font color=\"FF0000\">DEFCON 1 : Etat de guerre !! Préparation maximale des forces.</font><br><br>";

	echo"<div align=\center\"><form action=\"ally_defcon_envoi.php\" method=\"post\" name=\"form1\" target=\"_parent\">
	  <select name=\"niveau\" id=\"niveau\">
	    <option value=\"5\""; if($row[defcon] == "5") { echo" selected";} echo">Niveau 5</option>
	    <option value=\"4\""; if($row[defcon] == "4") { echo" selected";} echo">Niveau 4</option>
	    <option value=\"3\""; if($row[defcon] == "3") { echo" selected";} echo">Niveau 3</option>
	    <option value=\"2\""; if($row[defcon] == "2") { echo" selected";} echo">Niveau 2</option>
	    <option value=\"1\""; if($row[defcon] == "1") { echo" selected";} echo">Niveau 1</option>
	  </select>
	<input type=\"submit\" name=\"Submit\" value=\"Modifier\"></form>";
}
else {
	echo '<script language="javascript" type="text/javascript">
	<!--
	window.location.replace("ally_index.php");
	-->
	</script>';
}
?>

