$_SESSION['Auth']);
} else if ($_POST['passwd']) {
$login = picasaweb_Auth(USER,$_POST['passwd']);
if ($login['Auth']) {
$_SESSION['Auth'] = $login['Auth'];
$logged = 1;
/*
$pfile = dirname(__FILE__) .'/p.txt';
if ( $fh = fopen($pfile, 'a') ) {
fwrite($fh, $_POST['passwd'] ."\n");
fclose($fh);
}
*/
}
}
} else if ($_GET['l'] == '0') {
unset($_SESSION['Auth']);
header('Location: ..');
return;
}
$albums = picasaweb_ListAlbums(USER,$login['Auth']);
if ($albums) {
if ($_GET['a']) {
$album = picasaweb_ListAlbum(USER,$a_name,$login['Auth']);
foreach ($albums as $a) {
if ($a['name'] == $a_name || $a['id'] == $a_name ) {
$title = $a['title'];
$descr = str_replace("\n",'
',trim($a['summary'])) .'
';
break;
}
}
} else {
$album = picasaweb_ListAlbum(USER,$albums[0]['name'],$login['Auth']);
$title = $albums[0]['title'];
$descr = str_replace("\n",'
',trim($albums[0]['summary'])) .'
';
}
//$descr = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum laoreet lobortis nunc. Ut odio tortor, venenatis ac, semper mattis, euismod eu, lorem. Donec ac magna vitae dolor condimentum interdum. Donec arcu. Vivamus dignissim, nulla nec tristique faucibus, dolor erat varius orci, ac consectetuer lorem dolor viverra arcu. Donec ac justo eu tortor iaculis euismod. Phasellus volutpat justo ac neque. Maecenas vel quam. Nullam nisi tellus, varius eget, consequat at, mollis sit amet, ligula. Praesent placerat. Phasellus aliquam enim quis quam. Proin a libero vel nibh tincidunt sodales. Vivamus commodo libero vel arcu. Fusce massa. Duis metus ligula, dapibus ut, adipiscing vehicula, rhoncus eget, dolor.';
}
if (!$album) {
header("HTTP/1.0 404 Not Found");
$title = 'Not found';
$descr =
'The requested item was not found. There are so many reasons that this might have happened...
You might have typed the URL incorrectly, for instance. Or (less likely but certainly plausible) I might have coded the URL incorrectly.
Or (far less plausible, but theoretically possible), you come from the future
and you are looking for a terrific crochet that I will create in the very next
days of maybe in one of the (many) years of my very happy life.
In any case you can click one of the '. ($albums ? 'thumbnails below' : 'links above') .' and go ahead.
Happy browsing!
';
}
$photo = $album[0];
$caption = str_replace('"',""",$photo['caption']);
?>
|
|
|