Файл: Source/admin/dashboard.php
Строк: 124
<?php
/*
* Script name: Points4Prize
* Author: Soft Projects
* Date created: 15/07/2015
*/
include "common.php";
head();
?>
<div class="body content rows scroll-y">
<!-- Page header -->
<div class="page-heading">
<h1>Dashboard </h1>
</div>
<!-- End page header -->
<!-- Begin info box -->
<div class="row">
<!-- Bans Info Box -->
<div class="col-sm-3 col-xs-6">
<!-- Box info -->
<div class="box-info">
<!-- Icon box -->
<div class="icon-box">
<span class="fa-stack">
<i class="fa fa-circle fa-stack-2x danger"></i>
<i class="fa fa-users fa-stack-1x fa-inverse"></i>
</span>
</div><!-- End div .icon-box -->
<!-- Text box -->
<div class="text-box">
<h3> <?php
$query = mysql_query("SELECT * FROM `vn_users`");
$count = mysql_num_rows($query);
echo $count;
?></h3>
<p>Total users</p>
</div><!-- End div .text-box -->
<div class="clear"></div>
</div><!-- End div .info-box -->
</div>
<!-- End bans Info Box -->
<!-- Last bans Info Box -->
<div class="col-sm-3 col-xs-6">
<!-- Box info -->
<div class="box-info">
<!-- Icon box -->
<div class="icon-box">
<span class="fa-stack">
<i class="fa fa-circle fa-stack-2x warning"></i>
<i class="fa fa-gift fa-stack-1x fa-inverse"></i>
</span>
</div><!-- End div .icon-box -->
<!-- Text box -->
<div class="text-box">
<h3><?php
$query = mysql_query("SELECT * FROM `vn_prizes`");
$count = mysql_num_rows($query);
echo $count;
?></h3>
<p>Total Prizes</p>
</div><!-- End div .text-box -->
<div class="clear"></div>
</div><!-- End div .info-box -->
</div>
<!-- End Last bans Info Box -->
<!-- Date Info Box -->
<div class="col-sm-3 col-xs-6">
<!-- Box info -->
<div class="box-info">
<!-- Icon box -->
<div class="icon-box">
<span class="fa-stack">
<i class="fa fa-circle fa-stack-2x success"></i>
<i class="fa fa-user fa-stack-1x fa-inverse"></i>
</span>
</div><!-- End div .icon-box -->
<!-- Text box -->
<div class="text-box">
<h3><?php
$time = time() - 600;
$query = mysql_query("SELECT * FROM `vn_users` WHERE lastact >= '$time'");
$count = mysql_num_rows($query);
echo $count;
?></h3>
<p>Online</p>
</div><!-- End div .text-box -->
<div class="clear"></div>
</div><!-- End div .info-box -->
</div>
<!-- End Date Info Box -->
<!-- Time Info Box -->
<div class="col-sm-3 col-xs-6">
<!-- Box info -->
<div class="box-info">
<!-- Icon box -->
<div class="icon-box">
<span class="fa-stack">
<i class="fa fa-circle fa-stack-2x info"></i>
<i class="fa fa-trophy fa-stack-1x fa-inverse"></i>
</span>
</div><!-- End div .icon-box -->
<!-- Text box -->
<div class="text-box">
<h3><?php
$query = mysql_query("SELECT * FROM `vn_awarded`");
$count = mysql_num_rows($query);
echo $count;
?></h3>
<p>Awarded users</p>
</div><!-- End div .text-box -->
<div class="clear"></div>
</div><!-- End div .info-box -->
</div>
<!-- End Time Info Box -->
<div class="col-md-9">
<div class="box-info full">
<h2><strong>Last</strong> added prizes</h2>
<div class="panel-body">
<?php
$result = mysql_query("SELECT * FROM vn_prizes ORDER by id DESC LIMIT 20") or die(mysql_error());
if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_assoc($result)) {
$points = number_format($row['points'], 0, ',', ' ');
echo "
<a href='/prize-$row[id]' target='_new'>
<img src='$row[image]' alt='$row[title]' style='width:71px; height:68px;margin-right:3px;margin-bottom:5px;'
class='img-thumbnail'/> </a>";
}
} else {
echo "<div class='alert alert-info'>There are no prizes.</div>";
}
?>
</div>
</div>
<?php
footer();
?>
</div>
<div class="col-md-3">
<div class="box-info">
<h2><strong>Last</strong> registered users</h2>
<?php
$result = mysql_query("SELECT * FROM vn_users ORDER BY ID DESC LIMIT 3") or die(mysql_error());
for ($i = 0; $i < mysql_num_rows($result); ++$i) {
$info = mysql_fetch_array($result);
?>
<a href="/u:<?php echo $info['user'];?>" target="_blank">
<img style="width:68px;height:68px;" src="<?php echo $GLOBALS['site_url'];?><?php
if(empty($info['avatar'])){
echo '/assets/img/noavatar.png';
}else{
echo $info['avatar'];
}
?>" />
</a>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>