first commit
This commit is contained in:
255
application/views/home/menu/data_lahan_lihat.php
Normal file
255
application/views/home/menu/data_lahan_lihat.php
Normal file
@ -0,0 +1,255 @@
|
||||
<div class="row small-spacing">
|
||||
<div class="col-xs-12">
|
||||
|
||||
<div class="box-content card">
|
||||
<h4 class="box-title">Daftar Transaksi Produksi</h4>
|
||||
<div class="card-content">
|
||||
<div class="form-group" style="overflow-x: auto" id="tabel_transaksi">
|
||||
<table id="tabel-data" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Tahun</th>
|
||||
<th>Musim</th>
|
||||
<th>Hasil</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (count($data_transaksi_produksi->result())>0): ?>
|
||||
<?php foreach ($data_transaksi_produksi->result() as $key => $value):
|
||||
$ket = json_decode($value->ket);
|
||||
?>
|
||||
<?php $i=1; foreach ($ket as $key1 => $value1): ?>
|
||||
<tr>
|
||||
<td><?=$i?></td>
|
||||
<td><?=$value1->tahun?></td>
|
||||
<td><?=$value1->musim?></td>
|
||||
<td><?=$value1->jumlah_produksi?></td>
|
||||
<td align="center">
|
||||
<a href="<?=base_url()?>home/data_petambak/lihat/<?=$this->uri->segment(3)?>/<?=$value1->tahun?>-<?=$value1->musim?>"><button type="button" title="Lihat Transaksi Produksi" class="btn btn-info btn-circle btn-sm waves-effect waves-light"><i class="ico fa fa-list-alt"></i></button></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; endforeach ?>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12">
|
||||
<div class="box-content card">
|
||||
<h4 class="box-title">Luas Lahan Petambak : <span class="nowrap" id="luas1"></span> Ha </h4>
|
||||
<h4 class="box-title">Jumlah Lahan : <?=count($lahan->result())?> </h4>
|
||||
|
||||
<div class="card-content">
|
||||
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBw6bnAk0C2jIDDbz_dVRso9gUEnHLTH68&libraries=drawing,places,geometry"></script>
|
||||
<script type="text/javascript">
|
||||
var infowindow = new google.maps.InfoWindow({
|
||||
size: new google.maps.Size(150, 50)
|
||||
});
|
||||
|
||||
var geocoder;
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
var geolib = google.maps.geometry.spherical;
|
||||
|
||||
var myOptions = {
|
||||
zoom: 12,
|
||||
center: new google.maps.LatLng(-4.0741291, 119.63409424),
|
||||
mapTypeControl: true,
|
||||
mapTypeControlOptions: {
|
||||
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
|
||||
},
|
||||
navigationControl: true,
|
||||
mapTypeId: 'roadmap'
|
||||
}
|
||||
map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
|
||||
|
||||
google.maps.event.addListener(map, 'click', function() {
|
||||
infowindow.close();
|
||||
});
|
||||
|
||||
bounds = new google.maps.LatLngBounds();
|
||||
|
||||
<?php ////////////// sini awal tampil kecamatan ////////////////////////// ?>
|
||||
|
||||
<?php foreach ($kecamatan->result() as $key => $value) { ?>
|
||||
|
||||
<?php
|
||||
if ($value->id_kecamatan == 1) {
|
||||
$color = "#5C00B3";
|
||||
}elseif ($value->id_kecamatan == 2) {
|
||||
$color = "#FFFF00";
|
||||
}elseif ($value->id_kecamatan == 3) {
|
||||
$color = "#0D0811";
|
||||
}elseif ($value->id_kecamatan == 4) {
|
||||
$color = "#B85612";
|
||||
}
|
||||
?>
|
||||
var polygon_<?=$value->id_kecamatan?> = new google.maps.Polygon({
|
||||
map: map,
|
||||
path: [<?=$value->kordinat?>],
|
||||
strokeColor: "#000000",
|
||||
strokeOpacity: 2,
|
||||
strokeWeight: 1,
|
||||
fillColor: "<?=$color?>",
|
||||
fillOpacity: 0.4,
|
||||
});
|
||||
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php ////////////// sini akhir tampil kecamatan ////////////////////////// ?>
|
||||
|
||||
<?php ////////////// sini awal tampil lahan ////////////////////////// ?>
|
||||
|
||||
<?php foreach ($lahan->result() as $key => $value) { ?>
|
||||
|
||||
<?php
|
||||
if ($value->tek_tambak == 1) {
|
||||
$color = "#FE2D00";
|
||||
}elseif ($value->tek_tambak == 2) {
|
||||
$color = "#77FE00";
|
||||
}elseif ($value->tek_tambak == 3) {
|
||||
$color = "#1F00FE";
|
||||
}
|
||||
?>
|
||||
var lahan_<?=$value->id_lahan?> = new google.maps.Polygon({
|
||||
map: map,
|
||||
path: [<?=$value->point?>],
|
||||
strokeColor: "#000000",
|
||||
strokeOpacity: 2,
|
||||
strokeWeight: 1,
|
||||
fillColor: "<?=$color?>",
|
||||
fillOpacity: 0.4,
|
||||
});
|
||||
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php ////////////// sini akhir tampil lahan ////////////////////////// ?>
|
||||
|
||||
<?php ////////////// sini awal infowindows kecamatan ////////////////////////// ?>
|
||||
|
||||
<?php foreach ($kecamatan->result() as $key => $value) { ?>
|
||||
|
||||
google.maps.event.addListener(polygon_<?=$value->id_kecamatan?>, 'click', function(event) {
|
||||
var vertices = this.getPath();
|
||||
var luas = google.maps.geometry.spherical.computeArea(polygon_<?=$value->id_kecamatan?>.getPath()) / 10000;
|
||||
luas = numberWithCommas(luas.toFixed(2));
|
||||
var contentString ="<div class='form-group' >"+
|
||||
"<h5>Kecamatan : <?=$value->kecamatan?></h5>"+
|
||||
"<h5>Luas : "+luas + " Ha"+"</h5>"+
|
||||
"</div>";
|
||||
|
||||
infowindow.setContent(contentString);
|
||||
infowindow.setPosition(event.latLng);
|
||||
infowindow.open(map);
|
||||
});
|
||||
|
||||
// for (var i = 0; i < polygon_<?=$value->id_kecamatan?>.getPath().getLength(); i++) {
|
||||
// bounds.extend(polygon_<?=$value->id_kecamatan?>.getPath().getAt(i));
|
||||
// }
|
||||
|
||||
|
||||
<?php } ?>
|
||||
<?php ////////////// sini akhir infowindows kecamatan ////////////////////////// ?>
|
||||
|
||||
|
||||
<?php ////////////// sini awal infowindows lahan ////////////////////////// ?>
|
||||
|
||||
<?php foreach ($lahan->result() as $key => $value) {
|
||||
$cek_tek_tambak = $this->mhome->tampil_data_where('tb_tambak',array('id_tambak' => $value->tek_tambak));
|
||||
foreach ($cek_tek_tambak->result() as $key2 => $value2) ;
|
||||
$cek_kelurahan = $this->mhome->tampil_data_where('tb_kelurahan',array('id_kelurahan' => $value->kelurahan));
|
||||
foreach ($cek_kelurahan->result() as $key3 => $value3) ;
|
||||
$cek_kecamatan = $this->mhome->tampil_data_where('tb_kecamatan',array('id_kecamatan' => $value->kecamatan));
|
||||
foreach ($cek_kecamatan->result() as $key4 => $value4) ;
|
||||
?>
|
||||
|
||||
google.maps.event.addListener(lahan_<?=$value->id_lahan?>, 'click', function(event) {
|
||||
var vertices = this.getPath();
|
||||
var luas = google.maps.geometry.spherical.computeArea(lahan_<?=$value->id_lahan?>.getPath()) / 10000;
|
||||
luas = numberWithCommas(luas.toFixed(2));
|
||||
var contentString ="<div class='form-group' >"+
|
||||
"<h5>ID Lahan: <?=$value->id_lahan?></h5>"+
|
||||
"<h5>Teknologi Tambak : <?=$value2->tambak?></h5>"+
|
||||
"<h5>Kecamatan : <?=$value4->kecamatan?></h5>"+
|
||||
"<h5>Kelurahan : <?=$value3->kelurahan?></h5>"+
|
||||
"<h5>Luas : "+luas + " Ha"+"</h5>"+
|
||||
"</div>";
|
||||
|
||||
|
||||
infowindow.setContent(contentString);
|
||||
infowindow.setPosition(event.latLng);
|
||||
infowindow.open(map);
|
||||
});
|
||||
|
||||
for (var i = 0; i < lahan_<?=$value->id_lahan?>.getPath().getLength(); i++) {
|
||||
bounds.extend(lahan_<?=$value->id_lahan?>.getPath().getAt(i));
|
||||
}
|
||||
|
||||
|
||||
<?php } ?>
|
||||
<?php ////////////// sini akhir infowindows lahan ////////////////////////// ?>
|
||||
|
||||
|
||||
<?php ////////////// sini awal kira luas lahan petambak ////////////////////////// ?>
|
||||
<?php foreach ($lahan->result() as $key => $value) { ?>
|
||||
var luasl<?=$value->id_lahan?> =google.maps.geometry.spherical.computeArea(lahan_<?=$value->id_lahan?>.getPath());
|
||||
|
||||
<?php } ?>
|
||||
|
||||
var luaslahan = <?php foreach ($lahan->result() as $key => $value) { echo "luasl".$value->id_lahan."+";} ?>0;
|
||||
|
||||
luaslahan = luaslahan / 10000;
|
||||
|
||||
document.getElementById("luas1").innerHTML = numberWithCommas(luaslahan.toFixed(2));
|
||||
|
||||
<?php ////////////// sini akhir kira luas lahan petambak ////////////////////////// ?>
|
||||
map.fitBounds(bounds);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
// document.getElementById('luas').value = luas;
|
||||
|
||||
</script>
|
||||
|
||||
<div id="vertices"></div>
|
||||
<div id="map_canvas"></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
|
||||
<!-- /.col-xs-12 -->
|
||||
|
||||
<!-- /.col-lg-6 col-xs-12 -->
|
||||
</div>
|
||||
329
application/views/home/menu/data_lahan_lihat_detail.php
Normal file
329
application/views/home/menu/data_lahan_lihat_detail.php
Normal file
@ -0,0 +1,329 @@
|
||||
|
||||
<div class="row small-spacing">
|
||||
<?php
|
||||
$tahunnya = explode('-',$this->uri->segment(5));
|
||||
?>
|
||||
<!-- /.col-lg-6 col-xs-12 -->
|
||||
<div class="col-xs-12 col-lg-12">
|
||||
<div class="box-content card">
|
||||
<h4 class="box-title">Daftar Transaksi Produksi</h4>
|
||||
<div class="card-content">
|
||||
<div class="form-group" style="overflow-x: auto" id="tabel_transaksi">
|
||||
<table id="tabel-data" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Tahun</th>
|
||||
<th>Musim</th>
|
||||
<th>Hasil</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (count($data_transaksi_produksi->result())>0): ?>
|
||||
<?php foreach ($data_transaksi_produksi->result() as $key => $value):
|
||||
$ket = json_decode($value->ket);
|
||||
?>
|
||||
<?php $i=1; foreach ($ket as $key1 => $value1): ?>
|
||||
<tr>
|
||||
<td><?=$i?></td>
|
||||
<td><?=$value1->tahun?></td>
|
||||
<td><?=$value1->musim?></td>
|
||||
<td><?=$value1->jumlah_produksi?></td>
|
||||
<td align="center">
|
||||
<a href="<?=base_url()?>home/data_petambak/lihat/<?=$kode_lahan?>/<?=$value1->tahun?>-<?=$value1->musim?>"><button type="button" title="Lihat Transaksi Produksi" class="btn btn-info btn-circle btn-sm waves-effect waves-light"><i class="ico fa fa-list-alt"></i></button></a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; endforeach ?>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-12 col-xs-12">
|
||||
<div class="box-content card ">
|
||||
<h4 class="box-title">Form Transaksi Produksi Tahun <?=$tahunnya[0]?> Musim <?=$tahunnya[1]?> </h4>
|
||||
<!-- /.box-title -->
|
||||
<div class="card-content">
|
||||
<?php foreach ($lahan->result() as $key => $value) ;
|
||||
$cari_data_harga = $this->mhome->tampil_data_where('tb_tambak',array('id_tambak' =>$value->tek_tambak));
|
||||
foreach ($cari_data_harga->result() as $key3 => $value3);
|
||||
$ket = json_decode($value3->ket);
|
||||
?>
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-5 control-label">Kode Lahan</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" value="<?=$value->id_lahan?>" title="ID Lahan" disabled="">
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-5 control-label">Luas Lahan</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" value="<?=$value->luas_lahan?> Ha" title="Luas Lahan" disabled="">
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-5 control-label">Jenis Tambak</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" value="<?=$value3->tambak?>" title="Jenis Tambak" disabled="">
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-5 control-label">Waktu Tebar</label>
|
||||
<div class="col-sm-4">
|
||||
<?php
|
||||
$min_date = date('Y-m-d');
|
||||
$min_date = new DateTime($min_date);
|
||||
$min_date->modify('-30 day');
|
||||
$min_date =date('Y-m-d', strtotime($min_date->format('Y-m-d')));
|
||||
|
||||
|
||||
$max_date = date('Y-m-d');
|
||||
$max_date = new DateTime($max_date);
|
||||
$max_date->modify('+30 day');
|
||||
$max_date =date('Y-m-d', strtotime($max_date->format('Y-m-d')));
|
||||
// print_r($ket_nya);
|
||||
$produksi_pya = $ket_nya['ket_elemen_produksi'];
|
||||
// print_r($produksi_pya);
|
||||
$jumlah_produksi = round(($produksi_pya[1]*0.02)+$ket_nya['masa_tumbuh']-150);
|
||||
|
||||
$ekor = $produksi_pya[1];
|
||||
$saiz = ceil(($ekor / $jumlah_produksi) - (($ket_nya['masa_tumbuh']/($ekor / $jumlah_produksi))*13));
|
||||
|
||||
foreach ($produksi_pya as $key4 => $value4) {
|
||||
if ($key4 != 4) {
|
||||
$jumlah_ini[$key4] = $value4;
|
||||
}else{
|
||||
$jumlah_ini[$key4] = $value4 * $ket_nya['masa_tumbuh'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($saiz >= 45) {
|
||||
$hargajual = 35000;
|
||||
}elseif ($saiz >= 30) {
|
||||
$hargajual = 60000;
|
||||
}elseif ($saiz >= 25) {
|
||||
$hargajual = 80000;
|
||||
}elseif ($saiz >= 20) {
|
||||
$hargajual = 110000;
|
||||
}elseif ($saiz >= 17) {
|
||||
$hargajual = 120000;
|
||||
}elseif ($saiz >= 8) {
|
||||
$hargajual = 180000;
|
||||
}elseif ($saiz >= 1) {
|
||||
$hargajual = 185000;
|
||||
}
|
||||
// print_r($jumlah_ini);
|
||||
|
||||
$nilaiproduksi = $hargajual * $jumlah_produksi;
|
||||
|
||||
|
||||
?>
|
||||
<input type="date" class="form-control" id="tanggal" title="Waktu Tebar" min="<?=$min_date?>" max="<?=$max_date?>" value="<?=$ket_nya['waktu_tebar']?>" disabled>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-5 control-label">Masa Tumbuh :</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control" id="masa_tumbuh" disabled="">
|
||||
<option value="" disabled="">-Sila Pilih Masa Pertumbuhan</option>
|
||||
<option value="60" <?php if ($ket_nya['masa_tumbuh'] == 60): ?>selected <?php endif ?>>60</option>
|
||||
<option value="90" <?php if ($ket_nya['masa_tumbuh'] == 90): ?>selected <?php endif ?>>90</option>
|
||||
<option value="150" <?php if ($ket_nya['masa_tumbuh'] == 150): ?>selected <?php endif ?> >150</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sinitabel">
|
||||
<form class="form-horizontal" style="overflow-x: auto" id="elemen_produksi">
|
||||
<table id="tabel-data" class="table table-striped table-bordered display" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bahan</th>
|
||||
<th>Harga</th>
|
||||
<th width="20%">Satuan</th>
|
||||
<th>Jumlah</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<?php
|
||||
$ket = json_decode($value3->ket);
|
||||
$satuan = json_decode($value3->satuan);
|
||||
$r = 1;
|
||||
$biaya = 0;
|
||||
// print_r($satuan->$r);
|
||||
foreach ($elemen_produksi->result() as $key2 => $value2):
|
||||
$no = $value2->id_elemen;
|
||||
$satu = $satuan->$no;
|
||||
$harga = $ket->$no;
|
||||
|
||||
if ($harga == '' and $harga == null) {
|
||||
$harga = '';
|
||||
}else{
|
||||
$harga = number_format($harga);
|
||||
}
|
||||
|
||||
|
||||
$jumlah = $jumlah_ini[$value2->id_elemen] * $ket->$no;
|
||||
|
||||
// if ($produksi_pya['Tenaga']) {
|
||||
// $satu = $satu * $harga;
|
||||
// }else{
|
||||
// $satu = $satu * $harga * $hari;
|
||||
// }
|
||||
$biaya = $biaya + $jumlah;
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$value2->nama_elemen?></td>
|
||||
<td>Rp. <?=$harga?> </td>
|
||||
<td>
|
||||
<input type="text" style="width: 200px;" class="form-control" id="inputan<?=$no?>" placeholder="Jumlah <?=$value2->nama_elemen?>" name="<?=$value2->id_elemen?>" minlegth='5' maxlength='10' value='<?=number_format($produksi_pya[$value2->id_elemen])?>' disabled>
|
||||
</td>
|
||||
<td>Rp. <?=number_format($jumlah)?></td>
|
||||
</tr>
|
||||
<?php endforeach ;
|
||||
$persiapan_lahan = $biaya * 10 / 100;
|
||||
$totalbiaya = $biaya + $persiapan_lahan;
|
||||
$keuntungan = $nilaiproduksi - $biaya - $persiapan_lahan;
|
||||
if ($keuntungan <= 0 ) {
|
||||
$status = 'Tidak Berhasil';
|
||||
}else{
|
||||
$status = 'Berhasil';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-5 control-label">Jumlah Produksi</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" value="<?=number_format($jumlah_produksi)?> kg" title="Jumlah Produksi" disabled="">
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<center><button type="button" class="btn btn-primary btn-sm waves-effect waves-light" onclick="submitdata()" id="button_submit" style="display: none">Proses Transaksi Produksi</button>     <a href="<?=base_url()?>penyuluh/transaksi/lihat/<?=$this->uri->segment(4).'/'.$this->uri->segment(5)?>"><button type="button" class="btn btn-danger btn-sm waves-effect waves-light" id="button_batal" style="display: none">Batal Edit</button></a><button type="button" class="btn btn-warning btn-sm waves-effect waves-light" onclick="editdata()" id="button_edit" style="display: none">Edit Transaksi Produksi ?</button></center>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.card-content -->
|
||||
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- /.box-content card white -->
|
||||
</div>
|
||||
|
||||
|
||||
<div id="detailsini">
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box-content card white">
|
||||
<!-- /.box-title -->
|
||||
<div class="card-content">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-3 control-label">Panen</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" title="Panen" value="<?=$ket_nya['masa_panen']?>" disabled="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputPassword3" class="col-sm-3 control-label">Saiz</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" title="Saiz" value="+- <?=$saiz?> ekor/kg" disabled="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputPassword3" class="col-sm-3 control-label">Total Biaya</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" title="Jumlah" value="Rp . <?=number_format($totalbiaya)?>" disabled="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-content -->
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<!-- /.col-lg-6 col-xs-12 -->
|
||||
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box-content card white">
|
||||
<div class="card-content">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-3 control-label">Harga Jual</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="Enter your email" title="Harga Jual" value="Rp. <?=number_format($hargajual)?>" disabled="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputPassword3" class="col-sm-3 control-label">Nilai Produksi</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" title="Nilai" value="Rp. <?=number_format($nilaiproduksi)?>" disabled="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputPassword3" class="col-sm-3 control-label">Keuntungan</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" title="Keuntungan" value="Rp. <?=number_format($keuntungan)?>" disabled="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-xs-12">
|
||||
<div class="box-content card white">
|
||||
<div class="card-content">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-5 control-label">Status Produksi</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" value="<?=$status?>" title="Status Produksi" disabled="">
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
269
application/views/home/menu/kecamatan.php
Normal file
269
application/views/home/menu/kecamatan.php
Normal file
@ -0,0 +1,269 @@
|
||||
<div class="row small-spacing">
|
||||
<div class="col-xs-12">
|
||||
<div class="box-content card">
|
||||
<h4 class="box-title">Luas Kota Parepare : <span class="nowrap" id="luas1"></span> Ha </h4>
|
||||
<h4 class="box-title">Jumlah Tambak : <?=count($lahan->result())?> </h4>
|
||||
|
||||
<div class="box-content">
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBw6bnAk0C2jIDDbz_dVRso9gUEnHLTH68&libraries=drawing,places,geometry"></script>
|
||||
<script type="text/javascript">
|
||||
var infowindow = new google.maps.InfoWindow({
|
||||
size: new google.maps.Size(150, 50)
|
||||
});
|
||||
|
||||
var geocoder;
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
var geolib = google.maps.geometry.spherical;
|
||||
|
||||
var myOptions = {
|
||||
zoom: 12,
|
||||
center: new google.maps.LatLng(-4.0741291, 119.63409424),
|
||||
mapTypeControl: true,
|
||||
mapTypeControlOptions: {
|
||||
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
|
||||
},
|
||||
navigationControl: true,
|
||||
mapTypeId: 'roadmap'
|
||||
}
|
||||
map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
|
||||
|
||||
google.maps.event.addListener(map, 'click', function() {
|
||||
infowindow.close();
|
||||
});
|
||||
|
||||
bounds = new google.maps.LatLngBounds();
|
||||
|
||||
<?php ////////////// sini awal tampil kecamatan ////////////////////////// ?>
|
||||
|
||||
<?php foreach ($kecamatan->result() as $key => $value) { ?>
|
||||
|
||||
<?php
|
||||
if ($value->id_kecamatan == 1) {
|
||||
$color = "#5C00B3";
|
||||
}elseif ($value->id_kecamatan == 2) {
|
||||
$color = "#FFFF00";
|
||||
}elseif ($value->id_kecamatan == 3) {
|
||||
$color = "#0D0811";
|
||||
}elseif ($value->id_kecamatan == 4) {
|
||||
$color = "#B85612";
|
||||
}
|
||||
?>
|
||||
var polygon_<?=$value->id_kecamatan?> = new google.maps.Polygon({
|
||||
map: map,
|
||||
path: [<?=$value->kordinat?>],
|
||||
strokeColor: "#000000",
|
||||
strokeOpacity: 2,
|
||||
strokeWeight: 1,
|
||||
fillColor: "<?=$color?>",
|
||||
fillOpacity: 0.4,
|
||||
});
|
||||
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php ////////////// sini akhir tampil kecamatan ////////////////////////// ?>
|
||||
|
||||
<?php ////////////// sini awal tampil lahan ////////////////////////// ?>
|
||||
|
||||
<?php foreach ($lahan->result() as $key => $value) { ?>
|
||||
|
||||
<?php
|
||||
if ($value->tek_tambak == 1) {
|
||||
$color = "#FE2D00";
|
||||
}elseif ($value->tek_tambak == 2) {
|
||||
$color = "#77FE00";
|
||||
}elseif ($value->tek_tambak == 3) {
|
||||
$color = "#1F00FE";
|
||||
}
|
||||
?>
|
||||
var lahan_<?=$value->id_lahan?> = new google.maps.Polygon({
|
||||
map: map,
|
||||
path: [<?=$value->point?>],
|
||||
strokeColor: "#000000",
|
||||
strokeOpacity: 2,
|
||||
strokeWeight: 1,
|
||||
fillColor: "<?=$color?>",
|
||||
fillOpacity: 0.4,
|
||||
});
|
||||
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php ////////////// sini akhir tampil lahan ////////////////////////// ?>
|
||||
|
||||
<?php ////////////// sini awal infowindows kecamatan ////////////////////////// ?>
|
||||
|
||||
<?php foreach ($kecamatan->result() as $key => $value) { ?>
|
||||
|
||||
google.maps.event.addListener(polygon_<?=$value->id_kecamatan?>, 'click', function(event) {
|
||||
var vertices = this.getPath();
|
||||
var luas = google.maps.geometry.spherical.computeArea(polygon_<?=$value->id_kecamatan?>.getPath()) / 10000;
|
||||
luas = numberWithCommas(luas.toFixed(2));
|
||||
var contentString ="<div class='form-group' >"+
|
||||
"<h5>Kecamatan : <?=$value->kecamatan?></h5>"+
|
||||
"<h5>Luas : "+luas + " Ha"+"</h5>"+
|
||||
"</div>";
|
||||
|
||||
infowindow.setContent(contentString);
|
||||
infowindow.setPosition(event.latLng);
|
||||
infowindow.open(map);
|
||||
});
|
||||
|
||||
for (var i = 0; i < polygon_<?=$value->id_kecamatan?>.getPath().getLength(); i++) {
|
||||
bounds.extend(polygon_<?=$value->id_kecamatan?>.getPath().getAt(i));
|
||||
}
|
||||
|
||||
|
||||
<?php } ?>
|
||||
<?php ////////////// sini akhir infowindows kecamatan ////////////////////////// ?>
|
||||
|
||||
|
||||
<?php ////////////// sini awal infowindows lahan ////////////////////////// ?>
|
||||
|
||||
<?php foreach ($lahan->result() as $key => $value) {
|
||||
$cek_tek_tambak = $this->mhome->tampil_data_where('tb_tambak',array('id_tambak' => $value->tek_tambak));
|
||||
foreach ($cek_tek_tambak->result() as $key2 => $value2) ;
|
||||
$cek_kelurahan = $this->mhome->tampil_data_where('tb_kelurahan',array('id_kelurahan' => $value->kelurahan));
|
||||
foreach ($cek_kelurahan->result() as $key3 => $value3) ;
|
||||
$cek_kecamatan = $this->mhome->tampil_data_where('tb_kecamatan',array('id_kecamatan' => $value->kecamatan));
|
||||
foreach ($cek_kecamatan->result() as $key4 => $value4) ;
|
||||
?>
|
||||
|
||||
google.maps.event.addListener(lahan_<?=$value->id_lahan?>, 'click', function(event) {
|
||||
var vertices = this.getPath();
|
||||
var luas = google.maps.geometry.spherical.computeArea(lahan_<?=$value->id_lahan?>.getPath()) / 10000;
|
||||
luas = numberWithCommas(luas.toFixed(2));
|
||||
var contentString ="<div class='form-group' >"+
|
||||
"<h5>ID Lahan: <?=$value->id_lahan?></h5>"+
|
||||
"<h5>Teknologi Tambak : <?=$value2->tambak?></h5>"+
|
||||
"<h5>Kecamatan : <?=$value4->kecamatan?></h5>"+
|
||||
"<h5>Kelurahan : <?=$value3->kelurahan?></h5>"+
|
||||
"<h5>Luas : "+luas + " Ha"+"</h5>"+
|
||||
'<center><a href="<?=base_url()?>home/data_petambak/<?=$value->id_lahan?>"><button type="button" title="Lihat Informasi Lahan" class="btn btn-info btn-circle btn-sm waves-effect waves-light"><i class="ico fa fa-list-alt"></i></button></a></center>'+
|
||||
"</div>";
|
||||
|
||||
infowindow.setContent(contentString);
|
||||
infowindow.setPosition(event.latLng);
|
||||
infowindow.open(map);
|
||||
});
|
||||
|
||||
for (var i = 0; i < lahan_<?=$value->id_lahan?>.getPath().getLength(); i++) {
|
||||
bounds.extend(lahan_<?=$value->id_lahan?>.getPath().getAt(i));
|
||||
}
|
||||
|
||||
|
||||
<?php } ?>
|
||||
<?php ////////////// sini akhir infowindows lahan ////////////////////////// ?>
|
||||
|
||||
|
||||
<?php ////////////// sini awal kira luas parepare ////////////////////////// ?>
|
||||
<?php foreach ($kecamatan->result() as $key => $value) { ?>
|
||||
var luasl<?=$value->id_kecamatan?> =google.maps.geometry.spherical.computeArea(polygon_<?=$value->id_kecamatan?>.getPath());
|
||||
|
||||
<?php } ?>
|
||||
|
||||
var luaslahan = <?php foreach ($kecamatan->result() as $key => $value) { echo "luasl".$value->id_kecamatan."+";} ?>0;
|
||||
|
||||
luaslahan = luaslahan / 10000;
|
||||
|
||||
document.getElementById("luas1").innerHTML = numberWithCommas(luaslahan.toFixed(2));
|
||||
|
||||
<?php ////////////// sini akhir kira luas parepare ////////////////////////// ?>
|
||||
map.fitBounds(bounds);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
// document.getElementById('luas').value = luas;
|
||||
|
||||
</script>
|
||||
|
||||
<div id="vertices"></div>
|
||||
<div id="map_canvas"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
|
||||
<div class="row small-spacing">
|
||||
<div class="col-xs-12">
|
||||
<div class="box-content card">
|
||||
<h4 class="box-title">Hasil Produksi Kecamatan</h4>
|
||||
<div class="card-content">
|
||||
<div class="form-group" style="overflow-x: auto" id="tabel_transaksi">
|
||||
<table id="tabel-data" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Tahun</th>
|
||||
<th>Musim</th>
|
||||
<th>Hasil Produksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$cek_musim = $this->mhome->tampil_data_keseluruhan('tb_hasil_produksi');
|
||||
foreach ($cek_musim->result() as $key => $value){
|
||||
if ($value->tahun >= 2020) {
|
||||
$hasil[$value->tahun.$value->musim] = 0;
|
||||
}
|
||||
}
|
||||
$i = 1;
|
||||
$cek_data = $this->mhome->produksi_kecamatan($this->uri->segment(3));
|
||||
// print_r(count($cek_data->result()));
|
||||
if (count($cek_data->result()) > 0) {
|
||||
foreach ($cek_data->result() as $key1 => $value1) {
|
||||
$ket = json_decode($value1->ket,true);
|
||||
foreach ($ket as $key2 => $value2) {
|
||||
// print_r($value2['jumlah_produksi']);print_r('<br>');
|
||||
$hasil[$value2['tahun'].$value2['musim']] = $hasil[$value2['tahun'].$value2['musim']] + $value2['jumlah_produksi'];
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($cek_musim->result() as $key => $value){
|
||||
if ($value->tahun >= 2020) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$i;$i++?></td>
|
||||
<td><?=$value->tahun?></td>
|
||||
<td><?=$value->musim?></td>
|
||||
<td><?=$hasil[$value->tahun.$value->musim]?></td>
|
||||
</tr>
|
||||
<?php } } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- /.col-xs-12 -->
|
||||
|
||||
<!-- /.col-lg-6 col-xs-12 -->
|
||||
</div>
|
||||
256
application/views/home/menu/pendaftaran.php
Normal file
256
application/views/home/menu/pendaftaran.php
Normal file
@ -0,0 +1,256 @@
|
||||
<div class="row small-spacing">
|
||||
<div class="col-xs-12">
|
||||
<div class="box-content">
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">PILIH KECAMATAN :</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" onchange="changeFuncKecamatan(value);">
|
||||
<option value="">-Pilih Kecamatan</option>
|
||||
<?php foreach ($kecamatan->result() as $key => $value) { ?>
|
||||
<option value="<?=$value->id_kecamatan?>"><?=$value->kecamatan?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">PILIH KELURAHAN :</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" disabled="">
|
||||
<option value="">-Sila Pilih Kecamatan Dulu</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">N I K :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Pilih Kecamatan dan Kelurahan Dulu" disabled="">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">Nama Lengkap :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Pilih Kecamatan dan Kelurahan Dulu" disabled="">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12">
|
||||
<div class="box-content">
|
||||
<!-- <div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">ID LOKASI :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Otomatis">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div> -->
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">NO PBB :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Pilih Kecamatan dan Kelurahan Dulu" disabled="">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">Luas Lahan: :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Otomatis">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div> -->
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">Teknologi Tambak :</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" disabled="">
|
||||
<option value="">-Pilih Kecamatan dan Kelurahan Dulu</option>
|
||||
<!-- <option value="1">1</option>
|
||||
<option value="2">2</option> -->
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12">
|
||||
<div class="box-content">
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBw6bnAk0C2jIDDbz_dVRso9gUEnHLTH68&libraries=drawing,places,geometry"></script>
|
||||
|
||||
<script type="text/javascript" >
|
||||
var infowindow = new google.maps.InfoWindow({
|
||||
size: new google.maps.Size(150, 50)
|
||||
});
|
||||
|
||||
var geocoder;
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
var geolib = google.maps.geometry.spherical;
|
||||
|
||||
var myOptions = {
|
||||
zoom: 16,
|
||||
center: new google.maps.LatLng(-2.247762, 119.373063),
|
||||
mapTypeControl: true,
|
||||
mapTypeControlOptions: {
|
||||
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
|
||||
},
|
||||
navigationControl: true,
|
||||
mapTypeId: 'roadmap'
|
||||
}
|
||||
map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
|
||||
|
||||
google.maps.event.addListener(map, 'click', function() {
|
||||
infowindow.close();
|
||||
});
|
||||
|
||||
bounds = new google.maps.LatLngBounds();
|
||||
|
||||
|
||||
<?php ///////////////// awal untuk kordinat//////////////////////////////////// ?>
|
||||
|
||||
<?php foreach ($kecamatan->result() as $key => $value) { ?>
|
||||
|
||||
|
||||
var polygon_<?=$value->id_kecamatan?> = new google.maps.Polygon({
|
||||
map: map,
|
||||
path: [<?=$value->kordinat?>],
|
||||
strokeColor: "#000000",
|
||||
strokeOpacity: 2,
|
||||
strokeWeight: 1,
|
||||
fillColor: "#B85612",
|
||||
fillOpacity: 0.4,
|
||||
});
|
||||
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php ///////////////// akhir untuk kordinat//////////////////////////////////// ?>
|
||||
|
||||
|
||||
<?php //////////////// awal untuk infowindows ///////////////////////////////// ?>
|
||||
<?php foreach ($kecamatan->result() as $key => $value) { ?>
|
||||
|
||||
google.maps.event.addListener(polygon_<?=$value->id_kecamatan?>, 'click', function(event) {
|
||||
var vertices = this.getPath();
|
||||
var luas = google.maps.geometry.spherical.computeArea(polygon_<?=$value->id_kecamatan?>.getPath()) / 10000;
|
||||
luas = numberWithCommas(luas.toFixed(2));
|
||||
var contentString ="<div class='form-group' >"+
|
||||
"<h5>Kecamatan : <?=$value->kecamatan?></h5>"+
|
||||
"<h5>Luas : "+luas + " Ha"+"</h5>"+
|
||||
"</div>";
|
||||
|
||||
infowindow.setContent(contentString);
|
||||
infowindow.setPosition(event.latLng);
|
||||
infowindow.open(map);
|
||||
});
|
||||
|
||||
for (var i = 0; i < polygon_<?=$value->id_kecamatan?>.getPath().getLength(); i++) {
|
||||
bounds.extend(polygon_<?=$value->id_kecamatan?>.getPath().getAt(i));
|
||||
}
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
map.fitBounds(bounds);
|
||||
<?php //////////////// akhir untuk infowindows ///////////////////////////////// ?>
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
// document.getElementById('luas').value = luas;
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<div id="vertices"></div>
|
||||
<div id="map_canvas"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row small-spacing">
|
||||
<div class="col-lg-6 col-md-6 col-xs-12">
|
||||
<div class="box-content bg-success text-white">
|
||||
<div class="statistics-box with-icon">
|
||||
<i class="ico small fa fa-diamond"></i>
|
||||
<p class="text text-white">Produksi Sebelumnya</p>
|
||||
<h2 class="counter">?? Kg</h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<!-- /.col-lg-3 col-md-6 col-xs-12 -->
|
||||
<div class="col-lg-6 col-md-6 col-xs-12">
|
||||
<div class="box-content bg-info text-white">
|
||||
<div class="statistics-box with-icon">
|
||||
<i class="ico small fa fa-download"></i>
|
||||
<p class="text text-white">Prediksi Produksi</p>
|
||||
<h2 class="counter">?? Kg</h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<!-- /.col-lg-3 col-md-6 col-xs-12 -->
|
||||
|
||||
</div>
|
||||
<!-- /.col-xs-12 -->
|
||||
|
||||
<!-- /.col-lg-6 col-xs-12 -->
|
||||
</div>
|
||||
265
application/views/home/menu/pendaftaran_kecamatan.php
Normal file
265
application/views/home/menu/pendaftaran_kecamatan.php
Normal file
@ -0,0 +1,265 @@
|
||||
<div class="row small-spacing">
|
||||
<div class="col-xs-12">
|
||||
<div class="box-content">
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">PILIH KECAMATAN :</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" onchange="changeFuncKecamatan(value);">
|
||||
<option value="" se>-Pilih Kecamatan</option>
|
||||
<?php foreach ($kecamatan->result() as $key => $value) {
|
||||
if ($this->uri->segment(3) == $value->id_kecamatan) {
|
||||
$selected = "selected";
|
||||
}else{
|
||||
$selected = '';
|
||||
}
|
||||
?>
|
||||
<option value="<?=$value->id_kecamatan?>" <?=$selected?>><?=$value->kecamatan?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">PILIH KELURAHAN :</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" onchange="changeFuncKelurahan(value);">
|
||||
<option value="">-Pilih Kelurahan</option>
|
||||
<?php foreach ($kelurahan->result() as $key => $value) { ?>
|
||||
<option value="<?=$value->id_kelurahan?>"><?=$value->kelurahan?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">N I K :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Pilih Kecamatan dan Kelurahan Dulu" disabled="">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">Nama Lengkap :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Pilih Kecamatan dan Kelurahan Dulu" disabled="">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12">
|
||||
<div class="box-content">
|
||||
<!-- <div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">ID LOKASI :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Otomatis">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div> -->
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">NO PBB :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Pilih Kecamatan dan Kelurahan Dulu" disabled="">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">Luas Lahan: :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Otomatis">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div> -->
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">Teknologi Tambak :</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" disabled="">
|
||||
<option value="">-Pilih Kecamatan dan Kelurahan Dulu</option>
|
||||
<!-- <option value="1">1</option>
|
||||
<option value="2">2</option> -->
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12">
|
||||
<div class="box-content">
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBw6bnAk0C2jIDDbz_dVRso9gUEnHLTH68&libraries=drawing,places,geometry"></script>
|
||||
|
||||
<script type="text/javascript" >
|
||||
var infowindow = new google.maps.InfoWindow({
|
||||
size: new google.maps.Size(150, 50)
|
||||
});
|
||||
|
||||
var geocoder;
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
var geolib = google.maps.geometry.spherical;
|
||||
|
||||
var myOptions = {
|
||||
zoom: 16,
|
||||
center: new google.maps.LatLng(-2.247762, 119.373063),
|
||||
mapTypeControl: true,
|
||||
mapTypeControlOptions: {
|
||||
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
|
||||
},
|
||||
navigationControl: true,
|
||||
mapTypeId: 'roadmap'
|
||||
}
|
||||
map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
|
||||
|
||||
google.maps.event.addListener(map, 'click', function() {
|
||||
infowindow.close();
|
||||
});
|
||||
|
||||
bounds = new google.maps.LatLngBounds();
|
||||
|
||||
|
||||
///////////////// awal untuk kordinat////////////////////////////////////
|
||||
|
||||
<?php foreach ($kecamatan_terpilih->result() as $key => $value) { ?>
|
||||
|
||||
|
||||
var polygon_<?=$value->id_kecamatan?> = new google.maps.Polygon({
|
||||
map: map,
|
||||
path: [<?=$value->kordinat?>],
|
||||
strokeColor: "#000000",
|
||||
strokeOpacity: 2,
|
||||
strokeWeight: 1,
|
||||
fillColor: "#B85612",
|
||||
fillOpacity: 0.4,
|
||||
});
|
||||
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
///////////////// akhir untuk kordinat////////////////////////////////////
|
||||
|
||||
|
||||
//////////////// awal untuk infowindows /////////////////////////////////
|
||||
<?php foreach ($kecamatan_terpilih->result() as $key => $value) { ?>
|
||||
|
||||
google.maps.event.addListener(polygon_<?=$value->id_kecamatan?>, 'click', function(event) {
|
||||
var vertices = this.getPath();
|
||||
var luas = google.maps.geometry.spherical.computeArea(polygon_<?=$value->id_kecamatan?>.getPath()) / 10000;
|
||||
luas = numberWithCommas(luas.toFixed(2));
|
||||
var contentString ="<div class='form-group' >"+
|
||||
"<h5>Kecamatan : <?=$value->kecamatan?></h5>"+
|
||||
"<h5>Luas : "+luas + " Ha"+"</h5>"+
|
||||
"</div>";
|
||||
|
||||
infowindow.setContent(contentString);
|
||||
infowindow.setPosition(event.latLng);
|
||||
infowindow.open(map);
|
||||
});
|
||||
|
||||
for (var i = 0; i < polygon_<?=$value->id_kecamatan?>.getPath().getLength(); i++) {
|
||||
bounds.extend(polygon_<?=$value->id_kecamatan?>.getPath().getAt(i));
|
||||
}
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
map.fitBounds(bounds);
|
||||
//////////////// akhir untuk infowindows /////////////////////////////////
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
// document.getElementById('luas').value = luas;
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<div id="vertices"></div>
|
||||
<div id="map_canvas"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row small-spacing">
|
||||
<div class="col-lg-6 col-md-6 col-xs-12">
|
||||
<div class="box-content bg-success text-white">
|
||||
<div class="statistics-box with-icon">
|
||||
<i class="ico small fa fa-diamond"></i>
|
||||
<p class="text text-white">Produksi Sebelumnya</p>
|
||||
<h2 class="counter">?? Kg</h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<!-- /.col-lg-3 col-md-6 col-xs-12 -->
|
||||
<div class="col-lg-6 col-md-6 col-xs-12">
|
||||
<div class="box-content bg-info text-white">
|
||||
<div class="statistics-box with-icon">
|
||||
<i class="ico small fa fa-download"></i>
|
||||
<p class="text text-white">Prediksi Produksi</p>
|
||||
<h2 class="counter">?? Kg</h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<!-- /.col-lg-3 col-md-6 col-xs-12 -->
|
||||
|
||||
</div>
|
||||
<!-- /.col-xs-12 -->
|
||||
|
||||
<!-- /.col-lg-6 col-xs-12 -->
|
||||
</div>
|
||||
370
application/views/home/menu/pendaftaran_kelurahan.php
Normal file
370
application/views/home/menu/pendaftaran_kelurahan.php
Normal file
@ -0,0 +1,370 @@
|
||||
|
||||
<div class="row small-spacing">
|
||||
<div class="col-xs-12">
|
||||
<div class="box-content">
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">PILIH KECAMATAN :</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" onchange="changeFuncKecamatan(value);" name="kecamatan">
|
||||
<option value="" se>-Pilih Kecamatan</option>
|
||||
<?php foreach ($kecamatan->result() as $key => $value) {
|
||||
if ($this->uri->segment(3) == $value->id_kecamatan) {
|
||||
$selected = "selected";
|
||||
}else{
|
||||
$selected = '';
|
||||
}
|
||||
?>
|
||||
<option value="<?=$value->id_kecamatan?>" <?=$selected?>><?=$value->kecamatan?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">PILIH KELURAHAN :</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" onchange="changeFuncKelurahan(value);" name="kelurahan">
|
||||
<option value="">-Pilih Kelurahan</option>
|
||||
<?php foreach ($kelurahan->result() as $key => $value) {
|
||||
if ($this->uri->segment(4) == $value->id_kelurahan) {
|
||||
$selected = "selected";
|
||||
}else{
|
||||
$selected = '';
|
||||
}
|
||||
?>
|
||||
<option value="<?=$value->id_kelurahan?>" <?=$selected?>><?=$value->kelurahan?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">N I K :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="nik" placeholder="Masukkan N I K" name="nik" minlength="16" maxlength="16">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">Nama Lengkap :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Masukkan Nama Lengkap" name="nama">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12">
|
||||
<div class="box-content">
|
||||
<!-- <div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">ID LOKASI :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Otomatis">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div> -->
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">NO PBB :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="pbb" placeholder="Masukkan Nomor PBB" name="pbb" minlength="16" maxlength="16">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">Luas Lahan: :</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="luas_lahan" placeholder="Otomatis" disabled="">
|
||||
<input type="hidden" name="luas_lahan" id="luas_lahan1">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inp-type-1" class="col-sm-3 control-label">Teknologi Tambak :</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" name="tambak">
|
||||
<option value="">-Pilih Teknologi Tambak</option>
|
||||
<?php foreach ($tambak->result() as $key => $value) { ?>
|
||||
<option value="<?=$value->id_tambak?>"><?=$value->tambak?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12">
|
||||
<div class="box-content">
|
||||
<input type="button" class="btn btn-info waves-effect waves-light" id="enablePolygon" value="Tanda Kordinat Tambak" name="enablePolygon" />
|
||||
<input type="button" class="btn btn-danger waves-effect waves-light" id="resetPolygon" value="Reset Kembali Kordinat" style="display: none;" />
|
||||
<input type="hidden" name ="point" id="coords">
|
||||
<div id="showonPolygon" ><b>Area:</b> <span id="areaPolygon"> </span>
|
||||
</div> <br><br>
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBw6bnAk0C2jIDDbz_dVRso9gUEnHLTH68&libraries=drawing,places,geometry"></script>
|
||||
|
||||
<script type="text/javascript" >
|
||||
var infowindow = new google.maps.InfoWindow({
|
||||
size: new google.maps.Size(150, 50)
|
||||
});
|
||||
|
||||
var all_overlays = [];
|
||||
var geocoder;
|
||||
|
||||
function numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
var geolib = google.maps.geometry.spherical;
|
||||
|
||||
var myOptions = {
|
||||
zoom: 16,
|
||||
center: new google.maps.LatLng(-2.247762, 119.373063),
|
||||
mapTypeControl: true,
|
||||
mapTypeControlOptions: {
|
||||
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
|
||||
},
|
||||
navigationControl: true,
|
||||
mapTypeId: 'roadmap'
|
||||
}
|
||||
map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
|
||||
|
||||
google.maps.event.addListener(map, 'click', function() {
|
||||
infowindow.close();
|
||||
});
|
||||
|
||||
bounds = new google.maps.LatLngBounds();
|
||||
|
||||
|
||||
|
||||
<?php foreach ($kelurahan_terpilih->result() as $key => $value) { ?>
|
||||
|
||||
|
||||
var polygon_<?=$value->id_kelurahan?> = new google.maps.Polygon({
|
||||
map: map,
|
||||
path: [<?=$value->kordinat?>],
|
||||
strokeColor: "#000000",
|
||||
strokeOpacity: 2,
|
||||
strokeWeight: 1,
|
||||
fillColor: "#B85612",
|
||||
fillOpacity: 0.4,
|
||||
});
|
||||
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
var polyOptions = {
|
||||
strokeWeight: 0,
|
||||
fillOpacity: 0.45,
|
||||
editable: true,
|
||||
fillColor: '#FF1493'
|
||||
};
|
||||
var selectedShape;
|
||||
|
||||
var drawingManager = new google.maps.drawing.DrawingManager({
|
||||
drawingMode: google.maps.drawing.OverlayType.POLYGON,
|
||||
drawingControl: false,
|
||||
markerOptions: {
|
||||
draggable: true
|
||||
},
|
||||
polygonOptions: polyOptions
|
||||
});
|
||||
|
||||
$('#enablePolygon').click(function() {
|
||||
drawingManager.setMap(map);
|
||||
drawingManager.setDrawingMode(google.maps.drawing.OverlayType.POLYGON);
|
||||
$('#enablePolygon').hide();
|
||||
});
|
||||
|
||||
$('#resetPolygon').click(function() {
|
||||
if (selectedShape) {
|
||||
selectedShape.setMap(null);
|
||||
}
|
||||
drawingManager.setMap(null);
|
||||
$('#showonPolygon').hide();
|
||||
$('#resetPolygon').hide();
|
||||
$('#enablePolygon').show();
|
||||
});
|
||||
|
||||
google.maps.event.addListener(drawingManager, 'polygoncomplete', function(polygon) {
|
||||
var area = google.maps.geometry.spherical.computeArea(selectedShape.getPath());
|
||||
var area1 = google.maps.geometry.spherical.computeArea(selectedShape.getPath());
|
||||
$('#areaPolygon').html(area.toFixed(2)+' Sq meters');
|
||||
area = area/10000;
|
||||
area1 = area1/10000;
|
||||
area = numberWithCommas(area.toFixed(2))+" Ha";
|
||||
area1 = area1.toFixed(3);
|
||||
document.getElementById("luas_lahan").value = area;
|
||||
document.getElementById("luas_lahan1").value = area1;
|
||||
var coordStr = "";
|
||||
for (var i = 0; i < polygon.getPath().getLength(); i++) {
|
||||
coordStr +="{lat: "+ polygon.getPath().getAt(i).lat() + ", lng: "+
|
||||
polygon.getPath().getAt(i).lng()+"},\n"
|
||||
;
|
||||
}
|
||||
document.getElementById("coords").value = coordStr;
|
||||
// console.log(coordStr);
|
||||
$('#resetPolygon').show();
|
||||
});
|
||||
|
||||
function clearSelection() {
|
||||
if (selectedShape) {
|
||||
selectedShape.setEditable(false);
|
||||
selectedShape = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setSelection(shape) {
|
||||
clearSelection();
|
||||
selectedShape = shape;
|
||||
shape.setEditable(true);
|
||||
}
|
||||
|
||||
google.maps.event.addListener(drawingManager, 'overlaycomplete', function(e) {
|
||||
all_overlays.push(e);
|
||||
if (e.type != google.maps.drawing.OverlayType.MARKER) {
|
||||
// Switch back to non-drawing mode after drawing a shape.
|
||||
drawingManager.setDrawingMode(null);
|
||||
|
||||
// Add an event listener that selects the newly-drawn shape when the user
|
||||
// mouses down on it.
|
||||
var newShape = e.overlay;
|
||||
newShape.type = e.type;
|
||||
google.maps.event.addListener(newShape, 'click', function() {
|
||||
setSelection(newShape);
|
||||
});
|
||||
setSelection(newShape);
|
||||
}
|
||||
});
|
||||
|
||||
<?php foreach ($kelurahan_terpilih->result() as $key => $value) {
|
||||
$cek_nama_kecamatan = $this->mhome->tampil_data_where('tb_kecamatan',array());
|
||||
foreach ($cek_nama_kecamatan->result() as $key1 => $value1) ;
|
||||
$nama_kecamatan = $value1->kecamatan;
|
||||
|
||||
?>
|
||||
|
||||
google.maps.event.addListener(polygon_<?=$value->id_kelurahan?>, 'click', function(event) {
|
||||
var vertices = this.getPath();
|
||||
var luas = google.maps.geometry.spherical.computeArea(polygon_<?=$value->id_kelurahan?>.getPath()) / 10000;
|
||||
luas = numberWithCommas(luas.toFixed(2));
|
||||
var contentString ="<div class='form-group' >"+
|
||||
"<h5>Kecamatan : <?=$nama_kecamatan?></h5>"+
|
||||
"<h5>Kelurahan : <?=$value->kelurahan?></h5>"+
|
||||
"<h5>Luas : "+luas + " Ha"+"</h5>"+
|
||||
"</div>";
|
||||
|
||||
infowindow.setContent(contentString);
|
||||
infowindow.setPosition(event.latLng);
|
||||
infowindow.open(map);
|
||||
});
|
||||
|
||||
for (var i = 0; i < polygon_<?=$value->id_kelurahan?>.getPath().getLength(); i++) {
|
||||
bounds.extend(polygon_<?=$value->id_kelurahan?>.getPath().getAt(i));
|
||||
}
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
map.fitBounds(bounds);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<div id="vertices"></div>
|
||||
<div id="map_canvas"></div><br><br>
|
||||
<center><button type="button" class="btn btn-lg waves-effect waves-light" onclick="heheh()">Lakukkan Pendaftaran</button></center>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row small-spacing">
|
||||
<div class="col-lg-6 col-md-6 col-xs-12">
|
||||
<div class="box-content bg-success text-white">
|
||||
<div class="statistics-box with-icon">
|
||||
<i class="ico small fa fa-diamond"></i>
|
||||
<p class="text text-white">Produksi Sebelumnya</p>
|
||||
<h2 class="counter">?? Kg</h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<!-- /.col-lg-3 col-md-6 col-xs-12 -->
|
||||
<div class="col-lg-6 col-md-6 col-xs-12">
|
||||
<div class="box-content bg-info text-white">
|
||||
<div class="statistics-box with-icon">
|
||||
<i class="ico small fa fa-download"></i>
|
||||
<p class="text text-white">Prediksi Produksi</p>
|
||||
<h2 class="counter">?? Kg</h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-content -->
|
||||
</div>
|
||||
<!-- /.col-lg-3 col-md-6 col-xs-12 -->
|
||||
|
||||
</div>
|
||||
<!-- /.col-xs-12 -->
|
||||
|
||||
<!-- /.col-lg-6 col-xs-12 -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user