<div class="ads">
    <?= $settings['tasks_top_ad'] ?>
</div>

 <?php
                if (isset($_SESSION['message'])) {
                    echo $_SESSION['message'];
                }
                ?>
             <div class="alert text-center alert-fade text-center xalert-simple xalert-primary xalert-dismissible text-left font__family-montserrat font__size-16 font__weight-light brk-library-rendered rendered show"><i class="fas fa-exclamation-circle"></i>IF YOU SEND INCORRECT PROOFS, WE WILL BAN YOUR ACCOUNT!</div>
   
   

<div class="row">
    <?php foreach ($availableTasks as $task) { ?>
<div class="col-12" style="margin-bottom: 5px;">
            <div class="card">
                <div class="card-body">
                    
                    <div class="row text-center">
                                    <div class="col-lg-3" style="margin: auto;padding: 5px;">
                                        <h5 style="font-weight: bold; margin-bottom: 0rem;"><?= $task['name'] ?></h5>
                                    </div>
                                    <div class="col-lg-1"><br></div>
                                    <div class="col-lg-5 " style="margin: auto;padding: 5px;">
                      <div class="row text-center">
                        
                            <div class="col-4">
                                <span><h5 style="color: #00ff89; font-weight: bold; margin-bottom: 0rem;"><img src="/img/coin2.png" draggable="false" width="15px"> <?= currency($task['usd_reward'], $settings['currency_rate']) ?></h5></span>
                                
                            </div>
                            
                            <div class="col-4">
                                <span><h5 style="color: #00ff89; font-weight: bold; margin-bottom: 0rem;"><i class="bx bxs-bolt label-icon"></i> <?= $task['energy_reward'] ?><span class="mobile">energy</span></h5></span>
                                
                            </div>
                            
                            <div class="col-4">
                                <span><h5 style="color: #00ff89; font-weight: bold; margin-bottom: 0rem;"><i class="bx bx-dna label-icon"></i> <?= $task['exp_reward'] ?> <span class="desktop">exp</span><span class="mobile">&nbsp;&nbsp; exp</span></h5></span>
                                
                            </div>
                        
                    </div>
                                    </div>
                                    <div class="col-lg-1">&nbsp;</div>
                                    <div class="col-lg-2" style="margin: auto;padding: 5px;">
  <button style="font-weight: bold; width: 90%;" class="btn btn-primary btn-block btn-rounded waves-effect waves-light btn-sm" type="button" data-toggle="modal" data-target="#collapseExample<?= $task['id'] ?>" aria-expanded="false" aria-controls="collapseExample<?= $task['id'] ?>">
    View Task <i class="mdi mdi-chevron-right"></i>
  </button>
                                    </div>
</div>
                    
                    
                    

<!-- tasks Modal -->
<div class="modal fade" id="collapseExample<?= $task['id'] ?>" tabindex="-1" aria-labelledby="collapseExample<?= $task['id'] ?>" aria-hidden="true" style="display: none;">
  <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="collapseExample<?= $task['id'] ?>"><i class="bx bx-task label-icon fa-gradient2"></i> <?= $task['name'] ?></h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true" style="color:white;">×</span>
        </button>
      </div>
      <div class="modal-body">
<h6>INSTRUCTIONS</h6>
                    <p class="card-text"><?= $task['description'] ?></p>
<hr>
                    <div class="row mb-1">
                            <div class="col-4 text-center">
                                <h6>MICRO JOB PROOF</h6>      <center> <ins class="6430a0daa9ce34cf0a81021f" style="display:inline-block;width:320px;height:50px;"></ins><script>!function(e,n,c,t,o,r,d){!function e(n,c,t,o,r,m,d,s,a){s=c.getElementsByTagName(t)[0],(a=c.createElement(t)).async=!0,a.src="https://"+r[m]+"/js/"+o+".js?v="+d,a.onerror=function(){a.remove(),(m+=1)>=r.length||e(n,c,t,o,r,m)},s.parentNode.insertBefore(a,s)}(window,document,"script","6430a0daa9ce34cf0a81021f",["cdn.bmcdn5.com"], 0, new Date().getTime())}();</script>   </center>
                            </div>

                            <div class="col-8 text-right">
                                
                                <h6 style="color: #00ff89eb; font-weight: bold; margin-bottom: 0rem;"><img src="/img/coin2.png" draggable="false" width="13px"> <?= currency($task['usd_reward'], $settings['currency_rate']) ?> <span style="color: #9bf8cdeb;font-weight: 300;">&nbsp;|&nbsp;</span> <i class="bx bxs-bolt label-icon"></i> <?= $task['energy_reward'] ?> <span style="color: #9bf8cdeb;font-weight: 300;">&nbsp;|&nbsp;</span> <i class="bx bx-dna label-icon"></i> <?= $task['exp_reward'] ?></h6>
                                
                            </div>
                    </div>
					<form action="<?= site_url('tasks/complete/' . $task['id']) ?>" method="post" autocomplete="off">
                        <div class="form-group">
                            <label>Submit Required Proof Below To Get Your Tokens</label>
                            <input type="text" name="proof" class="form-control" placeholder="<?= $task['requirement'] ?>" minlength="1" maxlength="100" required>
                        </div>
                     <input type="hidden" name="<?= $csrf_name ?>" value="<?= $csrf_hash ?>" />
                        <button type="submit" class="btn btn-primary btn-block">Submit Your Proof</button>   <center>
                            
                            <script src="https://d3plnp2f9sfye5.cloudfront.net/1101.js"></script>
                            
                             <ins class="6430a0daa9ce34cf0a81021f" style="display:inline-block;width:320px;height:50px;"></ins><script>!function(e,n,c,t,o,r,d){!function e(n,c,t,o,r,m,d,s,a){s=c.getElementsByTagName(t)[0],(a=c.createElement(t)).async=!0,a.src="https://"+r[m]+"/js/"+o+".js?v="+d,a.onerror=function(){a.remove(),(m+=1)>=r.length||e(n,c,t,o,r,m)},s.parentNode.insertBefore(a,s)}(window,document,"script","6430a0daa9ce34cf0a81021f",["cdn.bmcdn5.com"], 0, new Date().getTime())}();</script>   </center>
                    </form>
                    </div>

    </div>
  </div>
</div>
                </div>
            </div>
        </div>
    <?php } ?>
    <?php foreach ($pendingTasks as $task) { ?>
        <div class="col-md-6" style="margin-bottom: 5px;">
            <div class="card">
                <div class="card-body">
                    <h5 class="card-title"><?= $task['name'] ?></h5>
                    <p class="card-text"><?= $task['description'] ?></p>
                    <div class="row text-center">
                        <div class="col-md-4">
                            <span><i class="fas fa-gift"></i>: <?= currency($task['usd_reward'], $settings['currency_rate']) ?></span>
                        </div>
                        <div class="col-md-4">
                            <span><i class="fas fa-bolt"></i>: <?= $task['energy_reward'] ?> energy</span>
                        </div>
                        <div class="col-md-4">
                            <span><i class="fas fa-level-up-alt"></i>: <?= $task['exp_reward'] ?> exp</span>
                        </div>
                    </div>

                    <form action="<?= site_url('tasks/complete/' . $task['id']) ?>" method="post" autocomplete="off">
                        <div class="form-group">
                            <label>Proof</label>
                            <input type="text" name="proof" class="form-control" value="<?= $task['proof'] ?>" disabled>
                        </div>
                        <input type="hidden" name="<?= $csrf_name ?>" value="<?= $csrf_hash ?>" />
                        <button type="submit" class="btn btn-primary btn-block" disabled>Submitted (Allow Up To 48 Hours)</button>
                    </form>
                </div>
            </div>
        </div>
    <?php } ?>
</div>

<div class="ads">
    <?= $settings['tasks_footer_ad'] ?>
</div>

