<?php
			
			include("corps_html.php");
			include('database.php');
			include('config.php');
			
			DB_connexion(); 
			
			$nom_projet = $_GET['nom_projet'];

			if(isset($_POST['sauvegarder']) && $_POST['sauvegarder'] == "Sauvegarder")
			{
				echo "on sauve le projet...";
				/*
				nom_bloc
				famille_projet
				nom_projet
				date_dispo_schema
				date_debut_layout
				duree_jours
				date_fin
				owner
				recommandations
				infos
				*/
			}	
	
?>	

<link rel="stylesheet" type="text/css" href="style.css">
<link href="http://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>



<body>

	<div class="layout">

<?php
	include("header.php");
?>	
		
<!-- Main -->
		<div class="main">
			<div class="container">
				<div class="row">
				
				<div class="col-md-12">
						<!-- Content -->
						<div class="content">
							<div class="page-header">
								<!--<h3>Interface du gestionnaire de projets</h3> -->
								<h2><i class="icon-bullhorn"></i> <span>Edition du projet: <?php echo $nom_projet; ?></span></h2>
							</div>
								
							<!-- Single Page -->
							<div class="page">
								
							<div class="examples">
							
							<!------>
<?php
							
							$sql = "SELECT * FROM $nom_projet";
							$retour = mysql_query($sql);   
  
							print_r($retour);
  
							while($data=mysql_fetch_assoc($retour)) 
							{	
										$status = $data["status"];
										$nom_projet = $data["nom_projet"];
										$nom_famille = $data["nom_famille"];
										$owner = $data["owner"];
										$recommandations = $data["recommandations"];
										$infos = $data["infos"];
										
										/*
										nom_bloc
										famille_projet
										nom_projet
										date_dispo_schema
										date_debut_layout
										duree_jours
										date_fin
										owner
										recommandations
										infos
										*/
							}			
?>
							
							<form action="" method="post" id="edition_projet" name="edition_projet" >
							
							<table  cellspacing="1" cellpadding="5" border="0" bgcolor="#D5D5D5" width="100%">
						
							<tr bgcolor="#FFFFFF">
							<td>Nom :</td>
							<td>
							<input type="text" id="nom_projet" name="nom_projet" size="30" maxlength="30" disabled value="<?php echo $nom_projet; ?>"></td>
							</tr>
							
							<tr bgcolor="#FFFFFF">
							<td>Famille :</td>
							<td>
							<select id="selection_famille" name="selection_famille" disabled size="1" >
<?php
							for($i=0; $i < count($tab_famille_projet) ; $i++) 
							{
								echo '<option value="'.$tab_famille_projet[$i].'">'.$tab_famille_projet[$i].'</option>'; 
							}
							echo '</select>'; 
?>							
							</tr>
							
							<tr bgcolor="#FFFFFF">
							<td>Schéma disponible :</td>
							<td>
							<input type="text" size="12" id="date_schema" name="date_schema" value="" > 
							</td>
							</tr>
							
							<tr bgcolor="#FFFFFF">
							<td>Début Layout :</td>
							<td>
							<input type="text" size="12" id="date_debut" name="date_debut" value="" > 
							</td>
							</tr>
							
							<tr bgcolor="#FFFFFF">
							<td>Durée prévue:</td>
							<td>
							<input type="text" size="12" id="duree_jours" name="duree_jours" value="" > en jours
							<input type="submit" name="calculer" value="Calculer" />
							</td>
							</tr>

							<tr bgcolor="#FFFFFF">
							<td>Estimation:</td>
							<td>
							<input type="text" size="12" id="date_fin"  name="date_fin" READONLY  value="" > 
							</td>
							</tr>

							<tr bgcolor="#FFFFFF">
							<td>Owner :</td>
							<td>
							<input type="text" id="owner" name="owner" size="30" maxlength="30" value="<?php echo $owner; ?>" >
							</td>
							</tr>

							<tr bgcolor="#FFFFFF">
							<td>Recommandations :</td>
							<td>
							<textarea id="recommandations" name="recommandations" rows="12" cols="50" ><?php echo $recommandations; ?>
							</textarea></td>
							</tr>
							
							</table>
							
							<br/><br/>
							<input class="btn btn-primary" type="submit" value="Sauvegarder" name="sauvegarder" /> <!-- onclick="sauvegarder_bloc()" -->

							</form>
						
							<!------->
							
							</div>	
								
							<div class="clear"></div>
							<div class="clear"></div>
							</div>
							<!-- End Single Page -->
						</div>
						<!-- End Content -->
				</div>
					
				</div>
			</div>
		</div>
<!-- End Main -->
		
<?php
	include("footer.php");
?>		

	</div>

</body>
</html>
