- // Shall I add bonus points for "turbo clickers" ?
- if ((GET_EXT_VERSION("bonus") >= "0.2.2") && (function_exists('BONUS_ADD_TURBO_POINTS')))
- {
- // Is an active-rallye running and this is not a notification mail?
- if (($_CONFIG['bonus_active'] == "Y") && ($notify == "N"))
- {
- // Shall I exclude the webmaster's own userid from the active-rallye?
- if (((($_CONFIG['bonus_uid'] == $url_uid) && ($_CONFIG['bonus_include_own'] == "Y")) || ($_CONFIG['bonus_uid'] != $url_uid)) && ($_CONFIG['def_refid'] != $url_uid))
- {
- // Add points and remember ranking are done in this function....
- BONUS_ADD_TURBO_POINTS($DATA, $url_uid, $type);
-
- // Set template to mailid_points_done2 which contains a link to the ranking list
- $template = "mailid_points_done2";
- if ($locked) $template = "mailid_points_locked2";
- define('_UID_VALUE' , $url_uid);
- define('_TYPE_VALUE', $type);
- define('_DATA_VALUE', TRANSLATE_COMMA($DATA));
- }
- }
+ // Add points
+ unset($GLOBALS['ref_level']);
+ ADD_POINTS_REFSYSTEM('mailid_okay', $url_uid, $payment, false, '0', $locked);
+
+ // Shall I add bonus points for "turbo clickers" ?
+ if (GET_EXT_VERSION('bonus') >= '0.2.2') {
+ // Is an active-rallye running and this is not a notification mail?
+ if ((getConfig('bonus_active') == 'Y') && ($notify == 'N')) {
+ // Shall I exclude the webmaster's own userid from the active-rallye?
+ if ((((getConfig('bonus_uid') == $url_uid) && (getConfig('bonus_include_own') == 'Y')) || (getConfig('bonus_uid') != $url_uid)) && (getConfig('def_refid') != $url_uid)) {
+ // Add points and remember ranking are done in this function....
+ BONUS_ADD_TURBO_POINTS($urlId, $url_uid, $type);
+
+ // Set template to mailid_points_done2 which contains a link to the ranking list
+ $template = 'mailid_points_done2';
+ if ($locked) $template = 'mailid_points_locked2';
+ define('_UID_VALUE' , $url_uid);
+ define('_TYPE_VALUE', $type);
+ define('_DATA_VALUE', translateComma($urlId));
+ } // END - if
+ } // END - if
+ } // END - if
+
+ // Load total points
+ define('__TOTAL_POINTS', translateComma(
+ GET_TOTAL_DATA($url_uid, 'user_points', 'points') -
+ GET_TOTAL_DATA($url_uid, 'user_data', 'used_points'))
+ );
+
+ // Load template
+ LOAD_TEMPLATE($template);
+ } else {
+ // Wrong image code! So add points to sender's account
+ unset($GLOBALS['ref_level']);
+ ADD_POINTS_REFSYSTEM_DIRECT('mailid_payback', $sender, $payment);
+
+ // Load template
+ LOAD_TEMPLATE('mailid_points_failed');