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

?>
<div id="box_template" style="display:none;">
	<div style="padding: 10px;">
		<div class="box_button_atas">
			Kat. <select id="sl_kat_templt" class="slkecil" onchange="pilihtemplate.loadetemplt()">
				<option value="0">Semua Kategori</option>
				<?php
				$qrk="select * from tb_master_template_kategori";
				$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_templt" class="slkecil" onchange="pilihtemplate.loadetemplt()">
				<option value="30">30</option>
				<option value="50">50</option>
				<option value="100">100</option>
			</select> &nbsp;
			Hal: <select id="hal_ke_templt" class="slkecil" onchange="pilihtemplate.loadtemplt()"><option value="1">1</option></select>
			&nbsp;<input placeholder="Default: Nama Template" onkeypress="pilihtemplate.entertemplt(event)" id="cari_templt" class="in_cari" />
			&nbsp;&nbsp;<span id="btcari_templt" class="btnone btncari" onclick="pilihtemplate.loadetemplt()">Cari</span>
		</div>
		<div id="grid_data_templt"></div>
		<div id="box_loader_templt" align="left" class="error"></div>
		<div class="box_button_bawah">
			<span class="btmerah medium" onclick="pilihtemplate.bataldatatemplt()">BATAL</span>
			<span id="btprosesmulti" style="display: none">
				&nbsp;&nbsp;<span class="bthijau medium" onclick="pilihtemplate.prosespegawai()">PROSES</span>
			</span>
		</div>
	</div>
</div>
<div id="btdetailpegawai" style="display: none;">
	<div><b>#{nama}</b></div>
</div>

<span id="btpilihtunggal" style="display: none;" stpilih="0" class="bt_next" onclick="pilihtemplate.pilihtemplate(#{id},##{jumlah_tabel},##{baris_tabel})"></span>
<span id="btpilihmulti" style="display: none;" stpilih="0" class="bt_tidak" onclick="pilihtemplate.pilihtemplatemulti(#{id},##{jumlah_tabel},##{baris_tabel})"></span>