-// Set undefined array elements
-if (isAdmin()) $whereStatement = '';
-
-// Count unconfirmed mails
-$links = countSumTotalData(getMemberId(), 'user_links', 'id', 'userid', true);
-
-// Do we have ext-holiday installed?
-$HOLIDAY = 'serid';
-if ((isExtensionActive('holiday')) && (getExtensionVersion('holiday') >= '0.1.3')) {
- // Fetch also holiday activation data
- $HOLIDAY = 'holiday_active';
-} // END - if
-
-$result_mmails = SQL_QUERY_ESC("SELECT `userid`, `receive_mails`, `mail_orders`, `".$HOLIDAY."`
-FROM `{?_MYSQL_PREFIX?}_user_data`
-WHERE `userid`=%s AND `max_mails` > 0 LIMIT 1",
- array(getMemberId()), __FILE__, __LINE__);
-
-$mmails = SQL_NUMROWS($result_mmails);
-list($DMY, $MAXI, $ORDERS, $HOLIDAY) = SQL_FETCHROW($result_mmails);
-
-// Free result
-SQL_FREERESULT($result_mmails);
-
-// Fix non-existent ext-holidy
-if ($HOLIDAY == $DMY) $HOLIDAY = 'N';
-
-$ALLOWED = $MAXI - $ORDERS;
-if (getConfig('order_max_full') == 'MAX') $ALLOWED = $MAXI;