-if (IS_FORM_SENT()) {
- // Save sponsor in database
- SPONSOR_HANDLE_SPONSOR(REQUEST_POST_ARRAY());
-} else {
- // Prepare constants for the template
- define('__SPONSOR_MIN_VALUE', getConfig('sponsor_min_points'));
+if (isFormSent()) {
+ // Generate message array
+ $messageArray = array(
+ 'failed' => '{--SPONSOR_REGISTRATION_FAILED--}',
+ 'added' => '{--SPONSOR_REGISTRATION_COMPLETED--}',
+ );