Mailer continued, sub-id tracking continued:
authorRoland Häder <roland@mxchange.org>
Mon, 8 Oct 2012 21:32:52 +0000 (21:32 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 8 Oct 2012 21:32:52 +0000 (21:32 +0000)
- Introduced function isUrlBlacklisted() (not everywhere used!)
- Templates for sub-id statistics added
- Introduced function anonymizeSensitiveData() which tries to "anonymized"
  some data (admins always see all for now)
- Some language ids renamed
- Other minor fixes
- TODOs.txt updated

40 files changed:
.gitattributes
DOCS/TODOs.txt
inc/extensions/ext-bank.php
inc/extensions/ext-coupon.php
inc/extensions/ext-debug.php
inc/extensions/ext-newsletter.php
inc/extensions/ext-signup.php
inc/extensions/ext-sponsor.php
inc/extensions/ext-user.php
inc/extensions/ext-wernis.php
inc/filter/user_filter.php
inc/functions.php
inc/language/de.php
inc/language/html_mail_de.php
inc/language/user_de.php
inc/libs/html_mail_functions.php
inc/libs/newsletter_functions.php
inc/modules/frametester.php
inc/modules/member/subid-stats.php
inc/modules/member/what-order.php
inc/modules/member/what-payout.php
inc/mysql-manager.php
inc/template-functions.php
inc/wrapper-functions.php
ref.php
templates/de/html/admin/admin_delete_email_bonus.tpl
templates/de/html/admin/admin_delete_email_normal.tpl
templates/de/html/admin/admin_delete_email_notify.tpl
templates/de/html/admin/admin_edit_theme_row.tpl
templates/de/html/admin/admin_import_theme_row.tpl
templates/de/html/admin/admin_list_sponsor_details.tpl
templates/de/html/mailid/mailid_frames.tpl
templates/de/html/member/member_add_subid.tpl
templates/de/html/member/member_list_subid_stats.tpl [new file with mode: 0644]
templates/de/html/member/member_list_subid_stats_row.tpl [new file with mode: 0644]
templates/de/html/member/member_list_surfbar_row.tpl
templates/de/html/member/member_pool_row.tpl
templates/de/html/member/member_stats_row.tpl
templates/de/html/member/member_themes_row.tpl
templates/xml/member/member_list_subid_stats.xml [new file with mode: 0644]

index a1cfd2f84513081197d1f7e79682b75da2527e8a..2d9eb52fc5fd0fa5f0f0a26b47b2eb4c2830edd7 100644 (file)
@@ -1967,6 +1967,8 @@ templates/de/html/member/member_list_referral_level.tpl svneol=native#text/plain
 templates/de/html/member/member_list_referral_row.tpl svneol=native#text/plain
 templates/de/html/member/member_list_reflinks.tpl svneol=native#text/plain
 templates/de/html/member/member_list_reflinks_row.tpl svneol=native#text/plain
+templates/de/html/member/member_list_subid_stats.tpl svneol=native#text/plain
+templates/de/html/member/member_list_subid_stats_row.tpl svneol=native#text/plain
 templates/de/html/member/member_list_surfbar.tpl svneol=native#text/plain
 templates/de/html/member/member_list_surfbar_form.tpl svneol=native#text/plain
 templates/de/html/member/member_list_surfbar_row.tpl svneol=native#text/plain
index f2be12a9972cc4938dfa68f2603f727e38489c5b..1b1007647e51f272097082bb8835084740005b4a 100644 (file)
@@ -60,8 +60,8 @@
 ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
 ./inc/header.php:66:// @TODO Find a way to not use direct module comparison
 ./inc/install-functions.php:91:        // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
-./inc/language/de.php:1112:    // @TODO Rewrite these two constants
-./inc/language/de.php:1128:    // @TODO Rewrite these three constants
+./inc/language/de.php:1120:    // @TODO Rewrite these two constants
+./inc/language/de.php:1136:    // @TODO Rewrite these three constants
 ./inc/language/de.php:749:// @TODO Are these constants longer used?
 ./inc/language-functions.php:255:      // @TODO These are all valid languages, again hard-coded
 ./inc/language-functions.php:44:// @TODO Rewrite all language constants to this function.
 ./inc/modules/member/what-beg.php:63:// @TODO No more needed? define('__BEG_USERID_TIMEOUT', createFancyTime(getBegUseridTimeout()));
 ./inc/modules/member/what-logout.php:17: * @TODO Rewrite the code to a filter                                   *
 ./inc/modules/member/what-logout.php:52:       // @TODO Move this in a filter, e.g. member_logout
-./inc/modules/member/what-order.php:471:                       // @TODO Rewrite this to a filter
+./inc/modules/member/what-order.php:459:                       // @TODO Rewrite this to a filter
 ./inc/modules/member/what-order.php:84:                // @TODO Rewrite this to SQL_FETCHARRAY()
 ./inc/modules/member/what-payout.php:194:                                      // @TODO Rewrite this to a filter
 ./inc/modules/member/what-points.php:61:// @TODO Should we rewrite this to a filter?
index ee1d7287986a800acee14d693be9dc565a61f0fd..1dd49d1585524c28e6de416511d4b235f9185cb3 100644 (file)
@@ -58,7 +58,7 @@ switch (getExtensionMode()) {
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `account_created` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `account_locked` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-`locked_reason` TINYTEXT,
+`locked_reason` TINYTEXT NOT NULL,
 `status` ENUM('NEW','ACTIVE','LOCKED') NOT NULL DEFAULT 'NEW',
 `account_balance` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
 `output_mode` ENUM('LOGIN','EMAIL','DISABLED'),
@@ -69,7 +69,7 @@ switch (getExtensionMode()) {
 `month_transfered` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `last_tan` VARCHAR(5) NOT NULL DEFAULT '00000',
 `last_tan_stamp` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-`last_tan_purpose` TINYTEXT,
+`last_tan_purpose` TINYTEXT NOT NULL,
 `account_type` ENUM('CHECK','SAVING') NOT NULL DEFAULT 'CHECK',
 `overdraft_credit` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
 PRIMARY KEY (`id`),
@@ -88,7 +88,7 @@ INDEX (`last_tan_stamp`)",
 `points_amount` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
 `day_bookkeeping` CHAR(4) NOT NULL DEFAULT '0000',
 `day_available` CHAR(4) NOT NULL DEFAULT '0000',
-`transfer_purpose` TINYTEXT,
+`transfer_purpose` TINYTEXT NOT NULL,
 PRIMARY KEY (`id`),
 INDEX (`to_account_id`,`from_account_id`),
 INDEX (`day_bookkeeping`,`day_available`)",
@@ -98,7 +98,7 @@ INDEX (`day_bookkeeping`,`day_available`)",
                addCreateTableSql('bank_packages', "
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `title` VARCHAR(255) NOT NULL DEFAULT '',
-`description` TINYTEXT,
+`description` TINYTEXT NOT NULL,
 `account_fee` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
 `free_transfers` INT(7) UNSIGNED NOT NULL DEFAULT 0,
 `transfer_fee` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
index 676a9da2f358c5071d15c87f2adebb0ec5594789..c14e216512537a6cf62a29e1fffb939c2bf60088 100644 (file)
@@ -64,7 +64,7 @@ switch (getExtensionMode()) {
 `total_created` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `total_cashed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
-`coupon_description` TEXT,
+`coupon_description` TEXT NOT NULL,
 PRIMARY KEY (`id`)",
                'Created coupons');
 
index 2775de07b7221ca4e1fa532593d49c050d29e86a..dd9d766aee34aa6df6bf6afc0e6e2e9053ed54d8 100644 (file)
@@ -62,8 +62,8 @@ switch (getExtensionMode()) {
 `timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
 `file` VARCHAR(255) NOT NULL DEFAULT '',
 `line` MEDIUMINT NOT NOT NULL DEFAULT 0,
-`message` LONGTEXT,
-`comment` TINYTEXT,
+`message` LONGTEXT NOT NULL,
+`comment` TINYTEXT NOT NULL,
 `status` ENUM('NEW','PENDING','ACCEPTED','FIXED','INVALID','DUBLICATE','SPAM') NOT NULL DEFAULT 'NEW',
 `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`),
@@ -76,7 +76,7 @@ INDEX (`sender_id`)",
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
-`raw_data` LONGTEXT,
+`raw_data` LONGTEXT NOT NULL,
 `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`),
 INDEX (`client_id`)",
@@ -93,7 +93,7 @@ INDEX (`client_id`)",
 `status` ENUM('ACTIVE','NEW','PENDING','LOCKED','DELETED','SPAM') NOT NULL DEFAULT 'PENDING',
 `type` ENUM ('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT',
 `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-`lock_spam_reason` TINYTEXT,
+`lock_spam_reason` TINYTEXT NOT NULL,
 PRIMARY KEY (`id`),
 UNIQUE INDEX (`key`),
 UNIQUE INDEX (`url`)",
index ed44424958bb4e77c0afd9937adee3ee7e118993..d027e01878c91e75a71a76e22d43009578084c4a 100644 (file)
@@ -143,8 +143,8 @@ switch (getExtensionMode()) {
                                addCreateTableSql('newsletter_data', "
 `nl_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `nl_subject` VARCHAR(255) NOT NULL DEFAULT '{OPEN_CONFIG}nl_default_subject{CLOSE_CONFIG}',
-`nl_header_text` MEDIUMTEXT,
-`nl_footer_text` MEDIUMTEXT,
+`nl_header_text` MEDIUMTEXT NOT NULL,
+`nl_footer_text` MEDIUMTEXT NOT NULL,
 `nl_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 `nl_send` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
 `nl_ready` ENUM('Y','N') NOT NULL DEFAULT 'N',
@@ -163,7 +163,7 @@ PRIMARY KEY (`nl_id`)",
 `nl_topic_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `nl_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `nl_topic_title` VARCHAR(255) NOT NULL DEFAULT '',
-`nl_topic_text` MEDIUMTEXT,
+`nl_topic_text` MEDIUMTEXT NOT NULL,
 `nl_topic_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`nl_topic_id`),
 INDEX `newsletter_id` (`nl_id`)",
@@ -187,8 +187,8 @@ INDEX `topic` (`nl_topic_id`)",
                                addConfigAddSql('nl_expire', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7));
                                addConfigAddSql('nl_archive_expire', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 14));
                                addConfigAddSql('nl_default_subject', "VARCHAR(255) NOT NULL DEFAULT 'Newsletter vom {OPEN_CONFIG}CURRENT_DATE{CLOSE_CONFIG}'");
-                               addConfigAddSql('nl_default_header', 'MEDIUMTEXT');
-                               addConfigAddSql('nl_default_footer', 'MEDIUMTEXT');
+                               addConfigAddSql('nl_default_header', 'MEDIUMTEXT NOT NULL,');
+                               addConfigAddSql('nl_default_footer', 'MEDIUMTEXT NOT NULL,');
                                addConfigAddSql('nl_archive', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
 
                                // Admin menu
index 211697fd60f202792858998303317edbb17efaec..9595313c583f725eeb267d044c061760ba7bf5d4 100644 (file)
@@ -62,8 +62,8 @@ switch (getExtensionMode()) {
 `signup_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `signup_sponsor_id` BIGINT (20) UNSIGNED NOT NULL,
 `signup_title` VARCHAR (255) NOT NULL DEFAULT '',
-`signup_text` LONGTEXT,
-`signup_welcome_text` TINYTEXT,
+`signup_text` LONGTEXT NOT NULL,
+`signup_welcome_text` TINYTEXT NOT NULL,
 `signup_question` VARCHAR (255) NOT NULL DEFAULT '',
 `signup_url` VARCHAR (255) NOT NULL DEFAULT '',
 `signup_banner` VARCHAR (255) NOT NULL DEFAULT '',
index 49305ebdfb4023d86104c03cff871654c6ab1ae2..c999cec04d3c3bd8e86b6f896b7f7244a751b7dd 100644 (file)
@@ -216,7 +216,7 @@ INDEX (`sponsor_id`)",
 `campaign_expired` ENUM('Y','N') NOT NULL DEFAULT 'N',
 `campaign_locked` ENUM('Y','N') NOT NULL DEFAULT 'Y',
 `campaign_ended` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
-`locked_reason` TINYTEXT,
+`locked_reason` TINYTEXT NOT NULL,
 `locked_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
 `status` ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING',
 PRIMARY KEY (`id`),
index 9e1ed4d56f4bb63e8220d3d132097d4d426b00cf..ed6a26f2d0e28ea7d28635fd33182bfd6e0877b8 100644 (file)
@@ -41,10 +41,10 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version number
-setThisExtensionVersion('0.5.3');
+setThisExtensionVersion('0.5.4');
 
 // Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3'));
+setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4'));
 
 // Keep this extension always active!
 setExtensionAlwaysActive('Y');
@@ -196,6 +196,8 @@ INDEX (`stats_type`)",
                unregisterFilter(__FILE__, __LINE__, 'convert_user_data_columns', 'ADD_USER_DATA_CONVERT_SQL_COLUMNS', true, isExtensionDryRun());
                unregisterFilter(__FILE__, __LINE__, 'post_refid_validation', 'HANDLE_USER_SUBID', true, isExtensionDryRun());
                unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'SUBID_USER_REGISTRATION_ADD_SQL_COLUMNS', true, isExtensionDryRun());
+               unregisterFilter(__FILE__, __LINE__, 'update_referral_data', 'GENERIC_UPDATE_USER_REFERRAL', true, isExtensionDryRun());
+               unregisterFilter(__FILE__, __LINE__, 'update_referral_data', 'UPDATE_USER_SUBID', true, isExtensionDryRun());
                break;
 
        case 'activate': // Do stuff when admin activates this extension
@@ -372,7 +374,7 @@ INDEX (`stats_type`)",
 `joined` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `last_online` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `del_timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-`del_reason` TINYTEXT,
+`del_reason` TINYTEXT NOT NULL,
 PRIMARY KEY (`id`),
 INDEX (`userid`)",
                                        'List of deleted users');
@@ -605,7 +607,7 @@ INDEX (`subid`)",
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `subid` VARCHAR(255) NOT NULL DEFAULT '',
-`referral_url` TINYTEXT,
+`referral_url` TINYTEXT NOT NULL,
 `remote_address` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
 `entry_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`),
@@ -623,6 +625,18 @@ INDEX (`subid`)",
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Filter, Datenbanktabelle und Men&uuml;punkte f&uuml;r SubId-Tracking hinzugef&uuml;gt.");
                                break;
+
+                       case '0.5.4': // SQL queries for v0.5.4
+                               // Register filter
+                               registerFilter(__FILE__, __LINE__, 'update_referral_data', 'GENERIC_UPDATE_USER_REFERRAL', false, true, isExtensionDryRun());
+                               registerFilter(__FILE__, __LINE__, 'update_referral_data', 'UPDATE_USER_SUBID', false, true, isExtensionDryRun());
+
+                               // Add user agent
+                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_subid_log` ADD `user_agent` TINYTEXT NOT NULL AFTER `remote_address`');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Weitere Filter f&uuml;r Referral-Counter und Sub-Id hinzugef&uuml;gt.");
+                               break;
                } // END - switch
                break;
 
index bfb0ac521be04f81798ce3ca79f76cdba5ca1e42..aaa7c505b80787e2f854e15decb328ebdee1dda9 100644 (file)
@@ -57,7 +57,7 @@ switch (getExtensionMode()) {
 `wernis_amount` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
 `wernis_timestamp` VARCHAR(10) NOT NULL DEFAULT 0,
 `wernis_type` ENUM('WITHDRAW','PAYOUT','FAILED') NOT NULL DEFAULT 'FAILED',
-`wernis_api_message` TINYTEXT,
+`wernis_api_message` TINYTEXT NOT NULL,
 `wernis_api_status` VARCHAR(255) NULL DEFAULT NULL,
 PRIMARY KEY (`id`),
 INDEX (`userid`)",
index 1040aaee4e5f280d7c3103a9b4156553ffc558d9..de3ce0efc26ef7ba329ef07d3df8acd4584b8f43 100644 (file)
@@ -173,5 +173,59 @@ function FILTER_SUBID_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) {
        return $filterData;
 }
 
+// Generic filter for updating referral counter of currently detected referral id
+function FILTER_GENERIC_UPDATE_USER_REFERRAL ($filterData) {
+       // Make sure the referral id is detected
+       assert(isReferralIdValid());
+
+       // Update ref counter, determineReferralId() must already be called before this filter is executed
+       SQL_QUERY('UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_clicks`=`ref_clicks`+1 WHERE `userid`={%pipe,getReferralId%} LIMIT 1', __FUNCTION__, __LINE__);
+
+       // Return filter data
+       return $filterData;
+}
+
+// Filter for updating sub id records
+function FILTER_UPDATE_USER_SUBID ($filterData) {
+       // Make sure the referral id is detected
+       assert(isReferralIdValid());
+
+       // Get sub id and secure it
+       $subId = SQL_ESCAPE(getRequestElement('subid'));
+
+       // Is the sub id available and registered with referral id?
+       if (countSumTotalData(getReferralId(), 'user_subids', 'id', 'userid', true, sprintf(" AND `subid`='%s'", $subId)) == 1) {
+               // Sub id is assigned to referral id, so add a record
+               SQL_QUERY_ESC("INSERT INTO
+       `{?_MYSQL_PREFIX?}_subid_log`
+(
+       `refid`,
+       `subid`,
+       `referral_url`,
+       `remote_address`,
+       `user_agent`
+) VALUES (
+       {%%pipe,getReferralId%%},
+       '%s',
+       '{%%pipe,detectReferer%%}',
+       '{%%pipe,detectRemoteAddr%%}',
+       '{%%pipe,detectUserAgent%%}'
+)",
+                       array(
+                               // @NOTE: SQL_QUERY_ESC() already escape it, don't use $subId here
+                               getRequestElement('subid')
+                       ), __FUNCTION__, __LINE__);
+
+               // Add insert id for other filters
+               $filterData['insert_id'] = SQL_INSERTID();
+
+               // Register sub id in filter
+               setSession('subid', $subId);
+       } // END - if
+
+       // Return filter data
+       return $filterData;
+}
+
 // [EOF]
 ?>
index 806bf7da525c2ca3c7513677bac2f5d9e2372435..5fb35afd9f707113a8e54ec8c0466baff0661b9b 100644 (file)
@@ -330,7 +330,7 @@ function translateMenuVisibleLocked ($content, $prefix = '') {
 }
 
 // Generates an URL for the dereferer
-function generateDerefererUrl ($url) {
+function generateDereferrerUrl ($url) {
        // Don't de-refer our own links!
        if (substr($url, 0, strlen(getUrl())) != getUrl()) {
                // Encode URL
@@ -2396,6 +2396,18 @@ function memberListBuilder ($listType, $tableName, $columns, $filterFunctions, $
        doGenericListBuilder('member', $listType, $tableName, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $rawUserId);
 }
 
+// Checks whether given address is IPv4
+function isIp4AddressValid ($address) {
+       // Is there cache?
+       if (!isset($GLOBALS[__FUNCTION__][$address])) {
+               // Determine it ...
+               $GLOBALS[__FUNCTION__][$address] = preg_match('/((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9]))/', $address);
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__][$address];
+}
+
 // ----------------------------------------------------------------------------
 //              "Translatation" functions for points_data table
 // ----------------------------------------------------------------------------
index 904dff77d490434c669c4635092bc6ccd3164cf6..d8e9c944bc070ab8d6a7a968885c65b94ee6d07d 100644 (file)
@@ -437,7 +437,7 @@ addMessages(array(
        'USER_404' => "Mitgliedsdaten nicht gefunden! Sind Sie noch angemeldet?",
        'ADMIN_UNCONFIRMED_ACCOUNTS' => "Hier alle Accounts, deren Email-Adresse nicht best&auml;tigt ist",
        '_USERID' => "Mitglied-Id",
-       'REMOTE_IP' => "IP-Nummer",
+
        'REFERRAL_USERID' => "Werber-Id",
        'ACCOUNT_STATUS' => "Status",
        'ACCOUNT_STATUS_UNKNOWN' => "Unbekannter Status <span class=\"data\">%s</span> erkannt.",
@@ -952,7 +952,13 @@ addMessages(array(
        'APPLICATION_DIED_TITLE' => "Bug im Script erkannt.",
        'ADMIN_CONTACT_LINK_TITLE' => "Kontakt zum Administrator",
        'ADMIN_MAIL_NOTHING_DELETED' => "Die Mail mit der Id <span class=\"data\">%s</span> weisst keine Mitglieder auf.",
+       'ENTRY_ADDED' => "Eintrag hinzugef&uuml;gt",
+
+       'REMOTE_IP' => "IP-Nummer",
+       'REFERRER_URL' => "Aufrufende Seite",
+       'USER_AGENT' => "Browserbezeichnung",
 
+       // Admin - password reset - titles
        'ADMIN_RESET_PASSWORD_SEND_LINK_TITLE' => "1/4: Administratorkennwort zur&uuml;cksetzen",
        'ADMIN_VALIDATE_HASH_TITLE' => "2/4: Validierung Iher Logindaten",
        'ADMIN_RESET_PASSWORD_TITLE' => "3/4: Neues Passwort eingeben",
@@ -1052,6 +1058,8 @@ addMessages(array(
        'ADMIN_CONFIG_ADMIN_MENU_NOTICE' => "Das Men&uuml;system mit &quot;logischen Bereichen&quot; ist noch nicht fertig und f&uuml;hrt zu Fehlern. Bitte dieses nur im Template aktivieren, wenn Sie daran mitprogrammieren wollen.",
        'UNKNOWN_ERROR_CODE' => "Unbekannter Fehlercode <span class=\"data\">0x{%%pipe,getHexErrorCode=%s%%}</span> erkannt.",
        'LOADER_SECURITY_HASH_MISMATCH' => "Der Sicherheitshash f&uuml;r den Dereferrer stimmt nicht mit der URL &uuml;berein.",
+       'URL_IS_BLACKLISTED' => "URL ist gesperrt.",
+       'DATA_IS_HIDDEN' => "Daten sind verdeckt.",
 
        // Time units
        'TIME_UNIT'         => "Zeiteinheit",
index a3fe913a11d9d6b7164131f5b76b73bfd0ce245a..ac42549e7bae260f7b7fd14a6d5067ab74c3cef7 100644 (file)
@@ -42,7 +42,7 @@ if (!defined('__SECURITY')) {
 
 // Language definitions
 addMessages(array(
-       'ADMIN_HTML_DOWNLOAD_CLASS' => "Bitte laden Sie sich die Klasse <a href=\"{%pipe,generateDerefererUrl=https://sourceforge.net/projects/phpmailer/%}\" target=\"_blank\">PHPMailer</a> herunter, um diese Funktion nutzen zu k&ouml;nnen.",
+       'ADMIN_HTML_DOWNLOAD_CLASS' => "Bitte laden Sie sich die Klasse <a href=\"{%pipe,generateDereferrerUrl=https://sourceforge.net/projects/phpmailer/%}\" target=\"_blank\">PHPMailer</a> herunter, um diese Funktion nutzen zu k&ouml;nnen.",
        'MEMBER_HTML_TITLE' => "HTML-Emfpang - Einstellung",
        'MEMBER_HTML_TEXT' => "In unserem {?mt_word?} ist das Empfangen von HTML-Mails nun m&ouml;glich. Gleichzeitig k&ouml;nnen Sie auch selber HTML-Mails versenden. M&ouml;chten Sie dies beides nutzen?",
        'MEMBER_HTML_ORDER_TITLE' => "HTML- oder normale Text-Mails versenden?",
index c027a56d6ca99fdcde90edf0183f1d9fc4a352c9..0c5eb6d36c4998a8e8a821f46a75db8e7f4c762c 100644 (file)
@@ -118,22 +118,24 @@ addMessages(array(
 
        // Member - sub ids
        'MEMBER_USER_SUBIDS_404' => "Sie haben noch keine Sub-Ids angelegt.",
-       'MEMBER_ADD_SUBID_SUBMIT' => "Sub-Id hinzuf&uuml;gen",
+       'MEMBER_USER_SUBID_NOT_ASSIGNED_404' => "Die angegebene Sub-Id-Kennung ist Ihrem Mitgliedsaccount nicht zugewiesen oder existiert nicht.",
+       'MEMBER_SUBID_STATS_404' => "F&uuml;r diese Sub-Id ist noch keine Statistik abfragbar, da sie noch nicht aufgerufen wurde.",
        'MEMBER_ENTER_SUBID' => "Geben Sie eine Sub-Id ein:",
        'MEMBER_ADD_SUBID_LEGEND' => "Daten zur Sub-Id",
-       'MEMBER_ADD_SUBID_NOTICE' => "<strong>Hinweise:</strong>Mit Sub-Ids haben Sie die M&ouml;glichkeit, die Aufrufe Ihres Referral-Linkes noch genauer zu verfolgen. Zum Beispiel k&ouml;nnen Sie jedem Besuchertausch oder fremden Paidmailer eine eigene Sub-Id vergeben, indem Sie diese hier zuerst eingeben und dann am Ende des Referral-Linkes mit <strong>&amp;subid=<em>Ihre Sub-Id</em></strong> anh&auml;ngen. Bewerben Sie nun diesen erweiterten Link. Sobald Aufrufe auf diesen erfolgen, k&ouml;nnen Sie bei der jeweiligen Sub-Id auf &quot;Aufruf-Statistik&quot; klicken, um eine detailierte Statistik zu erhalten. Leerzeichen oder Bindestrichen werden automatisch in Unterstriche umgewandelt, es wurden nur Zeichen von A-Z (klein- und grossgeschrieben) und alle Zahlenzeichen sowie Unterstriche angenommen.",
        'MEMBER_SUBID_NO_SELECTIONS' => "Sie haben keine Auswahl getroffen! Bitte navigieren Sie zur&uuml;ck, w&auml;hlen Sie mindestens eine Sub-Id aus und versuchen Sie es dann erneut.",
        'MEMBER_USER_SUBID_STATS_LINK' => "Aufrufstatistiken",
        'MEMBER_USER_SUBID_ADDED' => "Sub-Id hinzugef&uuml;gt",
        'MEMBER_CHANGE_USER_SUBID' => "Geben Sie eine neue ein:",
        'MEMBER_INVALID_DO_USER_SUBID' => "Ung&uuml;ltiges Sub-Modul aufgerufen! Sollten Sie der Meinung sein, dies ist ein Fehler, so teilen Sie bitte dem Support mit, wie es zu dieser Meldung gekommen ist.",
-       'MEMBER_USER_SUBID_NOT_ASSIGNED_404' => "Die angegebene Sub-Id-Kennung ist Ihrem Mitgliedsaccount nicht zugewiesen oder existiert nicht.",
+       'MEMBER_BACK_SUBIDS_OVERVIEW_LINK' => "Zur&uuml;ck zur Sub-Id-&Uuml;bersicht ...",
 
        // Member - sub ids - submit buttons
+       'MEMBER_USER_SUBIDS_ADD_SUBMIT' => "Sub-Id hinzuf&uuml;gen",
        'MEMBER_USER_SUBIDS_CHANGE_SUBMIT' => "Sub-Ids &auml;ndern",
        'MEMBER_USER_SUBIDS_REMOVE_SUBMIT' => "Sub-Ids l&ouml;schen",
 
        // Member - sub ids - notices
+       'MEMBER_ADD_USER_SUBIDS_NOTICE' => "<strong>Hinweise:</strong>Mit Sub-Ids haben Sie die M&ouml;glichkeit, die Aufrufe Ihres Referral-Linkes noch genauer zu verfolgen. Zum Beispiel k&ouml;nnen Sie jedem Besuchertausch oder fremden Paidmailer eine eigene Sub-Id vergeben, indem Sie diese hier zuerst eingeben und dann am Ende des Referral-Linkes mit <strong>&amp;subid=<em>Ihre Sub-Id</em></strong> anh&auml;ngen. Bewerben Sie nun diesen erweiterten Link. Sobald Aufrufe auf diesen erfolgen, k&ouml;nnen Sie bei der jeweiligen Sub-Id auf &quot;Aufruf-Statistik&quot; klicken, um eine detailierte Statistik zu erhalten. Leerzeichen oder Bindestrichen werden automatisch in Unterstriche umgewandelt, es wurden nur Zeichen von A-Z (klein- und grossgeschrieben) und alle Zahlenzeichen sowie Unterstriche angenommen.",
        'MEMBER_EDIT_USER_SUBIDS_NOTICE' => "Wenn Sie doch nichts &auml;ndern wollen, klicken Sie einfach auf <strong>{--MEMBER_USER_SUBIDS_CHANGE_SUBMIT--}</strong> oder in der Navigation <strong>{--YOU_ARE_HERE--}</strong> auf Sub-Id Tracking.",
        'MEMBER_DELETE_USER_SUBIDS_NOTICE' => "Wollen Sie die oben aufgef&uuml;hrte(n) Sub-Id(s) wirklich l&ouml;schen? Dieses ist nicht umkehrbar! Die Statistik dazu bleibt noch eine Weile gespeichert, ist aber nicht mehr aus der Auswahl aufrufbar (Sie k&ouml;nnen sich ja den Link notieren?).",
 
@@ -142,6 +144,7 @@ addMessages(array(
        'MEMBER_ADD_SUBID_TITLE' => "Neue Sub-Id anlegen",
        'MEMBER_EDIT_USER_SUBIDS_TITLE' => "Ausgew&auml;hlte Sub-Ids editieren",
        'MEMBER_DELETE_USER_SUBIDS_TITLE' => "Ausgew&auml;hlte Sub-Ids l&ouml;schen",
+       'MEMBER_SUBID_STATS_TITLE' => "Aufrufstatistik f&uuml;r Ihre Sub-Ids",
 
        // Member - sub ids - subject lines
        'ADMIN_ADD_USER_SUBIDS_SUBJECT' => "Sub-Id wurde hinzugef&uuml;gt",
index 86584ac60845622c78c6343d531e8234ddbbedd3..62c13a1a9bb0409721159789f0e129c2850a2f84 100644 (file)
@@ -82,7 +82,7 @@ function insertUrlsIntoHtml ($text) {
                } // END - foreach
 
                // Now replace the URL against anchor container and pray...
-               $text = substr($text, 0, strpos($text, $check2)) . '<a href="' . generateDerefererUrl($check) . '" target="_blank">' . $check . '</a>' . substr($text, strpos($text, $check2) + strlen($check));
+               $text = substr($text, 0, strpos($text, $check2)) . '<a href="' . generateDereferrerUrl($check) . '" target="_blank">' . $check . '</a>' . substr($text, strpos($text, $check2) + strlen($check));
 
                // Finally remove the url from testing string (or we have a loop and maybe server overload!)
                $test = substr($test, strpos($test, $check) + strlen($check));
index a2b3c0ae62356affc623318eb8a9aa1cb90159a1..525cb28540ad0c3233c0749308097762d7a87507 100644 (file)
@@ -56,7 +56,7 @@ function insertNewsletterUrls ($text) {
                } // END - foreach
 
                // Now replace the URL against anchor container and pray...
-               $text = substr($text, 0, strpos($text, $check2)) . generateDerefererUrl($check) . substr($text, strpos($text, $check2) + strlen($check));
+               $text = substr($text, 0, strpos($text, $check2)) . generateDereferrerUrl($check) . substr($text, strpos($text, $check2) + strlen($check));
 
                // Finally remove the url from testing string (or we have a loop and maybe server overload!)
                $test = substr($test, strpos($test, $check) + strlen($check));
index c8899186684ff6c35febd8717c701ba87a000f75..9631fa303389fd3140b56a225a25d46adaed2ed5 100644 (file)
@@ -99,12 +99,12 @@ if ((isPostRequestElementSet('url')) || (isGetRequestElementSet('url')) || (!isF
                                case 'member':
                                        // Build frameset
                                        $content['order'] = bigintval(getRequestElement('order'));
-                                       $content['url']   = generateDerefererUrl($url);
+                                       $content['url']   = generateDereferrerUrl($url);
                                        loadTemplate('member_order_frametester', false, $content);
                                        break;
 
                                case 'guest':
-                                       $content['url']   = generateDerefererUrl($url);
+                                       $content['url']   = generateDereferrerUrl($url);
                                        loadTemplate('guest_frametester', false, $content);
                                        break;
                        } // END - switch
index d9d3649e0ed2263e4286d420150fe69deaabbbc6..92a8083ef572e68b2f03546bde743152a380b5c4 100644 (file)
@@ -44,5 +44,8 @@ if (!defined('__SECURITY')) {
        redirectToUrl('modules.php?module=login&amp;what=subids');
 }
 
+// List all entries
+showEntriesByXmlCallback('member_list_subid_stats');
+
 // [EOF]
 ?>
index 1180b53707d866c478b8926d5244ab6440d3970d..1f9aa867e316e1760aace3a05da2dc4c903de6a8 100644 (file)
@@ -120,21 +120,9 @@ LIMIT 1",
                } // END - if
 
                // And shall I check that his URL is not in the black list?
-               if (isUrlBlacklistEnabled()) {
-                       // Ok, I do that for you know...
-                       $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS tstamp FROM `{?_MYSQL_PREFIX?}_url_blacklist` WHERE `url`='%s' LIMIT 1",
-                               array(postRequestElement('url')), __FILE__, __LINE__);
-
-                       if (SQL_NUMROWS($result) == 1) {
-                               // Jupp, we got one listed
-                               list($blist) = SQL_FETCHROW($result);
-
-                               // Create redirect-URL
-                               $url = 'modules.php?module=login&amp;what=order&amp;code=' . getCode('BLIST_URL') . '&amp;blist=' . $blist;
-                       } // END - if
-
-                       // Free result
-                       SQL_FREERESULT($result);
+               if (isUrlBlacklisted(postRequestElement('url'))) {
+                       // Create redirect-URL
+                       $url = 'modules.php?module=login&amp;what=order&amp;code=' . getCode('BLIST_URL') . '&amp;blist=' . $GLOBALS['blacklist_data'][postRequestElement('url')]['timestamp'];
                } // END - if
 
                // Enougth receivers entered?
index f3357acd3a871ed60fd9856744373f4f21382264..41d4988293a5e795c0483966c5123560097d3bda 100644 (file)
@@ -98,7 +98,7 @@ ORDER BY
                                                // Textlink
                                                $content['target_account'] = $content['link_text'];
                                        }
-                                       $content['target_bank'] = '<a href="' . generateDerefererUrl($content['url']) . '" target="_blank">{--CLICK_HERE--}</a>';
+                                       $content['target_bank'] = '<a href="' . generateDereferrerUrl($content['url']) . '" target="_blank">{--CLICK_HERE--}</a>';
                                } // END - if
 
                                // Prepare data for the template
index bc4a920140c6d047b11ca2785128ddf30a0a7447..ce649cdd36ef09f474ece96e26443566451dbc95 100644 (file)
@@ -2314,5 +2314,39 @@ function doGenericListBuilder ($prefix, $listType, $tableName, $columns, $filter
        );
 }
 
+// Checks whether given URL is blacklisted
+function isUrlBlacklisted ($url) {
+       // Mark it as not listed by default
+       $listed = false;
+
+       // Is black-listing enbaled?
+       if (!isUrlBlacklistEnabled()) {
+               // No, then all URLs are not in this list
+               return false;
+       } elseif (!isset($GLOBALS['blacklist_data'][$url])) {
+               // Check black-list for given URL
+               $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS `blist_timestamp` FROM `{?_MYSQL_PREFIX?}_url_blacklist` WHERE `url`='%s' LIMIT 1",
+                       array($url), __FILE__, __LINE__);
+
+               // Is there an entry?
+               if (SQL_NUMROWS($result) == 1) {
+                       // Jupp, we got one listed
+                       $GLOBALS['blacklist_data'][$url] = SQL_FETCHARRAY($result);
+
+                       // Mark it as listed
+                       $listed = true;
+               } // END - if
+
+               // Free result
+               SQL_FREERESULT($result);
+       } else {
+               // Is found in cache -> black-listed
+               $listed = true;
+       }
+
+       // Return result
+       return $listed;
+}
+
 // [EOF]
 ?>
index 00642e5d25dca5bddb080862334ac6b5caa5a286..e2b65de7493b5ff4ce6d1d2a7793549796265bed 100644 (file)
@@ -2206,5 +2206,41 @@ function doTemplatePointsPaymentMethodSelectionBox ($templateName, $clear = fals
        return $content;
 }
 
+// Tries to anonymize some sensitive data (e.g. IP address, user agent, referrer, etc.)
+function anonymizeSensitiveData ($data) {
+       // Trim it
+       $data = trim($data);
+
+       // Is it empty?
+       if (empty($data)) {
+               // Then add three dashes
+               $data = '---';
+       } elseif (isUrlValid($data)) {
+               // Is a referrer, so is it black-listed?
+               if (isAdmin()) {
+                       // Is admin, has always priority
+                       $data = '[<a href="{%pipe,generateFrametesterUrl=' . $data . '%}" target="_blank">{--ADMIN_TEST_URL--}</a>]';
+               } elseif (isUrlBlacklisted($data)) {
+                       // Yes, so replace it with text
+                       $data = '<em>{--URL_IS_BLACKLISTED--}</em>';
+               } else {
+                       // A  member is viewing this referral URL
+                       $data = '[<a href="{%pipe,generateDereferrerUrl=' . $data . '%}" target="_blank">{--MEMBER_TEST_URL--}</a>]';
+               }
+       } elseif (isIp4AddressValid($data)) {
+               // Is an IPv4 address
+               $ipArray = explode('.', $data);
+
+               // Only display first 2 octets
+               $data = $ipArray[0] . '.' . $ipArray[1] . '.?.?';
+       } else {
+               // Generic data
+               $data = '<em>{--DATA_IS_HIDDEN--}</em>';
+       }
+
+       // Return it (hopefully) anonymized
+       return $data;
+}
+
 // [EOF]
 ?>
index 762538a570dd0680dcf69dc9c4dc51634d29a119..fdae0479db245003a983c67b64ba19d45e376302 100644 (file)
@@ -746,7 +746,7 @@ function redirectToRequestUri () {
 // Wrapper function to redirect to de-refered URL
 function redirectToDereferedUrl ($url) {
        // Redirect to to
-       redirectToUrl(generateDerefererUrl($url));
+       redirectToUrl(generateDereferrerUrl($url));
 }
 
 // Wrapper function for checking if extension is installed and newer or same version
diff --git a/ref.php b/ref.php
index 6b0302c17adcc8514e727398e118e77ec6a63ff3..7f0d0c7b2e83c9aa1c7e3445d9517d670673a84a 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -56,9 +56,8 @@ $url = 'modules.php?module=index';
 
 // Check for determined referral id
 if ((isExtensionActive('user')) && (isReferralIdValid()) && (isValidUserId(determineReferralId()))) {
-       // Update ref counter
-       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_clicks`=`ref_clicks`+1 WHERE `userid`=%s LIMIT 1",
-               array(determineReferralId()), __FILE__, __LINE__);
+       // Run filter chain for updating referral data
+       runFilterChain('update_referral_data');
 
        // Base URL for redirection
        switch (getConfig('refid_target')) {
@@ -69,6 +68,10 @@ if ((isExtensionActive('user')) && (isReferralIdValid()) && (isValidUserId(deter
                case 'index':
                        $url = 'modules.php?module=index';
                        break;
+
+               default: // Is not valid
+                       reportBug(__FILE__, __LINE__, 'Invalid refid target ' . getConfig('refid_target') . ' detected.');
+                       break;
        } // END - switch
 } // END - if
 
index d3b62a449adf2817e1130f5e4382c51ea333c1dd..0dc3b484bc7f77e27bfb5e240fd4874e00dde27e 100644 (file)
@@ -16,7 +16,7 @@
                <td class="right" align="center">$content[id]</td>
                <td class="right" align="center">$content[subject]</td>
                <td class="right" align="center">
-                       <a href="{%pipe,generateDerefererUrl=$content[url]%}" target="_blank">{--ADMIN_TEST_URL--}</a>
+                       <a href="{%pipe,generateDereferrerUrl=$content[url]%}" target="_blank">{--ADMIN_TEST_URL--}</a>
                </td>
                <td class="right" align="center">$content[timestamp]</td>
                <td align="center">$content[count]</td>
index 20f0007617bb30cffcf4e3e05ebe52f66338ae84..e9fdf88c26fb0d4de4667f57908758629c6529fa 100644 (file)
@@ -17,7 +17,7 @@
                <td class="top right" align="center">{%pipe,generateUserProfileLink=$content[sender]%}</td>
                <td class="top right" align="center">$content[subject]</td>
                <td class="top right" align="center">
-                       <a href="{%pipe,generateDerefererUrl=$content[url]%}" target="_blank">{--ADMIN_TEST_URL--}</a>
+                       <a href="{%pipe,generateDereferrerUrl=$content[url]%}" target="_blank">{--ADMIN_TEST_URL--}</a>
                </td>
                <td class="top" align="center">$content[timestamp]</td>
        </tr>
index 3ee8a12d577c3f2dab3a8e120a29ede339b2e052..4eb0776cbd32eaa9cfdc94a6900f588db003e367 100644 (file)
@@ -15,7 +15,7 @@
        <tr>
                <td class="right" align="center">$content[id]</td>
                <td class="right" align="center">$content[subject]</td>
-               <td class="right" align="center"><a href="{%pipe,generateDerefererUrl=$content[url]%}" target="_blank">{--ADMIN_TEST_URL--}</a></td>
+               <td class="right" align="center"><a href="{%pipe,generateDereferrerUrl=$content[url]%}" target="_blank">{--ADMIN_TEST_URL--}</a></td>
                <td class="right" align="center">$content[timestamp]</td>
                <td align="center">$content[count]</td>
        </tr>
index 057eafac02f1ebffd08c2baf9cb7df47ed1ad8c5..edfe7a84bfc82b579aeef953f95abd55eadb0ee6 100644 (file)
@@ -16,7 +16,7 @@
                $content[email]
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
-               <a href="{%pipe,generateDerefererUrl=$content[theme_url]%}" target="_blank">$content[theme_url]</a>
+               <a href="{%pipe,generateDereferrerUrl=$content[theme_url]%}" target="_blank">$content[theme_url]</a>
        </td>
        <td class="{%template,ColorSwitch%} bottom" align="center">
                v$content[theme_version]
index 74dd22826736c60c050f4a5b974a47914d63fe70..c1b606ad9c2f6767a8c0faf24b9b5cda8c64f733 100644 (file)
@@ -5,7 +5,7 @@
                <a href="mailto:$content[theme_email]?Subject=[Theme:] $content[theme_name] ($content[unix])">$content[theme_author]</a>
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
-               <a href="{%pipe,generateDerefererUrl=$content[theme_url]%}" target="_blank">$content[theme_url]</a>
+               <a href="{%pipe,generateDereferrerUrl=$content[theme_url]%}" target="_blank">$content[theme_url]</a>
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">v$content[theme_version]</td>
        <td class="{%template,ColorSwitch%} bottom" align="center">
index 32ed3a827e5c68d533e6c498163e027ee51e056d..f2979bf6f51379bd51c38b7533da133541acc3f1 100644 (file)
@@ -65,7 +65,7 @@
 </tr>
 <tr>
        <td align="right" class="bottom right">{--SPONSOR_ENTER_URL--}:</td>
-       <td class="bottom">[<a href="{%pipe,generateDerefererUrl=$content[url]%}" target="_blank"><strong>{--ADMIN_TEST_URL--}</strong></a>]</td>
+       <td class="bottom">[<a href="{%pipe,generateDereferrerUrl=$content[url]%}" target="_blank"><strong>{--ADMIN_TEST_URL--}</strong></a>]</td>
 </tr>
 <tr>
        <td colspan="2" align="center" class="table_header bottom">
index d2a119bfbfae949f8c10f7d47be5788e3dd2cae4..0c6ab1b75be72d4008b6ea49bde521aacdc781fa 100644 (file)
@@ -1,6 +1,6 @@
 <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_url" src="{%pipe,generateDerefererUrl=$content[url]%}" />
+       <frame name="mailid_url" src="{%pipe,generateDereferrerUrl=$content[url]%}" />
 </frameset>
 <noframes>
        Ihr Browser unterst&uuml;tzt keine frames!
index 4f7ab9b48ba9a7ee444da97cc22b9cd3cd8a7a6f..7f5d31d7b97e17154bb1cf0d2c398f01f2af2027 100644 (file)
 
        <div class="table_footer top" style="margin-top:5px" colspan="2" align="center">
                <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
-               <input type="submit" name="add_subid" class="form_submit" value="{--MEMBER_ADD_SUBID_SUBMIT--}" />
+               <input type="submit" name="add_subid" class="form_submit" value="{--MEMBER_USER_SUBIDS_ADD_SUBMIT--}" />
        </div>
 </div>
 </form>
 </div>
 
 <div class="notice">
-       {--MEMBER_ADD_SUBID_NOTICE--}
+       {--MEMBER_ADD_USER_SUBIDS_NOTICE--}
 </div>
diff --git a/templates/de/html/member/member_list_subid_stats.tpl b/templates/de/html/member/member_list_subid_stats.tpl
new file mode 100644 (file)
index 0000000..4676da9
--- /dev/null
@@ -0,0 +1,23 @@
+<div align="center">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+       <tr>
+               <td colspan="6" align="center" class="table_header bottom">
+                       <strong>{--MEMBER_SUBID_STATS_TITLE--}</strong>
+               </td>
+       </tr>
+       <tr>
+               <td align="center" class="header_column bottom right" width="20"><strong>{--ID_SELECT--}</strong></td>
+               <td align="center" class="header_column bottom right"><strong>{--SUBID_VALUE--}</strong></td>
+               <td align="center" class="header_column bottom right"><strong>{--REFERRER_URL--}</strong></td>
+               <td align="center" class="header_column bottom right"><strong>{--REMOTE_IP--}</strong></td>
+               <td align="center" class="header_column bottom right"><strong>{--USER_AGENT--}</strong></td>
+               <td align="center" class="header_column bottom"><strong>{--ENTRY_ADDED--}</strong></td>
+       </tr>
+       $content
+       <tr>
+               <td colspan="6" class="table_footer">
+                       <a href="{%url=modules.php?module=login&amp;what=subids%}">{--MEMBER_BACK_SUBIDS_OVERVIEW_LINK--}</a>
+               </td>
+       </tr>
+</table>
+</div>
diff --git a/templates/de/html/member/member_list_subid_stats_row.tpl b/templates/de/html/member/member_list_subid_stats_row.tpl
new file mode 100644 (file)
index 0000000..4840550
--- /dev/null
@@ -0,0 +1,20 @@
+<tr>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               <strong>$content[id]</strong>
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right" align="center">
+               $content[subid]
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right">
+               {%pipe,anonymizeSensitiveData=$content[referral_url]%}
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right">
+               {%pipe,anonymizeSensitiveData=$content[remote_address]%}
+       </td>
+       <td class="{%template,ColorSwitch%} bottom right">
+               {%pipe,anonymizeSensitiveData=$content[user_agent]%}
+       </td>
+       <td class="{%template,ColorSwitch%} bottom" align="center">
+               $content[entry_added]
+       </td>
+</tr>
index 9d3893c29830e49b7dde0d9535742aaa13408def..99ff3f87c98c6650937df215f4d5544779e192a6 100644 (file)
@@ -1,6 +1,6 @@
 <tr>
        <td align="center" class="{%template,ColorSwitch%} bottom right">
-               <a href="{%pipe,generateDerefererUrl=$content[url]%}" target="_blank" title="{--MEMBER_TEST_URL--}">{--MEMBER_SURFBAR_TEST_URL--}</a>
+               <a href="{%pipe,generateDereferrerUrl=$content[url]%}" target="_blank" title="{--MEMBER_TEST_URL--}">{--MEMBER_SURFBAR_TEST_URL--}</a>
        </td>
        <td align="center" class="{%template,ColorSwitch%} bottom right">
                {%pipe,translateSurfbarUrlStatus=$content[url_status]%}
index cb032fd9d9db325e22d4cbf1c80b7aa336c8c4ce..ec0bfea6a07e166f88419c11b1a68713ead4c1e2 100644 (file)
@@ -23,7 +23,7 @@
        </td>
        <td align="center" class="{%template,ColorSwitch%} top">
                {--EMAIL_URL--}:<br />
-               <strong><a href="{%pipe,generateDerefererUrl=$content[url]%}" target="_blank">{--MEMBER_TEST_URL--}</a></strong>
+               <strong><a href="{%pipe,generateDereferrerUrl=$content[url]%}" target="_blank">{--MEMBER_TEST_URL--}</a></strong>
        </td>
 </tr>
 <tr>
index a24203a025c8c499a1199edacf5803ecd966aeb8..8d221ccf551d3dc5f1819cb872e4125463a408ac 100644 (file)
@@ -21,7 +21,7 @@
 <tr>
        <td colspan="2" align="center" class="{%template,ColorSwitch%} top right">
                {--EMAIL_URL--}:<br />
-               <strong><a href="{%pipe,generateDerefererUrl=$content[url]%}" target="_blank">{--MEMBER_TEST_URL--}</a></strong>
+               <strong><a href="{%pipe,generateDereferrerUrl=$content[url]%}" target="_blank">{--MEMBER_TEST_URL--}</a></strong>
        </td>
        <td align="center" class="{%template,ColorSwitch%} top">
                {--MEMBER_EMAIL_END_SEND--}:<br />
index 4dbd46079f9fee469934e7335d345d75a74a440f..7e59f67e739cf266dc3272ce4df519f82d9cdf2f 100644 (file)
@@ -7,7 +7,7 @@
        <a href="mailto:$content[theme_email]?Subject=[Theme:] $content[theme_name] ($content[unix])">$content[theme_author]</a>
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
-               <a href="{%pipe,generateDerefererUrl=$content[theme_url]%}" target="_blank">$content[theme_url]</a>
+               <a href="{%pipe,generateDereferrerUrl=$content[theme_url]%}" target="_blank">$content[theme_url]</a>
        </td>
        <td class="{%template,ColorSwitch%} bottom" align="center">v$content[theme_version]</td>
 </tr>
diff --git a/templates/xml/member/member_list_subid_stats.xml b/templates/xml/member/member_list_subid_stats.xml
new file mode 100644 (file)
index 0000000..9fb05e4
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+This template provides meta data for listing member's sub id statistics
+
+@author                Roland Haeder <webmaster@mxchange.org>
+@version       0.2.1-FINAL
+@copyright     (c) 2003 - 2009 by Roland Haeder
+@copyright     (c) 2009 - 2012 by Mailer Developer Team
+@license       GNU GPL 2.0 or any newer version
+@link          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
+//-->
+<member-list-data>
+       <!--
+       Call-back function, the extracted data from this XML will then be re-read
+       from that function. The most common function this XML uses is
+       doGenericListEntries() so mostly you can leave this alone unless you have JOINs.
+       //-->
+       <callback-function type="string" value="doGenericListEntries" />
+       <!--
+       Now we need information which template should be loaded and which functions
+       shall be called back. So lets start with the main list template. This mostly
+       requires no call-back function.
+       //-->
+       <list-template type="string" value="member_list_subid_stats" />
+       <!--
+       The template for all rows, mostly this name has a '_row' suffix and again,
+       no call-back function is usually required.
+       //-->
+       <list-row-template type="string" value="member_list_subid_stats_row" />
+       <!--
+       Message id to display if no entry could be found
+       //-->
+       <no-entry-found-message type="string" value="MEMBER_SUBID_STATS_404" />
+       <!--
+       The table(s) we shall grab the data from, all as list.
+       //-->
+       <data-tables>
+               <!--
+               A single table entry, with alias and without the configurable
+               _MYSQL_PREFIX. You can specify the table's name or alias later on.
+               //-->
+               <data-table type="string" alias="" value="subid_log" />
+               <!--
+               Columns to perform the SELECT statement on, with alias and name plus which table.
+               //-->
+               <select-data-from-list>
+                       <!--
+                       A single entry with table name (can be left empty), value (must
+                       always be set), alias (again can be left empty) and SQL function
+                       (can also be left empty) which shall be applied on the column.
+                       //-->
+                       <select-data-from-list-entry type="string" table="" value="id" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="subid" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="referral_url" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="remote_address" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="user_agent" alias="" function="" />
+                       <select-data-from-list-entry type="string" table="" value="entry_added" alias="entry_added" function="UNIX_TIMESTAMP" />
+               </select-data-from-list>
+               <!--
+               And the column list to perform the WHERE statement on.
+               //-->
+               <where-select-from-list>
+                       <!--
+                       Search for current user's sub ids
+                       //-->
+                       <where-select-from-list-entry type="string" table="" value="refid" condition="EQUALS" look-for="{%pipe,getMemberId%}" />
+               </where-select-from-list>
+               <!--
+               Columns to perform the ORDER BY statement (GROUP BY is not yet supported)
+               //-->
+               <order-by-list>
+                       <!--
+                       A single entry to perform the ORDER BY statement on, see above WHERE entry for details.
+                       //-->
+                       <order-by-list-entry type="string" table="" order="entry_added" value="DESC" />
+               </order-by-list>
+       </data-tables>
+       <!--
+       List all column names from the 'select-data-from-list' node here, but now
+       with call-back informations. The list must only contain those entries where
+       a call-back function shall be called for.
+       //-->
+       <column-callback-list>
+               <!--
+               Another column, now we need a second parameter here because
+               generateDateTime() expects two parameters (first is always the data
+               from column).
+               //-->
+               <column-callback-list-entry>
+                       <!--
+                       The actual data, again.
+                       //-->
+                       <column-callback-data type="string" value="entry_added" callback="generateDateTime" />
+                       <!--
+                       More parameters, remember that the first parameter is always given
+                       and that it is the data from column.
+                       //-->
+                       <callback-extra-parameter-list>
+                               <!--
+                               A single parameter, 'type' can be one of 'float', 'int',
+                               'bool', 'string'. 'array' is not yet supported.
+                               //-->
+                               <callback-extra-parameter-list-entry type="int" column="entry_added" value="2" />
+                       </callback-extra-parameter-list>
+               </column-callback-list-entry>
+       </column-callback-list>
+</member-list-data>