Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ssgallery_function.php
- function image_from_database() {
- $result = mysql_query("SELECT * FROM screenshots ORDER BY date_sub DESC");
- $count = mysql_num_rows($result);
- while($count < 4 && $row = mysql_fetch_array($result))
- if ($count > 4) {
- while($row = mysql_fetch_array($result)) {
- echo '<div class="span3">';
- echo '<img src="'.$row['thumbnail_link'].'" />';
- echo '<h4>'.$row['header'].'</h4>';
- echo '<p>'.$row['description'].'</p>';
- echo '<p><a class="btn" href="view_image.php?image_id='. $row['photo_id'] .'">View details »</a></p>';
- echo '</div>';
- }
- }
- }
- ssgallery.php
- <div class="container">
- <h1 class="text-center">The American Pacific Group ScreenShot Gallery</h1>
- <hr>
- <div class="row-fluid">
- <?php
- echo image_from_database();
- ?>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement