<?
 
//-----------------------------------------------------------------------------------------
 
// Insertion des fichiers utiles à la connexion au serveur MySQL
 
require("connexion.php");
 
 
// Insertion de la classe "liste" dans le fichier
 
require("class.liste.php");
 
 
// Création des listes déroulantes qui seront utilisées
 
$LDdis = new liste("disciplines","","cl");   // le fichier lu sera : disciplines.def.php
 
$LDcot = new liste("cotisations");           // le fichier lu sera : cotisations.def.php
 
$LDadh = new liste("adherents");             // le fichier lu sera : adherents.def.php
 
$LDpar = new liste("parisiens");             // le fichier lu sera : parisiens.def.php
 
$ZLadh = new liste("adhzlist","zladh","s");  // le fichier lu sera : adhzlist.def.php (Zone de Liste)
 
                                             // le nom de cette dernière liste sera "zladh"
 
 
// L'affichage se fera en utilisant la méthode write() de l'objet. Ex: $LDadh->write();
 
//-----------------------------------------------------------------------------------------
 
?>
 
 
<html>
 
 
<head>
 
<title>Essai de classe de liste</title>
 
<style type="text/css">
 
   body, td {font-family:ms sans serif; font-size:10pt; background-color:#D0D0D0; vertical-align:top}
 
   h1       {font-family:times new roman; font-weight:bold; font-style:italic; color:#000080}
 
   th       {font-family:ms sans serif; font-size:10pt; color:#FFFFFF; background-color:#000080}
 
   .d       {font-family:courier new; font-size:8pt}
 
   .r       {color:#FF0000}
 
   .s       {font-family:ms sans serif; font-size:9pt; color:#80FFFF; background-color:#000080}
 
   .cl      {font-family:ms sans serif; font-size:9pt; color:#000080; background-color:#FFFFA0}
 
   .sig     {font-size:8pt}
 
</style>
 
</head>
 
 
<body>
 
 
  <h1>Exemples de listes</h1>
 
 
  <form>
 
 
    <table border="1">
 
 
      <tr>
 
         <th>liste</th>
 
         <th>instanciation</th>
 
         <th>écriture</th>
 
         <th>résultat</th>
 
      </tr>
 
 
      <tr>
 
         <td> Disciplines </td>
 
         <td class="d">$LDdis = new liste("disciplines","","cl");</td>
 
         <td class="d">$LDdis->write();</td>
 
         <td><? $LDdis->write(); ?></td>
 
      </tr>
 
 
      <tr>
 
         <td> Cotisations </td>
 
         <td class="d">$LDcot = new liste("cotisations");</td>
 
         <td class="d">$LDcot->usestyle("r");<br>$LDcot->write();</td>
 
         <td><? $LDcot->usestyle("r"); $LDcot->write(); ?></td>
 
      </tr>
 
 
      <tr>
 
         <td> Adhérents </td>
 
         <td class="d">$LDadh = new liste("adherents");</td>
 
         <td class="d">$LDadh->write();</td>
 
         <td><? $LDadh->write(); ?></td>
 
      </tr>
 
 
      <tr>
 
         <td> Parisiens </td>
 
         <td class="d">$LDpar = new liste("parisiens");</td>
 
         <td class="d">$LDpar->write();</td>
 
         <td><? $LDpar->write(); ?></td>
 
      </tr>
 
 
      <tr>
 
         <td> Adhérent 9 </td>
 
         <td class="d">$LDadh = new liste("adherents");</td>
 
         <td class="d">$LDadh->write(9);</td>
 
         <td><? $LDadh->write(9); ?></td>
 
      </tr>
 
 
      <tr>
 
         <td> Adhérent 9 (affichage) </td>
 
         <td class="d">$LDadh = new liste("adherents");</td>
 
         <td class="d">$LDadh->write(9,1);</td>
 
         <td><? $LDadh->write(9,1); ?></td>
 
      </tr>
 
 
      <tr>
 
         <td valign="top"> Zone de liste adhérent </td>
 
         <td class="d">$ZLadh = new liste("adhzlist","zladh","s");</td>
 
         <td class="d">$ZLadh->write();</td>
 
         <td><? $ZLadh->write(); ?></td>
 
      </tr>
 
 
    </table><hr>
 
 
    <b>Requête 'adhérents':</b> <? echo $LDadh->display(); ?><br>
 
    <b>Nombre d'adhérents:</b>  <? echo $LDadh->nbelements(); ?><hr>
 
 
    <b>Requête 'parisiens':</b> <? echo $LDpar->display(); ?><br>
 
    <b>Nombre de parisiens:</b> <? echo $LDpar->nbelements(); ?><hr>
 
 
    <center><input type="button" value="Fermer" onclick="window.close()"></center>
 
 
  </form>
 
 
 
   <div class="sig">
 
      <hr width="300" align="left" size=1" noshade><b>$LDadh->version();</b><br>
 
      <? echo $LDadh->version(); ?>
 
   </div>
 
 
</body>
 
 
</html>
 
 |