{% include 'header.twig' %}
<style>
    .afperbox {
        background: #fff;
        display: block;
        border-radius: 15px;
        overflow: hidden;
        margin: 16px 0;
        border: 1px solid #00000020;
    }

    .afperbox h4 {
        text-align: center;
        background: linear-gradient(to right, #43b3ea, #2670e6);
        color: #fff;
        padding: 10px;
        font-weight: 100;
        border-radius: 10px;
        margin: 10px;
    }

    .afperbox .content h2 {
        font-size: 45px;
        font-weight: 100;
        color: #43b3ea;
        text-align: center;
        padding: 15px;
        margin: auto;
    }

    .copy-text {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .copy-text button.btn {
        margin: 0 0 0 10px;
        width: 30%;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .copy-text .form-control {
        background: transparent;
    }

    .affbox {
        background: #fff;
        display: block;
        border-radius: 15px;
        overflow: hidden;
        margin: 16px 0;
        border: 1px solid #00000020;
        padding: 20px;
    }

    .affinfo {
        display: flex;
        flex-wrap: wrap;
        align-content: center;
    }

    .affinfobox {
        flex: 0 0 32%;
        margin: 2px;
        padding: 6px;
    }

    .affinfobox p {
        margin: 0;
    }

    .affinfobox span {
        font-size: 29px;
        color: #43b3ea;
    }

    .tablewell {
        padding: 0;
    }

    table.table {
        border-radius: 20px;
        overflow: hidden;
        margin: 0;
    }

    table thead tr {
        background: linear-gradient(to right, #43b3ea, #2670e6);
        color: #fff;
        font-family: 'Poppins', sans-serif;
        text-transform: lowercase;
    }

    .table>thead>tr>th {
        vertical-align: middle;
        border-bottom: 2px solid #ddd;
        padding: 12px;
    }

    table thead tr th span {
        color: #fff;
    }

    td {
        font-family: 'Poppins', sans-serif;
        background: #b800ff14;
        border: 1px solid #dddddd;
    }
</style>

<div class="container">
    <div class="row">
        <div class="col-md-4">
            <div class="afperbox">
                <h4>Notice Board</h4>
                <div class="content">
                    <h2 data-toggle="modal" data-target="#affiliate-modal">Click Here To Know More</h2>
                </div>
            </div>
            <div class="afperbox">
                <h4>Commission rate</h4>
                <div class="content">
                    <h2>{{ settings["ref_bonus"] }}%</h2>
                </div>
            </div>
        </div>
        <div class="col-md-8">
            <div class="affbox">
                <div class="referlink">
                    <div class="copy-text">
                        <input type="text" value="{{ site['url'] }}/ref/{{ user["referral_code"] }}" id="myInput" class="form-control"
                            readonly="">
                        <button class="btn btn-primary" onclick="myFunction('myInput')">Copy</button>
                    </div>
                </div>
            </div>
            <div class="affbox">
                <div class="affinfo">
                    <div class="affinfobox">
                        <p>Referrals</p>
                        <span>{{ user['total_click'] }}</span>
                    </div>
                    <div class="affinfobox">
                        <p>Visits</p>
                        <span>{{ user['total_click'] }}</span>
                    </div>
                    <div class="affinfobox">
                        <p>Registrations</p>
                        <span>{{ refCount }}</span>
                    </div>
                    <div class="affinfobox">
                        <p>Minimum payout</p>
                        <span>₹ 1500{{ settings['ref_min'] }}</span>
                    </div>
                    <div class="affinfobox">
                        <p>Available earnings</p>
                        <span>₹ {{ user['reforder'] }}{{ site['currency'] }}</span>
                    </div>
                    <div class="affinfobox">
                        <p>Total earnings</p>
                        <span>₹ {{ user['refchar'] }}{{ site['currency'] }}</span>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

<div class="container">
    <div class="row">
        <div class="col-md-10 col-md-offset-1">


        </div> 
    </div>
</div>
<div class="modal fade" id="affiliate-modal">
   <div class="modal-dialog">
      <div class="modal-content">
         <!-- Modal Header -->
         <div class="modal-header">
            <h4 class="modal-title">Notice Board</h4>
         </div>
         <!-- Modal body -->
         <div class="modal-body">
            <div class="card-box-top text-center" style="color: #2a255c; padding: 20px;border-radius: 10px; margin: 0 0 25px 0; background: rgba(42, 37, 92, 0.15)">
               <p>
			All you have to do is to add members to our panel via your Invite Link. Remember, you will only earn bonuses from memberships that register through the link defined in your account, there is no invitation limit!
               </p> 
            </div>  
                 <hr>  
            <div class="payout mb-5">
               <li>Payment is made only for newly recruited users.</li>
               <li>Self-referencing will not be paid, and when noticed, their accounts on the site will be closed.</li>
              <li>You cannot send a request without earning 20$ on referrals.</li>
              <li>Your references' accounts are closed. You get a 5% bonus for every payment.</li>
               <li>When the minimum payment amount is reached, the "Send Payment Request" button will appear on the screen.</li>
            </div>
            <center><button type="button" class="btn btn-primary" data-dismiss="modal">Close</button></center>
         </div>
      </div>
   </div>
</div>
<script>
    function myFunction(id) {
        var copyText = document.getElementById(id);
        copyText.select();
        copyText.setSelectionRange(0, 99999)
        document.execCommand("copy");
        //   alert("Copied the text: " + copyText.value);
    }
</script>
</div>
{% include 'footer.twig' %}