
<?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.');
}
	$gettt = mysqli_query($conn, "Select * From Config_VongQuay");
if(mysqli_num_rows($gettt)){
	mysqli_query($conn, "UPDATE Config_VongQuay Set XuWeb = ".$_POST['a'].", TienThat = ".$_POST['b']."");
	die('Chỉnh sữa thành công.');
} else {
	die('Thất bại');
}
}
?>