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_user_subids.php svneol=native#text/plain
inc/daily/daily_yoomedia.php svneol=native#text/plain
inc/databases.php svneol=native#text/plain
inc/db/.htaccess svneol=native#text/plain
inc/modules/admin/what-config_top10.php svneol=native#text/plain
inc/modules/admin/what-config_transfer.php svneol=native#text/plain
inc/modules/admin/what-config_user.php svneol=native#text/plain
+inc/modules/admin/what-config_user_subid.php svneol=native#text/plain
inc/modules/admin/what-config_validator.php svneol=native#text/plain
inc/modules/admin/what-config_wernis.php svneol=native#text/plain
inc/modules/admin/what-config_yoomedia.php svneol=native#text/plain
templates/de/emails/admin/admin_order_normal.tpl svneol=native#text/plain
templates/de/emails/admin/admin_payout_request.tpl svneol=native#text/plain
templates/de/emails/admin/admin_payout_request_banner.tpl svneol=native#text/plain
+templates/de/emails/admin/admin_purge_user_server_name_log.tpl svneol=native#text/plain
+templates/de/emails/admin/admin_purge_user_subid_log.tpl svneol=native#text/plain
templates/de/emails/admin/admin_rallye_expired.tpl svneol=native#text/plain
templates/de/emails/admin/admin_rallye_expired_no.tpl svneol=native#text/plain
templates/de/emails/admin/admin_rallye_no_notify.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_transfer.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_transfer_pro.tpl -text
templates/de/html/admin/admin_config_user.tpl svneol=native#text/plain
+templates/de/html/admin/admin_config_user_subid.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_validator.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_wernis.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_yoomedia.tpl svneol=native#text/plain
setPostRequestElement('points', bigintval(round(convertCommaToDot(postRequestElement('points')))));
// Probe for enough points
- $probe_points = ((postRequestElement('points') >= getConfig('doubler_min')) && (postRequestElement('points') <= getConfig('doubler_max')));
+ $probe_points = ((postRequestElement('points') >= getDoublerMin()) && (postRequestElement('points') <= getDoublerMax()));
// Check all together
if ((isUserDataValid()) && (getUserData('password') == generateHash(postRequestElement('password'), substr(getUserData('password'), 0, -40))) && (getUserData('status') == 'CONFIRMED') && ($probe_points)) {
$points = getTotalPoints(getUserData('userid'));
// So let's continue with probing his points amount
- if (($points - getConfig('doubler_left') - postRequestElement('points') * getConfig('doubler_charge') / 100) >= 0) {
+ if (($points - getConfig('doubler_left') - postRequestElement('points') * getDoublerCharge() / 100) >= 0) {
// Enough points are left so let's continue with the doubling process
// Create doubling "account" with *DOUBLED* points
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES (%s,%s,%s,'%s', UNIX_TIMESTAMP(), 'N','N')",
subtractPoints('doubler', getUserData('userid'), postRequestElement('points'));
// Add points to "total payed" including charge
- $points = postRequestElement('points') - postRequestElement('points') * getConfig('doubler_charge') / 100;
+ $points = postRequestElement('points') - postRequestElement('points') * getDoublerCharge() / 100;
updateConfiguration('doubler_points', $points, '+');
incrementConfigEntry('doubler_points', $points);
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES (%s,0,%s,'%s',UNIX_TIMESTAMP(),'N','Y')",
array(
convertZeroToNull(determineReferralId()),
- (postRequestElement('points') * 2 * getConfig('doubler_ref') / 100),
+ (postRequestElement('points') * 2 * getDoublerRef() / 100),
detectRemoteAddr()
), __FILE__, __LINE__);
} elseif (getUserData('status') == 'LOCKED') {
// Account is locked by admin / holiday!
$content['message'] = '{--DOUBLER_FORM_STATUS_LOCKED--}';
- } elseif (postRequestElement('points') < getConfig('doubler_min')) {
+ } elseif (postRequestElement('points') < getDoublerMin()) {
// Not enougth points entered
$content['message'] = '{--DOUBLER_FORM_POINTS_MIN--}';
- } elseif (postRequestElement('points') > getConfig('doubler_max')) {
+ } elseif (postRequestElement('points') > getDoublerMax()) {
// Too much points entered
$content['message'] = '{--DOUBLER_FORM_POINTS_MAX--}';
} elseif (isNicknameUsed(postRequestElement('userid'))) {
} // END - if (isFormSet())
// Shall I check for points immediately?
-if (getConfig('doubler_send_mode') == 'DIRECT') {
+if (getDoublerSendMode() == 'DIRECT') {
loadInclude('inc/mails/doubler_mails.php');
} // END - if
}
// Which mail-send-mode did the admin setup?
-$content['payout_time'] = '{--DOUBLER_PAYOUT_TIME_' . getConfig('doubler_send_mode') . '--}';
+$content['payout_time'] = '{--DOUBLER_PAYOUT_TIME_' . getDoublerSendMode() . '--}';
// Generate table with already payed out doubles
$content['payout_history'] = generateDoublerTable(0, 'Y', 'N', 'DESC');
// 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.');
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-bonus disabled.');
return;
}
// 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.');
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-autopurge disabled.');
return;
}
// 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.');
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-beg disabled.');
return;
}
return;
} elseif (!isExtensionActive('birthday')) {
// Extension not active/installed
- logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-birthday disabled.');
return;
}
// 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.');
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-bonus disabled.');
return;
}
} 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.');
+} elseif ((!isExtensionActive('doubler')) || (getDoublerSendMode() != 'RESET')) {
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-doubler disabled.');
return;
}
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('earning')) {
- logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-earning disabled.');
return;
}
// 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.');
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-holiday disabled.');
return;
}
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif (!isExtensionActive('order')) {
- logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension disabled.');
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-order disabled.');
return;
}
// 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.');
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-profile disabled.');
return;
}
// 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.');
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-surfbar disabled.');
return;
}
// Do not execute when script is in CSS mode or no daily reset
return;
} elseif ((!isExtensionActive('sql_patches')) || (!isExtensionActive('user'))) {
- logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension(s) disabled.');
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension(s) ext-sql_patches/ext-user disabled.');
return;
}
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 11/10/2012 *
+ * =================== Last change: 11/10/2012 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : daily_user_subids.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 - 2012 by Mailer Developer Team *
+ * For more information visit: http://mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// 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 (!isExtensionInstalledAndNewer('user', '0.5.8')) {
+ logDebugMessage(__FILE__, __LINE__, 'Not resetting, needed extension ext-user disabled or out-dated.');
+ return;
+}
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
+// Is auto-purging activated and configured correctly?
+if ((isApSubidsEnabled()) && (getApSubidsSince() > 0)) {
+ // Start purging
+ SQL_QUERY('DELETE LOW_PRIORITY FROM
+ `{?_MYSQL_PREFIX?}_subid_log`
+WHERE
+ (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(`entry_added`)) >= {?ap_subids_since?}',
+ __FILE__, __LINE__);
+
+ // Are some entries deleted?
+ if (SQL_AFFECTEDROWS() > 0) {
+ // Okay, then send an email to the admin
+ sendAdminNotification('{--ADMIN_PURGE_USER_SUBID_LOG_SUBJECT--}', 'admin_purge_user_subid_log', SQL_AFFECTEDROWS());
+ } // END - if
+} // END - if
+
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
+// [EOF]
+?>
} // END - if
// Version number
-setThisExtensionVersion('0.9.2');
+setThisExtensionVersion('0.9.3');
// Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9', '0.9.0', '0.9.1', '0.9.2'));
+setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9', '0.9.0', '0.9.1', '0.9.2', '0.9.3'));
// Keep this extension always active!
setExtensionAlwaysActive('Y');
unregisterFilter(__FILE__, __LINE__, 'member_login_check', 'RESET_USER_LOGIN_FAILURE', TRUE, isExtensionDryRun());
unregisterFilter(__FILE__, __LINE__, 'add_history_entry', 'ADD_HISTORY_ENTRY', TRUE, isExtensionDryRun());
unregisterFilter(__FILE__, __LINE__, 'init', 'GENERATE_FILE_SECRET_HASH', TRUE, isExtensionDryRun());
+ unregisterFilter(__FILE__, __LINE__, 'extra_autopurge', 'SERVER_NAME_EXTRA_AUTOPURGE', TRUE, isExtensionDryRun());
break;
case 'activate': // Do stuff when admin activates this extension
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Sorry, hatte noch IP-Nummer, User-Agent, aufrufende Seite und Zähler vergessen.");
break;
+
+ case '0.9.3': // SQL queries for v0.9.3
+ addConfigAddSql('ap_server_name', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ addConfigAddSql('ap_server_name_since', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7));
+
+ // Register filter
+ registerFilter(__FILE__, __LINE__, 'extra_autopurge', 'SERVER_NAME_EXTRA_AUTOPURGE', FALSE, TRUE, isExtensionDryRun());
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Bereinigung von verkehrten <strong>SERVER_NAME</strong> Einträgen hinzugefügt.");
+ break;
} // END - switch
break;
} // END - if
// Version number
-setThisExtensionVersion('0.5.7');
+setThisExtensionVersion('0.5.8');
// Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7'));
+setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8'));
// Keep this extension always active!
setExtensionAlwaysActive('Y');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Menü zum Auflisten des Guthabens hinzugefügt. Diese Daten sollen noch später weiter verarbeitet werden. Zum Beispiel soll dann schnell feststellbar sein, welche Verdienstgruppe das meiste und wenigste {?POINTS?}-Volumen besitzt.");
break;
+
+ case '0.5.8': // SQL queries for v0.5.8
+ addConfigAddSql('ap_subids', "ENUM('Y', 'N') NOT NULL DEFAULT 'Y'");
+ addConfigAddSql('ap_subids_since', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7));
+
+ // Admin menu
+ addAdminMenuSql('setup', 'config_user_subid', 'Sub-Id Tracking', 'Ändern Sie hier alle Einstellungen zu den Sub-Ids.', 10);
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Bereinigung von Sub-Ids und deren Einstellungen hinzugefügt.");
+ break;
} // END - switch
break;
return $filterData;
}
+// Filter for purging old SERVER_NAME entries
+function FILTER_SERVER_NAME_EXTRA_AUTOPURGE ($filterData) {
+ // Is purging configured?
+ if ((isApServerNameEnabled()) && (getApServerNameSince() > 0)) {
+ // Then start purging
+ SQL_QUERY('DELETE LOW_PRIORITY FROM
+ `{?_MYSQL_PREFIX?}_server_name_log`
+WHERE
+ (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(`server_name_added`)) >= {?ap_server_name_since?}',
+ __FILE__, __LINE__);
+
+ // Are some entries deleted?
+ if (SQL_AFFECTEDROWS() > 0) {
+ // Okay, then send an email to the admin
+ sendAdminNotification('{--ADMIN_PURGE_USER_SERVER_NAME_LOG_SUBJECT--}', 'admin_purge_user_server_name_log', SQL_AFFECTEDROWS());
+ } // END - if
+ } // END - if
+
+ // Return filter data
+ return $filterData;
+}
+
// [EOF]
?>
// Admin lines
'ADMIN_CONFIG_AUTOPURGE_TITLE' => "Konfiguration der automatischen Löschungen",
'ADMIN_CONFIG_AUTOPURGE_INACTIVE' => "Sollten inaktive Accounts erkannt und gelöscht werden?",
- 'ADMIN_CONFIG_AUTOPURGE_INACTIVE_SINCE' => "Dauer bis bestätigtes Account als inaktiv markiert wird",
- 'ADMIN_CONFIG_AUTOPURGE_INACTIVE_TIME' => "Dauer bis inaktives Account gelöscht wird",
+ 'ADMIN_CONFIG_AUTOPURGE_INACTIVE_SINCE' => "Dauer bis bestätigtes Account als inaktiv markiert wird:",
+ 'ADMIN_CONFIG_AUTOPURGE_INACTIVE_TIME' => "Dauer bis inaktives Account gelöscht wird:",
'ADMIN_CONFIG_AUTOPURGE_UNCONFIRMED' => "Sollen unbestätigte Accounts gelöscht werden?",
- 'ADMIN_CONFIG_AUTOPURGE_UNCONFIRMED_TIME' => "Dauer bis unbestätigte Accounts gelöscht werden",
+ 'ADMIN_CONFIG_AUTOPURGE_UNCONFIRMED_TIME' => "Dauer bis unbestätigte Accounts gelöscht werden:",
'ADMIN_AUTOPURGE_ALL_ACTIVE' => "Alle Ihre Mitlieder sind aktiv.",
'ADMIN_CONFIG_AUTOPURGE_TASKS' => "Löschen von veralteten zu Löschen markierten Aufgaben?",
- 'ADMIN_CONFIG_AUTOPURGE_TASKS_TIME' => "Dauer bis zu löschen marktierte Aufgaben gelöscht werden",
- 'ADMIN_CONFIG_AUTOPURGE_INACTIVE_TITLE' => "Inaktive Accounts löschen",
- 'ADMIN_CONFIG_AUTOPURGE_UNCONFIRMED_TITLE' => "Unbestätigte Accounts löschen",
- 'ADMIN_CONFIG_AUTOPURGE_TASKS_TITLE' => "Veraltete Aufgaben löschen",
- 'ADMIN_CONFIG_AUTOPURGE_NOTIFICATION_TITLE' => "Benachtigung an Admin bei Auto-Löschung",
- 'ADMIN_CONFIG_AUTOPURGE_NOTIFY_INACTIVE' => "Benachrichtigung bei inaktive Accounts löschen",
- 'ADMIN_CONFIG_AUTOPURGE_NOTIFY_UNCONFIRMED' => "Benachrichtigung bei unbestätigte Accounts löschen",
- 'ADMIN_CONFIG_AUTOPURGE_NOTIFY_TASKS' => "Benachrichtigung bei veraltete Aufgaben löschen",
+ 'ADMIN_CONFIG_AUTOPURGE_TASKS_TIME' => "Dauer bis zu löschen marktierte Aufgaben gelöscht werden:",
+ 'ADMIN_CONFIG_AUTOPURGE_NOTIFY_INACTIVE' => "Benachrichtigung bei inaktive Accounts löschen?",
+ 'ADMIN_CONFIG_AUTOPURGE_NOTIFY_UNCONFIRMED' => "Benachrichtigung bei unbestätigte Accounts löschen?",
+ 'ADMIN_CONFIG_AUTOPURGE_NOTIFY_TASKS' => "Benachrichtigung bei veraltete Aufgaben löschen?",
'ADMIN_LIST_AUTOPURGE_TITLE' => "Automatisch zu löschende Mitglieder",
'ADMIN_LIST_AUTOPURGE_FOOTER' => "Hier sollte ein Hinweis kommen.",
'ADMIN_AUTOPURGE_NOTIFIED' => "Benachrichtigt",
- 'ADMIN_CONFIG_AUTOPURGE_DELETE_MAILS_TITLE' => "Mails von gelöschten Mitgliedern löschen",
'ADMIN_CONFIG_AUTOPURGE_DELETE_MAILS' => "Sollen die Mailbuchungen von bereits gelöschten Mitgliedern gelöscht werden?",
- 'ADMIN_CONFIG_AUTOPURGE_DELETE_MAILS_TIME' => "Dauer bis Mails gelöscht werden",
- 'ADMIN_CONFIG_AUTOPURGE_NOTIFY_DELETE_MAILS' => "Benachrichtigen bei Löschung von Mails",
+ 'ADMIN_CONFIG_AUTOPURGE_DELETE_MAILS_TIME' => "Dauer bis Mails gelöscht werden:",
+ 'ADMIN_CONFIG_AUTOPURGE_NOTIFY_DELETE_MAILS' => "Benachrichtigen bei Löschung von Mails?",
// Subject lines
'MEMBER_AUTOPURGE_SUBJECT' => "{?POINTS?}-Gutschrift bei Auto-Löschung",
'ADMIN_AUTOPURGE_TURBO_SUBJECT' => "[Auto-Purge:] Veraltete Bonus-Einträge",
'ADMIN_AUTOPURGE_DELETE_MAILS_SUBJECT' => "[Auto-Purge:] Mailbuchungen bereits gel. Mitglieder",
+ // Admin - legends
+ 'ADMIN_CONFIG_AUTOPURGE_INACTIVE_LEGEND' => "Inaktive Accounts löschen",
+ 'ADMIN_CONFIG_AUTOPURGE_UNCONFIRMED_LEGEND' => "Unbestätigte Accounts löschen",
+ 'ADMIN_CONFIG_AUTOPURGE_TASKS_LEGEND' => "Veraltete Aufgaben löschen",
+ 'ADMIN_CONFIG_AUTOPURGE_NOTIFICATION_LEGEND' => "Benachtigung an Admin bei Auto-Löschung",
+ 'ADMIN_CONFIG_AUTOPURGE_DELETE_MAILS_LEGEND' => "Mails von gelöschten Mitgliedern löschen",
+ 'ADMIN_CONFIG_AUTOPURGE_MAILID_LEGEND' => "Mailbestätigungslinks löschen",
+
// Moved from other extensions
'ADMIN_CONFIG_AUTOPURGE_ACTIVE' => "Auto-Löschung von Bestätigungslink ist aktiviert?",
'ADMIN_CONFIG_MAIL_LIFETIME' => "Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)",
- 'ADMIN_CONFIG_AUTOPURGE_MAILID_TITLE' => "Mailbestätigungslinks löschen",
// Points accounts - subject
'POINTS_SUBJECT_AUTOPURGE_ADD' => "Mailrückvergütung durch Autolöschung",
'ADMIN_TASK_LIST_SERVER_NAME_LOG_TITLE' => "Es sind geloggte SERVER_NAME-Logbucheinträge vorhanden.",
'ADMIN_SERVER_NAME' => "Host-Kopfzeile",
+ // Admin - server_name_log - config
+ 'ADMIN_CONFIG_AUTOPURGE_SERVER_NAME_LOG_LEGEND' => "Bereinigung von SERVER_NAME-Einträgen",
+ 'ADMIN_CONFIG_AUTOPURGE_SERVER_NAME_LOG' => "Sollen verkehrte SERVER_NAME-Einträge bereinigt werden?",
+ 'ADMIN_CONFIG_AUTOPURGE_SERVER_NAME_LOG_TIME' => "Dauer bis SERVER_NAME-Einträge gelöscht werden:",
+
+ // Admin - server_name_log - subject lines
+ 'ADMIN_PURGE_USER_SERVER_NAME_LOG_SUBJECT' => "Es wurden verkehrte SERVER_NAME-Einträge bereinigt",
+
// Admin - user's points amount
'ADMIN_LIST_USER_AMOUNTS_TITLE' => "Verteilung des {?POINTS?}-Gesamtvolumens",
'ADMIN_TOTAL_POINTS' => "Gesamtguthaben",
'ADMIN_MEM_EDIT_USER_SUBIDS_SUBJECT' => "Mitglied hat eine Sub-Id geändert",
'ADMIN_DELETE_USER_SUBIDS_SUBJECT' => "Eine Sub-Id wurde gelöscht",
'ADMIN_MEM_DELETE_USER_SUBIDS_SUBJECT' => "Mitglied hat eine Sub-Id gelöscht",
+ 'ADMIN_PURGE_USER_SUBID_LOG_SUBJECT' => "Bereinigung des Sub-Id-Logbuchs",
'MEMBER_ADD_USER_SUBIDS_SUBJECT' => "Neue Sub-Id hinzugefügt",
'MEMBER_EDIT_USER_SUBIDS_SUBJECT' => "Änderung Ihrer Sub-Id",
'MEMBER_MEM_EDIT_USER_SUBIDS_SUBJECT' => "Änderung Ihrer Sub-Id",
'ADMIN_USER_SUBID_NO_SELECTIONS' => "Sie haben keine Einträge ausgewählt oder es liegt ein Fehler vor. Bitte melden Sie dies im Bug-Tracker (auch wie es dazu gekommen ist).",
'ADMIN_CHANGE_USER_SUBID' => "Sub-Id ändern:",
+ // Admin - config subids
+ 'ADMIN_CONFIG_USER_SUBID_TITLE' => "Einstellungen zu Sub-Id-Tracking",
+ 'ADMIN_CONFIG_USER_SUBID_AUTOPURGE_LEGEND' => "Bereinigung des Sub-Id-Logbuchs:",
+ 'ADMIN_CONFIG_USER_SUBID_STUFF_AUTOPURGE' => "Soll das Logbuch für Sub-Id-Tracking bereinigt werden?",
+ 'ADMIN_CONFIG_USER_SUBID_STUFF_AUTOPURGE_SINCE' => "Wie lange sollen alte Logbucheinträge bestehen bleiben?",
+
// Generic - subids
'SUBID_VALUE' => "Sub-Id:",
'SUBID_ADDED' => "Hinzugefügt:",
if (getConfig('doubler_own') == 'Y') {
// Take points from doubler's own account
- $points += getConfig('doubler_points') - getConfig('doubler_used');
+ $points += getDoublerPoints() - getConfig('doubler_used');
} // END - if
if ((getConfig('doubler_jackpot') == 'Y') && (isExtensionActive('jackpot'))) {
if (!empty($jackpot)) $points += $jackpot;
} // END - if
- if (isValidUserId(getConfig('doubler_userid'))) {
+ if (isValidUserId(getDoublerUserid())) {
// Get user's points
- $user = getTotalPoints(getConfig('doubler_userid'));
+ $user = getTotalPoints(getDoublerUserid());
$points += $user;
} // END - if
return $GLOBALS[__FUNCTION__];
}
+// Getter for 'ap_subids' config entry
+function getApSubids () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('ap_subids');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Determines whether 'ap_subids' is set to 'Y'
+function isApSubidsEnabled () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = (getApSubids() == 'Y');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for 'ap_subids_since' config entry
+function getApSubidsSince () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('ap_subids_since');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
// [EOF]
?>
}
// Exclude webmaster from doubling...
- if ($content['userid'] != getConfig('doubler_userid')) {
+ if ($content['userid'] != getDoublerUserid()) {
// Add points
initReferralSystem();
- addPointsThroughReferralSystem(sprintf("doubler_%s", strtolower(getConfig('doubler_send_mode'))), $content['userid'], $content['points']);
+ addPointsThroughReferralSystem(sprintf("doubler_%s", strtolower(getDoublerSendMode())), $content['userid'], $content['points']);
} // END - if
// Set entry as "payed"
} // END - if
// Exclude also webmaster's id in taking points from webmaster's account
- if (($userPoints > 0) && ($userPoints >= $content['points']) && ($okay === FALSE) && (getConfig('doubler_userid') > 0) && ($content['userid'] != getConfig('doubler_userid'))) {
+ if (($userPoints > 0) && ($userPoints >= $content['points']) && ($okay === FALSE) && (getDoublerUserid() > 0) && ($content['userid'] != getDoublerUserid())) {
// Subtract points
- $okay = subtractPoints('doubler_payout', getConfig('doubler_userid'), $content['points']);
+ $okay = subtractPoints('doubler_payout', getDoublerUserid(), $content['points']);
} // END - if
// Update doubler's account only when others are not updated
$content['ap_notify_del_mails'] = addSelectionBox('yn', getConfig('ap_dm_notify') , 'ap_dm_notify');
// Output time selection boxes
- $content['ap_in_since'] = createConfigurationTimeSelections('ap_inactive_since' , 'MWDh');
- $content['ap_in_time'] = createConfigurationTimeSelections('ap_inactive_time' , 'MWDh');
- $content['ap_un_time'] = createConfigurationTimeSelections('ap_unconfirmed_time', 'MWDh');
- $content['ap_task_time'] = createConfigurationTimeSelections('ap_tasks_time' , 'MWDh');
- $content['ap_del_mails_time'] = createConfigurationTimeSelections('ap_dm_timeout' , 'MWDh');
+ $content['ap_in_since'] = createConfigurationTimeSelections('ap_inactive_since' , 'MWDh');
+ $content['ap_in_time'] = createConfigurationTimeSelections('ap_inactive_time' , 'MWDh');
+ $content['ap_un_time'] = createConfigurationTimeSelections('ap_unconfirmed_time' , 'MWDh');
+ $content['ap_task_time'] = createConfigurationTimeSelections('ap_tasks_time' , 'MWDh');
+ $content['ap_del_mails_time'] = createConfigurationTimeSelections('ap_dm_timeout' , 'MWDh');
+ $content['ap_server_name_since'] = createConfigurationTimeSelections('ap_server_name_since', 'MWDh');
// Mail confirmation links
$content['auto_purge'] = createConfigurationTimeSelections('auto_purge', 'MWD');
} // END - foreach
// Transfer options
- $content['doubler_userid'] = addMemberSelectionBox(getConfig('doubler_userid'), FALSE, TRUE, TRUE, 'doubler_userid');
+ $content['doubler_userid'] = addMemberSelectionBox(getDoublerUserid(), FALSE, TRUE, TRUE, 'doubler_userid');
// Number of rows to display (option lines!!!)
foreach (array('new','pay','old') as $entry) {
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 11/10/2012 *
+ * =================== Last change: 11/10/2012 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-config_user_subid.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Configuration for *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Konfiguration der *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * For more information visit: http://mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+ die();
+} // END - if
+
+// Add description as navigation point
+addYouAreHereLink('admin', __FILE__);
+
+if (isFormSent()) {
+ // Save data
+ adminSaveSettingsFromPostData();
+} else {
+ // Prepare time selections
+ $content['ap_subids_since'] = createConfigurationTimeSelections('ap_subids_since', 'MWDh');
+
+ // Load template
+ loadTemplate('admin_config_user_subid', FALSE, $content);
+}
+
+// [EOF]
+?>
} // END - if
// Which mail-send-mode did the admin setup?
-$content['payout_time'] = '{--DOUBLER_PAYOUT_TIME_' . getConfig('doubler_send_mode') . '--}';
+$content['payout_time'] = '{--DOUBLER_PAYOUT_TIME_' . getDoublerSendMode() . '--}';
// Generate table with already payed out doubles
$content['payout_history'] = generateDoublerTable(getMemberId(), 'Y', 'N', 'DESC');
return $GLOBALS[__FUNCTION__];
}
+// Getter for 'ap_server_name_since'
+function getApServerNameSince () {
+ // Is the cache entry set?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // No, so determine it
+ $GLOBALS[__FUNCTION__] = getConfig('ap_server_name_since');
+ } // END - if
+
+ // Return cached entry
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for 'ap_server_name'
+function getApServerName () {
+ // Is the cache entry set?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // No, so determine it
+ $GLOBALS[__FUNCTION__] = getConfig('ap_server_name');
+ } // END - if
+
+ // Return cached entry
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Checks whether 'ap_server_name' is 'Y'
+function isApServerNameEnabled () {
+ // Is the cache entry set?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // No, so determine it
+ $GLOBALS[__FUNCTION__] = (getApServerName() == 'Y');
+ } // END - if
+
+ // Return cached entry
+ return $GLOBALS[__FUNCTION__];
+}
+
// Getter for 'admin_menu_javascript'
function getAdminMenuJavascript () {
// Is the cache entry set?
--- /dev/null
+Hallo Administrator,
+
+es wurden soeben {%pipe,translateComma=$content%} Logbucheinträge aus der Tabelle {?_MYSQL_PREFIX?}_server_name_log bereinigt, die mehr als {%config,createFancyTime=ap_server_name_since%} noch gespeichert waren.
+
+Mit freundlichen Grüßen,
+ Ihr {?MAIN_TITLE?} Script
+
+{?URL?}/admin.php
--- /dev/null
+Hallo Administrator,
+
+es wurden soeben {%pipe,translateComma=$content%} Logbucheinträge aus der Tabelle {?_MYSQL_PREFIX?}_subid_log bereinigt, die mehr als {%config,createFancyTime=ap_subids_since%} noch gespeichert waren.
+
+Mit freundlichen Grüßen,
+ Ihr {?MAIN_TITLE?} Script
+
+{?URL?}/admin.php
</div>
<fieldset id="autopurge_inactive_fields">
- <legend>{--ADMIN_CONFIG_AUTOPURGE_INACTIVE_TITLE--}</legend>
+ <legend>{--ADMIN_CONFIG_AUTOPURGE_INACTIVE_LEGEND--}</legend>
<div class="table_row">
<label class="admin_label" for="autopurge_inactive">{--ADMIN_CONFIG_AUTOPURGE_INACTIVE--}</label>
</fieldset>
<fieldset id="autopurge_unconfirmed_fields">
- <legend>{--ADMIN_CONFIG_AUTOPURGE_UNCONFIRMED_TITLE--}</legend>
+ <legend>{--ADMIN_CONFIG_AUTOPURGE_UNCONFIRMED_LEGEND--}</legend>
<div class="table_row">
<label class="admin_label" for="autopurge_unconfirmed">{--ADMIN_CONFIG_AUTOPURGE_UNCONFIRMED--}</label>
</div>
<div class="table_row">
- <label class="admin_label" for="ap_un_time">{--ADMIN_CONFIG_AUTOPURGE_UNCONFIRMED_TIME--}:</label>
+ <label class="admin_label" for="ap_un_time">{--ADMIN_CONFIG_AUTOPURGE_UNCONFIRMED_TIME--}</label>
<div align="center">$content[ap_un_time]</div>
</div>
</fieldset>
<fieldset id="autopurge_tasks_fields">
- <legend>{--ADMIN_CONFIG_AUTOPURGE_TASKS_TITLE--}</legend>
+ <legend>{--ADMIN_CONFIG_AUTOPURGE_TASKS_LEGEND--}</legend>
<div class="table_row">
<label class="admin_label" for="autopurge_tasks">{--ADMIN_CONFIG_AUTOPURGE_TASKS--}</label>
</fieldset>
<fieldset id="autopurge_mailid_fields">
- <legend>{--ADMIN_CONFIG_AUTOPURGE_MAILID_TITLE--}</legend>
+ <legend>{--ADMIN_CONFIG_AUTOPURGE_MAILID_LEGEND--}</legend>
<div class="table_row">
<label class="admin_label" for="auto_purge">{--ADMIN_CONFIG_AUTOPURGE_ACTIVE--}</label>
</fieldset>
<fieldset id="autopurge_delete_mails_fields">
- <legend>{--ADMIN_CONFIG_AUTOPURGE_DELETE_MAILS_TITLE--}</legend>
+ <legend>{--ADMIN_CONFIG_AUTOPURGE_DELETE_MAILS_LEGEND--}</legend>
<div class="table_row">
<label class="admin_label" for="ap_del_mails">{--ADMIN_CONFIG_AUTOPURGE_DELETE_MAILS--}</label>
</div>
</fieldset>
+ <fieldset id="autopurge_server_name_log_fields">
+ <legend>{--ADMIN_CONFIG_AUTOPURGE_SERVER_NAME_LOG_LEGEND--}</legend>
+
+ <div class="table_row">
+ <label class="admin_label" for="autopurge_server_name_log">{--ADMIN_CONFIG_AUTOPURGE_SERVER_NAME_LOG--}</label>
+ <div align="center">{%template,ConfigurationYesNoSelectionBox=ap_server_name%}</div>
+ </div>
+
+ <div class="table_row">
+ <label class="admin_label" for="ap_un_time">{--ADMIN_CONFIG_AUTOPURGE_SERVER_NAME_LOG_TIME--}</label>
+ <div align="center">$content[ap_server_name_since]</div>
+ </div>
+ </fieldset>
+
<fieldset id="autopurge_notification_fields">
- <legend>{--ADMIN_CONFIG_AUTOPURGE_NOTIFICATION_TITLE--}</legend>
+ <legend>{--ADMIN_CONFIG_AUTOPURGE_NOTIFICATION_LEGEND--}</legend>
<div class="table_row">
<label class="admin_label" for="ap_notify_inactive">{--ADMIN_CONFIG_AUTOPURGE_NOTIFY_INACTIVE--}</label>
--- /dev/null
+<div align="center">
+{%form,formMethodPost=modules.php?module=admin&what=config_user_subid%}
+<div class="table dashed">
+ <div class="table_header bottom">
+ <strong>{--ADMIN_CONFIG_USER_SUBID_TITLE--}</strong>
+ </div>
+
+ <fieldset id="config_ap_subids_since">
+ <legend>{--ADMIN_CONFIG_USER_SUBID_AUTOPURGE_LEGEND--}</legend>
+
+ <div class="table_row">
+ <label for="ap_subids">{--ADMIN_CONFIG_USER_SUBID_STUFF_AUTOPURGE--}</label>
+ <div align="center">
+ {%template,ConfigurationYesNoSelectionBox=ap_subids%}
+ </div>
+ </div>
+
+ <div class="table_row">
+ <label for="ap_subids_since">{--ADMIN_CONFIG_USER_SUBID_STUFF_AUTOPURGE_SINCE--}</label>
+ <div align="center">
+ $content[ap_subids_since]
+ </div>
+ </div>
+ </fieldset>
+
+ <div class="table_footer top">
+ <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
+ <input type="submit" class="form_submit" name="ok" value="{--SAVE_SETTINGS--}" />
+ </div>
+</div>
+{%form_close%}
+</div>