284 lines
8.0 KiB
PHP
Executable File
284 lines
8.0 KiB
PHP
Executable File
<?php
|
|
session_start();
|
|
/* test si une session joueur est lancée */
|
|
if((isset($_SESSION['Id_joueur'])==true) && ($_SESSION['Id_joueur']!=0))
|
|
{
|
|
$id_joueur=$_SESSION['Id_joueur'];
|
|
include("top.php");
|
|
}
|
|
$id_tournoi=$_GET['id_tournoi'];
|
|
echo"<body background='images/balle_raquette3.jpg'>";
|
|
include("conf.php");
|
|
include("mysql_compat.php");
|
|
include("conf.php");
|
|
$db_connection=mysql_connect($db_host,$db_user,$password);
|
|
mysql_select_db($db_name,$db_connection);
|
|
|
|
$requete="SELECT gains,id_jugearbitre,id_club,debut,fin, nom, prix_2tableaux, date_cloture, prix_jeune_senior, date_reduc, reduction FROM tournoi WHERE tournoi.id_tournoi=$id_tournoi";
|
|
$reponse=mysql_query($requete,$db_connection) or die ("Erreur no".mysql_errno()." : ".mysql_error()."<br>");
|
|
$tournoi=mysql_fetch_object($reponse);
|
|
|
|
$requete="SELECT * FROM juge_arbitre WHERE id_ja=$tournoi->id_jugearbitre";
|
|
$reponse=mysql_query($requete,$db_connection) or die ("Erreur no".mysql_errno()." : ".mysql_error()."<br>");
|
|
$ja=mysql_fetch_object($reponse);
|
|
|
|
$requete="SELECT club.nom ,club.telephone FROM club WHERE club.id_club=$tournoi->id_club";
|
|
$reponse=mysql_query($requete,$db_connection) or die ("Erreur no".mysql_errno()." : ".mysql_error()."<br>");
|
|
$club=mysql_fetch_object($reponse);
|
|
|
|
$debut_exp = explode('-',$tournoi->debut);
|
|
$fin_exp = explode('-',$tournoi->fin);
|
|
list($a, $m, $j)=explode("-", $tournoi->date_cloture);
|
|
$cloture="$j/$m/$a";
|
|
$date_jour=getdate();
|
|
//////////////////////POUR TOUTES LES REPONSES ON VERIFIE SI LA DATE EST DEPASSEE///////////////////////
|
|
if ($['']>$fin_exp[0]) {
|
|
$tard=1;
|
|
}
|
|
else if($['']>=$fin_exp[0] and $['']>$fin_exp[1]) {
|
|
$tard=1;
|
|
}
|
|
else if($['']>=$fin_exp[0] and $['']>=$fin_exp[1] and $['']>$fin_exp[2]) {
|
|
$tard=1;
|
|
}
|
|
else {
|
|
$tard=0;
|
|
}
|
|
|
|
|
|
$titre="Information sur le tournoi";
|
|
include("enTete.php");
|
|
echo"<BODY><CENTER><H1 ALIGN='CENTER'><FONT COLOR='#ff1105'>$club->nom</FONT></H1>
|
|
</CENTER>";
|
|
echo"<CENTER><H1 ALIGN='CENTER'>$tournoi->nom</H1>
|
|
</CENTER><CENTER><H1 ALIGN='CENTER'>";
|
|
$debut=explode("-",$tournoi->debut);
|
|
$fin=explode("-",$tournoi->fin);
|
|
if ($tard){
|
|
/////////////SI DATE DEPASSEE AFFICHE MESSAGE DATE DEPASSEE///////////////
|
|
echo "<center><font color=00ff00><h3><b>Le tournoi est terminé.</b></h3></font></center>";
|
|
}
|
|
echo"<FONT COLOR='#ff1a0e'> ".$debut[2]."/".$debut[1]."/".$debut[0]." au " .$fin[2]."/".$fin[1]."/".$fin[0]."</FONT></H1>
|
|
</CENTER>";
|
|
|
|
$requete="SELECT id_categorie, prix FROM categories_par_tournoi WHERE categories_par_tournoi.id_tournoi=$id_tournoi";
|
|
$reponse=mysql_query($requete,$db_connection) or die ("Erreur no".mysql_errno()." : ".mysql_error()."<br>");
|
|
echo"<center><H4>Inscription possible dans les catégories suivantes :</H4><table border bgcolor='#FFFFFF'><tr><td>Catégories</td>";
|
|
$prix_senior=0;
|
|
$prix_jeune=0;
|
|
$prix_js=$tournoi->prix_jeune_senior;
|
|
$prix_2tab=$tournoi->prix_2tab;
|
|
$prix_double=0;
|
|
while($categorie=mysql_fetch_object($reponse))
|
|
{
|
|
if ($categorie->id_categorie ==1)
|
|
{
|
|
$Categorie='Adulte homme seniors';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==2)
|
|
{
|
|
$Categorie='Adulte femme seniors';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==3)
|
|
{
|
|
$Categorie='jeune homme -12ans';
|
|
$prix_jeune=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==4)
|
|
{
|
|
$Categorie='jeune femme -12ans';
|
|
$prix_jeune=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==5)
|
|
{
|
|
$Categorie='jeune homme -14ans';
|
|
$prix_jeune=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==6)
|
|
{
|
|
$Categorie='jeune femme -14ans';
|
|
$prix_jeune=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==7)
|
|
{
|
|
$Categorie='Adulte homme +35ans';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==8)
|
|
{
|
|
$Categorie='Adulte femme +35ans';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==9)
|
|
{
|
|
$Categorie='Adulte homme +40 ans';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==10)
|
|
{
|
|
$Categorie='Adulte femme +40 ans';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==11)
|
|
{
|
|
$Categorie='Adulte homme +45ans';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==12)
|
|
{
|
|
$Categorie='Adulte femme +45 ans';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==13)
|
|
{
|
|
$Categorie='Adulte homme +50 ans';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==14)
|
|
{
|
|
$Categorie='Adulte femme +50 ans';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==15)
|
|
{
|
|
$Categorie='Adulte homme +55 ans';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==16)
|
|
{
|
|
$Categorie='Adulte femme +55 ans';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==17)
|
|
{
|
|
$Categorie='Adulte homme +60 ans';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==18)
|
|
{
|
|
$Categorie='Adulte femme +60 ans';
|
|
$prix_senior=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==19)
|
|
{
|
|
$Categorie='Jeune homme -8ans';
|
|
$prix_jeune=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==20)
|
|
{
|
|
$Categorie='Jeune femme -8ans';
|
|
$prix_jeune=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==21)
|
|
{
|
|
$Categorie='Jeune homme -10ans';
|
|
$prix_jeune=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==22)
|
|
{
|
|
$Categorie='Jeune femme -10ans';
|
|
$prix_jeune=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==23)
|
|
{
|
|
$Categorie='Jeune homme -16ans';
|
|
$prix_jeune=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==24)
|
|
{
|
|
$Categorie='Jeune femme -16ans';
|
|
$prix_jeune=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==25)
|
|
{
|
|
$Categorie='Jeune homme -18ans';
|
|
$prix_jeune=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==26)
|
|
{
|
|
$Categorie='Jeune femme -18ans';
|
|
$prix_jeune=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==27)
|
|
{
|
|
$Categorie='Double homme';
|
|
$prix_double=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==28)
|
|
{
|
|
$Categorie='Double femme';
|
|
$prix_double=$categorie->prix;
|
|
}
|
|
if ($categorie->id_categorie ==29)
|
|
{
|
|
$Categorie='Double mixte';
|
|
$prix_double=$categorie->prix;
|
|
}
|
|
|
|
echo"<tr><td><ul><img src='images/tenball2.gif' />$Categorie</ul></td>";
|
|
}
|
|
echo"</tr></table></center>";
|
|
echo "<br /><br />";
|
|
?>
|
|
<table border="1" align="center" width="50 %" bgcolor='#FFFFFF'>
|
|
<th>Prix jeune</th><th>Prix jeune sénior</th><th>Prix sénior</th><th>Prix doubles</th><th>Prix pour 2 tableaux</th>
|
|
<tr>
|
|
<?php
|
|
if($prix_jeune > 0) {
|
|
echo "<td align='center'>$prix_jeune €</td>";
|
|
}
|
|
else {
|
|
echo "<td> </td>";
|
|
}
|
|
if($prix_js > 0) {
|
|
echo "<td align='center'>$prix_js €</td>";
|
|
}
|
|
else {
|
|
echo "<td> </td>";
|
|
}
|
|
if($prix_senior > 0) {
|
|
echo "<td align='center'>$prix_senior €</td>";
|
|
}
|
|
else {
|
|
echo "<td> </td>";
|
|
}
|
|
if($prix_double > 0) {
|
|
echo "<td align='center'>$prix_double €</td>";
|
|
}
|
|
else {
|
|
echo "<td> </td>";
|
|
}
|
|
if($tournoi->prix_2tableaux > 0) {
|
|
echo "<td align='center'>$tournoi->prix_2tableaux €</td>";
|
|
}
|
|
else {
|
|
echo "<td> </td>";
|
|
}
|
|
?>
|
|
</tr>
|
|
</table>
|
|
<?php
|
|
if($tournoi->date_reduc != "0000-00-00" && $tournoi->reduction > 0) {
|
|
list($a, $m, $j)=explode("-", $tournoi->date_reduc);
|
|
echo "<br /><font size='4'><center><strong>Réduction des tarifs d'inscription de $tournoi->reduction% si inscription avant le $j/$m/$a.</strong></center></font>";
|
|
}
|
|
echo"<CENTER><H4 ALIGN='CENTER'>DATE DE CLOTURE DES ENGAGEMENTS : $cloture</H4></CENTER>";
|
|
echo"<CENTER><H3 ALIGN='CENTER'>PRIX : ";
|
|
if($tournoi->gains > 0) {
|
|
echo "$tournoi->gains € + ";
|
|
}
|
|
echo "LOTS</H3></CENTER>";
|
|
if(!((isset($_SESSION['Id_joueur'])==true) and ($_SESSION['Id_joueur']!=0)))
|
|
{
|
|
echo"<CENTER><P ALIGN='CENTER'><A HREF='connexion.php'><IMG SRC='button1.gif' ALIGN='TOP'></A></P>";
|
|
}
|
|
echo"</CENTER><CENTER><H4 ALIGN='CENTER'>Autres infos :</H4></CENTER>";
|
|
echo"<CENTER><H3 ALIGN='CENTER'>$tournoi->engagement</H3></CENTER>";
|
|
echo"<CENTER><H3 ALIGN='CENTER'>tel club: $club->telephone</H3></CENTER>";
|
|
echo"<CENTER><H3 ALIGN='CENTER'>JUGE ARBITRE : $ja->nom</H3></CENTER></BODY>";?>
|
|
|
|
|
|
<?php include("piedDePage.php");?>
|