]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-rallyes.php
Added update_year.sh (still not fully flexible) and updated all years with it.
[mailer.git] / inc / modules / member / what-rallyes.php
index 26292af15672773ed462109b3e139bc0098bfd8f..5a8a665c7b2ff93ef0944c6c8ca9c3589a95f3cb 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -54,7 +54,7 @@ if ((!isExtensionActive('rallye')) && (!isAdmin())) {
 $ADD = " AND `d`.`is_active`='Y'";
 if (isAdmin()) $ADD = '';
 
-$result = SQL_QUERY("SELECT
+$result = sqlQuery("SELECT
        `d`.`id`,
        `d`.`admin_id`,
        `a`.`login`,
@@ -78,9 +78,9 @@ ORDER BY
        `d`.`end_time` ASC
 LIMIT 1", __FILE__, __LINE__);
 
-if (SQL_NUMROWS($result) == 1) {
+if (sqlNumRows($result) == 1) {
        // Found some (normally one...
-       $content = SQL_FETCHARRAY($result);
+       $content = sqlFetchArray($result);
 
        $expired = FALSE;
        if (($content['end_time'] < time()) && (getTotalConfirmedUser() >= $content['min_users']) && (getTotalRallyeWinners($content['id']) >= $content['min_prices'])) {
@@ -101,13 +101,9 @@ if (SQL_NUMROWS($result) == 1) {
        // Handle description...
        if ((empty($content['descr'])) && (!empty($content['template']))) {
                // Use description from template
-               $content['descr'] = loadTemplate('rallye_' . $content['template'], TRUE);
+               $content['descr'] = '{%template,LoadTemplate=rallye_' . $content['template'] . '%}';
        } // END - if
 
-       // Determine min_users/prices
-       $content['min_users']  = determineReferralRallyeMinimumUsers($content['min_users']);
-       $content['min_prices'] = determineReferralRallyeMinimumPrices($content['min_prices']);
-
        // Set start and end time
        $content['start_time'] = generateDateTime($content['start_time'], 1);
        $content['end_time']   = generateDateTime($content['end_time']  , 1);
@@ -130,7 +126,7 @@ if (SQL_NUMROWS($result) == 1) {
 }
 
 // Free result
-SQL_FREERESULT($result);
+sqlFreeResult($result);
 
 // [EOF]
 ?>