* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
$ADD = " AND `d`.`is_active`='Y'";
if (isAdmin()) $ADD = '';
-$result = SQL_QUERY("SELECT
+$result = sqlQuery("SELECT
`d`.`id`,
`d`.`admin_id`,
`a`.`login`,
`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'])) {
// 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
// Set start and end time
$content['start_time'] = generateDateTime($content['start_time'], 1);
$content['end_time'] = generateDateTime($content['end_time'] , 1);
- // Determine min_users
- $content['min_users'] = determineReferralRallyeMinimumUsers($content['min_users']);
-
- // Determine min prices (now in function)
- $content['min_prices'] = determineReferralRallyeMinimumPrices($content['min_prices']);
-
if ($expired === TRUE) {
$content['prices'] = addReferralRallyeWinners('guest', $content['id']);
$content['top_users'] = '<div align="center" class="big">' . $content['extras'] . '</div>';