* -------------------------------------------------------------------- *
* Kurzbeschreibung : Bestaetigung von Mails *
* -------------------------------------------------------------------- *
- * *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
// Load the required file(s)
require("inc/config.php");
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
// Is the extension active
if (!EXT_IS_ACTIVE("mailid", true)) {
// Is not activated/installed yet!
- addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
} // END - if
// Secure all data
$url_uid = 0; $url_bid = 0; $url_mid = 0; $code = 0; $mode = "";
- 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']);
- if (!empty($_GET['code'])) $code = bigintval($_GET['code']);
- if (!empty($_GET['mode'])) $mode = $_GET['mode'];
+ 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'));
+ if (REQUEST_ISSET_GET(('code'))) $code = bigintval(REQUEST_GET('code'));
+ if (REQUEST_ISSET_GET(('mode'))) $mode = REQUEST_GET('mode');
// 01 1 12 2 2 21 1 22 10
if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) {
if ($url_mid > 0) {
$result = SQL_QUERY_ESC("SELECT id, 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;
+ $type = "mailid"; $urlId = $url_mid;
} elseif ($url_bid > 0) {
$result = SQL_QUERY_ESC("SELECT id, 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;
+ $type = "bonusid"; $urlId = $url_bid;
}
if (SQL_NUMROWS($result) == 1) {
if ($status == "CONFIRMED") {
// Update last activity
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET last_online=UNIX_TIMESTAMP(), last_module='mailid_top' WHERE userid=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET last_online=UNIX_TIMESTAMP(), `last_module`='mailid_top' WHERE userid=%s LIMIT 1",
array($url_uid), __FILE__, __LINE__);
// User has confirmed his account so we can procede...
list($pay) = SQL_FETCHROW($result);
$time = GET_PAY_POINTS($pay, "time");
$payment = GET_PAY_POINTS($pay, "payment");
- $VALID = true;
+ $isValid = true;
} // END - if
// Free memory...
// Entry found?
if (SQL_NUMROWS($result) == 1) {
list($time, $payment) = SQL_FETCHROW($result);
- $VALID = true;
+ $isValid = true;
}
// Free memory...
}
// Is this entry valid?
- if ($VALID) {
+ if ($isValid) {
if (($time == "0") && ($payment > 0)) $time = "1";
if (($time > 0) && ($payment > 0)) {
if (!empty($code)) {
// Generate code
- $img_code = GEN_RANDOM_CODE(getConfig('code_length'), $code, $url_uid, $DATA);
+ $img_code = generateRandomCodde(getConfig('code_length'), $code, $url_uid, $urlId);
} // END - if
switch ($mode) {
USER_STATS_INSERT_RECORD($url_uid, $type, $stats_data);
// Right code entered?
- if (bigintval($_POST['gfx_check']) == $img_code) {
+ if (bigintval(REQUEST_POST('gfx_check')) == $img_code) {
// Add points over referal system is the default
$locked = false;
$template = "mailid_points_done";
// Shall I exclude the webmaster's own userid from the active-rallye?
if ((((getConfig('bonus_uid') == $url_uid) && (getConfig('bonus_include_own') == "Y")) || (getConfig('bonus_uid') != $url_uid)) && (getConfig('def_refid') != $url_uid)) {
// Add points and remember ranking are done in this function....
- BONUS_ADD_TURBO_POINTS($DATA, $url_uid, $type);
+ BONUS_ADD_TURBO_POINTS($urlId, $url_uid, $type);
// Set template to mailid_points_done2 which contains a link to the ranking list
$template = "mailid_points_done2";
if ($locked) $template = "mailid_points_locked2";
define('_UID_VALUE' , $url_uid);
define('_TYPE_VALUE', $type);
- define('_DATA_VALUE', TRANSLATE_COMMA($DATA));
+ define('_DATA_VALUE', TRANSLATE_COMMA($urlId));
} // END - if
} // END - if
} // END - if
define('_CODE_VALUE', $code);
define('_UID_VALUE' , $url_uid );
define('_TYPE_VALUE', $type);
- define('_DATA_VALUE', $DATA);
+ define('_DATA_VALUE', $urlId);
define('_TEMPLATE_BANNER', LOAD_TEMPLATE("mailid_banner", true));
if (getConfig('code_length') > 0) {
// Generate Code
- define('_IMAGE_CODE', IMG_CODE($code, $type, $DATA, $url_uid));
+ define('_IMAGE_CODE', IMG_CODE($code, $type, $urlId, $url_uid));
$templ = "mailid_enter_code";
} else {
// Disabled code
define('_TIM2_VALUE', strlen($time));
define('_UID_VALUE' , $url_uid );
define('_TYPE_VALUE', $type);
- define('_DATA_VALUE', $DATA);
+ define('_DATA_VALUE', $urlId);
define('_RAND_VALUE', mt_rand(0, 99999));
define('_TEMPLATE_BANNER', LOAD_TEMPLATE("mailid_banner", true));
}
// Really all done here... ;-)
+shutdown();
+
+//
?>