Location: PHPKode > projects > Psichat > psichat/chat/reingabe.bak.php
<?php
error_reporting(0);

if($extmod != "aktiv")
{
	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);
}

if($extmod != "aktiv")
{
	echo '<html><head><meta http-equiv="expires" content="1209600">'."\n";
	echo '<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">';
	echo '<style type="text/css"> <!-- input{ color:'.$design[16].'; } .Feld { background-color:'.$design[15].'; width:100%; border:2px solid #A0A0A0; font-family: Verdana,Arial,Helvetica; font-size: 15px;} --> </style>'."\n";
	echo '<script type="text/javascript"> <!--'."\n";

	echo 'var histList = [""], histPos = 0; '."\n";
	echo 'function hist(keycode) { var L = histList.length; if (L == 1) return; '."\n";
	echo 'if (keycode == 38 || keycode == 57373)  { if (histPos == L-1) {  histList[histPos] = document.eingabeform.nachricht.value; } '."\n";
	echo 'if (histPos > 0) { histPos--; setTimeout("document.eingabeform.nachricht.value = '."''".'; document.eingabeform.nachricht.value = histList[histPos];", 0); } } '."\n";
	echo 'if (keycode == 40 || keycode == 57374) { if (histPos < L-1) { histPos++; document.eingabeform.nachricht.value = histList[histPos]; } else '."\n";
	echo 'if (histPos == L-1) { if (document.eingabeform.nachricht.value) { histList[histPos] = document.eingabeform.nachricht.value; ++histPos; document.eingabeform.nachricht.value = ""; } } } } '."\n";

	echo 'function setzefocus(){if (typeof(parent.reingabe.document.eingabeform)=="object"){parent.reingabe.document.eingabeform.nachricht.focus();}}'."\n";
	echo 'var msgtime = 0; '."\n";
	echo 'function senden() { '."\n";
	echo 'if(document.eingabeform.nachricht.value != "") { '."\n";
	echo 'if(top.rsenden.bereit != 1)'."\n";
	echo 'window.setTimeout("senden()", 30);'."\n";
	echo 'else { '."\n";
	echo ' var sendmsg = document.eingabeform.nachricht.value; '."\n";
	echo ' document.eingabeform.nachricht.value = ""; '."\n";
	echo ' histList[histList.length-1] = sendmsg; '."\n";
	echo ' histList[histList.length] = ""; '."\n";
	echo ' histPos = histList.length - 1; '."\n";
	echo 'if(sendmsg.charAt(0) != "/") { '."\n";
	echo 'try { top.rchat.document.write("<font color='.$design[9].'><b>"+document.eingabeform.nick.value+":</b></font> <font color='.$design[10].'>"+sendmsg+"</font><br> "); } catch(er) {}';
	echo 'var jetzt = new Date(); '."\n";
	echo 'msgtime = jetzt.getTime() / 1000; '."\n";
	echo '} '."\n";
	echo ' sendmsg = escape(sendmsg); '."\n";
	echo 'top.rsenden.location.href = "rsenden.php?nick="+ document.eingabeform.nick.value +"&sid="+ document.eingabeform.sid.value +"&raum="+ document.eingabeform.raum.value +"&nachricht="+ sendmsg;'."\n";
	echo '} } '."\n";
	echo 'return false; '."\n";
	echo ' } '."\n";
	echo 'function wache() { '."\n";
	echo 'var jetzt = new Date(); '."\n";
	echo 'if(msgtime != 0 && msgtime+10 < (jetzt.getTime()/1000)) {'."\n";
	echo 'try { top.rchat.document.write("<b><font color='.$design[11].'>Cache gelert.</font></b><br>"); } catch(er) {}';
	echo 'msgtime = 0; '."\n";
	echo '} '."\n";
	echo 'window.setTimeout("wache()", 1000); '."\n";
	echo ' } '."\n";
	echo 'wache(); '."\n";
	echo '//--> </script></head><body bgcolor="'.$design[14].'" onload="setzefocus()">'."\n";
}

$banwert1 = @getslot('../'.$varver.'chat/ba/'.strtolower($nick), 0, 0);
$banwert2 = @getslot('../'.$varver.'chat/ba/'.getenv("REMOTE_ADDR"), 0, 0);
if($banwert1 != "" || $banwert2 != "")
{
	if($banwert1+86400 < date("U") && $banwert2+86400 < date("U"))
	{
		unlink('../'.$varver.'chat/ba/'.strtolower($nick).'.000');
		unlink('../'.$varver.'chat/ba/'.getenv("REMOTE_ADDR").'.000');
	}
	else
	{
		exit();
	}
}

$anzban = @getslot('../'.$varver.'chat/ra/'.$raum.'_f', 0, 0);
$anzban = $anzban*3;
$alleban = @getslot('../'.$varver.'chat/ra/'.$raum.'_f', 1, $anzban);
for($i = 0; $i < $anzban; $i+=3)
{
	if($alleban[$i+1] == $nick)
	{
		exit();
	}
}

$logwerte = @getslot('../'.$varver.'chat/'.strtolower($nick), 0, 5);
if($sid == $logwerte[1] && getenv("REMOTE_ADDR") == $logwerte[2])
{
	if($extmod != "aktiv")
	{


		echo '<form name="eingabeform" onSubmit="return senden()" style="display:inline" width="100%">';
		echo '<input class="Feld" type="text" name="nachricht" value="" size="75" onkeydown="hist(event.keyCode);">';
		echo '<input type="hidden" name="nick" value="'.$nick.'">';
		echo '<input type="hidden" name="sid" value="'.$sid.'">';
		echo '<input type="hidden" name="raum" value="'.$raum.'"></form>';
		echo '</td></tr></table>';
		echo '<INPUT type="button" value="hi" name="button4" onclick="return senden()("bla", "&raum")';

	}
}

if($extmod != "aktiv")
	echo '</body></html>';

?>
Return current item: Psichat