12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- require_once('database.php');
- require_once('templating.php');
- require_once('data/Group.php');
- require_once('data/User.php');
- require_once('data/TagCloud.php');
- require_once('data/Server.php');
- if (!isset($_GET['user']) && $logged_in == false) {
- displayError("Error", "User not set. You shouldn't be here.");
- }
- try {
- $user = new User($_GET['user']);
- } catch (Exception $e) {
- displayError("User not found", "User not found, shall I call in a missing persons report?");
- }
- $smarty->assign('geo', Server::getLocationDetails($user->location_uri));
- try {
- $aUserTagCloud = TagCloud::GenerateTagCloud(TagCloud::scrobblesTable('user'), 'artist', 40, $user->uniqueid);
- $smarty->assign('user_tagcloud', $aUserTagCloud);
- } catch (Exception $e) {}
- $smarty->assign('isme', ($_SESSION['user']->name == $user->name));
- $smarty->assign('me', $user);
- $smarty->assign('profile', true);
- $smarty->assign('groups', Group::groupList($user));
- $smarty->assign('extra_head_links', array(
- array(
- 'rel' => 'meta',
- 'type' => 'application/rdf+xml',
- 'title' => 'FOAF',
- 'href' => $base_url . '/rdf.php?fmt=xml&page=' . rawurlencode(str_replace($base_url, '', $user->getURL('groups')))
- )
- ));
- $smarty->display('user-groups.tpl');
|