<?php
		header("Access-Control-Allow-Origin: *");
		header("Access-Control-Allow-Headers: access");
		header("Access-Control-Allow-Methods: GET");
		header("Access-Control-Allow-Credentials: true");
		header("Content-Type: application/json; charset=UTF-8");

		include_once '../Database.php';
		include_once 'cliente.php';

		$database = new DataBase();
		$db = $database->getConnection();

		$cliente = new CLIENTE($db);
		$cliente->id = isset($_GET['id'])?$_GET['id']:die();
		try{
			$stmt = $cliente->select("select * from web where id='".$cliente->id."' ");
		$num = $stmt->rowCount();

		if($num>0){
			$row =$stmt->fetch(PDO::FETCH_ASSOC);
				extract($row);
				$add_item=array(
					"id"=>$id,
					"nombre"=>$nombre,
					"apellidop"=>$apellidop,
					"apellidom"=>$apellidom,
					"rfc"=>$rfc,
					"fecha"=>$fecha,
					"clave"=>$clave,
					"calle"=>$calle,
					"interior"=>$interior,
					"exterior"=>$exterior,
					"colonia"=>$colonia,
					"codigop"=>$codigop,
					"municipio"=>$municipio,
					"ciudad"=>$ciudad,
					"estado"=>$estado,
					"pais"=>$pais,
					"correo"=>$correo,
					"telefono"=>$telefono,
					"status"=>$status,
					"licencia"=>$licencia,
					"bd"=>$bd,
					"logo"=>$logo,
					"idface"=>$idface,
					"idgoo"=>$idgoo,
					"confirmacorreo"=>$confirmacorreo,
					"comprobante"=>$comprobante,
					"nivel"=>$nivel,
					"fkadmin"=>$fkadmin,
				);
			
			echo json_encode($add_item);
		}
		else {
			echo json_encode(array("Mensaje"=>"No se han encontrado registros"));
		}
	}catch(Exeption $e){
		echo json_encode(array("Error"=>"Error ".$e));
	}
	
		
?>