    <?php 
    $consulta=ConsultarProducto($_GET['idremate']);

  function ConsultarProducto($idremate)
  {
    include 'conexion.php';
    $sentencia="SELECT * FROM remate WHERE idremate='".$idremate."' ";
    $resultado=$conexion->query($sentencia) or die ("Error consultar auto".mysqli_error($conexion));
    $filas=$resultado->fetch_assoc();
    return [
      $filas['idremate'],
      $filas['nombremate'],
      $filas['fecha'],
      $filas['hora'],
      $filas['habilitar'],
      $filas['link'],
      $filas['status'],

    ];

  }
    include ('menuadm.php') ?>
    <!-- Our About -->
	<section class="ulockd-about-one">
		<div class="container">
			<div class="row">
				<div class="col-sm-12 col-md-6 col-md-offset-3">
					<div class="booking_form_style1 text-center">
		                <!-- Booking Form Sart-->
			            <form id="booking_form" class="booking_form text-center" name="booking_form" action="mod_rematei.php" method="post" novalidate="novalidate">
			                 <input type="hidden" name="idremate" value="<?php echo $_GET['idremate']?> ">  
			                <div class="messages"></div>
							<div class="row">
				                <div class="col-sm-12">
				                	<h3>Regitro de Remates.</h3>
				                </div>
				                <div class="col-sm-12">
				                    <label>NOMBRE REMATE</label>
				                    <div class="form-group">
										<input id="nombremate" name="nombremate" class="form-control" placeholder="Ingrese el nombre." required="required" value="<?php echo $consulta[1] ?>" data-error="Nombre es requerido." type="text">
										<div class="help-block with-errors"></div>
									</div>
				                </div>
				                <div class="col-sm-12">
				                    <div class="form-group">
				                        <label>FECHA</label>
				                    	<input id="fecha" name="fecha" class="form-control" placeholder="Ingrese la Fecha." required="required" value="<?php echo $consulta[2] ?>" data-error="La fecha es requerida." type="date">
										<div class="help-block with-errors"></div>
				                    </div>
				                </div>
				                 <div class="col-sm-12">
				                    <div class="form-group">
				                        <label>HORA</label>
				                    	<input id="hora" name="hora" class="form-control" placeholder="Ingrese la Fecha." required="required" value="<?php echo $consulta[3] ?>" data-error="La hora es requerida." type="time">
										<div class="help-block with-errors"></div>
				                    </div>
				                </div>
				                  <div class="col-sm-12">
				                    <label>LINK</label>
				                    <div class="form-group">
										<input id="link" name="link" class="form-control" placeholder="Ingrese el nombre." required="required" value="<?php echo $consulta[5] ?>"  data-error="link es requerido." type="text">
										<div class="help-block with-errors"></div>
									</div>
				                </div>
				                <div class="col-sm-6">
				                    <div class="form-group">
    				                    <div class="form-check">
                                             <label class="form-check-label col-md-4" for="status">ACTIVO
                                            <input class="form-check-input" type="radio" name="status" id="status" value="1" <?php if ($consulta[6]=="1") echo "checked" ?>  ></label>
                                           
                                          </div>
                                          <div class="form-check">
                                            <label class="form-check-label col-md-4" for="status">INACTIVO
                                            <input class="form-check-input" type="radio" name="status" id="status" value="0" <?php if ($consulta[6]=="0") echo "checked" ?> ></label>
                                            
                                         </div>
				                    </div>
				                </div>
				                <div class="col-sm-6">
				                    <div class="form-group">
    				                    <div class="form-check">
                                             <label class="form-check-label col-md-4" for="status">HABILITAR
                                            <input class="form-check-input" type="radio" name="habilitar" id="habilitar" value="1"  <?php if ($consulta[4]=="1") echo "checked" ?> ></label>
                                           
                                          </div>
                                          <div class="form-check">
                                            <label class="form-check-label col-md-4" for="status">DESHABILITAR
                                            <input class="form-check-input" type="radio" name="habilitar" id="habilitar" value="0" <?php if ($consulta[4]=="0") echo "checked" ?> ></label>
                                            
                                         </div>
				                    </div>
				                </div>
				                    <div class="form-group">
                    				<div class="col-md-offset-3 col-md-6">
                                          <button type="submit" class="btn btn-info">GUARDAR</button>
                                          <a href='inic_adm.php'class="btn btn-danger ">CANCELAR</a>
                                    </div>
				                </div>
			                </div>
			            </form>
					</div>
				</div>
			</div>
		</div>
	</section>

	<?php include ('pieadm.php') ?>


	
