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