<div class="col-lg-3 stats section" id="stats">
                
    <div class="section-title">
      <div class="line left-line"></div>
      <h1><?php echo $weblangs->trans("highlights"); ?></h1>
      <div class="line right-line"></div>
    </div>

    <div class="container aos-init aos-animate" data-aos="fade-up" data-aos-delay="100">

        <div class="row gy-4">
            
            <!--<div class="col-lg-12 counter-box">
                <i class="fas fa-users fa-4x text-white"></i>
                <div class="stats-item">
                  <span data-purecounter-start="0" data-purecounter-end="232" data-purecounter-duration="0" class="purecounter">000</span>
                  <p><?php echo $weblangs->trans("volunteer"); ?></p>
                </div>
            </div><!-- End Stats Item -->
            
            <?php if (isModEnabled('member')): ?>
                <div class="col-lg-12 counter-box">
                    <i class="fas fa-user-friends fa-4x text-white"></i>
                    <div class="stats-item">
                      <?php
                      $sql = "SELECT COUNT(rowid) as total_members FROM llx_adherent WHERE statut = 1 AND public = 1";
                      $resql = $db->query($sql);
                      $total_members = 0;
                      if ($resql) {
                        $obj = $db->fetch_object($resql);
                        if ($obj) {
                          $total_members = $obj->total_members;
                        }
                      }
                      ?>
                      <span data-purecounter-start="0" data-purecounter-end="<?php echo $total_members; ?>" data-purecounter-duration="0" class="purecounter"><?php echo $total_members; ?></span>
                      <p><?php echo $weblangs->trans("member"); ?></p>
                    </div>
                </div><!-- End Stats Item -->
            <?php endif; ?>
            
            <?php if (isModEnabled('eventorganization')): ?>
            <div class="col-lg-12 counter-box">
              <i class="fas fa-hands-helping fa-4x text-white"></i>
              <div class="stats-item">
              <?php
                $sql = "SELECT COUNT(rowid) as total_events FROM ".MAIN_DB_PREFIX."projet as p WHERE p.fk_statut IN (0,1) AND p.usage_organize_event IN (1)";
              $resql = $db->query($sql);
              $total_events = 0;
              if ($resql) {
                $obj = $db->fetch_object($resql);
                if ($obj) {
                $total_events = $obj->total_events;
                }
              }
              ?>
              <span data-purecounter-start="0" data-purecounter-end="<?php echo $total_events; ?>" data-purecounter-duration="0" class="purecounter"><?php echo $total_events; ?></span>
              <p><?php echo $weblangs->trans("actions"); ?></p>
              </div>
            </div><!-- End Stats Item -->
            <?php endif; ?>

            <?php if (isModEnabled('don') && getDolGlobalInt('DONATION_ENABLE_PUBLIC') && getDolGlobalInt('DONATION_COUNTERS_ARE_PUBLIC')): ?>
                <div class="col-lg-12 counter-box">
                    <i class="fas fa-hands-helping fa-4x text-white"></i>
                    <div class="stats-item">
                      <?php
                        $sql = "SELECT count(amount) as count_funds FROM llx_don WHERE paid = 1";
                        $resql = $db->query($sql);
                        $count_funds = 0;
                        if ($resql) {
                        $obj = $db->fetch_object($resql);
                        if ($obj) {
                          $count_funds = $obj->count_funds;
                        }
                        }
                        ?>
                        <span data-purecounter-start="0" data-purecounter-end="<?php echo $count_funds; ?>" data-purecounter-duration="0" class="purecounter"><?php print $count_funds; ?></span>
                        <p><?php echo $weblangs->trans("Donation"); ?></p>
                    </div>
                </div><!-- End Stats Item -->
            <?php endif; ?>
            
            <?php if (isModEnabled('don') && getDolGlobalInt('DONATION_ENABLE_PUBLIC') && getDolGlobalInt('DONATION_COUNTERS_ARE_PUBLIC')): ?>
                <div class="col-lg-12 counter-box">
                    <i class="fas fa-file-invoice-dollar fa-4x text-white"></i>
                    <div class="stats-item">
                      <?php
                        $sql = "SELECT SUM(amount) as total_funds FROM llx_don WHERE paid = 1";
                        $resql = $db->query($sql);
                        $total_funds = 0;
                        if ($resql) {
                        $obj = $db->fetch_object($resql);
                        if ($obj) {
                          $total_funds = $obj->total_funds;
                        }
                        }
                        ?>
                        <span data-purecounter-start="0" data-purecounter-end="<?php echo $total_funds; ?>" data-purecounter-duration="0" class="purecounter"><?php print intval($total_funds); ?> €</span>
                        <p><?php echo $weblangs->trans("fundsCollected"); ?></p>
                    </div>
                </div><!-- End Stats Item -->
            <?php endif; ?>

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