View file wapChat/auth.php

File size: 808B
<?php
include('sessionstart.php');

$loc='';
$loc=$_SERVER['HTTP_REFERER'];

$name="";
$pas="";
$rem="";

if (isset($_POST['name'])){$name=$_POST['name'];}
if (isset($_POST['pas'])){$pas=$_POST['pas'];}
if (isset($_POST['remember'])){$rem=$_POST['remember'];}



if (!$name==""){

$name=rawurlencode($name);
$pas=rawurlencode($pas);

$result=file_get_contents("http://sleza.org.ru/ourchat/auth.php?n=$name&p=$pas");

if ($result==1){

$_SESSION["name_ourchat"]=$name;
$_SESSION["pas_ourchat"]=$pas;

		//запомнить юзера
		if ($rem=='yes' and $forget<>'yes'){
		setcookie("name_ourchat", $name);
		setcookie("pas_ourchat", $pas);
		}
}
else{
$error="?error=Ошибка!";
$loc=$_SERVER['HTTP_REFERER']."$error";
}		

}



header("location: $loc");
?>