FIX oubli
[cl7.git] / php / menu_droit.php
1 <?php # coding:utf-8
2
3 include_once("traitement_pre_affichage.php");
4
5
6 # selection de tous les participants
7 $res_SQL = mysql_query("SELECT pseudo FROM participants ORDER BY id");
8
9 echo '<div id="nbParticipants"><em>', mysql_num_rows($res_SQL), '</em> inscrit', (mysql_num_rows($res_SQL) > 1 ? 's' : ''), '</div>';
10
11 # affichage des participants
12 if (mysql_num_rows($res_SQL) > 0)
13 echo '<ul id="participants">';
14 for ($i=0; $i<mysql_num_rows($res_SQL); $i++)
15 {
16 mysql_data_seek($res_SQL, $i);
17 $le_participant_pseudo = mysql_fetch_object($res_SQL);
18 echo '<li>', traitement_pre_affichage($le_participant_pseudo->pseudo, 8), '</li>';
19 }
20 if (mysql_num_rows($res_SQL) > 0)
21 echo '</ul>';
22 ?>
23
24
25 <?php
26 if($le_participant->valide)
27 {
28 echo'
29 <form method="post" action="index.php?';
30
31 foreach($HTTP_GET_VARS as $nom => $valeur)
32 echo $nom,'=',$valeur,'&amp;';
33
34 echo'">
35 <p><input type="hidden" name="effacer_cookie" value="1" /></p>
36 <p><input type="submit" value="logout" /></p>
37 </form>';
38 }
39 else
40 {
41 if (isset($log)) echo '<em>[erreur de loggation]</em>';
42
43 echo'
44 <form method="post" action="index.php?';
45
46 foreach($HTTP_GET_VARS as $nom => $valeur)
47 echo $nom,'=',$valeur,'&amp;';
48
49 echo'">
50 <p>login / pass</p>
51 <p><input type="hidden" name="log" value="1" /></p>
52 <p><input type="text" name="pseudo" size="10" maxlength="30" /></p>
53 <p><input type="password" name="password" size="10" maxlength="10" /></p>
54 <p><input type="submit" value="oki" class="submitInvisible" /></p>
55 </form>
56 ';
57 }
58 ?>