-if (($curr != $_CONFIG['last_month']) && ($_CONFIG['last_month'] > 0) && ($_CONFIG['beg_ranks'] > 0) && ($CSS != 1)) {
- // Extension "autopurge" is inactive or purging of inactive accounts is deactivated
- $whereStatement1 = "";
- $whereStatement2 = bigintval($_CONFIG['beg_ranks']);
+if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getConfig('beg_ranks') > 0) && ($GLOBALS['output_mode'] != 1)) {
+ // Extension 'autopurge' is inactive or purging of inactive accounts is deactivated
+ $whereStatement1 = '';
+ $whereStatement2 = getConfig(('beg_ranks'));
+
+ // Shall we exclude webmaster's own userid?
+ if ((getConfig('beg_include_own') != 'Y') && (getConfig('beg_uid') > 0)) {
+ // Exclude it
+ $whereStatement1 = sprintf(" AND userid != %s", getConfig(('beg_uid')));
+ } // END - if