Hello everyone, script lavalair, them on a problem in chat rooms, when I delete a message in the room of a user, you are also deleting all messages, that same user, in other rooms. I wish you clear only in the room that I want them deleted, but not in other rooms. Thanks to those who solves the problem :-)
Delete messages in room
Collapse
X
-
attempt this, to my chat script lavalair forum is this code and works beautifully
in chat.php add this
Code:$idposta = $chat["id"]; if(ismod(getuid_sid($sid))) { $del= "[<a href=\"genproc.php?action=delp&sid=$sid&pid=$idposta\">X</a>]"; } echo "<b>[$ds]</b><a href=\"chat.php?action=say2&sid=$sid&who=$chatter&rid=$rid&rpw=$rpw\">$optlink</a>» $tosay $del<br/><br/>";
Code:else if($action=="delp") { $pid = $_GET["pid"]; $who = $_GET["who"]; $rid = $_GET["rid"]; addonline(getuid_sid($sid),"<b>Vlasnicki panel</b>",""); echo "<card id=\"main\" title=\"$sitename\">"; echo "<p align=\"center\">"; $res = mysql_query("DELETE FROM batica_chat WHERE id='".$pid."'"); if($res) { echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Poruka je obrisana<br/>"; } else{ echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Nemoguce je obrisati poruku<br/>"; } echo "<br/>"; $rooms = mysql_query("SELECT id, name, perms, mage, chposts FROM batica_rooms WHERE static='1' AND clubid='0'"); while ($room= mysql_fetch_array($rooms)) { if(canenter($room[0], $sid)) { $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM batica_chonline WHERE rid='".$room[0]."'")); echo "<a href=\"chat.php?sid=$sid&rid=$room[0]\">$room[1]($noi[0])</a><br/>"; } } echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>"; echo "HAPPY</a>"; echo "</p></card>"; }
Last edited by srecnica; 25.12.10, 17:28.
-
leadiztah, does not work, I also deleted my other posts the same in the other rooms! I the quote here ...
PHP Code:$user = getnick_sid($sid);
mysql_query("INSERT INTO ibwf_mlog SET action='autoban', details='<b>".getnick_uid(1)."</b> auto banned $user for spamming chat', actdt='".time()."'");
mysql_query("INSERT INTO ibwf_penalties SET uid='".$uid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$uid."'");
mysql_query("DELETE FROM ibwf_chat WHERE chatter='".$who."' and rid='".$rid."'");
echo "</body>";
echo "</html>";
exit();
}
if($rinfo[1]==2)
{
//oh damn i gotta post this message to ravebabe :(
//will it succeed?
Last edited by Leviathan73; 26.12.10, 09:24.
Comment
Comment