tagcloud.php 499 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
	$smarty->assign('errors', $errors);
22 23 24
	$smarty->display('error.tpl');
	die();
}
25

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