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-29 16:47:16 +00:00
|
|
|
$query = new CGI;
|
2007-10-10 21:48:12 +00:00
|
|
|
my $session = new CGI::Session;
|
|
|
|
|
2007-10-29 15:00:40 +00:00
|
|
|
@userinfo = get_userinfo_from_sid($session->id);
|
2007-10-10 21:48:12 +00:00
|
|
|
|
2007-10-29 15:00:40 +00:00
|
|
|
@page = get_page_array(@userinfo);
|
2007-10-27 09:17:30 +00:00
|
|
|
|
2007-10-29 15:00:40 +00:00
|
|
|
if($userinfo->{'username'})
|
2007-10-11 17:26:39 +00:00
|
|
|
{
|
2007-10-30 10:44:55 +00:00
|
|
|
if($query->param('2'))
|
|
|
|
{
|
2007-11-01 23:00:14 +00:00
|
|
|
$page->{'uploadform'}->{'page'} = '2';
|
2007-10-30 10:44:55 +00:00
|
|
|
}
|
|
|
|
elsif($query->param('3'))
|
|
|
|
{
|
2007-11-01 23:00:14 +00:00
|
|
|
$page->{'uploadform'}->{'page'} = '3';
|
2007-10-30 10:44:55 +00:00
|
|
|
}
|
|
|
|
elsif($query->param('4'))
|
|
|
|
{
|
2007-11-01 23:00:14 +00:00
|
|
|
$page->{'uploadform'}->{'page'} = '4';
|
2007-10-30 10:44:55 +00:00
|
|
|
}
|
|
|
|
elsif($query->param('5'))
|
|
|
|
{
|
2007-11-01 23:00:14 +00:00
|
|
|
$page->{'uploadform'}->{'page'} = '5';
|
2007-10-30 10:44:55 +00:00
|
|
|
}
|
|
|
|
elsif($query->param('6'))
|
|
|
|
{
|
2007-11-01 23:00:14 +00:00
|
|
|
$page->{'uploadform'}->{'page'} = '6';
|
2007-10-30 10:44:55 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-11-01 23:00:14 +00:00
|
|
|
$page->{'uploadform'}->{'page'} = '1';
|
2007-10-30 10:44:55 +00:00
|
|
|
}
|
2007-11-01 23:00:14 +00:00
|
|
|
$temp = $query->param('DC.Description');
|
|
|
|
$temp =~ s/\r\n/\n/g;
|
|
|
|
$page->{'uploadform'}->{'DC.Title'} = $query->param('DC.Title');
|
|
|
|
$page->{'uploadform'}->{'DC.Subject'} = $query->param('DC.Subject');
|
|
|
|
$page->{'uploadform'}->{'DC.Description'} = $temp;
|
|
|
|
$page->{'uploadform'}->{'DC.Creator'} = $query->param('DC.Creator');
|
|
|
|
$page->{'uploadform'}->{'DC.Source'} = $query->param('DC.Source');
|
|
|
|
$page->{'uploadform'}->{'DC.Language'} = $query->param('DC.Language');
|
|
|
|
$page->{'uploadform'}->{'DC.Coverage'} = $query->param('DC.Coverage');
|
2007-10-11 17:26:39 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-10-21 22:55:29 +00:00
|
|
|
$page->{'message'}->{'type'} = "error";
|
|
|
|
$page->{'message'}->{'text'} = "error_202c";
|
2007-10-10 21:48:12 +00:00
|
|
|
}
|
2007-10-27 09:17:30 +00:00
|
|
|
|
|
|
|
#print xml http header along with session cookie
|
|
|
|
print $session->header(-type=>'text/xml', -charset=>'UTF-8');
|
|
|
|
|
|
|
|
print XMLout($page, KeyAttr => {}, XMLDecl => $XMLDecl, RootName => 'page', AttrIndent => '1');
|