View file chat/enter.php

File size: 623B
<?
Error_Reporting(E_ALL & ~E_NOTICE);
$log = htmlspecialchars(stripslashes(addslashes($_POST['log'])));
$pas = htmlspecialchars(stripslashes(addslashes($_POST['pas'])));
/////////////////////////////////////////////////////
$text = @file("data/reg/$log.dat");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$login=trim($udata[0]);
$password=trim($udata[1]);}
////////////////////////////////////////////////////////
if (md5($pas)==$password && $log==$login && $log!=="" && md5($pas)!=="") {

header ("Location: chat.php?log=$log&pas=$pas");
}else {
header ("Location: index.php?error");
exit; }

?>