function afficherListePhotos()
 {
     //requete sql
     if ($this->numpara) {
         $result = mysql_query("SELECT numphoto,legende,numparaphoto FROM if_para_photo WHERE numpara='{$this->numpara}' ORDER BY ordre");
         while ($row = mysql_fetch_row($result)) {
             $unePhoto = new Photo();
             $unePhoto->numphoto = $row[0];
             $unePhoto->legendePhoto = $row[1];
             $unePhoto->numparaphoto = $row[2];
             $unePhoto->infosPhoto();
             $this->photos[] = $unePhoto;
         }
     } else {
         $result = mysql_query("SELECT numphoto FROM if_photo ORDER BY nom_photo");
         while ($row = mysql_fetch_row($result)) {
             $unePhoto = new Photo();
             $unePhoto->numphoto = $row[0];
             $unePhoto->infosPhoto();
             $this->photos[] = $unePhoto;
         }
     }
     if (count($this->photos) >= 1) {
         return true;
     }
 }
if ($numlien) {
    $leLien = new Lien();
    $leLien->numlien = $numlien;
    $leLien->infosLien();
} else {
    if ($numfichier) {
        $leFichier = new Fichier();
        $leFichier->numfichier = $numfichier;
        $leFichier->numparafichier = $numparafichier;
        $leFichier->infosFichier();
    } else {
        if ($numphoto) {
            $laPhoto = new Photo();
            $laPhoto->numphoto = $numphoto;
            $laPhoto->numparaphoto = $numparaphoto;
            $laPhoto->infosPhoto();
        } else {
            if ($numvideo) {
                $laVideo = new Video();
                $laVideo->numvideo = $numvideo;
                $laVideo->numparavideo = $numparavideo;
                $laVideo->infosVideo();
            }
        }
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Example #3
0
 /**
  * Va r&eacute;p&eacute;rer toutes les infos concernant la page.
  * Va remplir toutes les propriétés de l'objet page pas leur équivalent dans la Bdd.
  */
 function infosPage()
 {
     if ($this->numpage) {
         $row = SelectMultiple("if_page", "numpage", $this->numpage);
     } else {
         $row = SelectMultiple("if_page", "accueil_site", "o", "AND publiee='o' AND lg='{$this->lg}'");
         $this->numpage = $row["numpage"];
     }
     $this->lg = $row["lg"];
     $this->nomPageGoogle = $row["nom"];
     $this->titrePage = miseEnForme($row["titre"]);
     $this->descrPage = $row["description"];
     $this->keywPage = $row["keywords"];
     $this->aliasPage = $row["alias"];
     $this->hcreaPage = $row["hcrea"];
     $this->hmodifPage = $row["hmodif"];
     $this->publiePage = $row["publiee"];
     $this->accueilPage = $row["accueil"];
     $this->accueilSite = $row["accueil_site"];
     $this->id_c = $row["iduti_c"];
     $this->id_m = $row["iduti_m"];
     if ($row["iduti_m"]) {
         $riw = SelectMultiple("if_utilisateur", "iduti", $row["iduti_m"]);
     } else {
         $riw = SelectMultiple("if_utilisateur", "iduti", $row["iduti_c"]);
     }
     $this->auteur = $riw["prenom"] . " " . $riw["nom"];
     $this->nomFichier = $row["specifique"];
     //La bandeau photo de la page
     $laPhoto = new Photo();
     $laPhoto->numphoto = $row["numphoto"];
     $laPhoto->infosPhoto();
     $this->nomPhoto = $laPhoto->nomPhoto;
     //A quelles rubriques, catégories, et sous-catégories est liée la page ?
     $leMenu = new Menu();
     $leMenu->type = "sscateg";
     $leMenu->champ = "numpage";
     $leMenu->valeur = $this->numpage;
     $row = $leMenu->isMenu();
     $result = mysql_query("SELECT if_categorie.numrub,if_sscateg.numcateg,if_sscateg.numsscateg FROM if_categorie,if_sscateg WHERE if_sscateg.numpage='{$this->numpage}' AND if_sscateg.numcateg=if_categorie.numcateg");
     if (mysql_numrows($result) > 0) {
         while ($row = mysql_fetch_row($result)) {
             $this->list_numsscateg[] = $row[2];
             $this->numsscateg = $row[2];
             $this->numcateg = $row[1];
             $this->numrub = $row[0];
         }
     }
     $result = mysql_query("SELECT numrub,numcateg FROM if_categorie WHERE numpage='{$this->numpage}'");
     if (mysql_numrows($result) > 0) {
         while ($row = mysql_fetch_row($result)) {
             $this->list_numcateg[] = $row[1];
             if (!$this->numcateg) {
                 $this->numcateg = $row[1];
             }
             if (!$this->numrub) {
                 $this->numrub = $row[0];
             }
         }
     }
     $result = mysql_query("SELECT numrub FROM if_rubrique WHERE numpage='{$this->numpage}'");
     if (mysql_numrows($result) > 0) {
         while ($row = mysql_fetch_row($result)) {
             $this->list_numrub[] = $row[0];
             if (!$this->numrub) {
                 $this->numrub = $row[0];
             }
         }
         //fin du while
     }
     //fin du if
 }