get_results('SELECT DISTINCT user_id FROM '.$wpdb->prefix.'wpsc_logged_subscriptions', ARRAY_A); //echo "
".print_r($results)."
"; echo "
"; echo "

e-Commerce Subscribers

"; echo ""; echo ""; echo ""; echo ""; if ($results != NULL){ $now = time(); foreach ($results as $user){ $user_info = $wpdb->get_results("SELECT * FROM `{$wpdb->users}` WHERE id={$user['user_id']}", ARRAY_A); $user_subscription = $wpdb->get_results('SELECT active FROM '.$wpdb->prefix.'wpsc_logged_subscriptions WHERE user_id='.$user['user_id'].' AND start_time < '.$now.' AND (start_time+length) > '.$now.'',ARRAY_A); //echo "
".print_r($user_info,true)."
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } } echo "
".__('User ID', 'wpsc')."".__('Name', 'wpsc')."".__('Email', 'wpsc')."".__('Registered Date', 'wpsc')."".__('Suspend', 'wpsc')."/".__('Activate', 'wpsc')."
"; echo $user_info[0]['ID']; echo ""; echo $user_info[0]['display_name']; echo ""; echo $user_info[0]['user_email']; echo ""; echo $user_info[0]['user_registered']; echo ""; if ($user_subscription[0]['active']==1) { echo ""; } else { echo ""; } echo "
"; echo "
"; ?>