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

$myJSON["id"]="";
$myJSON["C_name"]="";
$myJSON["shop_name"]="";
$myJSON["address"]="";
$myJSON["phone"]="";
$myJSON["C_id"]="";
$myJSON["lat"]="";
$myJSON["lng"]="";
$myJSON["last_visit"]="";
$myJSON["last_order"]="";
$myJSON["img"]="";
$myJSON["C_acc"]="";
$myJSON["C_etebar"]="";
$myJSON['success']="0";
if(isset($_POST["nekot"]) && isset($_POST["an1d"])&& isset($_POST["rnd"]))
{
    $id =$_POST["an1d"];
    $id =$_POST["an1d"];
    if()
    $connect = @mysqli_connect($hostname,$username,$password,$database);
    if($connect)
    {
        @mysqli_query($connect,"SET CHARACTER SET utf8;");

			$query_one = "SELECT * FROM ".$tbl_customer." WHERE id = '".$id."'";
			$oneres = @mysqli_query($connect,$query_one);
			if($oneres){
			 while($row = @mysqli_fetch_assoc($oneres)){
				$myJSON["id"]=$row["id"];
				$myJSON["C_name"]=$row["C_name"];
				$myJSON["shop_name"]=$row["shop_name"];
				$myJSON["address"]=$row["address"];
				$myJSON["phone"]=$row["phone"];
				$myJSON["C_id"]=$row["C_id"];
				$myJSON["lat"]=$row["lat"];
				$myJSON["lng"]=$row["lng"];
				$myJSON["last_visit"]=$row["last_visit"];
				$myJSON["last_order"]=$row["last_order"];
				$myJSON["img"]=$row["img"];
        $myJSON["C_acc"]=$row["C_acc"];
        $myJSON["C_etebar"]=$row["C_etebar"];
				$myJSON['success']="200";

				//$update = "UPDATE ".$tbl_customer." SET last_visit = '".$date."' WHERE id = '".$id."'";
			//$oneres = @mysqli_query($connect,$query_one);
			 }

			}
			else
				$myJSON["customer"]['success']="404";


	}
	 else
		 $myJSON["customer"]['success']="402";
}
echo json_encode($myJSON);
?>
