D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
rosario
/
adm
/
app
/
gre
/
Views
/
Crediario
/
Filename :
VieCrediarioEtiquetaImprime.php
back
Copy
<!DOCTYPE html> <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); ob_start(); $path = getcwd(); $Dados = $_GET; //var_dump($Dados); $data = strftime('%d de %B de %Y', strtotime('today')); if (isset($Dados['cpf'])) { $contr = new \App\gre\Models\ModCrediarioLerEtiqueta(); $arr_etiq= $contr->lerEtiqTitu($Dados['cpf']); //var_dump($arr_etiq); $prog_nome = "Cod.Interno: ".$arr_etiq[0]['id_procfit'];; $nome = $arr_etiq[0]['nome']; $cpf = $arr_etiq[0]['cpf']; $cpfi = $arr_etiq[0]['cpfi']; $data_nasc = $arr_etiq[0]['data_nasc']; } ?> <html lang="pt-br"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <!-- Bootstrap core CSS --> <link href="http://leandrolisura.com.br/wp-content/uploads/2017/11/bootstrap.min_.css" rel="stylesheet"> <!-- Custom styles for this template --> <link href="http://leandrolisura.com.br/wp-content/uploads/2017/12/starter-template.css" rel="stylesheet"> </head> <style> body { padding-top: 0px; } .starter-template { padding: 40px 15px; text-align: center; } @page{ size: auto; margin: 0mm; } media print{ #noprint{ display:none; } } </style> <body> <input type="hidden" name="cpfi" id="cpfi" value="<?php echo $cpfi?>" /> <font size="2"> <div align="left" ><br/><b> <?php echo $prog_nome ?><br /></b> </div> <div align="left" ><b> Nome: <?php echo $nome ?><br />   CPF: <?php echo $cpf ?> Nasc: <?php echo $data_nasc ?> </b> </div> </font> <div id="barcodeDiv"></div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="http://leandrolisura.com.br/wp-content/uploads/2017/12/bytescoutbarcode128_1.00.07.js"></script> <script type="text/javascript"></script> <script> $(document).ready(function () { var cpfi = document.getElementById("cpfi").value; var numberBegin = 1; var numberEnd = 1; html = ""; for (i = numberBegin; i <= numberEnd; i++) { html += '<div class="row" >'; for (j = 0; j < 1; j++) { html += ' <div class="col-md-3">' + ' <img id="barcodeImage_' + i + '" class="codeBarImage" />' + ' </div>'; i++; } i--; html += '</div>'; } $("#barcodeDiv").append(html); for (i = numberBegin; i <= numberEnd; i++) { number = pad_with_zeroes(cpfi, 3); updateBarcode(number, '#barcodeImage_' + i); } }); function updateBarcode(barCodeValue, tagId) { barCodeValue = typeof barCodeValue !== 'undefined' ? barCodeValue : ''; var barcode = new bytescoutbarcode128(); barcode.valueSet(barCodeValue); barcode.setMargins(25, 5, 5, 0); barcode.setBarWidth(2); var width = barcode.getMinWidth(); barcode.setSize(width, 50); var barcodeImage = $(tagId); barcodeImage.attr('src', barcode.exportToBase64(width, 50, 0)); } function pad_with_zeroes(number, length) { var my_string = '' + number; while (my_string.length < length) { my_string = '0' + my_string; } window.print(); return my_string; } </script> </body> </html>