<?php
/**
  @licence GPL 2005-2010  The osCSS developers - osCSS Open Source E-commerce
  @portion code Copyright (c) 2002 osCommerce
  @Contribution by Nekosign, webmaster@nekosign.com
  @package osCSS-2 <www http://www.oscss.org>
  @version 2.1.0
  @date  14/11/10, 14:36
  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
  @encode UTF-8
*/

    $rows=0;
    $customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address, c.customers_newsletter , b.customers_info_id , b.customers_info_date_account_created as date_account_created
        from " . TABLE_CUSTOMERS . " c," . TABLE_CUSTOMERS_INFO . " b where c.customers_id = b.customers_info_id and c.customers_newsletter = '1'
        order by b.customers_info_date_account_created, c.customers_lastname, c.customers_firstname";


    $customers_split = new splitPageResults($_GET['cpage'], MAX_DISPLAY_SEARCH_RESULTS, $customers_query_raw, $customers_query_numrows);
    $customers_query = tep_db_query($customers_query_raw);

?>
<!-- body //-->
<h4><?php echo HEADING_TITLE; ?></h4>
<!-- body_text //-->
    <p><?php echo TEXT_DESCRIPTION; ?><strong><?php echo $customers_query_numrows; ?></strong></p>
    <table style="width:100%" class="dataTable">
      <thead>
        <tr>
          <th style="width:10%"><?php echo TABLE_HEADING_NUMBER; ?></th>
          <th style="width:30%"><?php echo TABLE_HEADING_LAST_NAME; ?></th>
          <th style="width:25%"><?php echo TABLE_HEADING_CREATE; ?></th>
        </tr>
      </thead>
<?php
    while ($customers = tep_db_fetch_array($customers_query)) {
      $rows++;
      if (strlen($rows) < 2) { $rows = '0' . $rows; }
?>
      <tr class="view parent dataTableRow">
        <td style="width:30%;white-space:nowrap;"><?php echo $rows; ?>.</td>
        <td><?php echo tep_customers_row_action($customers['customers_id'], array('origin'=>FILENAME_STATS_NEWSLETTER)); ?></td>
        <td class="tcenter"><?php echo tep_date_short($customers['date_account_created']); ?></td>
      </tr>
<?php } ?>
</table>

  <p><?php echo $customers_split->display_count($customers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['cpage'], 'Totaal <b>%s</b> van <b>%s</b> (van <b>%s</b> klanten)' , '', 'cpage'); ?></p>
  <p class="tright"><?php echo $customers_split->display_links($customers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['cpage'], tep_get_all_get_params(array('cpage')), 'cpage'); ?></p>


<!-- body_text_eof //-->
<!-- body_eof //-->