2014-06-21 15:27:18 +02:00
|
|
|
<?php
|
2014-12-28 20:52:06 +01:00
|
|
|
require_once 'layout-headerlg.php';
|
2014-06-21 15:27:18 +02:00
|
|
|
if (is_string($_GET['bv']) && ctype_alnum($_GET['bv'])) {
|
|
|
|
$bv = $mysqli->real_escape_string($_GET['bv']);
|
|
|
|
} else {
|
|
|
|
echo "<h2>You attempted to show stats for a link that does not exist, or you are formatting your link wrong.</h2>";
|
2014-12-28 20:52:06 +01:00
|
|
|
require_once 'layout-footerlg.php';
|
2014-06-21 15:27:18 +02:00
|
|
|
die();
|
|
|
|
}
|
|
|
|
$query = "SELECT `clicks`,`country`,`rurl` FROM redirinfo WHERE baseval='{$bv}';";
|
|
|
|
$result = $mysqli->query($query);
|
|
|
|
$row = mysqli_fetch_assoc($result);
|
|
|
|
if(!$row) {
|
|
|
|
echo "404 Not Found";
|
2014-12-28 20:52:06 +01:00
|
|
|
require_once 'layout-footerlg.php';die();
|
2014-06-21 15:27:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if(!$row['user']) {
|
|
|
|
$row['user'] = '<i>Anonymous</i>';
|
|
|
|
}
|
|
|
|
if(!$row['country']) {
|
|
|
|
$row['country'] = '<i>Unknown</i>';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-12-17 01:47:42 +01:00
|
|
|
echo "<h2 style='display:inline'>Link Stats for </h2><h2 style='color:green'>$wsa/".$bv.'</h2><p class="text-muted">'.$row['rurl'].'</p><br>';
|
2014-06-21 15:27:18 +02:00
|
|
|
echo "<div class='col-md-4'><h2>Clicks</h2><span style='color:blue'>{$row['clicks']}</span></div>";
|
|
|
|
echo "<div class='col-md-4'><h2>Created by</h2><span style='color:red'>{$row['user']}</span></div>";
|
|
|
|
echo "<div class='col-md-4'><h2>Country</h2><span style='color:grey'>{$row['country']}</span></div>";
|
|
|
|
|
2014-12-28 20:52:06 +01:00
|
|
|
require_once 'layout-footerlg.php';
|