EOT;
	if (isset($CONFIG['page_refresh']) && is_numeric($CONFIG['page_refresh'])) {
		echo <<df and interfaces may be incomplete.
EOT;
	}
echo <<%s
\n",
		htmlentities($CONFIG['weburl']),
		urlencode($host),
		urlencode($plugin),
		htmlentities($plugin));
}
function plugins_list($host, $selected_plugins = array()) {
	global $CONFIG;
	$plugins = collectd_plugins($host);
	echo 'Plugins
';
	echo '';
	printf("
';
	echo ''."\n",
				htmlentities($CONFIG['weburl']),
				htmlentities(build_url('detail.php', $items, $time)),
				htmlentities(build_url('graph.php', $items, $time))
			);
		}
	}
}
# generate an url with GET values from $items
function build_url($base, $items, $s=NULL) {
	global $CONFIG;
	if (!is_array($items))
		return false;
	if (!is_numeric($s))
		$s = $CONFIG['time_range']['default'];
	// Remove all empty values
	$items = array_filter($items, 'strlen');
	if (!isset($items['s']))
		$items['s'] = $s;
	return "$base?" . http_build_query($items, '', '&');
}