]> git.mxchange.org Git - mailer.git/commitdiff
Theoretical working merge of mailid.php and mailid_top.php into mailid.php + a couple...
authorRoland Häder <roland@mxchange.org>
Thu, 10 Jan 2013 04:29:42 +0000 (04:29 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 10 Jan 2013 04:29:42 +0000 (04:29 +0000)
37 files changed:
DOCS/TODOs.txt
DOCS/de/SECURITY.txt
DOCS/en/SECURITY.txt
inc/extensions/ext-bonus.php
inc/extensions/ext-mailid.php
inc/filter/bonus_filter.php
inc/filters.php
inc/functions.php
inc/libs/bonus_functions.php
inc/libs/mailid_functions.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-del_email.php
inc/modules/admin/what-edit_emails.php
inc/modules/admin/what-email_archiv.php
inc/modules/admin/what-email_details.php
inc/modules/admin/what-list_notifications.php
inc/modules/admin/what-list_unconfirmed.php
inc/template-functions.php
mailid.php
mailid_top.php
templates/de/emails/member/member_bonus_pool_normal.tpl
templates/de/emails/member/member_user_pool_normal.tpl
templates/de/html/admin/admin_links_bonus_mail.tpl
templates/de/html/admin/admin_links_send_pool_mail.tpl
templates/de/html/admin/admin_list_unconfirmed_row.tpl
templates/de/html/mailid/mailid_confirm_buttom.tpl
templates/de/html/mailid/mailid_enter_code.tpl
templates/de/html/mailid/mailid_frames.tpl
templates/de/html/mailid/mailid_points_done.tpl
templates/de/html/mailid/mailid_points_done2.tpl
templates/de/html/mailid/mailid_points_failed.tpl
templates/de/html/mailid/mailid_points_failed2.tpl
templates/de/html/mailid/mailid_points_locked.tpl
templates/de/html/mailid/mailid_points_locked2.tpl
templates/de/html/mailid/mailid_timer.tpl
templates/de/html/member/member_mail_bonus_send.tpl
templates/de/html/member/member_mail_normal_send.tpl

index 0d50e6453b5b45bb52110ad2c19e5106b54fb0d7..883f576a8ccc7029f78828d6b56b7b6e45d764ed 100644 (file)
 ./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&amp;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 //-->
index 507e45c13b237c3e2cd74255724d39166096cdbb..dab710d70c9b3067674d3d26af5351f9c5aa4c3e 100644 (file)
@@ -66,11 +66,11 @@ Mitglieder muessen weiterhin einmal einen Button anklicken.
 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
index c97fbb19537685cfb3fc1e9f330f075b897deef2..5e50920a03d9baf7f7c0dcbd39dcd7b568ded5cb 100644 (file)
@@ -61,11 +61,11 @@ umstellen.
 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
index 49ec750262b96147630b88fbd7a263cc0111d507..e39673bc6fc78470a81a1d9b6d13d0d2f116062e 100644 (file)
@@ -151,8 +151,8 @@ INDEX (`cat_id`)",
                                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,
@@ -656,6 +656,9 @@ ORDER BY
                                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());
 
