</span></p></a> <a href="javascript:loadCategMapa(<?php echo $cat[0]; ?> );" data-rel="popup" data-position-to="window" data-transition="pop" data-icon="search">Ver en el Mapa</a> </li> <?php } } elseif ($_REQUEST['tipo'] == 12) { $datos = getServicioExtendPagosFull($_REQUEST['lati'], $_REQUEST['lats'], $_REQUEST['lond'], $_REQUEST['loni']); if (count($datos) > 0) { foreach ($datos as $i => $dat) { $data_cat = getServicioCategoria($dat[0]); if ($data_cat[3] == 5) { $dir = $dat[3] . " " . $dat[4]; $texto = "<div class=titulo>" . strtoupper($dat[10]) . "</div>"; $texto .= "<div class=titulo_pop2>" . ucwords($dat[9]) . "</div>"; $texto .= "<div class=titulo_pop3>" . ucwords($dir) . "</div>"; $texto .= "<div class=titulo_pop3>" . ucwords($dat[5]) . "</div>"; if (trim($dat[11]) != "") { $texto .= "<div class=titulo_pop_descrip>" . ucwords($dat[11]) . "</div>"; } ?> <script> addMarcadoresOndemandPagos(<?php echo $dat[2];
",'<?php echo $titulo; ?> '); moverCentro(<?php echo $data_serv[3]; ?> ,<?php echo $data_serv[4]; ?> ,17); </script> <?php } elseif ($_REQUEST['ptot'] == 3) { $data_serv = getServicioPagoXId($_REQUEST['pto']); $data_categoria = getServicioCategoria($data_serv[9]); $titulo = ucwords(strtolower($data_serv[1])); $direccion = "" . ucwords($data_serv[5]) . " #" . $data_serv[6] . ""; $texto = "<div id=titulo2>" . $titulo . "</div>"; $texto .= "<div id=titulo5>" . $direccion . "</div>"; $texto .= "<div id=titulo6>" . ucwords($data_serv[7]) . "</div>"; $texto .= "<div id=tit_descrip>" . ucwords(trim($data_serv[8])) . "</div>"; $texto .= "<div id=botonera><img class=img_boton src=images/favorito.png title=Agregar a favoritos onclick=javascript:addFavorito(" . $estado_ses . "," . $data_serv[0] . ",1);><img class=img_boton src=images/mail.png title=Enviar por correo onclick=compartirPto(" . $data_serv[0] . ",1);><img class=img_boton src=images/facebook.png title=Compartir en Facebook onclick=javascript:compartirFace('" . $CM_path_base2 . "?ptot=1&pto=" . $data_serv[0] . "');> <a href='https://twitter.com/share?url=" . $CM_path_base2 . "?ptot=1&pto=" . $data_serv[0] . "&via=chilemap&text=Revisa este link' target=_BLANK><img class=img_boton src=images/twitter.png title=Compartir en Twitter></a></div>"; ?> <script> addMarcador('<?php echo $data_categoria[2]; ?> ','35,35',<?php echo $data_serv[3];
function getCatPagos() { $dbPg = pgSql_db(); $fecha = date("Y-m-d H:i:s"); $sql = "select id_serv,id_gis_servicio,nombre,prioridad,icono from cm_servicios_pago_web where estado=2 and fecha_inicio <='" . $fecha . "' and fecha_termino >='" . $fecha . "' order by prioridad"; $rsCalle = pg_query($dbPg, $sql); //echo $sql; while ($rowCalle = pg_fetch_row($rsCalle)) { $data_categoria = getServicioCategoria($rowCalle[1]); if (count($data_categoria) > 0) { $data = array(); $data[] = $rowCalle[0]; $data[] = $rowCalle[1]; $data[] = $rowCalle[2]; $data[] = $rowCalle[3]; $data[] = $rowCalle[4]; $datos[] = $data; } } return $datos; }
function getServicioExtendPagos($id_serv, $latI, $latS, $lonD, $lonI) { $dbPg = pgSql_db(); $fecha = date("Y-m-d H:i:s"); $sql2 = "SELECT id_categoria,latitud,longitud,calle,numero_municipal,comuna,region,id_comuna,id_region,categoria,nombre_servicio,descripcion FROM cm_servicios where id_categoria=" . $id_serv . " and fecha_inicio <= '" . $fecha . "' and fecha_termino >= '" . $fecha . "' and latitud<=" . $latS . " and latitud >=" . $latI . " and longitud <=" . $lonD . " and longitud >=" . $lonI . " and estado=0"; $rs2 = pg_query($dbPg, $sql2); //echo "<br>".$sql2; while ($row2 = pg_fetch_row($rs2)) { $data = array(); $data_categoria = getServicioCategoria($row2[0]); if (count($data_categoria) > 0) { $data[] = $row2[0]; $data[] = $row2[1]; $data[] = $row2[2]; $data[] = $row2[3]; $data[] = $row2[4]; $data[] = $row2[5]; $data[] = $row2[6]; $data[] = $row2[7]; $data[] = $row2[8]; $data[] = $row2[9]; $data[] = $row2[10]; $data[] = $row2[11]; $data[] = $data_categoria[2]; $datos[] = $data; } } //pg_close($dbPg); return $datos; }