| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | include(INCLUDESPATH.'/metalbum.class.php'); |
|---|
| 26 | include(INCLUDESPATH.'/pager.inc.php'); |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | $_SMARTY['user']['info'] = get_cache_user_info($url_id); |
|---|
| 30 | $_SMARTY['user']['photo'] = build_image_url($url_id); |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | if(is_valid('metalbum_name', $token[2])) |
|---|
| 34 | $album_name = $token[2]; |
|---|
| 35 | else |
|---|
| 36 | { |
|---|
| 37 | header('Location: /metalbum/'.$url_id); |
|---|
| 38 | exit(); |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | $_SMARTY['Title'] = 'Meta Album: '.$album_name; |
|---|
| 42 | |
|---|
| 43 | list($login, $type) = split('@', $album_name); |
|---|
| 44 | |
|---|
| 45 | $album =& Metalbum::factory($type, $login, $config['metalbum'][$type]); |
|---|
| 46 | if(is_a($album,'Metalbum')) |
|---|
| 47 | { |
|---|
| 48 | $_SMARTY['photos'] = $album->getPhotos($_GET['p'], 18); |
|---|
| 49 | $_SMARTY['metalbum']['name'] = $album_name; |
|---|
| 50 | $_SMARTY['metalbum']['login'] = $login; |
|---|
| 51 | $_SMARTY['metalbum']['type'] = $type; |
|---|
| 52 | $_SMARTY['metalbum']['url'] = $album->getUrlAlbum(); |
|---|
| 53 | |
|---|
| 54 | $pager =& Pager_dotnode::factory (null, array('perPage' => 18, 'totalItems' => $album->getNbItems()) ); |
|---|
| 55 | $_SMARTY['pager'] = $pager->getLinks(); |
|---|
| 56 | } |
|---|
| 57 | else |
|---|
| 58 | { |
|---|
| 59 | $_SESSION['error']['title'] = _('Error in connection with remote album'); |
|---|
| 60 | $_SESSION['error']['msg'] = $type.': '.$album; |
|---|
| 61 | } |
|---|
| 62 | $metalbumSet =& new MetalbumSet($db, $url_id); |
|---|
| 63 | |
|---|
| 64 | $_SMARTY['leftmenu']["/profile/$url_id"] = 'Profile'; |
|---|
| 65 | $_SMARTY['leftmenu']['/metalbum/'.$url_id] = 'Meta Album'; |
|---|
| 66 | foreach($metalbumSet->albums as $albumset) |
|---|
| 67 | $_SMARTY['leftmenu']['/metalbum/'.$url_id.'/album/'.$albumset['login'].'@'.$albumset['type']] = $albumset['login'].'@'.$albumset['type']; |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | ?> |
|---|