@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux phosweb009 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
Current Path :
/
homepage
/
gp02
/
Path :
Upload File :
New :
File
Dir
//homepage/gp02/map.php
<?php require_once('ini.php'); for($i=0; $i<count($maparray); $i++){ list($id,$name,$yy,$xx) = split( ",", $maparray[$i]); if($_GET['cid'] == $id){ $x = $xx; $y = $yy; break; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Google Map</title> </style> <script src="http://maps.google.com/maps?file=api&v=2&key=<?php echo $gmapkey; ?>" type="text/javascript" charset="utf-8"></script> <?php //------------------------------------------------------------------- if($_GET[flag] == 'insert'){ echo <<< HTML <script type="text/javascript"> //<![CDATA[ var map; function onLoad() { map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng($y,$x),$bai); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.addControl(new GOverviewMapControl()); map.setMapType(G_NORMAL_MAP); GEvent.addListener(map, 'click', function(overlay, point) { if (point) { parent.document.forminput.lon.value=point.x; parent.document.forminput.lat.value=point.y; } }); } //]]> </script> </head> <body onload="onLoad()" style="margin:0px; padding:0px;"> <div id="map" style="width:440px; height:150px; margin:0px; padding:0px;"></div> HTML; } else{ //------------------------------------------------------------------- $p=0; $data = file($data_file); for($i=0; $i<count($data); $i++){ list($area,$mx,$my,$title,$comment,$url,$null) = split( ",", $data[$i]); if($area == $_GET['cid']){$p++;} } echo <<< HTML <script type="text/javascript"> //<![CDATA[ var map; var markers = new Array($p); function onLoad() { map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng($y,$x),$bai2); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.addControl(new GOverviewMapControl()); map.setMapType(G_NORMAL_MAP); var marker = null; var n_markers = 0; HTML; $v=0; for($i=0; $i<count($data); $i++){ list($area,$mx,$my,$title,$comment,$url,$null) = split( ",", $data[$i]); if($area == $_GET['cid']){ $title = mb_convert_encoding($title, "UTF-8", "EUC-JP"); $comment = mb_convert_encoding($comment, "UTF-8", "EUC-JP"); $url = mb_convert_encoding($url, "UTF-8", "EUC-JP"); if(empty($url)){ $marker_text = "<br>$title <br> $comment"; } else{ $marker_text = "<br>$title <br> $comment<br><br>[<a href=$url target=blank>HOMEPAGE</a>]"; } echo <<< HTML var markeropts = new Object(); marker = new GMarker(new GPoint($mx,$my), markeropts); markers[n_markers] = marker; GEvent.addListener(markers[$v], "mouseover", function () {markers[$v].openInfoWindowHtml("$marker_text");}); n_markers++; map.addOverlay(marker); HTML; $v++; } } echo <<< HTML } //]]> </script> <style type="text/css"> <!-- body,html { overflow: hidden; } .map { margin: 0px; height: 350px; width: 450px; padding:0px; } --> </style> </head> <body onload="onLoad()" style="margin:0px; padding:0px; background-color:#99B3CC"> <div id="map" class="map"></div> HTML; } //------------------------------------------------------------------- ?> </body> </html>