<?php 
session_start();
require_once('includes/init.php');

if (!isset($_SESSION['token'])) {
	exit;
}

$token = $_SESSION['token'];

$user_data = get_user_by_token($conn, $token);

$time = time()+100;

$res=mysqli_query($conn,"update users set onlineStatus=$time where mobile=".$user_data['mobile']);

if ( empty( $user_data ) ) exit;
?>
	
<div class="user-block">
               <div class="icon">
                   <img src="https://bdlabmy.xyz/gamer.png" height="100px" width="100px"/>
               </div>
               <div class="userinfo">
                   <h4> <?= $user_data['fname'] ?? 'Shimul Ahmed' ;?></h4>
                   <h4 style="color : #ffffff"> <?= $user_data['mobile'] ?? '1234' ; ?></h4> <br>
                  
                    <h4 style="color : #eee">Your Balance: </h4>
                   <h4><font style="font-family: 'Material Icons';">payments</font><?= $user_data['balance'] ?? '1000' ;?></h4>
               </div>
           </div>