You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.5KB

  1. <div class="panel panel-primary">
  2. <div class="panel-heading">
  3. <h2 class="panel-title">
  4. <span class="glyphicon glyphicon-stats"></span>
  5. <span class="the-title">Opendistrib en quelques chiffres</span>
  6. </h2>
  7. </div>
  8. <div class="panel-body">
  9. <?= few_numbers_item($countProducersActive, 'Producteurs', 'actifs sur les 3 derniers mois'); ?>
  10. <?= few_numbers_item(few_numbers_format_number($countUsersActive), 'Clients', 'actifs sur les 3 derniers mois'); ?>
  11. <?= few_numbers_item(few_numbers_format_number($countPointSalesActive), 'Points de vente', 'actifs sur les 3 derniers mois'); ?>
  12. <?= few_numbers_item(few_numbers_format_number($averageOrdersPerDay), 'Commandes clients / jour', 'en moyenne sur les 7 derniers jours'); ?>
  13. <?= few_numbers_item(few_numbers_format_number($averageTurnover).' €', 'CA producteurs / mois', 'moyenne sur les 3 derniers mois'); ?>
  14. <?= few_numbers_item(few_numbers_format_number($numberVisitsMonth), 'Visiteurs', 'le mois dernier'); ?>
  15. </div>
  16. </div>
  17. <?php
  18. function few_numbers_item($number, $description, $detail = null) {
  19. $html = '<div class="col-md-6 item"><div class="number">'.$number.'</div><div class="description">'.$description.'</div>';
  20. if($detail) {
  21. $html .= '<div class="detail">'.$detail.'</div>';
  22. }
  23. $html .= '</div>';
  24. return $html;
  25. }
  26. function few_numbers_format_number($number) {
  27. return number_format($number, 0, '', ' ');
  28. }
  29. ?>