How to show a txt in room onece that can see everybody
like welcome $nick or $nick connected
is it possible ? Please i need yours help
like welcome $nick or $nick connected
is it possible ? Please i need yours help
/* I don't know everything hehe */
/* I don't know everything hehe */
/* I don't know everything hehe */
<?php
include("config.php");
include("core.php");
if(!connectdb())
{
header("Location: database-error");
exit();
}
if((isset($_SESSION['sid'])) && (!empty($_SESSION['sid'])))
{
$sid = $_SESSION['sid'];
}else{
$sid = $_COOKIE['sid'];
}
$ubr = $_SERVER['HTTP_USER_AGENT'];
$uip = getrealip();
$uid = getuid_sid($sid);
$rid = $_GET["rid"];
if((!islogged($sid)) OR ($uid==0) OR ($uid==""))
{
header("Location: session-error");
exit();
}
if(isipbanned($uid,$uip,$ubr))
{
header("Location: ipbanned");
exit();
}
if(isbanned($uid))
{
header("Location: banned");
exit();
}
$entercount = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chat WHERE msgtext='1entersdroom' AND chatter='".$uid."' AND rid='".$rid."'"));
$onlinecount = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE rid='".$rid."' and uid='".$uid."'"));
if(($entercount[0]==0) && ($onlinecount[0]==0))
{
$enter = mysql_query("INSERT INTO ibwf_chat SET chatter='".$uid."', who='0', timesent='".time()."', msgtext='1entersdroom', rid='".$rid."'");
}
header("Location: chatroom-$rid");
exit();
?>
else if($chat[3]=="1entersdroom")
{
$chnick = getnick_uid($chat[0]);
echo "<b>Chat system</b>» $chnick entered the room!!!<br/>";
}
/* I don't know everything hehe */
/* I don't know everything hehe */
/* I don't know everything hehe */
/* I don't know everything hehe */
Comment