From 1c84af63a717e3fb454a790b8391d84a4727952d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 6 Oct 2008 17:35:15 +0000 Subject: [PATCH] Fixes for ranking prices --- inc/databases.php | 2 +- inc/language/bonus_de.php | 2 +- inc/modules/admin/what-config_bonus.php | 14 +++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/inc/databases.php b/inc/databases.php index 7b58825359..17b8ea8808 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -113,7 +113,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "462"); +define('CURR_SVN_REVISION', "463"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/language/bonus_de.php b/inc/language/bonus_de.php index 9331f0f70e..d67ce225e0 100644 --- a/inc/language/bonus_de.php +++ b/inc/language/bonus_de.php @@ -45,7 +45,7 @@ define('ADMIN_BONUS_LOGIN_BONUS', "Bonus für Login"); define('ADMIN_BONUS_TURBO_BONUS', "Rang-Bonus für Erst-Klicker"); define('ADMIN_BONUS_TURBO_RATES', "Bonus für Klicker 2 bis x"); define('ADMIN_BONUS_TURBO_RATES_NOTE1', "Hinweise"); -define('ADMIN_BONUS_TURBO_RATES_NOTE2', "Lassen Sie den letzten Eintrag frei, damit kein weiterer Eintrag hingefügt wird."); +define('ADMIN_BONUS_TURBO_RATES_NOTE2', "Stellen Sie zuerst unter {--ADMIN_BONUS_TURBO_RANKS--} die Anzahl der Gewinner ein. Lassen Sie dabei den letzten Platz frei!"); define('ADMIN_BONUS_TURBO_RATES_NOTE3', "Einträge löschen, um Bonus zu entfernen (alle unteren rücken beim Speichern nach!)"); define('ADMIN_BONUS_TURBO_RATES_NOTE4', "Wenn Sie alle Einträge gelöscht haben, werden Platz 2 und 3 automatisch neu berechnet."); define('ADMIN_CONFIG_LOGIN_TIMEOUT', "Zeitspanne zwischen zwei Logins"); diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index b86ddc5ecc..9e4641d08b 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -89,21 +89,29 @@ if (isset($_POST['ok'])) define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX($_CONFIG['bonus_uid'], false, true, true, "bonus_uid")); // Initialize array for the points list - $RANKS = explode(";", $_CONFIG['bonus_ranks']); + //die("*".$_CONFIG['turbo_rates']."*"); + $RANKS = explode(";", $_CONFIG['turbo_rates']); // Automatically calculate bonus points for ranks 2 and 3 when not set if (empty($_CONFIG['bonus_ranks'])) $RANKS = array(round($_CONFIG['turbo_bonus'] / 2), round($_CONFIG['turbo_bonus'] / 4)); // Generate list $OUT = "
    \n"; + $cnt = 0; foreach ($RANKS as $k => $rate) { if (!empty($rate)) { // Print only when something is in $OUT .= "
  1.  (".POINTS.")\n"; } + $cnt++; } - for ($i = 3; $i < 8; $i++) { - $OUT .= "
  2.  (".POINTS.")\n"; + // Maxmium entries + $max = 10; + if ($cnt >= 8) $max = $cnt+3; + + // Add more empty fields + for ($i = $cnt; $i < $max; $i++) { + $OUT .= "
  3.  (".POINTS.")\n"; } $OUT .= "
\n"; define('__TRATES_LIST', $OUT); -- 2.39.5