X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-bonus.php;h=0850e128535bb79f7623b3115785a139ca815e92;hp=a585dd7321fa8a093ead55f5f62fdb5d25b60671;hb=2e394cb5b8a6225a39a6942b1fcc17c37a17a175;hpb=e8ca54fe91872ab95a6ffdc4f1268bf18889021d diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index a585dd7321..0850e12853 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('bonus')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('bonus')); + displayMessage(generateExtensionInactiveNotInstalledMessage('bonus')); return; } // END - if @@ -65,16 +65,19 @@ if (isExtensionInstalledAndNewer('bonus', '0.6.9')) { $USE = '`turbo_bonus`'; } +// Init variables +$lastOnline = '%s'; +$ONLINE = ''; + // Autopurge installed? -$lastOnline = '%s'; $ONLINE = ''; -if (isExtensionActive('autopurge')) { +if ((isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) { // Use last online timestamp to keep inactive members away from here - $lastOnline = " AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})"; + $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?}'; } // END - if // Let's check if there are some points left we can 'pay'... $result = SQL_QUERY_ESC("SELECT - `userid`, ".$USE." AS points, `last_online` + `userid`, ".$USE." AS `points`, `last_online` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE