2013-05-19, 01:34 PM
Hi
guys i need a function to add on my external php script for check ban on mybb users
I want this function check the database if user is banned, return this echo:
line 1: you are banned from this board
line 2: ban reason: $banreason
line 3: ban time: $bantime
look guys i dont programer so i know this code have many problem i just want to show you what i need :
Thank you
and waiting :|
guys i need a function to add on my external php script for check ban on mybb users
I want this function check the database if user is banned, return this echo:
line 1: you are banned from this board
line 2: ban reason: $banreason
line 3: ban time: $bantime
look guys i dont programer so i know this code have many problem i just want to show you what i need :
<?php
class ban
{
Function check_ban($uid)
{
$sql = "Select * From mybb_banned ORDER BY dateline DESC LIMIT 30";
$result=mysql_query($sql);
if($mybb->user['uid'] = $result2 ['uid'])
{
return array( 'banreason' => $result['baneason'] ,
'bantime' => $result[ 'bantime' ],
);
}
}
}
$result2 = $ban->check_ban( $uid );
if( $result == false )
{
echo "you are banned\n" ;
echo $result[ 'banreason' ]."\n" ;
echo $result[ 'bantime' ] ;
}
?>
Thank you
and waiting :|