./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings *
./inc/language/refback_de.php:51: // @TODO Rewrite these constants to one
./inc/libs/admins_functions.php:537: // @TODO This can be, somehow, rewritten
-./inc/libs/bonus_functions.php:195: // @TODO Move this HTML to a template
+./inc/libs/bonus_functions.php:115: // @TODO Rewrite this to a filter
+./inc/libs/bonus_functions.php:199: // @TODO Move this HTML to a template
./inc/libs/doubler_functions.php:130:// @TODO This could be rewritten to a filter
./inc/libs/doubler_functions.php:44:// @TODO Lame description
./inc/libs/doubler_functions.php:96: // @TODO Can't this be moved into EL?
./inc/libs/forced_functions.php:457:// @TODO Can't we use our new expression language instead of this ugly code?
+./inc/libs/mailid_functions.php:126: // @TODO Rewrite these blocks to filter
./inc/libs/mailid_functions.php:47: // @TODO Rewrite this to a dynamic include or so
+./inc/libs/mailid_functions.php:96: // @TODO Rewrite this to a filter
./inc/libs/network_functions.php:1182: // @TODO Implement this function, don't forget to set HTTP status back to '200 OK' if everything went fine
./inc/libs/order_functions.php:46: // @TODO Move this array into a filter
./inc/libs/rallye_functions.php:771:// @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId()
./inc/modules/admin/what-list_mods.php:55: // @TODO This can be moved into mysql-function.php, see checkModulePermissions() function
./inc/modules/admin/what-list_rallye_prices.php:222: // @TODO Rewrite these two constants
./inc/modules/admin/what-list_refs.php:101: // @TODO Try to rewrite some to EL
-./inc/modules/admin/what-list_unconfirmed.php:120: // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus
-./inc/modules/admin/what-list_unconfirmed.php:90: // @TODO This constant might be unused? define('__LIST_UNCON_TITLE', '{--ADMIN_LIST_UNCONFIRMED_BONUS_LINKS--}');
-./inc/modules/admin/what-list_unconfirmed.php:93: // @TODO `id` has been used two times???
+./inc/modules/admin/what-list_unconfirmed.php:118: // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus
+./inc/modules/admin/what-list_unconfirmed.php:89: // @TODO This constant might be unused? define('__LIST_UNCON_TITLE', '{--ADMIN_LIST_UNCONFIRMED_BONUS_LINKS--}');
+./inc/modules/admin/what-list_unconfirmed.php:92: // @TODO `id` has been used two times???
./inc/modules/admin/what-list_user_cats.php:54: // @TODO No longer needed? define('__CATEGORIES_BASE' , '<a href="{%url=modules.php?module=admin&userid=');
./inc/modules/admin/what-list_user_cats.php:68: // @TODO Rewrite this to countSum.....() function
./inc/modules/admin/what-list_user.php:104: // @TODO Refacture these old link generation to functions
./inc/wrapper-functions.php:3209: // @TODO Find a way to not use direct module comparison
./inc/wrapper-functions.php:524:// @TODO Do some more sanity check here
./inc/xml-functions.php:240: // @TODO Handle characters
-./mailid.php:101: // @TODO Rewrite this to a filter
-./mailid.php:144: // @TODO Rewrite this to a filter
-./mailid_top.php:111: // @TODO Rewrite this to a filter/function
-./mailid_top.php:148: // @TODO Rewrite this to a filter
-./mailid_top.php:18: * @TODO Merge this script with mailid.php *
-./mailid_top.php:198: // @TODO Rewrite this to a filter
-./mailid_top.php:205: // @TODO Rewrite this to a filter
-./mailid_top.php:240: // @TODO Rewrite these blocks to filter
+./mailid.php:117: // @TODO Rewrite this to a filter/function
+./mailid.php:154: // @TODO Rewrite this to a filter
+./mailid.php:81:// @TODO Improve check on $data['type'], empty() is not very much ...
./templates/de/html/admin/admin_add_country.tpl:24: <!-- @TODO Rewrite this selection box to our generic functions //-->
./templates/de/html/admin/admin_config_other.tpl:79: <!-- @TODO Rewrite this selection to one of our functions //-->
./templates/de/html/admin/admin_config_rewrite.tpl:4: <!-- @TODO No title here? //-->
./inc/sql_error.php:2:// @DEPRECATED
./inc/stats_bonus.php:2:// @DEPRECATED
./inc/template.php:2:// @DEPRECATED
+./mailid_top.php:2:// @DEPRECATED
./templates/de/html/admin/admin_add_reflevel.tpl:1:<!-- @DEPRECATED //-->
./templates/de/html/admin/admin_add_reflvl.tpl:1:<!-- @DEPRECATED //-->
./templates/de/html/admin/admin_add_shop_cat.tpl:1:<!-- @DEPRECATED //-->
Diese beiden Codes stehen in der inc/cache/config-local.php und koennen nach
den oben genannten Regeln geaendert werden.
-Wird eine Mail bestaetigt so, erzeugt das PHP-Script mailid_top.php per rand()
+Wird eine Mail bestaetigt so, erzeugt das PHP-Script mailid.php per rand()
Funktion eine Zufallszahl zwichen 0 und 99999. Diese wird beim Laden der Seite
mit der Code-Eingabe an die URL dran gehaengt.
-Im selben Script mailid_top.php werden die beiden Codes mit dem User-Agent
+Im selben Script mailid.php werden die beiden Codes mit dem User-Agent
(genaue Browserbezeichnung) und der Zufallszahl aus der URL aneinander gehaengt
und hexdec() codiert. Aus der dann resultierenden Zahl werden so viele Stellen
nach dem Dezimalpunkt extrahiert, wie viel Sie im Admin-Bereich eingestellt
Diese beiden Codes stehen in der inc/cache/config-local.php und koennen nach
den oben genannten Regeln geaendert werden.
-Wird eine Mail bestaetigt so, erzeugt das PHP-Script mailid_top.php in Zeile 229
+Wird eine Mail bestaetigt so, erzeugt das PHP-Script mailid.php in Zeile 229
per rand() Funktion eine Zufallszahl zwichen 0 und 99999. Diese wird beim Laden
der Seite mit der Code-Eingabe an die URL dran gehaengt.
-Im Script mailid_top.php, Zeile 124 werden die beiden Codes mit dem User-Agent
+Im Script mailid.php, Zeile 124 werden die beiden Codes mit dem User-Agent
(genaue Browserbezeichnung) und der Zufallszahl aus der URL aneinander gehaengt
und hexdec() codiert. Aus der dann resultierenden Zahl werden so viele Stellen
nach dem Dezimalpunkt extrahiert, wie viel Sie im Admin-Bereich eingestellt
addCreateTableSql('bonus_turbo', "
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-`mail_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-`bonus_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`mail_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
+`bonus_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
`level` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`points` FLOAT(20,3) NOT NULL DEFAULT 0.000,
`timemark` VARCHAR(32) NOT NULL DEFAULT 0,
break;
case '1.0.0': // SQL queries for v1.0.0
+ addExtensionChangeTableColumnSql('bonus_turbo', 'mail_id' , 'mail_id', 'UNSIGNED NULL DEFAULT NULL');
+ addExtensionChangeTableColumnSql('bonus_turbo', 'bonus_id', 'mail_id', 'UNSIGNED NULL DEFAULT NULL');
+
// Register filter
registerFilter(__FILE__, __LINE__, 'config_userid_exclusion_sql', 'EXLCUDE_BONUS_USERID', FALSE, TRUE, isExtensionDryRun());
case '0.0.4': // SQL queries for v0.0.4
// Update notes (these will be set as task text!)
- setExtensionUpdateNotes("Absicherung der Variablen <span class=\"bad\">userid</span>, <span class=\"bad\">mailid</span> und <span class=\"bad\">bonusid</span> durch die eigene Funktion <span class=\"bad\">bigintval()</span> in den beiden Dateien <span class=\"bad\">mailid.php</span> und <span class=\"bad\">mailid_top.php</span>.");
+ setExtensionUpdateNotes("Absicherung der Variablen <span class=\"bad\">userid</span>, <span class=\"bad\">mailid</span> und <span class=\"bad\">bonusid</span> durch die eigene Funktion <span class=\"bad\">bigintval()</span> in der Datei <span class=\"bad\">mailid.php</span>.");
break;
case '0.0.5': // SQL queries for v0.0.5
case '0.1.4': // SQL queries for v0.1.4
// Update notes (these will be set as task text!)
- setExtensionUpdateNotes("Sicherheitsupdate an den Scripten <u>mailid.php</u> und <strong>mailid_top.php</strong> durchgeführt.");
+ setExtensionUpdateNotes("Sicherheitsupdate an den Scripten <u>mailid.php</u> und <span class=\"data\">mailid.php</span> durchgeführt.");
break;
case '0.1.5': // SQL queries for v0.1.5
case '0.2.3': // SQL queries for v0.2.3
// Update notes (these will be set as task text!)
- setExtensionUpdateNotes("Modul <strong>mailid</strong> war nicht gesetzt. Dadurch wurden die URLs (loader z.B.) umgeschrieben und führten somit zu Fehlern.");
+ setExtensionUpdateNotes("Modul <span class=\"data\">mailid</span> war nicht gesetzt. Dadurch wurden die URLs (loader z.B.) umgeschrieben und führten somit zu Fehlern.");
break;
case '0.2.4': // SQL queries for v0.2.4
case '0.2.7': // SQL queries for v0.2.7
// Update notes (these will be set as task text!)
- setExtensionUpdateNotes("Wenn die {?POINTS?} dem <strong>noch auf Auszahlung wartendem Guthaben</strong> aufaddiert wird, wird eine entsprechende Nachricht ausgegeben (neue Templates <strong>mailid_points_locked</strong> und <strong>mailid_points_locked2</strong> sind hinzugekommen!)");
+ setExtensionUpdateNotes("Wenn die {?POINTS?} dem <span class=\"data\">noch auf Auszahlung wartendem Guthaben</span> aufaddiert wird, wird eine entsprechende Nachricht ausgegeben (neue Templates <span class=\"data\">mailid_points_locked</span> und <span class=\"data\">mailid_points_locked2</span> sind hinzugekommen!)");
break;
case '0.2.8': // SQL queries for v0.2.8
case '0.2.9': // SQL queries for v0.2.9
// Update notes (these will be set as task text!)
- setExtensionUpdateNotes("<strong>Code wiederholen</strong> nach <strong>Code eingeben</strong> hin geändert.");
+ setExtensionUpdateNotes("<span class=\"data\">Code wiederholen</span> nach <span class=\"data\">Code eingeben</span> hin geändert.");
break;
case '0.3.0': // SQL queries for v0.3.0
case '0.3.1': // SQL queries for v0.3.1
// Update notes (these will be set as task text!)
- setExtensionUpdateNotes("mailid.php und mailid_top.php können erst bei aktivierter Erweiterung <strong>mailid</strong> benutzt werden. Solange gibt es fatale Fehlermeldungen.");
+ setExtensionUpdateNotes("<span class=\"data\">mailid.php</span> kann erst bei aktivierter Erweiterung <span class=\"data\">mailid</span> benutzt werden. Solange gibt es fatale Fehlermeldungen.");
break;
case '0.3.2': // SQL queries for v0.3.2
// Update notes (these will be set as task text!)
- setExtensionUpdateNotes("Bitte das Template <span class=\"bad\"><strong>{?PATH?}/templates/de/html/mailid/mailid_points_lcoked2.tpl</strong></span> löschen. Noices fixed.");
+ setExtensionUpdateNotes("Bitte das Template <span class=\"bad data\">{?PATH?}/templates/de/html/mailid/mailid_points_lcoked2.tpl</span> löschen. Noices fixed.");
break;
case '0.3.3': // SQL queries for v0.3.3
function FILTER_GENERATE_BONUS_MAIL_LINKS ($filterData) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
- // Is the type 'bid'?
- if ($filterData['type'] == 'bid') {
+ // Is the type 'bonus'?
+ if ($filterData['type'] == 'bonus') {
// Load template
$filterData['__output'] .= loadTemplate('admin_links_bonus_mail', TRUE, $filterData);
} // END - if
// Filter for generating mails links for 'pool' mails
function FILTER_GENERATE_POOL_MAIL_LINKS ($filterData) {
- // Is type 'mid'?
- if ($filterData['type'] == 'mid') {
+ // Is type 'normal'?
+ if ($filterData['type'] == 'normal') {
// Load template
$filterData['__output'] .= loadTemplate('admin_links_' . strtolower($filterData['mail_status']) . '_pool_mail', TRUE, $filterData);
} // END - if
}
// Generate admin links for mail order
-// mailType can be: 'mid' or 'bid'
+// mailType can be: 'normal' or 'bonus'
function generateAdminMailLinks ($mailType, $mailId) {
// Init variables
$OUT = '';
// Which mail do we have?
switch ($mailType) {
- case 'bid': // Bonus mail
+ case 'bonus': // Bonus mail
$table = 'bonus';
break;
- case 'mid': // Member mail
+ case 'normal': // Member mail
$table = 'pool';
break;
} // END - if
// This function must be run *BEFORE* a link is removed from table 'mailer_user_links' !
-function addTurboBonus ($mid, $userid, $type) {
+function addTurboBonus ($id, $userid, $type) {
// Shall we add bonus points?
if (!isBonusRallyeActive()) {
return FALSE;
} // END - if
// Init variables
- $sql = ''; $bonus = '0'; $mail = '0'; $column = '';
+ $sql = '';
+ $bonusId = 'NULL';
+ $mailId = 'NULL';
+ $column = '';
// Select SQL command
switch ($type) {
case 'bonusid':
$column = 'bonus_id';
- $bonus = $mid;
+ $bonusId = $id;
break;
case 'mailid' :
$column = 'mail_id';
- $mail = $mid;
+ $mailId = $id;
break;
default:
} // END - if
// Check for entry
- $rank = countSumTotalData($mid, 'bonus_turbo', 'id', $column, TRUE) + 1;
+ $rank = countSumTotalData($id, 'bonus_turbo', 'id', $column, TRUE) + 1;
// Which rank?
if ($rank == 1) {
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_bonus_turbo` (`userid`, `mail_id`, `bonus_id`, `level`, `points`, `timemark`) VALUES (%s, %s, %s, %s, %s, UNIX_TIMESTAMP())",
array(
bigintval($userid),
- bigintval($mail),
- bigintval($bonus),
+ $mailId,
+ $bonusId,
$rank,
$points
), __FUNCTION__, __LINE__);
+ // @TODO Rewrite this to a filter
if ((isExtensionInstalledAndNewer('bonus', '0.3.5')) && (getBonusMode() != 'ADD') && ($points > 0)) {
handleBonusPoints($points, $userid);
} // END - if
} // END - if
}
+// Does the "mailid" call-back
+function doMailIdCallback ($data) {
+ // Load banner generically
+ $data['banner'] = loadTemplate('mailid_banner', TRUE);
+
+ // Generate call-back function name
+ $callbackName = 'doMailId' . trim(capitalizeUnderscoreString($data['do']));
+
+ // Is the function there?
+ if (!function_exists($callbackName)) {
+ // Not found
+ reportBug(__FILE__, __LINE__, 'Unknown mode ' . $data['do'] . ' detected.');
+ } // END - if
+
+ // Do the call-back
+ call_user_func($callbackName, $data);
+}
+
+//-----------------------------------------------------------------------------
+// Call-back functions for mailid
+//-----------------------------------------------------------------------------
+
+// Do call-back for 'add'
+function doMailIdAdd ($data) {
+ // Count clicks
+ // @TODO Rewrite this to a filter
+ switch ($data['link_type']) {
+ case 'NORMAL':
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `clicks`=`clicks`+1 WHERE `id`=%s LIMIT 1",
+ array(bigintval($data['id'])), __FILE__, __LINE__);
+
+ // Update mediadata as well
+ if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) {
+ // Update database
+ updateMediadataEntry(array('total_clicks', 'normal_clicks'), 'add', 1);
+ } // END - if
+ break;
+
+ case 'BONUS':
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `clicks`=`clicks`+1 WHERE `id`=%s LIMIT 1",
+ array(bigintval($data['id'])), __FILE__, __LINE__);
+
+ // Update mediadata as well
+ if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) {
+ // Update database
+ updateMediadataEntry(array('total_clicks', 'bonus_clicks'), 'add', 1);
+ } // END - if
+ break;
+
+ default: // Unknown type
+ reportBug(__FILE__, __LINE__, 'Unknown mail type ' . $data['link_type'] . ' detected.');
+ break;
+ } // END - switch
+
+ // Only when user extension = v0.1.2: Update mails-confirmed counter
+ // @TODO Rewrite these blocks to filter
+ if (isExtensionInstalledAndNewer('user', '0.1.2')) {
+ // Update counter
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `mails_confirmed`=`mails_confirmed`+1 WHERE `userid`=%s LIMIT 1",
+ array(bigintval($data['userid'])), __FILE__, __LINE__);
+
+ // Update random confirmed as well?
+ if ((isExtensionInstalledAndNewer('user', '0.3.4')) && (isRandomReferralIdEnabled())) {
+ // Update second counter
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `rand_confirmed`=`rand_confirmed` + 1 WHERE `userid`=%s LIMIT 1",
+ array(bigintval($data['userid'])), __FILE__, __LINE__);
+ } // END - if
+ } // END - if
+
+ // Insert stats record
+ insertUserStatsRecord($data['userid'], $data['type'], $data['id']);
+
+ // Right code entered?
+ if (bigintval(postRequestElement('real_code_check')) == $data['real_code']) {
+ // Set HTTP status to okay
+ setHttpStatus('200 OK');
+
+ // Add points over referral system is the default
+ $template = 'mailid_points_done';
+
+ // Right code entered add points and remove entry
+ if (ifUserPointsLocked($data['userid'])) {
+ // Don't add points over the referral system
+ $template = 'mailid_points_locked';
+ } // END - if
+
+ // Count down ref_payout value
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=`ref_payout`-1 WHERE `userid`=%s AND `ref_payout` > 0 LIMIT 1",
+ array(bigintval($data['userid'])), __FILE__, __LINE__);
+
+ // Add points
+ initReferralSystem();
+ addPointsThroughReferralSystem('mailid_okay', $data['userid'], $data['payment']);
+
+ // Shall I add bonus points for "turbo clickers" ?
+ if (isExtensionInstalledAndNewer('bonus', '0.2.2')) {
+ // Is an active-rallye running and this is not a notification mail?
+ if ((isBonusRallyeActive()) && ($data['is_notify'] != 'Y')) {
+ // Shall I exclude the webmaster's own userid from the active-rallye?
+ if ((((getBonusUserid() == $data['userid']) && (isBonusIncludeOwnEnabled())) || (getBonusUserid() != $data['userid'])) && (getDefRefid() != $data['userid'])) {
+ // Add points and remember ranking are done in this function....
+ addTurboBonus($data['id'], $data['userid'], $data['type']);
+
+ // Set template to mailid_points_done2 which contains a link to the ranking list
+ $template = 'mailid_points_done2';
+
+ // Different template if user has some mails to confirm
+ if (ifUserPointsLocked($data['userid'])) {
+ $template = 'mailid_points_locked2';
+ } // END - if
+ } // END - if
+ } // END - if
+ } // END - if
+
+ // Load total points
+ $data['total_points'] = getTotalPoints($data['userid']);
+
+ // Load template
+ loadTemplate($template, FALSE, $data);
+ } elseif (isValidId($data['sender'])) {
+ // Wrong image code! So add points to sender's account
+ initReferralSystem();
+ addPointsThroughReferralSystem('mailid_payback', $data['sender'], $data['payment']);
+
+ // Load template
+ loadTemplate('mailid_points_failed', FALSE, $data);
+ } else {
+ // Load template
+ loadTemplate('mailid_points_failed2', FALSE, $data);
+ }
+
+ // Remove link from table
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `id`=%s LIMIT 1",
+ array(bigintval($data['link_id'])), __FILE__, __LINE__);
+}
+
+// Do call-back for 'img'
+function doMailIdImg ($data) {
+ // Generate image/code
+ generateImageOrCode($data['real_code']);
+}
+
+// Do call-back for 'confirm'
+function doMailIdConfirm ($data) {
+ // Is code valid?
+ if ($data['code'] > 0) {
+ // Export data into constants for the template
+ if (getCodeLength() > 0) {
+ // Generate Code
+ $data['image'] = generateCaptchaCode($data['code'], $data['type'], $data['id'], $data['userid']);
+ $templ = 'mailid_enter_code';
+ } else {
+ // Disabled code
+ $data['real_code'] = $realCode;
+ $templ = 'mailid_confirm_buttom';
+ }
+
+ // Load template
+ loadTemplate($templ, FALSE, $data);
+ } else {
+ // Cannot confirm!
+ reportBug(__FILE__, __LINE__, 'No code given.');
+ }
+}
+
+// Do call-back for 'top'
+function doMailIdTop ($data) {
+ /*
+ * Ok, all data is valid and loaded. Finally let's output the timer... :-)
+ * Export data into constants for the template
+ */
+ $data['tim2'] = strlen($data['time']);
+
+ // Load template
+ loadTemplate('mailid_timer', FALSE, $data);
+}
+
+// Call-back for 'frames'
+function doMailIdFrames ($data) {
+ // Load template
+ loadTemplate('mailid_frames', FALSE, $data);
+}
+
// [EOF]
?>
}
// Generate link to unconfirmed mails for admin
-function generateUnconfirmedAdminLink ($id, $unconfirmed, $type = 'bid') {
+function generateUnconfirmedAdminLink ($id, $unconfirmed, $type) {
// Init output
$OUT = $unconfirmed;
// Is there unconfirmed mails?
if ($unconfirmed > 0) {
// Add link to list_unconfirmed what-file
- $OUT = '<a href="{%url=modules.php?module=admin&what=list_unconfirmed&' . $type . '=' . $id . '%}">{%pipe,translateComma=' . $unconfirmed . '%}</a>';
+ $OUT = '<a href="{%url=modules.php?module=admin&what=list_unconfirmed&type=' . $type . '&id=' . $id . '%}">{%pipe,translateComma=' . $unconfirmed . '%}</a>';
} // END - if
// Return it
// Init counter for deleted mails
$count = '0';
-if (isGetRequestElementSet('mid')) {
+if ((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'normal')) {
// Load email data
$result = SQL_QUERY_ESC("SELECT `id`, `sender`, `subject`, `url`, `timestamp`, `cat_id`, `payment_id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1",
- array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
// Delete mail only once
if (SQL_NUMROWS($result) == 1) {
WHERE
s.`pool_id`=%s
LIMIT 1",
- array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result_pool) == 1) {
// Fetch stats id
list($stats_id) = SQL_FETCHROW($result_pool);
$links = countSumTotalData($stats_id, 'user_links', 'userid', 'stats_id', TRUE);
// Reset sent mails for recipient(s)
- reduceRecipientReceivedMails('stats_id', getRequestElement('mid'), $links);
+ reduceRecipientReceivedMails('stats_id', getRequestElement('id'), $links);
// Calc total points and pay them back
$totalPoints = $links * $content['price'];
$count += SQL_AFFECTEDROWS();
// Load template for link
- displayMessage('<a href="{%url=modules.php?module=admin&what=del_email&pid=' . bigintval(getRequestElement('mid')) . '%}">{--ADMIN_REMOVE_STATS_ENTRY--}</a>');
+ displayMessage('<a href="{%url=modules.php?module=admin&what=del_email&pid=' . bigintval(getRequestElement('id')) . '%}">{--ADMIN_REMOVE_STATS_ENTRY--}</a>');
} // END - if
// Free the result
// Delete mail from queue
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1",
- array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
$count += SQL_AFFECTEDROWS();
// Output link for manually removing stats entry
// Output message
displayMessage('{--ADMIN_USER_STATS_REMOVED--}');
-} elseif ((isGetRequestElementSet('bid')) && (isExtensionActive('bonus'))) {
+} elseif (((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'bonus')) && (isExtensionActive('bonus'))) {
// Load data from bonus mail
$result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp`, `mails_sent` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
- array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
// Delete mail only once
if (SQL_NUMROWS($result) == 1) {
$content = SQL_FETCHARRAY($result);
// Reset sent mails for recipient(s)
- reduceRecipientReceivedMails('bonus_id', getRequestElement('bid'), $content['mails_sent']);
+ reduceRecipientReceivedMails('bonus_id', getRequestElement('id'), $content['mails_sent']);
// Init counter for deleted mails
$count = '0';
// Delete bonus mail entirely from database
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
- array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
$count += SQL_AFFECTEDROWS();
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",
- array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
$count += SQL_AFFECTEDROWS();
// Prepare data for the template
} // END - if
// Form sent or anything else? ;-)
-if ((isFormSent()) && (isPostRequestElementSet('mid'))) {
+if ((isFormSent()) && (isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'normal')) {
// Make mail editable...
$result = SQL_QUERY_ESC('SELECT
`id`,
WHERE
`id`=%s
LIMIT 1',
- array(bigintval(postRequestElement('mid'))), __FILE__, __LINE__);
+ array(bigintval(postRequestElement('id'))), __FILE__, __LINE__);
// Fetch row
$content = SQL_FETCHARRAY($result);
// Load template
loadTemplate('admin_edit_email', FALSE, $content);
-} elseif (isGetRequestElementSet('mid')) {
+} elseif ((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'normal')) {
// Make also this email editable
$result = SQL_QUERY_ESC('SELECT
`id`,
WHERE
`id`=%s
LIMIT 1',
- array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
// Fetch row
$content = SQL_FETCHARRAY($result);
// Load template
loadTemplate('admin_edit_email', FALSE, $content);
-} elseif (isGetRequestElementSet('bid')) {
+} elseif ((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'bonus')) {
// Make also this email editable
$result = SQL_QUERY_ESC('SELECT
`id`,
WHERE
`id`=%s
LIMIT 1',
- array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
// Fetch row
$content = SQL_FETCHARRAY($result);
loadTemplate('admin_edit_bonus_email', FALSE, $content);
} elseif (isFormSent('do_edit')) {
// Save changes
- if (isPostRequestElementSet('mid')) {
+ if ((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'normal')) {
// Update pool
SQL_QUERY_ESC("UPDATE
`{?_MYSQL_PREFIX?}_pool`
postRequestElement('subject'),
postRequestElement('text'),
postRequestElement('url'),
- bigintval(postRequestElement('mid')),
+ bigintval(postRequestElement('id')),
), __FILE__, __LINE__);
if (!SQL_HASZEROAFFECTED()) {
} else {
$content = '<span class="bad">{--ADMIN_EMAIL_CHANGES_NOT_SAVED--}</span>';
}
- } elseif (isPostRequestElementSet('bid')) {
+ } elseif ((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'bonus')) {
// Update pool
SQL_QUERY_ESC("UPDATE
`{?_MYSQL_PREFIX?}_bonus`
postRequestElement('subject'),
postRequestElement('text'),
postRequestElement('url'),
- bigintval(postRequestElement('bid')),
+ bigintval(postRequestElement('id')),
), __FILE__, __LINE__);
if (!SQL_HASZEROAFFECTED()) {
SQL_FREERESULT($result_mails);
// Unconfirmed mails
- $pool['unconfirmed'] = generateUnconfirmedAdminLink($pool['id'], ($pool['max_rec'] - $pool['clicks']), 'mid');
+ $pool['unconfirmed'] = generateUnconfirmedAdminLink($pool['id'], ($pool['max_rec'] - $pool['clicks']), 'normal');
// Prepare data for the row template
$content['timestamp'] = generateDateTime($pool['timestamp'], 0);
// Normal mails ordered by your members
$sql = "SELECT
- `id`, `sender`, `subject`, `text`, `receivers`, `payment_id`, `data_type`, `timestamp`, `url`, `target_send`, `mails_sent`, `cat_id`
+ `id`,
+ `sender`,
+ `subject`,
+ `text`,
+ `receivers`,
+ `payment_id`,
+ `data_type`,
+ `timestamp`,
+ `url`,
+ `target_send`,
+ `mails_sent`,
+ `cat_id`
FROM
`{?_MYSQL_PREFIX?}_pool`
WHERE
$WHO = '';
$SQL2 = '';
-if (isGetRequestElementSet('mid')) {
+if ((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'normal')) {
// Only a specific mail shall be displayed
$sql = sprintf("SELECT
- `id`, `sender`, `subject`, `text`, `receivers`, `payment_id`, `data_type`, `timestamp`, `url`, `target_send`, `mails_sent`, `cat_id`
+ `id`,
+ `sender`,
+ `subject`,
+ `text`,
+ `receivers`,
+ `payment_id`,
+ `data_type`,
+ `timestamp`,
+ `url`,
+ `target_send`,
+ `mails_sent`,
+ `cat_id`
FROM
`{?_MYSQL_PREFIX?}_pool`
WHERE
`id`=%s
LIMIT 1",
- bigintval(getRequestElement('mid'))
+ bigintval(getRequestElement('id'))
);
- $WHO = '{--MAIL_ID--}' . ': ' . getRequestElement('mid');
+ $WHO = '{--MAIL_ID--}' . ': ' . getRequestElement('id');
} elseif (isGetRequestElementSet('userid')) {
// All mails by a specific member shall be displayed
$sql = sprintf("SELECT
- `id`, `sender`, `subject`, `text`, `receivers`, `payment_id`, `data_type`, `timestamp`, `url`, `target_send`, `mails_sent`, `cat_id`
+ `id`,
+ `sender`,
+ `subject`,
+ `text`,
+ `receivers`,
+ `payment_id`,
+ `data_type`,
+ `timestamp`,
+ `url`,
+ `target_send`,
+ `mails_sent`,
+ `cat_id`
FROM
`{?_MYSQL_PREFIX?}_pool`
WHERE
if ((isExtensionActive('bonus')) && (empty($WHO))) {
// Check for maximum pages
$result_bonus = SQL_QUERY("SELECT
- `id`, `subject`, `text`, `receivers`, `points`, `time`, `data_type`, `timestamp`, `url`, `cat_id`, `target_send`, `mails_sent`, `clicks`,
+ `id`,
+ `subject`,
+ `text`,
+ `receivers`,
+ `points`,
+ `time`,
+ `data_type`,
+ `timestamp`,
+ `url`,
+ `cat_id`,
+ `target_send`,
+ `mails_sent`,
+ `clicks`,
(`mails_sent` - `clicks`) AS `unconfirmed`
FROM
`{?_MYSQL_PREFIX?}_bonus`
} // END - if
// Add limitation to SQL string
-if (!isGetRequestElementSet('mid')) {
+if (!(isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'normal')) {
// Create limitation line
$add = ' LIMIT ' . (bigintval(getRequestElement('offset')) * bigintval(getRequestElement('page')) - bigintval(getRequestElement('offset'))) . ', ' . bigintval(getRequestElement('offset'));
SQL_FREERESULT($result_uncon);
// Unconfirmed mails
- $content['unconfirmed'] = generateUnconfirmedAdminLink($content['id'], ($content['unconfirmed']), 'mid');
+ $content['unconfirmed'] = generateUnconfirmedAdminLink($content['id'], ($content['unconfirmed']), 'normal');
// Prepare content
$content['timestamp'] = generateDateTime($content['timestamp'], 0);
$OUT = '';
while ($content = SQL_FETCHARRAY($result_bonus)) {
// Add link to list_unconfirmed what-file
- $content['unconfirmed'] = generateUnconfirmedAdminLink($content['id'], $content['unconfirmed']);
+ $content['unconfirmed'] = generateUnconfirmedAdminLink($content['id'], $content['unconfirmed'], 'bonus');
// Prepare content
$content['timestamp'] = generateDateTime($content['timestamp'], 0);
$OUT = ''; $content = array();
while ($content = SQL_FETCHARRAY($result_bonus)) {
// Add "unconfirmed-link"
- $content['unconfirmed_content'] = generateUnconfirmedAdminLink($content['id'], $content['unconfirmed']);
+ $content['unconfirmed_content'] = generateUnconfirmedAdminLink($content['id'], $content['unconfirmed'], 'bonus');
// Prepare content
$content['timestamp'] = generateDateTime($content['timestamp'], 0);
$sql = '';
// List confirmation links from normal or bonus mails
-if (isGetRequestElementSet('mid')) {
+if ((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'normal')) {
// SQL query for mail data
$sql = sprintf("SELECT
s.`id`,
WHERE
`p`.`id`=%s
LIMIT 1",
- bigintval(getRequestElement('mid'))
+ bigintval(getRequestElement('id'))
);
// Column, type and id for member's mail
// Load admin_list_unconfirmed template
$listed = TRUE;
- $DATA = getRequestElement('mid');
- $mailType = 'mailid';
-} elseif ((isGetRequestElementSet('bid')) && (isExtensionActive('bonus'))) {
+ $DATA = getRequestElement('id');
+} elseif (((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'bonus')) && (isExtensionActive('bonus'))) {
// @TODO This constant might be unused? define('__LIST_UNCON_TITLE', '{--ADMIN_LIST_UNCONFIRMED_BONUS_LINKS--}');
// SQL query for mail data (both ids are required for compatiblity to above normal mail
WHERE
`id`=%s
LIMIT 1",
- bigintval(getRequestElement('bid'))
+ bigintval(getRequestElement('id'))
);
// Column, type and id for member's mail
$col = 'bonus_id';
$type = 'BONUS';
- $ID = getRequestElement('bid');
+ $ID = getRequestElement('id');
// Load admin_list_unconfirmed template
$listed = TRUE;
$DATA = $ID;
- $mailType = 'bonusid';
} else {
// @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus
displayMessage('{--ADMIN_CALL_NOT_DIRECTLY--}');
// Prepare data for the row template
$row = array(
'userid' => $row['userid'],
- 'link' => $mailType,
+ 'type' => getRequestElement('type'),
'id' => $ID,
'email' => '<a href="' . generateEmailLink($row['email'], 'user_data') . '">{%pipe,translateGender=' . $row['gender'] . '%} ' . $row['surname'] . ' ' . $row['family'] . '</a>',
'status' => $row['status'],
// Load final template
loadTemplate('admin_list_unconfirmed', FALSE, $content);
- } elseif (getRequestElement('mid') > 0) {
+ } elseif (getRequestElement('id') > 0) {
// Data in pool or in user_stats not found, so let's find out where data is missing
if (countSumTotalData(bigintval($ID), 'pool', 'id', 'id', TRUE) == 1) {
// pool table
// both or link is invalid
displayMessage('{--ADMIN_UNCONFIRMED_INVALID_LINK--}');
}
- } elseif (isGetRequestElementSet('bid')) {
+ } elseif ((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'bonus')) {
// Data in bonus table not found
displayMessage('{--ADMIN_UNCONFIRMED_INVALID_LINK--}');
}
// Generate XHTML code for the CAPTCHA
function generateCaptchaCode ($code, $type, $urlId, $userid) {
- return '<img border="0" alt="Code ' . $code . '" src="{%url=mailid_top.php?userid=' . $userid . '&' . $type . '=' . $urlId . '&do=img&code=' . $code . '%}" />';
+ return '<img border="0" alt="Code ' . $code . '" src="{%url=mailid.php?userid=' . $userid . '&' . $type . '=' . $urlId . '&do=img&code=' . $code . '%}" />';
}
// Compiles the given HTML/mail code
// Helper function to create bonus mail admin links
function doTemplateAdminBonusMailLinks ($templateName, $clear, $bonusId) {
// Call the inner function
- return generateAdminMailLinks('bid', $bonusId);
+ return generateAdminMailLinks('bonus', $bonusId);
}
// Helper function to create member mail admin links
function doTemplateAdminMemberMailLinks ($templateName, $clear, $mailId) {
// Call the inner function
- return generateAdminMailLinks('mid', $mailId);
+ return generateAdminMailLinks('normal', $mailId);
}
// Helper function to create a selection box for YES/NO configuration entries
<?php
/************************************************************************
* Mailer v0.2.1-FINAL Start: 11/14/2003 *
- * =================== Last change: 11/25/2004 *
+ * =================== Last change: 01/10/2013 *
* *
* -------------------------------------------------------------------- *
* File : mailid.php *
// Tell everyone we are in this module
$GLOBALS['__module'] = 'mailid';
$GLOBALS['__output_mode'] = '0';
-$errorCode = '';
-// This is a frameset module
-$GLOBALS['frameset_mode'] = TRUE;
-
-// Disable copyright footer which would break the frameset
+// Disable copyright footer which would be to large for the upper frame
$GLOBALS['__copyright_enabled'] = 'N';
// Load the required file(s)
setContentType('text/html');
setHttpStatus('404 Not Found');
-// Is the extension active?
+// Is the extension mailid active?
redirectOnUninstalledExtension('mailid');
-// Init
-$userId = '0';
-$bonusId = '0';
-$mailId = '0';
+// Is the extension other active?
+redirectOnUninstalledExtension('other');
-// Secure all data
-if (isGetRequestElementSet('userid')) $userId = bigintval(getRequestElement('userid'));
-if (isGetRequestElementSet('mailid')) $mailId = bigintval(getRequestElement('mailid'));
-if (isGetRequestElementSet('bonusid')) $bonusId = bigintval(getRequestElement('bonusid'));
+// Init data
+$data = array(
+ 'error_code' => '0',
+ 'userid' => '0',
+ 'id' => '0',
+ 'code' => '0',
+ 'do' => 'frames',
+ 'type' => '',
+);
-if ((isValidId($userId)) && ((isValidId($mailId)) || (isValidId($bonusId))) && (!ifFatalErrorsDetected())) {
- // Init result
- $result_link = FALSE;
+// Secure all data
+if (isGetRequestElementSet('userid')) $data['userid'] = bigintval(getRequestElement('userid'));
+if (isGetRequestElementSet('id')) $data['id'] = bigintval(getRequestElement('id'));
+if (isGetRequestElementSet('code')) $data['code'] = bigintval(getRequestElement('code'));
+if (isGetRequestElementSet('do')) $data['do'] = getRequestElement('do');
+if (isGetRequestElementSet('type')) $data['type'] = getRequestElement('type');
+
+// @TODO Improve check on $data['type'], empty() is not very much ...
+if ((isValidId($data['userid'])) && (isValidId($data['id'])) && (!empty($data['type'])) && (!ifFatalErrorsDetected())) {
+ // No image?
+ if ($data['do'] != 'img') {
+ // ... then output header
+ loadIncludeOnce('inc/header.php');
+ } // END - fi
+
+ // Is 'do' still "frames"?
+ if ($data['do'] == 'frames') {
+ // This is a frameset module
+ $GLOBALS['frameset_mode'] = TRUE;
+ } // END - if
+
+ // Init result for below SQL_NUMROWS() function
+ $result_main = FALSE;
// Maybe he wants to confirm an email?
- if (isValidId($mailId)) {
- // Member mail
- $result_link = SQL_QUERY_ESC("SELECT `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1",
- array($mailId, $userId), __FILE__, __LINE__);
- $type = 'mailid';
- $urlId = $mailId;
- } elseif (isValidId($bonusId)) {
- // 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($bonusId, $userId), __FILE__, __LINE__);
- $type = 'bonusid';
- $urlId = $bonusId;
- } else {
- // Problem: No id entered
- redirectToUrl('modules.php?module=index');
- }
-
- if (SQL_NUMROWS($result_link) == 1) {
- // Load the entry
- list($ltype) = SQL_FETCHROW($result_link);
-
- // @TODO Rewrite this to a filter
- switch ($ltype) {
+ switch ($data['type']) {
+ case 'normal':
+ $result_main = SQL_QUERY_ESC("SELECT `id` AS `link_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1",
+ array($data['id'], $data['userid']), __FILE__, __LINE__);
+ break;
+
+ case 'bonus':
+ $result_main = SQL_QUERY_ESC("SELECT `id` AS `link_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1",
+ array($data['id'], $data['userid']), __FILE__, __LINE__);
+ break;
+
+ default: // Not detected
+ reportBug(__FILE__, __LINE__, 'No valid type=' . $data['type'] . ' set.');
+ break;
+ } // END - switch
+
+ // Is an entry found?
+ if (SQL_NUMROWS($result_main) == 1) {
+ // Is the stats id valid?
+ $data = merge_array($data, SQL_FETCHARRAY($result_main));
+
+ // Init result here with invalid to avoid possible missing variable
+ $result_mailid = FALSE;
+
+ // @TODO Rewrite this to a filter/function
+ switch ($data['link_type']) {
case 'NORMAL':
- // Is the stats id valid?
- $result = SQL_QUERY_ESC("SELECT `pool_id`, `url`, `subject` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1",
- array($mailId), __FILE__, __LINE__);
+ $result_mailid = SQL_QUERY_ESC("SELECT `pool_id`, `userid` AS `sender` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1",
+ array($data['id']), __FILE__, __LINE__);
break;
case 'BONUS':
- // Is the bonus extension active?
- redirectOnUninstalledExtension('bonus');
-
- // Bonus-Mails
- $result = SQL_QUERY_ESC("SELECT `id` AS `pool_id`, `url`, `subject` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
- array($bonusId), __FILE__, __LINE__);
+ $result_mailid = SQL_QUERY_ESC("SELECT `id` AS `pool_id`, `is_notify` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
+ array($data['id']), __FILE__, __LINE__);
break;
- default: // Invalid mail type
- reportBug(__FILE__, __LINE__, 'Invalid mail type ' . $ltype . ' detected.');
+ default: // Unknown type
+ reportBug(__FILE__, __LINE__, 'Unknown mail type ' . $data['link_type'] . ' detected.');
break;
} // END - switch
- if (SQL_NUMROWS($result) == 1) {
+ // Entry found?
+ if (SQL_NUMROWS($result_mailid) == 1) {
// Load data
- list($pool, $url, $title) = SQL_FETCHROW($result);
+ $data = merge_array($data, SQL_FETCHARRAY($result_mailid));
- // Free result
- SQL_FREERESULT($result);
+ // Correct notification switch in non-bonus mails
+ if ((!isset($data['is_notify'])) || (!in_array($data['is_notify'], array('Y', 'N')))) {
+ $data['is_notify'] = 'N';
+ } // END - if
- // Set it
- setExtraTitle($title);
+ // Set sender to 0 when we have a bonus mail
+ if ($data['link_type'] == 'BONUS') {
+ $data['sender'] = NULL;
+ } // END - if
- // Is the user's id unlocked?
- if (fetchUserData($userId)) {
- // Status must be CONFIRMED
+ // Is the user id valid?
+ if (fetchUserData($data['userid']) === TRUE) {
+ // Is the user status CONFIRMED?
if (getUserData('status') == 'CONFIRMED') {
- // Update last activity if not admin
- if ((!isAdmin()) || (isDebugModeEnabled())) {
- // Is not admin, so update last activity
- updateLastActivity($userId);
- } // END - if
-
// User has confirmed his account so we can procede...
// @TODO Rewrite this to a filter
- switch ($ltype) {
+ switch ($data['link_type']) {
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__);
+ array(bigintval($data['pool_id'])), __FILE__, __LINE__);
+
+ // Entry found?
if (SQL_NUMROWS($result) == 1) {
- list($pay) = SQL_FETCHROW($result);
- $time = getPaymentData($pay, 'time');
- $payment = getPaymentData($pay, 'payment');
+ $data = merge_array($data, SQL_FETCHARRAY($result));
+ $data['time'] = getPaymentData($data['payment_id'], 'time');
+ $data['payment'] = getPaymentData($data['payment_id'], 'payment');
$isValid = TRUE;
} // END - if
- // Free memory
+ // Free memory...
SQL_FREERESULT($result);
break;
case 'BONUS':
- $result = SQL_QUERY_ESC("SELECT `points`, `time` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
- array($bonusId), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT `time`, `points` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
+ array(bigintval($data['pool_id'])), __FILE__, __LINE__);
+
+ // Entry found?
if (SQL_NUMROWS($result) == 1) {
- list($points, $time) = SQL_FETCHROW($result);
- $payment = '0.00000';
+ $data = merge_array($data, SQL_FETCHARRAY($result));
$isValid = TRUE;
} // END - if
- // Free memory
+ // Free memory...
SQL_FREERESULT($result);
break;
- default: // Invalid mail type
- reportBug(__FILE__, __LINE__, 'Invalid mail type ' . $ltype . ' detected.');
+ default: // Unknown type
+ reportBug(__FILE__, __LINE__, 'Unknown mail type ' . $data['link_type'] . ' detected.');
break;
} // END - switch
- // Add header
- loadIncludeOnce('inc/header.php');
-
- // Was that mail a valid one?
+ // Is this entry valid?
if ($isValid === TRUE) {
- // If time is zero seconds we have a sponsor mail. 1 Second shall be set to avoid problems
- if (($time == '0') && ($payment > 0)) {
- $url = getUrl();
- $time = 1;
+ // Run at least one second
+ if (($data['time'] < 1) && ($data['payment'] > 0)) {
+ // Zero seconds is not supported
+ $data['time'] = 1;
} // END - if
- if (($time > 0) && (($payment > 0) || ($points > 0))) {
- // Set HTTP status to okay
- setHttpStatus('200 OK');
-
- // Export data into constants for the template
- $content = array(
- 'userid' => $userId,
- 'type' => $type,
- 'data' => $urlId,
- 'url' => $url
- );
+ // Is time and payment set?
+ if (($data['time'] > 0) && ($data['payment'] > 0)) {
+ $data['real_code'] = '0';
+ if (!empty($data['code'])) {
+ // Generate code (the user sees in the CAPTCHA)
+ $data['real_code'] = generateRandomCode(getCodeLength(), $data['code'], $data['userid'], $data['id']);
+ } // END - if
- // Load template
- loadTemplate('mailid_frames', FALSE, $content);
+ // Do the call-back by given data array
+ doMailIdCallback($data);
} else {
- $errorCode = getCode('DATA_INVALID');
+ $data['error_code'] = getCode('DATA_INVALID');
+ $data['do'] = 'failed';
}
} else {
- $errorCode = getCode('POSSIBLE_INVALID');
+ $data['error_code'] = getCode('POSSIBLE_INVALID');
+ $data['do'] = 'failed';
}
} else {
- $errorCode = getCode('ACCOUNT_' . strtoupper(getUserData('status')));
+ $data['error_code'] = getCode('ACCOUNT_' . strtoupper(getUserData('status')));
+ $data['do'] = 'failed';
}
} else {
- $errorCode = getCode('USER_404');
+ $data['error_code'] = getCode('USER_404');
+ $data['do'] = 'failed';
}
} else {
- $errorCode = getCode('STATS_404');
+ $data['error_code'] = getCode('STATS_404');
+ $data['do'] = 'failed';
}
+
+ // Free result
+ SQL_FREERESULT($result_mailid);
} else {
- $errorCode = getCode('ALREADY_CONFIRMED');
+ $data['error_code'] = getCode('ALREADY_CONFIRMED');
+ $data['do'] = 'failed';
}
// Free result
- SQL_FREERESULT($result_link);
+ SQL_FREERESULT($result_main);
+
+ // Insert footer if no image
+ if ($data['do'] != 'img') {
+ // Write footer
+ loadIncludeOnce('inc/footer.php');
+ } // END - if
} else {
- // Nothing entered
- $errorCode = getCode('ERROR_MAILID');
+ // Not all variables are set
+ $data['error_code'] = getCode('ERROR_MAILID');
}
// Error code is set?
-handleMailIdErrorCode($errorCode);
+handleMailIdErrorCode($data['error_code']);
-// Include footer
-loadIncludeOnce('inc/footer.php');
+// Really all done here... ;-)
+doShutdown();
// [EOF]
?>
<?php
-/************************************************************************
- * Mailer v0.2.1-FINAL Start: 11/14/2003 *
- * =================== Last change: 11/13/2004 *
- * *
- * -------------------------------------------------------------------- *
- * File : mailid_top.php *
- * -------------------------------------------------------------------- *
- * Short description : Confirmation file for emails *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : Bestaetigung von Mails *
- * -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
- * @TODO Merge this script with mailid.php *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team *
- * For more information visit: http://mxchange.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the Free Software *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
- * MA 02110-1301 USA *
- ************************************************************************/
-
-// Load security stuff here
-require('inc/libs/security_functions.php');
-
-// Init start time
-$GLOBALS['__start_time'] = microtime(TRUE);
-
-// Tell everyone we are in this module
-$GLOBALS['__module'] = 'mailid';
-$GLOBALS['__output_mode'] = '0';
-
-// Disable copyright footer which would be to large for the upper frame
-$GLOBALS['__copyright_enabled'] = 'N';
-
-// Load the required file(s)
-require('inc/config-global.php');
-
-// Set content type and HTTP status
-setContentType('text/html');
-setHttpStatus('404 Not Found');
-
-// Is the extension mailid active?
-redirectOnUninstalledExtension('mailid');
-
-// Is the extension other active?
-redirectOnUninstalledExtension('other');
-
-// Init variables
-$userId = '0';
-$bonusId = '0';
-$mailId = '0';
-$code = '0';
-$do = '';
-
-// Secure all data
-if (isGetRequestElementSet('userid')) $userId = bigintval(getRequestElement('userid'));
-if (isGetRequestElementSet('mailid')) $mailId = bigintval(getRequestElement('mailid'));
-if (isGetRequestElementSet('bonusid')) $bonusId = bigintval(getRequestElement('bonusid'));
-if (isGetRequestElementSet('code')) $code = bigintval(getRequestElement('code'));
-if (isGetRequestElementSet('do')) $do = getRequestElement('do');
-
-if ((isValidId($userId)) && ((isValidId($mailId)) || (isValidId($bonusId))) && (!ifFatalErrorsDetected())) {
- // No image?
- if ($do != 'img') {
- // ... then output header
- loadIncludeOnce('inc/header.php');
- } // END - fi
-
- // Maybe he wants to confirm an email?
- if (isValidId($mailId)) {
- $result_main = SQL_QUERY_ESC("SELECT `id` AS `link_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1",
- array($mailId, $userId), __FILE__, __LINE__);
- $type = 'mailid';
- $urlId = $mailId;
- } elseif (isValidId($bonusId)) {
- $result_main = SQL_QUERY_ESC("SELECT `id` AS `link_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1",
- array($bonusId, $userId), __FILE__, __LINE__);
- $type = 'bonusid';
- $urlId = $bonusId;
- } else {
- // Not detected
- reportBug(__FILE__, __LINE__, 'Whether bonusid or mailid was set. This is a strange bug.');
- }
-
- // Is an entry found?
- if (SQL_NUMROWS($result_main) == 1) {
- // Is the stats id valid?
- $data = SQL_FETCHARRAY($result_main);
-
- // Init result here with invalid to avoid possible missing variable
- $result_mailid = FALSE;
-
- // @TODO Rewrite this to a filter/function
- switch ($data['link_type']) {
- case 'NORMAL':
- $result_mailid = SQL_QUERY_ESC("SELECT `pool_id`, `userid` AS `sender` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1",
- array($urlId), __FILE__, __LINE__);
- break;
-
- case 'BONUS':
- $result_mailid = SQL_QUERY_ESC("SELECT `id` AS `pool_id`, `is_notify` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
- array($urlId), __FILE__, __LINE__);
- break;
-
- default: // Unknown type
- reportBug(__FILE__, __LINE__, 'Unknown mail type ' . $data['link_type'] . ' detected.');
- break;
- } // END - switch
-
- // Entry found?
- if (SQL_NUMROWS($result_mailid) == 1) {
- // Load data
- $data = merge_array($data, SQL_FETCHARRAY($result_mailid));
-
- // Correct notification switch in non-bonus mails
- if ((!isset($data['is_notify'])) || (!in_array($data['is_notify'], array('Y', 'N')))) {
- $data['is_notify'] = 'N';
- } // END - if
-
- // Set sender to 0 when we have a bonus mail
- if ($data['link_type'] == 'BONUS') {
- $data['sender'] = NULL;
- } // END - if
-
- // Is the user id valid?
- if (fetchUserData($userId) === TRUE) {
- // Is the user status CONFIRMED?
- if (getUserData('status') == 'CONFIRMED') {
- // User has confirmed his account so we can procede...
- // @TODO Rewrite this to a filter
- switch ($data['link_type']) {
- case 'NORMAL':
- $result = SQL_QUERY_ESC("SELECT `payment_id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1",
- array(bigintval($data['pool_id'])), __FILE__, __LINE__);
-
- // Entry found?
- if (SQL_NUMROWS($result) == 1) {
- list($paymentId) = SQL_FETCHROW($result);
- $time = getPaymentData($paymentId, 'time');
- $payment = getPaymentData($paymentId, 'payment');
- $isValid = TRUE;
- } // END - if
-
- // Free memory...
- SQL_FREERESULT($result);
- break;
-
- case 'BONUS':
- $result = SQL_QUERY_ESC("SELECT `time`, `points` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
- array(bigintval($data['pool_id'])), __FILE__, __LINE__);
-
- // Entry found?
- if (SQL_NUMROWS($result) == 1) {
- list($time, $payment) = SQL_FETCHROW($result);
- $isValid = TRUE;
- } // END - if
-
- // Free memory...
- SQL_FREERESULT($result);
- break;
-
- default: // Unknown type
- reportBug(__FILE__, __LINE__, 'Unknown mail type ' . $data['link_type'] . ' detected.');
- break;
- } // END - switch
-
- // Is this entry valid?
- if ($isValid === TRUE) {
- // Run at least one second
- if (($time == '0') && ($payment > 0)) $time = 1;
-
- // Is time and payment set?
- if (($time > 0) && ($payment > 0)) {
- $realCode = '0';
- if (!empty($code)) {
- // Generate code (the user sees in the CAPTCHA)
- $realCode = generateRandomCode(getCodeLength(), $code, $userId, $urlId);
- } // END - if
-
- // @TODO Rewrite this to a filter
- switch ($do) {
- case 'add':
- // Init stats data
- $stats_data = '0';
-
- // Count clicks
- // @TODO Rewrite this to a filter
- switch ($data['link_type']) {
- case 'NORMAL':
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `clicks`=`clicks`+1 WHERE `id`=%s LIMIT 1",
- array($mailId), __FILE__, __LINE__);
-
- // Update mediadata as well
- if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) {
- // Update database
- updateMediadataEntry(array('total_clicks', 'normal_clicks'), 'add', 1);
- } // END - if
- $stats_data = $mailId;
- break;
-
- case 'BONUS':
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `clicks`=`clicks`+1 WHERE `id`=%s LIMIT 1",
- array($bonusId), __FILE__, __LINE__);
-
- // Update mediadata as well
- if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) {
- // Update database
- updateMediadataEntry(array('total_clicks', 'bonus_clicks'), 'add', 1);
- } // END - if
- $stats_data = $bonusId;
- break;
-
- default: // Unknown type
- reportBug(__FILE__, __LINE__, 'Unknown mail type ' . $data['link_type'] . ' detected.');
- break;
- } // END - switch
-
- // Export data into constants for the template
- $content['banner'] = loadTemplate('mailid_banner', TRUE);
-
- // Only when user extension = v0.1.2: Update mails-confirmed counter
- // @TODO Rewrite these blocks to filter
- if (isExtensionInstalledAndNewer('user', '0.1.2')) {
- // Update counter
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `mails_confirmed`=`mails_confirmed`+1 WHERE `userid`=%s LIMIT 1",
- array($userId), __FILE__, __LINE__);
-
- // Update random confirmed as well?
- if ((isExtensionInstalledAndNewer('user', '0.3.4')) && (isRandomReferralIdEnabled())) {
- // Update second counter
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `rand_confirmed`=`rand_confirmed` + 1 WHERE `userid`=%s LIMIT 1",
- array($userId), __FILE__, __LINE__);
- } // END - if
- } // END - if
-
- // Insert stats record
- insertUserStatsRecord($userId, $type, $stats_data);
-
- // Right code entered?
- if (bigintval(postRequestElement('gfx_check')) == $realCode) {
- // Set HTTP status to okay
- setHttpStatus('200 OK');
-
- // Add points over referral system is the default
- $template = 'mailid_points_done';
-
- // Right code entered add points and remove entry
- if (ifUserPointsLocked($userId)) {
- // Don't add points over the referral system
- $template = 'mailid_points_locked';
- } // END - if
-
- // Count down ref_payout value
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=`ref_payout`-1 WHERE `userid`=%s AND `ref_payout` > 0 LIMIT 1",
- array($userId), __FILE__, __LINE__);
-
- // Add points
- initReferralSystem();
- addPointsThroughReferralSystem('mailid_okay', $userId, $payment);
-
- // Shall I add bonus points for "turbo clickers" ?
- if (isExtensionInstalledAndNewer('bonus', '0.2.2')) {
- // Is an active-rallye running and this is not a notification mail?
- if ((isBonusRallyeActive()) && ($data['is_notify'] != 'Y')) {
- // Shall I exclude the webmaster's own userid from the active-rallye?
- if ((((getBonusUserid() == $userId) && (isBonusIncludeOwnEnabled())) || (getBonusUserid() != $userId)) && (getDefRefid() != $userId)) {
- // Add points and remember ranking are done in this function....
- addTurboBonus($urlId, $userId, $type);
-
- // Set template to mailid_points_done2 which contains a link to the ranking list
- $template = 'mailid_points_done2';
-
- // Different template if user has some mails to confirm
- if (ifUserPointsLocked($userId)) {
- $template = 'mailid_points_locked2';
- } // END - if
-
- // Assign more data for the template
- $content['userid'] = $userId;
- $content['type'] = $type;
- $content['data'] = $urlId;
- } // END - if
- } // END - if
- } // END - if
-
- // Load total points
- $content['total_points'] = getTotalPoints($userId);
-
- // Add payment points
- $content['points'] = $payment;
-
- // Load template
- loadTemplate($template, FALSE, $content);
- } elseif (isValidId($data['sender'])) {
- // Wrong image code! So add points to sender's account
- initReferralSystem();
- addPointsThroughReferralSystem('mailid_payback', $data['sender'], $payment);
-
- // Add payment points
- $content['points'] = $payment;
-
- // Load template
- loadTemplate('mailid_points_failed', FALSE, $content);
- } else {
- // Add payment points (again)
- $content['points'] = $payment;
-
- // Load template
- loadTemplate('mailid_points_failed2', FALSE, $content);
- }
-
- // Remove link from table
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `id`=%s LIMIT 1",
- array(bigintval($data['link_id'])), __FILE__, __LINE__);
- break;
-
- case 'img':
- generateImageOrCode($realCode);
- break;
-
- case 'confirm':
- if ($code > 0) {
- // Export data into constants for the template
- $content['code'] = $code;
- $content['userid'] = $userId;
- $content['type'] = $type;
- $content['data'] = $urlId;
- $content['banner'] = loadTemplate('mailid_banner', TRUE);
- if (getCodeLength() > 0) {
- // Generate Code
- $content['image'] = generateCaptchaCode($code, $type, $urlId, $userId);
- $templ = 'mailid_enter_code';
- } else {
- // Disabled code
- $content['gfx'] = $realCode;
- $templ = 'mailid_confirm_buttom';
- }
-
- // Load template
- loadTemplate($templ, FALSE, $content);
- } else {
- // Cannot confirm!
- reportBug(__FILE__, __LINE__, 'No code given.');
- }
- break;
-
- case '':
- // Ok, all data is valid and loaded. Finally let's output the timer... :-)
- // Export data into constants for the template
- $content['time'] = $time;
- $content['tim2'] = strlen($time);
- $content['userid'] = $userId;
- $content['type'] = $type;
- $content['data'] = $urlId;
- $content['banner'] = loadTemplate('mailid_banner', TRUE);
-
- // Load template
- loadTemplate('mailid_timer', FALSE, $content);
- break;
-
- default: // Unknown mode
- reportBug(__FILE__, __LINE__, 'Unknown mode ' . $do . ' detected.');
- break;
- } // END - switch
- } else {
- loadTemplate('admin_settings_unsaved', FALSE, '{--MAIL_ALREADY_CONFIRMED--} (6)');
- $do = 'failed';
- }
- } else {
- loadTemplate('admin_settings_unsaved', FALSE, '{--MAIL_ALREADY_CONFIRMED--} (5)');
- $do = 'failed';
- }
- } else {
- loadTemplate('admin_settings_unsaved', FALSE, '{--MAIL_ALREADY_CONFIRMED--} (4)');
- $do = 'failed';
- }
- } else {
- loadTemplate('admin_settings_unsaved', FALSE, '{--MAIL_ALREADY_CONFIRMED--} (3)');
- $do = 'failed';
- }
- } else {
- loadTemplate('admin_settings_unsaved', FALSE, '{--MAIL_ALREADY_CONFIRMED--} (2)');
- $do = 'failed';
- }
-
- // Free result
- SQL_FREERESULT($result_mailid);
- } else {
- loadTemplate('admin_settings_unsaved', FALSE, '{--MAIL_ALREADY_CONFIRMED--} (1)');
- $do = 'failed';
- }
-
- // Free result
- SQL_FREERESULT($result_main);
-
- // Insert footer if no image
- if ($do != 'img') {
- // Write footer
- loadIncludeOnce('inc/footer.php');
- } // END - if
-}
-
-// Really all done here... ;-)
-doShutdown();
-
-// [EOF]
+// @DEPRECATED
?>
Hinweis: Angesammelte {?POINTS?} können versteigert oder verkauft werden, jedoch muß der Käufer bei {?MAIN_TITLE?} Mitglied sein oder werden.
Um Ihre {%pipe,translateComma=$content[points]%} {?POINTS?} gutgeschrieben zu bekommen, klicken Sie bitte auf folgenden Link:
-{?URL?}/mailid.php?userid=$userid&bonusid=$content[id]
+{?URL?}/mailid.php?userid=$userid&type=bonus&id=$content[id]
Wichtig! Achten Sie darauf das Ihr Mailserver immer empfangbereit ist. Sollte Ihr Mailserver nicht empfangbereit sein (z.B. voll usw.), werden wir Ihren Account sperren! Sie haben nun innerhalb von 10 Tagen die möglichkeit sich bei uns zu melden zwecks Freischaltung, erfolgt dieses nicht, wird Ihr Account gelöscht! Bei dieser Sperrung erhalten Sie von uns keine Mitteilung, sollten Sie keine Mails von uns bekommen, prüfen Sie Ihren Account!
----------------
Hinweis: Angesammelte {?POINTS?} können versteigert oder verkauft werden, jedoch muß der Käufer bei {?MAIN_TITLE?} Mitglied sein oder werden.
Um Ihre {%pipe,translateComma=$content[points]%} {?POINTS?} gutgeschrieben zu bekommen, klicken Sie bitte auf folgenden Link:
-{?URL?}/mailid.php?userid=$userid&mailid=$content[id]
+{?URL?}/mailid.php?userid=$userid&type=normal&id=$content[id]
Wichtig! Achten Sie darauf das Ihr Mailserver immer empfangbereit ist. Sollte Ihr Mailserver nicht empfangbereit sein (z.B. voll usw.), werden wir Ihren Account sperren! Sie haben nun innerhalb von 10 Tagen die möglichkeit sich bei uns zu melden zwecks Freischaltung, erfolgt dieses nicht, wird Ihr Account gelöscht! Bei dieser Sperrung erhalten Sie von uns keine Mitteilung, sollten Sie keine Mails von uns bekommen, prüfen Sie Ihren Account!
----------------
</div>
<div>
[<a
- href="{%url=modules.php?module=admin&what=edit_emails&bid=$content[id]%}">{--ADMIN_EDIT_BONUS_MAIL_LINK--}</a>|<a
- href="{%url=modules.php?module=admin&what=del_email&bid=$content[id]%}">{--ADMIN_DELETE_BONUS_MAIL_LINK--}</a>]
+ href="{%url=modules.php?module=admin&what=edit_emails&type=bonus&id=$content[id]%}">{--ADMIN_EDIT_BONUS_MAIL_LINK--}</a>|<a
+ href="{%url=modules.php?module=admin&what=del_email&type=bonus&id=$content[id]%}">{--ADMIN_DELETE_BONUS_MAIL_LINK--}</a>]
</div>
</div>
</div>
<div>
[<a
- href="{%url=modules.php?module=admin&what=edit_emails&mid=$content[id]%}">{--ADMIN_EDIT_POOL_MAIL_LINK--}</a>|<a
- href="{%url=modules.php?module=admin&what=del_email&mid=$content[id]%}">{--ADMIN_DELETE_POOL_MAIL_LINK--}</a>]
+ href="{%url=modules.php?module=admin&what=edit_emails&type=normal&id=$content[id]%}">{--ADMIN_EDIT_POOL_MAIL_LINK--}</a>|<a
+ href="{%url=modules.php?module=admin&what=del_email&type=normal&id=$content[id]%}">{--ADMIN_DELETE_POOL_MAIL_LINK--}</a>]
</div>
</div>
<tr>
<td align="center" class="{%template,ColorSwitch%} bottom right">{%pipe,generateUserProfileLink=$content[userid]%}</td>
<td align="center" class="{%template,ColorSwitch%} bottom right">
- <a href="{%url=mailid.php?userid=$content[userid]&$content[link]=$content[id]%}" target="_blank">{--CLICK_NOW--}</a>
+ <a href="{%url=mailid.php?userid=$content[userid]&type=$content[type]&id=$content[id]%}" target="_blank">{--CLICK_NOW--}</a>
</td>
<td class="{%template,ColorSwitch%} bottom right">$content[email]</td>
<td align="center" class="{%template,ColorSwitch%} bottom">{%user,status,translateUserStatus=$content[userid]%}</td>
<table border="0" cellspacing="0" cellpadding="0" class="mailid_table">
<tr>
<td width="220" align="center">
- {%form,formMethodPost=mailid_top.php?userid=$content[userid]&$content[type]=$content[data]&do=add&code=$content[code]%}
+ {%form,formMethodPost=mailid.php?userid=$content[userid]&type=$content[type]&id=$content[id]&do=add&code=$content[code]%}
{--MEMBER_MAILID_CLICK_BUTTON--}:<br />
- <input type="hidden" name="gfx_check" value="$content[gfx]" />
+ <input type="hidden" name="real_code_check" value="$content[real_code]" />
<input type="submit" class="form_submit" name="ok" value="{--MEMBER_SUBMIT_CODE--}" />
{%form_close%}
</td>
<table border="0" cellspacing="0" cellpadding="0" class="mailid_table">
<tr>
<td width="220" align="center">
- {%form,formMethodPost=mailid_top.php?userid=$content[userid]&$content[type]=$content[data]&do=add&code=$content[code]%}
+ {%form,formMethodPost=mailid.php?userid=$content[userid]&type=$content[type]&id=$content[id]&do=add&code=$content[code]%}
{--MEMBER_ENTER_CODE--}:
$content[image]<br />
- <input type="text" class="form_field" name="gfx_check" size="5" maxlength="45" />
+ <input type="text" class="form_field" name="real_code_check" size="5" maxlength="45" />
<input type="submit" class="form_submit" name="ok" value="{--MEMBER_SUBMIT_CODE--}" />
{%form_close%}
</td>
<frameset rows="120,*" frameborder="no" framespacing="0" border="0">
- <frame name="mailid_top" src="{%url=mailid_top.php?userid=$content[userid]&$content[type]=$content[data]%}" />
+ <frame name="mailid_top" src="{%url=mailid.php?userid=$content[userid]&type=$content[type]&id=$content[id]%}&do=top" />
<frame name="mailid_url" src="{%pipe,generateDereferrerUrl=$content[url]%}" />
</frameset>
<noframes>
<table border="0" cellspacing="0" cellpadding="0" class="mailid_table">
<tr>
<td width="220" align="center">
- {%message,MEMBER_THANX_POINTS_ADDED=$content[points]%}<br />
+ {%message,MEMBER_THANX_POINTS_ADDED=$content[payment]%}<br />
{%message,MEMBER_MAILID_TOTAL_POINTS=$content[total_points]%}
</td>
<td align="center">
<tr>
<td width="220" align="center">
<div class="tiny">
- {%message,MEMBER_THANX_POINTS_ADDED=$content[points]%}<br />
+ {%message,MEMBER_THANX_POINTS_ADDED=$content[payment]%}<br />
{%message,MEMBER_MAILID_TOTAL_POINTS=$content[total_points]%}<br />
<br />
- <a href="{%url=show_bonus.php?userid=$content[userid]&t=$content[type]&d=$content[data]%}" target="_blank">{--MEMBER_SHOW_TURBO_BONUS_LINK--}
+ <a href="{%url=show_bonus.php?userid=$content[userid]&t=$content[type]&d=$content[id]%}" target="_blank">{--MEMBER_SHOW_TURBO_BONUS_LINK--}
</div>
</td>
<td align="center">
<table border="0" cellspacing="0" cellpadding="0" class="mailid_table">
<tr>
<td width="220" align="center">
- {%message,MEMBER_POINTS_NOT_ADDED=$content[points]%}
+ {%message,MEMBER_POINTS_NOT_ADDED=$content[payment]%}
</td>
<td align="center">
<div class="banner dashed">
<table border="0" cellspacing="0" cellpadding="0" class="mailid_table">
<tr>
<td width="220" align="center">
- {%message,MEMBER_POINTS_NOT_ADDED2=$content[points]%}
+ {%message,MEMBER_POINTS_NOT_ADDED2=$content[payment]%}
</td>
<td align="center">
<div class="banner dashed">
<table border="0" cellspacing="0" cellpadding="0" class="mailid_table">
<tr>
<td width="220" align="center">
- {%message,MEMBER_THANX_POINTS_LOCKED=$content[points]%}
+ {%message,MEMBER_THANX_POINTS_LOCKED=$content[payment]%}
</td>
<td align="center">
<div class="banner dashed">
<tr>
<td width="220" align="center">
<div class="tiny">
- {%message,MEMBER_THANX_POINTS_LOCKED=$content[points]%}<br />
+ {%message,MEMBER_THANX_POINTS_LOCKED=$content[payment]%}<br />
<br />
- <a href="{%url=show_bonus.php?userid=$content[userid]&t=$content[type]&d=$content[data]%}" target="_blank">{--MEMBER_SHOW_TURBO_BONUS_LINK--}
+ <a href="{%url=show_bonus.php?userid=$content[userid]&t=$content[type]&d=$content[id]%}" target="_blank">{--MEMBER_SHOW_TURBO_BONUS_LINK--}
</div>
</td>
<td align="center">
document.confirm.counter.value = timer;
if (timer == 0) {
clearInterval(Counter);
- document.location.href = '{%url,js=mailid_top.php?userid=$content[userid]&$content[type]=$content[data]&do=confirm&code={%pipe,getRandomTan%}%}';
+ document.location.href = '{%url,js=mailid.php?userid=$content[userid]&type=$content[type]&id=$content[id]&do=confirm&code={%pipe,getRandomTan%}%}';
}
}
//-->
<tr>
<td width="45%" align="center" class="switch_sw2 bottom right">{--CONFIRM_LINK--}:</td>
<td width="55%" align="center" class="switch_sw2 bottom">
- [<a href="{%url=mailid.php?userid=$content[userid]&bonusid=$content[id]%}" target="_blank" title="{--CONFIRM_LINK--}">$content[id]</a>]
+ [<a href="{%url=mailid.php?userid=$content[userid]&type=bonus&id=$content[id]%}" target="_blank" title="{--CONFIRM_LINK--}">$content[id]</a>]
</td>
</tr>
<tr>
<tr>
<td width="45%" align="center" class="switch_sw2 bottom right">{--CONFIRM_LINK--}:</td>
<td width="55%" align="center" class="switch_sw2 bottom">
- [<a href="{%url=mailid.php?userid=$content[userid]&mailid=$content[id]%}" target="_blank" title="{--CONFIRM_LINK--}">$content[id]</a>]
+ [<a href="{%url=mailid.php?userid=$content[userid]&type=normal&id=$content[id]%}" target="_blank" title="{--CONFIRM_LINK--}">$content[id]</a>]
</td>
</tr>
<tr>