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

if (!isset($_SESSION['token'])) {
	header('location: login-required.php');
}

$token = $_SESSION['token'];

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

if ( empty( $user_data ) ) header('location: login-required.php');

$string = file_get_contents("../This_is_Admin_/app-data.json");
$json_a = json_decode($string, true);


mysqli_close($conn);
?>
<!DOCTYPE html>
<html>
<head>
  <title>Profile</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=false">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
  	<meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="css/style.css" >
  <style>
	<?php include 'css/custom-style.php' ?>

	
.kobasamsu{
        text-align: left;
    
  background: linear-gradient(<?= $dd['primary_color']  ?>, <?= $dd['gradient_color_end']  ?>)
}

ul li {
  border: 1px solid #ddd;
  margin-top: -1px; /* Prevent double borders */
  padding: 12px;
  color: white;
   list-style-type: none;
}

.profile_cl {
   padding: 10px;  
   
}

body {
     background: #1a1440 !important;
  
}


  </style>
  
</head>
<body>
<section class="profile_cl">

<ul class="kobasamsu">
  <li>Name: <?= $user_data['fname'] ?? '' ;?></li>
  <li>Balance: <?= $user_data['balance'] ?? '' ;?></li>
  <li>Mobile: <?= $user_data['mobile'] ?? '' ;?></li>
  <li>User id: <?= $user_data['id'] ?? '' ;?></li>
  <li>Invalid Click: <?= $user_data['i_click'] ?? '' ;?></li>
  <li>Refer Code: <?= $user_data['mobile'] ?? '' ;?></li>
  <li>Total Refer: <?= $user_data['t_ref'] ?? '' ;?></li>
  <li>Today Task: <?php if($multi_task == 1){ 
        $task = $user_data['today_task1']+$user_data['today_task1']+$user_data['today_task1']+$user_data['today_task1'];
} else { $task = $user_data['today_task'];} echo $task ?? '0' ;?></li>

</ul>
	
	

</section>

	</div></div>
<?php include 'developer.php'; ?>	

</body>

</html>