- // Add header
- loadIncludeOnce('inc/header.php');
-
- // Was that mail a valid one?
- if ($isValid === true) {
- // If time is zero seconds we have a sponsor mail. 1 Second shall be set to avoid problems
- if (($time == '0') && ($payment > 0)) { $URL = constant('URL'); $time = '1'; }
- if (($time > 0) && (($payment > 0) || ($points > 0))) {
- // He can confirm this mail!
- // Export data into constants for the template
- // @TODO Rewrite these constants
- define('_UID_VALUE' , $url_uid);
- define('_TYPE_VALUE', $type);
- define('_DATA_VALUE', $urlId);
- define('_URL_VALUE' , DEREFERER($URL));
-
- // Load template
- LOAD_TEMPLATE('mailid_frames');
+ // Is time and payment set?
+ if (($data['time'] > 0) && ($data['payment'] > 0)) {
+ $data['real_code'] = '0';
+ if (!empty($data['code'])) {
+ // Generate code (the user sees in the CAPTCHA)
+ $data['real_code'] = generateRandomCode(getCodeLength(), $data['code'], $data['userid'], $data['id']);
+ } // END - if
+
+ // Do the call-back by given data array
+ doMailIdCallback($data);