mirror of
https://github.com/pi-hole/web.git
synced 2026-04-21 17:29:11 +01:00
28 lines
611 B
PHP
28 lines
611 B
PHP
<?php
|
|
include('data.php');
|
|
header('Content-type: application/json');
|
|
|
|
$data = array();
|
|
|
|
if (isset($_GET['summary'])) {
|
|
$data = array_merge($data, getSummaryData());
|
|
}
|
|
|
|
if (isset($_GET['overTimeData'])) {
|
|
$data = array_merge($data, getOverTimeData());
|
|
}
|
|
|
|
if (isset($_GET['topItems'])) {
|
|
$data = array_merge($data, getTopItems());
|
|
}
|
|
|
|
if (isset($_GET['recentItems'])) {
|
|
if (is_numeric($_GET['recentItems'])) {
|
|
$data = array_merge($data, getRecentItems($_GET['recentItems']));
|
|
}
|
|
}
|
|
|
|
|
|
echo json_encode($data);
|
|
?>
|