mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
144 lines
4.2 KiB
PHP
144 lines
4.2 KiB
PHP
<?php /*
|
|
* Pi-hole: A black hole for Internet advertisements
|
|
* (c) 2017 Pi-hole, LLC (https://pi-hole.net)
|
|
* Network-wide ad blocking via your own hardware.
|
|
*
|
|
* This file is copyright under the latest version of the EUPL.
|
|
* Please see LICENSE file for your rights under this license. */
|
|
require "scripts/pi-hole/php/header.php";
|
|
|
|
// Generate CSRF token
|
|
if(empty($_SESSION['token'])) {
|
|
$_SESSION['token'] = base64_encode(openssl_random_pseudo_bytes(32));
|
|
}
|
|
$token = $_SESSION['token'];
|
|
|
|
?>
|
|
<!-- Send PHP info to JS -->
|
|
<div id="token" hidden><?php echo $token ?></div>
|
|
|
|
<!-- Title -->
|
|
<div class="page-header">
|
|
<h1>Specify date range to be queried from the Pi-hole query database</h1>
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<!-- Date Input -->
|
|
<div class="form-group">
|
|
<label>Date and time range:</label>
|
|
|
|
<div class="input-group">
|
|
<div class="input-group-addon">
|
|
<i class="fa fa-clock-o"></i>
|
|
</div>
|
|
<input type="text" class="form-control pull-right" id="querytime">
|
|
</div>
|
|
<!-- /.input group -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Small boxes (Stat box) -->
|
|
<div class="row">
|
|
<div class="col-lg-3 col-xs-12">
|
|
<!-- small box -->
|
|
<div class="small-box bg-aqua">
|
|
<div class="inner">
|
|
<h3 class="statistic" id="ads_blocked_exact">---</h3>
|
|
<p>Queries Blocked</p>
|
|
</div>
|
|
<div class="icon">
|
|
<i class="ion ion-android-hand"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ./col -->
|
|
<div class="col-lg-3 col-xs-12">
|
|
<!-- small box -->
|
|
<div class="small-box bg-aqua">
|
|
<div class="inner">
|
|
<h3 class="statistic" id="ads_wildcard_blocked">---</h3>
|
|
<p>Queries Blocked (Wildcards)</p>
|
|
</div>
|
|
<div class="icon">
|
|
<i class="ion ion-android-hand"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ./col -->
|
|
<div class="col-lg-3 col-xs-12">
|
|
<!-- small box -->
|
|
<div class="small-box bg-green">
|
|
<div class="inner">
|
|
<h3 class="statistic" id="dns_queries">---</h3>
|
|
<p>Queries Total</p>
|
|
</div>
|
|
<div class="icon">
|
|
<i class="ion ion-earth"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ./col -->
|
|
<div class="col-lg-3 col-xs-12">
|
|
<!-- small box -->
|
|
<div class="small-box bg-yellow">
|
|
<div class="inner">
|
|
<h3 class="statistic" id="ads_percentage_today">---</h3>
|
|
<p>Queries Blocked</p>
|
|
</div>
|
|
<div class="icon">
|
|
<i class="ion ion-pie-graph"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ./col -->
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="box" id="recent-queries">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">Recent Queries</h3>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body">
|
|
<table id="all-queries" class="display table table-striped table-bordered" cellspacing="0" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th>Time</th>
|
|
<th>Type</th>
|
|
<th>Domain</th>
|
|
<th>Client</th>
|
|
<th>Status</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr>
|
|
<th>Time</th>
|
|
<th>Type</th>
|
|
<th>Domain</th>
|
|
<th>Client</th>
|
|
<th>Status</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
<!-- /.box -->
|
|
</div>
|
|
</div>
|
|
<!-- /.row -->
|
|
|
|
|
|
<?php
|
|
require "scripts/pi-hole/php/footer.php";
|
|
?>
|
|
|
|
<script src="scripts/vendor/moment.min.js"></script>
|
|
<script src="scripts/vendor/daterangepicker.js"></script>
|
|
<script src="scripts/pi-hole/js/db_queries.js"></script>
|