Rewrites/fixes for handling config entries in SQLs
[mailer.git] / mailid.php
index 06f313f3b89743e6a5964732ab4a843c96535025..79e308753b2878e4dc8770fc1d55520bb6eead6b 100644 (file)
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -62,12 +63,12 @@ $url_bid = '0';
 $url_mid = '0';
 
 // Secure all data
-if (isGetRequestElementSet('userid'))  $url_userid = bigintval(getRequestElement('userid'));
-if (isGetRequestElementSet('mailid'))  $url_mid    = bigintval(getRequestElement('mailid'));
-if (isGetRequestElementSet('bonusid')) $url_bid    = bigintval(getRequestElement('bonusid'));
+if (isGetRequestParameterSet('userid'))  $url_userid = bigintval(getRequestParameter('userid'));
+if (isGetRequestParameterSet('mailid'))  $url_mid    = bigintval(getRequestParameter('mailid'));
+if (isGetRequestParameterSet('bonusid')) $url_bid    = bigintval(getRequestParameter('bonusid'));
 
 // 01           1        12            2    2            21    1                   22     10
-if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == '0')) {
+if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (!ifFatalErrorsDetected())) {
        // Init result
        $result_link = false;
 
@@ -84,7 +85,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                $type = 'bonusid'; $urlId = $url_bid;
        } else {
                // Problem: No id entered
-               redirectToUrl('index.php');
+               redirectToUrl('modules.php?module=index');
        }
 
        if (SQL_NUMROWS($result_link) == 1) {
@@ -109,7 +110,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                                break;
 
                        default: // Invalid mail type
-                               debug_report_bug('Invalid mail type ' . $ltype . ' detected.');
+                               debug_report_bug(__FILE__, __LINE__, 'Invalid mail type ' . $ltype . ' detected.');
                                break;
                } // END - switch
 
@@ -161,7 +162,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                                                        break;
 
                                                default: // Invalid mail type
-                                                       debug_report_bug('Invalid mail type ' . $ltype . ' detected.');
+                                                       debug_report_bug(__FILE__, __LINE__, 'Invalid mail type ' . $ltype . ' detected.');
                                                        break;
                                        }
 
@@ -223,7 +224,7 @@ if (!empty($errorCode)) {
                                redirectToConfiguredUrl('reject_url');
                        } else {
                                // Redirect to index
-                               redirectToUrl('index.php');
+                               redirectToUrl('modules.php?module=index');
                        }
                        break;