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

$myJSON['message'] = "00";
$myJSON['mmm'] = array();
$postdata = $_POST["json"];

 $dtllist = json_decode($postdata,true);
 
	$myJSON['message'] = $dtllist;
/*
    $date = $_POST["date"];
    $V_id = $_POST["v1zitor"];
	$C_id = $_POST["kass"];
	$comment = $_POST["cm"];
	$price =  $_POST["prise"];
	$of =  $_POST["of"];
	$endptice =  $_POST["3ndpr1se"];
	$paytype = $_POST["paytyp"];
	$user_id = $_POST["an1d"];
	$toke = $_POST["nekot"];
	
    $connect = @mysqli_connect($hostname,$username,$password,$database);
    if($connect)
    {
        @mysqli_query($connect,"SET CHARACTER SET utf8;");
        $query_token = "SELECT id FROM ".$tbl_sessions." WHERE token = '".$toke."' AND uid ='".$user_id."' AND type ='V' LIMIT 1";
		$tokres=@mysqli_query($connect,$query_token);
        if (!$tokres) {
            $myJSON['message']= "-400" ;
			
        }
		else{
			$countoft = 0;
            while($rowt = @mysqli_fetch_assoc($tokres)){
				array_push($myJSON['mmm'], $rowt);
                $countoft++;
			}
			if($countoft == 0){
				$myJSON['message']= "-405" ;
			}
			else{
				$inser_q = "INSERT INTO ".$tbl_orders." (date,V_id,C_id,Price,off,endprice,paytype,comment) 
				VALUES ('".$date."','".$V_id."','".$C_id."','".$price."','".$of."','".$endptice."','".$paytype."','".$comment."')";
				$insres=@mysqli_query($connect,$inser_q);
				if(!$insres)
					$myJSON['message']= "-1" ;
				else
				{
					$myJSON['message'] = @mysqli_insert_id($connect);	
					$update_q = "UPDATE ".$tbl_customer." SET last_order = '".$date."' WHERE id ='".$C_id."'";
					$upres=@mysqli_query($connect,$update_q);					
				}
			}
		}
	}
	 else
		 $myJSON['message']="-402";
}*/	
    echo json_encode($myJSON);

?>