first commit
This commit is contained in:
51
app/tindaklanjut/modal_vpic.php
Normal file
51
app/tindaklanjut/modal_vpic.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
include("../koneksi.php");
|
||||
$komen_id=$_POST['id'];
|
||||
?>
|
||||
|
||||
<!--
|
||||
<div class="row port">
|
||||
<div class="portfolioContainer"> -->
|
||||
<?php
|
||||
$dok=pg_query("SELECT * FROM scan_komen WHERE komen_id='$komen_id' AND LOWER(file) LIKE ANY (ARRAY['%jpg','%jpeg','%png']) ORDER BY id DESC");
|
||||
while($rdok=pg_fetch_array($dok)) {$foto=$rdok['file'];$file_id=$rdok['id'];
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<button type="button" id="<?php echo $file_id; ?>" class="btn btn-block btn-success waves-effect waves-light pr_scan_surat">Print</button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<!-- <div class="gal-detail"> -->
|
||||
<img name="pic" id="<?php echo $rdok['id']; ?>" src="<?php echo 'app/tindaklanjut/dok/'.$foto; ?>" class="img-thumbnail" alt="work-thumbnail">
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<!--
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<script>
|
||||
$('.pr_scan_surat').click(function(){
|
||||
var id = $(this).attr('id');
|
||||
var w = 1000;
|
||||
var h = 800;
|
||||
var left = Number((screen.width/2)-(w/2));
|
||||
var tops = Number((screen.height/2)-(h/2));
|
||||
$.post('app/tindaklanjut/print_pic.php', { id : id}, function (result) {
|
||||
WinId = window.open('toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+tops+', left='+left);
|
||||
WinId.document.open();
|
||||
WinId.document.write(result);
|
||||
WinId.document.close();
|
||||
WinId.focus();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user