<?php
include ("inc/inc_common.php");
include ("inc/inc_connect.php");
include ("inc/inc_admincheck.php");

if ($cAdminLevel < 2)
{
    //kick out non-moderators...
    header("Location: topics.php?groupid=$groupid");
    exit;
}

//Take away the object for any forum post with the authorname matching $userid

$query = "UPDATE $forumtable SET strAvatar = 'NONE' WHERE strName = '$userid'";

mysql_query( $query, $link )
or die ( "Could not update in \"$forumtable\" table: "
.mysql_error() );

//Take away the object for any user name matching $userid

$query = "UPDATE $userstable SET strAvatar = 'NONE' WHERE strName = '$userid'";

mysql_query( $query, $link )
or die ( "Could not update in \"$userstable\" table: "
.mysql_error() );

header("Location: profile.php?userid=$userid");
exit;

?>