Even more rewrites/fixes from EL branch (please report any broken part after you...
[mailer.git] / inc / modules / member / what-rallyes.php
index d4010690df19a12e09ebe191f0d655d1ae99c7c0..52b19648003f718e96c9fe65dec1e28a7a7a600b 100644 (file)
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -52,8 +53,9 @@ if ((!isExtensionActive('rallye')) && (!isAdmin())) {
 } // END - if
 
 // Check for possible running rallyes
-$ADMIN = " AND d.is_active='Y'";
-if (isAdmin()) $ADMIN = '';
+$ADD = " AND d.is_active='Y'";
+if (isAdmin()) $ADD = '';
+
 $result = SQL_QUERY("SELECT
        d.id, d.admin_id, a.login, d.title, d.descr, d.template, d.start_time, d.end_time, d.min_users, d.min_prices
 FROM
@@ -63,7 +65,7 @@ INNER JOIN
 ON
        d.admin_id=a.id
 WHERE
-       d.notified='Y'".$ADMIN."
+       d.notified='Y'" . $ADD . "
 ORDER BY
        d.end_time ASC
 LIMIT 1", __FILE__, __LINE__);
@@ -82,11 +84,11 @@ if (SQL_NUMROWS($result) == 1) {
                $content['extras'] = getMessage('RALLYE_EXPIRE_ONE_DAY');
        } else {
                // Link to referal links page
-               $content['extras'] = "<a href=\"{%url=modules.php?module=login&amp;what=reflinks%}\">{--RALLYE_GET_REFLINK--}</a>";
+               $content['extras'] = '<a href="{%url=modules.php?module=login&amp;what=reflinks%}">{--RALLYE_GET_REFLINK--}</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;admin=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
 
        // Handle description...
        if ((empty($content['descr'])) && (!empty($content['template']))) {
@@ -104,7 +106,7 @@ if (SQL_NUMROWS($result) == 1) {
 
        if ($expired === true) {
                $content['prices']       = addReferalRallyeWinners($content['id']);
-               $content['top_users']    = "<div align=\"center\" class=\"big\">".$content['extras']."</div>";
+               $content['top_users']    = '<div align="center" class="big">' . $content['extras'] . '</div>';
                $content['can_win_this'] = getMessage('RALLYE_OUR_WINNERS_ARE');
        } else {
                $content['prices']       = addReferalRallyePrices($content['id'], 'html');