inc/filter/bonus_filter.php svneol=native#text/plain
inc/filter/booking_filter.php svneol=native#text/plain
inc/filter/cache_filter.php svneol=native#text/plain
+inc/filter/coupon_filter.php svneol=native#text/plain
inc/filter/mediadata_filter.php svneol=native#text/plain
inc/filter/online_filter.php svneol=native#text/plain
inc/filter/other_filter.php svneol=native#text/plain
inc/pool/pool- svneol=native#text/plain
inc/pool/pool-bonus.php svneol=native#text/plain
inc/pool/pool-user.php svneol=native#text/plain
+inc/purge/.htaccess svneol=native#text/plain
+inc/purge/purge- svneol=native#text/plain
+inc/purge/purge-general.php svneol=native#text/plain
+inc/purge/purge-inact.php svneol=native#text/plain
+inc/purge/purge-mails.php svneol=native#text/plain
+inc/purge/purge-tasks.php svneol=native#text/plain
+inc/purge/purge-unconfirmed.php svneol=native#text/plain
inc/request-functions.php svneol=native#text/plain
inc/reset/.htaccess svneol=native#text/plain
inc/reset/reset_ svneol=native#text/plain
templates/de/emails/admin/admin_autopurge_tsks.tpl svneol=native#text/plain
templates/de/emails/admin/admin_autopurge_turbo.tpl svneol=native#text/plain
templates/de/emails/admin/admin_autopurge_unconfirmed.tpl svneol=native#text/plain
+templates/de/emails/admin/admin_coupon.tpl svneol=native#text/plain
+templates/de/emails/admin/admin_coupon_cashed.tpl svneol=native#text/plain
templates/de/emails/admin/admin_del_surfbar_urls.tpl svneol=native#text/plain
templates/de/emails/admin/admin_edit_surfbar_urls.tpl svneol=native#text/plain
templates/de/emails/admin/admin_extension_deactivated.tpl svneol=native#text/plain
./autoreg.php:58:// @TODO Add processing of request here
./beg.php:171: // @TODO Opps, what is missing here???
./birthday_confirm.php:93: // @TODO Try to rewrite the following unset()
-./inc/autopurge/purge-inact.php:55: // @TODO Rewrite these if() blocks to a filter
./inc/cache/config-local.php:124:// @TODO Rewrite the following three constants, somehow...
./inc/classes/cachesystem.class.php:501: // @TODO Add support for more types which break in last else-block
./inc/config-functions.php:136: // @TODO Make this all better... :-/
./inc/extensions/ext-yoomedia.php:121: // @TODO Can this be moved into a database table?
./inc/extensions/ext-yoomedia.php:54:// @TODO Only deprecated when 'ext-network' is ready! setExtensionDeprecated('Y');
./inc/extensions-functions.php:155: // @TODO Do we still need this? setExtensionUpdateNotes('');
-./inc/extensions-functions.php:1933:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable'
-./inc/extensions-functions.php:437:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
-./inc/extensions-functions.php:567: // @TODO Extension is loaded, what next?
-./inc/filter/bonus_filter.php:55: // @TODO This query isn't right, it will only update if the user was for a longer time away!
-./inc/filter/cache_filter.php:78: // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
-./inc/functions.php:1226: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
-./inc/functions.php:1314: // @TODO Are these convertions still required?
-./inc/functions.php:1332:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/extensions-functions.php:1927:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable'
+./inc/extensions-functions.php:424:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
+./inc/extensions-functions.php:554: // @TODO Extension is loaded, what next?
+./inc/filter/bonus_filter.php:56: // @TODO This query isn't right, it will only update if the user was for a longer time away!
+./inc/filter/cache_filter.php:92: // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
+./inc/functions.php:1230: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
+./inc/functions.php:1318: // @TODO Are these convertions still required?
+./inc/functions.php:1336:// @TODO Rewrite this function to use readFromFile() and writeToFile()
./inc/functions.php:163:// @TODO Rewrite this to an extension 'smtp'
-./inc/functions.php:1914: // @TODO Find a way to cache this
-./inc/functions.php:2015: // @TODO This is still very static, rewrite it somehow
-./inc/functions.php:2195: // @TODO Rename column data_type to e.g. mail_status
+./inc/functions.php:1918: // @TODO Find a way to cache this
+./inc/functions.php:2019: // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:2199: // @TODO Rename column data_type to e.g. mail_status
./inc/functions.php:92: // @TODO Extension 'msg' does not exist
./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
./inc/modules/member/what-beg.php:54:// @TODO Can't this be moved into EL?
./inc/modules/member/what-beg.php:63:// @TODO No more needed? define('__BEG_UID_TIMEOUT', createFancyTime(getBegUseridTimeout()));
./inc/modules/member/what-bonus.php:55: // @TODO Rewrite this to a filter
-./inc/modules/member/what-cash_coupon.php:56: // @TODO
./inc/modules/member/what-categories.php:131: // @TODO Rewrite this to use $OUT .= ...
./inc/modules/member/what-logout.php:17: * @TODO Rewrite the code to a filter *
./inc/modules/member/what-order.php:427: // @TODO Rewrite this to a filter
./inc/mysql-manager.php:2001:// @TODO Fix inconsistency between last_module and getWhat()
./inc/mysql-manager.php:368: // @TODO Try to rewrite this to one or more functions
./inc/mysql-manager.php:44:// @TODO Can we cache this?
+./inc/purge/purge-inact.php:55: // @TODO Rewrite these if() blocks to a filter
./inc/revision-functions.php:169:// @TODO This function does also set and get in 'cache_array'
./inc/template-functions.php:1055: // @TODO Deprecate this thing
./inc/template-functions.php:1066: // @TODO Deprecate this thing
./templates/de/html/member/member_unconfirmed_table_nopoints.tpl:11: <!-- @TODO Nothing to say here? //-->
./templates/de/html/surfbar/surfbar_frame_textlinks.tpl:5: <!-- @TODO These are static lines and should be replaced by a filter (see ext-sponsor) //-->
### ### DEPRECATION FOLLOWS: ### ###
+./inc/autopurge/purge-general.php:2:// @DEPRECATED
+./inc/autopurge/purge-inact.php:2:// @DEPRECATED
+./inc/autopurge/purge-mails.php:2:// @DEPRECATED
+./inc/autopurge/purge-tsks.php:2:// @DEPRECATED
+./inc/autopurge/purge-unconfirmed.php:2:// @DEPRECATED
./inc/daily/daily_engine.php:2:// @DEPRECATED
./inc/loader/load_cache-admin.php:2:// @DEPRECATED
./inc/loader/load_cache-config.php:2:// @DEPRECATED
$content['message'] = loadTemplate('beg_login', true, $content);
} elseif (getBegPayMode() != 'NONE') { // Other pay-mode active!
// Load message template depending on pay-mode
- $content['message'] = loadTemplate('beg_pay_mode_'.strtolower(getBegPayMode()), true, $content);
+ $content['message'] = loadTemplate('beg_pay_mode_' . strtolower(getBegPayMode()), true, $content);
$pay = true;
} else {
// Clicked received while reload lock is active
);
// Include config-depending template
- loadTemplate('beg_pay_code_'.strtolower(getBegPayMode()), false, $content);
+ loadTemplate('beg_pay_code_' . strtolower(getBegPayMode()), false, $content);
} elseif (($pay === false) && (!isset($content['message']))) {
// Cannot pay! :-(
$content['message'] = loadTemplate('beg_failed', true);
<?php
-/************************************************************************
- * Mailer v0.2.1-FINAL Start: 09/14/2008 *
- * =================== Last change: 09/14/2008 *
- * *
- * -------------------------------------------------------------------- *
- * File : purge- *
- * -------------------------------------------------------------------- *
- * Short description : *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : *
- * -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.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 *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
- die();
-} // END - if
-
-// Abort if autopurge is not active or disabled by admin
-if ((!isExtensionActive('autopurge')) || (getConfig('auto_purge_active') != 'Y')) {
- // Abort here
- return false;
-} // END - if
-
-//
+// @DEPRECATED
?>
<?php
-/************************************************************************
- * Mailer v0.2.1-FINAL Start: 09/14/2008 *
- * =================== Last change: 09/14/2008 *
- * *
- * -------------------------------------------------------------------- *
- * File : purge-general.php *
- * -------------------------------------------------------------------- *
- * Short description : General autopurging, nothing extension-specific *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : Allgemeine, nicht erweiterunsabhaengige Auto- *
- * Loeschung *
- * -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.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 *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
- die();
-} elseif ((!isExtensionActive('autopurge')) || (!isAutoPurgingActive())) {
- // Abort here
- return false;
-}
-
-if (getAutoPurge() > 0) {
- // Init SQLs
- initSqls();
-
- // Init variables
- $admin_points = '0';
-
- // Then check for outdated mail order. We don't delete them just the confirmation links will be deleted.
- $result = SQL_QUERY('SELECT
- s.id, s.userid, s.pool_id, t.price
-FROM
- `{?_MYSQL_PREFIX?}_user_stats` AS s
-LEFT JOIN
- `{?_MYSQL_PREFIX?}_payments` AS t
-ON
- s.`payment_id`=t.`id`
-WHERE
- (UNIX_TIMESTAMP() - s.`timestamp_ordered`) >= {?auto_purge?}
-ORDER BY
- s.userid ASC', __FILE__, __LINE__);
- if (!SQL_HASZERONUMS($result)) {
- // Start deleting procedure
- $userid = '0'; $points = '0';
- while ($content = SQL_FETCHARRAY($result)) {
- // Check if confirmation links are purged or not
- $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s LIMIT 1",
- array(bigintval($content['id'])), __FILE__, __LINE__);
- if (SQL_NUMROWS($result_links) == 1) {
- // Free memory
- SQL_FREERESULT($result_links);
-
- // At least one link was found, enougth to pay back the points
- if (($userid != $content['userid']) && (isValidUserId($userid)) && ($points > 0)) {
- // Directly add points back to senders account
- addPointsAutoPurge($userid, $points);
- $points = '0';
- } // END - if
-
- // Add points
- $userid = $content['userid']; $points += $content['price']; $admin_points += $content['price'];
-
- // Remove confirmation links from queue
- addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s",
- array(bigintval($content['id'])), __FILE__, __LINE__, false));
-
- // Update status of order
- addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='DELETED' WHERE `id`=%s LIMIT 1",
- array(bigintval($content['pool_id'])), __FILE__, __LINE__, false));
- } // END - if
- } // END - while
-
- // Add last points to last user account
- if ($points > 0) addPointsAutoPurge($userid, $points);
- } // END - if
-
- // Free memory
- SQL_FREERESULT($result);
-
- // Is the 'bonus' extension installed and activated?
- if (isExtensionActive('bonus', true)) {
- // Check for bonus campaigns
- $result = SQL_QUERY("SELECT `id`, `points` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `data_type`='SEND' AND `timestamp` <= {?auto_purge?} ORDER BY `id` ASC", __FILE__, __LINE__);
- if (!SQL_HASZERONUMS($result)) {
- // Start deleting procedure
- $points = '0';
- while ($content = SQL_FETCHARRAY($result)) {
- // Check if confirmation links are purged or not
- $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",
- array(bigintval($content['id'])), __FILE__, __LINE__);
- if (!SQL_HASZERONUMS($result_links)) {
- // At least one link was found, enougth to pay back the points
- $points += $content['points'] * SQL_NUMROWS($result_links);
-
- // Free memory
- SQL_FREERESULT($result_links);
-
- // Remove confirmation links from queue
- addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",
- array(bigintval($content['id'])), __FILE__, __LINE__, false));
-
- // Update status of order
- addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='DELETED' WHERE `id`=%s LIMIT 1",
- array(bigintval($content['id'])), __FILE__, __LINE__, false));
- } // END - if
- } // END - while
-
- // Add points to jackpot
- if (isExtensionActive('jackpot')) addPointsToJackpot($points);
-
- // Add points for the admin
- $admin_points += $points;
- } // END - if
-
- // Free memory
- SQL_FREERESULT($result);
- } // END - if
-
- // Add points from deleted accounts to jackpot, but here just add to notify mail
- if ($admin_points > 0) {
- // Send mail to admin
- sendAdminNotification('{--ADMIN_AUTOPURGE_SUBJECT--}', 'admin_autopurge_points', $admin_points);
- } // END - if
-
- // Run all SQLs here
- runFilterChain('run_sqls');
-} // END - if
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/************************************************************************
- * Mailer v0.2.1-FINAL Start: 09/14/2008 *
- * =================== Last change: 09/14/2008 *
- * *
- * -------------------------------------------------------------------- *
- * File : purge-inactive.php *
- * -------------------------------------------------------------------- *
- * Short description : Purge of inactive users *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : Auto-Loeschung von inaktiven Mitgliedern *
- * -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.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 *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
- die();
-} // END - if
-
-// Abort if autopurge is not active or disabled by admin
-if ((!isExtensionActive('autopurge')) || (!isAutoPurgingActive())) {
- // Abort here
- return false;
-} // END - if
-
-// Shall I look for inactive accounts and autopurge inactive accounts?
-if (isAutopurgeInactiveEnabled()) {
- // Init SQLs
- initSqls();
-
- // Init exclusion list
- // @TODO Rewrite these if() blocks to a filter
- $EXCLUDE_LIST = '';
- if (isValidUserId(getDefRefid())) $EXCLUDE_LIST .= ' AND `userid` != {?def_refid?}';
-
- // Check for more extensions
- if (isExtensionActive('beg')) $EXCLUDE_LIST .= ' AND `userid` != {?beg_userid?}';
- if (isExtensionActive('bonus')) $EXCLUDE_LIST .= ' AND `userid` != {?bonus_userid?}';
- if (isExtensionActive('doubler')) $EXCLUDE_LIST .= ' AND `userid` != {?doubler_userid?}';
-
- // Check for new holiday extension
- if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
- // Include only users with no active holiday
- $EXCLUDE_LIST .= " AND `holiday_active`='N'";
- } // END - if
-
- // Check for all accounts
- $result_inactive = SQL_QUERY("SELECT
- `userid`, `email`, `last_online`
-FROM
- `{?_MYSQL_PREFIX?}_user_data`
-WHERE
- `status`='CONFIRMED' AND
- (UNIX_TIMESTAMP() - `joined`) >= {?ap_inactive_since?} AND
- (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?} AND
- (UNIX_TIMESTAMP() - `ap_notified`) >= {?ap_inactive_since?}
- " . $EXCLUDE_LIST . "
-ORDER BY
- `userid` ASC", __FILE__, __LINE__);
-
- if (!SQL_HASZERONUMS($result_inactive)) {
- // Prepare variables and constants...
- $useridsContent = '';
- $content['since'] = (getApInactiveSince() / 60 / 60);
- $content['time'] = (getApInactiveTime() / 60 / 60);
-
- // Mark found accounts as inactive and send an email
- while ($row = SQL_FETCHARRAY($result_inactive)) {
- // Merge both arrays
- $content = merge_array($content, $row);
-
- // Remember userids for the admin
- $useridsContent .= $content['userid'] . ', ';
-
- // Get date/time from timestamp
- $content['last_online'] = generateDateTime($content['last_online'], 0);
-
- // Load mail template
- $message = loadEmailTemplate('member_autopurge_inactive', $content, bigintval($content['userid']));
- sendEmail($content['email'], '{--MEMBER_AUTOPURGE_INACTIVE_SUBJECT--}', $message);
-
- // Update this account
- addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ap_notified`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1",
- array(bigintval($content['userid'])), __FILE__, __LINE__, false));
- } // END - while
-
- // Remove last comma
- $useridsContent = str_replace(', ', "\n", substr($useridsContent, 0, -2));
-
- // Send mail notification to admin
- sendAdminNotification('{--ADMIN_AUTOPURGE_INACTIVE_SUBJECT--}', 'admin_autopurge_inactive', $useridsContent);
- } // END - if
-
- // Free memory
- SQL_FREERESULT($result_inactive);
-
- // Now let's have a look for inactive accounts we want to delete we newly use the same exclude list
- // here for e.g. excluding holiday users
- $result_inactive = SQL_QUERY("SELECT
- `userid`, `email`, `last_online`
-FROM
- `{?_MYSQL_PREFIX?}_user_data`
-WHERE
- `status`='CONFIRMED' AND
- (UNIX_TIMESTAMP() - `joined`) >= {?ap_inactive_since?} AND
- (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?} AND
- (UNIX_TIMESTAMP() - `ap_notified`) >= {?ap_inactive_time?}
-" . $EXCLUDE_LIST . "
-ORDER BY
- `userid` ASC", __FILE__, __LINE__);
-
- if (!SQL_HASZERONUMS($result_inactive)) {
- // Prepare userid array for admin...
- $userids = array();
-
- // Delete inactive accounts
- while ($content = SQL_FETCHARRAY($result_inactive)) {
- // Remember userids for the admin
- $useridsContent[] = $content['userid'];
-
- // Get date/time from timestamp
- $content['last_online'] = generateDateTime($content['last_online'], 0);
-
- // Finnaly delete this inactive account
- deleteUserAccount($content['userid'], loadEmailTemplate('member_autopurge_delete', $content['last_online'], ''));
- } // END - while
-
- // Display all userids
- $useridsContent = implode("\n", $userids);
-
- // Send mail notification to admin
- if (getConfig('ap_in_notify') == 'Y') {
- sendAdminNotification('{--ADMIN_AUTOPURGE_DELETE_SUBJECT--}', 'admin_autopurge_delete', $useridsContent);
- } // END - if
- } // END - if
-
- // Free memory
- SQL_FREERESULT($result_inactive);
-
- // Run all SQLs
- runFilterChain('run_sqls');
-} // END - if
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/************************************************************************
- * Mailer v0.2.1-FINAL Start: 05/29/2004 *
- * =================== Last change: 11/26/2004 *
- * *
- * -------------------------------------------------------------------- *
- * File : autopurge.php *
- * -------------------------------------------------------------------- *
- * Short description : Automatical purging of outdated mail links *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : Auto-Loeschung von veralteten Mail-Links *
- * -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.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 *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
- die();
-} // END - if
-
-// Abort if autopurge is not active or disabled by admin
-if ((!isExtensionActive('autopurge')) || (!isAutoPurgingActive()) || (getConfig('ap_del_mails') != 'Y')) {
- // Abort here
- return false;
-} // END - if
-
-// Okay, let's check for deleted mails
-$result_mails = SQL_QUERY("SELECT
- `sender`
-FROM
- `{?_MYSQL_PREFIX?}_pool`
-WHERE
- `data_type`='DELETED' AND
- (UNIX_TIMESTAMP() - `timestamp`) >= {?ap_dm_timeout?}
-ORDER BY
- `sender` ASC", __FILE__, __LINE__);
-
-// Reset counter...
-$deletedStats = '0';
-
-// Do we have "purged" mails?
-if (!SQL_HASZERONUMS($result_mails)) {
- // Okay, check for their sender's
- while ($content = SQL_FETCHARRAY($result_mails)) {
- // Check now...
- if (!fetchUserData($content['sender'])) {
- // Okay we found some mails!
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_pool` WHERE `sender`=%s",
- array(bigintval($content['sender'])), __FILE__, __LINE__);
-
- // Get all affected (deleted) rows
- $deletedStats += SQL_AFFECTEDROWS();
-
- // Reset query (to prevent possible errors) ...;
- $result_mails = SQL_QUERY("SELECT
- `sender`
-FROM
- `{?_MYSQL_PREFIX?}_pool`
-WHERE
- `data_type`='DELETED' AND
- (UNIX_TIMESTAMP() - `timestamp`) >= {?ap_dm_timeout?}
-ORDER BY
- `sender` ASC", __FILE__, __LINE__);
- } // END - if
- } // END - while
-} // END - if
-
-// Free memory
-SQL_FREERESULT($result_mails);
-
-// Now let's check for stats entries as well;
-$result_mails = SQL_QUERY("SELECT
- `userid` AS `sender`
-FROM
- `{?_MYSQL_PREFIX?}_user_stats`
-WHERE
- (UNIX_TIMESTAMP() - `timestamp_send`) >= {?ap_dm_timeout?}
-ORDER BY
- `userid` ASC", __FILE__, __LINE__);
-
-// Do we have "purged" mails?
-if (!SQL_HASZERONUMS($result_mails)) {
- // Okay, check for their sender's
- while ($content = SQL_FETCHARRAY($result_mails)) {
- // Check now...
- if (!fetchUserData($content['sender'])) {
- // Okay we found some mails!
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `userid`=%s",
- array(bigintval($content['sender'])), __FILE__, __LINE__);
-
- // Get all affected (deleted) rows
- $deletedStats += SQL_AFFECTEDROWS();
-
- // Reset query (to prevent possible errors) ...
- $result_mails = SQL_QUERY("SELECT
- `userid` AS `sender`
-FROM
- `{?_MYSQL_PREFIX?}_user_stats`
-WHERE
- (UNIX_TIMESTAMP() - `timestamp_send`) >= {?ap_dm_timeout?}
-ORDER BY
- `userid` ASC", __FILE__, __LINE__);
- } // END - if
- } // END - while
-} // END - if
-
-// Free memory
-SQL_FREERESULT($result_mails);
-
-// Do we have deleted mails and the admin want's to receive a notification
-if (($deletedStats > 0) && (getConfig('ap_dm_notify') == 'Y')) {
- // Send out email to admin
- sendAdminNotification('{--ADMIN_AUTOPURGE_DELETE_MAILS_SUBJECT--}', 'admin_autopurge_del_mails', $deletedStats);
-} // END - if
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/************************************************************************
- * Mailer v0.2.1-FINAL Start: 09/14/2008 *
- * =================== Last change: 09/14/2008 *
- * *
- * -------------------------------------------------------------------- *
- * File : purge-tsks.php *
- * -------------------------------------------------------------------- *
- * Short description : Automatical purging of outdated mail links *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : Auto-Loeschung von veralteten Mail-Links *
- * -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.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 *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
- die();
-} // END - if
-
-// Abort if autopurge is not active or disabled by admin
-if ((!isExtensionActive('autopurge')) || (!isAutoPurgingActive())) {
- // Abort here
- return false;
-} // END - if
-
-// Check version (must be >= 0.1.9)
-if ((isExtensionInstalledAndNewer('task', '0.1.9')) && (getConfig('autopurge_tasks') == 'Y')) {
- // Purge deleted tasks (no notification to admin)
- SQL_QUERY("DELETE LOW_PRIORITY
-FROM
- `{?_MYSQL_PREFIX?}_task_system`
-WHERE
- `status`='DELETED' AND
- (UNIX_TIMESTAMP() - `task_created`) >= {?ap_tasks_time?}", __FILE__, __LINE__);
-
- // Get deleted rows
- $deletedTasks = SQL_AFFECTEDROWS();
-
- // Do we need to send a notification?
- if (($deletedTasks > 0) && (getConfig('ap_tasks_notify') == 'Y')) {
- // Send out email to admin
- sendAdminNotification('{--ADMIN_AUTOPURGE_TASKS_SUBJECT--}', 'admin_autopurge_tsks', $deletedTasks);
- } // END - if
-} // END - if
-
-//
+// @DEPRECATED
?>
<?php
-/************************************************************************
- * Mailer v0.2.1-FINAL Start: 05/29/2004 *
- * =================== Last change: 11/26/2004 *
- * *
- * -------------------------------------------------------------------- *
- * File : autopurge.php *
- * -------------------------------------------------------------------- *
- * Short description : Automatical purging of outdated mail links *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : Auto-Loeschung von veralteten Mail-Links *
- * -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.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 *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
- die();
-} // END - if
-
-// Abort if autopurge is not active or disabled by admin
-if ((!isExtensionActive('autopurge')) || (!isAutoPurgingActive())) {
- // Abort here
- return false;
-} // END - if
-
-// Shall I auto-purge unconfirmed accounts?
-if (getConfig('autopurge_unconfirmed') == 'Y') {
- // Init variables and find unconfirmed accounts which I shall auto-purge;
- $result_uncon = SQL_QUERY("SELECT
- `userid`, `email`, `joined`
-FROM
- `{?_MYSQL_PREFIX?}_user_data`
-WHERE
- `status`='UNCONFIRMED' AND
- (UNIX_TIMESTAMP() - `joined`) >= {?ap_unconfirmed_time?}
-ORDER BY
- `userid` ASC", __FILE__, __LINE__);
- if (!SQL_HASZERONUMS($result_uncon)) {
- // Prepare variable...
- $userids = '';
- $content['time'] = (getApUnconfirmedTime() / 60 / 60);
-
- // Delete inactive accounts
- while ($row = SQL_FETCHARRAY($result_uncon)) {
- // Merge both arrays
- $content = merge_array($content, $row);
-
- // Remember userids for the admin
- $userids .= $content['userid'] . ', ';
-
- // Get date/time from timestamp
- $content['joined'] = generateDateTime($content['joined'], 0);
-
- // Finnaly delete this inactive account
- deleteUserAccount($content['userid'], loadEmailTemplate('member_autopurge_unconfirmed', $content, ''));
- } // END - while
-
- // Remove last comma
- $userids = str_replace(', ', "\n", substr($userids, 0, -2));
-
- // Send mail notification to admin
- if (getConfig('ap_un_notify') == 'Y') {
- sendAdminNotification('{--ADMIN_AUTOPURGE_UNCONFIRMED_SUBJECT--}', 'admin_autopurge_unconfirmed', $userids);
- } // END - if
- } // END - if
-
- // Free memory
- SQL_FREERESULT($result_uncon);
-} // END - if
-
-// [EOF]
+// @DEPRECATED
?>
// Init & set the include pool
initIncludePool('autopurge');
-setIncludePool('autopurge', getArrayFromDirectory('inc/autopurge/', 'purge-'));
+setIncludePool('autopurge', getArrayFromDirectory('inc/purge/', 'purge-'));
// Run the filter
runFilterChain('load_includes', 'autopurge');
// @TODO Do we still need this? setExtensionUpdateNotes('');
// Include the extension file
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Extension loaded.');
- loadExtensionInclude();
+ loadCurrentExtensionInclude();
// Is this extension deprecated?
if (isExtensionDeprecated()) {
doDeactivateExtension($ext_name);
// Abort here
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Extension load aborted, ext_name=' . $ext_name);
return false;
} // END - if
} // END - if
// All fine!
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Extension successfully loaded, ext_name=' . $ext_name);
return true;
}
// Registeres an extension and possible update depencies
-function registerExtension ($ext_name, $taskId, $dry_run = false, $logout = true) {
+function registerExtension ($ext_name, $taskId, $dry_run = false) {
// Set current extension name
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',task_id=' . $taskId . ',dry_run=' . intval($dry_run) . ',logout=' . intval($logout) . ' - ENTERED!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',task_id=' . $taskId . ',dry_run=' . intval($dry_run) . ' - ENTERED!');
setCurrentExtensionName($ext_name);
// Enable dry-run
// When this extension is already in registration/update phase, all is fine
if ((isExtensionRegistrationRunning($ext_name)) || (isExtensionUpdateRunning($ext_name))) {
// Then abort here with 'true' becaus it is fine
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ' - ALREADY!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - already in registration/update phase, all fine.');
return true;
} // END - if
array(bigintval($taskId)), __FUNCTION__, __LINE__);
}
- // Is this the sql_patches?
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName() . '/' . getExtensionMode());
- if ((getCurrentExtensionName() == 'sql_patches') && ((getExtensionMode() == 'register') || (getExtensionMode() == 'remove')) && (!isExtensionDryRun()) && ($test)) {
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName() . ': LOAD!');
- if ($logout === true) {
- // Then redirect to logout
- redirectToUrl('modules.php?module=admin&logout=1&' . getExtensionMode() . '=sql_patches');
- } else {
- // Add temporary filter
- registerFilter('shutdown', 'REDIRECT_TO_LOGOUT_SQL_PATCHES', true, true);
- $GLOBALS['ext_load_mode'] = getExtensionMode();
- }
- } // END - if
-
// Return status code
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',ext_name=' . $ext_name . ',test=' . intval($test) . ' - EXIT!');
return $ret;
// Get version from extensions
function getExtensionVersion ($ext_name, $force = false) {
// By default no extension is found
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - ENTERED!');
$data['ext_version'] = 'false';
// Empty extension name should be fixed!
} // END - if
// Extensions are all inactive during installation
- if (isInstallationPhase()) return '';
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name);
+ if (isInstallationPhase()) {
+ return '';
+ } // END - if
// Is the cache written?
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - Checking cache ...');
if (isset($GLOBALS['cache_array']['extension']['ext_version'][$ext_name])) {
// Load data from cache
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $ext_name . ': CACHE!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ': CACHE!');
$data['ext_version'] = $GLOBALS['cache_array']['extension']['ext_version'][$ext_name];
// Count cache hits
// Load from database
$result = SQL_QUERY_ESC("SELECT `ext_version` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_name`='%s' LIMIT 1",
array($ext_name), __FUNCTION__, __LINE__);
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $ext_name . ': DB - '.SQL_NUMROWS($result).'');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ': DB - '.SQL_NUMROWS($result).'');
// Is the extension there?
if (SQL_NUMROWS($result) == 1) {
// Setter for EXT_UPDATE_DEPENDS flag
function addExtensionDependency ($updateDepends) {
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . '/' . $updateDepends . ' - ENTERED!');
// Is the update depency empty? (NEED TO BE FIXED!)
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . '/' . $updateDepends . ',extensionMode=' . getExtensionMode() . ' - ENTERED!');
if (empty($updateDepends)) {
// Please report this bug!
debug_report_bug(__FUNCTION__, __LINE__, 'updateDepends is empty: currentExtension=' . getCurrentExtensionName());
} // END - if
// Is it not yet added?
- /* Only for debugging!
if ((isset($updateDepends, $GLOBALS['ext_running_updates'][getCurrentExtensionName()])) && (in_array($updateDepends, getExtensionUpdatesRunning()))) {
- // Double-adding isn't fine, too
- debug_report_bug(__FUNCTION__, __LINE__, '() called twice: updateDepends=' . $updateDepends . ',currentExtension=' . getCurrentExtensionName());
+ /*
+ * Double-adding isn't fine, too. This may mean that
+ * addExtensionDependency() was called outside the switch() command in
+ * the extension's file which requires fixing.
+ */
+ debug_report_bug(__FUNCTION__, __LINE__, 'updateDepends=' . $updateDepends . ',extensionMode=' . getExtensionMode() . ',currentExtension=' . getCurrentExtensionName() . ' - CALLED TWICE!');
} // END - if
- */
// Add it to the list of extension update depencies map
$GLOBALS['ext_update_depends'][getCurrentExtensionName()][] = (string) $updateDepends;
// Remember it in the list of running updates
$GLOBALS['ext_running_updates'][getCurrentExtensionName()][] = $updateDepends;
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . '/' . $updateDepends . ' - EXIT!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . '/' . $updateDepends . ',extensionMode=' . getExtensionMode() . ' - EXIT!');
}
// Getter for running updates
foreach ($GLOBALS['ext_running_updates'] as $ext1=>$depends) {
// Is it found?
if (($ext1 == $ext_name) || ($isRunning === true)) {
- // found
- logDebugMessage(__FUNCTION__, __LINE__, 'ext1=' . $ext1 . ',ext_name=' . $ext_name . ',isRunning=' . intval($isRunning));
+ // Found
$isRunning = true;
+ logDebugMessage(__FUNCTION__, __LINE__, 'ext1=' . $ext1 . ',ext_name=' . $ext_name . ',isRunning=' . intval($isRunning));
break;
} // END - if
} // END - foreach
// Setter for dry-run
function enableExtensionDryRun ($dry_run = true) {
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getCurrentExtensionName()='.getCurrentExtensionName().',dry='.intval($dry_run));
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getCurrentExtensionName()='.getCurrentExtensionName().',dry_run='.intval($dry_run));
$GLOBALS['ext_dry_run'] = (bool) $dry_run;
}
return ($GLOBALS['cache_array']['extension']['ext_lang'][$ext_name] == 'Y');
}
-// Load an extension's include file
-function loadExtensionInclude () {
+// Load current extension's include file
+function loadCurrentExtensionInclude () {
// Is it readable?
if (!isExtensionIncludeReadable()) {
// Not readable
// Checks wether an extension is readable
function isExtensionIncludeReadable ($ext_name = '') {
// If empty, use current
- if (empty($ext_name)) $ext_name = getCurrentExtensionName();
+ if (empty($ext_name)) {
+ $ext_name = getCurrentExtensionName();
+ } // END - if
// Array found?
if (!isset($GLOBALS['ext_inc_readable'][$ext_name])) {
if (!isSqlTableColumnFound('{?_MYSQL_PREFIX?}_config', $columnName)) {
// Not found, so add it
addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `' . $columnName . '` ' . $columnSql);
- } else {
+ } elseif (isDebugModeEnabled()) {
// Add debug line
logDebugMessage(__FUNCTION__, __LINE__, 'Configuration entry ' . $columnName . ' already created. columnSql=' . $columnSql);
}
if (isSqlTableColumnFound('{?_MYSQL_PREFIX?}_config', $columnName)) {
// Found, so add it
addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `' . $columnName . '`');
- } else {
+ } elseif (isDebugModeEnabled()) {
// Add debug line, debug_report_bug() would cause some extenion updates fail
logDebugMessage(__FUNCTION__, __LINE__, 'Configuration entry ' . $columnName . ' not found.');
}
} // END - if
// Mark it
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("ext_name=%s,ext_loaded=true", $ext_name));
$GLOBALS['ext_loaded']['ext_name'][$ext_name] = true;
}
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
// Register module
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addGuestMenuSql('main', 'active', 'Heute Online', 'N', 'Y', 10);
break;
setExtensionAlwaysActive('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addAdminMenuSql('admins', NULL, 'Admin-Management','Administratoren anlegen, löschen oder Passwort/E-Mail Adresse ändern.',1);
addAdminMenuSql('admins','admins_add','Admin hinzufügen','Neuen Admin-Account anlegen',0);
setExtensionVersionHistory(array('0.0'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// Remove all other themes
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_extensions` WHERE ext_name LIKE 'admintheme%'");
addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='stats' WHERE `what`='usr_online'");
setExtensionVersionHistory(array('0.0'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// Remove all other menu themes
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_extensions` WHERE ext_name LIKE 'admintheme%'");
addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='misc' WHERE `what`='usr_online' LIMIT 1");
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
setExtensionAlwaysActive('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// Add dependency to 'bonus'
addExtensionDependency('bonus');
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addDropTableSql('bank_accounts');
addCreateTableSql('bank_accounts', "(
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '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'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addAdminMenuSql('setup', 'config_beg', 'Bettel-Link', 'IP-Sperre, {OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Vergütung usw. können Sie hier einstellen.', 10);
addGuestMenuSql('main', 'beg', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG} erbetteln!', 'N', 'Y', 4);
setExtensionVersionHistory(array('0.0', '0.1.0', '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'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0");
break;
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
// Register module
setExtensionVersionHistory(array('0.0', '0.1.6', '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', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9', '0.9.0', '0.9.1', '0.9.2', '0.9.3', '0.9.4'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// Add dependency to 'user'
addExtensionDependency('user');
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// Configuration entries
addConfigAddSql('booking_per_page', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10');
addConfigAddSql('booking_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 3));
// Which load mode?
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
break;
case 'remove': // Do stuff when removing extension
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
setExtensionAlwaysActive('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addDropTableSql('countries');
addCreateTableSql('countries', "(
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+ case 'register': // Do stuff when installtion is running
+ // This extension requires an up-to-date user
+ addExtensionDependency('user');
+
// Coupon data
addDropTableSql('coupon_data');
addCreateTableSql('coupon_data', "(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-`timestamp_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-`timestamp_expired` TIMESTAMP NULL DEFAULT NULL,
+`coupon_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+`coupon_expired` TIMESTAMP NULL DEFAULT NULL,
`coupon_type` ENUM('CODE','API') NOT NULL DEFAULT 'CODE',
`total_created` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`total_used` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
// Configuration entries
addConfigAddSql('coupon_default_time', 'BIGINT(20) NOT NULL DEFAULT ' . (getOneDay() * 7));
addConfigAddSql('coupon_default_points', 'FLOAT(20,5) NOT NULL DEFAULT 100.00000');
+ addConfigAddSql('coupon_points_account', "ENUM('ORDER','GENERAL') NOT NULL DEFAULT 'ORDER'");
+ addConfigAddSql('coupon_payment_method', "ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'");
+ addConfigAddSql('coupon_locked_points_mode', "ENUM('LOCKED','UNLOCKED') NOT NULL DEFAULT 'LOCKED'");
+ addConfigAddSql('coupon_autopurge_time', 'BIGINT(20) NOT NULL DEFAULT ' . (getOneDay() * 7));
+ addConfigAddSql('coupon_userid', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
// User data table
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `receiving_coupons` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
addMemberMenuSql('coupon', NULL, 'Gutscheine', 'N', 'Y', 3);
addMemberMenuSql('coupon', 'cash_coupon', 'Gutschein einlösen', 'N', 'Y', 1);
addMemberMenuSql('coupon', 'list_coupon', 'Eingelöste auflisten', 'N', 'Y', 2);
+
+ // Add filter (for changing user_points column dynamically
+ registerFilter('determine_points_column_name', 'COUPON_CHANGE_POINTS_COLUMN_NAME', false, true, isExtensionDryRun());
break;
case 'remove': // Do stuff when removing extension
addDropTableSql('user_coupons');
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='coupon' LIMIT 4");
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='coupon' LIMIT 3");
+
+ // Remove all filters
+ unregisterFilter(__FUNCTION__, __LINE__, 'determine_points_column_name', 'COUPON_CHANGE_POINTS_COLUMN_NAME', true, isExtensionDryRun());
break;
case 'activate': // Do stuff when admin activates this extension
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// Table for debug log entries
addDropTableSql('debug_log');
addCreateTableSql('debug_log', "(
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addExtensionSql('');
break;
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// Doubler table
addDropTableSql('doubler');
addCreateTableSql('doubler', "(
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// This depends on 'sponsor' now
addExtensionDependency('sponsor');
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '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'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// Create database
addDropTableSql('user_holidays');
addCreateTableSql('user_holidays', "(
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.51', '0.0.52', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `html` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` ADD `html_msg` ENUM('Y','N') NOT NULL DEFAULT 'N'");
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='impressum' LIMIT 1");
setExtensionVersionHistory(array('0.0', '0.0.1'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addExtensionSql('');
break;
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
setExtensionVersionHistory(array('0.0'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addAdminMenuSql('stats', 'logs', 'Aufruflogbücher', 'Verwalten Sie Ihre Aufruflogbücher mit diesem Admin-Bereich! (Derzeit nur Download!)', 8);
addConfigAddSql('logs_base', "VARCHAR(255) NOT NULL DEFAULT 'logs'");
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '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'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addExtensionSql('');
break;
setExtensionAlwaysActive('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addConfigAddSql('maintenance', "ENUM('Y','N') NOT NULL DEFAULT 'N';");
addAdminMenuSql('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben können.',10);
setExtensionAlwaysActive('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addExtensionSql('');
setExtensionVersionHistory(array('0.0','0.0.1','0.0.2','0.0.3'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
// @TODO Convert menu-Id to one coding-standard. admin(edit|_add) => admin_menu_(edit|add), mem(edit|_add) => mem_menu_(edit|add)
addAdminMenuSql('menu',NULL,'Menü-System','Alle drei Menü-System bearbeiten (Admin-, Mitglied- und Gast-Menü)',1);
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addAdminMenuSql('mods', NULL, 'Modul-Management','Verwalten Sie die Basis-Module index, login, admin usw.', 4);
addAdminMenuSql('mods','config_mods','Module ändern','Ändern Sie hier die Zugtiffsrechte auf die Module. Was dennoch nicht geht: Mitglied- oder Gastzugriffsrtechte auf Admin-Module bzw. Gastzugriffsrechte auf Mitglieder-Module. Diese sind extra abgesichert.', 1);
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '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'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addMemberMenuSql('main','mydata','Profildaten ändern','Y','N',2);
break;
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// Main table which hold
addDropTableSql('network_data');
addCreateTableSql('network_data', "(
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addExtensionSql('');
break;
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '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'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD nickname VARCHAR(255) NOT NULL DEFAULT ''");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD nick_userid ENUM ('nick','userid') NOT NULL DEFAULT 'userid'");
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addDropTableSql('online');
addCreateTableSql('online', "(
setExtensionAlwaysActive('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addDropTableSql('optimize_gain');
addCreateTableSql('optimize_gain', "(
setExtensionVersionHistory(array('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'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addMemberMenuSql('order', 'order', 'Mailbuchung', 'N', 'Y', 1);
break;
setExtensionAlwaysActive('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addAdminMenuSql('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem {?mt_word?}.',13);
break;
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
setExtensionVersionHistory(array('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'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addDropTableSql('user_payouts');
addCreateTableSql('user_payouts', "(
setExtensionVersionHistory(array('0.0'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addConfigAddSql('politician_stop_backlink', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
addAdminMenuSql('config','config_politician_stop','Politiker-Stopp-Aktion','Einstellungen zur Satire-Aktion "Politiker-Stopp - Jetzt wird zurück zensiert."', 7);
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addDropTableSql('user_primera');
addCreateTableSql('user_primera', "(
switch (getExtensionMode())
{
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addExtensionSql('');
break;
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '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'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addDropTableSql('rallye_data');
addCreateTableSql('rallye_data', "(
setExtensionVersionHistory(array('0.0','0.0.1'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addDropTableSql('user_refs');
addCreateTableSql('user_refs', "(
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
setExtensionVersionHistory(array('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', '0.5.5'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addGuestMenuSql('members', 'register', 'Anmeldung', 'Y', 'N', 2);
break;
setExtensionVersionHistory(array('0.0', '0.0.1'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addConfigAddSql('removeip_anon_ip', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
addConfigAddSql('removeip_anon_host', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
setExtensionVersionHistory(array('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'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addAdminMenuSql('repair', NULL, 'Reperaturen','Repariert u.a. die Kategorie-Auswahlen der Mitglieder usw.',7);
addAdminMenuSql('repair','repair_cats','Kategorieauswahlen','Repariert die Kategorien Ihrer Mitglieder.',1);
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
// Only since 'seo' is ready! setExtensionDeprecated('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// Check if mod_rewrite is loadeded
if (!isApacheModuleLoaded('mod_rewrite')) {
setExtensionReportsFailure(true);
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
//
// SQL commands to run
//
} // END - if
// Version number
-setThisExtensionVersion('0.7.7');
+setThisExtensionVersion('0.7.8');
// Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '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', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7'));
+setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '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', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8'));
// Keep this extension always active!
setExtensionAlwaysActive('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// This depends on 'cache' now
addExtensionDependency('cache');
break;
setExtensionUpdateNotes("Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden.");
break;
- case '0.1.0': // SQL queries for v0.2.1
+ case '0.1.0': // SQL queries for v0.1.0
addConfigAddSql('reg_points_mode', "ENUM('ref','direct') NOT NULL DEFAULT 'ref'");
// Update notes (these will be set as task text!)
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Menüpunkt <strong>Verdienen</strong> hinzugefügt und <strong>Unbestätigte Mails</strong> als ersten Punkt dort hin verschoben.");
break;
+
+ case '0.7.8': // SQL queries for v0.7.8
+ addConfigChangeSql('reg_points_mode', 'reg_points_mode', "ENUM('REF','DIRECT') NOT NULL DEFAULT 'REFERAL'");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Konfigurationseinträge mit Spaltentyp <strong>ENUM</strong> werden nun immer komplett gross geschrieben.");
+ break;
} // END - switch
break;
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addExtensionSql('');
break;
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run (surfbar URLs)
addDropTableSql('surfbar_urls');
addCreateTableSql('surfbar_urls', "(
setExtensionAlwaysActive('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addAdminMenuSql('task', NULL, 'Aufgaben-Management','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.',1);
addAdminMenuSql('task','list_task','Aufgaben auflisten','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).',1);
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
setExtensionAlwaysActive('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
addConfigAddSql('timezone', "VARCHAR(255) NOT NULL DEFAULT 'Europe/Berlin'");
addAdminMenuSql('setup', 'config_timezone', 'Zeitzone', 'Einstellungen an der Zeitzone können hier konfiguriert werden.', 10);
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addGuestMenuSql('main','top10','TOP-10','Y','Y', 7);
addAdminMenuSql('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8);
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
break;
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addAdminMenuSql('misc','updates','Updates prüfen','Prüft, ob eine neue Version oder ein Patch auf dem Server exisitiert. Sie müssen dann die Patches/Updates selber herunterladen und einspielen. Dabei werden keine Daten von Ihrer Installation an uns gesendet!',8);
break;
setExtensionVersionHistory(array('0.0'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addAdminMenuSql('stats', 'usage', 'Aufrufstatistik', 'Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)', 9);
addConfigAddSql('usage_base', "VARCHAR(255) NOT NULL DEFAULT 'usage'");
} // END - if
// Version number
-setThisExtensionVersion('0.3.7');
+setThisExtensionVersion('0.3.8');
// Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.1.0', '0.1.1', '0.1.2', '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'));
+setExtensionVersionHistory(array('0.0', '0.1.0', '0.1.1', '0.1.2', '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'));
// Keep this extension always active!
setExtensionAlwaysActive('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
addDropTableSql('user_cats');
addCreateTableSql('user_cats', "(
`id` BIGINT(22) NOT NULL AUTO_INCREMENT,
break;
case '0.1.2': // SQL queries for v0.1.2
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Dem Mitglied wird nun angezeigt, wie viele Mails er bestätigt hat. Alle vor dieser Version best. Mails werden leider nicht mehr berücksichtigt! Bitte teilen Sie dies Ihren Mitgliedern mit.");
break;
case '0.1.4': // SQL queries for v0.1.4
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Anzahl empfangener Mails wird angezeigt. <big>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {?mt_word?} haben sollen!</big>");
case '0.3.4': // SQL queries for v0.3.4
addConfigAddSql('select_user_zero_refid', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
addConfigAddSql('user_min_confirmed', 'SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10');
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Mitglieder werden per Zufall als Referal-Id ausgewählt, die eine Mindestanzahl an bestätigten Mails haben, wenn die Ref-Id 0 ist.");
break;
case '0.3.6': // SQL queries for v0.3.6
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` DROP INDEX `userid`");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` ADD UNIQUE `userid_catid` ( `userid` , `cat_id` )");
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` DROP INDEX `userid`');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` ADD UNIQUE `userid_catid` ( `userid` , `cat_id` )');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet.");
break;
case '0.3.7': // SQL queries for v0.3.7
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `id` `id` BIGINT( 22 ) UNSIGNED NOT NULL AUTO_INCREMENT");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `cat_id` `cat_id` TINYINT( 3 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_del` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `stats_id` `stats_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` CHANGE `userid` `userid` BIGINT( 22 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` CHANGE `ref_depth` `ref_depth` TINYINT( 3 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_refs` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_refs` CHANGE `level` `level` SMALLINT( 6 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_refs` CHANGE `refid` `refid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `cat_id` `cat_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `payment_id` `payment_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `pool_id` `pool_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats_data` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `id` `id` BIGINT( 22 ) UNSIGNED NOT NULL AUTO_INCREMENT');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `cat_id` `cat_id` TINYINT( 3 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_del` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `stats_id` `stats_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` CHANGE `userid` `userid` BIGINT( 22 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` CHANGE `ref_depth` `ref_depth` TINYINT( 3 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_refs` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_refs` CHANGE `level` `level` SMALLINT( 6 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_refs` CHANGE `refid` `refid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `cat_id` `cat_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `payment_id` `payment_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `pool_id` `pool_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats_data` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL');
// Cleanup SQLs
- addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid` IS NULL OR `cat_id` IS NULL");
- addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_del` WHERE `userid` IS NULL");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_links` SET `stats_id`=NULL WHERE `stats_id`=0");
- addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid` IS NULL");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `ref_depth`=NULL WHERE `ref_depth`=0");
- addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid` IS NULL");
- addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid` IS NULL OR `refid` IS NULL OR `level` IS NULL");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `cat_id`=NULL WHERE `cat_id`=0");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `payment_id`=NULL WHERE `payment_id`=0");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `pool_id`=NULL WHERE `pool_id`=0");
- addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `userid` IS NULL");
+ addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid` IS NULL OR `cat_id` IS NULL');
+ addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_del` WHERE `userid` IS NULL');
+ addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_links` SET `stats_id`=NULL WHERE `stats_id`=0');
+ addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid` IS NULL');
+ addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `ref_depth`=NULL WHERE `ref_depth`=0');
+ addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid` IS NULL');
+ addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid` IS NULL OR `refid` IS NULL OR `level` IS NULL');
+ addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `cat_id`=NULL WHERE `cat_id`=0');
+ addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `payment_id`=NULL WHERE `payment_id`=0');
+ addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `pool_id`=NULL WHERE `pool_id`=0');
+ addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `userid` IS NULL');
// This update depends on ext-bonus
addExtensionDependency('bonus');
break;
case '0.3.7': // SQL queries for v0.3.7
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `last_failure` `last_failure` TIMESTAMP NULL DEFAULT NULL");
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `last_failure` `last_failure` TIMESTAMP NULL DEFAULT NULL');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Ausgangswert ist nicht mehr 0000-00-00 00:00:00, sondern einfach NULL.");
break;
+
+ case '0.3.8': // SQL queries for v0.3.8
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` ADD `order_points` FLOAT(20,5) NOT NULL DEFAULT 0.00000');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` ADD `locked_order_points` FLOAT(20,5) NOT NULL DEFAULT 0.00000');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Weiteres {?POINTS?}-Guthabenkonto "Werbeguthaben" hinzugefügt.");
+ break;
} // END - switch
break;
setExtensionVersionHistory(array('0.0'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addConfigAddSql('enable_validator', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
addAdminMenuSql('setup','config_validator','Validierer','Schalten Sie die Validierer-Links ein, um die Gültigkeit Ihres HTML- oder CSS-Codes zu überprüfen.', 10);
setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addDropTableSql('user_wernis');
addCreateTableSql('user_wernis', "(
enableExtensionProductive(false);
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
// Register module
// @TODO Only deprecated when 'ext-network' is ready! setExtensionDeprecated('Y');
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addConfigAddSql('yoomedia_id', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
addConfigAddSql('yoomedia_sid', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
// "Unregisters" a filter from the given chain
function unregisterFilter ($F, $L, $filterName, $filterFunction, $force = false, $dry_run = false) {
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',dry=' . intval($dry_run) . ' - ENTERED!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',dry_run=' . intval($dry_run) . ' - ENTERED!');
// Extend the filter function name only if not loaded from database
if (!isset($GLOBALS['cache_array']['filter']['loaded'][$filterName][$filterFunction])) {
$GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'R';
} // END - if
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',dry=' . intval($dry_run) . ' - EXIT!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',dry_run=' . intval($dry_run) . ' - EXIT!');
}
// "Runs" the given filters, filterData is optional and can be any type of data
} // END - if
// Filter for adding link to "active list"
-function FILTER_ADD_LINK_ACTIVE_LIST () {
+function FILTER_ADD_LINK_ACTIVE_LIST ($data) {
// Is ext-active/online there?
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
if ((isExtensionActive('active')) && (isExtensionActive('online'))) {
// Init fake-content because there is no `what`='active' in database
$content = array(
// Add link to "we were active today" page
$GLOBALS['rows'] .= loadTemplate('guest_menu_bottom', true, $content);
} // END - if
+
+ // Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
}
// [EOF]
// Filter for adding extra data to the query
function FILTER_ADD_EXTRA_SQL_DATA ($add = '') {
// Is the admins extension updated? (should be!)
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
if (isExtensionInstalledAndNewer('admins', '0.3.0')) $add .= ', `default_acl` AS def_acl';
if (isExtensionInstalledAndNewer('admins', '0.6.7')) $add .= ', `la_mode`';
if (isExtensionInstalledAndNewer('admins', '0.7.2')) $add .= ', `login_failures`, UNIX_TIMESTAMP(`last_failure`) AS last_failure';
if (isExtensionInstalledAndNewer('admins', '0.7.3')) $add .= ', `expert_settings`, `expert_warning`';
// Return it
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
return $add;
}
// Reset the login failures
function FILTER_RESET_ADMINS_LOGIN_FAILURES ($data) {
// Store it in session
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
setSession('mailer_admin_failures' , getAdminLoginFailures($data['id']));
setSession('mailer_admin_last_failure', getAdminLastFailure($data['id']));
rebuildCache('admin');
// Return the data for further processing
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
return $data;
}
// Count the login failure
function FILTER_COUNT_ADMINS_LOGIN_FAILURE ($data) {
// Prepare update data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
$postData['login'][getCurrentAdminId()] = $data['login'];
$postData['login_failures'][getCurrentAdminId()] = '`login_failures`+1';
$postData['last_failure'][getCurrentAdminId()] = 'NOW()';
rebuildCache('admin');
// Return the data for further processing
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
return $data;
}
// Rehashes the given plain admin password and stores it the database
function FILTER_REHASH_ADMINS_PASSWORD ($data) {
// Generate new hash
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
$newHash = generateHash($data['plain_pass']);
// Prepare update data
rebuildCache('admin');
// Return the data for further processing
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
return $data;
}
} // END - if
// Filter for adding login bonus to the user's account
-function FILTER_ADD_LOGIN_BONUS () {
+function FILTER_ADD_LOGIN_BONUS ($data) {
// Is the user data valid?
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
if (!isMember()) {
// Do only run for logged in members
debug_report_bug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.');
// No login bonus added!
$GLOBALS['message'] .= '<div class="notice">{--MEMBER_BONUS_LOGIN_BONUS_NOT_ADDED--}</div>';
}
+
+ // Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
}
// [EOF]
// Filter for adding booking record
function FILTER_ADD_BOOKING_RECORD ($data) {
// Add a record
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
addBookingRecord($data['subject'], $data['userid'], $data['points'], $data['mode']);
// Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
return $data;
}
// Destroy the cache on extension changes
function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) {
// Return the data anyway if there is no cache extension
- if (!isCacheInstanceValid()) return $data;
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+ if (!isCacheInstanceValid()) {
+ return false;
+ } // END - if
// Remove cache
foreach (array('config','extension','filter','modules') as $cache) {
- if ($GLOBALS['cache_instance']->loadCacheFile($cache)) $GLOBALS['cache_instance']->removeCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
+ $GLOBALS['cache_instance']->removeCacheFile();
+ } // END - if
} // END - foreach
// Return it
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
return $data;
}
// Destroy the cache on changing admin
function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($data) {
// Skip this step if the cache instance is not there
- if (!isCacheInstanceValid()) return false;
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+ if (!isCacheInstanceValid()) {
+ return false;
+ } // END - if
// Remove cache
- if ($GLOBALS['cache_instance']->loadCacheFile('admin')) $GLOBALS['cache_instance']->removeCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('admin')) {
+ $GLOBALS['cache_instance']->removeCacheFile();
+ } // END - if
// Return the data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
return $data;
}
// Destroy all cache files
-function FILTER_CACHE_DESTROY_ALL () {
+function FILTER_CACHE_DESTROY_ALL ($data) {
// Skip this step if the cache instance is not there
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
- if (!isCacheInstanceValid()) return false;
+ if (!isCacheInstanceValid()) {
+ return false;
+ } // END - if
// Remove cache files
foreach (array('admin','admin_acls','config','extension','modules','refdepths','refsystem','themes','filter','imprint') as $cache) {
$GLOBALS['cache_instance']->removeCacheFile();
} // END - if
} // END - foreach
+
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
}
// Filter for purging 'filter' cache
-function FILTER_CACHE_DESTROY_FILTER () {
+function FILTER_CACHE_DESTROY_FILTER ($data) {
// Skip this step if the cache instance is not there
- if ((!isCacheInstanceValid()) || (getConfig('update_filter_usage') != 'Y')) return false;
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+ if ((!isCacheInstanceValid()) || (getConfig('update_filter_usage') != 'Y')) {
+ return false;
+ } // END - if
// Remove cache files
- if ($GLOBALS['cache_instance']->loadCacheFile('filter')) $GLOBALS['cache_instance']->removeCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('filter')) {
+ $GLOBALS['cache_instance']->removeCacheFile();
+ } // END - if
+
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
}
// [EOF]
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 06/29/2011 *
+ * =================== Last change: 06/29/2011 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : coupon_filter.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Filters for ext-coupon *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Filter fuer ext-coupon *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.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 *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Filter to change column name for the right "points account"
+function FILTER_COUPON_CHANGE_POINTS_COLUMN_NAME ($data) {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+ // Are the points locked?
+ if (($data['locked'] === true) && (getConfig('coupon_locked_points_mode') == 'LOCKED')) {
+ // Locked points may be routed to special account
+ $data['column'] = 'locked_order_points';
+ } elseif (getConfig('coupon_points_account') == 'ORDER') {
+ // These points should be routed to 'order' account
+ $data['column'] = 'order_points';
+ } else {
+ // Else all went to general account
+ $data['column'] = 'points';
+ }
+
+ // Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
+}
+
+// [EOF]
+?>
// Filter for updating media data
function FILTER_UPDATE_MEDIADATA_ENTRY ($data) {
// Execute the filter function
- $data['added'] = ($data['added'] && updateMediadataEntry(array('total_points'), $data['mode'], $data['points']));
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+ $data['added'] = ($data['added'] === true && updateMediadataEntry(array('total_points'), $data['mode'], $data['points']));
// Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
return $data;
}
} // END - if
// Filter for updates/extends on the online list
-function FILTER_UPDATE_ONLINE_LIST () {
+function FILTER_UPDATE_ONLINE_LIST ($data) {
// Do not update online list when extension is deactivated
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
if (!isExtensionActive('online', true)) {
// Extension not active
return;
// Purge old entries
SQL_QUERY('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_online` WHERE (UNIX_TIMESTAMP() - `timestamp`) >= {?online_timeout?}', __FUNCTION__, __LINE__);
+
+ // Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
}
// [EOF]
} // END - if
// Filter for debugging SQLs
-function FILTER_DISPLAY_DEBUG_SQL () {
+function FILTER_DISPLAY_DEBUG_SQL ($data) {
// Shall we display SQL queries?
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
if ((isAdmin()) && (isDisplayDebugSqlEnabled()) && (!isGetRequestParameterSet('frame')) && ($GLOBALS['header_sent'] == 2)) {
// Then display it here
displayDebugSqls();
} // END - if
+
+ // Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
}
// [EOF]
} // END - if
// Filter for displaying politician_stop snippet
-function FILTER_DISPLAY_POLITICIAN_STOP_SNIPPET () {
+function FILTER_DISPLAY_POLITICIAN_STOP_SNIPPET ($data) {
// Shall we include the politician_stop snippet?
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
if ((!isGetRequestParameterSet('frame')) && (isExtensionActive('politician_stop')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) {
// Then display it here
loadPoliticianStopSnippet();
} // END - if
+
+ // Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
}
// [EOF]
} // END - if
// Filter for extra-autpurge
-function FILTER_RALLYE_EXTRA_AUTOPURGE () {
+function FILTER_RALLYE_EXTRA_AUTOPURGE ($data) {
// Check expired rallyes (hard-coded 3 days limit for displaying expired rallyes!)
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
purgeExpiredReferalRallyes();
+
+ // Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
}
// [EOF]
// Run a filter for must-fillout fields
function FILTER_REGISTER_MUST_FILLOUT ($content) {
// Get all fields for output
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
$result = SQL_QUERY('SELECT `field_name`, `field_required` FROM `{?_MYSQL_PREFIX?}_must_register` ORDER BY `id` ASC',
__FUNCTION__, __LINE__);
SQL_FREERESULT($result);
// Return it
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
return $content;
}
// Filter for adding anonymity notice to the output stream
function FILTER_ADD_ANONYMITY_NOTICE ($data) {
// Init content
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
$content = $data;
// Extension removeip activated?
- if ((isExtensionActive('removeip')) && (getConfig('removeip_'.strtolower($data['access_level']).'_show') == 'Y')) {
+ if ((isExtensionActive('removeip')) && (getConfig('removeip_' . strtolower($data['access_level']) . '_show') == 'Y')) {
// Add anoymity/privacy infos
$content['content'] .= addAnonymityLevel() . "<br />\n";
} // END - if
// Return it
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
return $content;
}
} // END - if
// Filter for generic handling of theme change
-function FILTER_HANDLE_THEME_CHANGE () {
+function FILTER_HANDLE_THEME_CHANGE ($data) {
// Check if new theme is selcted
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
if ((isPostRequestParameterSet('new_theme')) && (postRequestParameter('new_theme') != getCurrentTheme())) {
// Set new theme for guests
$newTheme = postRequestParameter('new_theme');
// Redirect to same URL
redirectToRequestUri();
} // END - if
+
+ // Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
}
// Filter for settings theme from user profile, must be executed only if FILTER_FETCH_USER_DATA() ran before
-function FILTER_SET_USERS_THEME () {
+function FILTER_SET_USERS_THEME ($data) {
// Is the user data valid?
if (!isMember()) {
// Do only run for logged in members
// Change to new theme
setTheme(getUserData('curr_theme'));
+
+ // Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
}
// [EOF]
} // END - if
// Filter for setting the timezone
-function FILTER_INIT_TIMEZONE () {
+function FILTER_INIT_TIMEZONE ($data) {
// Just set it if the required function is there
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
if (function_exists('date_default_timezone_set')) {
// CFG: TIME-ZONE
date_default_timezone_set(getConfig('timezone'));
} // END - if
+
+ // Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
}
// [EOF]
} // END - if
// Filter for displaying uberwach snippet
-function FILTER_DISPLAY_UBERWACH_SNIPPET () {
+function FILTER_DISPLAY_UBERWACH_SNIPPET ($data) {
// Shall we include the uberwach snippet?
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
if ((!isGetRequestParameterSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) {
// Then display it here
loadUberwachSnippet();
} // END - if
+
+ // Return data
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $data;
}
// [EOF]
// Sanity check on salt
if (strlen($salt) != getSaltLength()) {
// Not the same!
- debug_report_bug(__FUNCTION__, __LINE__, 'salt length mismatch! ('.strlen($salt).'/'.getSaltLength().')');
+ debug_report_bug(__FUNCTION__, __LINE__, 'salt length mismatch! (' . strlen($salt) . '/' . getSaltLength() . ')');
} // END - if
}
return $keys;
}
+// Determines database column name from given subject and locked
+function determinePointsColumnFromSubjectLocked ($subject, $locked) {
+ // Default is 'normal' points
+ $pointsColumn = 'points';
+
+ // Which points, locked or normal?
+ if ($locked === true) {
+ $pointsColumn = 'locked_points';
+ } // END - if
+
+ // Prepare array for filter
+ $filterData = array(
+ 'subject' => $subject,
+ 'locked' => $locked,
+ 'column' => $pointsColumn
+ );
+
+ // Run the filter
+ $filterData = runFilterChain('determine_points_column_name', $filterData);
+
+ // Extract column name from array
+ $pointsColumn = $filterData['column'];
+
+ // Return it
+ return $pointsColumn;
+}
+
//-----------------------------------------------------------------------------
// Automatically re-created functions, all taken from user comments on www.php.net
//-----------------------------------------------------------------------------
'ADMIN_BEG_POINTS_MAX' => "Maximale erbettelbare {?POINTS?} bei Klick auf Bettellink",
'ADMIN_BEG_USERID' => "Mitglied-Account zum Abbuchen der erbettelten {?POINTS?}",
'ADMIN_SELECT_BEG_MODE' => "Vergütungsmodus der erbettelten {?POINTS?}",
- 'BEG_MODE_DIRECT' => "Nur direktem Mitglied gutschreiben.",
- 'BEG_MODE_REF' => "Auch dem Werber des Mitgliedes gutschreiben.",
'BEG_SORRY_YOURE_LOGGED_IN_1' => "Oh, schade! Sie haben vermutlich auf Ihren eigenen Bettel-Link mit der Mitglieder-Id ",
'BEG_SORRY_YOURE_LOGGED_IN_2' => " geklickt. Sie haben somit auch keine ",
'BEG_SORRY_YOURE_LOGGED_IN_3' => " {?POINTS?} erhalten.",
'MEMBER_BIRTHDAY_CANNOT_STATUS' => "Kann keine {?POINTS?} gutschreiben! Status Ihres Accounts: <span class=\"data\">%s</span>",
'MEMBER_BIRTHDAY_CANNOT_LOAD_DATA' => "Entweder haben Sie bereits Ihr Geburtsgeschenk erhalten oder Sie haben heute keinen Geburtstag.",
'ADMIN_SELECT_BIRTHDAY_MODE' => "Vergütungsmodus der {?POINTS?}",
- 'ADMIN_BIRTHDAY_MODE_DIRECT' => "Nur direktem Mitglied gutschreiben.",
- 'ADMIN_BIRTHDAY_MODE_REF' => "Auch dem Werber des Mitgliedes gutschreiben.",
'ADMIN_BIRTHDAY_ONLY_ACTIVE' => "Nur aktive Mitglieder erhalten die Geburtstagsgutschrift?<br /><div class=\"notice\">(Nur in Verbindung mit der Erweiterung <strong>autopurge</strong>!)</div>",
));
'ADMIN_BONUS_WINNER_HIGLIGHTED' => "Mögliche Gewinner der Aktiv-Rallye sind dick marktiert.",
'ADMIN_BONUS_ALREADY_WITHDRAW' => "Manuelle Vergütungvorbereitung bereits betätigt.",
'ADMIN_BONUS_TIMEOUT' => "Es werden nur Mitglieder ausgewertet und hier aufgelistet, die spätestens am <span class=\"data\">%s</span> noch aktiv waren. Alle anderen Mitglieder erhalten die Vergütung nicht.",
- 'ADMIN_BONUS_USERID' => "Mitgliedskonto zum Abbuchen der {?POINTS?}",
+ 'ADMIN_CONFIG_BONUS_USERID' => "Mitgliedskonto zum Abbuchen der {?POINTS?}",
'ADMIN_CONFIG_BONUS_TIMEOUT' => "Verweildauer von Aktiv-Bonus-Einträgen",
'ADMIN_LIST_BONUS_RALLYE_TITLE' => "Alle an der Aktiv-Rallye teilnehmenden Mitglieder:",
'ADMIN_BONUS_TURBO_LINES' => "Anzahl angezeigter Aktiv-Bonus-Empfänger in <strong>show_bonus.php</strong>",
'ADMIN_CONFIG_COUPON_SETTINGS_TITLE' => "Allgemeine Einstellungen zu den Gutscheinen",
'ADMIN_CONFIG_COUPON_DEFAULT_TIME' => "Zeit, bis Gutscheine ablaufen sollen. Sie können diesen Ausgangswert beim Erstellen von neuen Gutscheinen nachträglich anpassen.",
'ADMIN_CONFIG_COUPON_DEFAULT_POINTS' => "Ausgangsvergütung in {?POINTS?}. Sie können diesen Ausgangswert beim Erstellen von neuen Gutscheinen nachträglich anpassen.",
+ 'ADMIN_CONFIG_COUPON_AUTOPURGE_TIME' => "Dauer bis abgelaufene Gutscheine aus der Datenbank entfernt werden",
+ 'ADMIN_CONFIG_COUPON_SELECT_PAYMENT_METHOD' => "Soll nur dem Mitglied direkt die Gutschrift aus dem Einlösen von Gutscheinen oder über das Referal-System gutgeschrieben werden?",
+ 'ADMIN_CONFIG_COUPON_SELECT_POINTS_ACCOUNT' => "Sollen die {?POINTS?} aus den eingelösten Gutscheinen dem allgemeinen oder dem Werbekonto gutgeschrieben werden?",
+ 'ADMIN_CONFIG_COUPON_SELECT_LOCKED_POINTS_MODE' => "Wenn das Mitglied noch zu bestätigende Mails offen hat, sollen die eingelösten Gutscheine einem gesperrten Konto oder dem oben eingestellten gutgeschrieben werden?",
+ 'ADMIN_CONFIG_COUPON_USERID' => "Mitgliederaccount, von dem die eingelösten {?POINTS?} abgebucht werden sollen:",
+
// Admin - Send coupon to members
'ADMIN_SEND_COUPON_TITLE' => "Gutschein versenden (aktuell nur Code-Gutscheine)",
'ADMIN_SEND_COUPON_EXPIRATION_TIME' => "Ablaufzeit (ab Versandzeitpunkt)",
'MEMBER_CASH_COUPON_NOTE' => "Geben Sie hier den Gutschein-Code ein, den Sie aus unserer Mail erhalten haben. Sie erhalten dann eine Meldung, auf welches Konto die Gutschrift aufgebucht wurde.",
'MEMBER_CASH_COUPON' => "Gutschein einlösen",
'MEMBER_ENTER_COUPON_CODE' => "Gutschein-Code eingeben:",
+ 'MEMBER_COUPON_CODE_EMPTY' => "Sie haben keinen Gutschein-Code eingegeben. Bitte versuchen Sie es erneut.",
+ 'MEMBER_COUPON_CODE_ALREADY_USED' => "Der von Ihnen eingegebene Gutschein-Code ist entweder ungütig, Ihnen nicht zugewiesen, bereits abgelaufen, oder Sie haben ihn bereits eingelöst.",
+ 'MEMBER_COUPON_CODE_CASHED' => "Ihr Gutschein im Wert von <span class=\"data\">{%%pipe,translateComma=%s%%} {?POINTS?}</span> wurde soeben eingelöst und Ihrem Konto gutgeschrieben.",
// Subject lines
'MEMBER_COUPON_SUBJECT' => "Gutschein bei {?MAIN_TITLE?}",
- 'ADMIN_COUPON_SUBJECT' => "Es wurde ein Gutschein versendet",
+ 'ADMIN_COUPON_SUBJECT' => "Es wurde ein Gutschein versendet",
+ 'ADMIN_COUPON_CASHED_SUBJECT' => "Ein Mitglied hat seinen Gutschein eingelöst",
));
// [EOF]
'ADMIN_EXPERT_SETTINGS_NOTE' => "Sie sind im Begriff Einstellungen zu ändern, die sehr sensibel sind und sich auf die Funktionalität Ihres {?mt_word2?} negativ auswirken können. Sie sollten daher hier nichts ändern, solange Sie nicht wissen, was Sie da tun.",
'ADMIN_EXPERT_SETTINGS_MAKE_PERMANENT' => "Ja, ich weiss was ich tue und möchte diesen Hinweis nicht mehr angezeigt bekommen.",
'ADMIN_EXPERT_SETTINGS_CONTINUE' => "Dennoch die Experten-Einstellungen aufrufen",
+
+ // Payment modes
+ 'ADMIN_CONFIG_PAYMENT_MODE_DIRECT' => "Nur direktem Mitglied gutschreiben.",
+ 'ADMIN_CONFIG_PAYMENT_MODE_REF' => "Auch dem Werber des Mitgliedes gutschreiben.",
+
+ // Locked-points modes
+ 'ADMIN_CONFIG_LOCKED_POINTS_MODE_LOCKED' => "Einem gesperrten Konto gutschreiben.",
+ 'ADMIN_CONFIG_LOCKED_POINTS_MODE_UNLOCKED' => "Dem voreingestellten Konto gutschreiben.",
+
+ // Points account
+ 'ADMIN_CONFIG_POINTS_ACCOUNT_ORDER' => "Dem Werbekonto gutschreiben.",
+ 'ADMIN_CONFIG_POINTS_ACCOUNT_GENERAL' => "Dem allgemeinen Konto gutschreiben.",
));
// Description of all months
// Add points to account
// @TODO Try to rewrite the following unset()
unset($GLOBALS['ref_level']);
- $added = addPointsThroughReferalSystem('beg', $userid, $points, false, 0, strtolower(getBegMode()));
+ $added = addPointsThroughReferalSystem('beg', $userid, $points, false, 0, getBegMode());
}
// Subtract begged points from member account if the admin has selected one
- if (getBegUserid() > 0) {
+ if (isValidUserId(getBegUserid())) {
// Subtract from this account
subtractPoints('beg_payout', getBegUserid(), $points);
} // END - if
if (!isBonusRallyeActive()) return;
// Switch to jackpot-mode when no UID is supplied but userid-mode is selected
- if ((getBonusMode() == 'UID') && (getBonusUserId() == '0') && (isExtensionActive('jackpot'))) {
+ if ((getBonusMode() == 'UID') && (getBonusUserid() == '0') && (isExtensionActive('jackpot'))) {
// Update database & config
updateConfiguration('bonus_mode', 'JACKPOT');
} // END - if
}
// Check his amount first
- $total = getTotalPoints(getBonusUserId());
+ $total = getTotalPoints(getBonusUserid());
// Subtract points from...
switch (getBonusMode()) {
break;
case 'JACKPOT': // ... jackpot
- if ((isExtensionActive('jackpot')) && (subtractPointsFromJackpot($points) == -1) && (isValidUserId(getBonusUserId()))) {
+ if ((isExtensionActive('jackpot')) && (subtractPointsFromJackpot($points) == -1) && (isValidUserId(getBonusUserid()))) {
if ($total >= $points) {
// Subtract points from userid's account
- subtractPointsFromJackpot('bonus_payout_jackpot', getBonusUserId(), $points);
+ subtractPointsFromJackpot('bonus_payout_jackpot', getBonusUserid(), $points);
} // END - if
} // END - if
break;
case 'UID': // ... userid's account
if ($total >= $points) {
// Subtract points from userid's account
- subtractPoints('bonus_payout_userid', getBonusUserId(), $points);
+ subtractPoints('bonus_payout_userid', getBonusUserid(), $points);
} elseif (isExtensionActive('jackpot')) {
// Try to subtract from jackpot
$dummy = subtractPointsFromJackpot($points);
$OUT = '';
if (!is_array($GLOBALS['html_tags'])) return "";
foreach ($GLOBALS['html_tags'] as $tag) {
- $OUT .= ", ".strtoupper($tag);
+ $OUT .= ', ' . strtoupper($tag);
}
$OUT = substr($OUT, 2);
return $OUT;
// Check affected rows
if (is_null($added)) {
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):added='.intval($added));
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'added='.intval($added));
$added = (!SQL_HASZEROAFFECTED());
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):added='.intval($added));
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'added='.intval($added));
} else {
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):added='.intval($added));
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'added='.intval($added));
$added = ($added && (!SQL_HASZEROAFFECTED()));
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):added='.intval($added));
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'added='.intval($added));
}
} // END - foreach
} // END - if
$content['pay_mode_' . strtolower(getBegPayMode())] = ' selected="selected"';
// Init beg_mode elements
- foreach (array('direct', 'ref') as $entry) {
- $content['beg_mode_' . $entry] = '';
+ foreach (array('DIRECT', 'REFERAL') as $entry) {
+ $content['beg_mode_' . strtolower($entry)] = '';
} // END - foreach
// Set default mode
// Save configuration
adminSaveSettingsFromPostData();
} else {
- // Init all other templates
+ // Init all other template entries
foreach (array('active_y','active_n','mode_direct','mode_ref') as $entry) {
$content[$entry] = '';
} // END - foreach
setConfigEntry('bonus_disable_notify', postRequestParameter('bonus_disable_notify'));
} else {
// Transfer options to template
- $content['bonus_userid'] = addMemberSelectionBox(getBonusUserId(), false, true, true, 'bonus_userid');
+ $content['bonus_userid'] = addMemberSelectionBox(getBonusUserid(), false, true, true, 'bonus_userid');
// Initialize array for the points list
$RANKS = explode(';', getConfig('turbo_rates'));
// Save data
adminSaveSettingsFromPostData();
} else {
+ // Add userid selection
+ $content['coupon_userid'] = addMemberSelectionBox(getConfig('coupon_userid'), false, true, true, 'coupon_userid');
+
+ // Init all other template entries
+ foreach (array('payment_method_ref', 'payment_method_direct', 'points_account_order', 'points_account_general', 'locked_points_mode_locked', 'locked_points_mode_unlocked') as $entry) {
+ $content['coupon_' . $entry] = '';
+ } // END - foreach
+
+ // Set current selections
+ foreach (array('payment_method', 'points_account', 'locked_points_mode') as $entry) {
+ $content['coupon_' . $entry . '_' . strtolower(getConfig('coupon_' . $entry))] = ' checked="checked"';
+ } // END - foreach
+
// Prepare some template data
- $content['coupon_default_time_selection'] = createConfigurationTimeSelections('coupon_default_time', 'WDh');
+ $content['coupon_default_time_selection'] = createConfigurationTimeSelections('coupon_default_time' , 'WDh');
+ $content['coupon_autopurge_time_selection'] = createConfigurationTimeSelections('coupon_autopurge_time', 'WDh');
// Load template
loadTemplate('admin_config_coupon', false, $content);
if (!isPostRequestParameterSet('points')) {
// Points not entered
displayMessage('{--ADMIN_SEND_COUPON_POINTS_NOT_ENTERED--}');
- } elseif (!isPostRequestParameterSet('description')) {
+ } elseif (!isPostRequestParameterSet('coupon_description')) {
// Description not entered
displayMessage('{--ADMIN_SEND_COUPON_DESCRIPTION_NOT_ENTERED--}');
} else {
$expirationTime = time() + createEpocheTimeFromSelections('coupon_default_time', postRequestArray());
// Insert coupon data
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_coupon_data` (`timestamp_expired`, `total_created`, `points`, `coupon_description`) VALUES('{%%pipe,SQL_EPOCHE_TO_TIMESTAMP=%s%%}', %s,%s,'%s')",
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_coupon_data` (`coupon_expired`, `total_created`, `points`, `coupon_description`) VALUES('{%%pipe,SQL_EPOCHE_TO_TIMESTAMP=%s%%}', %s,%s,'%s')",
array(
$expirationTime,
SQL_NUMROWS($result),
bigintval(postRequestParameter('points')),
- postRequestParameter('description')
+ postRequestParameter('coupon_description')
), __FILE__, __LINE__
);
'userid' => $userid,
'points' => bigintval(postRequestParameter('points')),
'coupon_code' => $couponCode,
- 'coupon_expires' => generateDateTime($expirationTime, '0')
+ 'coupon_expired' => generateDateTime($expirationTime, '0')
);
// Load member email template
// Prepare content for template
$content = array(
- 'userids' => implode(',', $adminUserids),
- 'userid_count' => count($adminUserids),
- 'coupon_id' => $couponId,
- 'points' => bigintval(postRequestParameter('points')),
- 'description' => postRequestParameter('description'),
- 'coupon_expires' => generateDateTime($expirationTime, '0')
+ 'userids' => implode(',', $adminUserids),
+ 'userid_count' => count($adminUserids),
+ 'coupon_id' => $couponId,
+ 'points' => bigintval(postRequestParameter('points')),
+ 'coupon_description' => postRequestParameter('coupon_description'),
+ 'coupon_expired' => generateDateTime($expirationTime, '0')
);
// Send admin notification
// Is the form sent?
if (isFormSent()) {
- // @TODO
+ // Is the coupon code entered?
+ if (isPostRequestParameterSet('coupon_code')) {
+ // Search for the coupon
+ $result = SQL_QUERY_ESC("SELECT
+ c.`coupon_id`,
+ UNIX_TIMESTAMP(d.`coupon_created`) AS `coupon_created`,
+ UNIX_TIMESTAMP(d.`coupon_expired`) AS `coupon_expired`,
+ d.`coupon_type`,
+ d.`total_created`,
+ d.`total_used`,
+ d.`points`,
+ d.`coupon_description`
+FROM
+ `{?_MYSQL_PREFIX?}_user_coupons` AS c
+INNER JOIN
+ `{?_MYSQL_PREFIX?}_coupon_data` AS d
+ON
+ c.`coupon_id`=d.`id`
+WHERE
+ c.`coupon_code`='%s' AND
+ c.`userid`=%s AND
+ c.`cashed_on` IS NULL AND
+ UNIX_TIMESTAMP(d.`coupon_expired`) > UNIX_TIMESTAMP()
+LIMIT 1",
+ array(
+ postRequestParameter('coupon_code'),
+ getMemberId()
+ ), __FILE__, __LINE__);
+
+ // Do we have an entry?
+ if (SQL_NUMROWS($result) == 1) {
+ // Load data
+ $content = SQL_FETCHARRAY($result);
+
+ // Mark it as "cashed"
+ SQL_QUERY_ESC("UPDATE
+ `{?_MYSQL_PREFIX?}_user_coupons`
+SET
+ `cashed_on`=NOW(),
+ `coupon_code`=NULL
+WHERE
+ `coupon_code`='%s' AND
+ `userid`=%s
+LIMIT 1",
+ array(
+ postRequestParameter('coupon_code'),
+ getMemberId()
+ ), __FILE__, __LINE__);
+
+ // Does it work?
+ if (SQL_HASZEROAFFECTED()) {
+ // Abort it here, it always must work
+ debug_report_bug(__FILE__, __LINE__, 'User coupon cannot be updated! coupon_id=' . $content['coupon_id']);
+ } // END - if
+
+ // Update count as well
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_coupon_data` SET `total_used`=`total_used`+1 WHERE `id`=%s AND `total_used` < `total_created` LIMIT 1",
+ array(bigintval($content['coupon_id'])), __FILE__, __LINE__);
+
+ // Does it work?
+ if (SQL_HASZEROAFFECTED()) {
+ // Abort it here, it always must work
+ debug_report_bug(__FILE__, __LINE__, 'Coupon data cannot be updated! coupon_id=' . $content['coupon_id']);
+ } // END - if
+
+ // Now we just need to book that points on the user's account
+ addPointsThroughReferalSystem('coupon_cashed', getMemberId(), $content['points'], false, 0, getConfig('coupon_payment_method'));
+
+ // Subtract points from member account if the admin has selected one
+ if (isValidUserId(getConfig('coupon_userid'))) {
+ // Subtract from this account
+ subtractPoints('cashed_coupon', getConfig('coupon_userid'), $content['points']);
+ } // END - if
+
+ // Translate some data
+ $content['coupon_expired'] = generateDateTime($content['coupon_expired'], '0');
+ $content['coupon_created'] = generateDateTime($content['coupon_created'], '0');
+
+ // Send admin notification
+ sendAdminNotification('{--ADMIN_COUPON_CASHED_SUBJECT--}', 'admin_coupon_cashed', $content, getMemberId());
+
+ // Display message
+ displayMessage(getMaskedMessage('MEMBER_COUPON_CODE_CASHED', $content['points']));
+ } else {
+ // No coupon found
+ displayMessage('{--MEMBER_COUPON_CODE_ALREADY_USED--}');
+ }
+
+ // Free the result
+ SQL_FREERESULT($result);
+ } else {
+ // No code entered!
+ displayMessage('{--MEMBER_COUPON_CODE_EMPTY--}');
+ }
} else {
// Load form template
loadTemplate('member_cash_coupon', false);
} // END - if
// Display it depending on mail (data) type
- loadTemplate('member_mail_bonus_'.strtolower($content['data_type']), false, $content);
+ loadTemplate('member_mail_bonus_' . strtolower($content['data_type']), false, $content);
// Free result
SQL_FREERESULT($result_data);
// Get it directly from URL
return getAction();
}
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>): ret=' . $data['action']);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ' ret=' . $data['action']);
// Does the module have a menu?
if (ifModuleHasMenu($module)) {
* sendNotify = shall I send the referal an email or not?
* refid = inc/modules/guest/what-confirm.php need this
* locked = Shall I pay it to normal (false) or locked (true) points ammount?
- * add_mode = Add points only to $userid or also refs? (WARNING! Changing 'ref' to 'direct'
+ * add_mode = Add points only to $userid or also refs? (WARNING! Changing 'REFERAL' to 'DIRECT'
* for default value will cause no referal will get points ever!!!)
*/
-function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $refid = '0', $addMode = 'ref') {
+function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $refid = '0', $addMode = 'REFERAL') {
// By default nothing has been added
$added = false;
//* DEBUG: */ debugOutput('----------------------- <font color="#00aa00">' . __FUNCTION__ . ' - ENTRY</font> ------------------------<ul><li>');
- // Convert mode to lower-case
- $addMode = strtolower($addMode);
+ // Convert mode to upper-case
+ $addMode = strtoupper($addMode);
// When $userid = '0' add points to jackpot
if (($userid == '0') && (isExtensionActive('jackpot'))) {
// Count up referal depth
if (!isset($GLOBALS['ref_level'])) {
// Initialialize referal system
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>): Referal system initialized!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ' Referal system initialized!');
$GLOBALS['ref_level'] = '0';
} else {
// Increase referal level
$GLOBALS['ref_level']++;
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>): Referal level increased. DEPTH='.$GLOBALS['ref_level']);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ' Referal level increased. DEPTH='.$GLOBALS['ref_level']);
}
// Check user account
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid.',points='.$points);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.$userid.',points='.$points);
if (fetchUserData($userid)) {
// Determine wether the user has some mails to click before he/she gets the points
$locked = ifUserPointsLocked($userid);
// Get percents
$per = getReferalLevelPercents($GLOBALS['ref_level']);
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid.',points='.$points.',depth='.$GLOBALS['ref_level'].',per='.$per.',mode='.$addMode);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.$userid.',points='.$points.',depth='.$GLOBALS['ref_level'].',per='.$per.',mode='.$addMode);
// Some percents found?
if ($per > 0) {
// Calculate new points
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid.',points='.$points.',per='.$per.',depth='.$GLOBALS['ref_level']);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.$userid.',points='.$points.',per='.$per.',depth='.$GLOBALS['ref_level']);
$ref_points = $points * $per / 100;
// Pay refback here if level > 0 and in ref-mode
- if ((isExtensionActive('refback')) && ($GLOBALS['ref_level'] > 0) && ($per < 100) && ($addMode == 'ref') && (isset($GLOBALS['cache_array']['add_userid'][$userid]))) {
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid.',data='.$GLOBALS['cache_array']['add_userid'][$userid].',ref_points='.$ref_points.',depth='.$GLOBALS['ref_level'].' - BEFORE!');
+ if ((isExtensionActive('refback')) && ($GLOBALS['ref_level'] > 0) && ($per < 100) && ($addMode == 'REFERAL') && (isset($GLOBALS['cache_array']['add_userid'][$userid]))) {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.$userid.',data='.$GLOBALS['cache_array']['add_userid'][$userid].',ref_points='.$ref_points.',depth='.$GLOBALS['ref_level'].' - BEFORE!');
$ref_points = addRefbackPoints($GLOBALS['cache_array']['add_userid'][$userid], $userid, $points, $ref_points);
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid.',data='.$GLOBALS['cache_array']['add_userid'][$userid].',ref_points='.$ref_points.',depth='.$GLOBALS['ref_level'].' - AFTER!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.$userid.',data='.$GLOBALS['cache_array']['add_userid'][$userid].',ref_points='.$ref_points.',depth='.$GLOBALS['ref_level'].' - AFTER!');
} // END - if
// Update points...
bigintval($userid),
bigintval($GLOBALS['ref_level'])
), __FUNCTION__, __LINE__);
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):pointsColumn='.$pointsColumn.',ref_points='.$ref_points.',userid='.$userid.',depth='.$GLOBALS['ref_level'].',mode='.$addMode.' - UPDATE! ('.SQL_AFFECTEDROWS().')');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'pointsColumn='.$pointsColumn.',ref_points='.$ref_points.',userid='.$userid.',depth='.$GLOBALS['ref_level'].',mode='.$addMode.' - UPDATE! ('.SQL_AFFECTEDROWS().')');
// No entry updated?
if (SQL_HASZEROAFFECTED()) {
bigintval($GLOBALS['ref_level']),
$ref_points
), __FUNCTION__, __LINE__);
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):data='.$pointsColumn.',ref_points='.$ref_points.',userid='.$userid.',depth='.$GLOBALS['ref_level'].',mode='.$addMode.' - INSERTED! ('.SQL_AFFECTEDROWS().')');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'data='.$pointsColumn.',ref_points='.$ref_points.',userid='.$userid.',depth='.$GLOBALS['ref_level'].',mode='.$addMode.' - INSERTED! ('.SQL_AFFECTEDROWS().')');
} // END - if
// Check affected rows
$added = SQL_AFFECTEDROWS();
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):added='.intval($added));
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'added='.intval($added));
// Prepare data for the filter
$filterData = array(
// Extract $added
$added = $filterData['added'];
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):added='.intval($added));
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'added='.intval($added));
// Points updated, maybe I shall send him an email?
if (($sendNotify === true) && (isValidUserId(getUserData('refid'))) && ($locked === false)) {
// Send email
sendEmail($userid, '{--THANX_REFERAL_ONE_SUBJECT--}', $message);
- } elseif (($sendNotify === true) && (!isValidUserId(getUserData('refid'))) && ($locked === false) && ($addMode == 'direct')) {
+ } elseif (($sendNotify === true) && (!isValidUserId(getUserData('refid'))) && ($locked === false) && ($addMode == 'DIRECT')) {
// Prepare content
$content = array(
'reason' => '{--REASON_DIRECT_PAYMENT--}',
}
// Maybe there's another ref?
- if ((isValidUserId(getUserData('refid'))) && ($points > 0) && (getUserData('refid') != $userid) && ($addMode == 'ref')) {
+ if ((isValidUserId(getUserData('refid'))) && ($points > 0) && (getUserData('refid') != $userid) && ($addMode == 'REFERAL')) {
// Then let's credit him here...
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid.',ref='.getUserData('refid').',points='.$points.' - ADVANCE!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.$userid.',ref='.getUserData('refid').',points='.$points.' - ADVANCE!');
$added = ($added && addPointsThroughReferalSystem(sprintf("%s_ref:%s", $subject, $GLOBALS['ref_level']), getUserData('refid'), $points, $sendNotify, getUserData('refid')));
} // END - if
} // END - if
function updateReferalCounter ($userid) {
// Make it sure referal level zero (member him-/herself) is at least selected
if (empty($GLOBALS['cache_array']['ref_level'][$userid])) $GLOBALS['cache_array']['ref_level'][$userid] = 1;
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid.',level='.$GLOBALS['cache_array']['ref_level'][$userid]);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.$userid.',level='.$GLOBALS['cache_array']['ref_level'][$userid]);
// Update counter
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET `counter`=`counter`+1 WHERE `userid`=%s AND `level`='%s' LIMIT 1",
array(bigintval($userid), $GLOBALS['cache_array']['ref_level'][$userid]), __FUNCTION__, __LINE__);
// When no entry was updated then we have to create it here
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):updated=' . SQL_AFFECTEDROWS());
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'updated=' . SQL_AFFECTEDROWS());
if (SQL_HASZEROAFFECTED()) {
// First count!
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refsystem` (`userid`, `level`, `counter`) VALUES (%s,%s,1)",
bigintval($userid),
$GLOBALS['cache_array']['ref_level'][$userid]
), __FUNCTION__, __LINE__);
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.$userid);
} // END - if
// Init referal id
$ref = getUserData('refid');
} // END - if
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid.',ref='.$ref);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.$userid.',ref='.$ref);
// When he has a referal...
if (($ref > 0) && ($ref != $userid)) {
// Move to next referal level and count his counter one up!
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):ref='.$ref.' - ADVANCE!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ref='.$ref.' - ADVANCE!');
$GLOBALS['cache_array']['ref_level'][$userid]++;
updateReferalCounter($ref);
} elseif ((($ref == $userid) || ($ref == '0')) && (isExtensionInstalledAndNewer('cache', '0.1.2'))) {
// Remove cache here
- //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):ref='.$ref.' - CACHE!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ref='.$ref.' - CACHE!');
rebuildCache('refsystem', 'refsystem');
}
), __FUNCTION__, __LINE__);
}
-// Determines database column name from given subject and locked
-function determinePointsColumnFromSubjectLocked ($subject, $locked) {
- // Default is 'normal' points
- $pointsColumn = 'points';
-
- // Which points, locked or normal?
- if ($locked === true) {
- $pointsColumn = 'locked_points';
- } // END - if
-
- // Prepare array for filter
- $filterData = array(
- 'subject' => $subject,
- 'locked' => $locked,
- 'column' => $pointsColumn
- );
-
- // Run the filter
- $filterData = runFilterChain('determine_points_column_name', $filterData);
-
- // Extract column name from array
- $pointsColumn = $filterData['column'];
-
- // Return it
- return $pointsColumn;
-}
-
// [EOF]
?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 09/14/2008 *
+ * =================== Last change: 09/14/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : purge- *
+ * -------------------------------------------------------------------- *
+ * Short description : *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.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 *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Abort if autopurge is not active or disabled by admin
+if ((!isExtensionActive('autopurge')) || (getConfig('auto_purge_active') != 'Y')) {
+ // Abort here
+ return false;
+} // END - if
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 09/14/2008 *
+ * =================== Last change: 09/14/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : purge-general.php *
+ * -------------------------------------------------------------------- *
+ * Short description : General autopurging, nothing extension-specific *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Allgemeine, nicht erweiterunsabhaengige Auto- *
+ * Loeschung *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.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 *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} elseif ((!isExtensionActive('autopurge')) || (!isAutoPurgingActive())) {
+ // Abort here
+ return false;
+}
+
+if (getAutoPurge() > 0) {
+ // Init SQLs
+ initSqls();
+
+ // Init variables
+ $admin_points = '0';
+
+ // Then check for outdated mail order. We don't delete them just the confirmation links will be deleted.
+ $result = SQL_QUERY('SELECT
+ s.id, s.userid, s.pool_id, t.price
+FROM
+ `{?_MYSQL_PREFIX?}_user_stats` AS s
+LEFT JOIN
+ `{?_MYSQL_PREFIX?}_payments` AS t
+ON
+ s.`payment_id`=t.`id`
+WHERE
+ (UNIX_TIMESTAMP() - s.`timestamp_ordered`) >= {?auto_purge?}
+ORDER BY
+ s.userid ASC', __FILE__, __LINE__);
+ if (!SQL_HASZERONUMS($result)) {
+ // Start deleting procedure
+ $userid = '0'; $points = '0';
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Check if confirmation links are purged or not
+ $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s LIMIT 1",
+ array(bigintval($content['id'])), __FILE__, __LINE__);
+ if (SQL_NUMROWS($result_links) == 1) {
+ // Free memory
+ SQL_FREERESULT($result_links);
+
+ // At least one link was found, enougth to pay back the points
+ if (($userid != $content['userid']) && (isValidUserId($userid)) && ($points > 0)) {
+ // Directly add points back to senders account
+ addPointsAutoPurge($userid, $points);
+ $points = '0';
+ } // END - if
+
+ // Add points
+ $userid = $content['userid']; $points += $content['price']; $admin_points += $content['price'];
+
+ // Remove confirmation links from queue
+ addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s",
+ array(bigintval($content['id'])), __FILE__, __LINE__, false));
+
+ // Update status of order
+ addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='DELETED' WHERE `id`=%s LIMIT 1",
+ array(bigintval($content['pool_id'])), __FILE__, __LINE__, false));
+ } // END - if
+ } // END - while
+
+ // Add last points to last user account
+ if ($points > 0) addPointsAutoPurge($userid, $points);
+ } // END - if
+
+ // Free memory
+ SQL_FREERESULT($result);
+
+ // Is the 'bonus' extension installed and activated?
+ if (isExtensionActive('bonus', true)) {
+ // Check for bonus campaigns
+ $result = SQL_QUERY("SELECT `id`, `points` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `data_type`='SEND' AND `timestamp` <= {?auto_purge?} ORDER BY `id` ASC", __FILE__, __LINE__);
+ if (!SQL_HASZERONUMS($result)) {
+ // Start deleting procedure
+ $points = '0';
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Check if confirmation links are purged or not
+ $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",
+ array(bigintval($content['id'])), __FILE__, __LINE__);
+ if (!SQL_HASZERONUMS($result_links)) {
+ // At least one link was found, enougth to pay back the points
+ $points += $content['points'] * SQL_NUMROWS($result_links);
+
+ // Free memory
+ SQL_FREERESULT($result_links);
+
+ // Remove confirmation links from queue
+ addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",
+ array(bigintval($content['id'])), __FILE__, __LINE__, false));
+
+ // Update status of order
+ addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='DELETED' WHERE `id`=%s LIMIT 1",
+ array(bigintval($content['id'])), __FILE__, __LINE__, false));
+ } // END - if
+ } // END - while
+
+ // Add points to jackpot
+ if (isExtensionActive('jackpot')) addPointsToJackpot($points);
+
+ // Add points for the admin
+ $admin_points += $points;
+ } // END - if
+
+ // Free memory
+ SQL_FREERESULT($result);
+ } // END - if
+
+ // Add points from deleted accounts to jackpot, but here just add to notify mail
+ if ($admin_points > 0) {
+ // Send mail to admin
+ sendAdminNotification('{--ADMIN_AUTOPURGE_SUBJECT--}', 'admin_autopurge_points', $admin_points);
+ } // END - if
+
+ // Run all SQLs here
+ runFilterChain('run_sqls');
+} // END - if
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 09/14/2008 *
+ * =================== Last change: 09/14/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : purge-inactive.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Purge of inactive users *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Auto-Loeschung von inaktiven Mitgliedern *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.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 *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Abort if autopurge is not active or disabled by admin
+if ((!isExtensionActive('autopurge')) || (!isAutoPurgingActive())) {
+ // Abort here
+ return false;
+} // END - if
+
+// Shall I look for inactive accounts and autopurge inactive accounts?
+if (isAutopurgeInactiveEnabled()) {
+ // Init SQLs
+ initSqls();
+
+ // Init exclusion list
+ // @TODO Rewrite these if() blocks to a filter
+ $EXCLUDE_LIST = '';
+ if (isValidUserId(getDefRefid())) $EXCLUDE_LIST .= ' AND `userid` != {?def_refid?}';
+
+ // Check for more extensions
+ if (isExtensionActive('beg')) $EXCLUDE_LIST .= ' AND `userid` != {?beg_userid?}';
+ if (isExtensionActive('bonus')) $EXCLUDE_LIST .= ' AND `userid` != {?bonus_userid?}';
+ if (isExtensionActive('doubler')) $EXCLUDE_LIST .= ' AND `userid` != {?doubler_userid?}';
+
+ // Check for new holiday extension
+ if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
+ // Include only users with no active holiday
+ $EXCLUDE_LIST .= " AND `holiday_active`='N'";
+ } // END - if
+
+ // Check for all accounts
+ $result_inactive = SQL_QUERY("SELECT
+ `userid`, `email`, `last_online`
+FROM
+ `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+ `status`='CONFIRMED' AND
+ (UNIX_TIMESTAMP() - `joined`) >= {?ap_inactive_since?} AND
+ (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?} AND
+ (UNIX_TIMESTAMP() - `ap_notified`) >= {?ap_inactive_since?}
+ " . $EXCLUDE_LIST . "
+ORDER BY
+ `userid` ASC", __FILE__, __LINE__);
+
+ if (!SQL_HASZERONUMS($result_inactive)) {
+ // Prepare variables and constants...
+ $useridsContent = '';
+ $content['since'] = (getApInactiveSince() / 60 / 60);
+ $content['time'] = (getApInactiveTime() / 60 / 60);
+
+ // Mark found accounts as inactive and send an email
+ while ($row = SQL_FETCHARRAY($result_inactive)) {
+ // Merge both arrays
+ $content = merge_array($content, $row);
+
+ // Remember userids for the admin
+ $useridsContent .= $content['userid'] . ', ';
+
+ // Get date/time from timestamp
+ $content['last_online'] = generateDateTime($content['last_online'], 0);
+
+ // Load mail template
+ $message = loadEmailTemplate('member_autopurge_inactive', $content, bigintval($content['userid']));
+ sendEmail($content['email'], '{--MEMBER_AUTOPURGE_INACTIVE_SUBJECT--}', $message);
+
+ // Update this account
+ addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ap_notified`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1",
+ array(bigintval($content['userid'])), __FILE__, __LINE__, false));
+ } // END - while
+
+ // Remove last comma
+ $useridsContent = str_replace(', ', "\n", substr($useridsContent, 0, -2));
+
+ // Send mail notification to admin
+ sendAdminNotification('{--ADMIN_AUTOPURGE_INACTIVE_SUBJECT--}', 'admin_autopurge_inactive', $useridsContent);
+ } // END - if
+
+ // Free memory
+ SQL_FREERESULT($result_inactive);
+
+ // Now let's have a look for inactive accounts we want to delete we newly use the same exclude list
+ // here for e.g. excluding holiday users
+ $result_inactive = SQL_QUERY("SELECT
+ `userid`, `email`, `last_online`
+FROM
+ `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+ `status`='CONFIRMED' AND
+ (UNIX_TIMESTAMP() - `joined`) >= {?ap_inactive_since?} AND
+ (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?} AND
+ (UNIX_TIMESTAMP() - `ap_notified`) >= {?ap_inactive_time?}
+" . $EXCLUDE_LIST . "
+ORDER BY
+ `userid` ASC", __FILE__, __LINE__);
+
+ if (!SQL_HASZERONUMS($result_inactive)) {
+ // Prepare userid array for admin...
+ $userids = array();
+
+ // Delete inactive accounts
+ while ($content = SQL_FETCHARRAY($result_inactive)) {
+ // Remember userids for the admin
+ $useridsContent[] = $content['userid'];
+
+ // Get date/time from timestamp
+ $content['last_online'] = generateDateTime($content['last_online'], 0);
+
+ // Finnaly delete this inactive account
+ deleteUserAccount($content['userid'], loadEmailTemplate('member_autopurge_delete', $content['last_online'], ''));
+ } // END - while
+
+ // Display all userids
+ $useridsContent = implode("\n", $userids);
+
+ // Send mail notification to admin
+ if (getConfig('ap_in_notify') == 'Y') {
+ sendAdminNotification('{--ADMIN_AUTOPURGE_DELETE_SUBJECT--}', 'admin_autopurge_delete', $useridsContent);
+ } // END - if
+ } // END - if
+
+ // Free memory
+ SQL_FREERESULT($result_inactive);
+
+ // Run all SQLs
+ runFilterChain('run_sqls');
+} // END - if
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 05/29/2004 *
+ * =================== Last change: 11/26/2004 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : autopurge.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Automatical purging of outdated mail links *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Auto-Loeschung von veralteten Mail-Links *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.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 *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Abort if autopurge is not active or disabled by admin
+if ((!isExtensionActive('autopurge')) || (!isAutoPurgingActive()) || (getConfig('ap_del_mails') != 'Y')) {
+ // Abort here
+ return false;
+} // END - if
+
+// Okay, let's check for deleted mails
+$result_mails = SQL_QUERY("SELECT
+ `sender`
+FROM
+ `{?_MYSQL_PREFIX?}_pool`
+WHERE
+ `data_type`='DELETED' AND
+ (UNIX_TIMESTAMP() - `timestamp`) >= {?ap_dm_timeout?}
+ORDER BY
+ `sender` ASC", __FILE__, __LINE__);
+
+// Reset counter...
+$deletedStats = '0';
+
+// Do we have "purged" mails?
+if (!SQL_HASZERONUMS($result_mails)) {
+ // Okay, check for their sender's
+ while ($content = SQL_FETCHARRAY($result_mails)) {
+ // Check now...
+ if (!fetchUserData($content['sender'])) {
+ // Okay we found some mails!
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_pool` WHERE `sender`=%s",
+ array(bigintval($content['sender'])), __FILE__, __LINE__);
+
+ // Get all affected (deleted) rows
+ $deletedStats += SQL_AFFECTEDROWS();
+
+ // Reset query (to prevent possible errors) ...;
+ $result_mails = SQL_QUERY("SELECT
+ `sender`
+FROM
+ `{?_MYSQL_PREFIX?}_pool`
+WHERE
+ `data_type`='DELETED' AND
+ (UNIX_TIMESTAMP() - `timestamp`) >= {?ap_dm_timeout?}
+ORDER BY
+ `sender` ASC", __FILE__, __LINE__);
+ } // END - if
+ } // END - while
+} // END - if
+
+// Free memory
+SQL_FREERESULT($result_mails);
+
+// Now let's check for stats entries as well;
+$result_mails = SQL_QUERY("SELECT
+ `userid` AS `sender`
+FROM
+ `{?_MYSQL_PREFIX?}_user_stats`
+WHERE
+ (UNIX_TIMESTAMP() - `timestamp_send`) >= {?ap_dm_timeout?}
+ORDER BY
+ `userid` ASC", __FILE__, __LINE__);
+
+// Do we have "purged" mails?
+if (!SQL_HASZERONUMS($result_mails)) {
+ // Okay, check for their sender's
+ while ($content = SQL_FETCHARRAY($result_mails)) {
+ // Check now...
+ if (!fetchUserData($content['sender'])) {
+ // Okay we found some mails!
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `userid`=%s",
+ array(bigintval($content['sender'])), __FILE__, __LINE__);
+
+ // Get all affected (deleted) rows
+ $deletedStats += SQL_AFFECTEDROWS();
+
+ // Reset query (to prevent possible errors) ...
+ $result_mails = SQL_QUERY("SELECT
+ `userid` AS `sender`
+FROM
+ `{?_MYSQL_PREFIX?}_user_stats`
+WHERE
+ (UNIX_TIMESTAMP() - `timestamp_send`) >= {?ap_dm_timeout?}
+ORDER BY
+ `userid` ASC", __FILE__, __LINE__);
+ } // END - if
+ } // END - while
+} // END - if
+
+// Free memory
+SQL_FREERESULT($result_mails);
+
+// Do we have deleted mails and the admin want's to receive a notification
+if (($deletedStats > 0) && (getConfig('ap_dm_notify') == 'Y')) {
+ // Send out email to admin
+ sendAdminNotification('{--ADMIN_AUTOPURGE_DELETE_MAILS_SUBJECT--}', 'admin_autopurge_del_mails', $deletedStats);
+} // END - if
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 09/14/2008 *
+ * =================== Last change: 09/14/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : purge-tsks.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Automatical purging of outdated mail links *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Auto-Loeschung von veralteten Mail-Links *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.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 *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Abort if autopurge is not active or disabled by admin
+if ((!isExtensionActive('autopurge')) || (!isAutoPurgingActive())) {
+ // Abort here
+ return false;
+} // END - if
+
+// Check version (must be >= 0.1.9)
+if ((isExtensionInstalledAndNewer('task', '0.1.9')) && (getConfig('autopurge_tasks') == 'Y')) {
+ // Purge deleted tasks (no notification to admin)
+ SQL_QUERY("DELETE LOW_PRIORITY
+FROM
+ `{?_MYSQL_PREFIX?}_task_system`
+WHERE
+ `status`='DELETED' AND
+ (UNIX_TIMESTAMP() - `task_created`) >= {?ap_tasks_time?}", __FILE__, __LINE__);
+
+ // Get deleted rows
+ $deletedTasks = SQL_AFFECTEDROWS();
+
+ // Do we need to send a notification?
+ if (($deletedTasks > 0) && (getConfig('ap_tasks_notify') == 'Y')) {
+ // Send out email to admin
+ sendAdminNotification('{--ADMIN_AUTOPURGE_TASKS_SUBJECT--}', 'admin_autopurge_tsks', $deletedTasks);
+ } // END - if
+} // END - if
+
+//
+?>
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 05/29/2004 *
+ * =================== Last change: 11/26/2004 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : autopurge.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Automatical purging of outdated mail links *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Auto-Loeschung von veralteten Mail-Links *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.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 *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Abort if autopurge is not active or disabled by admin
+if ((!isExtensionActive('autopurge')) || (!isAutoPurgingActive())) {
+ // Abort here
+ return false;
+} // END - if
+
+// Shall I auto-purge unconfirmed accounts?
+if (getConfig('autopurge_unconfirmed') == 'Y') {
+ // Init variables and find unconfirmed accounts which I shall auto-purge;
+ $result_uncon = SQL_QUERY("SELECT
+ `userid`, `email`, `joined`
+FROM
+ `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+ `status`='UNCONFIRMED' AND
+ (UNIX_TIMESTAMP() - `joined`) >= {?ap_unconfirmed_time?}
+ORDER BY
+ `userid` ASC", __FILE__, __LINE__);
+ if (!SQL_HASZERONUMS($result_uncon)) {
+ // Prepare variable...
+ $userids = '';
+ $content['time'] = (getApUnconfirmedTime() / 60 / 60);
+
+ // Delete inactive accounts
+ while ($row = SQL_FETCHARRAY($result_uncon)) {
+ // Merge both arrays
+ $content = merge_array($content, $row);
+
+ // Remember userids for the admin
+ $userids .= $content['userid'] . ', ';
+
+ // Get date/time from timestamp
+ $content['joined'] = generateDateTime($content['joined'], 0);
+
+ // Finnaly delete this inactive account
+ deleteUserAccount($content['userid'], loadEmailTemplate('member_autopurge_unconfirmed', $content, ''));
+ } // END - while
+
+ // Remove last comma
+ $userids = str_replace(', ', "\n", substr($userids, 0, -2));
+
+ // Send mail notification to admin
+ if (getConfig('ap_un_notify') == 'Y') {
+ sendAdminNotification('{--ADMIN_AUTOPURGE_UNCONFIRMED_SUBJECT--}', 'admin_autopurge_unconfirmed', $userids);
+ } // END - if
+ } // END - if
+
+ // Free memory
+ SQL_FREERESULT($result_uncon);
+} // END - if
+
+// [EOF]
+?>
// Add author to the Tag if the author is set and is not quix0r (lead coder)
if ((isset($GLOBALS['cache_array']['revision']['Author'][0])) && ($GLOBALS['cache_array']['revision']['Author'][0] != 'quix0r')) {
- $GLOBALS['cache_array']['revision']['Tag'][0] .= '-'.strtoupper($GLOBALS['cache_array']['revision']['Author'][0]);
+ $GLOBALS['cache_array']['revision']['Tag'][0] .= '-' . strtoupper($GLOBALS['cache_array']['revision']['Author'][0]);
} // END - if
} else {
unset($GLOBALS['ref_level']);
// Call more complicated method (due to more parameters)
- return addPointsThroughReferalSystem($subject, $userid, $points, false, 0, 'direct');
+ return addPointsThroughReferalSystem($subject, $userid, $points, false, 0, 'DIRECT');
}
// Wrapper for redirectToUrl but URL comes from a configuration entry
// Is an active-rallye running and this is not a notification mail?
if ((isBonusRallyeActive()) && ($notify != 'Y')) {
// Shall I exclude the webmaster's own userid from the active-rallye?
- if ((((getBonusUserId() == $userId) && (getConfig('bonus_include_own') == 'Y')) || (getBonusUserId() != $userId)) && (getDefRefid() != $userId)) {
+ if ((((getBonusUserid() == $userId) && (getConfig('bonus_include_own') == 'Y')) || (getBonusUserid() != $userId)) && (getDefRefid() != $userId)) {
// Add points and remember ranking are done in this function....
addTurboBonus($urlId, $userId, $type);
--- /dev/null
+Hallo Administrator,
+
+Es wurde soeben ein Gutschein erstellt.
+
+Hier sind alle Daten des Gutscheins: (keine Codes)
+--------------------------------------------------
+Gutschein-Id: $content[coupon_id]
+Alle User-Ids: $content[userids]
+Anzahl Gutscheine: $content[userid_count]
+Vergütung: {%pipe,translateComma=$content[points]%} {?POINTS?}
+Ablaufzeitpunkt: $content[coupon_expired]
+--------------------------------------------------
+Beschreibung/Hinweis:
+$content[coupon_description]
+--------------------------------------------------
+
+Mit freundlichen Grüßen,
+ Ihr {?MAIN_TITLE?} Team
+
+{?URL?}/login.php ({?WEBMASTER?})
--- /dev/null
+Hallo Administrator,
+
+Hier sind alle Daten des Gutscheins:
+------------------------------------
+Gutschein-Id: $content[coupon_id]
+Vergütung: {%pipe,translateComma=$content[points]%} {?POINTS?}
+Einstellungszeitpunkt: $content[coupon_created]
+Ablaufzeitpunkt: $content[coupon_expired]
+------------------------------------
+Beschreibung/Hinweis:
+$content[coupon_description]
+------------------------------------
+
+Daten des Mitgliedes:
+------------------------------
+Seine Mitglieder-Id ist: $userid
+------------------------------
+E-Mail Adresse: {%user,email=$userid%}
+------------------------------
+Vor-, Nachname: {%user,gender,translateGender=$userid%} {%user,surname=$userid%} {%user,family=$userid%}
+------------------------------
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
+------------------------------
+Browser: {%server,user_agent%}
+------------------------------
+
+Mit freundlichen Grüßen,
+ Ihr {?MAIN_TITLE?} Team
+
+{?URL?}/login.php ({?WEBMASTER?})
------------------------------
Vor-, Nachname: {%user,gender,translateGender=$userid%} {%user,surname=$userid%} {%user,family=$userid%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Browser: {%server,user_agent%}
------------------------------
------------------------------
Vor-, Nachname: {%user,gender,translateGender=$userid%} {%user,surname=$userid%} {%user,family=$userid%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Browser: {%server,user_agent%}
------------------------------
------------------------------------------
$content[message]
------------------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------------------
Browser: {%server,user_agent%}
------------------------------------------
------------------------------
Vor-, Nachname: {%user,gender,translateGender=$userid%} {%user,surname=$userid%} {%user,family=$userid%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Browser: {%server,user_agent%}
------------------------------
------------------------------
Seine Mitglieder-Id ist: $userid
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Browser: {%server,user_agent%}
------------------------------
------------------------------
Seine Mitglieder-Id ist: $userid
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Browser: {%server,user_agent%}
------------------------------
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
User-Id: {%user,userid%}
------------------------------
Sollten Sie dies nicht gewesen sein, so ignorieren Sie einfach diese Mail. Hier sind die IP-Nummer und Browserbezeichnung:
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Browser: {%server,user_agent%}
------------------------------
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Mit freundlichen Grüßen,
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Mit freundlichen Grüßen,
Hallo Administrator,
-soeben hat ein neuer Sponsor seine EMail-Adresse bestätigt. Dies wurde von der IP-Nummer {%server,remote_addr%} ({%server,real_ip_address%}) aus durchgeführt.
+soeben hat ein neuer Sponsor seine EMail-Adresse bestätigt. Dies wurde von der IP-Nummer {%server,remote_addr%} (Real: {%server,real_ip_address%}) aus durchgeführt.
Bitte setzen Sie sich mit ihm in Verbindung (die EMail-Adresse finden Sie weiter unten) und teilen Sie ihm Ihre Kontoverbindung mit!
Hallo Administrator,
-soeben hat sich ein neuer Sponsor zu unserem {?mt_word?} mit der IP-Nummer {%server,remote_addr%} ({%server,real_ip_address%}) angemeldet. Er wird als nächstes seine EMail-Adresse bestätigen.
+soeben hat sich ein neuer Sponsor zu unserem {?mt_word?} mit der IP-Nummer {%server,remote_addr%} (Real: {%server,real_ip_address%}) angemeldet. Er wird als nächstes seine EMail-Adresse bestätigen.
Folgende Daten wurden dabei übermittelt:
------------------------------
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Die restliche Daten können Sie im Admin-Bereich einsehen.
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Mit freundlichen Grüßen,
------------------------------
Vor-, Nachname: {%user,gender,translateGender=$userid%} {%user,surname=$userid%} {%user,family=$userid%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Browser: {%server,user_agent%}
------------------------------
------------------------------
Vor-, Nachname: {%user,gender,translateGender=$userid%} {%user,surname=$userid%} {%user,family=$userid%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Browser: {%server,user_agent%}
------------------------------
------------------------------
Vor-, Nachname: {%user,gender,translateGender=$userid%} {%user,surname=$userid%} {%user,family=$userid%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Browser: {%server,user_agent%}
------------------------------
Vollst. Name: {%pipe,translateGender=$content[sender][gender]%} $content[sender][surname] $content[sender][family]
Email-Adresse: $content[sender][email]
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
Browser : {%server,user_agent%}
------------------------------
Verwendungszweck: $content[reason]
------------------------------
Seine Mitglieder-Id ist: $userid
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Browser: {%server,user_agent%}
------------------------------
------------------------------------
$content
------------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------------
Browser: {%server,user_agent%}
------------------------------------
------------------------------------
$content
------------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------------
Browser: {%server,user_agent%}
------------------------------------
Hier ist Ihr persönlicher Gutscheincode, den nur Sie kennen:
$content[coupon_code]
-Sie können diesen im Mitgliedbereich bis zum $content[coupon_expires] einlösen.
+Sie können diesen im Mitgliedbereich bis zum $content[coupon_expired] einlösen.
Sie können den Empfang von Gutscheinen jederzeit im Mitgliedsbereich unter Gutscheine->Gutschein einlösen abbestellen und auch wieder bestellen.
{--EMAIL--}: {%user,email=$userid%}
{--PASS_1--}: $content[pass1]
------------------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------------------
Browser: {%server,user_agent%}
------------------------------------------
Neues Passwort: $content[new_pass]
Sie können sich nun hier einloggen:: {?URL?}/login.php
------------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------------
Browser: {%server,user_agent%}
------------------------------------
Betreffzeile in den Mails: $content[subject]
Gebuchte URL: $content[url]
------------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------------
Browser: {%server,user_agent%}
------------------------------------------------
Email-Adresse: {%user,email=$userid%}
Geburtsdatum: $content[birthday]
-------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
-------------------------
Browser: {%server,user_agent%}
-------------------------
Hallo {%sponsor,gender,translateGender=$content[id]%} {%sponsor,surname=$content[id]%} {%sponsor,family=$content[id]%},
-Sie (oder ein anderer mit der IP-Nummer {%server,remote_addr%} ({%server,real_ip_address%})) haben soeben Ihren Bestätigungslink erneut angefordert.
+Sie (oder ein anderer mit der IP-Nummer {%server,remote_addr%} (Real: {%server,real_ip_address%})) haben soeben Ihren Bestätigungslink erneut angefordert.
Hier ist Ihr Link:
------------------------------
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Angemeldet am: $content[sponsor_created]
------------------------------
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Mit freundlichen Grüßen,
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Mit freundlichen Grüßen,
Hallo {%sponsor,gender,translateGender=$content[id]%} {%sponsor,surname=$content[id]%} {%sponsor,family=$content[id]%},
-Sie (oder ein anderer mit der IP-Nummer {%server,remote_addr%} ({%server,real_ip_address%})) haben sich soeben als Sponsor zu unserem {?mt_word?} angemeldet. Sie haben somit den ersten Schritt zu uns getan wofür wir uns sehr bedanken.
+Sie (oder ein anderer mit der IP-Nummer {%server,remote_addr%} (Real: {%server,real_ip_address%})) haben sich soeben als Sponsor zu unserem {?mt_word?} angemeldet. Sie haben somit den ersten Schritt zu uns getan wofür wir uns sehr bedanken.
Als nächstes müssen Sie Ihre EMail-Adresse bestätigen. Dieser Schritt ist erforderlich, um sicher zu gehen, dass auch kein anderer Sie angemeldet hat.
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Angemeldet am: $content[timestamp]
------------------------------
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Mit freundlichen Grüßen,
Hallo {%sponsor,gender,translateGender=$content[id]%} {%sponsor,surname=$content[id]%} {%sponsor,family=$content[id]%},
-Sie (oder ein anderer mit der IP-Nummer {%server,remote_addr%} ({%server,real_ip_address%})) haben soeben ein neues Passwort angefordert.
+Sie (oder ein anderer mit der IP-Nummer {%server,remote_addr%} (Real: {%server,real_ip_address%})) haben soeben ein neues Passwort angefordert.
Hier sind Ihre neuen Zugangsdaten:
------------------------------
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Angemeldet am: $content[sponsor_created]
------------------------------
Hallo {%sponsor,gender,translateGender=$content[id]%} {%sponsor,surname=$content[id]%} {%sponsor,family=$content[id]%},
-Sie haben soeben Ihre EMail-Adresse bestätigt. Dies wurde von der IP-Nummer {%server,remote_addr%} ({%server,real_ip_address%}) aus durchgeführt.
+Sie haben soeben Ihre EMail-Adresse bestätigt. Dies wurde von der IP-Nummer {%server,remote_addr%} (Real: {%server,real_ip_address%}) aus durchgeführt.
Wir werden uns bald mit Ihnen in Verbindung setzen und Ihnen unsere Kontodaten mitteilen. Zu unserer Sicherheit haben wir diese hier nicht aufgelistet. Bitte notieren Sie sich vorab folgende Daten:
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Mit freundlichen Grüßen,
Hallo {%sponsor,gender,translateGender=$content[id]%} {%sponsor,surname=$content[id]%} {%sponsor,family=$content[id]%},
-Sie (oder ein anderer mit der IP-Nummer {%server,remote_addr%} ({%server,real_ip_address%})) haben soeben Ihren Bestätigungslink erneut angefordert.
+Sie (oder ein anderer mit der IP-Nummer {%server,remote_addr%} (Real: {%server,real_ip_address%})) haben soeben Ihren Bestätigungslink erneut angefordert.
Hier ist Ihr Link:
------------------------------
------------------------------
Verwendeter Browser: {%server,user_agent%}
------------------------------
-IP-Nummer: {%server,remote_addr%} ({%server,real_ip_address%})
+IP-Nummer: {%server,remote_addr%} (Real: {%server,real_ip_address%})
------------------------------
Angemeldet am: $content[sponsor_created]
------------------------------
</tr>
<tr>
<td class="bottom" align="right" height="20">
- <input type="radio" class="form_field" name="beg_mode" value="DIRECT"$content[beg_mode_direct] /> {--BEG_MODE_DIRECT--}
+ <input type="radio" class="form_field" name="beg_mode" value="DIRECT"$content[beg_mode_direct] />
+ {--ADMIN_CONFIG_PAYMENT_MODE_DIRECT--}
</td>
<td class="bottom" align="center">
- <input type="radio" class="form_field" name="beg_mode" value="REF"$content[beg_mode_ref] /> {--BEG_MODE_REF--}
+ <input type="radio" class="form_field" name="beg_mode" value="REF"$content[beg_mode_ref] />
+ {--ADMIN_CONFIG_PAYMENT_MODE_REF--}
</td>
</tr>
<tr>
<tr>
<td class="bottom" align="right">
<input type="radio" class="form_field" name="birthday_mode" value="DIRECT"$content[mode_direct] />
- {--ADMIN_BIRTHDAY_MODE_DIRECT--}
+ {--ADMIN_CONFIG_PAYMENT_MODE_DIRECT--}
</td>
<td class="bottom" align="center">
<input type="radio" class="form_field" name="birthday_mode" value="REF"$content[mode_ref] />
- {--ADMIN_BIRTHDAY_MODE_REF--}
+ {--ADMIN_CONFIG_PAYMENT_MODE_REF--}
</td>
</tr>
<tr>
</td>
</tr>
<tr>
- <td class="bottom" align="right">{--ADMIN_BONUS_USERID--}:</td>
+ <td class="bottom" align="right">{--ADMIN_CONFIG_BONUS_USERID--}:</td>
<td class="bottom" align="center">
$content[bonus_userid]
</td>
$content[coupon_default_time_selection]
</td>
</tr>
+ <tr>
+ <td class="bottom" align="right">{--ADMIN_CONFIG_COUPON_AUTOPURGE_TIME--}:</td>
+ <td class="bottom" align="center">
+ $content[coupon_autopurge_time_selection]
+ </td>
+ </tr>
<tr>
<td class="bottom" align="right">{--ADMIN_CONFIG_COUPON_DEFAULT_POINTS--}:</td>
<td class="bottom" align="center">
<span class="tiny">({?POINTS?})</span>
</td>
</tr>
+ <tr>
+ <td colspan="2" align="center" class="table_header bottom">
+ <strong>{--ADMIN_CONFIG_COUPON_SELECT_PAYMENT_METHOD--}</strong>
+ </td>
+ </tr>
+ <tr>
+ <td class="bottom" align="right" height="20">
+ <input type="radio" class="form_field" name="coupon_payment_method" value="DIRECT"$content[coupon_payment_method_direct] />
+ {--ADMIN_CONFIG_PAYMENT_MODE_DIRECT--}
+ </td>
+ <td class="bottom" align="center">
+ <input type="radio" class="form_field" name="coupon_payment_method" value="REF"$content[coupon_payment_method_ref] />
+ {--ADMIN_CONFIG_PAYMENT_MODE_REF--}
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center" class="table_header bottom">
+ <strong>{--ADMIN_CONFIG_COUPON_SELECT_POINTS_ACCOUNT--}</strong>
+ </td>
+ </tr>
+ <tr>
+ <td class="bottom" align="right" height="20">
+ <input type="radio" class="form_field" name="coupon_points_account" value="ORDER"$content[coupon_points_account_order] />
+ {--ADMIN_CONFIG_POINTS_ACCOUNT_ORDER--}
+ </td>
+ <td class="bottom" align="center">
+ <input type="radio" class="form_field" name="coupon_points_account" value="GENERAL"$content[coupon_points_account_general] />
+ {--ADMIN_CONFIG_POINTS_ACCOUNT_GENERAL--}
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center" class="table_header bottom">
+ <strong>{--ADMIN_CONFIG_COUPON_SELECT_LOCKED_POINTS_MODE--}</strong>
+ </td>
+ </tr>
+ <tr>
+ <td class="bottom" align="right" height="20">
+ <input type="radio" class="form_field" name="coupon_locked_points_mode" value="locked"$content[coupon_locked_points_mode_locked] />
+ {--ADMIN_CONFIG_LOCKED_POINTS_MODE_LOCKED--}
+ </td>
+ <td class="bottom" align="center">
+ <input type="radio" class="form_field" name="coupon_locked_points_mode" value="unlocked"$content[coupon_locked_points_mode_unlocked] />
+ {--ADMIN_CONFIG_LOCKED_POINTS_MODE_UNLOCKED--}
+ </td>
+ </tr>
+ <tr>
+ <td class="bottom" align="right">{--ADMIN_CONFIG_COUPON_USERID--}:</td>
+ <td class="bottom" align="center">
+ $content[coupon_userid]
+ </td>
+ </tr>
<tr>
<td class="table_footer" colspan="2" align="center">
<input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
<tr>
<td class="bottom" align="right" valign="top" style="padding-top:5px">{--ADMIN_SEND_COUPON_ENTER_DESCRIPTION--}:</td>
<td class="bottom" align="center">
- <textarea name="description" class="form_field" rows="10" cols="50"></textarea>
+ <textarea name="coupon_description" class="form_field" rows="10" cols="50"></textarea>
</td>
</tr>
<tr>