Exemplo n.º 1
0
            <th style="width: 25px">*</th>
            <th style="width:100%;">User reviews</th>
            <th style="white-space:nowrap;">Review by</th>
            <?php 
$query = new UserReviewQuery();
$query->filterByPlatform($platform);
$reviews = $query->findByGameId($game->getId());
if ($reviews->count() == 0) {
    echo '<tr><td></td><td>No reviews submitted for this platform...</td><td></td></tr>';
}
foreach ($reviews as $review) {
    $rating = $review->getRating();
    if ($rating == null) {
        exit;
    }
    $review_user = $review->getUser();
    echo '<tr><td>';
    echo '<img src="img/badges/' . $rating->getInitial() . '_tiny.jpg" alt="' . $rating->getTitle() . '" height="20"></td>';
    echo '<td >' . htmlspecialchars($review->getReview()) . '</td>';
    echo '<td><a href="https://www.reddit.com/user/' . $review_user->getUsername() . '/">/u/' . $review_user->getUsername() . '</a></td></tr>';
}
?>
        </table>
        <?php 
if (Auth::checkIfAuthenticated()) {
    ?>
            <form action="" method="POST">
                <?php 
    $review = UserReview::getUserReview($game, $platform, $user);
    ?>
                <div class="form-group">