summaryrefslogtreecommitdiff
path: root/maquette/poppersonne.php
blob: 1f739e4f88f5eda2de7fdb9cdc5de0c1818974f5 (plain)
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
<?php require_once('connect.inc.php'); ?>
<h2>Participants de la r&eacute;union</h2>
<div class="popup_contenu">
<form id="formpersonne" action="<?php $_GLOBAL['php_self']; ?>" method="get" onsubmit="return dataListe('participants','dataParticipants');">
<table>
<tr>
<td>Contacts disponibles </td>
<td>&nbsp;</td>
<td>Participants </td>
</tr>
<tr>
<td>
<select name="listeDispo" id="listeDispo" onChange="loadlist('poppersonneliste.php?idL=','listeDispo','divListe');">
<option value="None">Choisir ...</option>
<option value="Tous">Tous</option>
<?php 
	$result = mysql_query("SELECT DISTINCT L.idL,L.libelleL FROM Liste L,Reunion R WHERE L.estPrivee='non' OR (L.idP_Createur=R.idP_Orga AND R.idR=".$_GET['idR'].");");
	if (mysql_num_rows($result)>0)
	{
		for($i=0;$i<mysql_num_rows($result);$i++)
		{
			$row = mysql_fetch_array($result);
			echo '<option value="'.$row[0].'" onDblClick="addPers(this.form);">';
			echo $row[1];
			echo '</option>';
		}
	}
?>
</select>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<div id="divListe">
</div>
</td>
<td><input name="AjouterParticipant" type="button" id="AjouterParticipant" value="Ajouter" onclick="addPers(this.form);"/>
<br/>
<br/>
<input name="supprimerParticipant" type="button" id="supprimerParticipant" value="Retirer" onclick="removePers(this.form);"/></td>
<td>
<select name="participants" size="10" id="participants">
<?php 
	$result = mysql_query("SELECT P.idP,P.courrielP,P.nomP,P.prenomP FROM Personne P,Reunion R,Appartenir A WHERE P.idP=A.idP AND A.idL=R.idL AND R.idR=".$_GET['idR']);
	if (mysql_num_rows($result)>0)
	{
		for($i=0;$i<mysql_num_rows($result);$i++)
		{
			$row = mysql_fetch_array($result);
			echo '<option value="'.$row[0].'">';
			echo $row[2] . " " . $row[3];
			echo '</option>';
		}
	}
?>
</select>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><a href="#popnew" class="pop">Ajouter une personne</a></td>
</tr>
</table>
<br/>
<input type="hidden" name="idR" value="<?php echo $_GET['idR'];?>" />
<input type="submit" name="Submit" value="Valider" /><input type="button" value="Fermer" onclick="popoff('poppersonne');" />
</form>
</div>