<?php if(!defined('FastCore')){exit('Opss!');}
# Заголовки
$opt = array(
'title' => 'Online stats',
'keywords' => 'Online stats, users, top, referal, members, earning',
'description' => 'Statistics of our project, you can see the leaders and the activity of the players.'
);

?>

<style>
.stat:hover { 
  background: linear-gradient(to right bottom, #212428, #16181c);
}
@media only screen and (max-width: 721px) {

}
</style>
<div class="center-title mt-2">
<h2>Latest Activities</h2>
</div>

<div class="row d-flex justify-content-center">
<?php
$status_array = array(
1 => '<span class="text-uppercase" style="color: #87df87;">Deposit</span>', 
2 => '<span class="text-uppercase" style="color: #fe014f;">withdrawal</span>', 
3 => '<span class="text-uppercase" style="color: #ff9201;">Reinvest</span>'); // статусы

$status_array2 = array(
1 => '#87df87', 
2 => '#fe014f', 
3 => '#ff9201'); // статусы

$inserts = $db->query('SELECT * FROM db_history WHERE `type` != 3 ORDER BY id DESC LIMIT 20')->fetchAll();
foreach ($inserts as $inserts) {
$sumIn = sprintf("%.2f",$inserts['sum']);
?>
<div class="col-xl-3 col-lg-3 col-md-6">
<div class="stat text-center p-2 p-lg-3 mb-4">
<h5 style="color: <?=$status_array2[$inserts['type']]; ?>"><?=$sumIn; ?> {!VAL!}</h5>
<p class="mb-1"><?=substr($inserts['login'],0,-18); ?><span style="color: #ccd;">***</span></p>
<p class="mb-2" style="color:cornflowerblue; "> <?=date("d M Y - H:i",$inserts['add']); ?></p>
      
  <?=$status_array[$inserts['type']]; ?>
  </div>
</div>
<?php
	}
?>

</div>