* *
* -------------------------------------------------------------------- *
* File : what-list_bonus.php *
* *
* -------------------------------------------------------------------- *
* File : what-list_bonus.php *
* Needs to be in all Files and every File needs "svn propset *
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Needs to be in all Files and every File needs "svn propset *
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
-if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
- require($INC);
-}
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+ die();
+} // END - if
// Okay, let's prepare...
$curr = date('m', time()) - 1;
// Okay, let's prepare...
$curr = date('m', time()) - 1;
- if (getConfig('bonus_click_yn') == 'Y') $USE .= " + `turbo_bonus`";
- if (getConfig('bonus_login_yn') == 'Y') $USE .= " + `login_bonus`";
- if (getConfig('bonus_order_yn') == 'Y') $USE .= " + `bonus_order`";
- if (getConfig('bonus_stats_yn') == 'Y') $USE .= " + `bonus_stats`";
- if (getConfig('bonus_ref_yn') == 'Y') $USE .= " + `bonus_ref`";
+ if (getConfig('bonus_click_yn') == 'Y') $USE .= ' + `turbo_bonus`';
+ if (getConfig('bonus_login_yn') == 'Y') $USE .= ' + `login_bonus`';
+ if (getConfig('bonus_order_yn') == 'Y') $USE .= ' + `bonus_order`';
+ if (getConfig('bonus_stats_yn') == 'Y') $USE .= ' + `bonus_stats`';
+ if (getConfig('bonus_ref_yn') == 'Y') $USE .= ' + `bonus_ref`';
// Use last online timestamp to keep inactive members away from here
$lastOnline = " AND `last_online` >= (UNIX_TIMESTAMP() - %s)";
$ONLINE = getConfig('ap_inactive_since');
}
// Check if at least one is in the active rallye
// Use last online timestamp to keep inactive members away from here
$lastOnline = " AND `last_online` >= (UNIX_TIMESTAMP() - %s)";
$ONLINE = getConfig('ap_inactive_since');
}
// Check if at least one is in the active rallye
- $result = SQL_QUERY_ESC("SELECT userid AS uid, email, gender, surname, family, ".$USE." AS points, last_online AS last
-FROM `{!_MYSQL_PREFIX!}_user_data`
+ $result = SQL_QUERY_ESC("SELECT `userid`, `email`, `gender`, `surname`, `family`, ".$USE." AS points, `last_online`
+FROM `{?_MYSQL_PREFIX?}_user_data`
-ORDER BY points DESC, last_online DESC, userid",
+ORDER BY `points` DESC, `last_online` DESC, `userid` ASC",
array($ONLINE), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List users
array($ONLINE), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List users
- $content['uid'] = generateUserProfileLink($content['uid']);
- $content['email'] = generateMemberEmailLink($content['email'], "user_data");
+ $content['userid'] = generateUserProfileLink($content['userid']);
+ $content['email'] = generateEmailLink($content['email'], 'user_data');
$content['gender'] = translateGender($content['gender']);
$content['points'] = translateComma($content['points']);
$content['gender'] = translateGender($content['gender']);
$content['points'] = translateComma($content['points']);
$content['sw'] = $SW;
$content['win1'] = $WIN1;
$content['win2'] = $WIN2;
$content['cnt'] = $cnt;
// Load template and add it
$content['sw'] = $SW;
$content['win1'] = $WIN1;
$content['win2'] = $WIN2;
$content['cnt'] = $cnt;
// Load template and add it
- }
- define('__BONUS_ROWS', $OUT);
- define('__TOTAL', translateComma($total));
+ } // END - while
+
+ $content['rows'] = $OUT;
+ $content['total'] = translateComma($total);
// Check if we need to display form or not with manuel withdraw
if (getConfig('last_month') == date('m', time())) {
// Load form
// Check if we need to display form or not with manuel withdraw
if (getConfig('last_month') == date('m', time())) {
// Load form
- if (EXT_IS_ACTIVE('autopurge')) {
- define('__AUTOPURGE_TIMEOUT', generateDateTime(time() - getConfig('ap_inactive_since'), '2'));
+ if (isExtensionActive('autopurge')) {
+ $content['autopurge_timeout'] = generateDateTime(time() - getConfig('ap_inactive_since'), 2);
- define('__AUTOPURGE_TIMEOUT', sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'autopurge'));
+ $content['autopurge_timeout'] = loadTemplate('admin_settings_saved', true, getMaskedMessage('EXTENSION_PROBLEM_NOT_INSTALLED', 'autopurge'));