<?php
/**
  @licence GPL 2005-2010  The osCSS developers - osCSS Open Source E-commerce
  @package osCSS-2 <www http://www.oscss.org>
  @version 2.0.9h
  @date  07/06/10, 11:44
  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
  @encode UTF-8
*/
/* Boucle calcul stat nbr commande, client, etc*/
$customers_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS);
$customers = tep_db_fetch_array($customers_query);
$products_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS . " where products_status = '1'");
$products = tep_db_fetch_array($products_query);
$whos_online_query = tep_db_query("select * from " . TABLE_WHOS_ONLINE);

?>
<div id="customerStats" class="<?php echo $widg['class'] ?>" >
  <h3><?php echo __('box title statistics'); ?></h3>
  <ul>
    <li><?php echo '<a href="' . tep_href_link(FILENAME_CUSTOMERS, '', 'NONSSL') . '">' .__('box entry customers') . ' </a> : ' . $customers['count'].'' ;?></li>
    <li><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS, '', 'NONSSL') . '">'.__('box entry products') . ' </a> : ' . $products['count'] ;?></li>
    <li><?php echo '<a href="' . tep_href_link(FILENAME_WHOS_ONLINE, '', 'NONSSL') . '">' .__('box entry online') . '</a> : ' . tep_db_num_rows($whos_online_query) ;?></li>
  </ul>
</div>