session_start();
if(isset($_GET['logout'])){	
	
	//Poruka o napustanju cata
	$fp = fopen("log.html", 'a');
	fwrite($fp, "
Korisnik ". $_SESSION['name'] ." je napustio cat sesiju.
");
	fclose($fp);
	
	session_destroy();
	header("Location: index.php"); //preusmerava korisnika na pocetnu stranu
}
function loginForm(){
	echo'
	
	';
}
if(isset($_POST['enter'])){
	if($_POST['name'] != ""){
		$_SESSION['name'] = stripslashes(htmlspecialchars($_POST['name']));
	}
	else{
		echo 'Molimo Vas unesite Nick';
	}
}
?>
Chat - Customer Module
		
	 0){
		$handle = fopen("log.html", "r");
		$contents = fread($handle, filesize("log.html"));
		fclose($handle);
		
		echo $contents;
	}
	?>