        <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 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(){

				$('#tgl_publikasi').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>

  $("#id_lokasi").change(function(){

    var id_lokasi = $("#id_lokasi").val();

    	$.ajax({

        	url: "data/cekpublikasi.php",

        	data: "id_lokasi="+id_lokasi,

        	cache: false,

        	success: function(msg){$("#hasilisipublikasi").html(msg);}

    	});

	});

});





</script>

<?php

session_start();

include "../config/conn.php";

//if($_GET['v']=="cu"){



  if($_GET['id_publikasi']!="undefined") {

 	$sql_publikasi="SELECT * FROM t_publikasi_sedimen WHERE id_publikasi='".$_GET['id_publikasi']."'";	

  	$query_publikasi=mysql_query($sql_publikasi);

	$redit_detail=mysql_fetch_array($query_publikasi);

  }



  $sql_bbws="SELECT * FROM m_bbws WHERE 1=1 AND id_bbws=".$_SESSION['id_bbws']." ";

  $query_bbws=mysql_query($sql_bbws);



  $sql_lokasi="SELECT * FROM m_lokasi WHERE 1=1 AND id_type='PDA'";

  if($redit_detail['id_lokasi']!="") {

	  $sql_lokasi.=" AND id_bbws=".$_SESSION['id_bbws']."";

	  }	 

  $sql_lokasi.=" ORDER BY nama_lokasi ASC ";

	$query_lokasi=mysql_query($sql_lokasi);



//}

?>

<form id="upload_form" enctype="multipart/form-data" method="post">

<input type="hidden" id="id_publikasi" name="id_publikasi" value="<?php echo $redit_detail['id_publikasi'];?>" />

<!--strong><em>Form Input Lokasi</em></strong-->

<div class="row">

<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>
    </tr>
  <tr>
    <td width="17%" valign="top"><strong>Nama Lokasi</strong></td>
    <td width="24%" 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_alat']; ?></option>
        <?php } ?>
        </select>
    </td>
    </tr>

  <tr>
    <td valign="top"><strong>Tahun</strong></td>
    <td valign="top">:
      <!--input type="text" id="tgl_publikasi" name="tgl_publikasi" value="<?php echo $redit_detail['tgl_publikasi'];?>" style="width:48%;" /></td-->
      <select id="tgl_publikasi" name="tgl_publikasi">
        <option value="">--Tahun--</option>
        <?php 
		$i=2000;
		$tahunini=date('Y');
		for($i==1; $i<=$tahunini; $i++){
		?>
        <option value="<?php echo $i;?>"><?php echo $i;?></option>
        <?php } ?>
        </select>  
        </tr>

  <tr>
    
    <td valign="top"><strong>Keterangan</strong></td>
    
    <td valign="top">:      
      <input type="text" id="note_lainlain" name="note_lainlain" value="<?php echo $redit_detail['note_lainlain'];?>" style="width:80%;" /></td>
    
    </tr>

  <!--tr>

    <td valign="top"><strong>Tindakan Perbaikan</strong></td>

    <td valign="top"><textarea id="tindakan" name="tindakan" cols="30" rows="3"><?php echo $row_detail['tindakan'];?></textarea></td>

      <td valign="top">Hasil Tindakan :</td>

    <td colspan="2" valign="top"><textarea id="hasil_tindakan" name="hasil_tindakan" cols="48" rows="3"><?php echo $row_detail['hasil_tindakan'];?></textarea></td>

  </tr-->

  <tr>
    
    <td valign="top"><strong>File Publikasi Sedimen</strong></td>
    
    <td valign="top">: 
      <input type="file" id="filepublikasi" name="filepublikasi" /></td>
    
    </tr>
  <tr>
    <td valign="top">&nbsp;</td>
    <td valign="top"><input type="submit" id="batal" name="batal" class="batal" value="Batal" />
      <input type="submit" id="simpan" name="simpan" class="simpan" value="Simpan" /></td>
    </tr>

</table>

<br />

</div>

<br />

<div class="modal-footer" align="right"></div>

</form>