* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
array(bigintval($content['id']), bigintval($content['userid'])), __FUNCTION__, __LINE__);
// Is there an entry?
- if (ifSqlHasZeroNums($result_ref)) {
+ if (ifSqlHasZeroNumRows($result_ref)) {
// Add userid and his ref count to table
$result_ref = sqlQueryEscaped("SELECT
SUM(`p`.`points`) AS `points`
array($rallye), __FUNCTION__, __LINE__);
// Entries found?
- if (!ifSqlHasZeroNums($result_prices)) {
+ if (!ifSqlHasZeroNumRows($result_prices)) {
// Load prices
$prices = '';
if ($mode == PHP_EOL) {
// Load users
$content = array(
- 'userid' => array(),
- 'ref' => array(),
- 'cpoints' => array()
+ 'userid' => [],
+ 'ref' => [],
+ 'cpoints' => []
);
// Load all users
}
// Run this function only when a new member has confirmed his email address!
-function addUserToReferralRallye ($userid, $content = array()) {
+function addUserToReferralRallye ($userid, $content = []) {
$add = '';
// Updated extension?
), __FUNCTION__, __LINE__);
// Is this user added?
- if (ifSqlHasZeroNums($result)) {
+ if (ifSqlHasZeroNumRows($result)) {
// Add userid and his ref count to table
sqlQueryEscaped("INSERT INTO
`{?_MYSQL_PREFIX?}_rallye_users`
// Init array
$count = '0';
- $users = array();
+ $users = [];
$content['start_time'] = generateDateTime($content['start_time'], 1);
$content['end_time'] = generateDateTime($content['end_time'] , 1);
$content['now_time'] = generateDateTime(time(), 1);
function getArrayFromReferralRallyePrices ($rallye) {
// Init multi array
$prices = array(
- 'level' => array(),
- 'points' => array(),
- 'info' => array()
+ 'level' => [],
+ 'points' => [],
+ 'info' => []
);
// Load prices
// Init multi array
$users = array(
- 'userid' => array(),
- 'ref' => array(),
- 'cpoints' => array(),
+ 'userid' => [],
+ 'ref' => [],
+ 'cpoints' => [],
);
/*
`expired`='Y'",
array($EXPIRE), __FUNCTION__, __LINE__);
- if (!ifSqlHasZeroNums($result_rallye)) {
+ if (!ifSqlHasZeroNumRows($result_rallye)) {
// Init SQLs
initSqls();
function addReferralRallyeTemplateSelection ($name = 'template', $default = '') {
// Init variables
$OUT = '';
- $ral = array();
+ $ral = [];
// Check templates directory
$basePath = sprintf('templates/%s/html/rallye/', getLanguage());
// Read the directory
- $templates = getArrayFromDirectory($basePath, 'rallye_', FALSE, TRUE, array(), '.tpl');
+ $templates = getArrayFromDirectory($basePath, 'rallye_', FALSE, TRUE, [], '.tpl');
// And walk through
foreach ($templates as $read) {