<?php require_once('Connections/conexion.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$id_aviso=$_GET['id_aviso'];
mysql_select_db($database_conexion, $conexion);
$query_Recordset1 = "SELECT * FROM avisos WHERE id_aviso='$id_aviso'";
$Recordset1 = mysql_query($query_Recordset1, $conexion) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="20; url=ubicacionavisos.php?id_aviso=<?php echo $row_Recordset1['id_aviso']; ?>">
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>WedServer ubicación</title>
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" />
<link rel="stylesheet" type="text/css" href="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.min.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
<!-- Optional Mousewheel support: http://brandonaaron.net/code/mousewheel/docs -->
<script type="text/javascript" src="PATH/TO/YOUR/COPY/OF/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.core.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.calbox.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/i18n/jquery.mobile.datebox.i18n.en_US.utf8.js">
</script>
<link href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css"/>
<script src="http://code.jquery.com/jquery-1.6.4.min.js" type="text/javascript"></script>
<style>
#map_canvas
{
color:#333;
font-size:12px;
text-shadow:none;
line-height:12px;
}
.marcador
{
background-image:url();
background-repeat:no-repeat;
padding-left:35px;
line-height:7px;
}
/*globo de texto: nombre usuario*/
h2
{
color:#333;
font-size:14px;
text-shadow:inherit;
text-shadow:#CCC;
font-family:Tahoma, Geneva, sans-serif;
}
/*globo de texto: direccion usuario*/
h3
{
color:#333;
font-size:11px;
text-shadow:none;
line-height:13px;
}
</style>
<script src="../js/jquery-min.js"></script>
<script language="JavaScript" src="funcionesjavascript.js"></script>
<script type="text/javascript">
$(document).bind("mobileinit", function ()
{
$.mobile.ajaxEnabled = true;
});
</script>
<script type="text/javascript" src="jquery-ui-map-3.0-rc/ui/jquery.ui.map.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true&language=es®ion=ES"></script>
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script src="http://code.google.com/apis/gears/gears_init.js"></script>
<script type="text/javascript">
var directionDisplay;
var directionsService = new google.maps.DirectionsService();
var initialLocation;
var geocoder;
var Arriate = new google.maps.LatLng(37.778551, -3.804231);
var browserSupportFlag = new Boolean();
var map;
var infowindow = new google.maps.InfoWindow();
function initialize() {
directionsDisplay = new google.maps.DirectionsRenderer();
var myOptions =
{
zoom: 11,
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
geocoder = new google.maps.Geocoder();
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
if(navigator.geolocation)
{
browserSupportFlag = true;
navigator.geolocation.getCurrentPosition(function(position)
{
initialLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude);
map.setCenter(initialLocation);
infowindow.open(map);
var ContenidoMarcador = 'Posición del Técnico';
var infoventana = new google.maps.InfoWindow(
{
content: ContenidoMarcador
});
var image = '../imagenes/tecnico.png';
var marcadorTecnico = new google.maps.Marker(
{
position: initialLocation,
map: map,
icon: image,
title:"Aviso"
});
google.maps.event.addListener(marcadorTecnico, 'click', function()
{
infoventana.open(map,marcadorTecnico);
});
}, function() {
handleNoGeolocation(browserSupportFlag);
});
} else if (google.gears) {
browserSupportFlag = true;
var geo = google.gears.factory.create('beta.geolocation');
geo.getCurrentPosition(function(position) {
initialLocation = new google.maps.LatLng(position.latitude,position.longitude);
map.setCenter(initialLocation);
infowindow.open(map);
var ContenidoMarcador = 'Posición del Técnico';
var infoventana = new google.maps.InfoWindow({
content: ContenidoMarcador
});
var image = '../imagenes/tecnico.png';
var marcadorTecnico = new google.maps.Marker({
position: initialLocation,
map: map,
icon: image,
title:"Aviso"
});
google.maps.event.addListener(marcadorTecnico, 'click', function() {
infoventana.open(map,marcadorTecnico);
});
}, function() {
handleNoGeolocation(browserSupportFlag);
});
} else {
// Browser doesn't support Geolocation
browserSupportFlag = false;
handleNoGeolocation(browserSupportFlag);
}