191 lines
9.9 KiB
PHP
191 lines
9.9 KiB
PHP
<script language="javascript">
|
|
function printIt()
|
|
{
|
|
content=document.getElementById('table_search');
|
|
head=document.getElementById('head_report');
|
|
w=window.open('about:blank');
|
|
w.document.writeln("<link href='dq_sirs.css' type='text/css' rel='stylesheet' />");
|
|
w.document.write( head.innerHTML );
|
|
w.document.write( content.innerHTML );
|
|
w.document.writeln("<script>");
|
|
w.document.writeln("window.print()");
|
|
w.document.writeln("</"+"script>");
|
|
}
|
|
</script>
|
|
<script language="javascript" type="text/javascript">
|
|
function dopilih(){
|
|
document.cari.submit();
|
|
}
|
|
</script>
|
|
<style type="text/css">
|
|
thead input {width: 100%; }
|
|
div.dataTables_wrapper div.dataTables_filter { text-align: left !important; }
|
|
</style>
|
|
<?php
|
|
|
|
$search = $searchkey = $searchfield = $orderby = "";
|
|
if(!empty($_GET['searchkey'])) {
|
|
$searchkey = $db->escape($_GET['searchkey']);
|
|
}
|
|
|
|
if(!empty($_GET['searchfield'])) {
|
|
$searchfield = $db->escape($_GET['searchfield']);
|
|
}
|
|
|
|
?>
|
|
<div aligen="center">
|
|
<div id="frame">
|
|
<div id="frame_title"><h5>LIST DATA PASIEN</h5></div>
|
|
<div align="right" style="margin:5px; margin-right:10px;">
|
|
|
|
|
|
<form name="cari" method="get">
|
|
<input type="hidden" name="link" value="21" />
|
|
<div class="row">
|
|
<div class="col-md-2 offset-md-7" style="text-align: left">
|
|
<div class="form-group row">
|
|
<label class="col-sm-2 col-form-label" style="text-align:left">Cari </label>
|
|
<div class="col-sm-8">
|
|
<input class="form-control form-control-sm text" type="text" name="searchkey" id="searchkey" size="25" value="<?=$searchkey?>">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-2 col-form-label" style="text-align:left">Sort </label>
|
|
<div class="col-sm-8">
|
|
<select name="orderby" id="orderby" class="form-control text">
|
|
<option value="nomr" <?php if($order=="nomr") echo "selected"; ?>>nomr</option>
|
|
<option value="nama" <?php if($order=="nama") echo "selected"; ?>>nama</option>
|
|
<option value="alamat" <?php if($order=="alamat") echo "selected"; ?>>alamat</option>
|
|
<option value="telepon" <?php if($order=="telepon") echo "selected"; ?>>telepon</option>
|
|
<option value="tgllahir" <?php if($order=="tgllahir") echo "selected"; ?>>tgllahir</option>
|
|
<option value="noktp" <?php if($order=="noktp") echo "selected"; ?>>noktp</option>
|
|
<option value="tgldaftar" <?php if($order=="tgldaftar") echo "selected"; ?>>tgldaftar</option>
|
|
<option value="namasuami_orangtua" <?php if($order=="namasuami_orangtua") echo "selected"; ?>>nama suami / orangtua</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3" style="text-align: left">
|
|
<div class="form-group row">
|
|
<label class="col-sm-3 col-form-label" style="text-align:left">Berdasarkan </label>
|
|
<div class="col-sm-8">
|
|
<select name="searchfield" id="searchfield" class="form-control">
|
|
<option value="nomr" <?php if($searchfield=="nomr") echo "selected"; ?>>nomr</option>
|
|
<option value="nama" <?php if($searchfield=="nama") echo "selected"; ?>>nama</option>
|
|
<option value="alamat" <?php if($searchfield=="alamat") echo "selected"; ?>>alamat</option>
|
|
<option value="telepon" <?php if($searchfield=="telepon") echo "selected"; ?>>telepon</option>
|
|
<option value="tgllahir" <?php if($searchfield=="tgllahir") echo "selected"; ?>>tgllahir</option>
|
|
<option value="noktp" <?php if($searchfield=="noktp") echo "selected"; ?>>noktp</option>
|
|
<option value="tgldaftar" <?php if($searchfield=="tgldaftar") echo "selected"; ?>>tgldaftar</option>
|
|
<option value="namasuami_orangtua" <?php if($searchfield=="namasuami_orangtua") echo "selected"; ?>>nama suami / orangtua</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row float-md float-right">
|
|
<label class="col-sm-3 col-form-label" style="text-align:left"></label>
|
|
<div class="btn-group ">
|
|
<input type="submit" onclick="dopilih()" value="C A R I" class="btn btn-sm btn-primary text" />
|
|
<input type="button" class="btn btn-sm btn-secondary text" value="P R I N T" onclick="printIt()" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<div id="head_report" style="display:none" >
|
|
<div align="left" style="clear:both; padding:20px">
|
|
<div style="letter-spacing:-1px; font-size:16px; font:bold;"><?=strtoupper($header1)?></div>
|
|
<div style="letter-spacing:-2px; font-size:24px; color:#666; font:bold;"><?=strtoupper($header2)?></div>
|
|
<div><?=$header3?><br /><?=$header4?></div>
|
|
<hr style="margin:5px;" />
|
|
<h2>LIST DATA PASIEN</h2>
|
|
</div>
|
|
</div>
|
|
<div id="table_search" class="container-fluid table-responsive">
|
|
<table class="table table-hover table-bordered table-striped table-sm" id="datalist_sort">
|
|
<thead>
|
|
<tr align="center" class="bg-success text-light">
|
|
<th width="5%">NoRM</th>
|
|
<th width="12%">Nama Pasien</th>
|
|
<th width="9%"> TanggalLahir</th>
|
|
<th width="15%">Alamat</th>
|
|
<th width="18%">NO KTP</th>
|
|
<th width="12%">Jenis Kelamin</th>
|
|
<th width="8%">No telepon</th>
|
|
<th width="14%">AwalDaftar</th>
|
|
<th width="7%">Suami/Keluarga</th>
|
|
<th width="7%">Status</th>
|
|
<th width="7%">Agama</th>
|
|
<th width="7%">Pendidikan</th>
|
|
<?php
|
|
// if($page_akses['e'] == TRUE){
|
|
?>
|
|
<th width="7%">EDIT</th>
|
|
<?php
|
|
// }
|
|
?>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
echo implode("\n", $list_plugin['ui_plugins_css']);
|
|
array_push($list_plugin['ui_plugins_js'], $datatable_pipeline);
|
|
array_push($list_plugin['ui_plugins_js'], '<script src="'._LIB_.'DataTables/FixedHeader-3.1.4/js/dataTables.fixedHeader.min.js"></script>');
|
|
array_push($list_plugin['ui_plugins_js'], '<script src="'._LIB_.'typing.js"></script>');
|
|
$form_plugin['ui_plugins_js'] = array_merge($form_plugin['ui_plugins_js'],$list_plugin['ui_plugins_js']);
|
|
|
|
$js_init .= '
|
|
var table = $("#datalist_sort").DataTable({
|
|
orderCellsTop: true,
|
|
"dom" : "<\'row\'<\'col-sm-6 col-md-6 text-left\'f><\'col-sm-6 col-md-6 text-right\'l>>" +
|
|
"<\'row\'<\'col-md-12\'tr>>" +
|
|
"<\'row\'<\'col-sm-6 col-md-6 text-left\'i><\'col-sm-6 col-md-6 text-right\'p>>",
|
|
"processing": true,
|
|
"serverSide": true,
|
|
"ajax" : $.fn.dataTable.pipeline( {
|
|
url : "'._BASE_.'include/master.php?loader_pasien=1&searchfield='.$searchfield.'&searchkey='.$searchkey.'&orderby='.$_REQUEST['orderby'].'",
|
|
pages : 2
|
|
}),
|
|
"columnDefs": [
|
|
{ "name": "nomr", "targets": 0, searchable : true, orderable : true },
|
|
{ "name": "nama", "targets": 1, searchable : true, orderable : true },
|
|
{ "name": "tgllahir", "targets": 2, searchable : true, orderable : false },
|
|
{ "name": "alamat", "targets": 3, searchable : true, orderable : false },
|
|
{ "name": "noktp", "targets": 4, searchable : true, orderable : false },
|
|
{ "name": "jeniskelamin", "targets": 5, searchable : false, orderable : false },
|
|
{ "name": "notelp", "targets": 6, searchable : false, orderable : false },
|
|
{ "name": "tgldaftar", "targets": 7, searchable : false, orderable : false },
|
|
{ "name": "suami_ortu", "targets": 8, searchable : false, orderable : false },
|
|
{ "name": "txt_status", "targets": 9, searchable : false, orderable : false },
|
|
{ "name": "txt_agama", "targets": 10, searchable : false, orderable : false },
|
|
{ "name": "txt_pendidikan", "targets": 11, searchable : false, orderable : false },
|
|
{ "name": "edit", "targets": 12, searchable : false, orderable : false }
|
|
],
|
|
"order": [[ 0, "asc" ]]
|
|
});
|
|
|
|
$("#datalist_sort thead tr").clone(true).appendTo( "#datalist_sort thead" );
|
|
$("#datalist_sort thead tr:eq(1) th").each( function (i) {
|
|
if(i == 12) return true;
|
|
var title = $(this).text();
|
|
$(this).html( "<input type=\"text\" class=\"form-control form-control-sm\" placeholder=\"Cari "+title+"\" />" );
|
|
|
|
$("input",this).typing({
|
|
stop : function(e,elm) {
|
|
table.column(i).search( elm[0].value ) .draw();
|
|
},
|
|
delay : 400
|
|
});
|
|
} );';
|
|
?>
|
|
|