<?php

    require 'get_infouser.php';
    $json = file_get_contents('php://input');   
    $obj = json_decode($json);
    $id = $obj->flag;
    // Returns a Json
    header('Content-Type: application/json');
    
    $id_cliente = $obj->id_cliente;
    
    $conn = new mysqli("progymcloud.com","direct18","L4LL4v3M@3str@","$obj->bd");
    $conn -> set_charset("utf8");
            
        $nombre;
        $nombreSuc;
        $activo;
        $foto = "";
        $array_planes;
        $fechaFin;
        $email = "Sin registro";
        $telefono = "Sin registro";
        $fechaIngreso;
        $date = date('Y-m-d');
        $fecha_hoy = strtotime($date);
        $query = "SELECT * FROM socios  WHERE socios.idSocio = '$obj->id'";
        $resultado = $conn->query($query);
        
        if($resultado->num_rows > 0){
            echo 'ok';
        }else{
            echo 'no';
        }
        
        $conn->close();

?>