<?php
session_start();
include_once('../../config/#Config.php');
if(!$_SESSION['UserName']){
die('<script>window.location.href=\''.$config['site']['url'].'index.php\';</script>');
} else {
$get_AD = mysqli_query($conn, "Select * From config_admin WHERE Account = '".$_SESSION['UserName']."'");
if(!mysqli_num_rows($get_AD)){
	die('Không đủ quyền.');
}	
    mysqli_query($conn, "UPDATE account_web Set TienThat = 30000000");		
	mysqli_query($conn, "INSERT INTO logs_admin (UserName,Type,Messager,Timer) VALUES ('" . $_SESSION['UserName'] . "', '2', N' Reset Xu Share ', '".strtotime(date('d-m-Y H:i:s'))."')");				            
	$return['type'] = 0;
		$return['text'] = 'Reset Xu Share Thành Công.';
		echo json_encode($return);
		exit();
		}
?>