示例#1
0
    $response = $desti->Get_destinos_por_pais($id);
    if (isset($response)) {
        if (is_array($response[0])) {
            foreach ($response as $val) {
                $respon[] = array(utf8_encode($val[0]), utf8_encode($val[1]), $val[2], $val[3], $val[4]);
            }
        } else {
            $respon = array(utf8_encode($response[0]), utf8_encode($response[1]), $response[2], $response[3], $response[4]);
        }
        echo json_encode($respon);
    }
}
// busca por palabras clave como pais, nombre del destino, descripcion, sub destinos, retornara la informacion mensionada
// junto a una foto
if (isset($_POST['words'])) {
    $desti = new Destinos();
    $word = $_POST['words'];
    $respon = $desti->Get_busqueda_words($word);
    if (isset($respon)) {
        if (is_array($respon[0])) {
            foreach ($respon as $value) {
                $data[] = array($value[0], utf8_encode($value[1]), utf8_encode($value[2]), $value[3], utf8_encode($value[4]), utf8_encode($value[5]));
            }
        } else {
            $data = array($respon[0], utf8_encode($respon[1]), utf8_encode($respon[2]), $respon[3], utf8_encode($respon[4]), utf8_encode($respon[5]));
        }
        echo json_encode($data);
    }
}
if (isset($_POST['id_subdesti'])) {
    include_once "../Model/Lugares.php";
示例#2
0
   width:auto;
    display: block;
  }
  body{
    background-color: rgba(255, 219, 251, 0.2);

  }



  </style>
  	    <?php 
if (isset($_GET['destinos'])) {
    $id_desti = $_GET['destinos'];
    echo '<script> var id_destin = ' . $id_desti . ';</script>';
    $destino = new Destinos();
    $lugares = new Lugares();
    $response_desti = $destino->Get_destino($id_desti);
    $response_lugar = $lugares->Get_lugares($id_desti);
    if (isset($response_desti)) {
        $cabecera = '
          <div class="row">
            <p></p>
            <div class="panel panel-default">
             <form enctype="multipart/form-data" method="post">
             <div class="panel-body"> 
               <div class="jumbotron" style="background-image: url(img/' . $response_desti[3] . '); background-repeat: no-repeat;"></div>
                <div class="row">
                 <div class="col-md-6">
                  <div class="panel panel-default">
                   <div class="panel-body">
示例#3
0
}
/////////////////////////////////////////////////////////////////////////////////
if (isset($_POST['list_client']) and $_POST['list_client'] == "ok") {
    include_once "../Model/Clientes.php";
    $cliente = new Clientes();
    $response = $cliente->Listar_clientes();
    if (isset($response)) {
        echo json_encode($response);
    } else {
        echo null;
    }
}
/////////////////////////////////////////////////////////////////////////////////
if (isset($_POST['delete_subdestino'])) {
    $id = $_POST['delete_subdestino'];
    $destino = new Destinos();
    $conect = new Conectar();
    $sql = 'SELECT Foto 
           FROM lugares 
           WHERE Luga_Id =' . $id;
    $img = $conect->consultas($sql);
    if (isset($img[0])) {
        if (unlink('../img/' . $img[0])) {
            $data['img'] = "eliminado";
        } else {
            $data['img'] = "no eliminado";
        }
    }
    $data = $destino->delete_subdestino($id);
    echo json_encode($data);
}