index 7fc1afa2949fe8c63e15950317487c6a9b8676a2..5eb83b869b5355f74b7b358c8a2e8ac8ae64a3e4 100644 (file)
@@ -84,7 +84,7 @@ switch (getExtensionMode()) {
 
                        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
@@ -134,7 +134,7 @@ switch (getExtensionMode()) {
 
                        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&uuml;hrt.");
+                               setExtensionUpdateNotes("Sicherheitsupdate an den Scripten <u>mailid.php</u> und <span class=\"data\">mailid.php</span> durchgef&uuml;hrt.");
                                break;
 
                        case '0.1.5': // SQL queries for v0.1.5
@@ -179,7 +179,7 @@ switch (getExtensionMode()) {
 
                        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&uuml;hrten somit zu Fehlern.");
+                               setExtensionUpdateNotes("Modul <span class=\"data\">mailid</span> war nicht gesetzt. Dadurch wurden die URLs (loader z.B.) umgeschrieben und f&uuml;hrten somit zu Fehlern.");
                                break;
 
                        case '0.2.4': // SQL queries for v0.2.4
@@ -199,7 +199,7 @@ switch (getExtensionMode()) {
 
                        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
@@ -209,7 +209,7 @@ switch (getExtensionMode()) {
 
                        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&auml;ndert.");
+                               setExtensionUpdateNotes("<span class=\"data\">Code wiederholen</span> nach <span class=\"data\">Code eingeben</span> hin ge&auml;ndert.");
                                break;
 
                        case '0.3.0': // SQL queries for v0.3.0
@@ -219,12 +219,12 @@ switch (getExtensionMode()) {
 
                        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&ouml;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&ouml;schen. Noices fixed.");
+                               setExtensionUpdateNotes("Bitte das Template <span class=\"bad data\">{?PATH?}/templates/de/html/mailid/mailid_points_lcoked2.tpl</span> l&ouml;schen. Noices fixed.");
                                break;
 
                        case '0.3.3': // SQL queries for v0.3.3
index c3ffe6d002e5d00f5a6758d1cb744faee01ab350..d3c6a81e7ff48b75757c507c513d02c5d2555a22 100644 (file)
@@ -88,8 +88,8 @@ LIMIT 1',
 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
index 37e297e2bca137534c339a3496b3af0887ed89a2..bd13ad80440f7e45cb287ebc1b494d0bbe91bb04 100644 (file)
@@ -1150,8 +1150,8 @@ function FILTER_EXTENSION_MARK_INSTALLED ($filterData) {
 
 // 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
index f6ac2194357cfcb8571d22c387a6441202881309..2d1db00eaec4fdbc81942671c27c0254883e1133 100644 (file)
@@ -2140,7 +2140,7 @@ function capitalizeUnderscoreString ($str) {
 }
 
 // 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 = '';
@@ -2152,11 +2152,11 @@ function generateAdminMailLinks ($mailType, $mailId) {
 
        // 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;
 
index e1e6fee8762ac691aa8394b39ce3ee945073eebb..4c02b5743af86e506ecdea5ff38d365d8537fafa 100644 (file)
@@ -41,25 +41,28 @@ if (!defined('__SECURITY')) {
 } // 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:
@@ -74,7 +77,7 @@ function addTurboBonus ($mid, $userid, $type) {
        } // 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) {
@@ -103,12 +106,13 @@ function addTurboBonus ($mid, $userid, $type) {
        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
index 071665144c39bffeb09f7dbc6087e058b809fd8f..da8cd7350ac4f413848e16dbb08b1c68ddeb99d9 100644 (file)
@@ -68,5 +68,188 @@ function handleMailIdErrorCode ($errorCode) {
        } // 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]
 ?>
index 8be13d2e1652d116158aa7125d7a0872524d4fb8..209319c84d6680abe0ac4131c4fb47004398cb95 100644 (file)
@@ -1396,14 +1396,14 @@ function doVerifyExpertSettings () {
 }
 
 // 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&amp;what=list_unconfirmed&amp;' . $type . '=' . $id . '%}">{%pipe,translateComma=' . $unconfirmed . '%}</a>';
+               $OUT = '<a href="{%url=modules.php?module=admin&amp;what=list_unconfirmed&amp;type=' . $type . '&amp;id=' . $id . '%}">{%pipe,translateComma=' . $unconfirmed . '%}</a>';
        } // END - if
 
        // Return it
index 06e2da757c59ef4356158c43f45339e8e8bcfcf3..1ffcee889cc0b3fc3cc9c9c002487c0481c507a5 100644 (file)
@@ -46,10 +46,10 @@ addYouAreHereLink('admin', __FILE__);
 // 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) {
@@ -82,7 +82,7 @@ ON
 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);
@@ -91,7 +91,7 @@ LIMIT 1",
                        $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'];
@@ -131,7 +131,7 @@ LIMIT 1",
                        $count += SQL_AFFECTEDROWS();
 
                        // Load template for link
-                       displayMessage('<a href="{%url=modules.php?module=admin&amp;what=del_email&amp;pid=' . bigintval(getRequestElement('mid')) . '%}">{--ADMIN_REMOVE_STATS_ENTRY--}</a>');
+                       displayMessage('<a href="{%url=modules.php?module=admin&amp;what=del_email&amp;pid=' . bigintval(getRequestElement('id')) . '%}">{--ADMIN_REMOVE_STATS_ENTRY--}</a>');
                } // END - if
 
                // Free the result
@@ -139,7 +139,7 @@ LIMIT 1",
 
                // 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
@@ -158,10 +158,10 @@ LIMIT 1",
 
        // 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) {
@@ -169,17 +169,17 @@ LIMIT 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
index 9e42da8f8846a28cadab4936624ed8ada44808ae..f3c938ba991545f90a5e7ca561e8c3926c25e780 100644 (file)
@@ -48,7 +48,7 @@ if ((isFormSent()) && (!isPostRequestElementSet('id'))) {
 } // 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`,
@@ -61,7 +61,7 @@ FROM
 WHERE
        `id`=%s
 LIMIT 1',
-               array(bigintval(postRequestElement('mid'))), __FILE__, __LINE__);
+               array(bigintval(postRequestElement('id'))), __FILE__, __LINE__);
 
        // Fetch row
        $content = SQL_FETCHARRAY($result);
@@ -71,7 +71,7 @@ LIMIT 1',
 
        // 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`,
@@ -84,7 +84,7 @@ FROM
 WHERE
        `id`=%s
 LIMIT 1',
-               array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__);
+               array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
 
        // Fetch row
        $content = SQL_FETCHARRAY($result);
@@ -94,7 +94,7 @@ LIMIT 1',
 
        // 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`,
@@ -106,7 +106,7 @@ FROM
 WHERE
        `id`=%s
 LIMIT 1',
-               array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__);
+               array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
 
        // Fetch row
        $content = SQL_FETCHARRAY($result);
@@ -118,7 +118,7 @@ LIMIT 1',
        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`
@@ -133,7 +133,7 @@ LIMIT 1",
                                postRequestElement('subject'),
                                postRequestElement('text'),
                                postRequestElement('url'),
-                               bigintval(postRequestElement('mid')),
+                               bigintval(postRequestElement('id')),
                        ), __FILE__, __LINE__);
 
                if (!SQL_HASZEROAFFECTED()) {
@@ -141,7 +141,7 @@ LIMIT 1",
                } 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`
@@ -156,7 +156,7 @@ LIMIT 1",
                                postRequestElement('subject'),
                                postRequestElement('text'),
                                postRequestElement('url'),
-                               bigintval(postRequestElement('bid')),
+                               bigintval(postRequestElement('id')),
                        ), __FILE__, __LINE__);
 
                if (!SQL_HASZEROAFFECTED()) {
index 87e534fbc12397202916f9ba0218380d3fc40c68..3557495f0a165d67cb7973c5cf3915d44fd00acb 100644 (file)
@@ -103,7 +103,7 @@ if (!SQL_HASZERONUMS($result)) {
                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);
index fed64612ec424b9e2da837248dc37ed349e9c676..31850d9aedbef6ee75034a16c419434a08280228 100644 (file)
@@ -52,7 +52,18 @@ if (!isExtensionInstalledAndNewer('sql_patches', '0.7.4')) {
 
 // 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
@@ -63,22 +74,44 @@ ORDER BY
 $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
@@ -96,7 +129,19 @@ $result_bonus = FALSE;
 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`
@@ -123,7 +168,7 @@ if (!isGetRequestElementSet('offset')) {
 } // 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'));
 
@@ -167,7 +212,7 @@ if (!SQL_HASZERONUMS($result_list)) {
                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);
@@ -206,7 +251,7 @@ if ((isExtensionActive('bonus')) && (empty($WHO))) {
                $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);
index 51020c6906bbf97c9b0176b1a8a87dc9d83e5d8a..c3fc6ae4868020754c0f09de0d136c074b334d3b 100644 (file)
@@ -89,7 +89,7 @@ if ((isExtensionActive('bonus')) && (!SQL_HASZERONUMS($result_max)) && (!empty($
                $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);
index 53de7682da4a1022b4c0066103b0e2221ae083ac..4a87666826a430d99a2ddff5ef2f26486f9a8397 100644 (file)
@@ -55,7 +55,7 @@ $listed = FALSE;
 $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`,
@@ -74,7 +74,7 @@ ON
 WHERE
        `p`.`id`=%s
 LIMIT 1",
-               bigintval(getRequestElement('mid'))
+               bigintval(getRequestElement('id'))
        );
 
        // Column, type and id for member's mail
@@ -84,9 +84,8 @@ LIMIT 1",
 
        // 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
@@ -104,18 +103,17 @@ FROM
 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--}');
