[ Index ]

PHP Cross Reference of IEUF

title

Body

[close]

/gestion/ -> l_participants.php (source)

   1  <?php
   2  require  'inc/autorisation.inc.php';
   3  if (NonCA() && !Animateur() && !ParentDAdherent () && !Participe ()) include  'inc/404.php';
   4  include  "../inclus/connect_bd.inc.php";
   5  $tab_jour_semaine=array("Dimanche", "Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi");
   6  
   7  function AfficheListe($from_where) {
   8   ?>
   9      <table border="1" cellpadding="2" cellspacing="2" width="100%">
  10        <tbody>
  11          <tr>
  12            <td>
  13              Prénom nom
  14            </td>
  15            <td>
  16              Adresse
  17            </td>
  18            <td>
  19              Téléphones
  20            </td>
  21            <td>
  22              Adresse électronique
  23            </td>
  24          </tr>
  25            <?php
  26            $requete="SELECT personne.id as id_pers, civilite, nom, prenom, adr_rue, adr_comp, adr_cp, adr_ville, tel_dom, mobile, tel_urgence, email, email2
  27              $from_where
  28              ORDER BY nom";
  29            $res=mysql_query($requete); if ($res === false) echo mysql_error();
  30            while (($col=mysql_fetch_assoc($res))){
  31              extract($col);
  32              $tel_dom= chunk_split($tel_dom, 2, " ");
  33              $mobile= chunk_split($mobile, 2, " ");
  34              if (!empty($tel_urgence)) $tel_urgence= "Urgence : ".chunk_split($tel_urgence, 2, " ");
  35              echo "
  36              <tr>
  37              ";
  38              if (NonCA()) echo "<td>$civilite $prenom $nom</td>";
  39              else echo "<td><a href='javascript:Ouvreform($id_pers)'>$civilite $prenom $nom</a></td>";
  40              echo "
  41              <td>$adr_rue $adr_comp<br> $adr_cp $adr_ville</td>
  42              <td>$tel_dom<br>$mobile<br>$tel_urgence</td>
  43              <td>$email<br> $email2</td>
  44              </tr>
  45              ";
  46            }
  47            ?>
  48        </tbody>
  49      </table><br>
  50  <?php
  51  }
  52  
  53  ?>
  54  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  55  "http://www.w3.org/TR/html4/strict.dtd">
  56  <html>
  57    <head>
  58      <meta name="generator" content="HTML Tidy for Windows (vers 12 April 2005), see www.w3.org">
  59      <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  60      <title>
  61        Liste des participants à l'atelier
  62      </title>
  63    <script language="JavaScript" type="text/JavaScript" src="ouvr_pers.js">
  64    </script>
  65    <script language="JavaScript" type="text/JavaScript">
  66      <!--
  67      function ReAffiche() {
  68        self.location.reload(true);
  69      }
  70      //-->
  71      </script>
  72  
  73  <style type="text/css">
  74  body {
  75    font-family: Arial,Helvetica,sans-serif;
  76    font-size: 10pt;
  77  }
  78  h1 {
  79    line-height: 16px;
  80    margin-top: 16px;
  81  }
  82  h2 {
  83    line-height: 0px;
  84  }
  85  
  86  </style>
  87    </head>
  88    <body>
  89      <?php
  90      if (!isset($_GET['id']))exit;
  91      $id=$_GET['id'];
  92      $id=$id*1;
  93      $requete="SELECT lettre, intitule, lieu_nom, lieu_rue, lieu_compl, lieu_cp, lieu_ville, lieu_tel,
  94          DATE_FORMAT(heure_deb,'%kh %i') as heure_deb, DATE_FORMAT(heure_fin,'%kh %i') as heure_fin, jour_repet
  95        FROM atelier WHERE id='$id'";
  96      $res=mysql_query($requete); if ($res === false) echo mysql_error();
  97      if (($col=mysql_fetch_assoc($res)))
  98        extract($col);
  99      else exit;
 100      ?>
 101      <h1 align="left">
 102        Atelier : <?php echo $lettre?>
 103      </h1>Répétitions : le <?php echo $tab_jour_semaine[$jour_repet]." de $heure_deb à $heure_fin, $lieu_nom, $lieu_rue
 104      $lieu_compl, $lieu_cp $lieu_ville (Tel. gardien: $lieu_tel)"; ?><br>
 105      <h2>
 106        Liste des participants :
 107      </h2>
 108      <?php
 109      AfficheListe("
 110              FROM personne, adhesion, participe
 111              WHERE participe.id_atelier=$id AND participe.id_adh=adhesion.id AND adhesion.id_perso=personne.id
 112      ");
 113      ?>
 114      <h2>
 115        Liste des participants en attente :
 116      </h2>
 117      <?php
 118      AfficheListe("
 119              FROM personne, attente
 120              WHERE attente.id_atelier=$id AND attente.id_perso=personne.id
 121      ");
 122      ?>
 123      <h2>
 124        Animateurs :
 125      </h2>
 126      <table border="1" cellpadding="2" cellspacing="2" width="70%">
 127        <tbody>
 128          <tr>
 129            <td>
 130              Prénom nom
 131            </td>
 132            <td>
 133              Téléphone
 134            </td>
 135            <td>
 136              Adresse électronique
 137            </td>
 138          </tr>
 139            <?php
 140            $requetanim="SELECT civilite, nom, prenom, mobile, email
 141              FROM personne, animateur, anime
 142              WHERE anime.id_atelier=$id AND anime.id_animateur=animateur.id AND animateur.id_perso=personne.id
 143              ORDER BY nom";
 144            $resanim=mysql_query($requetanim); if ($resanim === false) echo mysql_error();
 145            while (($col=mysql_fetch_assoc($resanim))){
 146              extract($col);
 147              $mobile= chunk_split($mobile, 2, " ");
 148              echo "
 149              <tr>
 150              <td>$civilite $prenom $nom</td>
 151              <td>$mobile</td>
 152              <td>$email</td>
 153              </tr>
 154              ";
 155            }
 156            ?>
 157        </tbody>
 158      </table><br>
 159    </body>
 160  </html>


Generated: Fri Jan 31 19:59:00 2014 Cross-referenced by PHPXref 0.7.1