?> <tr id="tr_<?php echo $row["CP_CODIGO"]; ?> "> <td valign="top"><a href="javascript:clicCP('<?php echo $row["CP_CODIGO"]; ?> ')"><?php echo $row["CP_CODIGO"]; ?> </a></td> <td><?php echo getLocalidades($row["CP_CODIGO"]); ?> </td> <td style="color:#909;" valign="top"><?php echo getDepartamentos($row["CP_CODIGO"]); ?> </td> </tr> <? } ?> </table> </body> <script> parent.document.getElementById('cpSeleccionado').value = ''; document.getElementById('cp').focus(); </script> </html>
// WEBSERVICES para las opciones de seleccion //-------------------------------------------------------------------------------------------------- $app->get('/getDepartamentos', function () { //Importa el archivo que contiene el método require_once 'Servicios/getDepartamentos.php'; $app = new \Slim\Slim(); require_once 'Servicios/Auth.php'; $deviceId = $app->request->headers->get('deviceID'); $hash = $app->request->headers->get('hash'); $respuesta = auth($deviceId, $hash); if ($respuesta != "Auth_OK") { echo $respuesta; return; } //LLama el método que lee de la base de datos y obtiene la respuesta $respuesta = getDepartamentos(); //Muestra la respuesta al cliente echo $respuesta; }); //-------------------------------------------------------------------------------------------------- $app->get('/getMunicipios', function () { //Importa el archivo que contiene el método require_once 'Servicios/getDepartamentos.php'; $app = new \Slim\Slim(); require_once 'Servicios/Auth.php'; $deviceId = $app->request->headers->get('deviceID'); $hash = $app->request->headers->get('hash'); $respuesta = auth($deviceId, $hash); if ($respuesta != "Auth_OK") { echo $respuesta; return;