===================
[Posted by $name]
";
	$ups=mysql_query("SELECT id FROM posts WHERE user=$id");
	while($up=mysql_fetch_array($ups)) mysql_query("UPDATE posts_text SET signtext=CONCAT_WS('','$line',signtext) WHERE pid=$up[id]") or print mysql_error();
	mysql_query("UPDATE threads SET user=4 WHERE user=$id");
	mysql_query("UPDATE threads SET lastposter=4 WHERE lastposter=$id");
	mysql_query("UPDATE privatemsg SET userfrom=4 WHERE userfrom=$id");
	mysql_query("UPDATE privatemsg SET userto=4 WHERE userto=$id");
	mysql_query("UPDATE posts SET user=4,headid=0,signid=0 WHERE user=$id");
	mysql_query("UPDATE users SET posts=posts WHERE user=4");
	mysql_query("DELETE FROM userratings WHERE userrated=$id OR userfrom=$id");
	mysql_query("DELETE FROM users WHERE id=$id");
	mysql_query("DELETE FROM users_rpg WHERE uid=$id");
    }
  }
  print "
    $header
    
  ";
  if(!$p) $p=0;
  $users=mysql_query("SELECT id,name,regdate,lastposttime,lastactivity,lasturl,lastip,sex,powerlevel FROM users WHERE posts=$p ORDER BY lastactivity DESC");
  print "
    $tblstart
	
	$tccellh>id
	$tccellh>Name
	$tccellh>Regdate
	$tccellh>Last post
	$tccellh>Last activity
	$tccellh>Last URL
	$tccellh>IP
  ";
  while($user=mysql_fetch_array($users)){
    $namecolor=getnamecolor($user[sex],$user[powerlevel]);
    $lastpost='-';
    if($user[lastposttime]) $lastpost=date($dateformat,$user[lastposttime]);
    print "
      
      $tccell1>$user[id]
      $tccell2>$user[name]
	$tccell1 width=120>".date($dateformat,$user[regdate])."
	$tccell1 width=120>$lastpost
	$tccell1 width=120>".date($dateformat,$user[lastactivity])."
      $tccell2>$user[lasturl] 
      $tccell2>$user[lastip]
    ";
  }
  print $tblend.$footer;
  printtimedif($startingtime);
?>