5 # standard or CPAN modules used
11 use C4::Auth qw/check_cookie_auth/;
14 use CGI::Cookie; # need to check cookies before
15 # having CGI parse the POST request
17 my %cookies = fetch CGI::Cookie;
18 my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { editcatalogue => '1' });
19 if ($auth_status ne "ok") {
20 my $reply = CGI->new("");
21 print $reply->header(-type => 'text/html');
26 my $framework = $reply->param('frameworkcode');
27 my $tagslib = GetMarcStructure(1, $framework);
28 print $reply->header(-type => 'text/html');
29 print encode_json $tagslib;