<?php
 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache');  $nbParticipant = $_GET['nbParticipant']; $codeTheme = $_GET['codeTheme'];  include("fotoweb46.php"); include("fotoweb19.php");  $queryPart = "SELECT nom FROM participants"; $resultPart = mysql_query ($queryPart) or die ("La requête de sélection des noms a échoué");  $i = 1; $tabNom = array(); while ($linePart = mysql_fetch_row($resultPart)) { $nomPers = $linePart[0]; if ($nomPers != getValeurIni("loginAdministrateur") && ($nomPers != 'public')) { $tabNom = array_pad($tabNom, $i, $nomPers); echo "if (document.getElementById('chkPrive$nomPers') != null) {"; echo 	"document.getElementById('chkPublic').checked = false;"; echo 	"document.getElementById('chkPrive$nomPers').checked = false;"; echo 	"document.getElementById('chkVip$nomPers').checked = false;"; echo "}"; $i++; } } mysql_free_result($resultPart); $queryRelation = "SELECT nomPers,niveau FROM relationthemepersonne WHERE codeTheme='$codeTheme'"; $resultRelation = mysql_query ($queryRelation) or die ("La requête de sélection des noms a échoué"); while ($lineRelation = mysql_fetch_row($resultRelation)) { $nomPers = $lineRelation[0]; $niveau = $lineRelation[1]; if ($nomPers != getValeurIni("loginAdministrateur") && ($nomPers != 'public')) { $str = ""; switch ($niveau) { case "2" : $str = "document.getElementById('chkVip$nomPers').checked = true;"; case "1" : $str .= "document.getElementById('chkPrive$nomPers').checked = true;"; break; } while (list($k, $v) = each($tabNom)) { $nom = $v; echo "if (document.getElementById('chkPrive$nom').value == '$nomPers') {"; echo 	$str; echo "}"; } reset($tabNom); } else if ($nomPers == 'public') { echo "document.getElementById('chkPublic').checked = true;"; } } mysql_free_result($resultRelation); ?> 