diff --git a/trunk/index.pl b/trunk/index.pl index 570e465..87a69ee 100644 --- a/trunk/index.pl +++ b/trunk/index.pl @@ -4,6 +4,7 @@ require "functions.pl"; #create or resume session CGI::Session->name($session_name); +$query = new CGI; my $session = new CGI::Session; %page = (); @@ -14,6 +15,19 @@ $page->{locale} = $locale; $page->{stylesheet} = $stylesheet; $page->{frontpage} = ['']; +if($query->param('information')) +{ + + $page->{'message'}->{'type'} = "information"; + $page->{'message'}->{'text'} = $query->param('information'); +} +elsif($query->param('error')) +{ + + $page->{'message'}->{'type'} = "error"; + $page->{'message'}->{'text'} = $query->param('error'); +} + fill_tagcloud; #print xml http header along with session cookie diff --git a/trunk/login.pl b/trunk/login.pl index 8b8e072..30d38b0 100644 --- a/trunk/login.pl +++ b/trunk/login.pl @@ -30,8 +30,7 @@ if($query->param('action')) $sth = $dbh->prepare(qq{update users set sid = ? where username = ? }); $sth->execute($session->id, $query->param('user')); $sth->finish(); - print $session->header(); - print "logged in"; + print $query->redirect("index.pl?information=information_logged_in"); } else { @@ -86,8 +85,6 @@ if($query->param('action')) { #we are verified!! my $verified_url = $vident->url; - print $session->header(); - print "success $verified_url"; #check if this openid user already is in database my $sth = $dbh->prepare(qq{select 1 from users where username = ? limit 1 }); @@ -106,6 +103,8 @@ if($query->param('action')) $sth->execute($verified_url, $session->id); $sth->finish(); } + + print $query->redirect("index.pl?information=information_logged_in"); } else {