Файл: Source/admin/check_user.php
Строк: 26
<?php
/*
* Script name: Points4Prize
* Author: Soft Projects
* Date created: 15/07/2015
*/
$ID = (int) htmlspecialchars($_GET['id']);
include "common.php";
head();
?>
<div class="body content rows scroll-y">
<!-- Page header -->
<div class="page-heading">
<h1><b>Check user</b> </h1>
</div>
<!-- End page header -->
<!-- Begin info box -->
<div class="row">
<div class="col-md-12">
<div class="box-info">
<h2>Voted IP's for this user</h2>
<?php
$checkalln = mysql_query("SELECT userid FROM vn_votes WHERE userid='$ID'");
$broi = mysql_num_rows($checkalln);
if ($broi > 0) {
echo "
<table style='width:100%;' >
<tr>
<th>#</th>
<th>User</th>
<th>Added points</th>
<th>Date</th>
</tr>";
$result2 = mysql_query("SELECT fromw,time,ip,points FROM vn_votes WHERE userid='$ID' ORDER by time DESC LIMIT 0,10") or die(mysql_error());
for ($i = 0; $i < mysql_num_rows($result2); ++$i) {
$row2 = mysql_fetch_array($result2);
$rank = $i + 1;
$date = date("d.m.Y H(idea)", $row2['time'] - 86400);
if ($row2['fromw'] == "0") {
$fromw = "IP:" . $row2['ip'];
} else {
$fromw = "<a href='/u:$row2[fromw]' style='color:#545454;'>$row2[fromw]</a>";
}
echo "
<tr>
<td>$rank</td>
<td>$fromw</td>
<td>$row2[points]</td>
<td>$date</td>
</tr>";
}
echo "</table>";
} else {
echo "<br /><div class='alert alert-info'>Still nobody voted for this user.</div>";
}
?>
</div>
<?php
footer();
?>
</div>