What I have here is total threads, not attachments.
Anyway, try this code in index.php:
Code:
$gettotalattach=$DB_site->query_first("SELECT COUNT(*) AS count FROM attachment WHERE filename LIKE '%.zip' OR filename LIKE '%.txt'");
$totalattach=$gettotalattach[count];
$gettopattach=$DB_site->query_first("SELECT userid,COUNT(attachmentid) AS count FROM attachment WHERE filename LIKE '%.zip' OR filename LIKE '%.txt' GROUP BY userid ORDER BY count DESC LIMIT 1");
$topattacher=getuserinfo($gettopattach[userid]);
$topattacher[count]=$gettopattach[count];
Then use:
$totalattach for total submissions.
$topattacher[userid], [username], etc. for top submitter info.
$topattacher[count] for total submisions the top submitter has.