<?php
include("config.php");
$resp = mysql_query('SELECT * FROM seelf_accept seelf WHERE EXISTS(SELECT seelf2.md5 FROM seelf_accept seelf2 WHERE seelf.md5=seelf2.md5 AND seelf.username<>seelf2.username) order by md5') or die (mysql_error());

if(mysql_num_rows($resp) == '0')
{
echo '';
} else {
echo '';
;echo '';

while($row = mysql_fetch_array($resp))
if($row['$md5']=='')
{
$id=$row["id"];
$username=$row["username"];
$ip=$row["ip"];
$agent=$row["agent"];
$session=$row["session"];
$md5=$row["md5"];

mysql_query("INSERT INTO `seelf_accept_ban` (id, username, ip, agent, session, md5) VALUES('$id', '$username', '$ip', '$agent', '$session', '$md5')");
}
} ?>
