<?
session_start();
if(!isset($_SESSION['usuario']))
{
 	echo "<script languaje='JavaScript'>";       
	echo "parent.location.href='login.php'; ";
	echo "</script>";
}
include ("clases/Usuario.class.php"); $obju = new Usuario();
include ("clases/Afiliado.class.php"); $obja = new Afiliado();
include ("clases/Descuento.class.php"); $objf = new Descuento();

$idafi = $_REQUEST['ida'];
if($obja->BuscarPorCodigo($idafi))
   {
     $dni = $obja->getdni()."/".$obja->getruc();;
     $nombres = $obja->getnombres();
	 $apellidos = $obja->getapepat()." ".$obja->getapemat();
	 $fechanac = $obja->getfechanac();
	 $lugarnac = $obja->getlugarnac();
	 $ocupacion = $obja->getocupacion();
	 $gradoins = $obja->getgradoins();
	 $estadocivil = $obja->getestadocivil();
	 $fecha_afilia = $obja->getfecha_afilia();
	 $sangre = $obja->getsangre();
	 $foto = $obja->getfoto();
   }
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <!-- This file has been downloaded from Bootsnipp.com. Enjoy! -->
    <title>Simple User Profile  - Bootsnipp.com</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
     <link rel="stylesheet" href="media/css/bootstrap.css">
	<link rel="stylesheet" href="media/css/bootstrap.min.css">
	<link rel="stylesheet" href="media/css/bootstrap-theme.css">
	<link rel="stylesheet" href="media/css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="media/css/dataTables.bootstrap.min.css">
	<link rel="stylesheet" href="media/css/fixedHeader.bootstrap.min.css">
	<link rel="stylesheet" href="media/css/responsive.bootstrap.min.css">
	 <script src="media/js/jquery-1.10.2.js"></script>
	<script src="media/js/jquery.dataTables.min.js"></script>
	<script src="media/js/dataTables.bootstrap.min.js"></script>
	<script src="media/js/dataTables.fixedHeader.min.js"></script>
	<script src="media/js/dataTables.responsive.min.js"></script>
	<script src="media/js/responsive.bootstrap.min.js"></script>
	
	<script src="media/js/jquery.min.js"></script>
    <script src="media/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
  <div class="row"></div>
  
  
  
          <div class="col-md-12">
        <h4>Datos de Descuentos (Segun Acuerdos de asambleas)<a href="contenido.php"  type="button" class="btn btn-sm btn-danger"><i class="glyphicon glyphicon-log-out"></i></a> </h4>
        <div class="table-responsive">

                
              <table id="mytable" class="table table-bordred table-striped">
                   
                   <thead>
                     <th>ID</th>
                       <th>Fecha</th>
                       <th>Concepto</th>
                       <th>Monto</th>
                      </thead>
    <tbody>
    <?
	  $lista = $objf->ListaPorIdafiliado($idafi);
	  for($i=0;$i<count($lista); $i++)
	  {
	?>
    <tr>
    <td><?=$lista[$i]["iddscto"];?></td>
    <td><?=$lista[$i]["fecha"];?></td>
    <td><?=$lista[$i]["concepto"];?></td>
    <td><?=$lista[$i]["monto"];?></td>
    </tr>
   <? } ?> 
    </tbody>
</table>

<div class="clearfix"></div>

                
            </div>
            
        </div>
</div>
</div>


<div class="modal fade" id="edit" tabindex="-1" role="dialog" aria-labelledby="edit" aria-hidden="true">
      <div class="modal-dialog">
    <div class="modal-content">
          <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
        <h4 class="modal-title custom_align" id="Heading">Edit Your Detail</h4>
      </div>
          <div class="modal-body">
          <div class="form-group">
        <input class="form-control " type="text" placeholder="Mohsin">
        </div>
        <div class="form-group">
        
        <input class="form-control " type="text" placeholder="Irshad">
        </div>
        <div class="form-group">
        <textarea rows="2" class="form-control" placeholder="CB 106/107 Street # 11 Wah Cantt Islamabad Pakistan"></textarea>
    
        
        </div>
      </div>
          <div class="modal-footer ">
        <button type="button" class="btn btn-warning btn-lg" style="width: 100%;"><span class="glyphicon glyphicon-ok-sign"></span> Update</button>
      </div>
        </div>
    <!-- /.modal-content --> 
  </div>
      <!-- /.modal-dialog --> 
</div>
    
    
    
    <div class="modal fade" id="delete" tabindex="-1" role="dialog" aria-labelledby="edit" aria-hidden="true">
    <script type="text/javascript">
$(document).ready(function() {
    var panels = $('.user-infos');
    var panelsButton = $('.dropdown-user');
    panels.hide();

    //Click dropdown
    panelsButton.click(function() {
        //get data-for attribute
        var dataFor = $(this).attr('data-for');
        var idFor = $(dataFor);

        //current button
        var currentButton = $(this);
        idFor.slideToggle(400, function() {
            //Completed slidetoggle
            if(idFor.is(':visible'))
            {
                currentButton.html('<i class="glyphicon glyphicon-chevron-up text-muted"></i>');
            }
            else
            {
                currentButton.html('<i class="glyphicon glyphicon-chevron-down text-muted"></i>');
            }
        })
    });


    $('[data-toggle="tooltip"]').tooltip();

    $('button').click(function(e) {
        e.preventDefault();
        alert("This is a demo.\n :-)");
    });
});
</script>
</body>
</html>
