]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-rallyes.php
Large code cleanups:
[mailer.git] / inc / modules / member / what-rallyes.php
index b438e2fe6ebe4a4963476b396e6d16290348bc62..4ecc3cca97e98a874dfa3f44dfa226028c1c034e 100644 (file)
@@ -17,7 +17,7 @@
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -46,7 +46,7 @@ if (!defined('__SECURITY')) {
 addYouAreHereLink('member', __FILE__);
 
 if ((!isExtensionActive('rallye')) && (!isAdmin())) {
-       loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('rallye'));
+       displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=rallye%}');
        return;
 } // END - if
 
@@ -81,12 +81,12 @@ if (SQL_NUMROWS($result) == 1) {
                // Rallye will expire in less one day!
                $content['extras'] = '{--RALLYE_EXPIRE_ONE_DAY--}';
        } else {
-               // Link to referal links page
-               $content['extras'] = '<a href="{%url=modules.php?module=login&amp;what=reflinks%}">{--RALLYE_GET_REFERAL_LINK--}</a>';
+               // Link to referral links page
+               $content['extras'] = '<a href="{%url=modules.php?module=login&amp;what=reflinks%}">{--RALLYE_GET_REFERRAL_LINK--}</a>';
        }
 
        // Set admin line (currently set to impressum, later to contact form)
-       // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&amp;what=impressum&amp;admin=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
+       // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&amp;what=impressum&amp;id=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
 
        // Handle description...
        if ((empty($content['descr'])) && (!empty($content['template']))) {
@@ -95,28 +95,28 @@ if (SQL_NUMROWS($result) == 1) {
        } // END - if
 
        // Determine min_users/prices
-       $content['min_users']  = determineReferalRallyeMinimumUsers($content['min_users']);
-       $content['min_prices'] = determineReferalRallyeMinimumPrices($content['min_prices']);
+       $content['min_users']  = determineReferralRallyeMinimumUsers($content['min_users']);
+       $content['min_prices'] = determineReferralRallyeMinimumPrices($content['min_prices']);
 
        // Set start and end time
        $content['start'] = generateDateTime($content['start_time'], 1);
        $content['end']   = generateDateTime($content['end_time']  , 1);
 
        if ($expired === true) {
-               $content['prices']       = addReferalRallyeWinners($content['id']);
+               $content['prices']       = addReferralRallyeWinners('member', $content['id']);
                $content['top_users']    = '<div align="center" class="big">' . $content['extras'] . '</div>';
                $content['can_win_this'] = '{--RALLYE_OUR_WINNERS_ARE--}';
        } else {
-               $content['prices']       = addReferalRallyePrices($content['id'], 'html');
-               $content['top_users']    = addReferalRallyeTopUsers($content['id'], getMemberId());
+               $content['prices']       = addReferralRallyePrices($content['id'], 'html');
+               $content['top_users']    = addReferralRallyeTopUsers('member', $content['id'], getMemberId());
                $content['can_win_this'] = '{--RALLYE_YOU_CAN_WIN--}';
        }
 
        // And load final template
-       loadTemplate('guest_rallye_show', false, $content);
+       loadTemplate('member_show_rallye', false, $content);
 } else {
        // No rallye found so far
-       loadTemplate('guest_no_rallyes');
+       loadTemplate('member_rallye_404');
 }
 
 // Free result