<%args>
$username => ""
$pass => ""
$login => ""
%args>
<%once>
use lib qw( /home/tfp/toupeira/lib );
use CGI;
use Data::Dumper;
%once>
<%init>
my $q = CGI->new();
if ($login) {
if (1) { # testar se a password é válida pro login dado
my $c = $q->cookie( -name => "toupeira",
-value => $username,
-expires => '',
-path => "/toupeira" );
$m->clear_buffer;
$r->method('GET');
$r->headers_in->unset('Content-length');
$r->content_type('text/html');
$r->err_headers_out->add('Set-Cookie' => $c );
$r->header_out(Location=> "/toupeira");
$m->abort(302);
}
}
%init>