<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Iniciar sesi&oacute;n</title>
    <link rel="stylesheet" href="<?=base_url()?>assets/bootstrap/css/bootstrap.min.css">
</head>
<body>
    <div class="container">
        <div class="row my-3">
            <div class="col">
                <a href="<?=base_url()?>admin/appointments/">Citas</a> &nbsp; / 
                <a href="<?=base_url()?>admin/available/" class="ml-2">Fecha disponible</a>
            </div>
            <div class="col text-right">
                <a href="<?=base_url()?>admin/logout">Salir</a>
            </div>
        </div>
        <div class="row justify-content-center my-3">
            <div class="col-md-5 text-center">
                <h4>Fecha disponible</h4>
            </div>
        </div>
        <div class="row justify-content-center my-3">
            <div class="col-md-8 col-lg-5">
                <form action="<?=base_url()?>admin/available_update" method="POST" class="border border-secondary px-5 py-4">
                    <div class="form-group">
                        <?php if($this->session->flashdata("error")) { ?>
                            <div class="alert alert-danger"><?=$this->session->flashdata('error');?></div>

                        <?php } elseif($this->session->flashdata("success")) { ?>
                            <div class="alert alert-success"><?=$this->session->flashdata('success');?></div>
                        <?php }?>
                    </div>
                    <h6 class="text-center">Horario completo</h6>
                    <div class="form-group">
                        <label>Fecha de inicio</label>
                        <input type="date" name="start_date" value="<?=$start_date?>" class="form-control" required>
                    </div>
                    <div class="form-group">
                        <label>Fecha de termino</label>
                        <input type="date" name="end_date" value="<?=$end_date?>" class="form-control" required>
                    </div>
                    <div class="form-group py-2 mb-0">
                        <hr>
                    </div>
                    <h6 class="text-center">Horario matutino</h6>
                    <div class="form-group">
                        <label>Fecha de inicio</label>
                        <input type="date" name="start_date_m" value="<?=$start_date_m?>" class="form-control" required>
                    </div>
                    <div class="form-group">
                        <label>Fecha de termino</label>
                        <input type="date" name="end_date_m" value="<?=$end_date_m?>" class="form-control" required>
                    </div>
                    <div class="form-group">
                        <button type="submit" class="btn btn-primary col-12 my-2">
                            Ingresar
                        </button>
                    </div>
                </form>
            </div>  
                      
        </div>
        
    </div>
</body>
</html>
<script src="<?=base_url()?>assets/js/jquery.min.js"></script>