<?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("pilihstatus.init(".json_encode($datarr,true).")");

?>
<div id="box_status" style="display:none;">
	<div style="padding: 10px;">
		<div class="box_button_atas">
			Kat. <select id="sl_kat_stus" class="slkecil" onchange="pilihstatus.loadestus()">
				<option value="0">Semua Kategori</option>
				<?php
				$qrk="select * from tb_kategori_status 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_stus" class="slkecil" onchange="pilihstatus.loadestus()">
				<option value="30">30</option>
				<option value="50">50</option>
				<option value="100">100</option>
			</select> &nbsp;
			Hal: <select id="hal_ke_stus" class="slkecil" onchange="pilihstatus.loadstus()"><option value="1">1</option></select>
			&nbsp;<input placeholder="Default: Nama Status" onkeypress="pilihstatus.enterstus(event)" id="cari_stus" class="in_cari" />
			&nbsp;&nbsp;<span id="btcari_stus" class="btnone btncari" onclick="pilihstatus.loadestus()">Cari</span>
		</div>
		<div id="grid_data_stus"></div>
		<div id="box_loader_stus" align="left" class="error"></div>
		<div class="box_button_bawah">
			<span class="btmerah medium" onclick="pilihstatus.bataldatastus()">BATAL</span>
			<span id="btprosesmulti" style="display: none">
				&nbsp;&nbsp;<span class="bthijau medium" onclick="pilihstatus.prosesstatus()">PROSES</span>
			</span>
		</div>
	</div>
</div>
<div id="btdetaildata" style="display: none;">
	<div><b>#{nama}</b></div>
</div>
<span id="btstatus" style="display: none;cursor: default;background: #{bg}" class="medium">
	<span style="color: #{warna}">#{namastatus}</span>
</span>
<span id="btpilihtunggal" style="display: none;" stpilih="0" class="bt_next" onclick="pilihstatus.pilihstatus(#{id},##{jumlah_tabel},##{baris_tabel})"></span>
<span id="btpilihmulti" style="display: none;" stpilih="0" class="bt_tidak" onclick="pilihstatus.pilihstatusmulti(#{id},##{jumlah_tabel},##{baris_tabel})"></span>