diff --git a/trunk/login.pl b/trunk/login.pl index 77d4b07..1614d8c 100644 --- a/trunk/login.pl +++ b/trunk/login.pl @@ -1,5 +1,6 @@ #!/usr/bin/perl require "include.pl"; +require "functions.pl"; #initialize session data CGI::Session->name($session_name); @@ -65,12 +66,15 @@ if($query->param('action')) } else { - #print login form - print $session->header(); - print '

- - - - -

'; + #if not, print login form + + $page = XMLin("$gnutube_root/login.xml", ForceArray => 1, KeyAttr => {} ); + + #if a username is associated with session id, username is nonempty + $page->{username} = get_username_from_sid($session->id); + + #print xml http header along with session cookie + print $session->header(-type=>'text/xml'); + + print XMLout($page, KeyAttr => {}, XMLDecl => $XMLDecl, RootName => 'page'); } diff --git a/trunk/login.xml b/trunk/login.xml new file mode 100644 index 0000000..341c88e --- /dev/null +++ b/trunk/login.xml @@ -0,0 +1,7 @@ + + + diff --git a/trunk/xsl/xhtml.xsl b/trunk/xsl/xhtml.xsl index e3d78a2..00aa85d 100755 --- a/trunk/xsl/xhtml.xsl +++ b/trunk/xsl/xhtml.xsl @@ -237,7 +237,7 @@
-
+
@@ -249,4 +249,21 @@ + + +
+ + +
+ + + + +
+ + +
+ +
+