2007-10-10 09:01:16 +00:00
|
|
|
require "/var/www/perl/include.pl";
|
|
|
|
require "/var/www/perl/functions.pl";
|
|
|
|
|
|
|
|
#create or resume session
|
2007-10-10 10:27:05 +00:00
|
|
|
CGI::Session->name($session_name);
|
2007-10-10 09:01:16 +00:00
|
|
|
my $session = new CGI::Session;
|
|
|
|
|
|
|
|
#read xml
|
|
|
|
$page = XMLin('/var/www/perl/index.xml', ForceArray => 1, KeyAttr => {} );
|
|
|
|
|
2007-10-10 18:51:01 +00:00
|
|
|
#if a username is associated with session id, username is nonempty
|
2007-10-10 16:05:54 +00:00
|
|
|
$page->{username} = get_username_from_sid($session->id);
|
2007-10-10 09:01:16 +00:00
|
|
|
|
|
|
|
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');
|