<?php

require '../header.php';

$data = array();
$data["success"] = false;

if ( !isset($_REQUEST['albumid']) ) {
    sendResponse($data);
}

$album = new Album($_REQUEST['albumid']);
if ( $album->getID() == 0 ) {
    sendResponse($data);
}

$data["success"] = true;
$data["album"] = $album;

sendResponse($data);

function sendResponse($data) {
    header('Content-Type: application/json');
    echo json_encode($data);
    exit();
}

exit();

// vim: set ts=4:sw=4
