X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-bonus.php;h=d93b02a857a689a10484fae2c16a2a29760065fa;hb=8ba389b59f6d41f88752cae896143135e575f34a;hp=2d83afcc55d8e03b64cedc04e13512c48cd3a0a9;hpb=e8a44f28a734e4796b70a1bc9df353f2466e1846;p=mailer.git
diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php
index 2d83afcc55..d93b02a857 100644
--- a/inc/extensions/ext-bonus.php
+++ b/inc/extensions/ext-bonus.php
@@ -32,8 +32,7 @@
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
@@ -52,40 +51,40 @@ switch ($EXT_LOAD_MODE)
case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu VALUES (NULL,'email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Bonuspunkte',7,'Y','Y', '', 0)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Bonuspunkte',7,'Y','Y','', 0)";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-cat_id BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+cat_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
subject VARCHAR(255) NOT NULL DEFAULT '',
text LONGBLOB NOT NULL,
receivers LONGBLOB NOT NULL,
-points BIGINT(20) NOT NULL DEFAULT '0',
-time TINYINT(3) NOT NULL DEFAULT '0',
+points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+time TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW',
timestamp VARCHAR(10) NOT NULL DEFAULT '0',
url VARCHAR(255) NOT NULL DEFAULT '',
-target_send BIGINT(20) NOT NULL DEFAULT '0',
-clicks BIGINT(20) NOT NULL DEFAULT '0',
-mails_sent BIGINT(20) NOT NULL DEFAULT '0',
+target_send BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+mails_sent BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
KEY(cat_id),
PRIMARY KEY (id)
)TYPE=MyISAM";
- $SQLs[] = "alter table "._MYSQL_PREFIX."_user_links modify link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'";
- $SQLs[] = "alter table "._MYSQL_PREFIX."_user_links ADD bonus_id BIGINT(20) NOT NULL DEFAULT '0'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links ADD INDEX (bonus_id)";
// Run this SQL when html or html_mail extension is installed
- if (EXT_IS_ACTIVE("html_mail")) $SQLs[] = "alter table "._MYSQL_PREFIX."_bonus add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ if (EXT_IS_ACTIVE("html_mail")) $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='bonus' OR what='config_bonus' OR what='send_bonus' OR what='list_bonus' LIMIT 4";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus') LIMIT 4";
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='bonus' LIMIT 1";
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='bonus' LIMIT 1";
- $SQLs[] = "alter table "._MYSQL_PREFIX."_user_links modify link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'";
- $SQLs[] = "alter table "._MYSQL_PREFIX."_user_links drop bonus_id";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links DROP bonus_id";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_urls";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_customer";
@@ -126,14 +125,13 @@ case "update": // Update an extension
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu VALUES (NULL,'setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_bonus DOUBLE(20,3) NOT NULL DEFAULT '10.000'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_bonus DOUBLE(20,3) NOT NULL DEFAULT '100.000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_timeout BIGINT(20) NOT NULL DEFAULT '86400'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ranks TINYINT(3) NOT NULL DEFAULT '10'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'";
// Use actual month for this update
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD last_bonus_month CHAR(2) NOT NULL DEFAULT '".date("m", time())."'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD login_bonus DOUBLE(20,3) NOT NULL DEFAULT '0.000'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD turbo_bonus DOUBLE(20,3) NOT NULL DEFAULT '0.000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='bonus' AND ext_has_css='N' LIMIT 1";
// Update notes (these will be set as task text!)
@@ -143,11 +141,11 @@ case "update": // Update an extension
case "0.2.2": // SQL queries for v0.2.2
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus_turbo";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus_turbo (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) NOT NULL DEFAULT '0',
-mail_id BIGINT(20) NOT NULL DEFAULT '0',
-bonus_id BIGINT(20) NOT NULL DEFAULT '0',
-level BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+mail_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+level BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
points DOUBLE(20,3) NOT NULL DEFAULT '0.000',
timemark VARCHAR(32) NOT NULL DEFAULT '0',
PRIMARY KEY(id),
@@ -162,7 +160,7 @@ KEY userid (userid)
case "0.2.3": // SQL queries for v0.2.3
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE action='main' AND what='bonus' LIMIT 1";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Aktiv-Rallye',7,'Y','Y', '', 0)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Aktiv-Rallye',7,'Y','Y','', 0)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Aktiv-Rallye mit Klick-Vergütung hinzugefügt.";
@@ -225,19 +223,19 @@ KEY userid (userid)
case "0.3.3": // SQL queries for v0.3.3
// Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt.";
+ $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt.";
break;
case "0.3.4": // SQL queries for v0.3.4
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('user', 'list_bonus', 'Aktiv-Rallye-Teilnehmer', 'Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit möglichen Gewinner an.', 10)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('user','list_bonus','Aktiv-Rallye-Teilnehmer','Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit möglichen Gewinner an.', 10)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Link Aktiv-Rallye-Teilnehmer hinzugefügt, inklusive manuelle Vorbereitung der Vergütung.";
break;
case "0.3.5": // SQL queries for v0.3.5
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_mode ENUM('UID', 'JACKPOT', 'ADD') NOT NULL DEFAULT 'ADD'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_uid BIGINT(20) NOT NULL DEFAULT '0'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) können nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden.";
@@ -264,8 +262,8 @@ KEY userid (userid)
break;
case "0.4.0": // SQL queries for v0.4.0
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_timeout BIGINT(20) NOT NULL DEFAULT '".(ONE_DAY * 7)."'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_lines BIGINT(20) NOT NULL DEFAULT '10'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(ONE_DAY * 7)."'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Automatisches Löschen von Turbo-Bonus-Zeilen ("._MYSQL_PREFIX."_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt.";
@@ -287,17 +285,17 @@ KEY userid (userid)
break;
case "0.4.4": // SQL queries for v0.4.4
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order DOUBLE(20,5) NOT NULL DEFAULT '15.00000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref DOUBLE(20,5) NOT NULL DEFAULT '100.00000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats DOUBLE(20,5) NOT NULL DEFAULT '5.00000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_active ENUM('Y', 'N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_order DOUBLE(20,5) NOT NULL DEFAULT '0.00000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ref DOUBLE(20,5) NOT NULL DEFAULT '0.00000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_stats DOUBLE(20,5) NOT NULL DEFAULT '0.00000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD is_stats ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '15.00000'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '100.00000'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_order DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ref DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_stats DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD is_stats ENUM('Y','N') NOT NULL DEFAULT 'N'";
// Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Bonus-{!POINTS!} für: Mailbestellung, Referral-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.
Template admin_config_bonus_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!
Eingestellte Bonus-{!POINTS!} für Rank 2 war um eins verschoben.";
+ $UPDATE_NOTES = "Bonus-{!POINTS!} für: Mailbestellung, Referral-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.
Template admin_config_bonus_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!
Eingestellte Bonus-{!POINTS!} für Rank 2 war um eins verschoben.";
break;
case "0.4.5": // SQL queries for v0.4.5
@@ -353,14 +351,6 @@ KEY userid (userid)
break;
case "0.5.5": // SQL queries for v0.5.5
- // Get previous month
- $prev = date("m", time()) - 1;
- if (strlen($prev) == 1) $prev = "0".$prev;
- if ($prev == "00") $prev = "12";
-
- // Reset monthly active rallye
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_config SET last_bonus_month='".$prev."' WHERE config=0 LIMIT 1";
-
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Weitere Variablenfehler in inc/monthly_bonus.php haben dafür gesorgt, dass die monatliche Aktiv-Rallye nicht ausgeschüttet wurde. Mit diesem Update wurde die Ausschüttung initialisiert. Ihre Mitglieder bekommen voraussichtlicht nichts doppelt vergütet.";
break;
@@ -419,7 +409,7 @@ WHERE last_online < ".$mark." ORDER BY userid";
break;
case "0.6.5": // SQL queries for v0.6.5
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Fehler mit bonus_stats beseitigt.";
@@ -441,11 +431,11 @@ WHERE last_online < ".$mark." ORDER BY userid";
break;
case "0.6.9": // SQL queries for v0.6.9
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order_yn ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref_yn ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats_yn ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_login_yn ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_click_yn ENUM('Y', 'N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Es können nun auch die folgenden Vergütungen bei der Auswertung der monatlichen Aktiv-Rallye mit berücksichtigt werden: Mailbestätigung (war vorher schon), Login-, Mailbuchung, Referral und Statistik-Bonus (100% Klickrate erreicht).";
@@ -480,14 +470,14 @@ WHERE last_online < ".$mark." ORDER BY userid";
break;
case "0.7.7": // SQL queries for v0.7.7
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_en_notify ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_di_notify ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_new_mem_notify ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_points DOUBLE(20,5) NOT NULL DEFAULT '0.00000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_wait BIGINT(20) NOT NULL DEFAULT '30'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_notify BIGINT(20) NOT NULL DEFAULT '0'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_en_notify BIGINT(20) NOT NULL DEFAULT '0'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_di_notify BIGINT(20) NOT NULL DEFAULT '0'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar.";
@@ -511,8 +501,8 @@ WHERE last_online < ".$mark." ORDER BY userid";
break;
case "0.8.2": // SQL queries for v0.8.2
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_include_own ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus ADD is_notify ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen.";
@@ -540,23 +530,19 @@ WHERE last_online < ".$mark." ORDER BY userid";
break;
default: // Do stuff when extension is loaded
- $dummy = LOAD_CONFIG();
- $_CONFIG = array_merge($_CONFIG, $dummy);
- unset($dummy);
-
- if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
+ if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
{
// Daily reset was run so let's check if active rallye is activated
if ($_CONFIG['bonus_active'] == "Y")
{
// Run active rallye
- if($_CONFIG['bonus_stats'] > 0) $INC_POOL[] = PATH."inc/stats_bonus.php";
- $INC_POOL[] = PATH."inc/monthly/monthly_bonus.php";
+ if($_CONFIG['bonus_stats'] > 0) $INC_POOL[] = sprintf("%sinc/stats_bonus.php", PATH);
+ $INC_POOL[] = sprintf("%sinc/monthly/monthly_bonus.php", PATH);
}
else
{
// Reset points
- $INC_POOL[] = PATH."inc/reset/reset_bonus.php";
+ $INC_POOL[] = sprintf("%sinc/reset/reset_bonus.php", PATH);
}
}
@@ -564,7 +550,7 @@ default: // Do stuff when extension is loaded
if (($_CONFIG['bonus_active'] == "Y") && ($_CONFIG['bonus_new_mem_notify'] == "Y"))
{
// Include file for sending out mails
- $INC_POOL[] = PATH."inc/mails/bonus_mails.php";
+ $INC_POOL[] = sprintf("%sinc/mails/bonus_mails.php", PATH);
}
break;
}