tagcloud.php 495 Bytes
Newer Older
1
<?php
2 3 4 5 6 7 8 9 10 11 12 13

require_once('database.php');
require_once('templating.php');
require_once('data/sanitize.php');
require_once('data/Server.php');
require_once('data/TagCloud.php');

$n=$_GET['n'];

$n=(int)$n;

if ($n < 1) {
14
	$n=1000000;
15 16
}

17 18
try {
	$aTagCloud = TagCloud::GenerateTagCloud('free_scrobbles', 'artist', $n);
19
	$smarty->assign('tagcloud', $aTagCloud);		
20
} catch (exception $e) {
21
	$smarty->assign('errors', $errors);
22 23 24
	$smarty->display('error.tpl');
	die();
}
25

26
$smarty->display('tagcloud.tpl');