<?php
	require_once("../../config/conexion.php");
	if(isset($_SESSION["id_colab"])){
?>
<!DOCTYPE html>
<html lang="es">
<head>
	<title>Cadip</title>
    <?php require_once("../../view/Html/Head.php")?>
</head>
<body>

	<div id="page-loader" class="fade show"><span class="spinner"></span></div>

		<div id="page-container" class="page-container fade page-sidebar-fixed page-header-fixed">

			<?php require_once("../../view/Html/HeaderII.php")?>

			<?php require_once("../../view/Html/SidebarII.php")?>
			<div id="content" class="content">
				<div class="panel panel-inverse" id="panel1">
					<div class="panel-heading">
						<h4 class="panel-title">Agendar | Detalle de la Sesion</h4>
						<div class="panel-heading-btn">
							<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
						</div>
					</div>
					<div class="panel-body">
						<fieldset>
							<input type="hidden" id="id_colab" name="id_colab" value="<?php echo $_SESSION['id_colab']; ?>">
							<input type="hidden" name="id_prof" id="id_prof" value="<?php echo $_SESSION['id_prof']; ?>">
							<div class="row">
								<!-- Paciente -->
								<div class="col-md-6">
									<div class="form-group">
										<label for="fic_id">Paciente</label>
										<select id="fic_id" name="fic_id" class="form-control"></select>
									</div>
								</div>

								<!-- Fecha -->
								<div class="col-md-6">
									<div class="form-group">
										<label for="fec_session" class="form-label">Fecha</label>
										<input type="date"
											class="form-control"
											id="fec_session"
											name="fec_session"
											required
											autocomplete="off"
											min="<?php echo date('Y-m-d'); ?>">
									</div>
								</div>
							</div>

							<div class="row">
								<!-- Hora -->
								<div class="col-md-4">
									<div class="form-group">
										<label for="hora">Hora</label>
										<select class="form-control" id="hora" name="hora" required>
											<?php for ($i = 8; $i < 24; $i++): ?>
												<option value="<?= str_pad($i, 2, '0', STR_PAD_LEFT) ?>">
													<?= str_pad($i, 2, '0', STR_PAD_LEFT) ?>
												</option>
											<?php endfor; ?>
										</select>
									</div>
								</div>

								<!-- Minuto -->
								<div class="col-md-4">
									<div class="form-group">
										<label for="minuto">Minutos</label>
										<select class="form-control" id="minuto" name="minuto" required>
											<?php foreach ([0, 15, 30, 45] as $min): ?>
												<option value="<?= str_pad($min, 2, '0', STR_PAD_LEFT) ?>">
													<?= str_pad($min, 2, '0', STR_PAD_LEFT) ?>
												</option>
											<?php endforeach; ?>
										</select>
									</div>
								</div>
								<!-- Paciente -->
								<div class="col-md-4">
									<div class="form-group">
										<label for="pre_id">Precio</label>
										<select id="pre_id" name="pre_id" class="form-control" required></select>
									</div>
								</div>
							</div>
						</fieldset>


						<div class="btn-toolbar sw-toolbar sw-toolbar-bottom justify-content-end">
							<div class="btn-group mr-2 sw-btn-group" role="group">
								<button id="btnreservar" class="btn btn-warning sw-btn-next" type="button">Reservar</button>
							</div>
						</div>

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


		<a href="javascript:;" class="btn btn-icon btn-circle btn-success btn-scroll-to-top fade" data-click="scroll-top"><i class="fa fa-angle-up"></i></a>
	</div>



    <?php require_once("mnt.php")?>

    <?php require_once("../../view/Html/modal.php")?>

    <?php require_once("../../view/Html/Js.php")?>

    <script type="text/javascript" src="agenda.js"></script>

</body>
</html>
<?php
	}else{
		header("Location:".Conectar::ruta()."colab.php");
	}
?>