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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
<?php
echo '<pre>';
print_r($_POST);
echo '</pre>';
/*
if(isset($_POST['monform']))
{
$var1 = 'retour_pc_';
$var2 = 'retour_ecran_';
$i = 1;
while(isset($_POST[$var1.i]))
{
if($_POST[$var1.$i] == 'Oui')
{
$aData[$i]['retour_pc'] = $_POST[$var1.$i];
$aData[$i]['retour_ecran'] = $_POST[$var2.$i] ;
}
$i++;
}
}
*/
@$DateComp = date('Y-m-d',mktime(0,0,0, date('m'), date('d')-15, date('Y')));
Print $DateComp ;
?>
<html>
<head>
<title> Depart collaborateurs </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
td, th {
text-align:center;
}
</style>
<?php ?>
</head>
<body>
<table style="width:100%; font-size: 12px>
<img style="width: 94px; height: 40px; text-align: center;" alt="" src="../images/obs.gif">
<FONT size="20pt"> <b><center> Depart collaborateur</center> </b> </FONT><br /><br />
<div id="barreintro"></div>
<br /><br />
<br /><b>Depart(s) en cours :</b><br />
<tr style="font-style:bold;">
<th>Nom</th>
<th>Prenom</th>
<th>Stagiaire</th>
<th>SSTraitant</th>
<th>Resp.CO</th>
<th>Resp.CC</th>
<th>Date de fin</th>
<th>Agence</th>
<th>Retour PC</th>
<th>Retour Ecran</th>
</tr>
<?php
// Connexion a le BDD avec recup et affichage des donnees recuperees
mysql_connect("mysql.aql.fr", "psa", "psa") or die (mysql_error());
mysql_select_db("psa_test") or die (mysql_error());
$sql="SELECT
centres.lieu as lieu,
newcollab.nom,
newcollab.prenom,
newcollab.stagiaire,
newcollab.sstraitant,
newcollab.respCO,
newcollab.respCC,
newcollab.datefin
FROM centres
INNER JOIN newcollab ON newcollab.idAgence = centres.id
ORDER BY newcollab.nom ASC" ;
$req = mysql_query($sql) ;
$iCpt = 1;
?>
<form id="monform" name="monform" method="POST" action="#">
<?php
while($row = mysql_fetch_array($req)) {
?>
<tr style="font-style:bold;"><td><?php echo
htmlspecialchars($row['nom']); ?></td><td><?php echo
htmlspecialchars($row['prenom']); ?></td><td><?php echo
htmlspecialchars($row['stagiaire']); ?></td><td><?php echo
htmlspecialchars($row['sstraitant']); ?></td><td><?php echo
htmlspecialchars($row['respCO']); ?></td><td><?php echo
htmlspecialchars($row['respCC']); ?></td><td><?php echo
htmlspecialchars($row['datefin']); ?></td><td><?php echo
htmlspecialchars($row['lieu']); ?></td>
}
<td>
<input type="radio" name="retour_pc_<?php echo $iCpt;?>" value="Oui">Oui</input>
<input type="radio" name="retour_pc_<?php echo $iCpt;?>" value="Non">Non</input>
</td>
<td>
<input type="radio" name="retour_ecran_<?php echo $iCpt;?>" value="Oui">Oui</input>
<input type="radio" name="retour_ecran_<?php echo $iCpt;?>" value="Non">Non</input>
</td>
<input type="hidden" name="nom_<?php echo $iCpt;?>" value="<?php echo htmlspecialchars($row['nom']);?>" />
<input type="hidden" name="prenom_<?php echo $iCpt;?>" value="<?php echo htmlspecialchars($row['prenom']);?>" />
<?php
$iCpt++;
}
?>
<input type="submit" value="Valider"/>
</form>
<?php
mysql_close() ;
?>
</table>
</body>
</html> |
Partager