Location: PHPKode > projects > Psichat > psichat/chat/crespon.php
<?php
error_reporting(0);
if(($nick = $HTTP_POST_VARS['nick']) == "") $nick = $HTTP_GET_VARS['nick'];
if(($sid = $HTTP_POST_VARS['sid']) == "") $sid = $HTTP_GET_VARS['sid'];
if(($raum = $HTTP_POST_VARS['raum']) == "") $raum = $HTTP_GET_VARS['raum'];
include("varinfo.php");
include("../lib.php");
$design = designladen($raum);
$aktuall = 0;

$logwerte = getslot('../'.$varver.'chat/'.strtolower($nick), 0, 5);
if($raum != "" && $sid == $logwerte[1] && getenv("REMOTE_ADDR") == $logwerte[2])
{
	$anzop = getslot('../'.$varver.'chat/ra/'.$raum.'_d', 24, 24);
	$adic = 0; if($anzop == 1); $adic = 1;
	if($anzop)
		$ops = getslot('../'.$varver.'chat/ra/'.$raum.'_d', 25, 24+$anzop+$adic);
	$oisop = 0;
	for($g = 0; $g < $anzop; $g++)
		if(strtolower($ops[$g]) == strtolower($nick)) $oisop = 1;
	if($oisop)
	{
		for($g = 0; $g < $anzop; $g++)
			if(strtolower($ops[$g]) == strtolower($nick)) putslot('../'.$varver.'chat/ra/'.$raum.'_d', 25+$g, "x", 1);
		$anzop--;
		putslot('../'.$varver.'chat/ra/'.$raum.'_d', 24, $anzop);
		putslot('../'.$varver.'chat/ra/'.$raum.'_a', 3, plusunix());
	}

	$anzbesraeume = getslot('../'.$varver.'chat/'.strtolower($nick), 6, 6);
	if($anzbesraeume)
	{
		$allera = getslot('../'.$varver.'chat/'.strtolower($nick), 7, 7+($anzbesraeume*2));
		for($i = 0; $i < $anzbesraeume*2; $i+=2)
		{
			if($allera[$i] == $raum)
			{
				$neucein = "";
				$neucein[0] = "x";
				$neucein[1] = "x";
				putslot('../'.$varver.'chat/'.strtolower($nick), 7+$i, $neucein, 1);
				putslot('../'.$varver.'chat/'.strtolower($nick), 6, $anzbesraeume-1);
				while(getslot('../'.$varver.'chat/ra/'.$raum.'_a', 0, 0)+1 >= plusunix()) {usleep(10000);}
				$raumneu = "";
				$raumneu[0] = plusunix();
				$raumneu[1] = '<b><font color='.$design[11].'>'.$nick.' verlässt '.$raum.'.</font></b> ';
				putslot('../'.$varver.'chat/ra/'.$raum.'_a', 0, $raumneu);
				break;
			}
		}
	}

	$anzchatter = getslot('../'.$varver.'chat/ra/'.$raum.'_a', 4, 4);
	if($anzchatter)
	{
		$chatter = getslot('../'.$varver.'chat/ra/'.$raum.'_a', 5, 4+($anzchatter*2));
		for($i = 0; $i < $anzchatter*2; $i+=2)
		{
			if(strtolower($chatter[$i]) == strtolower($nick))
			{
				$neucein = "";
				$neucein[0] = "x";
				$neucein[1] = "x";
				putslot('../'.$varver.'chat/ra/'.$raum.'_a', 5+$i, $neucein, 1);
				$neucein[0] = plusunix();
				$neucein[1] = $anzchatter-1;
				putslot('../'.$varver.'chat/ra/'.$raum.'_a', 3, $neucein);
				break;
				$aktuall = 1;
			}
		}
	}

}
?>
<html><head>

<script type="text/javascript"> <!--
function warten()
{
}

function sicherung()
{
<?php
	$anzbesraeume = getslot('../'.$varver.'chat/'.strtolower($nick), 6, 6);
	if($anzbesraeume)
	{
		$allera = getslot('../'.$varver.'chat/'.strtolower($nick), 7, 7+($anzbesraeume*2));
		for($i = 0; $i < $anzbesraeume*2; $i+=2)
		{
			// $allera[$i]   Raumname
			// $allera[$i+1] Array-ID
			// !parent.craumli.raumwin['.$allera[$i+1].'] ||
			echo 'try {'."\n";
			echo 'if(top.raumwin'.$allera[$i+1].'.closed == true) { '."\n";
			echo 'top.crespon.location.href = "crespon.php?nick='.$nick.'&sid='.$sid.'&raum='.$allera[$i].'&dummy='.rand(1,100000).'"; '."\n";
			echo 'window.setTimeout("warten()", 10000); }'."\n";
			echo '} catch(er) {}'."\n";
		}
	}
	echo 'window.setTimeout("sicherung()", 1000); }'."\n";

	echo 'top.craumli.location.href = "craumli.php?nick='.$nick.'&sid='.$sid.'&dummy='.rand(1, 100000).'";'."\n";

?>

sicherung();
//--> </script>

</head><body onunload="sicherung()"></body></html>
Return current item: Psichat