tagcloud.php 455 Bytes
Newer Older
1
<?php
2 3 4 5 6 7 8

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

9
$n = $_GET['n'];
10

11
$n = (int)$n;
12 13

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

17
try {
18
	$aTagCloud = TagCloud::GenerateTagCloud('Free_Scrobbles', 'artist', $n);
19 20
	$smarty->assign('tagcloud', $aTagCloud);
} catch (Exception $e) {
21
	displayError("Error", $errors);
22
}
23

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