confirmar.php 3.1 KB
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width">
<head>
	<title>Confirmar turno</title>
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
	<script src="https://kit.fontawesome.com/5fc2169900.js" crossorigin="anonymous"></script>
</head>
<body>
<nav class="navbar navbar-light" style="background-image: url('img/fondoheader.png'); background-repeat: no-repeat; background-position: center; background-size: cover;">
		<div class="navbar-brand mx-auto" >
			<img src="img/logo.png" width="350px" height="75%">
		</div>	
	</nav>
	<div class="container">
		<hr style="border-width: 1px; border-style: inset;">
		<br>
		<div class="card" style="border-left-color: #214370; border-right-color: #214370; border-bottom-color: #214370;">
		<div class="card-header text-white text-center" style="background-color: #214370;"><b><h5>Turnos</h5></b></div>
		<div class="card-body">
			<div class="row">
				<div class="col text-center">
			<?php
			if(!isset($link)) { include('./conecta.php'); }
			if (isset($_GET['code'])){
				$idturno = base64_decode($_GET['code']);
				$idturno = ($idturno/20)/50;
				$sqlconsulta = "SELECT * FROM turnosv_turnos WHERE verificado IS NULL AND id_turno=".$idturno;
				$queryconsulta = mysqli_query($link, $sqlconsulta);
				if (mysqli_num_rows($queryconsulta)!=0){
					$sqlconfirmar = "UPDATE turnosv_turnos SET verificado='".date("Y-m-d H:i:s")."' WHERE id_turno=".$idturno;
					if (mysqli_query($link, $sqlconfirmar)) {
						echo "<p><i class='text-success fas fa-check-circle'></i> SU TURNO FUE CONFIRMADO</p>";
					}
					$sqlinfo = "SELECT * FROM turnosv_turnos WHERE id_turno=".$idturno;
					$queryinfo = mysqli_query($link, $sqlinfo);
					$info = mysqli_fetch_assoc($queryinfo);
					echo "<br><h5><u>Detalle de turno</u></h5>
					Fecha: ".date("d-m-Y", strtotime($info['fecha']))." 
					<br>Hora: ".substr($info['hora'],0,5)."
					<br>Nombre y Apellido: ".$info['nombre_apellido']."
					<br><br><a class='btn btn-sm btn-secondary' href='https://dgrpi.arca.gob.ar/sitio/'>Salir</a>
					<br><br><div class='alert alert-primary' role='alert'>Tolerancia: 10 minutos</div>
					";
				} else {
					echo "Su turno ya fue confirmado con anterioridad.<br><br><a class='btn btn-sm btn-secondary' href='localhost/turnosapp'>Salir</a>";
				}



				
			}

			?>
			</div>
			</div>	
			</div>
		</form>
		</div>
		</div>
		<br>
		<br>

	</div>

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
</body>
</html>