30 lines
506 B
PHP
30 lines
506 B
PHP
<?php
|
|
|
|
require '../header.php';
|
|
|
|
$data = array();
|
|
|
|
if ( !isset($_REQUEST['albumid']) ) {
|
|
$_SESSION['currentalbum'] = 0;
|
|
sendResponse($data);
|
|
}
|
|
|
|
$album = new Album($_REQUEST['albumid']);
|
|
if ( $album->getID() == 0 ) {
|
|
$_SESSION['currentalbum'] = 0;
|
|
sendResponse($data);
|
|
}
|
|
|
|
$_SESSION['currentalbum'] = $album->getID();
|
|
sendResponse($data);
|
|
|
|
function sendResponse($data) {
|
|
header('Content-Type: application/json');
|
|
echo json_encode($data);
|
|
exit();
|
|
}
|
|
|
|
exit();
|
|
|
|
// vim: set ts=4:sw=4
|