global XMLDecl variable, sanitized register.pl, cleaned xml
git-svn-id: http://yolanda.mister-muffin.de/svn@47 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
acd23bda67
commit
fc5300dc09
8 changed files with 23 additions and 16 deletions
|
@ -17,4 +17,5 @@ $dbhost = 'localhost';
|
||||||
$dbuser = 'root';
|
$dbuser = 'root';
|
||||||
$dbpass = '';
|
$dbpass = '';
|
||||||
$session_name = 'sid';
|
$session_name = 'sid';
|
||||||
|
$XMLDecl = '<?xml version="1.0" encoding="UTF-8" ?><?xml-stylesheet type="text/xsl" href="./xsl/xhtml.xsl" ?>';
|
||||||
1;
|
1;
|
||||||
|
|
|
@ -18,6 +18,6 @@ fill_tagcloud;
|
||||||
print $session->header(-type=>'text/xml');
|
print $session->header(-type=>'text/xml');
|
||||||
|
|
||||||
#print 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');
|
print XMLout($page, KeyAttr => {}, XMLDecl => $XMLDecl, RootName => 'page');
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
|
||||||
<?xml-stylesheet type="text/xsl" href="./xsl/xhtml.xsl" ?>
|
|
||||||
|
|
||||||
<page
|
<page
|
||||||
locale="en-US"
|
locale="en-US"
|
||||||
stylesheet="./style/gnutube.css"
|
stylesheet="./style/gnutube.css"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
require "include.pl";
|
require "include.pl";
|
||||||
|
require "functions.pl";
|
||||||
|
|
||||||
#initialize session data
|
#initialize session data
|
||||||
CGI::Session->name($session_name);
|
CGI::Session->name($session_name);
|
||||||
|
@ -29,10 +30,14 @@ if($query->param('user') and $query->param('pass'))
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if not, print register form
|
#if not, print register form
|
||||||
print $session->header();
|
|
||||||
print '<?xml version="1.0" encoding="ISO-8859-1" ?>'; # josch, sanitize this
|
$page = XMLin("$gnutube_root/register.xml", ForceArray => 1, KeyAttr => {} );
|
||||||
print '<?xml-stylesheet type="text/xsl" href="./xsl/xhtml.xsl" ?>'; # josch, sanitize this
|
|
||||||
print '<page locale="en-US" stylesheet="./style/gnutube.css" username="">'; # josch, sanitize this
|
#if a username is associated with session id, username is nonempty
|
||||||
print '<registerform />';
|
$page->{username} = get_username_from_sid($session->id);
|
||||||
print '</page>'; # josch, sanitize this
|
|
||||||
|
#print xml http header along with session cookie
|
||||||
|
print $session->header(-type=>'text/xml');
|
||||||
|
|
||||||
|
print XMLout($page, KeyAttr => {}, XMLDecl => $XMLDecl, RootName => 'page');
|
||||||
}
|
}
|
||||||
|
|
7
trunk/register.xml
Normal file
7
trunk/register.xml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<page
|
||||||
|
locale="en-US"
|
||||||
|
stylesheet="./style/gnutube.css"
|
||||||
|
username=""
|
||||||
|
>
|
||||||
|
<registerform />
|
||||||
|
</page>
|
|
@ -60,7 +60,7 @@ if($query->param('query'))
|
||||||
print $session->header(-type=>'text/xml');
|
print $session->header(-type=>'text/xml');
|
||||||
|
|
||||||
#print 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');
|
print XMLout($page, KeyAttr => {}, XMLDecl => $XMLDecl, RootName => 'page');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
|
||||||
<?xml-stylesheet type="text/xsl" href="./xsl/xhtml.xsl" ?>
|
|
||||||
|
|
||||||
<page
|
<page
|
||||||
locale="en-US"
|
locale="en-US"
|
||||||
stylesheet="./style/gnutube.css"
|
stylesheet="./style/gnutube.css"
|
||||||
username="pedobear@myopenid.net"
|
username=""
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
xmlns:cc="http://web.resource.org/cc/"
|
xmlns:cc="http://web.resource.org/cc/"
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
|
|
@ -245,7 +245,7 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div>
|
</div>
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue