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
| <html>
<head>
<script>
function test()
{
document.nom.submit();
}
</script>
</head>
<body>
<?php
include("../connexion.php");
include("menu.php");
$sql = "select * from tadherents, tcontacts where (idmembrep='$vid' and idadherent=idmembref and accepte='oui') or (idmembref='$vid' and idadherent=idmembrep and accepte='oui' )";
$compte="select * from tadherents, tcontacts where (idmembrep='$vid' and idadherent=idmembref and accepte='oui') or (idmembref='$vid' and idadherent=idmembrep and accepte='oui')";
$result = mysql_query($sql);
$result2=mysql_query($compte);
$vtotal = mysql_num_rows($result2);
?>
<TABLE align=center class="toprow">
<caption><font size=4 color='#006BAC'>Mes contacts<?php if ($vtotal>0){echo "($vtotal)";}?></font>
<TR>
<TD width=100>Nom</TD>
<TD width=100>Prénom</TD>
<TD width=100>Photo</TD>
<TD width=100>Catégorie</TD>
</TR>
<?php
while($vligne = mysql_fetch_array($result))
{
$vcategorie = $vligne['idcatp'];
?>
<TR>
<TD>
<?php
$SQL = "SELECT * FROM tcategories_contacts";
$res = mysql_query($SQL);
?>
<form name="nom" action="test.php">
<select onclick="test()">
<?php
while($val=mysql_fetch_array($res))
{
if ($vcategorie==$val['idcategorie_contact'])
{
echo "<option selected value=".$val['idcategorie_contact'].">".$val['libcategorie_contact']."</option>\n";
}
else
{
echo "<option value=".$val['idcategorie_contact'].">".$val['libcategorie_contact']."</option>\n";
}
}
?>
</select>
</form>
</TD>
<?php } ?>
</TR>
</table>
</body>
</html> |
Partager