1. List Program index.php RUMAH MAKAN DI KOTA MEDAN <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <script src="./lib/jquery.min.js"> <style type="text/css"> body { font-family: 'Segoe UI', sans-serif; background:#ef1611; background-image: url('gambar/bgod.jpg'); background-size: cover; background-position: 100%; background-attachment: fixed; } .sidebar-nav { padding: 9px 0; } footer{font-size:small;position:fixed;right:5px;bottom:5px;} .container.well .row-fluid .span9 .span12.wellwhite legend { font-family: Lucida Console, Monaco, monospace; }
Universitas Sumatera Utara
L-2-
<script type="text/javascript" src="myportal.js">
2. List Program koneksi.php
Universitas Sumatera Utara
L-3-
3. List Program Login.php <script language="javascript"> function check_val(frm) { if(frm.email.value=='') { alert('Empty Email ID Not Verified'); return false; } } <style type="text/css">
border-collapse: collapse; } table.gridtable th { border-width: 1px; padding: 8px; border-style: solid; border-color: white; background-color:green; } table.gridtable td { border-width: 1px; padding: 2px; border-style: solid; border-color: white; background-color: green; } .style1 { font-size: 14px; font-weight: bold; } body { background-color: green; } <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"> <script type="text/javascript" src="jquery-1.4.3.min.js"> <script type="text/javascript"> //google maps GIS 1.1.b by desrizal //dibuat tanggal 8 Jan 2011 var peta; var pertama = 0; var jenis = "Kantor"; var judulx = new Array(); var desx = new Array(); var i; var url; var gambar_tanda; function peta_awal(){ var jakarta = new google.maps.LatLng(3.593861,98.669314); var petaoption = {
Universitas Sumatera Utara
L - 14 -
zoom: 15, center: jakarta, mapTypeId: google.maps.MapTypeId.ROADMAP }; peta = new google.maps.Map(document.getElementById("petaku"),petaoption); google.maps.event.addListener(peta,'click',function(event){ kasihtanda(event.latLng); }); ambildatabase('awal'); } $(document).ready(function(){ $("#tombol_simpan").click(function(){ var x = $("#x").val(); var y = $("#y").val(); var namalokasi = $("#namalokasi").val(); var deskripsi = $("#deskripsi").val(); var picture = $("#picture").val(); $("#loading").show(); $.ajax({ url: "simpanlokasi.php", data: "x="+x+"&y="+y+"&deskripsi="+deskripsi+"&namalokasi="+namalokasi+"&jenis= "+jenis+"&picture="+picture, cache: false, success: function(msg){ alert(msg); $("#loading").hide(); $("#x").val(""); $("#y").val(""); $("#namalokasi").val(""); $("#deskripsi").val(""); $("#jenis").val(""); $("#picture").val(""); ambildatabase('akhir'); } }); }); $("#tutup").click(function(){ $("#jendelainfo").fadeOut(); }); }); function kasihtanda(lokasi){ set_icon(jenis);
Universitas Sumatera Utara
L - 15 -
tanda = new google.maps.Marker({ position: lokasi, map: peta, icon: gambar_tanda }); $("#x").val(lokasi.lat()); $("#y").val(lokasi.lng()); } function set_icon(jenisnya){ switch(jenisnya){ case "peta": gambar_tanda = 'icon/logoKP.png'; break;
} } function ambildatabase(akhir){ if(akhir=="akhir"){ url = "ambildata.php?akhir=1"; }else{ url = "ambildata.php?akhir=0"; } $.ajax({ url: url, dataType: 'json', cache: false, success: function(msg){ for(i=0;i<msg.wilayah.petak.length;i++){ namalokasix[i] = msg.wilayah.petak[i].namalokasi; desx[i] = msg.wilayah.petak[i].deskripsi; set_icon(msg.wilayah.petak[i].jenis); var point = new google.maps.LatLng( parseFloat(msg.wilayah.petak[i].x), parseFloat(msg.wilayah.petak[i].y)); tanda = new google.maps.Marker({ position: point, map: peta, icon: gambar_tanda });
<span class="style3"> MASUKKAN KOORDINAT X MASUKKAN KOORDINAT Y <span class="style3">PILIH NAMA RUMAH MAKAN <select id="namalokasi"> '.$qtabel['namarumahmakan'].'';