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
./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
./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.
--- /dev/null
+Deny from all
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
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
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__);
} // 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()');
<?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
?>
<?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
?>
<?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
?>
<?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
?>
<?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
?>
<?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
?>
<?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
?>
<?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
?>
<?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
?>
<?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
?>
<?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
?>
<?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
?>
<?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
?>