topical media & game development

talk show tell print

mashup-flickr-06-Step-5-gallery-photo.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" />
    <script type="text/javascript" src="../lib/js/prototype.js"></script>
    <script type="text/javascript" src="../lib/js/gallery.js"></script>
  </head>
  <body>
  <?php 
    gallery = new FlickrGallery();
    id = _REQUEST['id'];
    if (!empty(id))
    {
      info = gallery->getPhotoInfo(id);
      title = info['title'];
      img = 'http://static.flickr.com/' . info['server'] . '/' . info['id'] 
        . '_' . info['secret'] . '.jpg';
      photoPage = 'http://www.flickr.com/photos/' . info['owner']['nsid'] . '/' 
        . id . '/';
    }
  ?>
  
    <div class="photo-display">
      <p class="photo-title"><?php echo title ?></p>
      <p class="photo-image"><a href="<?php echo photoPage ?>"><img src="<?php echo 
  img ?>" alt="<?php echo title ?>" title="<?php echo title ?>" /></a></p>
      <div id="photo-info-<?php echo id ?>" class="photo-more"><a href="#" onclick="displayInfo(<?php echo id ?>); return false;">More info...</a></div>
    </div>
  </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.