more fixes for missing extensions
[mailer.git] / 0.2.1 / mailid.php
index ca6a2a65e0ea2c127aa511a5294dd3b611cc385b..b268fa82d82ba528a29ef86f66bc88333f7977cf 100644 (file)
@@ -51,18 +51,22 @@ if (defined('mxchange_installed') && (mxchange_installed))
        // Is the extension active
        if (!EXT_IS_ACTIVE("mailid", true)) {
                // Is not activated/installed yet!
-               ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "register"));
+               ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid"));
        }
 
        // Add header
        require_once(PATH."inc/header.php");
 
+       // Init
+       $url_uid = 0; $url_bid = 0; $url_mid = 0;
+
        // Secure all data
-       $url_uid = "0"; $url_bid = "0"; $url_mid = "0";
        if (!empty($_GET['uid']))     $url_uid = bigintval($_GET['uid']);
        if (!empty($_GET['mailid']))  $url_mid = bigintval($_GET['mailid']);
        if (!empty($_GET['bonusid'])) $url_bid = bigintval($_GET['bonusid']);
 
+       //* DEBUG: */ die("*".$url_uid."/".$url_bid."/".$url_mid."*<pre>".print_r($FATAL, true)."</pre>");
+
        // 01        1        12            3    32           21    1     2      2     10
        if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (count($FATAL) == 0))
        {
@@ -157,8 +161,7 @@ if (defined('mxchange_installed') && (mxchange_installed))
                                                {
                                                        // If time is zero seconds we have a sponsor mail. 1 Second shall be set to avoid problems
                                                        if (($time == "0") && ($payment > 0)) { $URL = URL; $time = "1"; }
-                                                       if (($time > 0) && (($payment > 0) || ($points > 0)))
-                                                       {
+                                                       if (($time > 0) && (($payment > 0) || ($points > 0))) {
                                                                // He can confirm this mail!
                                                                // Export data into constants for the template
                                                                define('_UID_VALUE' , $url_uid);
@@ -168,47 +171,34 @@ if (defined('mxchange_installed') && (mxchange_installed))
 
                                                                // Load template
                                                                LOAD_TEMPLATE("mailid_frames");
-                                                       }
-                                                        else
-                                                       {
+                                                       } else {
                                                                $msg = CODE_DATA_INVALID;
                                                        }
-                                               }
-                                                else
-                                               {
+                                               } else {
                                                        $msg = CODE_POSSIBLE_INVALID;
                                                }
-                                       }
-                                        else
-                                       {
+                                       } else {
                                                $msg = CODE_ACCOUNT_LOCKED;
                                        }
-                               }
-                                else
-                               {
+                               } else {
                                        SQL_FREERESULT($result);
                                        $msg = CODE_USER_404;
                                }
-                       }
-                        else
-                       {
+                       } else {
                                SQL_FREERESULT($result);
                                $msg = CODE_STATS_404;
                        }
-               }
-                else
-               {
+               } else {
                        SQL_FREERESULT($result);
                        $msg = CODE_ALREADY_CONFIRMED;
                }
-       }
-        else
-       {
+       } else {
                // Nothing entered
                $msg = CODE_ERROR_MAILID;
        }
-       if (!empty($msg))
-       {
+
+       // Error code is set?
+       if (!empty($msg)) {
                LOAD_URL(URL."/modules.php?module=index&msg=".$msg);
        }