// Update all counters
foreach ($GLOBALS['cache_array']['filter']['counter'] as $filterName => $filterArray) {
// Walk through all filters
- foreach ($filterArray as $filterFunction => $cnt) {
+ foreach ($filterArray as $filterFunction => $count) {
// Construct and add the query
addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_filters` SET `filter_counter`=%s WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT 1",
- bigintval($cnt),
+ bigintval($count),
$filterName,
$filterFunction
));
// Generates a HTML table based on given data
// @TODO Lame description
function generateDoublerTable ($userid = '0', $done = 'N', $ref = 'N', $sort = 'ASC') {
- if (empty($cnt)) $cnt = '0';
$add = ''; $DT_MODE = '0';
if (isValidUserId($userid)) {
// Load entries only from a single user
$un = false;
// Get refs by userid
- $cnt = getReferalRallyeRefsCount($content['userid']);
- if (empty($cnt)) $cnt = '0'; // Added prevent some unknown troubles... :-?
+ $count = getReferalRallyeRefsCount($content['userid']);
+ if (empty($count)) $count = '0'; // Added prevent some unknown troubles... :-?
// Check if line is already included...
$result_ref = SQL_QUERY_ESC("SELECT
array(
bigintval($id),
bigintval($content['userid']),
- bigintval($cnt),
+ bigintval($count),
$cpoints
), __FUNCTION__, __LINE__);
$un = true;
} // END - if
// Ignored but for the template required refs (made before start of rallye)
- $content['refs'] = $cnt;
+ $content['refs'] = $count;
// Shall I notify this member?
if (($notify == 'Y') && ($un)) {
// Load all users
while ($content = SQL_FETCHARRAY($result)) {
// Get current refs
- $cnt = getReferalRallyeRefsCount($content['userid'], $content['refs']);
+ $count = getReferalRallyeRefsCount($content['userid'], $content['refs']);
// Points of ref's
$result_ref = SQL_QUERY_ESC("SELECT
$userid = '---';
// List only users with at least one ref!
- //* DEBUG: */ debugOutput('*'.$cnt.'/'.$content['userid'].'/'.$content['curr_points'].'/'.$refpoints.'*');
- if (($cnt > 0) && ($refpoints > $content['curr_points'])) {
+ //* DEBUG: */ debugOutput('*'.$count.'/'.$content['userid'].'/'.$content['curr_points'].'/'.$refpoints.'*');
+ if (($count > 0) && ($refpoints > $content['curr_points'])) {
$userid = $content['userid'];
} else {
- $cnt = '';
+ $count = '';
}
// Save values to array
$DATA['userid'][] = $userid;
- $DATA['ref'][] = $cnt;
+ $DATA['ref'][] = $count;
$DATA['cpoints'][] = $content['curr_points'];
$min_users = $content['min_users'];
$min_prices = $content['min_prices'];
// Init array
$DATA = array();
- $cnt = '0';
+ $count = '0';
$users = array();
$DATA['title'] = $title;
$DATA['start'] = generateDateTime($start, 1);
} // END - if
// Count userid
- $cnt++;
+ $count++;
$users['userid'][$userid] = $userid;
$users['poi'][$userid] = $DATA['infos'];
} // END - if
$templ = 'admin_rallye_expired';
} elseif (is_array($users['userid'])) {
$templ = 'admin_rallye_expired_no';
- $cnt = getReferalRallyeUserDataFromArray($users);
+ $count = getReferalRallyeUserDataFromArray($users);
}
// Send mail to admin
- sendAdminNotification(getMaskedMessage('RALLYE_ADMIN_EXPIRED_SUBJECT', $title), $templ, $cnt);
+ sendAdminNotification(getMaskedMessage('RALLYE_ADMIN_EXPIRED_SUBJECT', $title), $templ, $count);
// Add task (we ignore the task id here)
createNewTask('{--RALLYE_ADMIN_EXPIRED--}: ' . $title, '{--RALLYE_ADMIN_EXPIRED_TEXT--}', 'RALLYE_EXPIRED');
array(bigintval($rallye)), __FUNCTION__, __LINE__);
while ($content = SQL_FETCHARRAY($result_user)) {
// Load current ref count
- $cnt = getReferalRallyeRefsCount($content['userid'], $content['refs']);
+ $count = getReferalRallyeRefsCount($content['userid'], $content['refs']);
// Points of ref's
$result_ref = SQL_QUERY_ESC("SELECT
// Store calculated new refs to array
$users['userid'][] = $content['userid'];
- $users['ref'][] = abs($cnt - $content['refs']);
+ $users['ref'][] = abs($count - $content['refs']);
$users['cpoints'][] = $refpoints - $content['curr_points'];
} // END - while
// Check current refs
if (isExtensionInstalledAndNewer('cache', '0.1.2')) {
// Get refs from cache
- $cnt = '0';
+ $count = '0';
foreach ($GLOBALS['cache_array']['refsystem']['userid'] as $id => $userid) {
// Do we have a ref for this user?
//* DEBUG: */ debugOutput('id='.$id.',userid='.$userid.',userid='.$userid.',old='.$old.',level='.$GLOBALS['cache_array']['refsystem']['level'][$id]);
foreach ($GLOBALS['cache_array']['refdepths']['level'] as $level) {
if (($level == $GLOBALS['cache_array']['refsystem']['level'][$id]) && ($level == 1)) {
// Level does exist so abort here
- $cnt = $GLOBALS['cache_array']['refsystem']['counter'][$id];
- //* DEBUG: */ debugOutput('*'.$userid.'/'.$cnt.'*');
+ $count = $GLOBALS['cache_array']['refsystem']['counter'][$id];
+ //* DEBUG: */ debugOutput('*'.$userid.'/'.$count.'*');
break;
} elseif ($level > 1) {
// Not interesting here...
} // END - foreach
// Abort also here!
- if ($cnt > 0) break;
+ if ($count > 0) break;
} // END - if
} // END - foreach
//* DEBUG: */ debugOutput('<pre>'.print_r($GLOBALS['cache_array']['refsystem'], true).'</pre>');
//* DEBUG: */ shutdown();
- if ($cnt > 0) {
+ if ($count > 0) {
// Count cache hits
incrementStatsEntry('cache_hits');
// Remove old refs
- //* DEBUG: */ debugOutput('+'.$cnt.'/'.$old.'+');
- $cnt -= $old;
+ //* DEBUG: */ debugOutput('+'.$count.'/'.$old.'+');
+ $count -= $old;
} // END - if
} else {
// Load current refs from database
), __FUNCTION__, __LINE__);
// Load count @TODO Can't we rewrite this to our API?
- list($cnt) = SQL_FETCHROW($result_ref);
+ list($count) = SQL_FETCHROW($result_ref);
// Free result
SQL_FREERESULT($result_ref);
- if (empty($cnt)) {
- $cnt = '0';
+ if (empty($count)) {
+ $count = '0';
} else {
- $cnt -= $old;
+ $count -= $old;
}
}
// Return count
- //* DEBUG: */ debugOutput('*'.$userid.'/'.$old.'/'.$cnt.'*');
- return $cnt;
+ //* DEBUG: */ debugOutput('*'.$userid.'/'.$old.'/'.$count.'*');
+ return $count;
}
// Determines the right language string for min_users
);
// Fetch row
- list($cnt) = SQL_FETCHROW($result);
+ list($count) = SQL_FETCHROW($result);
// Free result
SQL_FREERESULT($result);
// Debug message
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'cnt=' . $cnt);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'cnt=' . $count);
// Return result
- return $cnt;
+ return $count;
}
// Check wether the user is allowed to book more URLs
}
// Get amount from database
- $cnt = countSumTotalData($userid, 'surfbar_urls', 'url_id', 'url_userid', true, $add);
+ $count = countSumTotalData($userid, 'surfbar_urls', 'url_id', 'url_userid', true, $add);
// Return result
- return $cnt;
+ return $count;
}
// Generate a validation code for the given id number
);
// Fetch counter
- list($cnt) = SQL_FETCHROW($result);
+ list($count) = SQL_FETCHROW($result);
// Free result
SQL_FREERESULT($result);
// Return check
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'cnt=' . $cnt . ',' . SURFBAR_GET_SURF_LOCK() . '', false);
- return ($cnt == 1);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'cnt=' . $count . ',' . SURFBAR_GET_SURF_LOCK() . '', false);
+ return ($count == 1);
}
// Determine which user hash no more points left
`stats_userid` ASC', __FUNCTION__, __LINE__);
// Fetch count
- $cnt = SQL_NUMROWS($result);
+ $count = SQL_NUMROWS($result);
// Free result
SQL_FREERESULT($result);
// Return result
- return $cnt;
+ return $count;
}
// Determine waiting time for one URL
$dataArray = explode('|', $responseLine);
// Now make the result array with two dimensions
- $cnt = '0'; $entry = '0';
+ $count = '0'; $entry = '0';
foreach ($dataArray as $line) {
// Add the line
- $result[$entry][yoomediaTranslateIndex($type, $cnt)] = $line;
+ $result[$entry][yoomediaTranslateIndex($type, $count)] = $line;
// End of data of first entry reached?
- if ($cnt == 6) {
+ if ($count == 6) {
// Then advance to next entry and reset counter
$entry++;
- $cnt = '0';
+ $count = '0';
} else {
// Count up
- $cnt++;
+ $count++;
}
} // END - foreach
// Change activation status
function adminChangeActivationStatus ($IDs, $table, $row, $idRow = 'id') {
- $cnt = '0'; $newStatus = 'Y';
+ $count = '0'; $newStatus = 'Y';
if ((is_array($IDs)) && (count($IDs) > 0)) {
// "Walk" all through and count them
foreach ($IDs as $id => $selected) {
array($table, $row, $newStatus, $idRow, $id), __FUNCTION__, __LINE__);
// Count up affected rows
- $cnt += SQL_AFFECTEDROWS();
+ $count += SQL_AFFECTEDROWS();
} // END - if
// Free the result
} // END - foreach
// Output status
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_STATUS_CHANGED'), $cnt, count($IDs)));
+ loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_STATUS_CHANGED'), $count, count($IDs)));
} else {
// Nothing selected!
loadTemplate('admin_settings_saved', false, '{--ADMIN_NOTHING_SELECTED_CHANGE--}');
// @TODO Kill all constants in this file
$content['sub'] = $SUB;
$content['chk'] = countPostSelection();
- $cnt = '0'; $OUT = '';
+ $count = '0'; $OUT = '';
foreach (postRequestParameter('sel') as $sel => $confirm) {
if ($confirm == 1) {
- $cnt++;
+ $count++;
$result = SQL_QUERY_ESC("SELECT `title`, `action`, `what`, `descr` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
'sel' => $sel,
'menu' => $data['title'],
'descr' => $data['descr'],
- 'cnt' => $cnt,
+ 'cnt' => $count,
);
// Load row template
} // END - foreach
$content['rows'] = $OUT;
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
// Load template
loadTemplate('admin_edit_admin_menu_form', false, $content);
$content['chk'] = countPostSelection();
// Del menu entries with or without confirmation
- $cnt = '0'; $OUT = '';
+ $count = '0'; $OUT = '';
foreach (postRequestParameter('sel') as $sel => $confirm) {
if ($confirm == 1) {
- $cnt++;
+ $count++;
$result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Prepare data for the row template
$data = array(
'menu' => $data['title'],
- 'cnt' => $cnt,
+ 'cnt' => $count,
'sel' => $sel,
);
$OUT .= loadTemplate('admin_delete_admin_menu_row', true, $data);
} // END - if
} // END - switch
$content['rows'] = $OUT;
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
// Load template
loadTemplate('admin_delete_admin_menu', false, $content);
$content['sub'] = $SUB;
// Init variables
- $OUT = ''; $cnt = '0';
+ $OUT = ''; $count = '0';
// Process all entries
while ($data = SQL_FETCHARRAY($result)) {
// Count this entry
- $cnt++;
+ $count++;
// Init navigation variable
$data['navi'] = '';
if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($SUB)))) {
// Is highest position
$data['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']+1) . '&fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
- } elseif ($cnt == SQL_NUMROWS($result)) {
+ } elseif ($count == SQL_NUMROWS($result)) {
// Is lowest position
$data['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']-1) . '&fid=' . $data['sort'] . '%}">{--HIGHER--}</a>';
} elseif ($data['sort'] > 0) {
// Generate list
$OUT = '<ol start="2">';
- $cnt = '0';
+ $count = '0';
foreach ($RANKS as $k => $rate) {
if (!empty($rate)) {
// Print only when something is in
$OUT .= '<li><input type="text" name="rate[' . ($k + 2) . ']" class="form_field" size="4" maxlength="7" value="' . $rate . '" /> <div class="notice">({?POINTS?})</div></li>';
} // END - if
- $cnt++;
+ $count++;
} // END - foreach
// Maxmium entries
$max = 10;
- if ($cnt >= 8) $max = $cnt+3;
+ if ($count >= 8) $max = $count+3;
// Add more empty fields
- for ($i = $cnt; $i < $max; $i++) {
+ for ($i = $count; $i < $max; $i++) {
$OUT .= ' <li><input type="text" name="rate[' . ($i+2) . ']" class="form_field" size="4" maxlength="7" /> <div class="notice">({?POINTS?})</div></li>';
} // END - for
$OUT .= '</ol>';
// Do we want to save changes?
if (isFormSent()) {
// Begin counting
- $cnt = 0;
+ $count = 0;
// Update all entries
foreach (postRequestParameter('sel') as $id => $value) {
array($value, bigintval($id), $value),__FILE__, __LINE__);
// Get affected rows
- $cnt += SQL_AFFECTEDROWS();
+ $count += SQL_AFFECTEDROWS();
} // END - foreach
// Output message for updated entries
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_REGISTER_CHANGES_SAVED', $cnt));
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_REGISTER_CHANGES_SAVED', $count));
} // END - if
// List all register values
addMenuDescription('admin', __FILE__);
// Init counter for deleted mails
-$cnt = '0';
+$count = '0';
if (isGetRequestParameterSet('mid')) {
// Load email data
// Remove links from DB
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s",
array(bigintval($stats_id)), __FILE__, __LINE__);
- $cnt += SQL_AFFECTEDROWS();
+ $count += SQL_AFFECTEDROWS();
// Load template for link
loadTemplate('admin_settings_saved', false, '<a href="{%url=modules.php?module=admin&what=del_email&pid=' . bigintval(getRequestParameter('mid')) . '%}">{--ADMIN_REMOVE_STATS_ENTRY--}</a>');
// Delete mail from queue
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1",
array(bigintval(getRequestParameter('mid'))), __FILE__, __LINE__);
- $cnt += SQL_AFFECTEDROWS();
+ $count += SQL_AFFECTEDROWS();
// Output link for manually removing stats entry
- outputHtml(getMaskedMessage('ADMIN_DELETED_MAILS_COUNT', $cnt));
+ outputHtml(getMaskedMessage('ADMIN_DELETED_MAILS_COUNT', $count));
} else {
// Mail already deleted!
loadTemplate('admin_settings_saved', false, '{--ADMIN_NORMAL_MAIL_ALREADY_DELETED--}');
reduceRecipientReceivedMails('bonus_id', getRequestParameter('bid'), $content['mails_sent']);
// Init counter for deleted mails
- $cnt = '0';
+ $count = '0';
// Delete bonus mail entirely from database
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__);
- $cnt += SQL_AFFECTEDROWS();
+ $count += SQL_AFFECTEDROWS();
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",
array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__);
- $cnt += SQL_AFFECTEDROWS();
+ $count += SQL_AFFECTEDROWS();
// Prepare data for the template
$content['timestamp'] = generateDateTime($content['timestamp'], 0);
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
// Load template
loadTemplate('admin_delete_email_bonus', false, $content);
$content = SQL_FETCHARRAY($result);
// Init counter for deleted mails
- $cnt = '0';
+ $count = '0';
// Delete bonus mail entirely from database
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
array(bigintval(getRequestParameter('nid'))), __FILE__, __LINE__);
- $cnt += SQL_AFFECTEDROWS();
+ $count += SQL_AFFECTEDROWS();
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",
array(bigintval(getRequestParameter('nid'))), __FILE__, __LINE__);
- $cnt += SQL_AFFECTEDROWS();
+ $count += SQL_AFFECTEDROWS();
// Prepare data for the template
$content['timestamp'] = generateDateTime($content['timestamp'], 0);
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
// Load template
loadTemplate('admin_delete_email_notify', false, $content);
// Shall I delete selected holidays???
if (ifPostContainsSelections()) {
// Delete multiple holiday requests (for list_holiday)
- $cnt = '0';
+ $count = '0';
foreach (postRequestParameter('sel') as $id => $sel) {
// Get the userid
$result = SQL_QUERY_ESC("SELECT
// Send email to user
$message = loadEmailTemplate('member_holiday_removed', $content, $content['userid']);
sendEmail($content['userid'], '{--ADMIN_HOLIDAY_REMOVED_SUBJECT--}', $message);
- $cnt++;
+ $count++;
} // END - if
// Free result
SQL_FREERESULT($result);
} // END - foreach
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_HOLIDAY_MULTI_DELETE', $cnt));
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_HOLIDAY_MULTI_DELETE', $count));
} elseif (isGetRequestParameterSet('userid')) {
// Set default message
$message = '{--ADMIN_HOLIDAY_SINGLE_404--}';
$content['sub'] = $subMenu;
$content['chk'] = countPostSelection();
- $cnt = '0'; $OUT = '';
+ $count = '0'; $OUT = '';
foreach (postRequestParameter('sel') as $sel => $confirm) {
if ($confirm == 1) {
- $cnt++;
+ $count++;
$result = SQL_QUERY_ESC("SELECT `title`, `action`, `what` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Prepapre content
$DATA = array(
- 'cnt' => $cnt,
+ 'cnt' => $count,
'sel' => $sel,
'action' => adminAddMenuSelectionBox('guest', 'action', 'sel_action[' . $sel . ']', $DATA['action']),
'what' => adminAddMenuSelectionBox('guest', 'what' , 'sel_what[' . $sel . ']', $DATA['what']),
} // END - foreach
$content['rows'] = $OUT;
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
// Load template
loadTemplate('admin_edit_guest_menu_form', false, $content);
$content['sub'] = $subMenu;
$content['chk'] = countPostSelection();
- $cnt = '0';
+ $count = '0';
$OUT = '';
foreach (postRequestParameter('sel') as $sel => $confirm) {
if ($confirm == 1) {
- $cnt++;
+ $count++;
$result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
$DATA = SQL_FETCHARRAY($result);
$DATA = array(
- 'cnt' => $cnt,
+ 'cnt' => $count,
'menu' => $DATA['title'],
'sel' => $sel,
);
} // END - if
} // END - foreach
$content['rows'] = $OUT;
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
// Load template
loadTemplate('admin_delete_guest_menu', false, $content);
$content['chk'] = countPostSelection();
// Load template
- $cnt = '0'; $OUT = '';
+ $count = '0'; $OUT = '';
foreach (postRequestParameter('sel') as $sel => $confirm) {
if ($confirm == 1) {
- $cnt++;
+ $count++;
$result = SQL_QUERY_ESC("SELECT `title`, `visible`, `locked` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
$data = SQL_FETCHARRAY($result);
$data = array(
- 'cnt' => $cnt,
+ 'cnt' => $count,
'menu' => $data['title'],
'sel' => $sel,
'visible' => addSelectionBox('yn', $data['visible'], 'visible', $sel),
SQL_FREERESULT($result);
} // END - if
} // END - foreach
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
$content['rows'] = $OUT;
// Load template
$content['sub'] = $subMenu;
// Init variables
- $cnt = '0';
+ $count = '0';
$OUT = '';
// Process all menu entries
while ($data = SQL_FETCHARRAY($result)) {
- $cnt++;
+ $count++;
if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($subMenu)))) {
// Is highest position
$NAVI = '<a href="{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']+1) . '&fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
- } elseif ($cnt == SQL_NUMROWS($result)) {
+ } elseif ($count == SQL_NUMROWS($result)) {
// Is lowest position
$NAVI = '<a href="{%url=modules.php?module=admin&what=guestedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']-1) . '&fid=' . $data['sort'] . '%}">{--HIGHER--}</a>';
} elseif ($data['sort'] > 0) {
if (!SQL_HASZERONUMS($result)) {
// List users
- $OUT = ''; $cnt = 1; $total = '0';
+ $OUT = ''; $count = 1; $total = '0';
while ($content = SQL_FETCHARRAY($result)) {
// Init variables
$WIN1 = ''; $WIN2 = '';
// Maybe he can win his active beg?
- if ($cnt <= getConfig('beg_ranks')) {
+ if ($count <= getConfig('beg_ranks')) {
// Mark him
$WIN1 = '<strong>';
$WIN2 = '</strong>';
'last_online' => generateDateTime($content['last_online'], 2),
'win1' => $WIN1,
'win2' => $WIN2,
- 'cnt' => $cnt,
+ 'cnt' => $count,
);
// Load template and add it
$OUT .= loadTemplate('admin_list_beg_rows', true, $content);
- $cnt++; $total += $content['beg_points'];
+ $count++; $total += $content['beg_points'];
} // END - while
$content['rows'] = $OUT;
if (!SQL_HASZERONUMS($result)) {
// List users
- $OUT = ''; $cnt = 1; $total = '0';
+ $OUT = ''; $count = 1; $total = '0';
while ($content = SQL_FETCHARRAY($result)) {
// Add total points
$total += $content['points'];
// Generate array fore the dynamic template
$WIN1 = ''; $WIN2 = '';
- if ($cnt <= getConfig('bonus_ranks')) {
+ if ($count <= getConfig('bonus_ranks')) {
// Maybe he can win his active bonus?
$WIN1 = '<strong>';
$WIN2 = '</strong>';
$content['last_online'] = generateDateTime($content['last_online'], 2);
$content['win1'] = $WIN1;
$content['win2'] = $WIN2;
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
// Load template and add it
$OUT .= loadTemplate('admin_list_bonus_rows', true, $content);
- $cnt++;
+ $count++;
} // END - while
$content['rows'] = $OUT;
if (!SQL_HASZERONUMS($result_cats)) {
// List categories
- $cnt = 1; $OUT = '';
+ $count = 1; $OUT = '';
while ($row = SQL_FETCHARRAY($result_cats)) {
// Merge both arrays
$content = merge_array($content, $row);
if (SQL_NUMROWS($result_user) == 1) $selection = '<font color="#00ee00">{--YES--}</div>';
// Add more elements
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
$content['sel'] = $selection;
// Load row template and count up
$OUT .= loadTemplate('admin_list_cats_row', true, $content);
- $cnt++;
+ $count++;
} // END - while
// Free memory
$sumAlready = '0'; $sumWaiting = '0';
// Number of direct already payouts and referal
- $cnt = countSumTotalData('Y','doubler','id','completed',true, " AND `is_ref`='N'");
+ $count = countSumTotalData('Y','doubler','id','completed',true, " AND `is_ref`='N'");
- if ($cnt > 0) {
+ if ($count > 0) {
// Something was payed out
- $sumAlready += $cnt;
- $content['already_direct_link'] = '<a href="{%url=modules.php?module=admin&what=list_doubler&mode=already&select=direct%}">' . $cnt . '</a>';
+ $sumAlready += $count;
+ $content['already_direct_link'] = '<a href="{%url=modules.php?module=admin&what=list_doubler&mode=already&select=direct%}">' . $count . '</a>';
} // END - if
- $cnt = countSumTotalData('Y','doubler','id','completed',true, " AND `is_ref`='Y'");
+ $count = countSumTotalData('Y','doubler','id','completed',true, " AND `is_ref`='Y'");
- if ($cnt > 0) {
+ if ($count > 0) {
// Something was payed out
- $sumAlready += $cnt;
- $content['already_ref_link'] = '<a href="{%url=modules.php?module=admin&what=list_doubler&mode=already&select=ref%}">' . $cnt . '</a>';
+ $sumAlready += $count;
+ $content['already_ref_link'] = '<a href="{%url=modules.php?module=admin&what=list_doubler&mode=already&select=ref%}">' . $count . '</a>';
} // END - if
// And the same for waiting pouts (direct and referal)
- $cnt = countSumTotalData('N','doubler','id','completed',true, " AND `is_ref`='N'");
+ $count = countSumTotalData('N','doubler','id','completed',true, " AND `is_ref`='N'");
- if ($cnt > 0) {
+ if ($count > 0) {
// Something was payed out
- $sumWaiting += $cnt;
- $content['waiting_direct_link'] = '<a href="{%url=modules.php?module=admin&what=list_doubler&mode=waiting&select=direct%}">' . $cnt . '</a>';
+ $sumWaiting += $count;
+ $content['waiting_direct_link'] = '<a href="{%url=modules.php?module=admin&what=list_doubler&mode=waiting&select=direct%}">' . $count . '</a>';
} // END - if
- $cnt = countSumTotalData('N','doubler','id','completed',true, " AND `is_ref`='Y'");
+ $count = countSumTotalData('N','doubler','id','completed',true, " AND `is_ref`='Y'");
- if ($cnt > 0) {
+ if ($count > 0) {
// Something was payed out
- $sumWaiting += $cnt;
- $content['waiting_ref_link'] = '<a href="{%url=modules.php?module=admin&what=list_doubler&mode=waiting&select=ref%}">' . $cnt . '</a>';
+ $sumWaiting += $count;
+ $content['waiting_ref_link'] = '<a href="{%url=modules.php?module=admin&what=list_doubler&mode=waiting&select=ref%}">' . $count . '</a>';
} // END - if
// Links for all
$content['rallye'] = getRequestParameter('rallye');
while ($row = SQL_FETCHARRAY($result)) {
// Check for referal count
- $cnt = getReferalRallyeRefsCount($row['userid'], $row['refs']);
+ $count = getReferalRallyeRefsCount($row['userid'], $row['refs']);
// Init variables
$bl = '';
$br = '';
// Output row
- if (($row['curr_points'] > 0) && ($cnt > 0)) {
+ if (($row['curr_points'] > 0) && ($count > 0)) {
$bl = '<strong>';
$br = '</strong>';
} // END - if
'bold_l' => $bl ,
'bold_r' => $br ,
'refs' => $row['refs'],
- 'cnt' => $cnt,
+ 'cnt' => $count,
'opoints' => ($points - $row['curr_points']),
);
// Edit menu entries
$content['sub'] = $subMenu;
$content['chk'] = countPostSelection();
- $cnt = '0'; $OUT = '';
+ $count = '0'; $OUT = '';
foreach (postRequestParameter('sel') as $sel => $confirm) {
if ($confirm == 1) {
- $cnt++;
+ $count++;
$result = SQL_QUERY_ESC("SELECT `title`, `action`, `what` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
$data = SQL_FETCHARRAY($result);
$data = array(
- 'cnt' => $cnt,
+ 'cnt' => $count,
'sel' => $sel,
'menu' => $data['title'],
'action' => adminAddMenuSelectionBox('member', 'action', 'sel_action[' . $sel . ']', $data['action']),
// Add row content and current counter
$content['rows'] = $OUT;
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
// Load template
loadTemplate('admin_edit_member_menu', false, $content);
// Del menu entries with or without confirmation
$content['sub'] = $subMenu;
$content['chk'] = countPostSelection();
- $cnt = '0'; $OUT = '';
+ $count = '0'; $OUT = '';
foreach (postRequestParameter('sel') as $sel => $confirm) {
if ($confirm == 1) {
- $cnt++;
+ $count++;
$result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
list($title) = SQL_FETCHROW($result);
$content = array(
- 'cnt' => $cnt,
+ 'cnt' => $count,
'sel' => $sel,
'title' => $title
);
} // END - if
} // END - foreach
$content['rows'] = $OUT;
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
// Load template
loadTemplate('admin_delete_member_menu', false, $content);
// Change status (visible / locked)
$content['sub'] = $subMenu;
$content['chk'] = countPostSelection();
- $cnt = '0'; $OUT = '';
+ $count = '0'; $OUT = '';
foreach (postRequestParameter('sel') as $sel => $confirm) {
if ($confirm == 1) {
- $cnt++;
+ $count++;
$result = SQL_QUERY_ESC("SELECT `title`, `visible`, `locked` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
$data = SQL_FETCHARRAY($result);
$data = array(
- 'cnt' => $cnt,
+ 'cnt' => $count,
'menu' => $data['title'],
'sel' => $sel,
'visible' => addSelectionBox('yn', $data['visible'], 'visible', $sel),
} // END - if
} // END - foreach
$content['rows'] = $OUT;
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
// Load template
loadTemplate('admin_member_menu_status', false, $content);
// Set sub value
$content['sub'] = $subMenu;
- $cnt = '0'; $OUT = '';
+ $count = '0'; $OUT = '';
while ($data = SQL_FETCHARRAY($result)) {
// Init navigation
$data['navi'] = '';
- $cnt++;
+ $count++;
if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($subMenu)))) {
// Is highest position
$data['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']+1) . '&fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
- } elseif ($cnt == SQL_NUMROWS($result)) {
+ } elseif ($count == SQL_NUMROWS($result)) {
// Is lowest position
$data['navi'] = '<a href="{%url=modules.php?module=admin&what=adminedit&sub=' . $content['sub'] . '&act=' . $data['action'] . '&w=' . $data['what'] . '&tid=' . ($data['sort']-1) . '&fid=' . $data['sort'] . '%}">{--HIGHER--}</a>';
} elseif ($data['sort'] > 0) {
// First fix all main menus (what = '')...
$result_fix = SQL_QUERY("SELECT `id`, `action` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) AND `action` != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
-$cnt = '0'; $repairedWeights = '0';
+$count = '0'; $repairedWeights = '0';
while ($content = SQL_FETCHARRAY($result_fix)) {
// Store act value for later usage in sorting sub menus
$actions[] = $content['action'];
// Fix weight
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
- array($cnt, $content['id']), __FILE__, __LINE__);
+ array($count, $content['id']), __FILE__, __LINE__);
$repairedWeights += SQL_AFFECTEDROWS();
// Count one up
- $cnt++;
+ $count++;
} // END - while
// Set logout weight to 999
foreach ($actions as $action) {
$result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
array($action), __FILE__, __LINE__);
- $cnt = 1;
+ $count = 1;
while ($content = SQL_FETCHARRAY($result_fix)) {
// Fix weight
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`=%s WHERE `id`=%s LIMIT 1",
- array($cnt, $content['id']), __FILE__, __LINE__);
+ array($count, $content['id']), __FILE__, __LINE__);
$repairedWeights += SQL_AFFECTEDROWS();
// Count one up
- $cnt++;
+ $count++;
} // END - while
} // END - foreach
// First fix all main menus (what = '')...
$result_fix = SQL_QUERY("SELECT `id`, `action` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND `action` != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
-$cnt = '0'; $repairedWeights = '0';
+$count = '0'; $repairedWeights = '0';
while ($content = SQL_FETCHARRAY($result_fix)) {
// Store act value for later usage in sorting sub menus
$actions[] = $content['action'];
// Fix weight
$result_sort = SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `sort`=%s WHERE `id`=%s LIMIT 1",
- array($cnt, $content['id']), __FILE__, __LINE__);
+ array($count, $content['id']), __FILE__, __LINE__);
// Get updated rows
$repairedWeights += SQL_AFFECTEDROWS();
// Count one up
- $cnt++;
+ $count++;
} // END - while
// Set logout weight to 999
foreach ($actions as $action) {
$result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
array($action), __FILE__, __LINE__);
- $cnt = 1;
+ $count = 1;
while ($content = SQL_FETCHARRAY($result_fix)) {
// Fix weight
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `sort`=%s WHERE `id`=%s LIMIT 1",
- array($cnt, $content['id']), __FILE__, __LINE__);
+ array($count, $content['id']), __FILE__, __LINE__);
$repairedWeights += SQL_AFFECTEDROWS();
// Count one up
- $cnt++;
+ $count++;
} // END - while
} // END - foreach
// First fix all main menus (what = '')...
$result_fix = SQL_QUERY("SELECT `id`, `action` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) AND `action` != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
-$cnt = '0'; $repairedWeights = '0';
+$count = '0'; $repairedWeights = '0';
while ($content = SQL_FETCHARRAY($result_fix)) {
// Store action value for later usage in sorting sub menus
$actions[] = $content['action'];
// Fix weight
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`=%s WHERE `id`=%s LIMIT 1",
- array($cnt, $content['id']), __FILE__, __LINE__);
+ array($count, $content['id']), __FILE__, __LINE__);
$repairedWeights += SQL_AFFECTEDROWS();
// Count one up
- $cnt++;
+ $count++;
} // END - while
// Set logout weight to 999
foreach ($actions as $action) {
$result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
array($action), __FILE__, __LINE__);
- $cnt = 1;
+ $count = 1;
while ($content = SQL_FETCHARRAY($result_fix)) {
// Fix weight
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
- array($cnt, $content['id']), __FILE__, __LINE__);
+ array($count, $content['id']), __FILE__, __LINE__);
$repairedWeights += SQL_AFFECTEDROWS();
// Count one up
- $cnt++;
+ $count++;
} // END - while
} // END - foreach
// Entries found?
if (!SQL_HASZERONUMS($result)) {
// Get all rows
- $OUT = ''; $cnt = '0'; $visits = '0';
+ $OUT = ''; $count = '0'; $visits = '0';
while ($content = SQL_FETCHARRAY($result)) {
// Count totals
$visits += $content['total_visits'];
// Load row template
$OUT .= loadTemplate('admin_surfbar_url_stats_row', true, $content);
- $cnt++;;
+ $count++;;
} // END - while
// Prepare content
$content = array(
'rows' => $OUT,
- 'userids' => $cnt,
+ 'userids' => $count,
'visits' => $visits
);
// Generate monthly stats
$SW = 2; $r2 = ' right'; $l = 'll'; $r = 'lr'; $OUT = '';
- foreach ($months as $month => $cnt) {
+ foreach ($months as $month => $count) {
if ($SW == 2) $OUT .= '<tr>';
// Prepare data for template
'm_descr' => $GLOBALS['month_descr'][$month],
'r_class' => $r,
'r2_class' => $r2,
- 'cnt' => $cnt
+ 'cnt' => $count
);
// Load row template
// Generate category stats
$OUT = '';
- foreach ($cat_cnt as $id => $cnt) {
+ foreach ($cat_cnt as $id => $count) {
// Prepare data for the template
$data = array(
'cat' => $cats[$id],
- 'cnt' => $cnt,
+ 'cnt' => $count,
);
// Load row template and switch colors
`total_logins` DESC
LIMIT {?top10_max?}", __FILE__, __LINE__);
-$OUT = ''; $cnt = 1;
+$OUT = ''; $count = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Init nickname
$content['nickname'] = '';
// Prepare data for template
$content = array(
- 'cnt' => $cnt,
+ 'cnt' => $count,
'userid' => $content['userid'],
'nickname' => $content['nickname'],
'total_logins' => $content['total_logins'],
$OUT .= loadTemplate('guest_top10_row_login', true, $content);
// Count one up
- $cnt++;
+ $count++;
} // END - while
-if ($cnt < getConfig('top10_max')) {
+if ($count < getConfig('top10_max')) {
// Add more "blank" rows
- for ($i = $cnt; $i <= getConfig('top10_max'); $i++) {
+ for ($i = $count; $i <= getConfig('top10_max'); $i++) {
// Prepare data for template
$content = array(
'index' => $i
d.last_online DESC
LIMIT {?top10_max?}", __FILE__, __LINE__);
-$OUT = ''; $cnt = 1;
+$OUT = ''; $count = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Init nickname
$content['nickname'] = '';
// Prepare data for template
$content = array(
- 'cnt' => $cnt,
+ 'cnt' => $count,
'userid' => $content['userid'],
'nickname' => $content['nickname'],
'points' => $content['points'],
$OUT .= loadTemplate('guest_top10_row_earner', true, $content);
// Count one up
- $cnt++;
+ $count++;
} // END - while
-if ($cnt < getConfig('top10_max')) {
+if ($count < getConfig('top10_max')) {
// Add more "blank" rows
- for ($i = $cnt; $i <= getConfig('top10_max'); $i++) {
+ for ($i = $count; $i <= getConfig('top10_max'); $i++) {
// Prepare data for template
$content = array(
'index' => $i
d.last_online DESC
LIMIT {?top10_max?}", __FILE__, __LINE__);
-$OUT = ''; $cnt = 1;
+$OUT = ''; $count = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Init nickname
$content['nickname'] = '';
// Prepare data for template
$content = array(
- 'cnt' => $cnt,
+ 'cnt' => $count,
'userid' => $content['userid'],
'refs' => $content['refs'],
'nickname' => $content['nickname'],
$OUT .= loadTemplate('guest_top10_row_refs', true, $content);
// Count one up
- $cnt++;
+ $count++;
} // END - while
-if ($cnt < getConfig('top10_max')) {
+if ($count < getConfig('top10_max')) {
// Add more "blank" rows
- for ($i = $cnt; $i <= getConfig('top10_max'); $i++) {
+ for ($i = $count; $i <= getConfig('top10_max'); $i++) {
// Prepare data for template
$content = array(
'index' => $i
$OUT = '';
if (!SQL_HASZERONUMS($result)) {
// Load our winners...
- $cnt = 1;
+ $count = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the template
$content = array(
- 'cnt' => $cnt,
+ 'cnt' => $count,
'userid' => $content['userid'],
'points' => $content['points'],
'last_online' => generateDateTime($content['last_online'], 2),
$OUT .= loadTemplate('member_list_beg_row', true, $content);
// Count one up
- $cnt++;
+ $count++;
} // END - while
} else {
// No one is interested in our "active rallye" ! :-(
$OUT = '';
if (!SQL_HASZERONUMS($result)) {
// Load our winners...
- $cnt = 1;
+ $count = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the template
- $content['cnt'] = $cnt;
+ $content['cnt'] = $count;
$content['last_online'] = generateDateTime($content['last_online'], 2);
// Load row template
$OUT .= loadTemplate('member_bonus_row', true, $content);
// Count one up
- $cnt++;
+ $count++;
} // END - while
} else {
// No one is interested in our "active rallye" ! :-(
if (SQL_NUMROWS($result) > 0) {
$LEAST = false;
if (isFormSent()) {
- $cnt = '0';
+ $count = '0';
foreach (postRequestParameter('cat') as $cat => $joined) {
- if ($joined != 'Y') $cnt++;
+ if ($joined != 'Y') $count++;
} // END - foreach
- if ((SQL_NUMROWS($result) - $cnt) < getConfig('least_cats')) {
+ if ((SQL_NUMROWS($result) - $count) < getConfig('least_cats')) {
unsetPostRequestParameter('ok');
$LEAST = true;
} // END - if
// Is the form sent?
if (isFormSent()) {
// Start counting all
- $cnt = '0';
+ $count = '0';
// Go through all entries
foreach (postRequestParameter('cat') as $cat => $joined) {
SQL_QUERY_ESC(trim($sql), array(getMemberId(), bigintval($cat)), __FILE__, __LINE__);
// Count this row
- $cnt += SQL_AFFECTEDROWS();
+ $count += SQL_AFFECTEDROWS();
} // END - if
} // END - foreach
// Categories saved?
- if ($cnt > 0) {
+ if ($count > 0) {
// Output message
loadTemplate('admin_settings_saved', false, '{--MEMBER_CATEGORIES_SAVED--}');
} else {
// Do we enougth receivers left?
if (SQL_NUMROWS($result) >= postRequestParameter('receiver')) {
// Load receivers from database
- $TEST = array(); $cnt = '0';
+ $TEST = array(); $count = '0';
while ($holidayContent = SQL_FETCHARRAY($result)) {
if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
// Check for his holiday status
if ($holidayContent['userid'] > 0) {
// Add receiver
$TEST[] = $holidayContent['userid'];
- $cnt++;
+ $count++;
} // END - if
} // END - while
array(bigintval($categoriesContent['id']), getMemberId()), __FILE__, __LINE__);
$userid_cnt = '0';
- while (list($ucat) = SQL_FETCHROW($result_userids)) {
+ while (list($userid) = SQL_FETCHROW($result_userids)) {
// Check for holiday system
$isHolidayActive = false;
if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
h.holiday_start < UNIX_TIMESTAMP() AND
h.holiday_end > UNIX_TIMESTAMP()
LIMIT 1",
- array(bigintval($ucat)), __FILE__, __LINE__);
+ array(bigintval($userid)), __FILE__, __LINE__);
// Fetch entry
- list($cnt) = SQL_FETCHROW($result_holiday);
+ list($count) = SQL_FETCHROW($result_holiday);
// Free memory
SQL_FREERESULT($result_holiday);
// Is holiday is active?
- $isHolidayActive = ($cont == 1);
+ $isHolidayActive = ($count == 1);
} // END - if
if ($isHolidayActive === false) {
// Check if the user want's to receive mails?
$result_ver = SQL_QUERY_ESC("SELECT `zip` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s".$HTML." AND `receive_mails` > 0 AND `status`='CONFIRMED' LIMIT 1",
- array(bigintval($ucat)), __FILE__, __LINE__);
+ array(bigintval($userid)), __FILE__, __LINE__);
if ((SQL_NUMROWS($result_ver) == 1) && (isPostRequestParameterSet('zip')) && (getConfig('order_multi_page') == 'Y')) {
// Get zip code
list($zip) = SQL_FETCHROW($result_ver);
if (substr($zip, 0, strlen(postRequestParameter('zip'))) == postRequestParameter('zip')) {
- // Ok, ZIP part is found
+ // Ok, ZIP code part is found
$userid_cnt++;
} // END - if
} else {
// Do we have some entries?
if (!SQL_HASZERONUMS($result_sub)) {
// Init counter
- $cnt = '0';
+ $count = '0';
// Load all sub menus
while ($content2 = SQL_FETCHARRAY($result_sub)) {
}
// Cunt it up
- $cnt++;
+ $count++;
// Rewrite array
$content = array(
);
// Add regular menu row or bottom row?
- if ($cnt < SQL_NUMROWS($result_sub)) {
+ if ($count < SQL_NUMROWS($result_sub)) {
$GLOBALS['rows'] .= loadTemplate($mode . '_menu_row', true, $content);
} else {
$GLOBALS['rows'] .= loadTemplate($mode . '_menu_bottom', true, $content);
if (SQL_NUMROWS($result_bonus) > 0) {
// Send these mails away...
- $cnt2 = '';
+ $count2 = '';
while ($DATA = SQL_FETCHARRAY($result_bonus)) {
// Message is active in queue
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='QUEUE' WHERE `id`=%s LIMIT 1",
if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) {
// Update entry (or add missing
$P = $GLOBALS['pool_cnt'];
- if (!empty($cnt2) && empty($GLOBALS['pool_cnt'])) $P = $cnt2;
+ if (!empty($count2) && empty($GLOBALS['pool_cnt'])) $P = $count2;
//* DEBUG: */ debugOutput('+MEDIA/L:'.__LINE__.'/'.$P.'+');
updateMediadataEntry(array('total_send', 'bonus_send'), 'add', $P);
} // END - if
}
// Reset variables
-$cnt2 = '0'; $lastSentId = '0'; $cnt_back = array(0); $pointsBack = array(0);
+$count2 = '0'; $lastSentId = '0'; $count_back = array(0); $pointsBack = array(0);
if (!SQL_HASZERONUMS($result_main)) {
// Parse all mails
while ($DATA = SQL_FETCHARRAY($result_main, 0, false)) {
array(bigintval($DATA['id'])), __FILE__, __LINE__);
$lastSentId = $DATA['id']; $GLOBALS['pool_cnt'] = '0';
- $cnt2 += $GLOBALS['pool_cnt'];
+ $count2 += $GLOBALS['pool_cnt'];
// Update mediadata if version is 0.0.4 or higher
if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) {
break;
}
// Do we have send maximum mails?
- elseif (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || ($cnt2 >= getConfig('max_send'))) {
+ elseif (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || ($count2 >= getConfig('max_send'))) {
// There are some mails left to send for next round, so we reset the status back to NEW (=still not fully delivered)
$add = '';
if ($GLOBALS['pool_cnt'] <= $DATA['target_send']) $add = ", target_send=target_send-".$GLOBALS['pool_cnt'];
} // END - if
// Count up
- $cnt_back[$DATA['sender']]++;
+ $count_back[$DATA['sender']]++;
}
// Remove entry from list
enableTemplateHtml($insertComments);
// Init counter
- $cnt = 0;
+ $count = 0;
// Compile all out
- while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($cnt < 5)) {
+ while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($count < 5)) {
// Init common variables
$content = array();
$newContent = '';
$code = $newContent;
// Count round
- $cnt++;
+ $count++;
} // END - while
// Return the compiled code