From: Roland Häder Date: Wed, 26 Nov 2008 01:33:18 +0000 (+0000) Subject: A lot more nice improvements! X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=d6834211baacaa54b282898fe54dc8c1511f046b A lot more nice improvements! - Extensions does no longer have $EXT_LANG_PREFIX which defaults now to the extension's name - ADD_POINTS_REFSYSTEM() and SUB_POINTS() prepare for upcoming extension 'booking' which gives the admin and users a list of all booked points - In user admin profile (what=list_user&u_id=x) and with installed extension 'country' the country will be displayed again - Three dashes added below "lock reason" in user admin profile - Direct registration link of extensions now no longer showed if the extension is already installed - List of users w/o referal id (refid=0) are now handled by "what=list_user&mode=norefs" and is no longer available in member menu - Page navigation and sorting for user list extended for above changes - Same list again rewritten for list of confirmed/locked users. Confirmed/locked: what=list_user&status=confirmed/locked - URL redirection extended with "a" tag - Some minor fixes here and there... --- diff --git a/birthday_confirm.php b/birthday_confirm.php index 954b8fdadb..22cd6bf61b 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -80,7 +80,7 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1", // Add points to account unset($DEPTH); - ADD_POINTS_REFSYSTEM($uid, $data['points'], false, "0", $locked, strtolower($_CONFIG['birthday_mode'])); + ADD_POINTS_REFSYSTEM("birthday_confirm", $uid, $data['points'], false, "0", $locked, strtolower($_CONFIG['birthday_mode'])); // Remove entry from table $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_birthday WHERE userid=%s AND chk_value='%s' LIMIT 1", diff --git a/doubler.php b/doubler.php index 26dd0545c6..b779650b0e 100644 --- a/doubler.php +++ b/doubler.php @@ -134,7 +134,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { array($uid, bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2)), __FILE__, __LINE__); // Subtract entered points - SUB_POINTS($uid, $_POST['points']); + SUB_POINTS("doubler", $uid, $_POST['points']); // Add points to "total payed" including charge $points = $_POST['points'] - $_POST['points'] * $_CONFIG['doubler_charge']; diff --git a/inc/doubler_send.php b/inc/doubler_send.php index b6a7505e1d..fd5d61d29a 100644 --- a/inc/doubler_send.php +++ b/inc/doubler_send.php @@ -99,7 +99,7 @@ if (((SQL_NUMROWS($result_total) > 0) && ($_CONFIG['doubler_sent_all'] == "Y")) // Exclude webmaster from doubling... if ($uid != $_CONFIG['doubler_uid']) { // Add points - ADD_POINTS_REFSYSTEM($uid, $points, false, "0", false, "direct"); + ADD_POINTS_REFSYSTEM(sprintf("doubler_%s", strtolower($_CONFIG['doubler_send_mode'])), $uid, $points, false, "0", false, "direct"); } // END - if // Set entry as "payed" @@ -120,7 +120,7 @@ if (((SQL_NUMROWS($result_total) > 0) && ($_CONFIG['doubler_sent_all'] == "Y")) // Exclude also webmaster's ID in taking points from webmaster's account if (($user > 0) && ($user >= $points) && (!$OK) && ($_CONFIG['doubler_uid'] > 0) && ($uid != $_CONFIG['doubler_uid'])) { // Add points to used points - SUB_POINTS($_CONFIG['doubler_uid'], $points); + SUB_POINTS("doubler_payout", $_CONFIG['doubler_uid'], $points); // Okay, done! $OK = true; diff --git a/inc/extensions.php b/inc/extensions.php index c4d7a8e0b1..18adcb0a2e 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -49,8 +49,12 @@ function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false) // This shall never do a non-admin user! if (!IS_ADMIN()) return false; + // By default the language prefix is the extension's name + // @TODO: Do we really need this one anymore? Can't we just take $ext_name and done? + $EXT_LANG_PREFIX = $ext_name; + // By default we have no failtures - $EXT_REPORTS_FAILURE = true; + $EXT_REPORTS_FAILURE = false; // Is this extension already installed? if (EXT_IS_ACTIVE($ext_name)) return false; @@ -169,7 +173,7 @@ function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false) $EXT_LOAD_MODE = "register"; // Remains true if extension registration reports no failtures - $test = ($test && !$EXT_REPORTS_FAILTURE); + $test = ($test && !$EXT_REPORTS_FAILURE); // Does everthing before wents ok? if ($test) { diff --git a/inc/extensions/ext- b/inc/extensions/ext- index c01dd2979b..668e7b87c6 100644 --- a/inc/extensions/ext- +++ b/inc/extensions/ext- @@ -80,8 +80,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "xxx"; - // ?> diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index c108fb0d33..7d49d419ed 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -124,8 +124,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "active"; - // ?> diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index 51ddb9440c..f1e3cca8b5 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -289,8 +289,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "admins"; - // ?> diff --git a/inc/extensions/ext-admintheme1.php b/inc/extensions/ext-admintheme1.php index 516ebaf98b..0e0474705f 100644 --- a/inc/extensions/ext-admintheme1.php +++ b/inc/extensions/ext-admintheme1.php @@ -84,8 +84,6 @@ case "update": // Update an extension default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "admintheme"; // ?> diff --git a/inc/extensions/ext-admintheme_default.php b/inc/extensions/ext-admintheme_default.php index 189a43eb21..ef2c977899 100644 --- a/inc/extensions/ext-admintheme_default.php +++ b/inc/extensions/ext-admintheme_default.php @@ -85,8 +85,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "admintheme"; - // ?> diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index f908e68f1c..fb44ddd0c9 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -259,9 +259,6 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "autopurge"; - // Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index 1f9d217f89..0e0c75c424 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -145,11 +145,11 @@ UNIQUE (account_id, tan) $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Einzahlen','N','Y', 3)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Auszahlen','N','Y', 4)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Kündigen','N','Y', 7)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Konto Kündigen','N','Y', 7)"; break; case "remove": // Do stuff when removing extension @@ -188,8 +188,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "bank"; - // ?> diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index cc369ce4ba..70d6e8066a 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -273,8 +273,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "beg"; - // ?> diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index db31e7deec..4042647e28 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -198,8 +198,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "birthday"; - // ?> diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index c8d31fc5ff..d2cdcb1c2e 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -557,8 +557,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "bonus"; - // ?> diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index 63f80c9781..b5acab720e 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -206,9 +206,6 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "cache"; - // Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index e2c8df89cb..17bda731fe 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -114,9 +114,6 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "country"; - // Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index 642a4ff0cf..a086ed4ab6 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -168,9 +168,6 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "debug"; - // Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; diff --git a/inc/extensions/ext-demo.php b/inc/extensions/ext-demo.php index cf3d37c6c0..0fcbff1d50 100644 --- a/inc/extensions/ext-demo.php +++ b/inc/extensions/ext-demo.php @@ -82,8 +82,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "demo"; - // ?> diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 8364994377..a55144659a 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -242,8 +242,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "doubler"; - // ?> diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index 35770ecdb5..c12bd04a3e 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -226,8 +226,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "holiday"; - // ?> diff --git a/inc/extensions/ext-html_mail.php b/inc/extensions/ext-html_mail.php index e499eb5c9b..be5255955c 100644 --- a/inc/extensions/ext-html_mail.php +++ b/inc/extensions/ext-html_mail.php @@ -164,8 +164,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "html_mail"; - // ?> diff --git a/inc/extensions/ext-mailid.php b/inc/extensions/ext-mailid.php index d6c81a1714..16eb4cd4bc 100644 --- a/inc/extensions/ext-mailid.php +++ b/inc/extensions/ext-mailid.php @@ -239,8 +239,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "mailid"; - // ?> diff --git a/inc/extensions/ext-maintenance.php b/inc/extensions/ext-maintenance.php index 4e41fc8d29..2cbe12a4bd 100644 --- a/inc/extensions/ext-maintenance.php +++ b/inc/extensions/ext-maintenance.php @@ -108,9 +108,6 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "maintenance"; - // Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index df99e44be7..3b3e7149ef 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -140,9 +140,6 @@ if ((isset($dry_run)) && (isset($EXT_LOAD_MODE))) } } -// Language file prefix -$EXT_LANG_PREFIX = "mediadata"; - // Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; diff --git a/inc/extensions/ext-mods.php b/inc/extensions/ext-mods.php index d22292a91a..c410877867 100644 --- a/inc/extensions/ext-mods.php +++ b/inc/extensions/ext-mods.php @@ -116,8 +116,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "mods"; - // ?> diff --git a/inc/extensions/ext-mydata.php b/inc/extensions/ext-mydata.php index 5dc0bd6a62..ba2d35758a 100644 --- a/inc/extensions/ext-mydata.php +++ b/inc/extensions/ext-mydata.php @@ -167,8 +167,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "mydata"; - // ?> diff --git a/inc/extensions/ext-newsletter.php b/inc/extensions/ext-newsletter.php index 3ad4f224e1..877e6ee7ce 100644 --- a/inc/extensions/ext-newsletter.php +++ b/inc/extensions/ext-newsletter.php @@ -172,8 +172,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "newsletter"; - // ?> diff --git a/inc/extensions/ext-nickname.php b/inc/extensions/ext-nickname.php index f2e70756bc..67236a2d26 100644 --- a/inc/extensions/ext-nickname.php +++ b/inc/extensions/ext-nickname.php @@ -207,8 +207,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "nickname"; - // ?> diff --git a/inc/extensions/ext-online.php b/inc/extensions/ext-online.php index 804e4dc9b7..f213def8a7 100644 --- a/inc/extensions/ext-online.php +++ b/inc/extensions/ext-online.php @@ -115,8 +115,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "online"; - // ?> diff --git a/inc/extensions/ext-optimize.php b/inc/extensions/ext-optimize.php index dbc40d30c7..049244420b 100644 --- a/inc/extensions/ext-optimize.php +++ b/inc/extensions/ext-optimize.php @@ -113,9 +113,6 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "optimize"; - // Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index ff09e7841b..1ea7c1913b 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -311,8 +311,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "order"; - // ?> diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php index e213c22c21..5a1a2919e8 100644 --- a/inc/extensions/ext-other.php +++ b/inc/extensions/ext-other.php @@ -194,9 +194,6 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "other"; - // Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; diff --git a/inc/extensions/ext-payout.php b/inc/extensions/ext-payout.php index fc56e13879..5eb38ef5ab 100644 --- a/inc/extensions/ext-payout.php +++ b/inc/extensions/ext-payout.php @@ -242,8 +242,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "payout"; - // ?> diff --git a/inc/extensions/ext-primera.php b/inc/extensions/ext-primera.php index 4efe332a6d..6610a3a104 100644 --- a/inc/extensions/ext-primera.php +++ b/inc/extensions/ext-primera.php @@ -113,9 +113,6 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "primera"; - // Init array global $primera; $primera = array(); diff --git a/inc/extensions/ext-profile.php b/inc/extensions/ext-profile.php index 745eabfd02..9e4854d6c6 100644 --- a/inc/extensions/ext-profile.php +++ b/inc/extensions/ext-profile.php @@ -127,8 +127,6 @@ default: // Do stuff when extension is loaded } break; } -// Language file prefix -$EXT_LANG_PREFIX = "profile"; // ?> diff --git a/inc/extensions/ext-rallye.php b/inc/extensions/ext-rallye.php index ffd56fe511..541692f87f 100644 --- a/inc/extensions/ext-rallye.php +++ b/inc/extensions/ext-rallye.php @@ -344,8 +344,5 @@ LIMIT 1", __FILE__, __LINE__); break; } -// Language file prefix -$EXT_LANG_PREFIX = "rallye"; - // ?> diff --git a/inc/extensions/ext-refback.php b/inc/extensions/ext-refback.php index de8861e21c..164616d768 100644 --- a/inc/extensions/ext-refback.php +++ b/inc/extensions/ext-refback.php @@ -111,9 +111,6 @@ if ($EXT_LOAD_MODE == "register") { $INC_POOL[] = PATH."inc/gen_refback.php"; } // END - if -// Language file prefix (hmmm, what shall I write with SQL fixes? ;-) ) -$EXT_LANG_PREFIX = "refback"; - // Keep this extension always active! $EXT_ALWAYS_ACTIVE = "N"; diff --git a/inc/extensions/ext-register.php b/inc/extensions/ext-register.php index 19385c7d1a..26380abf2c 100644 --- a/inc/extensions/ext-register.php +++ b/inc/extensions/ext-register.php @@ -325,8 +325,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "register"; - // ?> diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index 18d9ebd918..cabc3e78cd 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -91,8 +91,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "removeip"; - // ?> diff --git a/inc/extensions/ext-repair.php b/inc/extensions/ext-repair.php index c31611dc46..da8d3baa7f 100644 --- a/inc/extensions/ext-repair.php +++ b/inc/extensions/ext-repair.php @@ -112,8 +112,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "repair"; - // ?> diff --git a/inc/extensions/ext-rewrite.php b/inc/extensions/ext-rewrite.php index c440439df7..2ead6792ff 100644 --- a/inc/extensions/ext-rewrite.php +++ b/inc/extensions/ext-rewrite.php @@ -165,8 +165,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "rewrite"; - // ?> diff --git a/inc/extensions/ext-safe.php b/inc/extensions/ext-safe.php index b747e64f2b..d8b9b855f5 100644 --- a/inc/extensions/ext-safe.php +++ b/inc/extensions/ext-safe.php @@ -81,8 +81,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "safe"; - // ?> diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index e1094ba006..29e9f64872 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -429,8 +429,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "sponsor"; - // ?> diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index 78f1bf2aa8..54cf355174 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -38,13 +38,13 @@ if (!defined('__SECURITY')) { } // Version number -$EXT_VERSION = "0.5.6"; +$EXT_VERSION = "0.5.7"; // Auto-set extension version if (!isset($EXT_VER)) $EXT_VER = $EXT_VERSION; // Version history array (add more with , "0.1" and so on) -$EXT_VER_HISTORY = array("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"); +$EXT_VER_HISTORY = array("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"); switch ($EXT_LOAD_MODE) { @@ -60,22 +60,22 @@ case "remove": // Do stuff when removing extension $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las_data"; $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_stats"; $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_stats_data`"; + $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_book`"; // Delete admin menu entries $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE -what='theme_import' OR -what='theme_edit' OR -what='config_extensions' OR -what='config_home' OR -what='list_unconfirmed' OR -what='config_refid' OR -what='config_title' OR -what='sub_points' OR -what='config_admin' OR -what='config_proxy' OR -what='config_session' OR -what='list_norefs' -LIMIT 14"; +`what`='theme_import' OR +`what`='theme_edit' OR +`what`='config_extensions' OR +`what`='config_home' OR +`what`='list_unconfirmed' OR +`what`='config_refid' OR +`what`='config_title' OR +`what`='sub_points' OR +`what`='config_admin' OR +`what`='config_proxy' OR +`what`='config_session' OR +LIMIT 13"; // Delete guest menu entries $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='themes' LIMIT 1"; @@ -83,13 +83,13 @@ LIMIT 14"; // Delete/update member menu entries $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE action='themes' OR -what='themes' OR -what='stats2' OR -what='reflist' OR -(action='stats' AND (what='' OR what IS NULL)) OR -(action='extras' AND (what='' OR what IS NULL)) OR -(action='rals' AND (what='' OR what IS NULL)) OR -(action='account' AND (what='' OR what IS NULL))"; +`what`='themes' OR +`what`='stats2' OR +`what`='reflist' OR +(action='stats' AND (`what`='' OR what IS NULL)) OR +(action='extras' AND (`what`='' OR what IS NULL)) OR +(action='rals' AND (`what`='' OR what IS NULL)) OR +(action='account' AND (`what`='' OR what IS NULL))"; $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='main' WHERE action='stats' OR action='extras' OR @@ -216,12 +216,12 @@ case "update": // Update an extension break; case "0.1.1": // SQL queries for v0.1.1 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE what='config_home' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT '-1'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT '31536000'"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sie können nun hier die Verzögerungszeit in der Eingangsseite einstellen."; + $UPDATE_NOTES = "Sie können nun hier die Verzögerungszeit in der Eingangsseite einstellen."; break; case "0.1.2": // SQL queries for v0.1.2 @@ -361,7 +361,7 @@ PRIMARY KEY(id) $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='config_stats' WHERE what='stats' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET `what`='config_stats' WHERE `what`='stats' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "
    @@ -387,8 +387,8 @@ PRIMARY KEY(id) break; case "0.3.0": // SQL queries for v0.3.0 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='{!POINTS!}/Referal-Ebenen' WHERE what='config_points' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailvergütungen...' WHERE what='payments' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailvergütungen...' WHERE `what`='payments' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Zwei Menüpunkte umbenannt."; @@ -489,11 +489,8 @@ PRIMARY KEY (id) break; case "0.3.4": // SQL queries for v0.3.4 - // List accounts with no referal - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_norefs','Mitglieder ohne Werber','Finden Sie hier alle Mitglieder-Accounts, die von niemandem ({--MAIN_TITLE--} wird in der Mail als Werber angegebenen) geworben wurden.', 7)"; - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fügt den Menüpunkt "Mitglieder ohne Werber" in die Mitglieder-Management hinzu. Mit dieser neuen Funktion können Sie nach Mitglieder-Accounts ohne Werber suchen. TODO-ID #2 CLOSED"; + $UPDATE_NOTES = "Veraltetes Update (what=list_user&mode=noref)"; break; case "0.3.5": // SQL queries for v0.3.5 @@ -504,9 +501,9 @@ PRIMARY KEY (id) $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')"; $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET sort='8' WHERE action='themes' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='stats', sort='1', title='Klick-Mails' WHERE what='stats' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='account', sort='1', title='Designs' WHERE what='themes' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='3' WHERE what='reflinks' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='stats', sort='1', title='Klick-Mails' WHERE `what`='stats' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='account', sort='1', title='Designs' WHERE `what`='themes' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='3' WHERE `what`='reflinks' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut."; @@ -552,7 +549,7 @@ PRIMARY KEY (id) break; case "0.4.0": // SQL queries for v0.4.0 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Email-Management' WHERE action = 'email' AND (what='' OR what IS NULL) LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Email-Management' WHERE action = 'email' AND (`what`='' OR what IS NULL) LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Email-Verwaltung nach Email-Management umbenannt."; @@ -588,9 +585,9 @@ PRIMARY KEY (id) $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what=NULL WHERE what=''"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET what=NULL WHERE what=''"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET what=NULL WHERE what=''"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET `what`=NULL WHERE `what`=''"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET `what`=NULL WHERE `what`=''"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET `what`=NULL WHERE `what`=''"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` DROP INDEX `what`, ADD UNIQUE (`what`)"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` DROP INDEX `what`, ADD UNIQUE (`what`)"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` ADD INDEX `action` (`action`)"; @@ -704,6 +701,13 @@ INDEX (`stats_type`) // Update notes (these will be set as task text!) $UPDATE_NOTES = "Mitglieder könnnen nun z.B. in den Mail-Details zu jeder Mail sehen, wann sie diese bestätigt haben. Die neue Statistik-Tabelle ist aber universell einsetzbar."; break; + + case "0.5.7": // SQL queries for v0.5.7 + $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='list_norefs' LIMIT 1"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Auflistung der Mitglieder ohne Werber nach what=list_user&mode=norefs verschoben."; + break; } break; @@ -764,9 +768,6 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix (hmmm, what shall I write with SQL fixes? ;-) ) -$EXT_LANG_PREFIX = "sql_patches"; - // Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; diff --git a/inc/extensions/ext-support.php b/inc/extensions/ext-support.php index 3737987e32..2c5de7e81b 100644 --- a/inc/extensions/ext-support.php +++ b/inc/extensions/ext-support.php @@ -129,8 +129,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "support"; - // ?> diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index f5e8466ac1..e18f2e011e 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -230,8 +230,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "surfbar"; - // ?> diff --git a/inc/extensions/ext-task.php b/inc/extensions/ext-task.php index daaa854ef5..7abb45a776 100644 --- a/inc/extensions/ext-task.php +++ b/inc/extensions/ext-task.php @@ -244,8 +244,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "task"; - // ?> diff --git a/inc/extensions/ext-theme.php b/inc/extensions/ext-theme.php index 59a38db105..a49d2d6a26 100644 --- a/inc/extensions/ext-theme.php +++ b/inc/extensions/ext-theme.php @@ -114,8 +114,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "theme"; - // ?> diff --git a/inc/extensions/ext-top10.php b/inc/extensions/ext-top10.php index ae4028831a..03c9a3de69 100644 --- a/inc/extensions/ext-top10.php +++ b/inc/extensions/ext-top10.php @@ -143,8 +143,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "top10"; - // ?> diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index c9f548d069..a1b3d2c095 100644 --- a/inc/extensions/ext-transfer.php +++ b/inc/extensions/ext-transfer.php @@ -284,8 +284,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "transfer"; - // ?> diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index 203bd6e3c2..265c213588 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -250,9 +250,6 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "user"; - // Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index e9d2356dc1..6fd0478df3 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -135,9 +135,6 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "wernis"; - // Init array global $WERNIS; $WERNIS = array(); diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php index b03e8fb64b..33acb28529 100644 --- a/inc/extensions/ext-yoomedia.php +++ b/inc/extensions/ext-yoomedia.php @@ -132,9 +132,6 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "yoomedia"; - // Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; diff --git a/inc/functions.php b/inc/functions.php index 8f75383886..70694e75c4 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2238,7 +2238,7 @@ function mxchange_die ($msg) { // Display parsing time and number of SQL queries in footer function DISPLAY_PARSING_TIME_FOOTER() { - global $startTime, $_CONFIG; + global $_CONFIG; $endTime = microtime(true); // Is the timer started? diff --git a/inc/language/de.php b/inc/language/de.php index c24661ff61..529da02db8 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -517,8 +517,6 @@ define('ACCOUNT_CONFIRMED', "Bestätigt") define('ACCOUNT_LOCKED', "Gesperrt"); define('ACCOUNT_DELETED', "Gelöscht"); define('ADMIN_ALL_ACCOUNTS', "Alle Mitglieder-Accounts auflisten"); -define('ADMIN_LIST_LOCKED_ACCOUNTS', "Alle gesperrten Mitglieder-Accounts auflisten"); -define('ADMIN_LIST_CONFIRMED_ACCOUNTS', "Alle bestätigten Mitglieder-Accounts auflisten"); define('ADMIN_NO_NONE_REGISTERED', "Ihre Suchkriterieren ergaben keine Treffer in der Mitgliederliste. "); define('ADMIN_MEMBER_404', "Mitglieds-Account %s existiert nicht!"); define('ADMIN_LAST_ONLINE', "Zuletzt aktiv"); @@ -1223,6 +1221,10 @@ define('MEMBER_REFLIST_ACTIVITY', "Mitglied aktiv?"); define('MEMBER_REFLIST_COUNTER_1', "In dieser Ebene haben Sie "); define('MEMBER_REFLIST_COUNTER_2', " Mitglieder geworben."); +// Special user lists (what=list_user) +define('ADMIN_LIST_STATUS_LOCKED_ACCOUNTS', "Alle gesperrten Mitglieder-Accounts auflisten"); +define('ADMIN_LIST_STATUS_CONFIRMED_ACCOUNTS', "Alle bestätigten Mitglieder-Accounts auflisten"); +define('ADMIN_LIST_MODE_NOREFS_ACCOUNTS', "Alle Mitglieder-Accounts ohne Referrals auflisten"); // ?> diff --git a/inc/libs/beg_functions.php b/inc/libs/beg_functions.php index 759c83d64c..583ec4c8a8 100644 --- a/inc/libs/beg_functions.php +++ b/inc/libs/beg_functions.php @@ -53,13 +53,13 @@ function BEG_ADD_POINTS($uid, $points) { } else { // Add points to account unset($DEPTH); - ADD_POINTS_REFSYSTEM($uid, $points, false, "0", $locked, strtolower($_CONFIG['beg_mode'])); + ADD_POINTS_REFSYSTEM("beg", $uid, $points, false, "0", $locked, strtolower($_CONFIG['beg_mode'])); } // Subtract begged points from member account if the admin has selected one if ($_CONFIG['beg_uid'] > 0) { // Subtract from this account - SUB_POINTS($_CONFIG['beg_uid'], $points); + SUB_POINTS("beg_payout", $_CONFIG['beg_uid'], $points); } // END - if } diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index e6d3f69dd5..3d3a648ebc 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -206,28 +206,23 @@ function BONUS_POINTS_HANDLER($MODE) switch ($_CONFIG['bonus_mode']) { case "JACKPOT": // ... jackpot - if ((SUB_JACKPOT($points) == -1) && ($_CONFIG['bonus_uid'] > 0)) - { + if ((SUB_JACKPOT($points) == -1) && ($_CONFIG['bonus_uid'] > 0)) { // Check points amount first... $TOTAL = GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_data", "used_points"); - if ($TOTAL >= $points) - { + if ($TOTAL >= $points) { // Subtract points from userid's account - SUB_POINTS($_CONFIG['bonus_uid'], $points); - } - } + SUB_POINTS("bonus_payout_jackpot", $_CONFIG['bonus_uid'], $points); + } // END - if + } // END - if break; case "UID": // ... userid's account // Check his amount first $TOTAL = GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_data", "used_points"); - if ($TOTAL >= $points) - { + if ($TOTAL >= $points) { // Subtract points from userid's account - SUB_POINTS($_CONFIG['bonus_uid'], $points); - } - else - { + SUB_POINTS("bonus_payout_uid", $_CONFIG['bonus_uid'], $points); + } else { // Try to subtract from jackpot $dummy = SUB_JACKPOT($points); } diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index af9a01b440..960f78d67a 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -406,9 +406,24 @@ LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); $DATA['info'] = $prices['info'][$key]; $DATA['ref'] = $prices['ref'][$key]; + // Default is other + $winnerLevel = "other"; + + // Determine winner level + if ($DATA['level'] == 1) { + // The winner! + $winnerLevel = "_gold"; + } elseif ($DATA['level'] == 2) { + // The vice winner! + $winnerLevel = "_silver"; + } elseif ($DATA['level'] == 3) { + // The bronce winner + $winnerLevel = "_bronce"; + } + if ($DATA['points'] > 0) { // Add points directly to user's account - ADD_POINTS_REFSYSTEM($uid, $DATA['points'], false, "0", false, "direct"); + ADD_POINTS_REFSYSTEM("rallye_winner" . $winnerLevel, $uid, $DATA['points'], false, "0", false, "direct"); } // END - if if ($notify == "Y") { @@ -422,17 +437,7 @@ LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); } // Add suffix to template name - $template = "member_rallye_expired"; - if ($DATA['level'] == 1) { - // The winner! - $template .= "_gold"; - } elseif ($DATA['level'] == 2) { - // The vice winner! - $template .= "_silver"; - } elseif ($DATA['level'] == 3) { - // The bronce winner - $template .= "_bronce"; - } + $template = "member_rallye_expired".$winnerLevel; // Load template $msg = LOAD_EMAIL_TEMPLATE($template, $DATA, $uid); diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index 5d04dde481..e7a2b5987b 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -79,7 +79,7 @@ function ADD_REFBACK_POINTS ($uid, $ref, $points, $ref_points) { // Add points again, but only directly //* DEBUG: */ print __FUNCTION__."(".__LINE__."):refback={$refback}
    \n"; - ADD_POINTS_REFSYSTEM($uid, $refback, false, "0", false, "direct"); + ADD_POINTS_REFSYSTEM(sprintf("refback:%s", $refid), $uid, $refback, false, "0", false, "direct"); // Reduce points if refid is found if ($refid == $ref) { diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 3700fab397..2af19cbbb5 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -818,12 +818,12 @@ function SURFBAR_PAY_POINTS ($urlId) { // Remove it from the URL owner //DEBUG_LOG(__FUNCTION__, __LINE__, "uid=".SURFBAR_GET_USERID().",costs=".SURFBAR_GET_COSTS()."", false); if (SURFBAR_GET_USERID() > 0) { - SUB_POINTS(SURFBAR_GET_USERID(), SURFBAR_GET_COSTS()); + SUB_POINTS("surfbar", SURFBAR_GET_USERID(), SURFBAR_GET_COSTS()); } // END - if // Book it to the user //DEBUG_LOG(__FUNCTION__, __LINE__, "uid=".$GLOBALS['userid'].",reward=".SURFBAR_GET_REWARD()."", false); - ADD_POINTS_REFSYSTEM($GLOBALS['userid'], SURFBAR_GET_DATA('reward')); + ADD_POINTS_REFSYSTEM("surfbar", $GLOBALS['userid'], SURFBAR_GET_DATA('reward')); } // Updates the statistics of current URL/userid function SURFBAR_UPDATE_INSERT_STATS_RECORD () { diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php index 4cdc14b83f..b7c91c62ca 100644 --- a/inc/libs/task_functions.php +++ b/inc/libs/task_functions.php @@ -81,7 +81,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) SQL_FREERESULT($result); if ($value > 0) { - define('__CONFIRMED_VALUE', "".$value.""); + define('__CONFIRMED_VALUE', "".$value.""); } else { define('__CONFIRMED_VALUE', "0"); } @@ -103,7 +103,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) SQL_FREERESULT($result); if ($value > 0) { - define('__LOCKED_VALUE', "".$value.""); + define('__LOCKED_VALUE', "".$value.""); } else { define('__LOCKED_VALUE', "0"); } @@ -300,7 +300,7 @@ ORDER BY d.userid"; $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE refid='0' ORDER BY userid"; $DESCRs[] = TASK_ADMIN_LIST_ACCOUNT_NOREF; $TITLEs[] = TASK_ADMIN_LIST_ACCOUNT_NOREF_TITLE; - $WHATs[] = "list_norefs"; + $WHATs[] = "list_user&mode=norefs"; } if (EXT_IS_ACTIVE("payout")) { diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index faa279ca7d..f00c096841 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -42,7 +42,7 @@ function alpha($sortby, $colspan, $return=false) { global $_CONFIG; if (empty($_GET['offset'])) $_GET['offset'] = 0; - $ADD = "&page=".$_GET['page']."&offset=".$_GET['offset']; + $ADD = "&page=".SQL_ESCAPE($_GET['page'])."&offset=".SQL_ESCAPE($_GET['offset']); if (!empty($_GET['mode'])) $ADD .= "&mode=".SQL_ESCAPE($_GET['mode']); /* Creates the list of letters and makes them a link. */ @@ -93,8 +93,14 @@ function SortLinks($letter, $sortby, $colspan, $return=false) { $OUT = ""; if (empty($_GET['offset'])) $_GET['offset'] = 0; - $ADD = "&page=".$_GET['page']."&offset=".$_GET['offset']; - if (!empty($_GET['mode'])) $ADD .= "&mode=".SQL_ESCAPE($_GET['mode']); + if (empty($_GET['page'])) $_GET['page'] = 0; + + // Add page and offset + $ADD = "&page=".SQL_ESCAPE($_GET['page'])."&offset=".SQL_ESCAPE($_GET['offset']); + + // Add status or mode + if (!empty($_GET['status'])) $ADD .= "&mode=".SQL_ESCAPE($_GET['status']); + elseif (!empty($_GET['mode'])) $ADD .= "&mode=".SQL_ESCAPE($_GET['mode']); // Makes order by links.. if ($letter == "front") $letter = _ALL2; @@ -138,41 +144,39 @@ function SortLinks($letter, $sortby, $colspan, $return=false) // Add page navigation function ADD_PAGENAV($PAGES, $offset, $show_form, $colspan,$return=false) { - if (!$show_form) - { + if (!$show_form) { // Empty row define('__FORM_HEADER', " "); - } - else - { + } else { // Load form for changing number of lines define('__FORM_HEADER', LOAD_TEMPLATE("admin_list_user_sort_form", true)); } - if (!$show_form) - { + + if (!$show_form) { // Add line with bottom border define('__FORM_FOOTER', " "); - } - else - { + } else { // Add line without bottom border define('__FORM_FOOTER', " "); } $OUT = ""; - for ($page = 1; $page <= $PAGES; $page++) - { - if (($page == $_GET['page']) || ((empty($_GET['page'])) && ($page == "1"))) - { + for ($page = 1; $page <= $PAGES; $page++) { + if (($page == $_GET['page']) || ((empty($_GET['page'])) && ($page == "1"))) { $OUT .= "-"; - } - else - { + } else { if (empty($_GET['letter'])) $_GET['letter'] = _ALL2; if (empty($_GET['sortby'])) $_GET['sortby'] = "userid"; + + // Base link $OUT .= ""; + + // Add status or mode + if (!empty($_GET['status'])) $OUT .= "&mode=".SQL_ESCAPE($_GET['status']); + elseif (!empty($_GET['mode'])) $OUT .= "&mode=".SQL_ESCAPE($_GET['mode']); + + // Letter and so on + $OUT .= "&letter=".SQL_ESCAPE($_GET['letter'])."&sortby=".SQL_ESCAPE($_GET['sortby'])."&page=".$page."&offset=".$offset."\">"; } $OUT .= $page; if (($page == $_GET['page']) || ((empty($_GET['page'])) && ($page == "1"))) diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index b99efa4a15..b05d960fdb 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -748,7 +748,7 @@ function ADMIN_MAKE_MENU_SELECTION($menu, $type, $name, $default="") { return $OUT; } // -function ADMIN_USER_PROFILE_LINK($uid, $title="", $wht="list_user") { +function ADMIN_USER_PROFILE_LINK ($uid, $title="", $wht="list_user") { if (($title == "") && ($title != "0")) { // Set userid as title $title = $uid; diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index db0af358c5..5e84a577fd 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -445,7 +445,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) { ); // Do we have extension task? - if ($type == "EXTENSION") { + if (($type == "EXTENSION") && (!GET_EXT_VERSION($infos) == "")) { // Load extension row template LOAD_TEMPLATE("admin_overview_list_ext_rows", false, $content); } else { diff --git a/inc/modules/admin/what-add_points.php b/inc/modules/admin/what-add_points.php index 87ed2594ef..f514b885cd 100644 --- a/inc/modules/admin/what-add_points.php +++ b/inc/modules/admin/what-add_points.php @@ -65,7 +65,7 @@ if ($_GET['u_id'] == "all") { unset($DEPTH); // Ok, add points and send an email to him... - ADD_POINTS_REFSYSTEM($uid, bigintval($_POST['points']), false, "0", false, "direct"); + ADD_POINTS_REFSYSTEM("admin_all", $uid, bigintval($_POST['points']), false, "0", false, "direct"); // Prepare content $content = array( @@ -106,7 +106,7 @@ if ($_GET['u_id'] == "all") { unset($DEPTH); // Ok, add points and send an email to him... - ADD_POINTS_REFSYSTEM(bigintval($_GET['u_id']), bigintval($_POST['points']), false, "0", false, "direct"); + ADD_POINTS_REFSYSTEM("admin_single", bigintval($_GET['u_id']), bigintval($_POST['points']), false, "0", false, "direct"); // Prepare content $content = array( diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php index ca1e16b0c1..13d4b6ef0f 100644 --- a/inc/modules/admin/what-del_email.php +++ b/inc/modules/admin/what-del_email.php @@ -105,7 +105,7 @@ WHERE s.pool_id=%s LIMIT 1", // Pay back points //* DEBUG: */ echo "PAYBACK:".$sender."
    \n"; - ADD_POINTS_REFSYSTEM($sender, $totalPoints, true, "0", false,"direct"); + ADD_POINTS_REFSYSTEM("mail_deleted", $sender, $totalPoints, true, "0", false,"direct"); // Output message if ($_CONFIG['repay_deleted_mails'] == 'REPAY') { diff --git a/inc/modules/admin/what-list_norefs.php b/inc/modules/admin/what-list_norefs.php index a541084bac..f87b68fd31 100644 --- a/inc/modules/admin/what-list_norefs.php +++ b/inc/modules/admin/what-list_norefs.php @@ -1,190 +1,3 @@ 0) -{ - // We have some (new?) registrations! - define('__COLSPAN1' , $colspan); - define('__COLSPAN2' , ($colspan + 2)); - define('__USER_CNT' , $user_count); - define('__ALPHA_SORT', alpha($_GET['sortby'], $colspan, true)); - define('__SORT_LINKS', SortLinks($_GET['letter'], $_GET['sortby'], $colspan, true)); - define('__TITLE' , ADMIN_LIST_NOREFS_ACCOUNTS); - - if ($PAGES > 1) { - // Add navigation - define('__PAGE_NAV', ADD_PAGENAV($PAGES, $_CONFIG['user_limit'], true, $colspan, true)); - } else { - // No page navigation is required - define('__PAGE_NAV', ""); - } - - // Column with nickname when nickname extension is present - if (EXT_IS_ACTIVE("nickname")) { - // Nickname extension found - define('__NICKNAME_TH', " ".NICKNAME.""); - } else { - // Not found - define('__NICKNAME_TH', ""); - } - - $SW = 2; $OUT = ""; - while (list($uid, $gender, $sname, $fname, $email, $IP, $ref, $status, $emails_sent, $mails_confirmed, $emails_received, $nick) = SQL_FETCHROW($result)) { - // Get unconfirmed emails - $LINKS = GET_TOTAL_DATA($uid, "user_links", "id", "userid", true); - - // Set link to unconfirmed emails - if ($LINKS > 0) { - // Translate value - $LINKS = TRANSLATE_COMMA($LINKS); - - // Add link - $LINKS = $BASE."&what=list_links&u_id=".$uid."\">".$LINKS."
    ]"; - } // END - if - - // Add nickname - if ((empty($nick)) || ($uid == $nick)) $nick = "---"; - - // Sent emails - $SENT = $emails_sent; - if ($emails_sent > 0) $SENT = $BASE."&what=email_details&u_id=".$uid."\">".TRANSLATE_COMMA($emails_sent)."]"; - - // Calculate total points - $pointsTotal = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points"); - - // Clickrate - $clickRate = 0; - if ($emails_received > 0) { - $clickRate = $mails_confirmed / $emails_received * 100; - } // END - if - - // Transfer data to array - $content = array( - 'sw' => $SW, - 'uid' => ADMIN_USER_PROFILE_LINK($uid), - 'gender' => TRANSLATE_GENDER($gender), - 'sname' => $sname, - 'fname' => $fname, - 'email' => "[".$email."]", - 'addr' => $IP, - 'ref' => $ref, - 'status' => TRANSLATE_STATUS($status), - 'links' => $LINKS, - 'alinks' => MEMBER_ACTION_LINKS($uid, $status), - 'nick' => $nick, - 'points' => TRANSLATE_COMMA($pointsTotal), - 'sent' => $SENT, - 'rate' => TRANSLATE_COMMA($clickRate), - 'locked' => TRANSLATE_COMMA(GET_TOTAL_DATA($uid, "user_points", "locked_points")) - ); - - // Load row template and switch colors - $OUT .= LOAD_TEMPLATE("admin_list_user_row", true, $content); - $SW = 3 - $SW; - } // END - while - - // Free memory - SQL_FREERESULT($result); - - define('__USER_ROWS', $OUT); - - // Load main template - LOAD_TEMPLATE("admin_list_user"); - - // Free some memory - SQL_FREERESULT($result_master); -} else { - // No one as registered so far! :-( - LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_ACCOUNT_NOREFS_404); -} - -// Free memory -SQL_FREERESULT($result_master); - -// +// DEPRECATED! ?> diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index 22dd312f09..8c87950462 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -184,7 +184,7 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L ); // Do we have an extension task? - if ($type == "EXTENSION") { + if (($type == "EXTENSION") && (GET_EXT_VERSION($infos) == "")) { // Load extension row template LOAD_TEMPLATE("admin_list_task_ext_rows", false, $content); } else { diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index ea3997ab6e..7b7579ce63 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -46,10 +46,13 @@ ADD_DESCR("admin", __FILE__); // Init title with "all accounts" $listHeader = ADMIN_ALL_ACCOUNTS; -if (!empty($_GET['mode'])) { +if (!empty($_GET['status'])) { + // Set title according to the "status" + $listHeader = constant(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['status'])))); +} elseif (!empty($_GET['mode'])) { // Set title according to the "mode" - $listHeader = constant(sprintf("ADMIN_LIST_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['mode'])))); -} // END - if + $listHeader = constant(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['mode'])))); +} // Remember it define('__TITLE', $listHeader); @@ -72,6 +75,12 @@ if (GET_EXT_VERSION("user") >= "0.3.4") { } // END - if } // END - if +// Is the extension "country" installed? +if (EXT_IS_ACTIVE("country")) { + // Add country code + $MORE .= ", country_code"; +} // END - if + // Init unset data (bad that we change $_GET here!) if (empty($_GET['letter'])) { $_GET['letter'] = _ALL2; } if (empty($_GET['sortby'])) { $_GET['sortby'] = "userid"; } @@ -125,6 +134,9 @@ LIMIT 1", $DATA['locked'] = TRANSLATE_COMMA(GET_TOTAL_DATA($uid, "user_points", "locked_points")); $DATA['lock_timestamp'] = MAKE_DATETIME($DATA['lock_timestamp'], "2"); + // Is the lock reason not set? + if (!isset($DATA['lock_reason'])) $DATA['lock_reason'] = "---"; + // Nickname inclusion? if (EXT_IS_ACTIVE("nickname")) { // Nickname not set or invalid? Then @@ -150,6 +162,15 @@ LIMIT 1", $DATA['mails_confirmed'] = TRANSLATE_COMMA($DATA['mails_confirmed']); $DATA['emails_received'] = TRANSLATE_COMMA($DATA['emails_received']); + // Is the extension "country" installed? + if (EXT_IS_ACTIVE("country")) { + // Then overwrite country information + $DATA['country'] = COUNTRY_GENERATE_INFO($DATA['country_code']); + } elseif ($DATA['country'] == 0) { + // Zero ID??? + $DATA['country'] = "???"; + } + // Load user-details template LOAD_TEMPLATE("admin_user_details", false, $uid); } else { @@ -167,17 +188,34 @@ LIMIT 1", } // END - if if ($_GET['sortby'] == "family_name") $_GET['sortby'] = "family"; - // Parse the mode parameter - if (isset($_GET['mode'])) { + // Parse the status or mode parameter + if (isset($_GET['status'])) { // Is a WHERE statement already there? if (!empty($whereStatement)) { // Then append the status column - $whereStatement .= sprintf(" AND status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['mode'])))); + $whereStatement .= sprintf(" AND status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['status'])))); } else { // Start a new one - $whereStatement = sprintf(" WHERE status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['mode'])))); + $whereStatement = sprintf(" WHERE status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['status'])))); } - } // END - if + } elseif (isset($_GET['mode'])) { + // Choose what we need to list + switch ($_GET['mode']) { + case "norefs": // Users w/o refs + if (!empty($whereStatement)) { + // Add AND statement + $whereStatement .= " AND refid=0"; + } else { + // Add WHERE statement + $whereStatement = " WHERE refid=0"; + } + break; + + default: // Invalid list mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid list mode %s detected.", SQL_ESCAPE($_GET['mode']))); + break; + } + } // END = if // Prepare SQL and run it $SQL = "SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, status, emails_sent, mails_confirmed, emails_received".$MORE." FROM "._MYSQL_PREFIX."_user_data".$whereStatement." ORDER BY ".SQL_ESCAPE($_GET['sortby']); @@ -270,13 +308,25 @@ LIMIT 1", $content['gender'] = TRANSLATE_GENDER($content['gender']); $content['email'] = "[".$content['email']."]"; $content['addr'] = $content['REMOTE_ADDR']; - $content['status'] = TRANSLATE_STATUS($content['status']); $content['links'] = $LINKS; $content['alinks'] = MEMBER_ACTION_LINKS($content['userid'], $content['status']); $content['points'] = TRANSLATE_COMMA($pointsTotal); $content['rate'] = TRANSLATE_COMMA($clickRate); $content['locked'] = TRANSLATE_COMMA(GET_TOTAL_DATA($content['userid'], "user_points", "locked_points")); $content['lock_timestamp'] = MAKE_DATETIME($content['lock_timestamp'], "2"); + $content['status'] = TRANSLATE_STATUS($content['status']); + + // Is the lock reason not set? + if (!isset($content['lock_reason'])) $content['lock_reason'] = "---"; + + // Is the extension "country" installed? + if (EXT_IS_ACTIVE("country")) { + // Then overwrite country information + $content['country'] = COUNTRY_GENERATE_INFO($content['country_code']); + } elseif ($content['country'] == 0) { + // Zero ID??? + $content['country'] = "???"; + } // Load row template and switch colors $OUT .= LOAD_TEMPLATE("admin_list_user_row", true, $content); diff --git a/inc/modules/admin/what-sub_points.php b/inc/modules/admin/what-sub_points.php index 26731b6a5e..e16508200f 100644 --- a/inc/modules/admin/what-sub_points.php +++ b/inc/modules/admin/what-sub_points.php @@ -64,7 +64,7 @@ if ($_GET['u_id'] == "all") if ((isset($_POST['ok'])) && (!empty($_POST['points']))) { // Ok, add points to used points and send an email to him... - SUB_POINTS($uid, $_POST['points']); + SUB_POINTS("admin_all", $uid, $_POST['points']); // Prepare content $content = array( @@ -104,7 +104,7 @@ if ($_GET['u_id'] == "all") if ((isset($_POST['ok'])) && (!empty($_POST['points']))) { // Ok, add to used points and send an email to him... - SUB_POINTS(bigintval($_GET['u_id']), $_POST['points']); + SUB_POINTS("admin_single", bigintval($_GET['u_id']), $_POST['points']); // Prepare content $content = array( diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index 1eba1b02c7..a4b0bedfcc 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -93,7 +93,7 @@ if (!empty($_GET['hash'])) { // Add one-time referal bonus over referal system or directly unset($DEPTH); - ADD_POINTS_REFSYSTEM($rid, $_CONFIG['points_ref'], true, bigintval($uid), $locked, $_CONFIG['reg_points_mode']); + ADD_POINTS_REFSYSTEM("referal_bonus", $rid, $_CONFIG['points_ref'], true, bigintval($uid), $locked, $_CONFIG['reg_points_mode']); } // END - if } // END - if diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 9a555afefa..dccd81ffb8 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -192,7 +192,7 @@ ORDER BY p.payout_timestamp DESC", define('PAYOUT_POINTS_VALUE', $PAYOUT); // Subtract points from member's account - SUB_POINTS($GLOBALS['userid'], $PAYOUT); + SUB_POINTS("payout", $GLOBALS['userid'], $PAYOUT); // Add entry to his tranfer history if ($allow == "Y") diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index ed27dd0bed..7b3a4f13f0 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -194,7 +194,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) { } // END - if // Remove points from account - SUB_POINTS($GLOBALS['userid'], $_POST['amount']); + SUB_POINTS("primera_payout", $GLOBALS['userid'], $_POST['amount']); // Update primera nickname $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `primera_userid`=%s WHERE userid=%s LIMIT 1", diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index ffbe1fc3b8..7af1122af8 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -192,10 +192,10 @@ case "new": // Start new transfer __FILE__, __LINE__); // Add points to account *directly* ... - ADD_POINTS_REFSYSTEM(bigintval($_POST['to_uid']), bigintval($_POST['points']), false, "0", false, "direct"); + ADD_POINTS_REFSYSTEM("member_transfer", bigintval($_POST['to_uid']), bigintval($_POST['points']), false, "0", false, "direct"); // ... and add it to current user's used points - SUB_POINTS($GLOBALS['userid'], $_POST['points']); + SUB_POINTS("transfer", $GLOBALS['userid'], $_POST['points']); // First send email to recipient $msg = LOAD_EMAIL_TEMPLATE("member_transfer_recipient", "", __RECIPIENT_UID); diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index 627ac41651..84ca9cd035 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -233,7 +233,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) { if ($success) { // Add it to this amount unset($DEPTH); - ADD_POINTS_REFSYSTEM($GLOBALS['userid'], bigintval($_POST['amount']), false, 0, false, "direct"); + ADD_POINTS_REFSYSTEM("wernis_withdraw", $GLOBALS['userid'], bigintval($_POST['amount']), false, 0, false, "direct"); // Update the user data as well.. $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `wernis_userid`=%s WHERE userid=%s LIMIT 1", @@ -268,7 +268,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) { $success = WERNIS_EXECUTE_PAYOUT($_POST['wds66_id'], $_POST['amount']); if ($success) { // Sub points - SUB_POINTS($GLOBALS['userid'], $_POST['amount']); + SUB_POINTS("wernis_payout", $GLOBALS['userid'], $_POST['amount']); // Update WDS66 id $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `wernis_userid`=%s WHERE userid=%s LIMIT 1", diff --git a/inc/modules/order.php b/inc/modules/order.php index 9d24c7d4ed..c2b8ad8732 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -87,7 +87,7 @@ if (empty($URL)) { // Update used points $ADD = ""; if ($_CONFIG['order_max_full'] == "ORDER") $ADD = ", mail_orders=mail_orders+1"; - SUB_POINTS($GLOBALS['userid'], $USED); + SUB_POINTS("order", $GLOBALS['userid'], $USED); // Prepare content $content = array( diff --git a/inc/monthly/monthly_beg.php b/inc/monthly/monthly_beg.php index fde8d234f2..f9019b0cc0 100644 --- a/inc/monthly/monthly_beg.php +++ b/inc/monthly/monthly_beg.php @@ -74,7 +74,7 @@ LIMIT %s", // Load our winners... while ($content = SQL_FETCHARRAY($result_main)) { // Add points to user's account directly - ADD_POINTS_REFSYSTEM($content['userid'], $content['points'], false, "0", false, "direct"); + ADD_POINTS_REFSYSTEM("monthly_beg", $content['userid'], $content['points'], false, "0", false, "direct"); // Translate gender/points $content['gender'] = TRANSLATE_GENDER($content['gender']); diff --git a/inc/monthly/monthly_bonus.php b/inc/monthly/monthly_bonus.php index c11ad3c823..281c08a043 100644 --- a/inc/monthly/monthly_bonus.php +++ b/inc/monthly/monthly_bonus.php @@ -88,7 +88,7 @@ ORDER BY active_bonus DESC, userid LIMIT %s", // Make sure zero points are not mailed if ($content['points'] > 0) { // Add points to user's account directly - ADD_POINTS_REFSYSTEM($content['uid'], $content['points'], false, "0", false, "direct"); + ADD_POINTS_REFSYSTEM("monthly_bonus", $content['uid'], $content['points'], false, "0", false, "direct"); // Translate gender/points $content['gender'] = TRANSLATE_GENDER($content['gender']); diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index 9db7dff257..8f8e5cd41d 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -148,7 +148,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndT // Administrative functions require_once(PATH."inc/modules/admin/admin-inc.php"); } // END - if - //* DEBUG: */ ADD_POINTS_REFSYSTEM(36,1000); + //* DEBUG: */ ADD_POINTS_REFSYSTEM("test", 36, 1000); //* DEBUG: */ die(); // Get all values diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 9524124961..02eeb4f87c 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1151,6 +1151,7 @@ function GET_REF_LEVEL_PERCENTS ($level) { * * Dynamic referal system, can also send mails! * + * subject = Subject line, write in lower-case letters and underscore is allowed * uid = Referal ID wich should receive... * points = ... xxx points * send_notify = shall I send the referal an email or not? @@ -1159,7 +1160,7 @@ function GET_REF_LEVEL_PERCENTS ($level) { * add_mode = Add points only to $uid or also refs? (WARNING! Changing "ref" to "direct" * for default value will cause no referal will get points ever!!!) */ -function ADD_POINTS_REFSYSTEM ($uid, $points, $send_notify=false, $rid="0", $locked=false, $add_mode="ref") { +function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify=false, $rid="0", $locked=false, $add_mode="ref") { //* DEBUG: */ print "----------------------- ".__FUNCTION__." - ENTRY ------------------------
    • \n"; global $DEPTH, $_CONFIG, $DATA, $cacheArray; @@ -1173,6 +1174,12 @@ function ADD_POINTS_REFSYSTEM ($uid, $points, $send_notify=false, $rid="0", $loc return; } // END - if + // Add booking record if extension is installed + if (EXT_IS_ACTIVE("booking")) { + // Add record + ADD_BOOKING_RECORD($subject, $uid, $points, "add"); + } // END - if + // Count up referal depth if (!isset($DEPTH)) { // Initialialize referal system @@ -1271,7 +1278,7 @@ function ADD_POINTS_REFSYSTEM ($uid, $points, $send_notify=false, $rid="0", $loc if (($ref > 0) && ($points > 0) && ($ref != $uid) && ($add_mode == "ref")) { // Then let's credit him here... //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},ref={$ref},points={$points} - ADVANCE!
      \n"; - ADD_POINTS_REFSYSTEM($ref, $points, $send_notify, $ref, $locked); + ADD_POINTS_REFSYSTEM(sprintf("%s_ref:%s", $subject, $DEPTH), $ref, $points, $send_notify, $ref, $locked); } // END - if } // END - if } // END - if @@ -1831,18 +1838,26 @@ function MODULE_HAS_MENU($mod, $forceDb = false) // Return status return $ret; } + // Subtract points from database and mediadata cache -function SUB_POINTS ($uid, $points) { +function SUB_POINTS ($subject, $uid, $points) { // Add points to used points $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `used_points`=`used_points`+%s WHERE userid=%s LIMIT 1", array($points, bigintval($uid)), __FILE__, __LINE__); + // Insert booking record + if (EXT_IS_ACTIVE("booking")) { + // Add record + ADD_BOOKING_RECORD($subject, $uid, $points, "sub"); + } // END - if + // Update mediadata as well if (GET_EXT_VERSION("mediadata") >= "0.0.4") { // Update database MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points); } // END - if } + // Update config entries function UPDATE_CONFIG ($entries, $values, $updateMode="") { // Do we have multiple entries? @@ -1887,6 +1902,7 @@ function UPDATE_CONFIG ($entries, $values, $updateMode="") { // Rebuild cache REBUILD_CACHE("config", "config"); } + // Creates a new task for updated extension function CREATE_EXTENSION_UPDATE_TASK ($admin_id, $subject, $notes) { // Check if task is not there @@ -1901,6 +1917,7 @@ function CREATE_EXTENSION_UPDATE_TASK ($admin_id, $subject, $notes) { // Free memory SQL_FREERESULT($result); } + // Creates a new task for newly installed extension function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) { // Not installed and do we have created a task for the admin? diff --git a/inc/pool-update.php b/inc/pool-update.php index baa7f89c3e..bc5ea6fd70 100644 --- a/inc/pool-update.php +++ b/inc/pool-update.php @@ -270,7 +270,7 @@ if (SQL_NUMROWS($result_main) > 0) if ($uid > 0) { // User does not exists, pay points back $points = GET_PAY_POINTS($DATA[5]); - ADD_POINTS_REFSYSTEM($DATA[1], $points, false, "0", false, "direct"); + ADD_POINTS_REFSYSTEM("pool_payback", $DATA[1], $points, false, "0", false, "direct"); // Add points together and remove user $points_BACK[$DATA[1]] += $points; diff --git a/install/menu-de.sql b/install/menu-de.sql index 94122d284c..840c381fe0 100644 --- a/install/menu-de.sql +++ b/install/menu-de.sql @@ -86,6 +86,9 @@ INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`lo INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflinks','Referal-Links',6,'Y','N'); INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','order','Mailbuchung',8,'Y','N'); INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','unconfirmed','Unbestätigte Emails',5,'Y','N'); +INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9); +INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10); +INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000); INSERT INTO `mxchange_payments` VALUES (1,10,2.000,'Klick-Mail 10 Sek.',1.000); INSERT INTO `mxchange_payments` VALUES (2,20,10.000,'Klick-Mail 20 Sek.',9.000); @@ -106,10 +109,6 @@ INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUE INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','updates','Updates prüfen','Prüft, ob eine neue Version oder ein Patch auf dem Server exisitiert. Sie müssen dann die Patches/Updates selber herunterladen und einspielen. Dabei werden keine Daten von Ihrer Installation an uns gesendet!','8'); INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','extensions','Erweiterungen','Erweiterungen installieren, updaten, sperren, löschen usw.','8'); -INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9); -INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10); -INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000); - INSERT INTO `mxchange_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','stats','Statistiken','7','Y','N'); INSERT INTO `mxchange_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('online',NULL,'Jetzt Online','2','Y','N'); INSERT INTO `mxchange_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('admin',NULL,'Administrative Links','3','N','N'); diff --git a/install/menu-en.sql b/install/menu-en.sql index 94122d284c..840c381fe0 100644 --- a/install/menu-en.sql +++ b/install/menu-en.sql @@ -86,6 +86,9 @@ INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`lo INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflinks','Referal-Links',6,'Y','N'); INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','order','Mailbuchung',8,'Y','N'); INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','unconfirmed','Unbestätigte Emails',5,'Y','N'); +INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9); +INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10); +INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000); INSERT INTO `mxchange_payments` VALUES (1,10,2.000,'Klick-Mail 10 Sek.',1.000); INSERT INTO `mxchange_payments` VALUES (2,20,10.000,'Klick-Mail 20 Sek.',9.000); @@ -106,10 +109,6 @@ INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUE INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','updates','Updates prüfen','Prüft, ob eine neue Version oder ein Patch auf dem Server exisitiert. Sie müssen dann die Patches/Updates selber herunterladen und einspielen. Dabei werden keine Daten von Ihrer Installation an uns gesendet!','8'); INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','extensions','Erweiterungen','Erweiterungen installieren, updaten, sperren, löschen usw.','8'); -INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9); -INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10); -INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000); - INSERT INTO `mxchange_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','stats','Statistiken','7','Y','N'); INSERT INTO `mxchange_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('online',NULL,'Jetzt Online','2','Y','N'); INSERT INTO `mxchange_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('admin',NULL,'Administrative Links','3','N','N'); diff --git a/mailid_top.php b/mailid_top.php index a61ce990cc..921effc2ee 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -239,7 +239,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) // Add points unset($DEPTH); - ADD_POINTS_REFSYSTEM($url_uid, $payment, false, "0", $locked); + ADD_POINTS_REFSYSTEM("mailid_okay", $url_uid, $payment, false, "0", $locked); // Shall I add bonus points for "turbo clickers" ? if ((GET_EXT_VERSION("bonus") >= "0.2.2") && (function_exists('BONUS_ADD_TURBO_POINTS'))) { @@ -271,7 +271,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) } else { // Wrong image code! So add points to sender's account unset($DEPTH); - ADD_POINTS_REFSYSTEM($sender, $payment, false, 0, false, "direct"); + ADD_POINTS_REFSYSTEM("mailid_payback", $sender, $payment, false, 0, false, "direct"); // Load template LOAD_TEMPLATE("mailid_points_failed"); diff --git a/templates/de/html/member/member_welcome.tpl b/templates/de/html/member/member_welcome.tpl index 89ec2ec01b..57fe6cf436 100644 --- a/templates/de/html/member/member_welcome.tpl +++ b/templates/de/html/member/member_welcome.tpl @@ -1,2 +1,2 @@ Hier könnten Ihre News stehen. Das Template finden Sie unter -{!PATH!}/templates/de/html/member/member_welcome.tpl +{!PATH!}/templates/de/html/member/member_welcome.tpl. diff --git a/templates/de/html/redirect_url.tpl b/templates/de/html/redirect_url.tpl index 0d27c59a2e..e52df9a25c 100644 --- a/templates/de/html/redirect_url.tpl +++ b/templates/de/html/redirect_url.tpl @@ -1,4 +1,4 @@ - +