<?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'); include("fotoweb46.php"); include("fotoweb19.php"); $queryPart = "SELECT * FROM participants ORDER BY 'nom' ASC"; $resultPart = mysql_query ($queryPart) or die ("La requête de sélection des Participants a échoué"); $nbPart = mysql_num_rows($resultPart);  $queryTheme = "SELECT * FROM theme ORDER BY 'nomTheme' ASC"; $resultTheme = mysql_query ($queryTheme) or die ("La requête de sélection des Themes a échoué");  ?> <html> <head> <link rel='stylesheet' href='../ergonomie/style.css'> <script language='javascript' src='script/scriptadmin.js'></script> </head> <body> <form id='formAdmin'> <br><br><br><br> <span class='textSimple'>&nbsp; &nbsp; - Cette étape permet d'autoriser l'utilisateur à consulter les photos des thèmes définis.<br> &nbsp; &nbsp; &nbsp; Sélectionnez un thème et Cochez les participants autorisés. </span> <br><br><br> &nbsp; &nbsp; &nbsp;  <?php
if ($nbPart != 0) { echo "<select id='selTheme' onChange=\"chargerParticipant(document.getElementById('selTheme').value,'$nbPart')\"><option value=''><- THEMES -></option>"; while ($lineTheme = mysql_fetch_row($resultTheme)) { $codeTheme = $lineTheme[0]; $nomTheme = $lineTheme[1]; $repertoire = getRepertoire($lineTheme[3]); echo "<option value='".$codeTheme."'>&nbsp;".$nomTheme."</option>"; } /* Free resultset */ mysql_free_result($resultTheme);  echo "</select>"; echo "<center>"; echo "<br><br>"; echo "<table border='0' width='30%'>"; echo "<tr>"; echo 	"<td width='64%' class='valeur' align='center'>&nbsp;</td>"; echo 	"<td width='12%' class='valeur' align='center'>Privé</td>"; echo 	"<td width='12%' class='valeur' align='center'>V.I.P</td>"; echo "</tr>";  $tableauNom=""; while ($linePart = mysql_fetch_row($resultPart)) { $nom = $linePart[0]; if ($nom != getValeurIni("loginAdministrateur") && ($nom != 'public')) { $tableauNom .= $nom."|"; echo "<tr>"; echo "<td class='libelle'>".$nom; echo "<td align='center'><input type='checkbox' id='chkPrive".$nom."' name='chkPrive".$nom."'  value='$nom' onClick=\"checkPriveTheme('chkPrive".$nom."');\"></td>\n"; echo "<td align='center'><input type='checkbox' id='chkVip".$nom."' name='chkVip".$nom."' value='$nom' onClick=\"checkVipTheme('chkVip".$nom."');\"></td>\n"; echo "</tr>"; } } echo "<tr><td height='30px'>&nbsp;</td></tr>"; echo "<tr><td colspan='3' align='center' class='libelle'><input type='checkbox' id='chkPublic' name='chkPublic'>TOUT PUBLIC</td>\n"; mysql_free_result($resultPart); echo "<tr height='60px' valign='bottom' align='right'>"; echo 	"<td colspan='3' align='center'>"; echo 		"<img src='../ergonomie/_images/enregistrer.gif' id='enregistrer' name='enregistrer' title='Ajoute un utilisateur' alt='Ajoute un utilisateur' style='cursor:pointer;cursor:hand' onClick=\"enregistrerHabilitationTheme('$nbPart',document.getElementById('selTheme').value,'$tableauNom','true')\">"; print		"</td>"; echo "</tr>"; } else { echo "<br><br><br>Aucun participant existant en base ..."; } ?> </table> </body> </form> </html> 