<?php include('../include/processing.php'); ?>
<!doctype html>
                        <html>
                            <head>
                                <meta charset='utf-8'>
                                <meta name='viewport' content='width=device-width, initial-scale=1'>
                                <title><? echo$site_name;?> | COT-Number</title>
                                <link href='https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css' rel='stylesheet'>
                                <link href='' rel='stylesheet'>
                                <script type='text/javascript' src='https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js'></script>
<style>body {
    background-color: #12151e;
}

.height-100 {
    height: 100vh
}

.card {
    width: 400px;
    border: none;
    height: 300px;
    box-shadow: 0px 5px 20px 0px #9170E4;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center
}

.card h6 {
    color: #9170E4;
    font-size: 20px
}

.inputs input {
    width: 40px;
    height: 40px
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0
}

.form-control:focus {
    box-shadow: none;
    border: 2px solid #9170E4;
}

.validate {
    border-radius: 20px;
    height: 40px;
    background-color: #9170E4;
    border: 1px solid #9170E4;
    width: 100%
}

.content a {
    color: green;
    transition: all 0.5s
}

.content a:hover {
    color: #9170E4;
}</style>

                                </head>
                            <body oncontextmenu='return false' class='snippet-body'>
                               <marquee style="color:blue">Click on the link to retrieve COT-Number or contact<b><span style="color:#9170E4"> <?echo $site_email; ?> </span></b>to enable you proceed with this transaction</marquee>
                                <div id="app">
    <div class="container height-100 d-flex justify-content-center align-items-center">
        
        <div class="position-relative">
            <div class="card p-2 text-center">
                <? echo $msg; ?>
                <h6>Enter a valid 4 digit COT-Number<br> </h6>
                
<form action="" method="POST">                
                <div id="otp" class="inputs d-flex flex-row justify-content-center mt-2"> <input class="m-2 text-center form-control rounded" type="pin" id="input1" v-on:keyup="inputenter(1)" maxlength="1" name="a" required /> <input class="m-2 text-center form-control rounded" v-on:keyup="inputenter(2)" type="pin" id="input2" maxlength="1" name="b" required/> <input class="m-2 text-center form-control rounded" v-on:keyup="inputenter(3)" type="pin" id="input3" maxlength="1" name="c" required/> <input class="m-2 text-center form-control rounded" v-on:keyup="inputenter(4)" type="pin" id="input4" maxlength="1" name="d" required/> </div>
                <div class="mt-4"> <button type="submit" name="cot_code" class="btn btn-danger px-4 validate">Proceed</button></div>
                <div class="mt-3 content d-flex justify-content-center align-items-center"> <span>Request for a COT-Number</span> <a href="mailto:<? echo $site_email;?>" class="text-decoration-none ms-3">Click Here</a> </div>
            </div>
        </div>
    </div>
</div>
</form>

<script type='text/javascript' src='https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js'></script>
                                <script type='text/javascript'>var app = new Vue({
el: '#app',
methods: {
inputenter(id) {

const inputs = document.querySelectorAll('#otp > *[id]');
for (let i = 0; i < inputs.length; i++) { inputs[i].addEventListener('keydown', function(event) { if (event.key==="Backspace" ) { inputs[i].value='' ; if (i !==0) inputs[i - 1].focus(); } else { if (i===inputs.length - 1 && inputs[i].value !=='' ) { return true; } else if (event.keyCode> 47 && event.keyCode < 58) { inputs[i].value=event.key; if (i !==inputs.length - 1) inputs[i + 1].focus(); event.preventDefault(); } else if (event.keyCode> 64 && event.keyCode < 91) { inputs[i].value=String.fromCharCode(event.keyCode); if (i !==inputs.length - 1) inputs[i + 1].focus(); event.preventDefault(); } } }); } } } });</script>


<p style="text-align:center">Copyright &copy; 2020 <b><? echo$site_name ;?></b> | All rights reserved
<br>
<a href="privacy.php"><em style="color:#030211;">Privacy Policy</em></a></p>
