View file katrinka.ru/logout.php

File size: 755B
<?php
  include 'config.php';
  session_start();
#  if (($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
#  	if ((trim($_COOKIE['Login'])!='')&&(trim($_COOKIE['Password'])!='')) {
#		$login=htmlspecialchars(trim($_COOKIE['Login']),ENT_QUOTES);
#		$pass=htmlspecialchars(trim($_COOKIE['Password']),ENT_QUOTES);
#		$res=pg_query($conn,"select id from users where login='$login' and passwd='$pass' and moder=0 and access=4;");
#		if (pg_numrows($res)==1) {
			session_unset();
			setcookie("Login", "", time()-3600, "/");
			setcookie("Password", "", time()-3600, "/");
#		}
#	}
#	pg_close($conn);
#  }
	if ($_GET['lang']=='eng') header("Location: index.php?lang=eng"); 
	else header("Location: index.php");
?>