@@ -178,7 +176,7 @@ LIMIT %s",
                                        // 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'],
@@ -210,7 +208,7 @@ LIMIT %s",
 
                // 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
@@ -222,7 +220,7 @@ LIMIT %s",
                        // 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--}');
        }
index aa8678f37648f0cf0fae5db9122b2ad0646ffc92..668f63f767e5479fbcb822df9fff71d74c03a7a7 100644 (file)
@@ -616,7 +616,7 @@ function getMenuCssClasses ($data) {
 
 // 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 . '&amp;' . $type . '=' . $urlId . '&amp;do=img&amp;code=' . $code . '%}" />';
+       return '<img border="0" alt="Code ' . $code . '" src="{%url=mailid.php?userid=' . $userid . '&amp;' . $type . '=' . $urlId . '&amp;do=img&amp;code=' . $code . '%}" />';
 }
 
 // Compiles the given HTML/mail code
@@ -2075,13 +2075,13 @@ function doTemplateExtensionRegistrationLink ($templateName, $clear, $ext_name)
 // 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
index 6ca76095ad8eed7e5fd6384f8568fb7d2dd09f4e..557231ce70e3531e5ab16a623602bcd8a76d31ee 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
  * Mailer v0.2.1-FINAL                                Start: 11/14/2003 *
