<?php require( _ROOT . '/Views/_header.php' ); ?>








        <div class="content-wrapper">
          <div class="row">
            <div class="col-md-12 grid-margin stretch-card">
              <div class="card">
                <div class="card-body">
                  <h4 class="card-title">LISTE DES CLIENTS</h4>

                  <div class="table-responsive">
                    <table class="table table-striped">
                      <thead>
                        <tr>
                          <th>
                            N° Compte
                          </th>
                          <th>
                            Nom Prénom
                          </th>
                          <th>
                            E-Mail
                          </th>
                          <th>
                            Pays
                          </th>
                          <th>
                            Date de Creation
                          </th>
                        </tr>
                      </thead>
                      <tbody>

                        <?php foreach ($this->allusers as $key => $one): ?>

                        
                          <tr id="<?= $one->user_id ?>">

                            <td>
                              <?= $one->user_id ?>
                            </td> 
                            <td class="py-1">
                              <?= $one->user_nom ?> <?= $one->user_prenom ?>
                            </td>
                            <td>
                              <a href="mailto:<?= $one->user_email ?>" target="_blank"><?= $one->user_email ?></a>
                            </td>
                            <td>
                              <?= $one->user_pays ?>
                            </td>
                            <td>
                              <?= $one->user_created_at ?>
                            </td>
                            <td class="text-center">
                              <a 
                                class="btn btn-<?= $one->user_active == 'N' ? 'success' : 'danger' ?>" 
                                href="<?= $_ENV['BASE_URL'] ?>user/<?= $one->user_id ?>/?action=<?= $one->user_active == 'N' ? 'activate' : 'desactivate' ?>"
                              >
                                <?= $one->user_active == 'N' ? 'ACTIVATE' : 'DESACTIVATE' ?>
                              </a>
                            </td>
                            <td class="text-center">
                              <a class="btn btn-primary" href="<?= $_ENV['BASE_URL'] ?>user/<?= $one->user_id ?>/">
                                <span class="ti-eye"></span>
                              </a>
                            </td>
                          
                          </tr>    

                        <?php endforeach ?>

                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- content-wrapper ends -->










<?php require( _ROOT . '/Views/_footer.php' ); ?>