// Rember this user for the admin email
$adminUserids[] = $userid;
} // END - while
+
+ // Prepare content for template
+ $content = array(
+ 'userids' => implode(',', $adminUserids),
+ 'userid_count' => count($adminUserids),
+ 'coupon_id' => $couponId,
+ 'points' => bigintval(postRequestParameter('points')),
+ 'coupon_description' => postRequestParameter('coupon_description'),
+ 'coupon_expired' => generateDateTime($expirationTime, '0')
+ );
+
+ // Send admin notification
+ sendAdminNotification('{--ADMIN_COUPON_SUBJECT--}', 'admin_coupon_code', $content);
+
+ // Coupon has been sent
+ displayMessage('{--ADMIN_SEND_COUPON_DONE--}');
} else {
// No user was found
displayMessage('{--ADMIN_SEND_COUPON_USER_404--}');
}
- // Prepare content for template
- $content = array(
- 'userids' => implode(',', $adminUserids),
- 'userid_count' => count($adminUserids),
- 'coupon_id' => $couponId,
- 'points' => bigintval(postRequestParameter('points')),
- 'coupon_description' => postRequestParameter('coupon_description'),
- 'coupon_expired' => generateDateTime($expirationTime, '0')
- );
-
- // Send admin notification
- sendAdminNotification('{--ADMIN_COUPON_SUBJECT--}', 'admin_coupon_code', $content);
-
// Free result
SQL_FREERESULT($result);
}