ok

Mini Shell

Direktori : /home2/selectio/www/obnovit-tracking/
Upload File :
Current File : /home2/selectio/www/obnovit-tracking/product-qr-code.php

<?php  include "header.php";
$id=$_GET['id'];

$statement = $pdo->prepare("SELECT * FROM tbl_product where id ='$id'");
    $statement->execute();
    $emp_data = $statement->fetchAll(PDO::FETCH_ASSOC);
    $totalData = $statement->rowCount();
?>
 
<div class="content-wrapper" style="background:white;">
    <br><br><br>
     <center><input type='button' id='btn' value='Print The QR Code' onclick='printDiv();' class="btn btn-success"></center>
  <div id='DivIdToPrint'>     
   
          
                
              <div class="box-body">
                            <?php foreach($emp_data as $data){ ?>
                           
                               
                               
                               
                                  <center> <h1><?=$data['name']?></h1>
          <img src="https://chart.googleapis.com/chart?chs=600x300&cht=qr&chl=<?=$data['sku_no']?>&choe=UTF-8" title="Obnovit-Tracking"/></center>
                                 
                            <?php
                            }
                            ?>      
        </div>
    </div>
   
</div>
 
                      
<script>
    function printDiv() 
{

  var divToPrint=document.getElementById('DivIdToPrint');

  var newWin=window.open('','Print-Window');

  newWin.document.open();

  newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');

  newWin.document.close();

  setTimeout(function(){newWin.close();},10);

}
</script>
<?php include "footer.php";?>

Zerion Mini Shell 1.0