- * ===================                          Last change: 11/25/2004 *
+ * ===================                          Last change: 01/10/2013 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : mailid.php                                       *
@@ -44,12 +44,8 @@ $GLOBALS['__start_time'] = microtime(TRUE);
 // 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)
@@ -59,178 +55,209 @@ require('inc/config-global.php');
 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]
 ?>
index e4ef0a812e992c0c5163b8dd9acd1ab3d97b9614..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,425 +1,3 @@
 <?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
 ?>
index b8e599e305c6b9c474da4492e82374f0c06edd63..a46bda49379ba8fac8ce48e4b437c5fffef29d06 100644 (file)
@@ -20,7 +20,7 @@ Beworbene URL: $content[url]
 Hinweis: Angesammelte {?POINTS?} k&ouml;nnen versteigert oder verkauft werden, jedoch mu&szlig; der K&auml;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&ouml;glichkeit sich bei uns zu melden zwecks Freischaltung, erfolgt dieses nicht, wird Ihr Account gel&ouml;scht! Bei dieser Sperrung erhalten Sie von uns keine Mitteilung, sollten Sie keine Mails von uns bekommen, pr&uuml;fen Sie Ihren Account!
 ----------------
index 2c16bc10f363bdb375313803ac99f66e2e3a2b2a..54ced096be3febc056785217408a25a798713e25 100644 (file)
@@ -22,7 +22,7 @@ Beworbene URL: $content[url]
 Hinweis: Angesammelte {?POINTS?} k&ouml;nnen versteigert oder verkauft werden, jedoch mu&szlig; der K&auml;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&ouml;glichkeit sich bei uns zu melden zwecks Freischaltung, erfolgt dieses nicht, wird Ihr Account gel&ouml;scht! Bei dieser Sperrung erhalten Sie von uns keine Mitteilung, sollten Sie keine Mails von uns bekommen, pr&uuml;fen Sie Ihren Account!
 ----------------
