script does now also regonize the difference between payout in withdraw in wernis...
[mailer.git] / inc / modules / order.php
index f8c5585af565de4c8b01bf9f2ec20a726f05fc29..4b7259f2e1f2e28d548e1b71f41dd8effb51d9cf 100644 (file)
@@ -58,24 +58,24 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 if (empty($URL))
 {
        // Is the auto-send mechanism active or inactive?
-       if ($CONFIG['autosend_active'] == 'Y')
+       if ($_CONFIG['autosend_active'] == 'Y')
        {
                // Auto-send is active
                define('ADMIN_AUTOSEND',  COMPILE_CODE(ADMIN_AUTOSEND_ACTIVE));
                define('MEMBER_AUTOSEND', COMPILE_CODE(MEMBER_AUTOSEND_ACTIVE));
-               $TYPE = "NEW";
+               $type = "NEW";
        }
         else
        {
                // Auto-send is inactive
                define('ADMIN_AUTOSEND',  COMPILE_CODE(ADMIN_AUTOSEND_INACTIVE));
                define('MEMBER_AUTOSEND', COMPILE_CODE(MEMBER_AUTOSEND_INACTIVE));
-               $TYPE = "ADMIN";
+               $type = "ADMIN";
        }
 
        // Update sending pool
        $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_pool SET data_type='%s' WHERE id=%d AND sender=%d AND data_type='TEMP' LIMIT 1",
-        array($TYPE, bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__);
+        array($type, bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__);
 
        // Finally is the entry valid?
        if (SQL_AFFECTEDROWS($link) == 1)
@@ -101,7 +101,7 @@ if (empty($URL))
 
                // Update used points
                $ADD = "";
-               if ($CONFIG['order_max'] == "ORDER") $ADD = ", mail_orders=mail_orders+1";
+               if ($_CONFIG['order_max'] == "ORDER") $ADD = ", mail_orders=mail_orders+1";
                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s".$ADD." WHERE userid=%d LIMIT 1",
                 array($USED, $GLOBALS['userid']), __FILE__, __LINE__);