<!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="Content-Type" content="text/html; charset=utf-8" />
<title>เว็บท่องเที่ยวอำเภอเกาะสมุย</title>
<link href="css/main2.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.fancybox-custom .fancybox-skin {
box-shadow: 0 0 50px #222;
}
</style>
<style>
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
.img_left{ float:left; margin-right:5px; margin-bottom:5px; border:1px dotted #999999; background-color:#f2f2f2; padding:2px;}
.cls{ clear:both;}
.font_map{ font-family:Tahoma, Arial, serif; font-size:13px;}
div#map_canvas { width:100%; height:100%; }
</style>
</head>
<body background="images/images/bg-content.jpg">
<div id="container">
<div id="header"></div>
<div id="boxbuton">
<a href="index.php" target="_blank" id="home"></a>
<a href="index360.php" target="_blank" id="TOURISM"></a>
<a href="map_360.php" target="_blank" id="MAP"></a>
<a href="searchroutes.php" target="_blank" id="SEARCH"></a>
<a href="#" target="_blank" id="CONTACT"></a> </div>
<div id="content">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script type="text/javascript" src="http://www.cyberthai.net/gmap3.js"></script>
<script type="text/javascript">
$(function () {
$('#map_canvas').gmap3({
map: {
options: {
center: [9.517877, 100.012822],
zoom: 11,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
}
},
marker: {
values: [
<?php
$dbserver = 'localhost';
$dbuser = 'root' ;
$dbpass= "oil2537";
$dbname= 'project360_2';
error_reporting(E_ALL ^ E_NOTICE);
mysql_connect($dbserver, $dbuser, $dbpass) or die("เชื่อมต่อฐานข้อมูลไม่ได้ ");
mysql_select_db($dbname) or die("เลือกฐานข้อมูลไม่ได้"); // เลือกฐานข้อมูล
mysql_query("SET NAMES UTF8");
?>
<?php
$sql = mysql_query("select * from uploadfile");
$num = mysql_num_rows($sql);
if ($num>0){
while ($r=mysql_fetch_array($sql)) {
++$i;
$i != $num ? $k=',' : $k='';
?>
{latLng:[<?=$r[Latitude]?>, <?=$r[Longitude]?>], data:"<div class='font_map'><img src='myfile/<?=$r[Tour_image]?>' width='75' height='75' alt='<?=$r[Tour_name]?>' class='img_left' /><strong>
<a href='#' title='<?=$r[Tour_name]?>' target='_blank'><?=$r[Tour_name]?></a></strong><br /><a class='fancybox' href='vdo/<?=$r['vdo']?>'>ภาพ360</a></div>",options:{icon:'myfile/<?=$r[Tour_image]?>'}}<?=$k?>
<?php
}
}
?>
],
events: {
mouseover: function (marker, event, context) {
var map = $(this).gmap3("get"),
infowindow = $(this).gmap3({
get: {
name: "infowindow"
}
});
if (infowindow) {
infowindow.open(map, marker);
infowindow.setContent(context.data);
} else {
$(this).gmap3({
infowindow: {
anchor: marker,
options: {
content: context.data
}
}
});
}
},
closeclick: function () {
infowindow.close();
},
mouseout: function () {
var infowindow = $(this).gmap3({
get: {
name: "infowindow"
}
});
}
}
}
});
});
</script>
<div id="map_canvas">
</div></div>
<div id='footer'>
</div></div>
</body>
</html>