コード例 #1
0
ファイル: livre.php プロジェクト: BackupTheBerlios/blr
     echo '<p><a href="moderation.php?objet=livre&amp;numLivre=' . $livre->numLivre . '"><img src="icones/valider.png" />Valider</a>';
     echo ' | <a href="supprimer.php?objet=livre&amp;numLivre=' . $livre->numLivre . '"><img src="icones/supprimer.png" />Supprimer</a></p>';
     echo '</div>';
 } elseif ($livre->valider == 0 && !empty($livre->dossierSouhaite)) {
     echo '<div class="validation">';
     echo '<p><a href="moderation.php?objet=livre&amp;numLivre=' . $livre->numLivre . '"><img src="icones/valider.png" />Valider dans le dossier courant</a>';
     echo ' | <a href="moderation.php?objet=livreSousDossier&amp;numLivre=' . $livre->numLivre . '"><img src="icones/valider.png" />Valider dans le sous-dossier <strong>' . $livre->dossierSouhaite . '</strong></a>';
     echo ' | <a href="supprimer.php?objet=livre&amp;numLivre=' . $livre->numLivre . '"><img src="icones/supprimer.png" />Supprimer</a></p>';
     echo '</div>';
 }
 // Affichage des commentaires
 echo '<div class="commentaire">';
 echo 'Commentaire :<br /><br />';
 $livre->listeCommentaire();
 while ($livre->commentaireSuivantExiste()) {
     $commentaireCourant = $livre->commentaireSuivant();
     if (isset($_SESSION['login'])) {
         echo '<a href="supprimer.php?objet=commentaire&numCommentaire=' . $commentaireCourant->numCommentaire . '"><img src="icones/supprimer.png" /></a> ';
     }
     echo 'Auteur : ' . htmlentities($commentaireCourant->auteur) . ' | Note : ' . htmlentities($commentaireCourant->note) . '<br />';
     echo htmlentities($commentaireCourant->commentaire) . '<br /><br />';
 }
 // Formulaire d'insertion de commentaire
 ?>
 <form id="ajoutCommentaire" method="post" action="ajouter.php?objet=commentaire">
     <p>
         Votre nom :<br />
         <input name="nom" type="text" id="nom" /><br />
         Votre commentaire concernant ce livre <br />    
         <textarea name="commentaire" cols="72" rows="5" id="commentaire"></textarea><br />
         La note &agrave; donner au livre.<br />
コード例 #2
0
ファイル: io.class.php プロジェクト: BackupTheBerlios/blr
function commentaireLivre($numLivre)
{
    $listeCommentaire = '';
    $livre = new Livre($numLivre);
    $livre->listeCommentaire();
    while ($livre->commentaireSuivantExiste()) {
        $commentaireCourant = $livre->commentaireSuivant();
        $listeCommentaire .= '<commentaire><auteur>' . $commentaireCourant->auteur . '</auteur><note>' . $commentaireCourant->note . '</note>';
        $listeCommentaire .= '<texte>' . $commentaireCourant->commentaire . '</texte>';
        $listeCommentaire .= '</commentaire>';
    }
    return $listeCommentaire;
}