Hmm.. this is completely untested, and I dunno if it'll work:
Code:
if ($action=="joindates") {
echo "<p>Remove by length of membership</p>\n";
echo doformheader("thread","doremovejoindate");
echo "<table border=0>";
echo makeinputcode("Delete accounts older than x days:","joindateremove","");
echo makeinputcode("Number of Posts:","joinpostsremove","");
echo doformfooter("Submit");
exit;
} #end joindates
if ($action=="doremovejoindate") {
echo "<p>Deleting...</p>";
if (!is_int($joinpostsremove) and !is_int($joindateremove)) {
echo "Invalid entries.";
exit;
}
$datecut=time()+($joindateremove*86400);
if($cuts=$DB_site->query("SELECT username,userid FROM user WHERE (joindate<=$datecut AND posts<=$joinpostsremove)")) {
while($user=$DB_site->fetch_array($cuts)) {
$DB_site->query("DELETE FROM user WHERE userid=$user[userid]");
echo "$user[username] deleted...<BR>";
}
echo "<p>Accounts removed successfully! It is recommend that you <a href=\"misc.php\">update counters</a> now.</p>";
} else {
echo "<p>No Members match this criteria. Click <a href=\"index.php\">here</a> to return to the admin index page.</p>";
}
} #end doremovejoindate
HTH,