2007-10-11 16:25:56 +00:00
|
|
|
#!/usr/bin/perl
|
2007-10-11 17:06:08 +00:00
|
|
|
require "include.pl";
|
|
|
|
require "functions.pl";
|
2007-10-10 21:48:12 +00:00
|
|
|
|
|
|
|
#create or resume session
|
|
|
|
CGI::Session->name($session_name);
|
2007-10-24 10:03:04 +00:00
|
|
|
$query = new CGI;
|
2007-10-10 21:48:12 +00:00
|
|
|
my $session = new CGI::Session;
|
|
|
|
|
2007-10-12 10:35:56 +00:00
|
|
|
%page = ();
|
2007-10-10 21:48:12 +00:00
|
|
|
|
|
|
|
#if a username is associated with session id, username is nonempty
|
|
|
|
$page->{username} = get_username_from_sid($session->id);
|
2007-10-12 11:04:34 +00:00
|
|
|
$page->{locale} = $locale;
|
|
|
|
$page->{stylesheet} = $stylesheet;
|
2007-10-12 10:35:56 +00:00
|
|
|
$page->{frontpage} = [''];
|
2007-10-10 21:48:12 +00:00
|
|
|
|
2007-10-24 10:03:04 +00:00
|
|
|
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');
|
|
|
|
}
|
|
|
|
|
2007-10-10 21:48:12 +00:00
|
|
|
fill_tagcloud;
|
|
|
|
|
|
|
|
#print xml http header along with session cookie
|
2007-10-26 17:42:03 +00:00
|
|
|
print $session->header(-type=>'text/xml', -charset=>'UTF-8');
|
2007-10-10 21:48:12 +00:00
|
|
|
|
|
|
|
#print xml
|
2007-10-11 23:47:13 +00:00
|
|
|
print XMLout($page, KeyAttr => {}, XMLDecl => $XMLDecl, RootName => 'page');
|
2007-10-11 17:06:08 +00:00
|
|
|
|