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...
Secure lavalair ID
Collapse
X
-
put in viewprofile this:
PHP Code: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>";
}
you can put this code in other pages, mod.php, modproc.php etc...
good luck!
LE:
if the user is Admin(Owner) put this in delete user action:
PHP Code:$id=getuid_sid($sid);
if($id!==1)
{
echo "Access restricted for you here! Go away!"
}
else
{
//here put all the code for delete user
}
Last edited by whiteboy; 28.01.10, 15:59.
-
thank you very much white boy / i learn from the best murshid / another thing if anyoane help me...i want to put on chat (lavalair) the symbols for the team....for example ... (c) for owner and the remaining symbols for the others...i have no idea how to do this....maybe you?thanks in advance....
Comment
-
Originally posted by albertynos View Postthank you very much white boy / i learn from the best murshid / another thing if anyoane help me...i want to put on chat (lavalair) the symbols for the team....for example ... (c) for owner and the remaining symbols for the others...i have no idea how to do this....maybe you?thanks in advance....
But i think u want to show to user that if an OWNER nick is shown than (c) is shown or if other staff is that any other symbols are shown. m right or not?Sandeep DiL (INDIAN)
Comment
-
this is wrong topic for this but i guess its sumthing like this here my online lsi code where it is in
Code: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>"; }
Last edited by riderz; 02.02.10, 15:27.
Comment
-
not work....look maybe someoane..knows,,,,what to do...please
function getsimbol($uid)
{
$info= mysql_fetch_array(mysql_query("SELECT perm, plusses FROM dk_users WHERE id='".$uid."'"));
if(isbanned($uid))
{
return "(x)";
}
if($info[0]=='4')
{
return "©";
}else if($info[0]=='3')
{
return "¹";
}else if($info[0]=='2')
{
return "²";
}else if($info[0]=='1')
{
return "³";
}else{
if($info[1]<100)
{
return ".";
}else if($info[1]<500)
{
return "ª";
}else if($info[1]<5000)
{
return "°";
}else if($info[1]<10000)
{
return "º";
}else if($info[1]<15000)
{
return "±";
}else if($info[1]<20000)
{
return "•";
}else if($info[1]<30000)
{
return "¨";
}else if($info[1]<40000)
{
return "«";
}else if($info[1]<50000)
{
return "®";
}else if($info[1]<60000)
{
return "¢";
}else if($info[1]<70000)
{
return "¦";
}else if($info[1]<80000)
{
return "♥";
}else if($info[1]<100000)
{
return "♣";
}else
{
return "♣";
}
}
}
function unhtmlspecialchars2( $string )
{
$string = str_replace ( '&', '&', $string );
$string = str_replace ( ''', '\'', $string );
$string = str_replace ( '"', '"', $string );
$string = str_replace ( '<', '<', $string );
$string = str_replace ( '>', '>', $string );
$string = str_replace ( 'ü', '?', $string );
$string = str_replace ( 'Ü', '?', $string );
$string = str_replace ( 'ä', '?', $string );
$string = str_replace ( 'Ä', '?', $string );
$string = str_replace ( 'ö', '?', $string );
$string = str_replace ( 'Ö', '?', $string );
return $string;
}
function getuage_sid($sid)
{
$uid = getuid_sid($sid);
$uage = mysql_fetch_array(mysql_query("SELECT birthday FROM dk_users WHERE id='".$uid."'"));
return getage($uage[0]);
}
function canenter($rid, $sid)
{
$rperm = mysql_fetch_array(mysql_query("SELECT mage, perms, chposts, clubid FROM dk_rooms WHERE id='".$rid."'"));
$uperm = mysql_fetch_array(mysql_query("SELECT birthday, chmsgs FROM dk_users WHERE id='".getuid_sid($sid)."'"));
if($rperm[3]!=0)
{
if(ismod(getuid_sid($sid)))
{
return true;
}else{
$ismm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM dk_clubmembers WHERE uid='".getuid_sid($sid)."' AND clid='".$rperm[3]."'"));
if($ismm[0]>0)
{
return true;
}else{
return false;
}
}
}
if($rperm[1]==1)
{
return ismod(getuid_sid($sid));
}
if($rperm[1]==2)
{
return isadmin(getuid_sid($sid));
}
if($rperm[1]==6)
{
return isowner(getuid_sid($sid));
}
if($rperm[1]==4)
{
return isadminsef(getuid_sid($sid));
}
if($rperm[1]==5)
{
return ispuf(getuid_sid($sid));
}
if(getuage_sid($sid)<$rperm[0])
{
return false;
}
if($uperm[1]<$rperm[2])
{
return false;
}
return true;
}
Comment
-
PHP Code: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";
}
<?php unlink('World/Europe/Romania.country'); ?>
Comment
Comment