album.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /* GNU FM -- a free network service for sharing your music listening habits
  3. Copyright (C) 2009 Free Software Foundation, Inc
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU Affero General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. require_once('database.php');
  16. require_once('templating.php');
  17. require_once('data/Album.php');
  18. require_once('album-menu.php');
  19. $smarty->assign('name', $album->name);
  20. $smarty->assign('id', $album->id);
  21. $aAlbumTracks = $album->getTracks();
  22. if ($aAlbumTracks) {
  23. $smarty->assign('tracks', $aAlbumTracks);
  24. }
  25. $smarty->assign('extra_head_links', array(
  26. array(
  27. 'rel' => 'meta',
  28. 'type' => 'application/rdf+xml',
  29. 'title' => 'Album Metadata',
  30. 'href' => $base_url . '/rdf.php?fmt=xml&page=' . rawurlencode(htmlentities(str_replace($base_url, '', $album->getURL())))
  31. )
  32. ));
  33. $smarty->display('album.tpl');