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"> <label> Actualizar foto</label> <input id="foto_new" type="file" class="file" data-preview-file-type="text"> </div>
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"; $lugar = new Lugares(); $id = $_POST['id_subdesti']; $response = $lugar->Get_lugares($id); if (isset($response)) { if (is_array($response[0])) { foreach ($response as $val) { $array[] = array($val[0], $val[1], utf8_encode($val[2]), utf8_encode($val[3]), $val[4]); } } else { $array = array($response[0], $response[1], utf8_encode($response[2]), utf8_encode($response[3]), $response[4]); } echo json_encode($array); } }