79 lines
2.1 KiB
PHP
79 lines
2.1 KiB
PHP
<?php
|
|
require("header.php");
|
|
|
|
$hide = isset($_GET['hide']) && $_GET['hide']== "1" ? true : false;
|
|
|
|
$limit = isset($_GET['limit']) ? $_GET['limit'] : "50";
|
|
if($limit == ""){ $limit = 50; }
|
|
|
|
$ip = "";
|
|
if($hide)
|
|
$ip = "WHERE `ip` <> '" . $_SERVER['REMOTE_ADDR'] . "'";
|
|
|
|
$query = "SELECT `https`, `host`, `page`, `seo_page`, `time`, `ip` FROM view $ip ORDER BY `time` DESC LIMIT 0, $limit";
|
|
$result = ExecQuery($query);
|
|
|
|
$limit = $result->num_rows;
|
|
|
|
$table = "";
|
|
|
|
while($row = $result->fetch_assoc())
|
|
{
|
|
$time = date("c", strtotime($row['time']));
|
|
$time_display = date("l jS \of F Y H:i:s", strtotime($row['time']));
|
|
|
|
$table .= "<tr>\n";
|
|
$table .= "<td>" . ($row['https'] == 1 ? 'Yes' : 'No') . "</td>\n";
|
|
$table .= "<td>" . $row['host'] . "</td>\n";
|
|
$table .= "<td>" . $row['page'] . "</td>\n";
|
|
$table .= "<td>" . $row['seo_page'] . "</td>\n";
|
|
$table .= "<td><time class='timeago' datetime='" . $time . "'>" . $time_display . "</time></td>\n";
|
|
$table .= "<td>" . $row['ip'] . "</td>\n";
|
|
$table .= "</tr>\n";
|
|
}
|
|
?>
|
|
|
|
|
|
<!-- Portfolio Item Heading -->
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<a href="views?hide=<?php echo !$hide; ?>" class="pull-right">Toggle Hide</a>
|
|
<div class="pull-right">  |  </div>
|
|
<a href="views?hide=<?php echo $hide; ?>&limit=500" class="pull-right">View more</a>
|
|
<h1 class="page-header">Views <small><?php echo $limit; ?></small></h1>
|
|
</div>
|
|
</div>
|
|
<!-- /.row -->
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>HTTPS</th>
|
|
<th>Host</th>
|
|
<th>Page</th>
|
|
<th>SEO Page</th>
|
|
<th>Time</th>
|
|
<th>IP Address</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php echo $table; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/inc/js/jquery.timeago.js"></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
$("time.timeago").timeago();
|
|
});
|
|
</script>
|
|
|
|
<?php
|
|
require("footer.php");
|
|
?>
|