use strict;
require Exporter;
+use C4::Auth;
use C4::Context;
use C4::Output;
use CGI;
my $record =MARCgetbiblio($dbh,$bibid);
#warn $record->as_formatted();
# open template
-my $template = gettemplate("catalogue/MARCdetail.tmpl",0);
+my ($template, $loggedinuser, $cookie)
+ = get_template_and_user({template_name => "catalogue/MARCdetail.tmpl",
+ query => $query,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {catalogue => 1},
+ debug => 1,
+ });
+
# fill arrays
my @loop_data =();
my $tag;
item_header_loop => \@header_value_loop,
biblionumber => $biblionumber,
bibid => $bibid);
-print "Content-Type: text/html\n\n", $template->output;
+print $query->header(-cookie => $cookie),$template->output;
</tr>
</tmpl_loop>
</table>
-<input type="hidden" name="tag" value="<TMPL_VAR name="itemtagfield">">
-<input type="hidden" name="subfield" value="<TMPL_VAR name="itemtagsubfield">">
-<input type="hidden" name="field_value" value="<TMPL_VAR name="itemnum">">
<input type="hidden" name="itemnum" value="<TMPL_VAR name="itemnum">">
<TMPL_IF name="opisadd">
<input type="submit" value="Add item">
<TMPL_ELSE>
+<input type="hidden" name="tag" value="<TMPL_VAR name="itemtagfield">">
+<input type="hidden" name="subfield" value="<TMPL_VAR name="itemtagsubfield">">
+<input type="hidden" name="field_value" value="<TMPL_VAR name="itemnum">">
<input type="submit" value="Modify item">
</TMPL_IF>
</center>
-<TMPL_INCLUDE NAME="opac-top.inc">
+<TMPL_INCLUDE NAME="members-top.inc">
<TMPL_IF NAME="loggedinuser">
<p align=left>Logged in as: <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/logout.pl>Log Out</a>]</p>
</center>
</TMPL_IF>
-<TMPL_INCLUDE NAME="opac-bottom.inc">
+<TMPL_INCLUDE NAME="members-bottom.inc">
use strict;
require Exporter;
use CGI;
+use C4::Auth;
use HTML::Template;
use C4::Context;
use C4::Search;
($startfrom) || ($startfrom=0);
my $subject=$query->param('subject');
-my $template;
# if it's a subject we need to use the subject.tmpl
+my ($template, $loggedinuser, $cookie);
if ($subject) {
- $template = gettemplate("catalogue/subject.tmpl",0);
+ ($template, $loggedinuser, $cookie)
+ = get_template_and_user({template_name => "catalogue/subject.tmpl",
+ query => $query,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {catalogue => 1},
+ debug => 1,
+ });
} else {
- $template = gettemplate("catalogue/searchresults.tmpl", 0);
+ ($template, $loggedinuser, $cookie)
+ = get_template_and_user({template_name => "catalogue/searchresults.tmpl",
+ query => $query,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {catalogue => 1},
+ debug => 1,
+ });
}
# %env
# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use C4::Auth;
use CGI;
use C4::Context;
use HTML::Template;
newauthority($dbh,$category,$insert,$insert,'',1,'');
$search_string=$insert;
}
-
-my $template = gettemplate("thesaurus_popup.tmpl",0);
+my ($template, $loggedinuser, $cookie)
+ = get_template_and_user({template_name => "thesaurus_popup.tmpl",
+ query => $input,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {parameters => 1},
+ debug => 1,
+ });
# /search thesaurus terms starting by search_string
my @freelib;
my %stdlib;
category => $category,
index => $index
);
-print "Content-Type: text/html\n\n", $template->output;
+print $input->header(-cookie => $cookie),$template->output;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use C4::Auth;
use CGI;
use C4::Context;
use HTML::Template;
my $dbh = C4::Context->dbh;
- my $template = gettemplate("value_builder/unimarc_field_100.tmpl",0);
+my ($template, $loggedinuser, $cookie)
+ = get_template_and_user({template_name => "value_builder/unimarc_field_100.tmpl",
+ query => $input,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {parameters => 1},
+ debug => 1,
+ });
my $f1 = substr($result,0,8);
my $f2 = substr($result,8,1);
my $f3 = substr($result,9,4);
f3 => $f3,
"f2$f2" => $f2,
f4 => $f4);
- print "Content-Type: text/html\n\n", $template->output;
+ print $input->header(-cookie => $cookie),$template->output;
}
1;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use C4::Auth;
use CGI;
use C4::Context;
use HTML::Template;
my $isbn_found = $input->param('isbn_found');
my $dbh = C4::Context->dbh;
my $authoritysep = C4::Context->preference("authoritysep");
- my $template = gettemplate("value_builder/unimarc_field_225a.tmpl",0);
+ my ($template, $loggedinuser, $cookie)
+ = get_template_and_user({template_name => "value_builder/unimarc_field_225a.tmpl",
+ query => $input,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {parameters => 1},
+ debug => 1,
+ });
# builds collection list : search isbn and editor, in parent, then load collections from bibliothesaurus table
my $sth = $dbh->prepare("select stdlib from bibliothesaurus where father=? and category='EDITORS'");
my @splited = split //, $isbn_found;
);
$template->param(index => $index,
collection => $collection);
- print "Content-Type: text/html\n\n", $template->output;
+ print $input->header(-cookie => $cookie),$template->output;
}
1;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use C4::Auth;
use CGI;
use C4::Context;
use HTML::Template;
my $dbh = C4::Context->dbh;
- my $template = gettemplate("value_builder/unimarc_field_700-4.tmpl",0);
+ my ($template, $loggedinuser, $cookie)
+ = get_template_and_user({template_name => "value_builder/unimarc_field_700-4.tmpl",
+ query => $input,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {parameters => 1},
+ debug => 1,
+ });
$template->param(index => $index,
index2 => $index2,
"f1_$result" => "f1_".$result,
);
- print "Content-Type: text/html\n\n", $template->output;
+ print $input->header(-cookie => $cookie),$template->output;
}
1;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use C4::Auth;
use CGI;
use C4::Context;
use HTML::Template;
-labels=> \%stdlib
);
}
- my $template = gettemplate("value_builder/unimarc_field_700_701_702.tmpl",0);
+ my ($template, $loggedinuser, $cookie)
+ = get_template_and_user({template_name => "value_builder/unimarc_field_700_701_702.tmpl",
+ query => $input,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {parameters => 1},
+ debug => 1,
+ });
# builds collection list : search isbn and editor, in parent, then load collections from bibliothesaurus table
$template->param(index => $index,
result =>$result,
b => $b,
c => $c,
f => $f,);
- print "Content-Type: text/html\n\n", $template->output;
+ print $input->header(-cookie => $cookie),$template->output;
}
1;