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
| <?php
include ("ClassAppel.php");
if (!(isset($_POST["idappel"])))
{
echo "<H4>Vous devez sélectionner au moins un enregistrement !";
echo "<br><br><br><br>";
echo "<H4><a href='Javascript:history.go(-1)'>Retour à la page modifier appel(s)</a><br>";
}
else
{
echo "<form action='appel_confirm_modif.php' method='post' name='supprime' enctype='multipart/form-data'>";
echo "<table width=100% border=1 align=center>";
echo "<tr align=center bgcolor='#396BAD'>";
echo "<td colspan=5><h2><font color='white'>VOULEZ-VOUS MODIFIER CE(S) APPEL(S) ?</font></td>";
echo "</tr>";
echo "<tr align=center bgcolor=#396BAD>";
echo "<td><h4 class='h41'><font color='white'>Date et l'heure d'appel</font></td>";
echo "<td><h4 class='h41'><font color='white'>Qui appelle</font></td>";
echo "<td><h4 class='h41'><font color='white'> Nom de la personne</font></td>";
echo "<td><h4 class='h41'><font color='white'> Prénom de la personne</font></td>";
echo "</tr>";
$j=0;
for ($i=0;$i<count($_POST["idappel"]);$i++)
{
$query="select * from personne_appelante where idappel ='".$_POST["idappel"][$i]."'";
$result=mysql_query($query);
if ($j==0)
{
echo "<tr bgcolor=#D3D3D3>";
$j++;
}
else
{
echo "<tr bgcolor=#FFFFFF>";
$j--;
}
$row = mysql_fetch_array($result);
echo "<input class='text' type='hidden' name='idappel[]' value='".$row["idappel"]."'>";
echo "<td><h5><input class='text' type='text' Name='dat_appel[]' value='".$row["dat_appel"]."'></td>";
$idqui=$row['idqui_appelle'];
$query="select * from quiappelle order by quiappelle;";
$result=mysql_query($query);
$nombrelignes = mysql_num_rows($result);
if ($nombrelignes==0)
echo"il n'y a pas d'enregistrements";
else
$query="select quiappelle from quiappelle where idqui_appelle ='$idqui';";
$res=mysql_query($query) or die (mysql_error());
$qui= mysql_result($res, $row ["quiappelle"]);
{echo "<td><h5><select name='idqui_appelle[]' style='color: #FFFFFF; border: 1px solid #81A2CB; background-color: #81A2CB'></td> ";
echo "<option selected value =$idqui>$qui</option>";
for ($i=0;$i<$nombrelignes;$i++) {
$nom = mysql_result($result,$i,"quiappelle");
$id = mysql_result($result,$i,"idqui_appelle");
echo "<option value=$id> $nom </option>";
}
echo "</select>";
}
echo "<td><h5><input class='text' type='text' Name='nom[]' value='".$row["nom"]."'></td>";
echo "<td><h5><input class='text' type='text' Name='prenom[]' value='".$row["prenom"]."'></td>";
echo "<tr>";
}
echo "</table>";
echo "<br><br>";
echo "<table width=50% align=center>";
echo "<tr>";
echo "<td align=center><input class='bouton' type='submit' name='OK' value='OK'></td>";
echo "<td align=center><button onClick='Javascript:history.go(-1)'>Annuler</button></td>";
echo "</tr>";
echo "</table>";
echo "</form>";
}
?>
</body>
</html> |
Partager