<?php
			session_start();
			include("corps_html.php");
			include('database.php');
			DB_connexion(); 
			
			$bloc = $_GET['bloc'];
			$projet = $_GET['projet'];
			
			if(isset($_POST['sauvegarder']) && $_POST['sauvegarder'] == "Sauvegarder")
			{
				echo "on sauve ...";
			}	
	
?>	

<script>

</script>

<style>
textarea {
   resize: none;
}
</style>

<body>

	<div class="layout">

<?php
	include("header.php");
?>	
		
<!-- Main -->
		<div class="main">
			<div class="container">
				<div class="row">
				
				<div class="col-md-8">
						<!-- Content -->
						<div class="content">
							<div class="page-header">
								<!--<h3>Interface du gestionnaire de projets</h3> -->
								<h2><i class="icon-bullhorn"></i> <span>Edition du bloc: <?php echo $bloc; ?></span></h2>
							</div>
								
							<!-- Single Page -->
							<div class="page">
								
							<div class="examples">
							
							<!------>
<?php
							$table = $projet ."_data";
							$sql = "SELECT * FROM $table WHERE nom_bloc = '$bloc' ";
							$retour = mysql_query($sql);   
  
							while($data=mysql_fetch_assoc($retour)) 
							{	
										$nom_bloc = $data["nom_bloc"];
										$owner = $data["owner"];
										$recommandations = $data["recommandations"];
										$recommandations = "tutu";
										$infos = $data["infos"];
							}			
?>
							
							<form action="" method="post" id="edition_bloc" name="edition_bloc" >
							
							<table align="left" cellspacing="1" cellpadding="5" border="0" bgcolor="#D5D5D5" width="800">
						
							<tr bgcolor="#FFFFFF">
							<td align="right" valign="top">Nom :</td>
							<td align="left" valign="middle" colspan="1">
							<input type="text" name="nom_bloc" size="30" maxlength="30" disabled value="<?php echo $nom_bloc; ?>" id="gg" >&nbsp;</td>
							</tr>
							
							<tr bgcolor="#FFFFFF">
							<td align="right" valign="top">Projet :</td>
							<td align="left" valign="middle" colspan="1">
							<select name="selection_projet" disabled size="1" >
<?php
							echo '<option value="'.$projet.'">'.$projet .'</option>'; 
							echo '</select>'; 
?>							
							</tr>
							
							<tr bgcolor="#FFFFFF">
							<td align="right" valign="top">Schéma disponible :</td>
							<td align="left" valign="middle" colspan="1">
							<input type="text" size="12" id="date_schema" READONLY name="date_schema" value="dfds" title="DD-MM-YYYY" > 
							<input type="button" value="=" onclick="displayCalendarFor('date_schema');"></td>
							</tr>
							
							<tr bgcolor="#FFFFFF">
							<td align="right" valign="top">Début Layout :</td>
							<td align="left" valign="middle" colspan="1">
							<input type="text" size="12" id="date_debut" READONLY name="date_debut" value="fggf" title="DD-MM-YYYY" > 
							<input type="button" value="=" onclick="displayCalendarFor('date_debut');"></td>
							</tr>
							
							<tr bgcolor="#FFFFFF">
							<td align="right" valign="top">Durée prévue:</td>
							<td align="left" valign="middle" colspan="1">
							<input type="text" size="12" id="duree_jours" name="duree_jours" value="ggf" > en jours
							<input type="submit" name="calculer" value="Calculer" />
							</td>
							</td>
							</tr>

							<tr bgcolor="#FFFFFF">
							<td align="right" valign="top">Estimation:</td>
							<td align="left" valign="middle" colspan="1">
							<input type="text" size="12" id="date_fin"  READONLY name="date_fin" value="fedde" > 
							</td>
							</tr>

							<tr bgcolor="#FFFFFF">
							<td align="right" valign="top">Owner :</td>
							<td align="left" valign="middle" colspan="1">
					<!--		<input type="text" name="owner" size="30" maxlength="40" style="background-color: grey" onFocus="javascript: this.blur()" value="dgsdgs" id="">&nbsp;</td>
					-->		<input type="text" name="nom_bloc" size="30" maxlength="30" disabled value="<?php echo $owner; ?>" id="gg" >&nbsp;</td>
					
							</tr>

							<tr bgcolor="#FFFFFF">
							<td align="right" valign="top">Recommandations :</td>
							<td align="left" valign="middle" colspan="1">
							<textarea name="recommandations" rows="12" cols="70" id=""><?php echo $recommandations; ?>
							</textarea></td>
							</tr>
							
							</table>
							
							<br/><br/><br/><br/><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>
