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,
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.";
if ($prev == "00") $prev = "12";
// Reset monthly active rallye
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_config SET last_bonus_month='".$prev."' WHERE config='0' LIMIT 1";
+ $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 <STRONG>inc/monthly_bonus.php</STRONG> 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;
default: // Do stuff when extension is loaded
- $DUMMY = LOAD_CONFIG("0");
- $CONFIG['login_bonus'] = $DUMMY['login_bonus']; // Bonus points for successfull logins
- $CONFIG['turbo_bonus'] = $DUMMY['turbo_bonus']; // Bonus points for the fastest clicker, No. 1
- $CONFIG['bonus_rates'] = $DUMMY['turbo_rates']; // Points for clicker no. 2 to x
- $CONFIG['bonus_ranks'] = $DUMMY['bonus_ranks']; // Total ranks who can win
- $CONFIG['login_timeout'] = $DUMMY['login_timeout']; // Time in seconds between two logins
- $CONFIG['bonus_month'] = $DUMMY['last_bonus_month']; // Last month where click-bonus are "paid"
- $CONFIG['bonus_mode'] = $DUMMY['bonus_mode']; // Mode for adding points for login/click bonus
- $CONFIG['bonus_uid'] = $DUMMY['bonus_uid']; // Member account to take points from
- $CONFIG['bonus_lines'] = $DUMMY['bonus_lines']; // Number of lines to display in show_bonus.php
- $CONFIG['bonus_timeout'] = $DUMMY['bonus_timeout']; // Auto-Purge timeout for bonus lines in mxchange_bonus_turbo
- $CONFIG['bonus_order'] = $DUMMY['bonus_order']; // Bonus points for ordering mails
- $CONFIG['bonus_ref'] = $DUMMY['bonus_ref']; // Bonus points for "making" a referral
- $CONFIG['bonus_stats'] = $DUMMY['bonus_stats']; // Bonus points for 100% clickrate in mail stats
- $CONFIG['bonus_active'] = $DUMMY['bonus_active']; // De/activate bonus active rallye
- $CONFIG['bonus_order_yn'] = $DUMMY['bonus_order_yn']; // Include order bonus in analysis?
- $CONFIG['bonus_ref_yn'] = $DUMMY['bonus_ref_yn']; // Include referral bonus in analysis?
- $CONFIG['bonus_stats_yn'] = $DUMMY['bonus_stats_yn']; // Include statistics bonus in analysis?
- $CONFIG['bonus_login_yn'] = $DUMMY['bonus_login_yn']; // Include login bonus in analysis?
- $CONFIG['bonus_click_yn'] = $DUMMY['bonus_click_yn']; // Include "mailid" bonus in analysis?
- $CONFIG['bonus_en_notify'] = $DUMMY['bonus_en_notify']; // Notify members about enabled active rallye?
- $CONFIG['bonus_di_notify'] = $DUMMY['bonus_di_notify']; // Notify members about disabled active rallye?
- $CONFIG['bonus_new_mem_notify'] = $DUMMY['bonus_new_mem_notify']; // Notify members about disabled active rallye?
- $CONFIG['bonus_notify_points'] = $DUMMY['bonus_notify_points']; // Bonus points for the enable-notification mail? 0 = disable!
- $CONFIG['bonus_notify_wait'] = $DUMMY['bonus_notify_wait']; // Time to wait in seconds for bonus mails
- $CONFIG['bonus_include_own'] = $DUMMY['bonus_include_own']; // Include webmaster's own userid in active rallye?
- unset($DUMMY);
+ $dummy = LOAD_CONFIG();
+ $_CONFIG['login_bonus'] = $dummy['login_bonus']; // Bonus points for successfull logins
+ $_CONFIG['turbo_bonus'] = $dummy['turbo_bonus']; // Bonus points for the fastest clicker, No. 1
+ $_CONFIG['bonus_rates'] = $dummy['turbo_rates']; // Points for clicker no. 2 to x
+ $_CONFIG['bonus_ranks'] = $dummy['bonus_ranks']; // Total ranks who can win
+ $_CONFIG['login_timeout'] = $dummy['login_timeout']; // Time in seconds between two logins
+ $_CONFIG['bonus_month'] = $dummy['last_bonus_month']; // Last month where click-bonus are "paid"
+ $_CONFIG['bonus_mode'] = $dummy['bonus_mode']; // Mode for adding points for login/click bonus
+ $_CONFIG['bonus_uid'] = $dummy['bonus_uid']; // Member account to take points from
+ $_CONFIG['bonus_lines'] = $dummy['bonus_lines']; // Number of lines to display in show_bonus.php
+ $_CONFIG['bonus_timeout'] = $dummy['bonus_timeout']; // Auto-Purge timeout for bonus lines in mxchange_bonus_turbo
+ $_CONFIG['bonus_order'] = $dummy['bonus_order']; // Bonus points for ordering mails
+ $_CONFIG['bonus_ref'] = $dummy['bonus_ref']; // Bonus points for "making" a referral
+ $_CONFIG['bonus_stats'] = $dummy['bonus_stats']; // Bonus points for 100% clickrate in mail stats
+ $_CONFIG['bonus_active'] = $dummy['bonus_active']; // De/activate bonus active rallye
+ $_CONFIG['bonus_order_yn'] = $dummy['bonus_order_yn']; // Include order bonus in analysis?
+ $_CONFIG['bonus_ref_yn'] = $dummy['bonus_ref_yn']; // Include referral bonus in analysis?
+ $_CONFIG['bonus_stats_yn'] = $dummy['bonus_stats_yn']; // Include statistics bonus in analysis?
+ $_CONFIG['bonus_login_yn'] = $dummy['bonus_login_yn']; // Include login bonus in analysis?
+ $_CONFIG['bonus_click_yn'] = $dummy['bonus_click_yn']; // Include "mailid" bonus in analysis?
+ $_CONFIG['bonus_en_notify'] = $dummy['bonus_en_notify']; // Notify members about enabled active rallye?
+ $_CONFIG['bonus_di_notify'] = $dummy['bonus_di_notify']; // Notify members about disabled active rallye?
+ $_CONFIG['bonus_new_mem_notify'] = $dummy['bonus_new_mem_notify']; // Notify members about disabled active rallye?
+ $_CONFIG['bonus_notify_points'] = $dummy['bonus_notify_points']; // Bonus points for the enable-notification mail? 0 = disable!
+ $_CONFIG['bonus_notify_wait'] = $dummy['bonus_notify_wait']; // Time to wait in seconds for bonus mails
+ $_CONFIG['bonus_include_own'] = $dummy['bonus_include_own']; // Include webmaster's own userid in active rallye?
+ unset($dummy);
if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
{
// Daily reset was run so let's check if active rallye is activated
- if ($CONFIG['bonus_active'] == 'Y')
+ if ($_CONFIG['bonus_active'] == 'Y')
{
// Run active rallye
- if($CONFIG['bonus_stats'] > 0) $INC_POOL[] = PATH."inc/stats_bonus.php";
+ if($_CONFIG['bonus_stats'] > 0) $INC_POOL[] = PATH."inc/stats_bonus.php";
$INC_POOL[] = PATH."inc/monthly/monthly_bonus.php";
}
else
}
// Check for bonus rallye is active and send mails out
- if (($CONFIG['bonus_active'] == 'Y') && ($CONFIG['bonus_new_mem_notify'] == 'Y'))
+ 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";