PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Pal Buczko   Galleries from Picasa   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: example file
Class: Galleries from Picasa
Get image galleries from Picasa Web pictures
Author: By
Last change: Used class has changed
Date: 12 years ago
Size: 1,293 bytes
 

Contents

Class file image Download
<?php

   
require_once 'galleryfrompicasa.class.php';

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php

        $gallery
=new GalleryFromPicasa();
       
$user_picasaweb="michha62";


        if (isset(
$_GET['pic']) AND $_GET['pic']!="") {
            echo
"<img src=\"" . $_GET['pic'] . "\" alt=\"\"/>";
        }
        elseif (isset(
$_GET['gal']) AND $_GET['gal']!="") {
           
$pictures=$gallery->getPictures($user_picasaweb, $_GET['gal'],"32c");
            foreach (
$pictures AS $key=>$value) {
                echo
"<img src=\"" . $value['thumbnail'] . "\" alt=\"" . $value['title'] . "\"><a href=\"index.php?pic=" . $value['picture'] . "\">" . $value['title'] . "</a><br/>\n";
            }
        }
        else {
           
$albums=$gallery->getAlbums($user_picasaweb,"48c","640");
            foreach (
$albums AS $key=>$value) {
                echo
"<img src=\"" . $value['thumbnail'] . "\" alt=\"" . $value['title'] . "\"><a href=\"index.php?gal=" . $key . "\">" . $value['title'] . "</a><br/>\n";
            }

        }

       
?>

    </body>
</html>