<%
	// to nie jest do konca ok, ale jako wersja robocza zostalo dopuszczone do uzytku publicznego
	String login = (String)request.getParameter( "login" );
	String haslo = (String)request.getParameter( "password" );
	boolean ok=false;
	if ( ( login==null ) || ( haslo==null ) ) ok=false;
	else ok = login.equals( "pawel" ) && haslo.equals( "rajba" );
	if ( !ok )
	{
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN">
<html>
<head>
<title>Logowanie</title>
</head>

<body>

<%
	if (!ok) out.println( "BLAD LOGOWANIA" );
%>

<form name="logowanie" method="post">
<table cellpadding="4" cellspacing="1" border="1">
<tr><td>Login:</td><td><input type="text" name="login" value=""></td></tr>
<tr><td>Haslo:</td><td><input type="password" name="password" value=""></td></tr>
<tr><td colspan="2"><input type="submit" value="Zaloguj"></td></tr>
</table>
</form>

</body>
</html>
<%
	}
	else
	{
		session.putValue( "login", login );
		session.setMaxInactiveInterval( 600 );
		String loginPoint=(String)session.getValue( "loginPoint" );
		if ( loginPoint==null ) loginPoint=request.getScheme()+"://"+request.getServerName()+":82/";
		else session.removeValue( "loginPoint" );
		response.sendRedirect( loginPoint );
	}
%>