Hello...who can help me...i need a code or something that can secure an id on a chat (lavalair) for...not to be able to remove id(user)...can not be banned...help me guys...for you maybe is basic but i'm beginner...

if($perm>0)
{
echo "You can`t penalize this user because is part of staff";
}
else
{
echo "<a href=\"ban.php?user=$id\">Mod area</a>";
}
$id=getuid_sid($sid);
if($id!==1)
{
echo "Access restricted for you here! Go away!"
}
else
{
//here put all the code for delete user
}
else if($action=="online") { $showavatar = mysql_fetch_array(mysql_query("SELECT showavatar FROM ibwf_users WHERE id='".$uid."'")); $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid))); addonline(getuid_sid($sid),"Online list Xhtml-$mmsg","index.php?action=online"); $pstyle = gettheme($sid); echo xhtmlhead("Online List",$pstyle); echo "<body>"; echo "<p align=\"center\">"; getalert($sid); //////ALL LISTS SCRIPT << if($page=="" || $page<=0)$page=1; $num_items = getnumonline(); //changable $items_per_page= 10; $num_pages = ceil($num_items/$items_per_page); if($page>$num_pages)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; //changable sql $sql = "SELECT a.name,a.perm, b.place, b.userid FROM ibwf_users a INNER JOIN ibwf_online b ON a.id = b.userid GROUP BY 1,2 LIMIT $limit_start, $items_per_page"; boxstart("Online List"); echo "<p align=\"left\">"; $items = mysql_query($sql); echo mysql_error(); while ($item = mysql_fetch_array($items)) { if($item[1]=='(User)') { $tit = ""; }if($item[1]=='(M)) { $tit = "³"; }if($item[1]=='(A)') { $tit = "²"; } if($item[1]=='(O)') { $tit = "¹"; } if($item[1]=='(HA)') { $tit = "º"; } $sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE name='$item[0]'")); if($sex[0]=="M"){$usersex = "<img src=\"images/male.gif\" alt=\"(M)\"/>";} if($sex[0]=="F"){$usersex = "<img src=\"images/female.gif\" alt=\"(F)\"/>";} if($sex[0]==""){$usersex = "";} if($item[1]>'0') { $lnk = "$usersex<a href=\"index.php?action=viewuser&who=$item[3]&sid=$sid\">$tit$item[0]</a>"; }else{ $lnk = "$usersex<a href=\"index.php?action=viewuser&who=$item[3]&sid=$sid\">$tit$item[0]</a>"; } ////////////////////online avatar if($showavatar[0]=="1") { $avlink = getavatar($item[3]); if ($avlink!=""){ echo "<img src=\"$avlink\" height=\"25\" width=\"25\" alt=\"avatar\"/>"; }else{ echo "<img src=\"/images/nopic.jpg\" height=\"25\" width=\"25\" alt=\"avatar\"/>"; } } echo "$lnk - $item[2] <br/>"; } $mmsg1 = parsemsg(getsetmood($item[2]), $sid); if(!$mmsg1=="") { echo "($mmsg1) - $item[1] "; }else{ echo " $item[1]<br/>"; } //echo "</p>"; //echo "<p align=\"center\">"; if($page>1) { $ppage = $page-1; echo "<a href=\"index.php?action=online&page=$ppage&sid=$sid\">Prev</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"index.php?action=online&page=$npage&sid=$sid\">Next</a>"; } echo "<br/>$page/$num_pages"; if($num_pages>2) { echo getjumper($action, $sid,"index"); } echo "</p>"; ////// UNTILL HERE >> boxend(); $nick = getnick_sid($sid); boxstart("Menu"); echo "<a href=\"index.php?action=mood&sid=$sid\">Update Mood</a><br/>"; $tmsg = getpmcount(getuid_sid($sid)); $umsg = getunreadpm(getuid_sid($sid)); echo "<a href=\"inbox.php?action=main&sid=$sid\">Inbox($umsg/$tmsg)</a><br/>"; echo "<a href=\"index.php?action=formmenu&sid=$sid\">Forums</a><br/>"; echo "<a href=\"lists.php?action=buds&sid=$sid\">BuddyList</a><br/>"; echo "<a href=\"index.php?action=chat&sid=$sid\">Chatrooms</a><br/>"; /////////main menu footer echo "<div class=\"footer\">"; $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'")); $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'")); echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo xhtmlfoot(); boxend(); echo "</div>"; }
function getnick_uid($uid)
{
$unick = mysql_fetch_array(mysql_query("SELECT name FROM USERTABLE WHERE id='".$uid."'")); //edit whit ur user table
//////////////////////////
if($unick[0]=="")$usernick = "User nonexistent"; else $usernick = $unick[0];
if(isowner1($uid))$simbol = "SIMBOL HERE"; // edit whit what u want:P
/////////////////////////
return "$simbol$usernick";
}
Comment