<?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é");  $queryTheme = "SELECT * FROM theme ORDER BY 'nomTheme' ASC"; $resultTheme = mysql_query ($queryTheme) or die ("La requête de sélection des Themes a échoué");  $queryMax = "SELECT MAX(codeTheme) FROM theme"; $resultMax = mysql_query ($queryMax) or die ("La requête de sélection du Max theme a échoué"); $lineMax = mysql_fetch_row($resultMax); $nbTheme = $lineMax[0]; /* Free resultset */ mysql_free_result($resultMax); ?> <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 participant et Cochez les thèmes autorisés. </span> <br><br><br> &nbsp; &nbsp; &nbsp;  <?php
if ($nbTheme != 0) { echo "<select id='selParticipant' name='selParticipant' onChange=\"chargerTheme(document.getElementById('selParticipant').value)\"><option value=''><- PARTICIPANTS -></option>"; while ($linePart = mysql_fetch_row($resultPart)) { $nom = $linePart[0]; if ($nom != getValeurIni("loginAdministrateur")) echo "<option value='".$nom."'>&nbsp;".$nom."</option>"; } /* Free resultset */ mysql_free_result($resultPart);  echo "</select>"; echo "<center>"; echo "<br><br>"; echo "<table border='0' width='35%'>"; echo "<tr>"; echo 	"<td width='64%' class='valeur' align='center'>&nbsp;</td>"; echo 	"<td width='12%' class='valeur' align='center'>Public</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>"; while ($lineTheme = mysql_fetch_row($resultTheme)) { $codeTheme = $lineTheme[0]; $nomTheme = $lineTheme[1]; if ($nom != getValeurIni("loginAdministrateur")) { echo "<tr>"; echo "<td class='libelle'>".$nomTheme; echo "<td align='center'><input type='checkbox' id='chkPublic".$codeTheme."' name='chkPublic".$codeTheme."' value='".$codeTheme."'></td>"; echo "<td align='center'><input type='checkbox' id='chkPrive".$codeTheme."' name='chkPrive".$codeTheme."' value='".$codeTheme."' onClick=\"checkPriveTheme('chkPrive".$codeTheme."')\"></td>"; echo "<td align='center'><input type='checkbox' id='chkVip".$codeTheme."' name='chkVip".$codeTheme."' value='".$codeTheme."' onClick=\"checkVipTheme('chkVip".$codeTheme."')\"></td>"; echo "</tr>"; } } /* Free resultset */ mysql_free_result($resultTheme);  echo "<tr height='60px' valign='bottom' align='right'>"; echo 	"<td colspan='2' align='center'>"; echo 		"<img src='../ergonomie/_images/enregistrer.gif' id='enregistrer' title='Ajoute un utilisateur' style='cursor:pointer;cursor:hand' onClick=\"enregistrerHabilitationParticipant('$nbTheme')\">"; print		"</td>"; echo "</tr>"; } else { echo "<br><br><br>Aucun thème existant en base ..."; } ?> </table>  </body> </form> </html> 