function uc_recurring_user_table in UC Recurring Payments and Subscriptions 6        
                          
                  
                        
1 call to uc_recurring_user_table()
  - uc_recurring_user in ./uc_recurring.module
 
  - Implementation of hook_user().
 
 
File
 
   - ./uc_recurring.module, line 652
 
  - Allows you to add a recurring fee to a product/SKU to handle subscription
type services.
 
Code
function uc_recurring_user_table($uid) {
  $rows = array();
  $output = '';
  
  $header = array(
    t('Order'),
    t('Amount'),
    t('Interval'),
    t('Next charge'),
    t('Remaining'),
    t('Operations'),
  );
  $context = array(
    'revision' => 'themed-original',
    'location' => 'recurring-user-table',
  );
  
  $result = db_query("SELECT * FROM {uc_recurring_users} WHERE uid = %d AND remaining_intervals > 0 ORDER BY order_id DESC", $uid);
  while ($fee = db_fetch_array($result)) {
    $ops = array();
    
    $callback = $fee['fee_handler'] . '_recurring_fee_ops';
    if (function_exists($callback)) {
      $ops = $callback('user', $fee);
    }
    
    $rows[] = array(
      l($fee['order_id'], 'user/' . $uid . '/order/' . $fee['order_id']),
      uc_price($fee['fee_amount'], $context),
      array(
        'data' => check_plain($fee['regular_interval']),
        'nowrap' => 'nowrap',
      ),
      $fee['remaining_intervals'] == 0 ? '-' : format_date($fee['next_charge'], 'small'),
      $fee['remaining_intervals'],
      array(
        'data' => implode(' ', $ops),
        'nowrap' => 'nowrap',
      ),
    );
  }
  
  if (count($rows) > 0) {
    $output = theme('table', $header, $rows);
  }
  return $output;
}