MOD MySQL est remplacé par PostgreSQL (fini)
[cl7.git] / php / participants.php
1 <html>
2 <head>
3 <title>Toutes les infos des participants de la corcelles-lan</title>
4 </head>
5 <body>
6 <h1>Toutes les infos des participants de la corcelles-lan</h1>
7 <?php
8
9 include('config.php');
10
11 function ON($condition)
12 {
13 return $condition ? 'Oui' : 'Non';
14 }
15
16 #connexion à la base de données
17 $conn_bd = pg_connect(sprintf("host=%s dbname=%s user=%s password=%s", $SQL_HOTE, $NOM_BASE, $SQL_LOGIN, $SQL_PASS));
18
19 $requ = pg_query("select * from participants order by pseudo");
20
21 echo
22 '<table width="100%" border="2" cellpadding="2" cellspacing="2"><tr>
23 <td><b>Pseudo</b></td>
24 <td><b>Clan</b></td>
25 <td><b>Prénom + nom</b></td>
26 <td><b>age</b></td>
27 <td><b>E-mail</b></td>
28 <td><b>N°ICQ</b></td>
29 <td><b>Souhaite participer au tournoi War3 ?</b></td>
30 <td><b>Souhaite participer au tournoi Ra3 ?</b></td>
31 <td><b>Remarque</b></td>
32 <td><b>A payé ?</b></td>
33 </tr>
34 ';
35
36 while($participant = pg_fetch_object($requ))
37 {
38 echo '<tr>',
39 '<td>',$participant->pseudo,'</td>',
40 '<td>',($participant->clan_nom==''?'':'('.$participant->clan_tag.')'.$participant->clan_nom),'</td>',
41 '<td>',$participant->prenom, ' ', $participant->nom,'</td>',
42 '<td>',$participant->age,'</td>',
43 '<td>',$participant->e_mail,'</td>',
44 '<td>',$participant->icq,'</td>',
45 '<td>',ON($participant->tournoi_war3_1),'</td>',
46 '<td>',ON($participant->tournoi_ra3_1),'</td>',
47 '<td>',$participant->remarque,'</td>',
48 '<td>',ON($participant->a_paye),'</td>',
49 '<tr>';
50 }
51 echo '</table>';
52
53 ?>
54 </body>
55 </html>