yolanda/trunk/index.pl
josch 1615c28881 added basic login/logout
git-svn-id: http://yolanda.mister-muffin.de/svn@10 7eef14d0-6ed0-489d-bf55-20463b2d70db
2007-10-10 10:27:05 +00:00

21 lines
638 B
Perl

require "/var/www/perl/include.pl";
require "/var/www/perl/functions.pl";
#create or resume session
CGI::Session->name($session_name);
my $session = new CGI::Session;
#read xml
$page = XMLin('/var/www/perl/index.xml', ForceArray => 1, KeyAttr => {} );
#fill tags
$page->{sid} = [$session->id];
$page->{loggedin} = [$session->param('auth')];
fill_tagcloud;
#print xml http header along with session cookie
print $session->header(-type=>'text/xml');
#print xml
print XMLout($page, KeyAttr => {}, XMLDecl => '<?xml version="1.0" encoding="ISO-8859-1" ?><?xml-stylesheet type="text/xsl" href="./xsl/xhtml.xsl" ?>', RootName => 'page');