// Copyright 2001,2002,2003,2004,2005,2006, Chris Heart - ALL RIGHTS RESERVED WORLDWIDE
include("../tpnadminsecurity.inc");
include("../tpndblib.inc");
include("../tpnuserlib.inc");
include("../tpnadmin.inc");
checkSessionActive();
putenv("TZ=AUSTRALIA/Brisbane");
$user_row = checkUser($HTTP_USER_AGENT,$HTTP_REFERER,$REQUEST_URI,$REMOTE_ADDR,$PHP_SELF,$SERVER_NAME);
checkUserData( $user_row );
//$useruid = checkAdmin( $user_row[USERNAME] );
if ( $user_row[UID] != 1 )
{
print "
Access attempt logged.
User IP = $REMOTE_ADDR.
Webmaster Notified.
Access DENIED ";
exit;
}
if ( ( $tpn[id] != 1 ) OR $tpn[logged_in] == false)
{
header( "Location: login.html?" );
exit;
}
if ( isset($actionflag ) AND $actionflag == "showUsers" )
{
$tpn[viewusers] = $form;
}
elseif ( $tpn[viewusers] )
{
$form = $tpn[viewusers];
}
else
{
$tpn[viewusers][country] = "ANY";
}
if ( isset($actionflag ) AND !$tpn[viewusers][uid1] )
{
unset( $tpn[viewusers][uid2]);
}
$message="";
if ( isset( $actionflag ) AND isset( $user_id ) AND ($actionflag == "purgeMember" OR $actionflag == "bademailMember"
OR $actionflag == "suspend2" OR $actionflag == "suspendMember" OR $actionflag == "approveMember"
OR $actionflag == "approveMember" ) )
{
if ( ( $actionflag == "deleteUser" ) AND $user_id > 2 )
{
deleteUser( $user_id );
$message = "Member $user_id has been DELETED.
";
}
elseif ( ( $actionflag == "suspend2" ) AND $user_id > 2 )
{
suspendMember( $user_id, "2" );
$message = "Member $user_id has been SUSPENDED - Error in Membership.
";
}
elseif ( ( $actionflag == "suspendMember" ) AND $user_id > 2 )
{
suspendMember( $user_id, "3" );
$message = "Member $user_id has been SUSPENDED - Error in Membership.
";
}
elseif ( ( $actionflag == "bademailMember" ) AND $user_id > 2 )
{
suspendMember( $user_id, "6" );
$message = "Member $user_id has been Suspended - Bad Email Address.
";
}
elseif ( ( $actionflag == "purgeMember" ) AND $user_id > 2 )
{
suspendMember( $user_id, "9" );
$message = "Member $user_id has been Queued for PURGING
";
}
elseif ( $actionflag == "approveMember" )
{
$tdate = getItem( "USERS", "TERM_DATE", "UID", $user_id );
$tstamp = getItem( "USERS", "TIMESTAMP", "UID", $user_id );
if ( $tdate[TERM_DATE] <= $tstamp[TIMESTAMP] )
{
$termdate = ( $tstamp[TIMESTAMP]+7948800 );
$result2 = approveMember( $user_id, $termdate );
}
else
{
$result2 = approveMember( $user_id, 0 );
}
if ( isset( $result2 ) )
$message .= "Member $user_id has been APPROVED.
";
else
$message .= "Member $user_id APPROVAL FAILED !
";
}
else
{
$message .= "Cannot do that. Action Aborted !
";
}
}
?>
include ("../tpnfooter2.inc"); ?> Last updated on print date( "d M Y \a\\t H:i:s", filemtime( basename( $PHP_SELF ) )+64800 ) ?> Australian EST. Your IP is echo $REMOTE_ADDR ?>if ( $tpn[message] ) print "$tpn[message]
Advertisers : print $users[0] ?> Active : print $mactive[0] ?> Personal Ads : print $ads[0] ?> Active : print $aactive[0] ?> User Administration
"; ?>