-if (isset($_POST['ok'])) {
- // Save sponsor in database
- SPONSOR_HANDLE_SPONSOR($_POST);
-} 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--}',
+ );