<?php
require_once ("varables.php");

$myJSON="400";
if(isset($_POST["nekot"]) && isset($_POST["an1d"]))
{
	$tok = $_POST["nekot"];
	$id = $_POST["an1d"];
if($tok == "sfiexcmajskdfjkmaskdalfe"){
    $connect = @mysqli_connect($hostname,$username,$password,$database);
    if($connect)
    {
        @mysqli_query($connect,"SET CHARACTER SET utf8;");

					$query_all = "UPDATE ".$tbl_orders." SET localed = 1 WHERE id ='".$id."'";
					$result = @mysqli_query($connect,$query_all);
					if($result)
					{
						$myJSON="200";
					}
					else {
						$myJSON="404";
					}
		}
	}
}
echo json_encode($myJSON);
?>