index bac470df5fcf0b420c5e7d4895cb9c55a5b98d33..6ff2acca3bb3b85fa662e2820160d61ca4afc61f 100644 (file)
@@ -4,7 +4,7 @@
        </div>
        <div>
                [<a
-                href="{%url=modules.php?module=admin&amp;what=edit_emails&amp;bid=$content[id]%}">{--ADMIN_EDIT_BONUS_MAIL_LINK--}</a>|<a
-                href="{%url=modules.php?module=admin&amp;what=del_email&amp;bid=$content[id]%}">{--ADMIN_DELETE_BONUS_MAIL_LINK--}</a>]
+                href="{%url=modules.php?module=admin&amp;what=edit_emails&amp;type=bonus&amp;id=$content[id]%}">{--ADMIN_EDIT_BONUS_MAIL_LINK--}</a>|<a
+                href="{%url=modules.php?module=admin&amp;what=del_email&amp;type=bonus&amp;id=$content[id]%}">{--ADMIN_DELETE_BONUS_MAIL_LINK--}</a>]
        </div>
 </div>
index 05d4f4b5f8cf3c96dd1202c0899035e8cd89ec4b..95cb66ac365cda0fc8847e75aff85ac315f5321a 100644 (file)
@@ -4,7 +4,7 @@
        </div>
        <div>
                [<a
-                href="{%url=modules.php?module=admin&amp;what=edit_emails&amp;mid=$content[id]%}">{--ADMIN_EDIT_POOL_MAIL_LINK--}</a>|<a
-                href="{%url=modules.php?module=admin&amp;what=del_email&amp;mid=$content[id]%}">{--ADMIN_DELETE_POOL_MAIL_LINK--}</a>]
+                href="{%url=modules.php?module=admin&amp;what=edit_emails&amp;type=normal&amp;id=$content[id]%}">{--ADMIN_EDIT_POOL_MAIL_LINK--}</a>|<a
+                href="{%url=modules.php?module=admin&amp;what=del_email&amp;type=normal&amp;id=$content[id]%}">{--ADMIN_DELETE_POOL_MAIL_LINK--}</a>]
        </div>
 </div>
index bfa1b1246534ed88d8b9faf7ee3f09371b165884..f166dc4dfecaff518e2fb599b2d3c76060be275d 100644 (file)
@@ -1,7 +1,7 @@
 <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]&amp;$content[link]=$content[id]%}" target="_blank">{--CLICK_NOW--}</a>
+               <a href="{%url=mailid.php?userid=$content[userid]&amp;type=$content[type]&amp;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>
index cdd2791d32f640d208b576011c638c383c8e9a9b..c3166e732d47fd6b3e6aa6403e75fba3e54dd192 100644 (file)
@@ -2,9 +2,9 @@
 <table border="0" cellspacing="0" cellpadding="0" class="mailid_table">
        <tr>
                <td width="220" align="center">
-                       {%form,formMethodPost=mailid_top.php?userid=$content[userid]&amp;$content[type]=$content[data]&amp;do=add&amp;code=$content[code]%}
+                       {%form,formMethodPost=mailid.php?userid=$content[userid]&amp;type=$content[type]&amp;id=$content[id]&amp;do=add&amp;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>
index 79cbc107f8740838f915d5ca1e0a353554d05c47..060cadc8fc05597bf9df5f19489d4a10169262c4 100644 (file)
@@ -2,10 +2,10 @@
 <table border="0" cellspacing="0" cellpadding="0" class="mailid_table">
        <tr>
                <td width="220" align="center">
-                       {%form,formMethodPost=mailid_top.php?userid=$content[userid]&amp;$content[type]=$content[data]&amp;do=add&amp;code=$content[code]%}
+                       {%form,formMethodPost=mailid.php?userid=$content[userid]&amp;type=$content[type]&amp;id=$content[id]&amp;do=add&amp;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>
index 0c6ab1b75be72d4008b6ea49bde521aacdc781fa..0cc349813d20ed91d48db757b63f04c1c9112b09 100644 (file)
@@ -1,5 +1,5 @@
 <frameset rows="120,*" frameborder="no" framespacing="0" border="0">
-       <frame name="mailid_top" src="{%url=mailid_top.php?userid=$content[userid]&amp;$content[type]=$content[data]%}" />
+       <frame name="mailid_top" src="{%url=mailid.php?userid=$content[userid]&amp;type=$content[type]&amp;id=$content[id]%}&amp;do=top" />
        <frame name="mailid_url" src="{%pipe,generateDereferrerUrl=$content[url]%}" />
 </frameset>
 <noframes>
index 54ac17efbb7e79bdf5baac07d2d5fda62d5d1be5..eaf014bfcd696fe5e8606cd15e4fd160a2be5440 100644 (file)
@@ -2,7 +2,7 @@
 <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">
index 03203e00f3210d3331d898e2971750c2b63eaa57..c2486900b0a7622439ecf5aa2713914b1322461e 100644 (file)
@@ -3,10 +3,10 @@
        <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]&amp;t=$content[type]&amp;d=$content[data]%}" target="_blank">{--MEMBER_SHOW_TURBO_BONUS_LINK--}
