  <section class="content mt-4">
    <div class="container-fluid">
      <div class="card" style="border-radius: 10px; background-color: #1d2532;">
      <nav>
          <div class="nav nav-tabs transaction nav-fill" id="myTab" role="tablist">
              <a class="nav-item nav-link active" href="#pending" data-toggle="tab" role="tab" aria-controls="nav-home" aria-selected="true">
            UNASSIGN STOCKIST
              </a>
              <a class="nav-item nav-link" href="#mobilestockist" data-toggle="tab" role="tab" aria-controls="nav-profile" aria-selected="false">
            ASSIGNED
              </a>
            
          </div>
      </nav>

  <div class="tab-content">
        <div role="tablist" class="active tab-pane" id="pending">
          <div class="card-body pt-4">
            <table id="unassign_table" class="table table-striped text-white">
              <thead>
              <tr>
                <th>ID</th>
                <th>Complete Name</th>
                <th>Verification Code</th>
                <th>Count</th>
                <th width="25%">Action</th>
              </tr>
              </thead>
              <tbody>
              <?php 
                $unassign = "SELECT tbl_user_account.id,tbl_user_account.unique_id ,tbl_user_account.date_registered,tbl_user_account.firstname,tbl_user_account.lastname,tbl_user_account.verification_code,tbl_verification_code.count FROM `tbl_user_account` LEFT JOIN tbl_verification_code ON tbl_user_account.verification_code = tbl_verification_code.verification_code WHERE `multiple_activation` = 1 AND `accnt_type` = 1 AND password != 'disabled' and stockist_type = 0 and tbl_verification_code.count > 1 ";
                $result_unassign = $conn->query($unassign);
                  while($rowUnassign = mysqli_fetch_array($result_unassign)) {
                    $unique_id = $rowUnassign['unique_id']; 
                    $date_registered = $rowUnassign['date_registered']; 
                    $firstname = $rowUnassign['firstname']; 
                    $lastname = $rowUnassign['lastname']; 
                    $verification_code = $rowUnassign['verification_code']; 
                    $count = $rowUnassign['count']; 
                    $id = $rowUnassign['id']; 
              ?>
                <tr>
                  <td><?php echo $rowUnassign['unique_id']; ?></td>
                  <td><?php echo $rowUnassign['firstname'].' '.$rowUnassign['lastname']; ?></td>
                  <td><?php echo $rowUnassign['verification_code']; ?></td>
                  <td><?php echo $rowUnassign['count']; ?></td>
                  <td width="17%">
                    <a href="assign_mobilestockist.php?stockist_id=<?php echo $rowUnassign['id']; ?>" class="btn btn-success btn-sm">Mark as Mobile</a>
                    <a href="assign_citystockist.php?stockist_id=<?php echo $rowUnassign['id']; ?>" class="btn btn-primary btn-sm">Mark as City</a>
                  </td>
                </tr>
              <?php } ?>
              </tbody>
          </table>
       </div> 
     </div>
 
    <div role="tablist" class="tab-pane" id="mobilestockist">
        <div class="card-body pt-4">
            <table id="example2" class="table table-striped text-white">
              <thead>
                <tr>
                  <th>ID</th>
                  <th>Complete Name</th>
                  <th>Verification Code</th>
                  <th>Count</th>
                  <th>Type</th>
                  <th width="17%">Action</th>
                </tr>
              </thead>
              <tbody>
              <?php 
                $assignStockist = "SELECT tbl_user_account.stockist_type,tbl_user_account.id,tbl_user_account.unique_id ,tbl_user_account.date_registered,tbl_user_account.firstname,tbl_user_account.lastname,tbl_user_account.verification_code,tbl_verification_code.count FROM `tbl_user_account` LEFT JOIN tbl_verification_code ON tbl_user_account.verification_code = tbl_verification_code.verification_code WHERE `multiple_activation` = 1 AND `accnt_type` = 1 AND password != 'disabled' and stockist_type > 0 and tbl_verification_code.count > 1";
                $result_assignStockist = $conn->query($assignStockist);
                  while($rowAssign = mysqli_fetch_array($result_assignStockist)) {
                    $unique_id = $rowAssign['unique_id']; 
                    $date_registered = $rowAssign['date_registered']; 
                    $firstname = $rowAssign['firstname']; 
                    $lastname = $rowAssign['lastname']; 
                    $verification_code = $rowAssign['verification_code']; 
                    $count = $rowAssign['count']; 
                    $stockist_type = $rowAssign['stockist_type']; 
                    $id = $rowAssign['id']; 
              ?>

              <tr>
                  <td><?php echo $rowAssign['unique_id']; ?></td>
                  <td><?php echo $rowAssign['firstname'].' '.$rowAssign['lastname']; ?></td>
                  <td><?php echo $rowAssign['verification_code']; ?></td>
                  <td><?php echo $rowAssign['count']; ?></td>
                  <td>
                    <?php 
                      if ($stockist_type == 1) {
                        echo "<b style='color:#f91e08'>MOBILE STOCKIST </b>";
                      }else {
                        echo "<b style='color:#62ccff'>CITY STOCKIST</b>";
                      }
                    ?>
                  </td>
                  <td width="17%">
                    <a href="stockistProduct.php?stockist_id=<?php echo $rowAssign['unique_id']; ?>" class="btn btn-success btn-sm">Product</a>
                    <a href="unassign_stockist.php?stockist_id=<?php echo $rowAssign['id']; ?>" class="btn btn-danger btn-sm">Remove</a>
                  </td>
                </tr>
              <?php } ?>
              </tbody>
            </table>
            </div>
          </div>
   </div>
 
   </div> 



      </div>
    </div>
  </section>