<?
session_start();
if(!isset($_SESSION['usuario']))
{
 	echo "<script languaje='JavaScript'>";       
	echo "parent.location.href='login.php'; ";
	echo "</script>";
}
 
include ("clases/Afiliado.class.php"); $objper = new Afiliado();
// include "clases/Persona.class.php"; $objper = new Persona();
include ("clases/Ubigeo.class.php"); $objubi = new Ubigeo();
 //include "clases/Ayudante.class.php"; $objayu = new Ayudante();
 
 $idpadron = $_REQUEST["id"];
 if($objper->BuscarPorCodigo($idpadron))
 {
  $numdoc = $objper->getdni();
  $nombres = $objper->getnombres()." ".$objper->getapepat()." ".$objper->getapemat();
  $foto = $objper->getfoto();				  		  
  $lugarnac= $objper->getlugarnac();
  $fechanac= $objper->getfechanac();
  $sangre = $objper->getsangre();
  $domicilio = $objper->getdomicilio();
  $ocupacion = $objper->getocupacion();	
  $numafiliado = $objper->getnumafiliado();		
 }
 
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
.Estilo2 {
	font-family: Arial, Helvetica, sans-serif;
	color: #FF0000;
	font-size: 14px;
}
.Estilo5 {font-size: 14px}
.Estilo28 {font-family: Arial, Helvetica, sans-serif; font-size:14px;}
.Estilo29 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; }
.Estilo30 {color: #000000}
.style1 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size:9px}
.style3 {color: #000000; font-size: 12px; }
.style5 {font-family: Arial, Helvetica, sans-serif; font-size: 15px; font-weight: bold; }
.style6 {
	font-family: AGUAYTIA;
	font-weight: bold;
}
.style8 {font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; }
-->
.rota {
display:block;
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
color: #fff;
}
.Autoridad {font-family: Arial, Helvetica, sans-serif; font-size: 8px; }
</style>

</head>

<body>
<table width="90%" border="0"  style="border-bottom-color:#000000; border-right-color:#000000; border-left-color:#000000; border-top-color:#000000; background-image:url(logositser.png); background-repeat:no-repeat; background-position:center">
  <tr>
    <td colspan="5" scope="col" ><table width="56%" border="0" bgcolor="#006699" >
      <tr>
        <th class="Estilo29" style="color:#FFFFFF" scope="col">SINDICATO DE TRABAJADORES DE SERVICIO <br />
          DE LA MUNICIPALIDAD PROVINCIAL DE CORONEL PORTILLO </th>
        </tr>
    </table></td>
  </tr>
  <tr>
    <th height="20" colspan="3" class="Estilo28" scope="col">CARN&Eacute; DE AFILIADO - SITSER-MPCP </th>
    <th height="20" scope="col" class="Estilo28">Grupo sangre </th>
    <th width="15%" rowspan="6" class="Estilo28" scope="col"><?php
	  								require 'phpqrcode/qrlib.php';
									$dir = 'temp/';
									if(!file_exists($dir)) 
									  mkdir($dir);
									$filename = $dir.$numdoc.".png";
									$tamanio = 6;
									$level = 'Q';
									$frameSize = 1;
									$contenido = $numdoc;
									QRcode::png($contenido, $filename, $level, $tamanio, $frameSize);
									echo "<img src='".$filename."' />";
	                             ?></th>
  </tr>
  <tr>
    <th width="9%" rowspan="8" valign="top" scope="col"><img src="fotos/<?=$foto;?>" width="124" height="146" /></th>
    <th class="Estilo28" scope="col">&nbsp;</th>
    <th class="Estilo28" scope="col">&nbsp;</th>
    <th class="Estilo28" scope="col"><strong>
      <?=$sangre;?>
    </strong></th>
  </tr>
  <tr>
    <td colspan="2" class="Estilo28" scope="col">DNI:<strong>
      <?=$numdoc;?>
    </strong></td>
    <td width="29%" class="Estilo28" scope="col">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" class="Estilo28" scope="col">Nombres: <strong>
      <?=utf8_decode(utf8_encode($nombres));?>
    </strong></td>
    <td width="29%" class="Estilo28" scope="col">&nbsp;</td>
  </tr>
  <tr>
    <td class="Estilo28" scope="col">N&deg; de Afiliado: <strong>
      <?=$numafiliado;?>
    </strong></td>
    <td class="Estilo28" scope="col">&nbsp;</td>
    <td width="29%" rowspan="2" class="Estilo28" scope="col"><span class="style5"><img src="clases/barcode.php?text=<?php echo $numdoc;?>&amp;size=15" width="167" height="36" /></span></td>
  </tr>
  <tr>
    <td colspan="2" class="Estilo28" scope="col">Domicilio:<span class="style5"><strong>
      <?=$domicilio;?>
    </strong></span></td>
  </tr>
  <tr>
    <td colspan="2" class="Estilo28" scope="col">&nbsp;</td>
    <td rowspan="2" align="center" class="style5" scope="col">&nbsp;</td>
    <td rowspan="2" align="center" class="style5" scope="col">&nbsp;</td>
  </tr>
  <tr>
    <td class="Estilo28" scope="col">&nbsp;</td>
    <td class="Estilo28" scope="col">&nbsp;</td>
  </tr>
  <tr>
    <td width="41%" class="Estilo28" scope="col">&nbsp;</td>
    <td width="6%" class="Estilo28" scope="col">&nbsp;</td>
    <td class="Estilo28" scope="col">&nbsp;</td>
    <td class="Estilo28" scope="col">&nbsp;</td>
  </tr>
</table>
</body>
</html>
