function display_results()
{
    $search = $_GET['q'];
    $results = get_person_results($search);
    //<div class="well">
    //<?php echo $querystr; ? >
    //</div>
    // display person results
    ?>
    
    <div class="container">
        <h3 style="display:inline-block">People</h3>

        <table class="table table-striped adv-table-results" cellspacing="0" width="100%">
            <thead>
                <tr>
                    <th>Person</th>
                    <th>Country</th>
                    <th>DOB</th>
                </tr>
            </thead> 
            <tbody>
                <?php 
    foreach ($results as $row) {
        ?>
                    <tr>
                        <td style="vertical-align:middle;">
                            <?php 
        echo '<a href="/Database_Website/php/person.php?q=' . $row['id'] . '">';
        if (!$row['image']) {
            echo '<img class="center-block" src="/Database_Website/images/nullicon.png" style="display:inline; margin-right: 4px;">';
        } else {
            echo '<img class="center-block" src="data:image/jpeg;base64,' . base64_encode($row['image']) . '" height="40" width="30" style="display:inline; margin-right: 7px;">';
        }
        echo format_person_name($row);
        echo '</a>';
        ?>
                        </td>
                        <td style="vertical-align:middle;"><?php 
        echo $row['Country_Of_Origin'];
        ?>
</td>
                        <td style="vertical-align:middle;"><?php 
        echo $row['DOB'];
        ?>
</td>
                    </tr>
                <?php 
    }
    ?>
            </tbody>
        </table>
    </div>

    <?php 
    $results = get_movie_results($search);
    // display movie results
    ?>
    
    <div class="container">
        <h3 style="display:inline-block">Movies</h3>

        <table class="table table-striped adv-table-results" cellspacing="0" width="100%">
            <thead>
                <tr>
                    <th>Movie</th>
                    <th>Country</th>
                    <th>Genre</th>
                    <th>Year</th>
                    <th>Parental Rating</th>
                    <th>Runtime</th>
                </tr>
            </thead>    
            <tbody>
                <?php 
    foreach ($results as $row) {
        ?>
                    <tr>
                        <td style="vertical-align:middle;">
                            <?php 
        echo '<a href="/Database_Website/php/movie.php?q=' . $row['id'] . '">';
        if (!$row['image']) {
            echo '<img class="center-block" src="/Database_Website/images/nullicon.png" style="display:inline; margin-right: 4px;">';
        } else {
            echo '<img class="center-block" src="data:image/jpeg;base64,' . base64_encode($row['image']) . '" height="40" width="30" style="display:inline; margin-right: 7px;">';
        }
        echo $row['Title'];
        echo '</a>';
        ?>
                        </td>
                        <td style="vertical-align:middle;"><?php 
        echo $row['Country'];
        ?>
</td>
                        <td style="vertical-align:middle;"><?php 
        echo $row['Genre'];
        ?>
</td>
                        <td style="vertical-align:middle;"><?php 
        echo substr($row['Date'], 0, 4);
        ?>
</td>
                        <td style="vertical-align:middle;">
                            <?php 
        echo '<img class="center-block" src=' . rating_logo($row['Parental Rating']) . ' height="15">';
        echo '<span hidden>' . $row['Parental Rating'] . '</span>';
        ?>
                        </td>
                        <td style="vertical-align:middle;"><?php 
        echo $row['Runtime'] . ' minutes';
        ?>
</td>
                    </tr>
                <?php 
    }
    ?>
            </tbody>
        </table>
    </div>
    
    <?php 
}
                    </td>
                    <td style="vertical-align:middle;"><?php 
        echo $row['Country'];
        ?>
</td>
                    <td style="vertical-align:middle;"><?php 
        echo $row['Genre'];
        ?>
</td>
                    <td style="vertical-align:middle;"><?php 
        echo substr($row['Date'], 0, 4);
        ?>
</td>
                    <td style="vertical-align:middle;">
                        <?php 
        echo '<img class="center-block" src=' . rating_logo($row['Parental Rating']) . ' height="15">';
        echo '<span hidden>' . $row['Parental Rating'] . '</span>';
        ?>
                    </td>
                    <td style="vertical-align:middle;"><?php 
        echo $row['Runtime'] . ' minutes';
        ?>
</td>
                </tr>
            <?php 
    }
    ?>
        </tbody>
    </table>
</div>
Exemplo n.º 3
0
?>
" 
                                 alt="<?php 
echo $results[0]['Title'];
?>
" style="width:300;height:450px;">
                        <div class="caption">
                            <h3><?php 
echo $results[0]['Title'];
?>
</h3>
                            <p><?php 
echo $results[0]['Genre'];
?>
 | <?php 
echo '<img src=' . rating_logo($results[0]['Parental Rating']) . ' height="18">';
?>
</p>
                            <p style="display:block">Released: <?php 
echo $results[0]['Date'];
if (is_userLoggedIn() && !movieInList($movieID)) {
    ?>
                                    <form action="<?php 
    $_PHP_SELF;
    ?>
" method="POST">
                                        <div class="checkbox" >
                                          <label>
                                            <input id="$cb" name="$cb" type="checkbox" value="" checked hidden>
                                          </label>
                                              <button type="submit" 
Exemplo n.º 4
0
        ?>
">
                                    <?php 
        echo $row['Title'];
        ?>
</a></td>
                                <td><?php 
        echo $row['Genre'];
        ?>
</td>
                                <td><?php 
        echo substr($row['Date'], 0, 4);
        ?>
</td>
                                <td><?php 
        echo '<img src=' . rating_logo($row['Parental Rating']) . ' height="18">';
        ?>
</td>
                            </tr> <?php 
    }
    ?>
                </tbody>
            </table>
        </div>
    </div>
<?php 
}
?>