File "config.php"

Full Path: /home/analogde/www/Dev tableau/config.php
File size: 2.16 KB
MIME-type: text/html
Charset: utf-8

<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Configuration des Dates</title>
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container mt-5">
        <h2>Configurer les Dates et Jours Fériés</h2>
        <form id="configForm">
            <div class="form-group">
                <label for="startDate">Date de Début</label>
                <input type="date" class="form-control" id="startDate" name="startDate" required>
            </div>
            <div class="form-group">
                <label for="endDate">Date de Fin</label>
                <input type="date" class="form-control" id="endDate" name="endDate" required>
            </div>
            <div class="form-group">
                <label for="holidays">Jours Fériés (séparés par des virgules)</label>
                <input type="text" class="form-control" id="holidays" name="holidays" placeholder="YYYY-MM-DD,YYYY-MM-DD" required>
            </div>
            <button type="submit" class="btn btn-primary">Générer le Tableau</button>
        </form>
    </div>

    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
    <script>
        document.getElementById('configForm').addEventListener('submit', function(event) {
            event.preventDefault();
            const startDate = document.getElementById('startDate').value;
            const endDate = document.getElementById('endDate').value;
            const holidays = document.getElementById('holidays').value.split(',');

            // Rediriger vers la page principale avec les paramètres dans l'URL
            const url = `index.html?startDate=${startDate}&endDate=${endDate}&holidays=${holidays.join(',')}`;
            window.location.href = url;
        });
    </script>
</body>
</html>