first commit
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
include("../../koneksi.php");
|
||||
$id=$_POST['id'];
|
||||
?>
|
||||
<input type="hidden" id="file_id" value="<?php echo $id; ?>">
|
||||
<button type="button" id="print_disp_pic" class="btn btn-default btn-block"><i class="glyphicon glyphicon-print m-r-5"></i>Print Picture</button>
|
||||
<br>
|
||||
<div class="body">
|
||||
<form id="fr_ssn_dok" name="fr_ssn_dok" class="form-horizontal" method="post" onsubmit="return false;" enctype="multipart/form-data">
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<input type="hidden" id="surat_id" name="surat_id" value="<?php echo $_POST['surat_id'];?>">
|
||||
<?php
|
||||
$d=pg_query("SELECT file FROM scan WHERE id='$id' AND LOWER(file) LIKE '%.jpg'");
|
||||
while($rd=pg_fetch_array($d)) {$file=$rd['file'];
|
||||
?>
|
||||
<center><img id='blah1_dok' class='thumbnail img-responsive' src='<?php echo 'app/smasuk/dok/'.$file; ?>' /></center>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$d=pg_query("SELECT file FROM scan WHERE id='$id' AND LOWER(file) LIKE '%.pdf'");
|
||||
while($rd=pg_fetch_array($d)) {$file=$rd['file'];
|
||||
?>
|
||||
<embed src="app/smasuk/pdf/pdf/<?php echo $file; ?>#toolbar=0" width="100%" height="450"></embed>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('#print_disp_pic').hide();
|
||||
var a = $('#blah1_dok').attr("src");
|
||||
if (!a) {$('#print_disp_pic').hide();} else {$('#print_disp_pic').show();}
|
||||
|
||||
$('#print_disp_pic').click(function(){
|
||||
var id = $('#file_id').val();
|
||||
var w = 1000;
|
||||
var h = 800;
|
||||
var left = Number((screen.width/2)-(w/2));
|
||||
var tops = Number((screen.height/2)-(h/2));
|
||||
$.post('app/disposisi/arahan/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