Editing of network type handler partialy finished
[mailer.git] / doubler.php
index 4a97351b9bf7ca1efff89d9dbc476501a76da54f..34668ed6701ad66ecd87425f418ca0aae017e0f0 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 02/13/2005 *
- * ===============                              Last change: 02/13/2005 *
+ * Mailer v0.2.1-FINAL                                Start: 02/13/2005 *
+ * ===================                          Last change: 02/13/2005 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : doubler.php                                      *
@@ -44,7 +44,7 @@ $GLOBALS['startTime'] = microtime(true);
 
 // Set module
 $GLOBALS['module'] = 'doubler';
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
 
 // Load the required file(s)
 require('inc/config-global.php');
@@ -55,9 +55,6 @@ setContentType('text/html');
 // Is the 'doubler' extension active?
 redirectOnUninstalledExtension('doubler');
 
-// Only check this if refid is provided. This will do the rest for us
-determineReferalId();
-
 // Init content array
 $content = array(
        'message' => '',
@@ -66,7 +63,7 @@ $content = array(
 // Begin with doubler script...
 if (isFormSent()) {
        // Secure points (so only integer/double values are allowed
-       setRequestPostElement('points', bigintval(postRequestElement('points')));
+       setPostRequestElement('points', bigintval(postRequestElement('points')));
 
        // Begin with doubling process
        if ((isPostRequestElementSet('userid')) && (isPostRequestElementSet('pass')) && (isPostRequestElementSet('points'))) {
@@ -85,11 +82,8 @@ if (isFormSent()) {
                        loadTemplate('admin_settings_saved', false, getMessage('DOUBLER_USERID_INVALID'));
                } // END - if
 
-               // Free result
-               SQL_FREERESULT($result);
-
                // Remove any dots and unwanted chars from the points
-               setRequestPostElement('points', bigintval(round(convertCommaToDot(postRequestElement('points')))));
+               setPostRequestElement('points', bigintval(round(convertCommaToDot(postRequestElement('points')))));
 
                // Probe for enough points
                $probe_points = ((postRequestElement('points') >= getConfig('doubler_min')) && (postRequestElement('points') <= getConfig('doubler_max')));