]> git.mxchange.org Git - mailer.git/commitdiff
Also reset (aka daily reset scripts) renamed. The naming 'reset' came from the time...
authorRoland Häder <roland@mxchange.org>
Thu, 6 Jan 2011 05:31:25 +0000 (05:31 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 6 Jan 2011 05:31:25 +0000 (05:31 +0000)
32 files changed:
.gitattributes
DOCS/TODOs.txt
inc/daily/.htaccess [new file with mode: 0644]
inc/daily/daily_ [new file with mode: 0644]
inc/daily/daily_100_bonus.php [new file with mode: 0644]
inc/daily/daily_autopurge.php [new file with mode: 0644]
inc/daily/daily_beg.php [new file with mode: 0644]
inc/daily/daily_birthday.php [new file with mode: 0644]
inc/daily/daily_bonus.php [new file with mode: 0644]
inc/daily/daily_doubler.php [new file with mode: 0644]
inc/daily/daily_engine.php [new file with mode: 0644]
inc/daily/daily_holiday.php [new file with mode: 0644]
inc/daily/daily_profile.php [new file with mode: 0644]
inc/daily/daily_surfbar.php [new file with mode: 0644]
inc/daily/daily_user.php [new file with mode: 0644]
inc/daily/daily_yoomedia.php [new file with mode: 0644]
inc/extensions/ext-bonus.php
inc/extensions/ext-order.php
inc/filters.php
inc/reset/reset_
inc/reset/reset_100_bonus.php
inc/reset/reset_autopurge.php
inc/reset/reset_beg.php
inc/reset/reset_birthday.php
inc/reset/reset_bonus.php
inc/reset/reset_daily.php
inc/reset/reset_doubler.php
inc/reset/reset_engine.php
inc/reset/reset_holiday.php
inc/reset/reset_profile.php
inc/reset/reset_surfbar.php
inc/reset/reset_yoomedia.php

index fe44c7ec96f593bee73131101f99bca0345763e3..c55771879b30e705c6e692c47b8c5d96fe7519b9 100644 (file)
@@ -111,6 +111,20 @@ inc/code-functions.php svneol=native#text/plain
 inc/config-functions.php -text svneol=unset#text/plain
 inc/config-global.php -text svneol=unset#text/plain
 inc/config-local.php.dist -text
+inc/daily/.htaccess svneol=native#text/plain
+inc/daily/daily_ -text
+inc/daily/daily_100_bonus.php svneol=native#text/plain
+inc/daily/daily_autopurge.php svneol=native#text/plain
+inc/daily/daily_beg.php svneol=native#text/plain
+inc/daily/daily_birthday.php svneol=native#text/plain
+inc/daily/daily_bonus.php svneol=native#text/plain
+inc/daily/daily_doubler.php svneol=native#text/plain
+inc/daily/daily_engine.php svneol=native#text/plain
+inc/daily/daily_holiday.php svneol=native#text/plain
+inc/daily/daily_profile.php svneol=native#text/plain
+inc/daily/daily_surfbar.php svneol=native#text/plain
+inc/daily/daily_user.php svneol=native#text/plain
+inc/daily/daily_yoomedia.php svneol=native#text/plain
 inc/databases.php -text svneol=unset#text/plain
 inc/db/.htaccess -text svneol=unset#text/plain
 inc/db/lib-mysql3.php -text svneol=unset#text/plain
index 0964cc015a905770a82347d068951ee69b0ec27b..434a16949ac32660583f13173e51441fe05d716e 100644 (file)
@@ -7,6 +7,8 @@
 ./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/daily/daily_beg.php:52:// @TODO This should be converted in a daily beg rallye
+./inc/daily/daily_birthday.php:92:                     // @TODO 4 is hard-coded here, should we move it out in config?
 ./inc/expression-functions.php:164:// @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again
 ./inc/expression-functions.php:46:     // @TODO is escapeQuotes() enougth for strings with single/double quotes?
 ./inc/extensions/ext-html_mail.php:136:                // @TODO Move these arrays into config
@@ -33,7 +35,7 @@
 ./inc/extensions/ext-network.php:37: * @TODO Yoo!Media: What is LayerAd compared to Layer click?            *
 ./inc/extensions/ext-network.php:91:           // @TODO network_type_handle is an internal name and needs documentation
 ./inc/extensions/ext-newsletter.php:218:               // @TODO Move these into configuration
-./inc/extensions/ext-order.php:335:            // @TODO This should be moved out to inc/reset/
+./inc/extensions/ext-order.php:335:            // @TODO This should be moved out to inc/daily/
 ./inc/extensions/ext-rallye.php:329:           // @TODO Move this code into rallye_functions.php
 ./inc/extensions/ext-rallye.php:92:            // @TODO Fix config_rallye_prices to list_rallye_prices
 ./inc/extensions/ext-yoomedia.php:121:         // @TODO Can this be moved into a database table?
 ./inc/mysql-manager.php:1977:// @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/reset/reset_beg.php:52:// @TODO This should be converted in a daily beg rallye
-./inc/reset/reset_birthday.php:92:                     // @TODO 4 is hard-coded here, should we move it out in config?
 ./inc/revision-functions.php:169:// @TODO This function does also set and get in 'cache_array'
 ./inc/template-functions.php:1043:                     // @TODO Deprecate this thing
 ./inc/template-functions.php:1054:                     // @TODO Deprecate this thing
 ./inc/loader/load_cache-revision.php:2:// @DEPRECATED
 ./inc/loader/load_cache-them.php:2:// @DEPRECATED
 ./inc/modules/admin/admin-inc.php:437:// @DEPRECATED
+./inc/reset/reset_100_bonus.php:2:// @DEPRECATED
+./inc/reset/reset_autopurge.php:2:// @DEPRECATED
+./inc/reset/reset_beg.php:2:// @DEPRECATED
+./inc/reset/reset_birthday.php:2:// @DEPRECATED
+./inc/reset/reset_bonus.php:2:// @DEPRECATED
+./inc/reset/reset_daily.php:2:// @DEPRECATED
+./inc/reset/reset_doubler.php:2:// @DEPRECATED
+./inc/reset/reset_engine.php:2:// @DEPRECATED
+./inc/reset/reset_holiday.php:2:// @DEPRECATED
+./inc/reset/reset_profile.php:2:// @DEPRECATED
+./inc/reset/reset_surfbar.php:2:// @DEPRECATED
+./inc/reset/reset_yoomedia.php:2:// @DEPRECATED
 ### ### template-warnings.log follows: ### ###
 Warning: Not parsing JavaScript templates/de/html/js/js_order_send.tpl.
 Warning: Not parsing JavaScript templates/de/html/js/js_cookies_disabled.tpl.
diff --git a/inc/daily/.htaccess b/inc/daily/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/daily/daily_ b/inc/daily/daily_
new file mode 100644 (file)
index 0000000..9e41885
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 12/27/2004 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_                                           *
+ * -------------------------------------------------------------------- *
+ * Short description : Things to be done on daily reset                 *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
+ * -------------------------------------------------------------------- *
+ * $Revision:: 2216                                                   $ *
+ * $Date:: 2010-11-10 00:04:18 +0100 (Wed, 10 Nov 2010)               $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author:: quix0r                                                   $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
+} elseif (!isExtensionActive('')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
diff --git a/inc/daily/daily_100_bonus.php b/inc/daily/daily_100_bonus.php
new file mode 100644 (file)
index 0000000..0fba064
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 10/25/2009 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_100_bonus.php                              *
+ * -------------------------------------------------------------------- *
+ * Short description : Check for 100% clickrate order                   *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Nach Mailbestaetigungen mit 100% Klickrate s.    *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
+} elseif (!isExtensionActive('bonus')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// Check for 100% klickrate mails
+$result_bonus = SQL_QUERY("SELECT
+       `id`, `userid`, `subject`, `timestamp_ordered`, `clicks`, `url`
+FROM
+       `{?_MYSQL_PREFIX?}_user_stats`
+WHERE
+       `max_rec`=`clicks` AND
+       `clicks` > 0 AND
+       `bonus_stats_active`='N'
+ORDER BY
+       `userid` ASC", __FILE__, __LINE__);
+
+if (!SQL_HASZERONUMS($result_bonus)) {
+       // We found some mail orders...
+       while ($content = SQL_FETCHARRAY($result_bonus)) {
+               // Add points
+               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_stats`=`bonus_stats`+{?bonus_stats?} WHERE `userid`=%s LIMIT 1",
+                       array(bigintval($content['userid'])), __FILE__, __LINE__);
+
+               // Translate some data
+               $content['timestamp'] = generateDateTime($content['timestamp_ordered'], 2);
+
+               // Load email template and send email
+               $message = loadEmailTemplate('member_stats_bonus', $content, bigintval($content['userid']));
+               sendEmail($content['userid'], '{--MEMBER_BONUS_STATS_SUBJECT--}', $message);
+
+               // Update database
+               $result_update = SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `bonus_stats_active`='Y' WHERE `id`=%s LIMIT 1",
+                       array(bigintval($content['id'])), __FILE__, __LINE__);
+       } // END - while
+
+       // Handle bonus points
+       handleBonusPoints(getConfig('bonus_stats'));
+} // END - if
+
+// Free memory
+SQL_FREERESULT($result_bonus);
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
diff --git a/inc/daily/daily_autopurge.php b/inc/daily/daily_autopurge.php
new file mode 100644 (file)
index 0000000..e2d13f9
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 10/27/2009 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_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, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
+} elseif (!isExtensionActive('autopurge')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// Init & set the include pool
+initIncludePool('autopurge');
+setIncludePool('autopurge', getArrayFromDirectory('inc/autopurge/', 'purge-'));
+
+// Run the filter
+runFilterChain('load_includes', 'autopurge');
+
+// Run filters for extra autopurge
+runFilterChain('extra_autopurge');
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
diff --git a/inc/daily/daily_beg.php b/inc/daily/daily_beg.php
new file mode 100644 (file)
index 0000000..e5a8b08
--- /dev/null
@@ -0,0 +1,58 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 10/22/2005 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_beg.php                                    *
+ * -------------------------------------------------------------------- *
+ * Short description : Reset begging points                             *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Erbettelten Punkte zuruecksetzen                 *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
+} elseif ((!isExtensionActive('beg')) || (!isBegRallyeEnabled())) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// @TODO This should be converted in a daily beg rallye
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
diff --git a/inc/daily/daily_birthday.php b/inc/daily/daily_birthday.php
new file mode 100644 (file)
index 0000000..3ecad9d
--- /dev/null
@@ -0,0 +1,127 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 10/24/2009 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_birthday.php                               *
+ * -------------------------------------------------------------------- *
+ * Short description : Sends out birthday mails on reset                *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Versendet Geburtstagsmails beim Reset            *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode
+       return;
+} elseif (!isExtensionActive('birthday')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// Get current day (01 to 31), month (01 to 12) and year (4-digits year)
+$day   = getDay();
+$month = getMonth();
+$year  = getYear();
+
+// Shall I include only active members?
+$add = '%s'; $value = '';
+if ((getConfig('birthday_active')) && (isExtensionActive('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getApInactiveSince() > 0)) {
+       $add = " AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})";
+} // END - if
+
+// Only confirmed members shall receive birthday mails...
+$result_birthday = SQL_QUERY_ESC("SELECT `userid`, `email`, `birth_year`
+FROM
+       `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+       `status`='CONFIRMED' AND
+       `birth_day`=%s AND
+       `birth_month`=%s AND
+       `birthday_sent` < (UNIX_TIMESTAMP() - ({?ONE_DAY?} * 364))
+       ".$add."
+ORDER BY
+       `userid` ASC",
+       array($day, $month, $value), __FILE__, __LINE__);
+
+if (!SQL_HASZERONUMS($result_birthday)) {
+       // Start sending out birthday mails
+       while ($content = SQL_FETCHARRAY($result_birthday)) {
+               // Calculate own timestamp for birthday and today
+               $bd  = $content['birth_year'] + 12 * $month + 365 * $day;
+               $now = $year  + 12 * $month + 365 * $day;
+
+               // Simply subtract both values and you got the age... :)
+               $age = $now - $bd;
+
+               if (getConfig('birthday_points') > 0) {
+                       // Add more entries to the array
+                       $content['age']    = $age;
+                       $content['check']  = '';
+
+                       // @TODO 4 is hard-coded here, should we move it out in config?
+                       for ($idx = '0'; $idx < 4; $idx++) {
+                               $content['check'] .= generateRandomCode('8', mt_rand(0, $month . $day), $content['userid'], ($age * ($idx + 1)));
+                       } // END - for
+
+                       // Insert row into database
+                       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_birthday` (`userid`, `points`, `chk_value`) VALUES (%s,{?birthday_points?},'%s' )",
+                               array(
+                                       bigintval($content['userid']),
+                                       $content['check']
+                               ), __FILE__, __LINE__);
+
+                       // Load email template with confirmation link
+                       $message = loadEmailTemplate('member_birthday_confirm', $content, bigintval($content['userid']));
+               } else {
+                       // Load default email template and fill in the age
+                       $message = loadEmailTemplate('member_birthday', $age, $content['userid']);
+               }
+
+               // Send email
+               sendEmail($content['email'], '{--MEMBER_HAPPY_BIRTHDAY_SUBJECT--}', $message);
+
+               // Remember him that he has received a birthday mail
+               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `birthday_sent`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1",
+                       array(bigintval($content['userid'])), __FILE__, __LINE__);
+       } // END - while
+
+       // Free memory
+       SQL_FREERESULT($result_birthday);
+} // END - if
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
diff --git a/inc/daily/daily_bonus.php b/inc/daily/daily_bonus.php
new file mode 100644 (file)
index 0000000..6391405
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 10/22/2005 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_bonus.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Reset bonus points                               *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Bonus-Punkte zuruecksetzen                       *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
+} elseif (!isExtensionActive('bonus')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// Purge expired entries in _bonus_turbo
+purgeExpiredTurboBonus();
+
+// Reset accounts
+SQL_QUERY('UPDATE
+       `{?_MYSQL_PREFIX?}_user_data`
+SET
+       `turbo_bonus`=0,
+       `login_bonus`=0,
+       `bonus_order`=0,
+       `bonus_stats`=0,
+       `bonus_ref`=0',
+       __FILE__, __LINE__);
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
diff --git a/inc/daily/daily_doubler.php b/inc/daily/daily_doubler.php
new file mode 100644 (file)
index 0000000..6d1a40d
--- /dev/null
@@ -0,0 +1,59 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 10/24/2009 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_doubler.php                                *
+ * -------------------------------------------------------------------- *
+ * Short description : Things to be done on daily reset                 *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
+} elseif ((!isExtensionActive('doubler')) || (getConfig('doubler_send_mode') != 'RESET')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// Include it
+loadIncludeOnce('inc/mails/doubler_mails.php');
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
diff --git a/inc/daily/daily_engine.php b/inc/daily/daily_engine.php
new file mode 100644 (file)
index 0000000..a9efa4b
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 12/27/2004 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_engine.php                                 *
+ * -------------------------------------------------------------------- *
+ * Short description : Things for the engine on daily reset             *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
+} elseif (!isExtensionActive('engine')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
diff --git a/inc/daily/daily_holiday.php b/inc/daily/daily_holiday.php
new file mode 100644 (file)
index 0000000..4c8058d
--- /dev/null
@@ -0,0 +1,129 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 12/10/2005 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_holiday.php                                *
+ * -------------------------------------------------------------------- *
+ * Short description : Things to be done on daily reset                 *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == 'RESET'))) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
+} elseif (!isExtensionActive('holiday')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// Check for holidays we need to enable and send email to user
+$result_main = SQL_QUERY("SELECT
+       `userid`, `holiday_activated`
+FROM
+       `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+       `holiday_activated` > 0 AND
+       `holiday_activated` < UNIX_TIMESTAMP() AND
+       `holiday_active`='N'
+ORDER BY
+       `holiday_activated` ASC",
+__FILE__, __LINE__);
+
+// Entries found?
+if (!SQL_HASZERONUMS($result_main)) {
+       // Init SQLs
+       initSqls();
+
+       // We have found at least one useraccount so let's check it...
+       while ($content = SQL_FETCHARRAY($result_main)) {
+               // Check if his holiday can be activated
+               $result_holiday = SQL_QUERY_ESC("SELECT
+       `holiday_start`, `holiday_end`
+FROM
+       `{?_MYSQL_PREFIX?}_user_holidays`
+WHERE
+       `userid`=%s AND
+       `holiday_start` <= UNIX_TIMESTAMP() AND
+       `holiday_end` > UNIX_TIMESTAMP()
+LIMIT 1",
+                       array(bigintval($content['userid'])), __FILE__, __LINE__);
+
+               // Do we have an entry?
+               if (SQL_NUMROWS($result_holiday) == 1) {
+                       // Okay, this user can be send away to holiday...
+                       $content = merge_array($content, SQL_FETCHARRAY($result_holiday));
+
+                       // Prepare all data for the template
+                       $content = merge_array($content, array(
+                               'activated' => generateDateTime($content['holiday_activated'], 1),
+                               'start'     => generateDateTime($content['holiday_start']    , 1),
+                               'end'       => generateDateTime($content['holiday_end']      , 1)
+                       ));
+
+                       // Send email to user
+                       $message = loadEmailTemplate('member_holiday_activated', $content, $content['userid']);
+                       sendEmail($content['userid'], '{--MEMBER_HOLIDAY_ACTIVATED_SUBJECT--}', $message);
+
+                       // Update account
+                       addSql(SQL_QUERY_ESC("UPDATE
+       `{?_MYSQL_PREFIX?}_user_data`
+SET
+       `holiday_active`='Y'
+WHERE
+       `userid`=%s
+LIMIT 1",
+                               array(bigintval($content['userid'])), __FILE__, __LINE__, false));
+               } // END - if
+
+               // Free memory
+               SQL_FREERESULT($result_holiday);
+       } // END - while
+
+       // Run all SQLs
+       runFilterChain('run_sqls');
+} // END - if
+
+// Free memory
+SQL_FREERESULT($result_main);
+
+// Stop currently activated holidays
+stopHolidays();
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
diff --git a/inc/daily/daily_profile.php b/inc/daily/daily_profile.php
new file mode 100644 (file)
index 0000000..dac81b6
--- /dev/null
@@ -0,0 +1,114 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 10/24/2009 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_profile.php                                *
+ * -------------------------------------------------------------------- *
+ * Short description : Sends out notifications to keep profiles updated *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Sendet Erinnerngen aus, damit die Profile        *
+ *                     von den Mitgliedern aktuell gehalten werden      *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
+} elseif (!isExtensionActive('profile')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+if ((isSendProfileUpdateEnabled()) && (getProfileUpdate() > 0) && (getResendProfileUpdate() > 0)) {
+       // Load personal data
+       $result = SQL_QUERY("SELECT
+       `userid`, `email`, `last_update`, `joined`
+FROM
+       `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+       `status`='CONFIRMED' AND (
+               (
+                       `last_update` < (UNIX_TIMESTAMP() - {?profile_update?}) AND
+                       `last_update` > 0 AND
+                       `last_profile_sent` < (UNIX_TIMESTAMP() - {?resend_profile_update?})
+               ) OR (
+                       `last_update` = 0 AND
+                       `last_profile_sent` = 0 AND
+                       `joined` < (UNIX_TIMESTAMP() - {?profile_update?})
+               )
+       )
+ORDER BY
+       `userid` ASC", __FILE__, __LINE__);
+
+       // Do we have some notifications to sent?
+       if (!SQL_HASZERONUMS($result)) {
+               // We need to send-out notifications...
+               while ($content = SQL_FETCHARRAY($result)) {
+                       // Translate timestamp
+                       $content['joined'] = generateDateTime($content['joined'], 0);
+
+                       if (round($content['last_update']) == '0') {
+                               // Has never changed his accont
+                               $content['last_update'] = '{--MEMBER_PROFILE_NEVER_CHANGED--}';
+                       } else {
+                               // Has changed his account
+                               $content['last_update'] = generateDateTime($content['last_update'], 0);
+                       }
+
+                       // Load email template and send mail away
+                       $message = loadEmailTemplate('member_profile', $content, bigintval($content['userid']));
+                       sendEmail($content['email'], '{--MEMBER_PROFILE_OUTDATED_SUBJECT--}', $message);
+
+                       // Update profile data
+                       SQL_QUERY_ESC("UPDATE
+       `{?_MYSQL_PREFIX?}_user_data`
+SET
+       `last_profile_sent`=UNIX_TIMESTAMP(),
+       `notified`='Y'
+WHERE
+       `userid`=%s
+LIMIT 1",
+                               array(bigintval($content['userid'])), __FILE__, __LINE__);
+               } // END - while
+       } // END - if
+
+       // Free result
+       SQL_FREERESULT($result);
+} // END - if
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
diff --git a/inc/daily/daily_surfbar.php b/inc/daily/daily_surfbar.php
new file mode 100644 (file)
index 0000000..fd6f64c
--- /dev/null
@@ -0,0 +1,61 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 09/08/2008 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_surfbar.php                                *
+ * -------------------------------------------------------------------- *
+ * Short description : Things to be done on daily reset                 *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
+} elseif (!isExtensionActive('surfbar')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// Reset surfbar counter
+updateConfiguration(array('surfbar_daily_counter', 'surfbar_yester_counter'), array(0, getConfig('surfbar_daily_counter')));
+setConfigEntry('surfbar_yester_counter', getConfig('surfbar_daily_counter'));
+setConfigEntry('surfbar_daily_counter' , 0);
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
diff --git a/inc/daily/daily_user.php b/inc/daily/daily_user.php
new file mode 100644 (file)
index 0000000..5c5e6ac
--- /dev/null
@@ -0,0 +1,149 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 04/20/2004 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_daily.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Things to do on daily reset                      *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
+} elseif (!isExtensionActive('sql_patches')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// Update user profiles
+if (isExtensionInstalledAndNewer('order', '0.1.1')) {
+       // Latest version
+       SQL_QUERY('UPDATE
+       `{?_MYSQL_PREFIX?}_user_data`
+SET
+       `receive_mails`=`max_mails`,
+       `mail_orders`=0
+WHERE
+       `receive_mails` != `max_mails`', __FILE__, __LINE__);
+} else {
+       // Obsolete version
+       SQL_QUERY('UPDATE
+       `{?_MYSQL_PREFIX?}_user_data`
+SET
+       `receive_mails`=`max_mails`
+WHERE
+       `receive_mails` != `max_mails`', __FILE__, __LINE__);
+}
+
+// Transfer points from locked_points to points
+$result_daily = SQL_QUERY("SELECT
+       `userid`
+FROM
+       `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+       `ref_payout`=0 AND
+       `status`='CONFIRMED'
+ORDER BY
+       `userid` ASC", __FILE__, __LINE__);
+
+//* DEBUG: */ debugOutput(basename(__FILE__) . ':payout=0;daily|numRows=' . SQL_NUMROWS($result_daily));
+if (!SQL_HASZERONUMS($result_daily)) {
+       // Init SQLs
+       initSqls();
+
+       // Start checking accounts which are on 0 confirmed-to-go mails
+       while ($content = SQL_FETCHARRAY($result_daily)) {
+               //* DEBUG: */ debugOutput(basename(__FILE__) . ':' . $content['userid']);
+               $result_points = SQL_QUERY_ESC("SELECT
+       `ref_depth`,
+       `locked_points`
+FROM
+       `{?_MYSQL_PREFIX?}_user_points`
+WHERE
+       `userid`=%s AND
+       `locked_points` != 0.00000
+ORDER BY
+       `ref_depth` ASC",
+                       array(bigintval($content['userid'])), __FILE__, __LINE__);
+
+               //* DEBUG: */ debugOutput(basename(__FILE__) . ':payout=0;points|numRows=' . SQL_NUMROWS($result_points));
+               if (!SQL_HASZERONUMS($result_points)) {
+                       // Ok transfer points
+                       while ($content2 = SQL_FETCHARRAY($result_points)) {
+                               // Merge both arrays
+                               $content = merge_array($content, $content2);
+
+                               //* DEBUG: */ debugOutput(basename(__FILE__) . ':userid=' . $content['userid'].',depth='.$content['ref_depth'].',locked='.$content['locked_points']);
+                               addSql(SQL_QUERY_ESC("UPDATE
+       `{?_MYSQL_PREFIX?}_user_points`
+SET
+       `points`=`points`+%s,
+       `locked_points`=0.00000
+WHERE
+       `userid`=%s AND
+       `ref_depth`=%d
+LIMIT 1",
+                                       array(
+                                               $content['locked_points'],
+                                               bigintval($content['userid']),
+                                               $content['ref_depth']
+                                       ), __FILE__, __LINE__, false));
+
+                               // Update mediadata as well
+                               if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) {
+                                       // Update database
+                                       updateMediadataEntry(array('total_points'), 'add', $content['locked_points']);
+                               } // END - if
+                       } // END - while
+               } // END - if
+
+               // Free memory
+               SQL_FREERESULT($result_points);
+       } // END - while
+
+       // Run all SQLs
+       runFilterChain('run_sqls');
+} // END - if
+
+// Free memory
+SQL_FREERESULT($result_daily);
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
diff --git a/inc/daily/daily_yoomedia.php b/inc/daily/daily_yoomedia.php
new file mode 100644 (file)
index 0000000..7a7168b
--- /dev/null
@@ -0,0 +1,59 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 10/10/2008 *
+ * ===================                          Last change: 06/20/2010 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : daily_yoomedia.php                               *
+ * -------------------------------------------------------------------- *
+ * Short description : Things to be done on daily reset                 *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
+       // Do not execute when script is in CSS mode or no daily reset
+       return;
+} elseif (!isExtensionActive('yoomedia')) {
+       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+       return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// Simply reset the requests here
+updateConfiguration('yoomedia_requests_remain', getConfig('yoomedia_requests_total'));
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
index 6a948845a34d59b3224ec79c5a18fba8be7edb7d..cea0cbce6a76b486f315c087a580944bb7e91a8f 100644 (file)
@@ -485,7 +485,7 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
                                break;
 
                        case '0.7.9': // SQL queries for v0.7.9
-                               setExtensionUpdateNotes("Dollarzeichen fehlte in <strong>inc/reset/reset_bonus.php</strong>, Zeile 39");
+                               setExtensionUpdateNotes("Dollarzeichen fehlte in <strong>inc/daily/daily_bonus.php</strong>, Zeile 39");
                                break;
 
                        case '0.8.0': // SQL queries for v0.8.0
index dbc2f8d5565000f068c9e72753b712ce2dae2c0e..0716da86a1ea1854dcda427d7065db2f98dfe7e0 100644 (file)
@@ -332,7 +332,7 @@ INDEX (`pool_id`)
 
        case 'init': // Do stuff when extension is initialized
                // Do daily reset only when installed and extension version is at least 0.1.1
-               // @TODO This should be moved out to inc/reset/
+               // @TODO This should be moved out to inc/daily/
                if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (isExtensionInstalledAndNewer('order', '0.1.1'))) {
                        // Reset mail order values
                        $result_ext = SQL_QUERY('UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `mail_orders`=0 WHERE `mail_orders` > 0', __FILE__, __LINE__);
index a75f8dd0c9011f11ea2cadd3248c3b3230df33bd..5f69f44285c5e1725999099260676efc54d5f8f9 100644 (file)
@@ -557,7 +557,7 @@ function FILTER_RUN_RESET_INCLUDES () {
        } // END - if
 
        // Get more daily reset scripts
-       setIncludePool('reset', getArrayFromDirectory('inc/reset/', 'reset_'));
+       setIncludePool('reset', getArrayFromDirectory('inc/daily/', 'daily_'));
 
        // Update database
        if ((!isConfigEntrySet('DEBUG_RESET')) || (getConfig('DEBUG_RESET') != 'Y')) updateConfiguration('last_update', 'UNIX_TIMESTAMP()');
index cc983a3029ed33835f4b99b91f0cf5eb10b13b10..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,56 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 12/27/2004 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_                                           *
- * -------------------------------------------------------------------- *
- * Short description : Things to be done on daily reset                 *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
-       // Do not execute when script is in CSS mode or no daily reset
-       return;
-} elseif (!isExtensionActive('')) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>
index 265388459af8f4b4c8fb74dc6287709f57655e31..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,94 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 10/25/2009 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_100_bonus.php                              *
- * -------------------------------------------------------------------- *
- * Short description : Check for 100% clickrate order                   *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Nach Mailbestaetigungen mit 100% Klickrate s.    *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
-       // Do not execute when script is in CSS mode or no daily reset
-       return;
-} elseif (!isExtensionActive('bonus')) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-// Check for 100% klickrate mails
-$result_bonus = SQL_QUERY("SELECT
-       `id`, `userid`, `subject`, `timestamp_ordered`, `clicks`, `url`
-FROM
-       `{?_MYSQL_PREFIX?}_user_stats`
-WHERE
-       `max_rec`=`clicks` AND
-       `clicks` > 0 AND
-       `bonus_stats_active`='N'
-ORDER BY
-       `userid` ASC", __FILE__, __LINE__);
-
-if (!SQL_HASZERONUMS($result_bonus)) {
-       // We found some mail orders...
-       while ($content = SQL_FETCHARRAY($result_bonus)) {
-               // Add points
-               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_stats`=`bonus_stats`+{?bonus_stats?} WHERE `userid`=%s LIMIT 1",
-                       array(bigintval($content['userid'])), __FILE__, __LINE__);
-
-               // Translate some data
-               $content['timestamp'] = generateDateTime($content['timestamp_ordered'], 2);
-
-               // Load email template and send email
-               $message = loadEmailTemplate('member_stats_bonus', $content, bigintval($content['userid']));
-               sendEmail($content['userid'], '{--MEMBER_BONUS_STATS_SUBJECT--}', $message);
-
-               // Update database
-               $result_update = SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `bonus_stats_active`='Y' WHERE `id`=%s LIMIT 1",
-                       array(bigintval($content['id'])), __FILE__, __LINE__);
-       } // END - while
-
-       // Handle bonus points
-       handleBonusPoints(getConfig('bonus_stats'));
-} // END - if
-
-// Free memory
-SQL_FREERESULT($result_bonus);
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>
index 518d3601e4d6398e73d3b5e7ad9698f3d1a8edc2..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,66 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 10/27/2009 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_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, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
-       // Do not execute when script is in CSS mode or no daily reset
-       return;
-} elseif (!isExtensionActive('autopurge')) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-// Init & set the include pool
-initIncludePool('autopurge');
-setIncludePool('autopurge', getArrayFromDirectory('inc/autopurge/', 'purge-'));
-
-// Run the filter
-runFilterChain('load_includes', 'autopurge');
-
-// Run filters for extra autopurge
-runFilterChain('extra_autopurge');
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>
index 05c56e0708fe15d159fed8b46a27098e12f827d9..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,58 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 10/22/2005 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_beg.php                                    *
- * -------------------------------------------------------------------- *
- * Short description : Reset begging points                             *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Erbettelten Punkte zuruecksetzen                 *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
-       // Do not execute when script is in CSS mode or no daily reset
-       return;
-} elseif ((!isExtensionActive('beg')) || (!isBegRallyeEnabled())) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-// @TODO This should be converted in a daily beg rallye
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>
index b194ef628f45829cf204e1632717a28b04bf337d..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,127 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 10/24/2009 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_birthday.php                               *
- * -------------------------------------------------------------------- *
- * Short description : Sends out birthday mails on reset                *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Versendet Geburtstagsmails beim Reset            *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
-       // Do not execute when script is in CSS mode
-       return;
-} elseif (!isExtensionActive('birthday')) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-// Get current day (01 to 31), month (01 to 12) and year (4-digits year)
-$day   = getDay();
-$month = getMonth();
-$year  = getYear();
-
-// Shall I include only active members?
-$add = '%s'; $value = '';
-if ((getConfig('birthday_active')) && (isExtensionActive('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getApInactiveSince() > 0)) {
-       $add = " AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})";
-} // END - if
-
-// Only confirmed members shall receive birthday mails...
-$result_birthday = SQL_QUERY_ESC("SELECT `userid`, `email`, `birth_year`
-FROM
-       `{?_MYSQL_PREFIX?}_user_data`
-WHERE
-       `status`='CONFIRMED' AND
-       `birth_day`=%s AND
-       `birth_month`=%s AND
-       `birthday_sent` < (UNIX_TIMESTAMP() - ({?ONE_DAY?} * 364))
-       ".$add."
-ORDER BY
-       `userid` ASC",
-       array($day, $month, $value), __FILE__, __LINE__);
-
-if (!SQL_HASZERONUMS($result_birthday)) {
-       // Start sending out birthday mails
-       while ($content = SQL_FETCHARRAY($result_birthday)) {
-               // Calculate own timestamp for birthday and today
-               $bd  = $content['birth_year'] + 12 * $month + 365 * $day;
-               $now = $year  + 12 * $month + 365 * $day;
-
-               // Simply subtract both values and you got the age... :)
-               $age = $now - $bd;
-
-               if (getConfig('birthday_points') > 0) {
-                       // Add more entries to the array
-                       $content['age']    = $age;
-                       $content['check']  = '';
-
-                       // @TODO 4 is hard-coded here, should we move it out in config?
-                       for ($idx = '0'; $idx < 4; $idx++) {
-                               $content['check'] .= generateRandomCode('8', mt_rand(0, $month . $day), $content['userid'], ($age * ($idx + 1)));
-                       } // END - for
-
-                       // Insert row into database
-                       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_birthday` (`userid`, `points`, `chk_value`) VALUES (%s,{?birthday_points?},'%s' )",
-                               array(
-                                       bigintval($content['userid']),
-                                       $content['check']
-                               ), __FILE__, __LINE__);
-
-                       // Load email template with confirmation link
-                       $message = loadEmailTemplate('member_birthday_confirm', $content, bigintval($content['userid']));
-               } else {
-                       // Load default email template and fill in the age
-                       $message = loadEmailTemplate('member_birthday', $age, $content['userid']);
-               }
-
-               // Send email
-               sendEmail($content['email'], '{--MEMBER_HAPPY_BIRTHDAY_SUBJECT--}', $message);
-
-               // Remember him that he has received a birthday mail
-               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `birthday_sent`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1",
-                       array(bigintval($content['userid'])), __FILE__, __LINE__);
-       } // END - while
-
-       // Free memory
-       SQL_FREERESULT($result_birthday);
-} // END - if
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>
index cb36ff75d57a122a952101bf21dc54fb61fb7842..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,70 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 10/22/2005 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_bonus.php                                  *
- * -------------------------------------------------------------------- *
- * Short description : Reset bonus points                               *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Bonus-Punkte zuruecksetzen                       *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
-       // Do not execute when script is in CSS mode or no daily reset
-       return;
-} elseif (!isExtensionActive('bonus')) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-// Purge expired entries in _bonus_turbo
-purgeExpiredTurboBonus();
-
-// Reset accounts
-SQL_QUERY('UPDATE
-       `{?_MYSQL_PREFIX?}_user_data`
-SET
-       `turbo_bonus`=0,
-       `login_bonus`=0,
-       `bonus_order`=0,
-       `bonus_stats`=0,
-       `bonus_ref`=0',
-       __FILE__, __LINE__);
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>
index 02b19d73f955b46c133ac856d0aee7d7630fbfbc..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,149 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 04/20/2004 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_daily.php                                  *
- * -------------------------------------------------------------------- *
- * Short description : Things to do on daily reset                      *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
-       // Do not execute when script is in CSS mode or no daily reset
-       return;
-} elseif (!isExtensionActive('sql_patches')) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-// Update user profiles
-if (isExtensionInstalledAndNewer('order', '0.1.1')) {
-       // Latest version
-       SQL_QUERY('UPDATE
-       `{?_MYSQL_PREFIX?}_user_data`
-SET
-       `receive_mails`=`max_mails`,
-       `mail_orders`=0
-WHERE
-       `receive_mails` != `max_mails`', __FILE__, __LINE__);
-} else {
-       // Obsolete version
-       SQL_QUERY('UPDATE
-       `{?_MYSQL_PREFIX?}_user_data`
-SET
-       `receive_mails`=`max_mails`
-WHERE
-       `receive_mails` != `max_mails`', __FILE__, __LINE__);
-}
-
-// Transfer points from locked_points to points
-$result_daily = SQL_QUERY("SELECT
-       `userid`
-FROM
-       `{?_MYSQL_PREFIX?}_user_data`
-WHERE
-       `ref_payout`=0 AND
-       `status`='CONFIRMED'
-ORDER BY
-       `userid` ASC", __FILE__, __LINE__);
-
-//* DEBUG: */ debugOutput(basename(__FILE__) . ':payout=0;daily|numRows=' . SQL_NUMROWS($result_daily));
-if (!SQL_HASZERONUMS($result_daily)) {
-       // Init SQLs
-       initSqls();
-
-       // Start checking accounts which are on 0 confirmed-to-go mails
-       while ($content = SQL_FETCHARRAY($result_daily)) {
-               //* DEBUG: */ debugOutput(basename(__FILE__) . ':' . $content['userid']);
-               $result_points = SQL_QUERY_ESC("SELECT
-       `ref_depth`,
-       `locked_points`
-FROM
-       `{?_MYSQL_PREFIX?}_user_points`
-WHERE
-       `userid`=%s AND
-       `locked_points` != 0.00000
-ORDER BY
-       `ref_depth` ASC",
-                       array(bigintval($content['userid'])), __FILE__, __LINE__);
-
-               //* DEBUG: */ debugOutput(basename(__FILE__) . ':payout=0;points|numRows=' . SQL_NUMROWS($result_points));
-               if (!SQL_HASZERONUMS($result_points)) {
-                       // Ok transfer points
-                       while ($content2 = SQL_FETCHARRAY($result_points)) {
-                               // Merge both arrays
-                               $content = merge_array($content, $content2);
-
-                               //* DEBUG: */ debugOutput(basename(__FILE__) . ':userid=' . $content['userid'].',depth='.$content['ref_depth'].',locked='.$content['locked_points']);
-                               addSql(SQL_QUERY_ESC("UPDATE
-       `{?_MYSQL_PREFIX?}_user_points`
-SET
-       `points`=`points`+%s,
-       `locked_points`=0.00000
-WHERE
-       `userid`=%s AND
-       `ref_depth`=%d
-LIMIT 1",
-                                       array(
-                                               $content['locked_points'],
-                                               bigintval($content['userid']),
-                                               $content['ref_depth']
-                                       ), __FILE__, __LINE__, false));
-
-                               // Update mediadata as well
-                               if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) {
-                                       // Update database
-                                       updateMediadataEntry(array('total_points'), 'add', $content['locked_points']);
-                               } // END - if
-                       } // END - while
-               } // END - if
-
-               // Free memory
-               SQL_FREERESULT($result_points);
-       } // END - while
-
-       // Run all SQLs
-       runFilterChain('run_sqls');
-} // END - if
-
-// Free memory
-SQL_FREERESULT($result_daily);
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>
index 8fc2f1028df398d3612ee187a9dc8d5c89bba2fb..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,59 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 10/24/2009 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_doubler.php                                *
- * -------------------------------------------------------------------- *
- * Short description : Things to be done on daily reset                 *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
-       // Do not execute when script is in CSS mode or no daily reset
-       return;
-} elseif ((!isExtensionActive('doubler')) || (getConfig('doubler_send_mode') != 'RESET')) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-// Include it
-loadIncludeOnce('inc/mails/doubler_mails.php');
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>
index e4a970f03fa4134f8709468f658821a14c7d64b2..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,56 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 12/27/2004 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_engine.php                                 *
- * -------------------------------------------------------------------- *
- * Short description : Things for the engine on daily reset             *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
-       // Do not execute when script is in CSS mode or no daily reset
-       return;
-} elseif (!isExtensionActive('engine')) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>
index a4a9f316bc424ad2cb0aa9a5ed1aa3a2b4eb8799..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,129 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 12/10/2005 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_holiday.php                                *
- * -------------------------------------------------------------------- *
- * Short description : Things to be done on daily reset                 *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == 'RESET'))) {
-       // Do not execute when script is in CSS mode or no daily reset
-       return;
-} elseif (!isExtensionActive('holiday')) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-// Check for holidays we need to enable and send email to user
-$result_main = SQL_QUERY("SELECT
-       `userid`, `holiday_activated`
-FROM
-       `{?_MYSQL_PREFIX?}_user_data`
-WHERE
-       `holiday_activated` > 0 AND
-       `holiday_activated` < UNIX_TIMESTAMP() AND
-       `holiday_active`='N'
-ORDER BY
-       `holiday_activated` ASC",
-__FILE__, __LINE__);
-
-// Entries found?
-if (!SQL_HASZERONUMS($result_main)) {
-       // Init SQLs
-       initSqls();
-
-       // We have found at least one useraccount so let's check it...
-       while ($content = SQL_FETCHARRAY($result_main)) {
-               // Check if his holiday can be activated
-               $result_holiday = SQL_QUERY_ESC("SELECT
-       `holiday_start`, `holiday_end`
-FROM
-       `{?_MYSQL_PREFIX?}_user_holidays`
-WHERE
-       `userid`=%s AND
-       `holiday_start` <= UNIX_TIMESTAMP() AND
-       `holiday_end` > UNIX_TIMESTAMP()
-LIMIT 1",
-                       array(bigintval($content['userid'])), __FILE__, __LINE__);
-
-               // Do we have an entry?
-               if (SQL_NUMROWS($result_holiday) == 1) {
-                       // Okay, this user can be send away to holiday...
-                       $content = merge_array($content, SQL_FETCHARRAY($result_holiday));
-
-                       // Prepare all data for the template
-                       $content = merge_array($content, array(
-                               'activated' => generateDateTime($content['holiday_activated'], 1),
-                               'start'     => generateDateTime($content['holiday_start']    , 1),
-                               'end'       => generateDateTime($content['holiday_end']      , 1)
-                       ));
-
-                       // Send email to user
-                       $message = loadEmailTemplate('member_holiday_activated', $content, $content['userid']);
-                       sendEmail($content['userid'], '{--MEMBER_HOLIDAY_ACTIVATED_SUBJECT--}', $message);
-
-                       // Update account
-                       addSql(SQL_QUERY_ESC("UPDATE
-       `{?_MYSQL_PREFIX?}_user_data`
-SET
-       `holiday_active`='Y'
-WHERE
-       `userid`=%s
-LIMIT 1",
-                               array(bigintval($content['userid'])), __FILE__, __LINE__, false));
-               } // END - if
-
-               // Free memory
-               SQL_FREERESULT($result_holiday);
-       } // END - while
-
-       // Run all SQLs
-       runFilterChain('run_sqls');
-} // END - if
-
-// Free memory
-SQL_FREERESULT($result_main);
-
-// Stop currently activated holidays
-stopHolidays();
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>
index 4b22bc2f56bf9ff2f78f2317791e6a208fc642fd..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,114 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 10/24/2009 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_profile.php                                *
- * -------------------------------------------------------------------- *
- * Short description : Sends out notifications to keep profiles updated *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Sendet Erinnerngen aus, damit die Profile        *
- *                     von den Mitgliedern aktuell gehalten werden      *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
-       // Do not execute when script is in CSS mode or no daily reset
-       return;
-} elseif (!isExtensionActive('profile')) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-if ((isSendProfileUpdateEnabled()) && (getProfileUpdate() > 0) && (getResendProfileUpdate() > 0)) {
-       // Load personal data
-       $result = SQL_QUERY("SELECT
-       `userid`, `email`, `last_update`, `joined`
-FROM
-       `{?_MYSQL_PREFIX?}_user_data`
-WHERE
-       `status`='CONFIRMED' AND (
-               (
-                       `last_update` < (UNIX_TIMESTAMP() - {?profile_update?}) AND
-                       `last_update` > 0 AND
-                       `last_profile_sent` < (UNIX_TIMESTAMP() - {?resend_profile_update?})
-               ) OR (
-                       `last_update` = 0 AND
-                       `last_profile_sent` = 0 AND
-                       `joined` < (UNIX_TIMESTAMP() - {?profile_update?})
-               )
-       )
-ORDER BY
-       `userid` ASC", __FILE__, __LINE__);
-
-       // Do we have some notifications to sent?
-       if (!SQL_HASZERONUMS($result)) {
-               // We need to send-out notifications...
-               while ($content = SQL_FETCHARRAY($result)) {
-                       // Translate timestamp
-                       $content['joined'] = generateDateTime($content['joined'], 0);
-
-                       if (round($content['last_update']) == '0') {
-                               // Has never changed his accont
-                               $content['last_update'] = '{--MEMBER_PROFILE_NEVER_CHANGED--}';
-                       } else {
-                               // Has changed his account
-                               $content['last_update'] = generateDateTime($content['last_update'], 0);
-                       }
-
-                       // Load email template and send mail away
-                       $message = loadEmailTemplate('member_profile', $content, bigintval($content['userid']));
-                       sendEmail($content['email'], '{--MEMBER_PROFILE_OUTDATED_SUBJECT--}', $message);
-
-                       // Update profile data
-                       SQL_QUERY_ESC("UPDATE
-       `{?_MYSQL_PREFIX?}_user_data`
-SET
-       `last_profile_sent`=UNIX_TIMESTAMP(),
-       `notified`='Y'
-WHERE
-       `userid`=%s
-LIMIT 1",
-                               array(bigintval($content['userid'])), __FILE__, __LINE__);
-               } // END - while
-       } // END - if
-
-       // Free result
-       SQL_FREERESULT($result);
-} // END - if
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>
index 758fcabe2d81a12c4052ef1b356264f14c8ff16a..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,61 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/08/2008 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_surfbar.php                                *
- * -------------------------------------------------------------------- *
- * Short description : Things to be done on daily reset                 *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
-       // Do not execute when script is in CSS mode or no daily reset
-       return;
-} elseif (!isExtensionActive('surfbar')) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-// Reset surfbar counter
-updateConfiguration(array('surfbar_daily_counter', 'surfbar_yester_counter'), array(0, getConfig('surfbar_daily_counter')));
-setConfigEntry('surfbar_yester_counter', getConfig('surfbar_daily_counter'));
-setConfigEntry('surfbar_daily_counter' , 0);
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>
index 8a22f74bbace3f8120bbdfabcdbac8d11774a827..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,59 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 10/10/2008 *
- * ===================                          Last change: 06/20/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : reset_yoomedia.php                               *
- * -------------------------------------------------------------------- *
- * Short description : Things to be done on daily reset                 *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Dinge, die beim taeglichen Reset erledigt werden *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 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 ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
-       // Do not execute when script is in CSS mode or no daily reset
-       return;
-} elseif (!isExtensionActive('yoomedia')) {
-       logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
-       return;
-}
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
-
-// Simply reset the requests here
-updateConfiguration('yoomedia_requests_remain', getConfig('yoomedia_requests_total'));
-
-// Debug line
-//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
-
-// [EOF]
+// @DEPRECATED
 ?>