|
|
|
Parse error: syntax error, unexpected T_ELSEIF in C:\AppServ\www\web\place\place.php on line 62 ช่วยดูทีคับ |
|
|
|
|
|
|
|
เราว่าเราเชคปีกกาดีละนะ ไม่รู้ว่ามันเออเรอที่ไหน ช่วยดูทีคับ
Code (PHP)
<html>
<head>
<title>กทม. ปริมณฑล</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="imagetoolbar" content="no">
<script type="text/javascript" src="http://mmmap15.longdo.com/mmmap/mmmap.php"></script>
</head>
<script>
var mmmap;
var mylang = "th";
var circle;
function mmmap_client_init() {
var mmmap_div = document.getElementById("mmmap_div");
window.onresize = myRepaint;
mmmap = new MMMap(mmmap_div,13.767734,100.5351375,11, "traffic");
mmmap.initVector();
mmmap.setCenter(13.767734,100.5351375, Math.pow(2, 11));
myRepaint();
<?php
$sql1="select*from (place inner join kind_artisan on place.Id_kart=kind_artisan.Id_kart) order by Id_place";
$objQuery = mysql_query($sql1);
while($row = mysql_fetch_array($objQuery))
{
$info = $row['Id_place']; ?> //echo $arry_province[1];
var center = [<?php print "".$row['lat']."" ?>, <?php print "".$row['lon']."" ?>];
circle = new MMLine(mmmap);
circle.setMode("ellipse");
circle.setLineOpacity(0.5);
circle.setFillOpacity(0.5);
circle.setWidth("2"); // 2 km
circle.setHeight("2"); // 2 km
circle.setPoints(center);
circle.setFillColor("#99FF66");
circle.rePaint();
<?php if($row['Id_kart']==""){?>
var markerlat = <?php print"".$row['lat']."" ?>;
var markerlon = <?php print "".$row['lon']."" ?>;
mmmap.createMarker(markerlat, markerlon);
mmmap.createMarker(markerlat, markerlon, " <?php print "".$row['name']."" ?> <?php print "".$row['Kname']."" ?>");
<?php }?>
<?php elseif ?>
<?php {?> var marker2 = new longdo.Marker({ lon:<?php print "".$row['lon']."" ?>, lat: <?php print"".$row['lat']."" ?> },
{
title: 'Marker',
icon: {
url: 'http://mmmap15.longdo.com/mmmap/images/icons_big/government-office2.png',
offset: { x: 12, y: 45 }
},
detail: 'Drag me',
visibleRange: { min: 7, max: 8 },
draggable: true
});
<?php } ?>
<?php } ?>
}
var arraytestdiv;
function myRepaint() {
chkWinSize();
var newwidth = parseInt(ww) - 5 - 5;
var newheight = parseInt(wh) - 100 - 5;
mmmap.setSize(newwidth,newheight);
mmmap.rePaint();
}
</script>
</head>
<body onLoad="mmmap_client_init()" scroll="no" style="overflow:hidden;margin: 0px 0px 0px 5px;" marginwidth=0 marginheight=0>
<div id="mmmap_div" style="position: absolute; left: 5px; top: 10px; width: 800px; height: 200px; border: 0px solid red"></div>
</body>
</html>
Tag : PHP
|
|
|
|
|
|
Date :
2014-01-19 16:08:09 |
By :
web |
View :
841 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
แถว ๆ Line 62 ครับ ลองปรับแก้ไขดู
|
|
|
|
|
Date :
2014-01-20 06:03:28 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
https://www.thaicreate.com/php/php-if-elseif.html
ลองดูการใช้ if elseif จากด้านบนนะครับ
if elseif ต้องตามด้วย ()
|
|
|
|
|
Date :
2014-01-20 06:51:56 |
By :
17196611 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|