-require ("inc/config.php");
-
-if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed')))
-{
- // Is the extension active
- if (!EXT_IS_ACTIVE("mailid", true)) {
- // Is not activated/installed yet!
- LOAD_URL("modules.php?module=index&msg=".CODE_EXTENSION_PROBLEM."&ext=mailid");
- } // END - if
-
- // Init
- $url_uid = 0; $url_bid = 0; $url_mid = 0;
-
- // Secure all data
- 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)) {
- // Maybe he wants to confirm an email?
- if ($url_mid > 0) {
- // Normal-Mails
- $result = SQL_QUERY_ESC("SELECT link_type FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%s AND userid=%s LIMIT 1",
- array($url_mid, $url_uid), __FILE__, __LINE__);
- $type = "mailid"; $DATA = $url_mid;
- } elseif ($url_bid > 0) {
- // Bonus-Mail
- $result = SQL_QUERY_ESC("SELECT link_type FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%s AND userid=%s LIMIT 1",
- array($url_bid, $url_uid), __FILE__, __LINE__);
- $type = "bonusid"; $DATA = $url_bid;
- } else {
- // Problem: No ID entered
- LOAD_URL("index.php");
- }
-
- if (SQL_NUMROWS($result) == 1) {
- // Load the entry
- list($ltype) = SQL_FETCHROW($result);
+require('inc/config-global.php');
+
+// Set content type
+setContentType('text/html');
+
+// Is the extension active?
+redirectOnUninstalledExtension('mailid');
+
+// Init
+$url_userid = '0';
+$url_bid = '0';
+$url_mid = '0';
+
+// Secure all data
+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')) {
+ // Init result
+ $result_link = false;
+
+ // Maybe he wants to confirm an email?
+ if ($url_mid > 0) {
+ // Normal-Mails
+ $result_link = SQL_QUERY_ESC("SELECT `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1",
+ array($url_mid, $url_userid), __FILE__, __LINE__);
+ $type = 'mailid'; $urlId = $url_mid;
+ } elseif ($url_bid > 0) {
+ // Bonus-Mail
+ $result_link = SQL_QUERY_ESC("SELECT `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1",
+ array($url_bid, $url_userid), __FILE__, __LINE__);
+ $type = 'bonusid'; $urlId = $url_bid;
+ } else {
+ // Problem: No id entered
+ redirectToUrl('modules.php?module=index');
+ }