topical media & game development

talk show tell print

mashup-flickr-07-Complete-gallery-index.php / php



  <?php include (dirname(__FILE__) . '/../lib/gallery.php') ?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Flickr Gallery</title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../css/gallery.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
  <?php 
    gallery = new FlickrGallery();
  ?>
    <?php include ('header.php') ?>
    <?php include ('navigation.php') ?>
    <ul class="photo-set">
    <?php
      recentPhotos = gallery->findRecentPhotos();
      foreach (recentPhotos as photo)
      {
        title = htmlentities(photo['title']);
        img = 'http://static.flickr.com/' . photo['server'] . '/' . photo['id'] 
          . '_' . photo['secret'] . '_s.jpg'
  ?>
      <li><a href="photo.php?id=<?php echo photo['id'] ?>"><img src="<?php echo img 
  ?>" alt="<?php echo title ?>" title="<?php echo title ?>" /></a></li>
  <?php
      }
  ?>
    </ul>
  </body>
  </html>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.