 <?php 
    
    $consulta=ConsultarProducto( $_SESSION['usuario']);

  function ConsultarProducto($rut)
  {
    include 'conexion.php';
    $sentencia="SELECT * FROM usuarios WHERE usuario='".$rut."' ";
    $resultado=$conexion->query($sentencia) or die ("Error consultar auto".mysqli_error($conexion));
    $filas=$resultado->fetch_assoc();
    return [
      $filas['usuairo'],
    ];

  }


    
    include ('menuadm.php') ?>
	<!-- Our Team -->
	<section class="ulockd-team-ip-one">
		<div class="container">
			<div class="row">
				<div class="col-md-6 col-md-offset-3 text-center">
					<div class="ulockd-team-title">
						<h2 class="text-uppercase">Bienvenido a <span class="text-thm1">REMATAS DURAN</span></h2>
					</div>
				</div>
			</div>
			<h3>Todos los remates</h3>
			<div class="row">
			    <?php
						 include "conexion.php";
      
							      $sentencia="SELECT *, DATE_FORMAT(fecha,'%d/%m/%Y')AS 'fecha' FROM remate  where status=1 ORDER BY fecha ASC ";
							      $resultado= $conexion->query($sentencia) or die (mysqli_error($conexion));
							      while($row=$resultado ->fetch_assoc())
							      {
						  ?>
				<div class="col-xs-12 col-sm-6 col-md-3">
					<div class="ulockd-l2-team-member">
						<div class="ulockd-team-thumb">
							<img class="img-responsive img-whp" src="../images/team/5.jpg" alt="">
							<div class="ulockd-l2-team-mdetails">
								<div class="ulockd-member-name"><?php echo " "; echo $row["fecha"]; ?></div>
								<div class="ulockd-member-name"><?php echo " "; echo $row["hora"]; ?></div>
								<div class="ulockd-team-member-post"><?php echo " "; echo $row["nombremate"]; ?></div>
								<?php 
								 echo" <td><a href='lis_usuact.php?idremate=".$row['idremate']."'> <button type='button' class='btn btn-success'>ACTIVO</button> </a> </td>";
								
								?>
								<?php 
								 echo" <td><a href='lis_usuinac.php?idremate=".$row['idremate']."'> <button type='button' class='btn btn-danger'>INACTIVO</button> </a> </td>";
								
								?>
								<br></br>
								<?php 
								 echo" <td><a href='subastaadm.php?idremate=".$row['idremate']."'> <button type='button' class='btn btn-info'>INGRESAR</button> </a> </td>";
								
								?>
								<ul class="list-inline ulockd-tm-sicon">
								<?php echo"<li><a href='subastaadm.php?idremate=".$row['idremate']."'></a> </li>"; ?>
								</ul>
							</div>
						</div>
					</div>
				</div>
				<?php } ?>
			</div>
		</div>
	</section>
	<?php include ('pieadm.php') ?>


	
