<?php
if(count(get_included_files()) ==1) exit("Direct access not permitted.");
$plg = basename(__FILE__, '.php');
$page->tbJs($plg);

$datarr=array("module"=>$mod);
$_SESSION['moduleload']=$mod;

$page->addLoad("pilihcatatan.init(".json_encode($datarr,true).")");

?>
<div id="box_catatan" style="display:none;">
	<div style="padding: 10px;">
		<div class="box_button_atas">
			Kat. <select id="sl_kat_cttn" class="slkecil" onchange="pilihcatatan.loadecttn()">
				<option value="0">Semua Kategori</option>
				<?php
				$qrk="select * from tb_master_catatan_kategori where status=1";
				$rsk=$db->loadAll($qrk);
				foreach ($rsk as $obk) {
					?>
					<option value="<?php echo $obk['id'];?>"><?php echo $obk['nama'];?></option>
					<?php
				}
				?>
			</select> &nbsp;
			Baris: <select id="jumlah_hal_cttn" class="slkecil" onchange="pilihcatatan.loadecttn()">
				<option value="30">30</option>
				<option value="50">50</option>
				<option value="100">100</option>
			</select> &nbsp;
			Hal: <select id="hal_ke_cttn" class="slkecil" onchange="pilihcatatan.loadcttn()"><option value="1">1</option></select>
			&nbsp;<input placeholder="Default: Nama Catatan" onkeypress="pilihcatatan.entercttn(event)" id="cari_cttn" class="in_cari" />
			&nbsp;&nbsp;<span id="btcari_cttn" class="btnone btncari" onclick="pilihcatatan.loadecttn()">Cari</span>
		</div>
		<div id="grid_data_cttn"></div>
		<div id="box_loader_cttn" align="left" class="error"></div>
		<div class="box_button_bawah">
			<span class="btmerah medium" onclick="pilihcatatan.bataldatacttn()">BATAL</span>
			<span id="btprosesmultictt" style="display: none">
				&nbsp;&nbsp;<span class="bthijau medium" onclick="pilihcatatan.prosescatatan()">PROSES</span>
			</span>
		</div>
	</div>
</div>
<div id="btdetaildatactt" style="display: none;">
	<div><b>#{nama}</b></div>
</div>
<span id="btstatusctt" style="display: none;cursor: default;background: #{bg}" class="medium">
	<span style="color: #{warna}">#{namastatus}</span>
</span>
<span id="btpilihtunggalctt" style="display: none;" stpilih="0" class="bt_next" onclick="pilihcatatan.pilihcatatan(#{id},##{jumlah_tabel},##{baris_tabel})"></span>
<span id="btpilihmultictt" style="display: none;" stpilih="0" class="bt_tidak" onclick="pilihcatatan.pilihcatatanmulti(#{id},##{jumlah_tabel},##{baris_tabel})"></span>