| master master php ada yang bisa memperbaiki coding ini gak...??? knp hanya mapnya saja yang muncul sedangkan marker iconnya gak muncul
<?php require_once('Connections/koneksi.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; } }
$colname_CRbm = "-1"; if (isset($_GET['key'])) { $colname_CRbm = $_GET['key']; } mysql_select_db($database_koneksi, $koneksi); $query_CRbm = sprintf("SELECT * FROM pelanggan WHERE KD_RBM = %s order by ID_PEL", GetSQLValueString($colname_CRbm, "text")); $CRbm = mysql_query($query_CRbm, $koneksi) or die(mysql_error()); $row_CRbm = mysql_fetch_assoc($CRbm); $totalRows_CRbm = mysql_num_rows($CRbm);
?>
<!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">
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> <script type="text/javascript">
function initialize() { var mapOptions = { zoom: 12, center: new google.maps.LatLng(-8.550198,115.343018), mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('petaku'), mapOptions);
//var locations = new google.maps.LatLng(-8.54239144,115.32731966); //var $i; var locations = new google.maps.LatLng(<?php echo $row_CRbm["latitude"]; ?>,<?php echo $row_CRbm["longitude"]; ?>); for (i=0;i>locations.length;i++) { marker : new google.maps.Marker({ position: (locations[i][0], locations[i][1]), position: location, map: map, icon: ('PLG.png') }) } }
google.maps.event.addDomListener(window, 'load', initialize); </script>
<head>
<body> <table width="590" border="1"> <tr> <td width="237" align="center" valign="middle">Informasi</td> <td width="337"><form name="form1" method="get" action=""> <label for="key"></label> <input type="text" name="key" id="key"> <input type="submit" name="cari" id="cari" value="cari"> </form></td> </tr> <tr> <td height="36">Kode RBM</td> <td rowspan="10" valign="top"><div id="petaku" style="width:1100px; height:500px"></div></td> </tr> <tr> <td height="36"><?php echo $row_CRbm['KD_RBM']; ?></td> </tr> <tr> <td height="36">Petugas</td> </tr> <tr> <td height="36"><?php echo $row_CRbm['NM_CATER']; ?></td> </tr> <tr> <td height="36">Nama Koordinator</td> </tr> <tr> <td height="40"><?php echo $row_CRbm['NM_KOORD']; ?></td> </tr> <tr> <td height="36">Jumlah Plg</td> </tr> <tr> <td height="36"><?php echo $totalRows_CRbm; ?></td> </tr> <tr> <td height="36">Jml Plg Koordinat</td> </tr> <tr> <td height="36"> </td> </tr> </table> </body> </html> <?php mysql_free_result($CRbm); ?> |
Tidak ada komentar:
Posting Komentar