first commit
This commit is contained in:
72
app/monitoring/arahan/dokumen.php
Normal file
72
app/monitoring/arahan/dokumen.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
include("../../koneksi.php");
|
||||
$surat_id=$_POST['surat_id'];
|
||||
?>
|
||||
|
||||
<input type="hidden" id="surat_ida" value="<?php echo $surat_id; ?>">
|
||||
<div class="row port">
|
||||
<div class="portfolioContainer">
|
||||
<?php
|
||||
$dok=pg_query("SELECT * FROM scan WHERE surat_id='$surat_id' AND LOWER(file) LIKE '%.jpg' ORDER BY id DESC");
|
||||
while($rdok=pg_fetch_array($dok)) {$foto=$rdok['file'];
|
||||
?>
|
||||
<div class="col-sm-12 col-lg-12 col-md-12 webdesign illustrator">
|
||||
<div class="gal-detail thumb" style="background-color:#f5f5f1">
|
||||
<a href="#" class="view_scan" id="lihat_scan<?php echo $rdok['id'];?>" id-pic="<?php echo $rdok['id'];?>">
|
||||
<img src="<?php echo 'app/smasuk/dok/'.$foto; ?>" class="thumb-img" alt="work-thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
<?php
|
||||
$dok=pg_query("SELECT * FROM scan WHERE surat_id='$surat_id' AND LOWER(file) LIKE '%.pdf' ORDER BY id DESC");
|
||||
while($rdok=pg_fetch_array($dok)) {$pdf=$rdok['file'];
|
||||
?>
|
||||
<!-- <div class="col-sm-12 col-lg-12 col-md-12 webdesign illustrator">
|
||||
<div class="gal-detail thumb" style="background-color:#f5f5f1">
|
||||
<a href="#" class="view_scan" id="lihat_scan<?php echo $rdok['id'];?>" id-pic="<?php echo $rdok['id'];?>">
|
||||
<img src="<?php echo 'app/smasuk/dok/'.$foto; ?>" class="thumb-img" alt="work-thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="container">
|
||||
<embed src="app/smasuk/pdf/pdf/<?php echo $pdf; ?>#toolbar=0" width="100%" height="360"></embed>
|
||||
<button type="button" class="btn btn-primary btn-rounded center-block" id="view_pdf" id-pdf="<?php echo $rdok['id'];?>" style="margin-top:10px"><i class="fa fa-search m-r-5"></i>View PDF</button>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div> <!-- End row -->
|
||||
|
||||
<script>
|
||||
|
||||
$('.view_scan').click(function(){
|
||||
var id = $(this).attr('id-pic');
|
||||
$("#modal_dok").modal('show');
|
||||
$("#isi_modal_dok").html("");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "app/monitoring/arahan/modal_dok.php",
|
||||
data: 'id='+id,
|
||||
success: function(data){$('#isi_modal_dok').html(data);}
|
||||
});
|
||||
});
|
||||
|
||||
$('#view_pdf').click(function(){
|
||||
var id = $(this).attr('id-pdf');
|
||||
$("#modal_dok").modal('show');
|
||||
$("#isi_modal_dok").html("");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "app/monitoring/arahan/modal_dok.php",
|
||||
data: 'id='+id,
|
||||
success: function(data){
|
||||
$('#isi_modal_dok').html(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user