1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| <form action="crea.php" method="post">
Entrez la Date <input type="button" value="Calendrier" onClick="displayCalendar(document.forms[0].date,'dd/mm/yyyy',this)">
<input readonly type="text" name="date" value=""><br>
<table width="548" border="0">
<tr><td width="36"></td>
<td width="234"> </td>
<td width="130">Matin</td>
<td width="130">Après-midi</td>
</tr>
<tr></table>
<?php
while( $result = mysql_fetch_object( $users ) )
{
?>
<table width="548" border="1">
<td>Agent:</td>
<td><input type="text" size="20" name="agent<?php echo $indice;?>" value="<?php echo ($result->nom);?> <?php echo ($result->prenom);?>"></td>
<td><select name="etat_mat<?php echo $indice;?>">
<option>Présent</option>
<option>Congès Annuels</option>
<option>Maladie</option>
</select></td>
<td><select name="etat_ap<?php echo $indice;?>">
<option>Présent</option>
<option>Congès Annuels</option>
<option>Maladie</option>
</select></td>
</tr>
<input type="hidden" name="nchrono<?php echo $indice;?>" value="<?php echo ($result->nchrono);?>">
<input type="hidden" name="login<?php echo $indice;?>" value="<?php echo ($result->login);?>">
<input type="hidden" name="lservice<?php echo $indice;?>" value="<?php echo ($result->lservice);?>">
<?php
$indice++;
}
?>
<input type="hidden" name="numIndice" value="<?php echo $indice;?>"/>
</table>
<input type="submit" value="valider" name="valider">
<?php
if(isset($_POST["valider"]))
{
if(!isset($_POST["date"]) || $_POST["date"]=="")
{
$date = "Ce champ doit être renseigné.";
}
else {
header('location:crea.php');
}
}
?>
<input type="submit" value="Mise à jour" name="maj">
</form> |
Partager