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.

37 lines
1.5KB

  1. <div class="panel panel-primary" id="few-numbers">
  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 / mois', 'moyenne sur les 3 derniers mois'); ?>
  14. <?= few_numbers_item(few_numbers_format_number($numberVisitsMonth), 'Visiteurs', 'le mois dernier'); ?>
  15. <?php //few_numbers_item('4', 'Heures gagnées / semaine'); ?>
  16. </div>
  17. </div>
  18. <?php
  19. function few_numbers_item($number, $description, $detail = null) {
  20. $html = '<div class="col-md-6 item"><div class="number">'.$number.'</div><div class="description">'.$description.'</div>';
  21. if($detail) {
  22. $html .= '<div class="detail">'.$detail.'</div>';
  23. }
  24. $html .= '</div>';
  25. return $html;
  26. }
  27. function few_numbers_format_number($number) {
  28. return number_format($number, 0, '', ' ');
  29. }
  30. ?>