+                       <a href="{%url=show_bonus.php?userid=$content[userid]&amp;t=$content[type]&amp;d=$content[id]%}" target="_blank">{--MEMBER_SHOW_TURBO_BONUS_LINK--}
                        </div>
                </td>
                <td align="center">
index 87b0e7ad5264b33bb24e95307935ea2913c67cb5..87b1151d1e4fb9cbfe8dcdaee8e95a0870f73320 100644 (file)
@@ -2,7 +2,7 @@
 <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">
index b9b4c5c97f12da73c72d738836c513d52271e543..5520995f13634f6f58cff9d6d94b504eaf42ace7 100644 (file)
@@ -2,7 +2,7 @@
 <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">
index 97c83cd096c372cb4af194c4d5027f96d72b050d..a4b53e6d52de2d58c540edbeed1ebf69ef0d906d 100644 (file)
@@ -2,7 +2,7 @@
 <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">
index a621650e5127db18010d39576cf01a1d83defeef..417a58ea96f28706471f23fa4cbe13bcb6871742 100644 (file)
@@ -3,9 +3,9 @@
        <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]&amp;t=$content[type]&amp;d=$content[data]%}" target="_blank">{--MEMBER_SHOW_TURBO_BONUS_LINK--}
+                               <a href="{%url=show_bonus.php?userid=$content[userid]&amp;t=$content[type]&amp;d=$content[id]%}" target="_blank">{--MEMBER_SHOW_TURBO_BONUS_LINK--}
                        </div>
                </td>
                <td align="center">
index 7a8558a1759d7006214be31c666bcc6f5dcdfb51..07bdbc878aee575d7e65a5912bb394da8d2ef3af 100644 (file)
@@ -15,7 +15,7 @@ function startCounter() {
        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%}%}';
        }
 }
 //-->
index 061275f5f05369e2779b36e10431b670771e8a97..fa741c2c7241398e29928dce0f85614af4a5896e 100644 (file)
@@ -8,7 +8,7 @@
 <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]&amp;bonusid=$content[id]%}" target="_blank" title="{--CONFIRM_LINK--}">$content[id]</a>]
+               [<a href="{%url=mailid.php?userid=$content[userid]&amp;type=bonus&amp;id=$content[id]%}" target="_blank" title="{--CONFIRM_LINK--}">$content[id]</a>]
        </td>
 </tr>
 <tr>
index c5b4cb3aeba0acb8dfaf49b70d5597c504336d2e..997351c8384d58bdff8d05bb8d7b7f3d64914ee2 100644 (file)
@@ -8,7 +8,7 @@
 <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]&amp;mailid=$content[id]%}" target="_blank" title="{--CONFIRM_LINK--}">$content[id]</a>]
+               [<a href="{%url=mailid.php?userid=$content[userid]&amp;type=normal&amp;id=$content[id]%}" target="_blank" title="{--CONFIRM_LINK--}">$content[id]</a>]
        </td>
 </tr>
 <tr>