> <?php echo TITLE; ?>
Execute($customers_referral_query); $customers_referrals = array(); $customers_referrals_array = array(); $customers_referrals[] = array('id' => '0', 'text' => TEXT_REFERRAL_UNKNOWN); while (!$customers_referral->EOF) { $customers_referrals[] = array('id' => $customers_referral->fields['customers_referral'], 'text' => $customers_referral->fields['customers_referral']); $customers_referral->MoveNext(); } ?> = '" . $sd . "' and o.date_purchased <= '" . $ed . "') order by o.date_purchased, o.orders_id"; } else { $customers_orders_query = "select c.customers_id, c.customers_referral, o.orders_id, o.date_purchased, o.order_total, o.coupon_code from " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS . " o where c.customers_id = o.customers_id and c.customers_referral='" . $_GET['referral_code'] . "' and (o.date_purchased >= '" . $sd . "' and o.date_purchased <= '" . $ed . "') order by o.date_purchased, o.orders_id"; } $customers_orders = $db->Execute($customers_orders_query); ?>
  
RecordCount() . '
' . $customers_orders_query . '

' . 'start ' . date($_GET['start_date']) . ' end ' . date($_GET['end_date']) . '
Referral: ' . $_GET['referral_code'] . ' ' . strlen($_GET['referral_code']) . '
'; while (!$customers_orders->EOF) { // echo $customers_orders->fields['orders_id'] . ' ' . $customers_orders->fields['order_total'] . '
'; $current_orders_id = $customers_orders->fields['orders_id']; $orders_total_query = "select * from " . TABLE_ORDERS_TOTAL . " where orders_id='" . $current_orders_id . "'"; $orders_total = $db->Execute($orders_total_query); $order = new order($customers_orders->fields['orders_id']); ?> MoveNext(); } ?>
fields['date_purchased']); ?> Order #fields['orders_id']; ?> Discount Coupon ID# fields['coupon_code']; ?> fields['orders_id'] . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . ''; ?>
totals); $i < $n; $i++) { echo ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n"; } ?>
' . $order->totals[$i]['title'] . '' . $order->totals[$i]['text'] . '