コード例 #1
0
 public function view()
 {
     $b = new T_e_jeuvideo_jeu(parameters()["id"]);
     $nbAvis = count(T_e_avis_avi::FindAll($b->jeu_id));
     for ($i = 0; $i < $nbAvis; $i++) {
         if (isset($_POST['pouce_id_avi' . $i]) && isset($_POST['pouce_id_cli' . $i]) && isset($_POST['submit_vert' . $i])) {
             if (T_j_avisrecommande_avr::countAvisrByClient($_POST['pouce_id_avi' . $i], $_POST['pouce_id_cli' . $i]) != 0) {
                 T_j_avisrecommande_avr::deleteD($_POST['pouce_id_avi' . $i], $_POST['pouce_id_cli' . $i]);
             } else {
                 if (T_j_avisdeconseille_avd::countAvisdByClient($_POST['pouce_id_avi' . $i], $_POST['pouce_id_cli' . $i]) != 0) {
                     T_j_avisdeconseille_avd::deleteD($_POST['pouce_id_avi' . $i], $_POST['pouce_id_cli' . $i]);
                 }
                 $recommend = new T_j_avisrecommande_avr($_POST['pouce_id_avi' . $i], $_POST['pouce_id_cli' . $i]);
             }
         }
     }
     for ($i = 0; $i < $nbAvis; $i++) {
         if (isset($_POST['rpouce_id_avi' . $i]) && isset($_POST['rpouce_id_cli' . $i]) && isset($_POST['submit_rouge' . $i])) {
             if (T_j_avisdeconseille_avd::countAvisdByClient($_POST['rpouce_id_avi' . $i], $_POST['rpouce_id_cli' . $i]) != 0) {
                 T_j_avisdeconseille_avd::deleteD($_POST['rpouce_id_avi' . $i], $_POST['rpouce_id_cli' . $i]);
             } else {
                 if (T_j_avisrecommande_avr::countAvisrByClient($_POST['rpouce_id_avi' . $i], $_POST['rpouce_id_cli' . $i]) != 0) {
                     T_j_avisrecommande_avr::deleteD($_POST['rpouce_id_avi' . $i], $_POST['rpouce_id_cli' . $i]);
                 }
                 $recommend = new T_j_avisdeconseille_avd($_POST['rpouce_id_avi' . $i], $_POST['rpouce_id_cli' . $i]);
             }
         }
     }
     $this->render("view", $b);
 }
コード例 #2
0
ファイル: view.php プロジェクト: js-dev88/sprints
            		}*/
            echo "<source src=\"" . $video->vid_url . "\" type=\"video/mp4\">";
            echo "</video>";
        } else {
            echo "<iframe width=\"560\" height=\"315\" src=\"" . $video->vid_url . "\" frameborder=\"0\" allowfullscreen ></iframe>";
        }
        echo "</div>";
    }
}
?>

<hr>
<h2><a name="avis" id="avis">Avis</a></h2>
<hr>
<?php 
foreach (T_e_avis_avi::FindAll() as $avi) {
    if ($avi->jeu_id == $data->jeu_id) {
        $client = new T_e_client_cli($avi->cli_id);
        echo "<div class='customer-name'>";
        echo "<p class='avis_p'>" . $client->cli_pseudo . "</p>";
        echo "<p class='avis_p'>Posté le : " . date("d-m-Y", strtotime($avi->avi_date)) . "</p>";
        echo "<span class='star S" . $avi->avi_note . "'></span>";
        echo "</div>";
        echo "<div class='customer-text'>";
        echo "<h4>" . $avi->avi_titre . "</h4>";
        echo "<p class='avis_p'>" . $avi->avi_detail . "</p>";
        echo "</div>";
        echo "<hr class='hr_avis'>";
    }
}
?>
コード例 #3
0
ファイル: search.php プロジェクト: js-dev88/sprints
if (empty($data)) {
    echo "Aucun jeu ne correspond à votre recherche";
} else {
    foreach ($data as $t_e_jeuvideo_jeu) {
        echo "<tr>";
        echo "<td><a href=\"?r=t_e_jeuvideo_jeu/view&id=" . $t_e_jeuvideo_jeu->jeu_id . "\">";
        foreach (T_e_photo_pho::FindAll() as $photo) {
            if ($photo->jeu_id == $t_e_jeuvideo_jeu->jeu_id) {
                echo "<img src=\"" . $photo->pho_url . "\"/></a>";
                break;
            }
        }
        $moyavis = 0;
        $nbAvis = count(T_e_avis_avi::FindAll($t_e_jeuvideo_jeu->jeu_id));
        echo "<p>Avis (" . $nbAvis . ")</p>";
        foreach (T_e_avis_avi::FindAll($t_e_jeuvideo_jeu->jeu_id) as $avis) {
            $moyavis += $avis->avi_note;
        }
        if ($nbAvis != 0) {
            $moyavis = $moyavis / $nbAvis;
        } else {
            $moyavis = 0;
        }
        echo "<p> Note Clients </p><span id='view_span' class='star S" . round($moyavis) . "'></span>";
        echo "</a></td>";
        echo "<td id='td_Central_Search'>" . "<h3><a href=\"?r=t_e_jeuvideo_jeu/view&id=" . $t_e_jeuvideo_jeu->jeu_id . "\">" . $t_e_jeuvideo_jeu->jeu_nom . "</h3></a>";
        $date = date("d-m-Y", strtotime($t_e_jeuvideo_jeu->jeu_dateparution));
        echo "<br/>";
        echo "<p>Date de parution : " . $date . "</p>";
        $consoleNom = new T_r_console_con($t_e_jeuvideo_jeu->con_id);
        $consoleNom = $consoleNom->con_nom;