setcookie("strcor","",time()-86400); setcookie("strcareta","",time()-86400); setcookie("strnome","",time()-86400); setcookie("strcor","$linha[5]",time()+86400); setcookie("strcareta","$linha[4]",time()+86400); setcookie("strnome","$linha[3]",time()+86400); include ("./config.php"); include ("./admin/classes.php"); $sala=$HTTP_COOKIE_VARS["sala"]; $time = @time(); $timer= time(); $user= new comum; $user->conect($host,$id,$senha,$db); $busca=$user->query("SELECT * FROM users_$sala WHERE ip=\"$ip\";"); $linha= mysql_fetch_row($busca); if($linha[3]!= ""){ $mcampo[0]="time"; $mcampo[1]="remetente"; $mcampo[2]="destinatario"; $mcampo[3]="mensagem"; $mvalor[0]="$timer"; $mvalor[1]="$apelido"; $mvalor[2]="TODOS"; $mvalor[3]=$user->nick($linha[3],"users_$sala")." sai do Chat|saida"; $user->insere($mcampo,$mvalor,"msg_$sala"); //Mensagem informando a saida do chat $user->query ("DELETE FROM users_$sala WHERE ip ='$ip'");//Remove usuario $user->close(); unset($user);//Destroi a variavel $user } ?>