* -------------------------------------------------------------------- *
* Kurzbeschreibung : Bestaetigung von Mails *
* -------------------------------------------------------------------- *
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Bestaetigung von Mails *
* -------------------------------------------------------------------- *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
-// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require_once("inc/libs/security_functions.php");
+// Load security stuff here
+require('inc/libs/security_functions.php');
-if (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
+if (isInstalled()) {
+ // Is the extension active?
+ redirectOnUninstalledExtension('mailid');
- 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>");
+ if (REQUEST_ISSET_GET('uid')) $url_uid = bigintval(REQUEST_GET('uid'));
+ if (REQUEST_ISSET_GET('mailid')) $url_mid = bigintval(REQUEST_GET('mailid'));
+ if (REQUEST_ISSET_GET('bonusid')) $url_bid = bigintval(REQUEST_GET('bonusid'));
- // 01 1 12 3 32 21 1 2 2 10
- if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (count($FATAL) == 0)) {
+ // 01 1 12 3 32 21 1 22 10
+ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) {
- $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;
+ $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'; $urlId = $url_mid;
- $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;
+ $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'; $urlId = $url_bid;
- $result = SQL_QUERY_ESC("SELECT pool_id, url, subject FROM "._MYSQL_PREFIX."_user_stats WHERE id=%s LIMIT 1",
- array($url_mid), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT pool_id, url, subject FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `id`=%s LIMIT 1",
+ array($url_mid), __FILE__, __LINE__);
- $result = SQL_QUERY_ESC("SELECT id, url, subject FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1",
- array($url_bid), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+ array($url_bid), __FILE__, __LINE__);
- $result = SQL_QUERY_ESC("SELECT status, gender, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
- array($url_uid), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT status, gender, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+ array($url_uid), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
list($status, $gender, $sname, $fname) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (SQL_NUMROWS($result) == 1) {
list($status, $gender, $sname, $fname) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- case "NORMAL":
- $result = SQL_QUERY_ESC("SELECT payment_id FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s LIMIT 1",
- array(bigintval($pool)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
+ case 'NORMAL':
+ $result = SQL_QUERY_ESC("SELECT payment_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
+ array(bigintval($pool)), __FILE__, __LINE__);
+ if (SQL_NUMROWS($result) == 1) {
- $time = GET_PAY_POINTS($pay, "time");
- $payment = GET_PAY_POINTS($pay, "payment");
- $VALID = true;
+ $time = getPaymentPoints($pay, 'time');
+ $payment = getPaymentPoints($pay, 'payment');
+ $isValid = true;
- case "BONUS":
- $result = SQL_QUERY_ESC("SELECT points, time FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1",
- array($url_bid), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
+ case 'BONUS':
+ $result = SQL_QUERY_ESC("SELECT points, time FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+ array($url_bid), __FILE__, __LINE__);
+ if (SQL_NUMROWS($result) == 1) {
if (($time > 0) && (($payment > 0) || ($points > 0))) {
// He can confirm this mail!
// Export data into constants for the template
define('_UID_VALUE' , $url_uid);
define('_TYPE_VALUE', $type);
if (($time > 0) && (($payment > 0) || ($points > 0))) {
// He can confirm this mail!
// Export data into constants for the template
define('_UID_VALUE' , $url_uid);
define('_TYPE_VALUE', $type);
- switch ($_CONFIG['mailid_error_redirect']) {
- case "INDEX": // Redirect to index page
- LOAD_URL("modules.php?module=index&msg=".$msg."&ext=mailid");
+ switch (getConfig('mailid_error_redirect')) {
+ case 'INDEX': // Redirect to index page
+ redirectToUrl('modules.php?module=index&msg='.$msg.'&ext=mailid');
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected in mailid_error_redirect.", $_CONFIG['mailid_error_redirect']));
- LOAD_URL("modules.php?module=index&msg=".CODE_UNKNOWN_STATUS."&ext=mailid");
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected in mailid_error_redirect.", getConfig('mailid_error_redirect')));
+ redirectToUrl('modules.php?module=index&msg=' . getCode('UNKNOWN_STATUS') . '&ext=mailid');