        <link rel="stylesheet" href="Highcharts/nesw2/images/style.css" type="text/css">
	    <link type="text/css" href="css/jquery-ui-1.8.6.custom.css" rel="stylesheet" />	
		<script type="text/javascript" src="js/jquery.js"></script>
		<script type="text/javascript" src="js/jquery.min.js"></script>
        <script src="Highcharts/new2/amcharts/amcharts.js" type="text/javascript"></script>
        <script src="Highcharts/new2/amcharts/serial.js" type="text/javascript"></script>
		<script src="Highcharts/js/highcharts.js"></script>
		<script src="Highcharts/js/highcharts-more.js"></script>
        <script src="Highcharts/js/modules/exporting.js"></script>
        <script src="Highcharts/amcharts/gauge.js" type="text/javascript"></script>

		<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="js/jquery-ui-1.8.6.custom.min.js"></script>
		<script type="text/javascript">
		jQuery(function($){
		$.datepicker.regional['vi'] = {
			closeText: 'Tutup',
			prevText: 'Sebelum',
			nextText: 'Sesudah',
			currentText: 'Sekarang',
			monthNames: ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni',
			'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'],
			monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun',
			'Jul', 'Ags', 'Sep', 'Okt', 'Nov', 'Des'],
			dayNames: ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jum&acute;at', 'Sabtu'],
			dayNamesShort: ['Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sbt'],
			dayNamesMin: ['Mg', 'Sn', 'Sl', 'Rb', 'Km', 'Jm', 'Sb' ],
			dateFormat: 'yy-mm-dd',
			firstDay: 0,
			isRTL: false,
			showMonthAfterYear: false,
			changeMonth: true,
			changeYear: true,
			yearSuffix: ''};
		$.datepicker.setDefaults($.datepicker.regional['vi']);
	  	$(function(){
				$('#tgls').datepicker({
					inline: true
				});
	    });
		$(function(){
				$('#tglf').datepicker({
					inline: true
				});
	    });
       });
</script>
<script type="text/javascript">
var htmlobjek;
$(document).ready(function(){
  //apabila terjadi event onchange terhadap object <select id=propinsi>
  $("#ibbws").change(function(){
    var ibbws = $("#ibbws").val();
    	$.ajax({
        	url: "data/masterlokasi.php",
        	data: "ibbws="+ibbws,
        	cache: false,
        	success: function(msg){$("#id_lokasi").html(msg);}
    	});
	});
});

$(document).ready(function(){
  //apabila terjadi event onchange terhadap object <select id=propinsi>
  $("#nominal").change(function(){
    var nominal = $("#nominal").val();
    	$.ajax({
        	url: "data/perhitungan.php",
        	data: "nominal="+nominal,
        	cache: false,
        	success: function(msg){$("#hasilsimulasi").html(msg);}
    	});
	});
});


</script>
<?php
session_start();
include "../config/conn.php";
//if($_GET['v']=="cu"){
  $sql_bbws="SELECT * FROM m_bbws WHERE id_bbws=".$_SESSION['id_bbws']."";
  $query_bbws=mysql_query($sql_bbws);

  $sql_lokasi="SELECT * FROM m_lokasi";
  $query_lokasi=mysql_query($sql_lokasi);

  if($_GET['pulsaid']!="undefined") {
  	$sql_pulsa="SELECT * FROM m_pulsa WHERE id_pulsa='".$_GET['pulsaid']."'";	
  	$query_pulsa=mysql_query($sql_pulsa);
	$redit_detail=mysql_fetch_array($query_pulsa);
  }
//}
?>
<form id="upload_form" method="post">
<input type="hidden" id="idpulsa" name="idpulsa" value="<?php echo $redit_detail['id_pulsa'];?>" />
<!--strong><em>Form Input Lokasi</em></strong-->
<div class="row">
<div class="col-xs-4">
<table width="100%" border="0" cellpadding="3" cellspacing="3">
  <tr>
    <td valign="top"><strong>BBWS</strong></td>
    <td valign="top">:      
      <select id="ibbws" name="ibbws">
        <option value="">-Pilih BBWS-</option>
        <?php 
	while($rt=mysql_fetch_array($query_bbws)){
	?>
        <option value="<?php echo $rt['id_bbws']; ?>" <?php if ($redit_detail['id_bbws']==$rt['id_bbws']) { echo 'selected="selected"';} ?>> <?php echo $rt['nama_bbws']; ?></option>
        <?php } ?>
      </select>
</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td width="13%" valign="top"><strong>Nama Lokasi</strong></td>
    <td width="40%" valign="top">:
      <select id="id_lokasi" name="id_lokasi">
        <option value="">-Pilih Lokasi-</option>
        <?php 
	while($rl=mysql_fetch_array($query_lokasi)){
	?>
        <option value="<?php echo $rl['id_lokasi']; ?>" <?php if ($redit_detail['id_lokasi']==$rl['id_lokasi']) { echo 'selected="selected"';} ?>> <?php echo $rl['nama_lokasi']; ?></option>
        <?php } ?>
      </select>
	</td>
    <td width="10%" valign="top">&nbsp;</td>
    <td width="11%" valign="top">&nbsp;</td>
    <td width="26%" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top"><strong>Tanggal Isi Pulsa</strong></td>
    <td valign="top">:
      <input type="text" id="tgls" name="tgls" value="<?php echo $redit_detail['awal_isi_pulsa'];?>" style="width:48%;" /></td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top"><strong>Nominal Pulsa</strong></td>
    <td valign="top">:
      <select id="nominal" name="nominal">
      	<option value="">--Nominal--</option>
      	<option value="50000" <?php if ($redit_detail['nominal']==50000) { echo 'selected="selected"';} ?>>Rp, 50.000</option>
      	<option value="100000" <?php if ($redit_detail['nominal']==100000) { echo 'selected="selected"';} ?>>Rp, 100.000</option>
      	<option value="150000" <?php if ($redit_detail['nominal']==150000) { echo 'selected="selected"';} ?>>Rp, 150.000</option>
      	<option value="200000" <?php if ($redit_detail['nominal']==200000) { echo 'selected="selected"';} ?>>Rp, 200.000</option>
      </select>
</td>
    <td colspan="3" valign="top"></td>
    </tr>
  <tr>
    <td valign="top">&nbsp;</td>
    <td align="left" valign="top"><div id="hasilsimulasi"></div></td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
    <td align="right" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
    <td align="right" valign="top"><button type="button" data-dismiss="modal" class="refresh" onclick="rload()">Tutup</button>
      <input type="submit" id="simpan" name="simpan" class="simpan" value="Simpan" /></td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
    <td align="right" valign="top">&nbsp;</td>
  </tr>
</table>
<br />
</div>
</div>
<br />
<div class="modal-footer" align="right"></div>
</form>