<?php
    require_once 'check_security.php';
     $showpopup=false;
    if(isset($_GET['sucss'])){
        $showpopup=true;
        $poptitle="Payment Sucess";
        $subtitilepop="Money Added Successfully";
    }else if(isset($_GET['fail'])){
        $showpopup=true;
        $poptitle="Payment Fail";
        $subtitilepop="Money Added Failed";
    }

?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Add Money</title>
</head>

<style>


body{
display: block;
background-color: aliceblue;
}
*{
padding: 0;
margin: 0;

box-sizing: border-box;
font-family: Poppins, "sans-serif";
text-decoration: none;


}
div.bodyconde{
    background-color: aliceblue;
    text-align: center;
    
}
div.bodyconde div.withlayoutd{
 text-align: center;
box-shadow: 10px;
margin-top: 11%;
width: max-content;
border-radius: 5px;
padding: 10px;
box-shadow: 0px 5px 10px cadetblue;
border: 1px solid #ccc;
background-color: white;
}
div.bodyconde div.withlayoutd h2{
    align-self: center;
    margin: 7px;
    margin-bottom: 10px;
}
div.bodyconde div.withlayoutd div.infutfildiv{
    margin: 7px;
    text-align: start;
    padding: 7px;
    display: block;
}
div.bodyconde div.withlayoutd div.infutfildiv input{
    padding: 10px;
    width: 100%;
    margin: 5px;
    background-color: #f2f4f6;
font-size: 17px;
    border: 1px solid #ccc;
    border-radius: 3px;
  
}
div.bodyconde div.withlayoutd div.infutfildiv label{
    margin: 2px;
}
div.bodyconde div.succesds{
    text-align: center;
box-shadow: 10px;
margin-top: 11%;
width: max-content;
border-radius: 5px;
padding: 10px;
box-shadow: 0px 5px 10px cadetblue;
border: 1px solid #ccc;
background-color: white;
}
div.bodyconde div.succesds img{
    width: 40px;
    margin: 5px;
    height: 40px;
}
div.bodyconde div.succesds h2{
    margin: 5px;
}
div.bodyconde div.succesds p{
    margin: 5px;
}
div.bodyconde div.succesds button{
    box-shadow: 0px 5px 10px cadetblue;
border: 1px solid #ccc;
border-radius: 5px;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 30px;
margin: 5px;
font-size: 18px;
color: white;
padding-right: 30px;
background-color: rgb(69, 29, 226);
}
div.bodyconde div.withlayoutd button{
    padding: 10px;
    width: 80%;
    color: white;
    background-color: #f2f4f6;
font-size: 18px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: rgb(69, 29, 226);
}
</style>

<body>
    <div class="bodyconde">
        <?php if($showpopup==true){
            ?>
        <center>
            <center>
        <div class="succesds">
            <img src="https://fairbattle.earnmoreapp.in/adminnh/assist/icon/cash.png" />
            <h2><?php echo $poptitle; ?></h2>
            <p><?php echo $subtitilepop; ?></p>
            <a href="/fairb/">
            <button>Ok</button>
        </a>
        </div>
    </center>
</center>
<?php }else{
    ?>
        <center>
            <center>
                <form method="POST" action="pay/txnProcess.php" >
<div class="withlayoutd">
<h2>Add Money</h2>
<div class="infutfildiv">
    <label for="amount"><b>Enter Amount</b></label>
    <input type="number" name="amount" class="inputfeld" placeholder="Enter Amount"  onkeypress='return event.charCode >= 48 && event.charCode <= 57' min="1" max="1000" required>
    <input type="text" name="userid" class="inputfeld" placeholder="Enter userid" Value="<?php   echo $id; ?>" Style="display:none;" required>
    </div>

<button type="submit" name="sub">Pay NOw</button>
</div>
</form>
            </center>

        </center>
        <?php } ?>

    </div>

</body>
</html>