X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=mancredit.pl;h=300e0a26c54607b197317c98ed65dd62191bf066;hb=26543b430e1df3866f50e79fbfb724ec69a26791;hp=afa599fa048ab03b921912786a90bb40156dc1c6;hpb=3d03be3c86ec619144682d25701690a5ccc38c60;p=koha.git diff --git a/mancredit.pl b/mancredit.pl index afa599fa04..300e0a26c5 100755 --- a/mancredit.pl +++ b/mancredit.pl @@ -22,7 +22,9 @@ # Suite 330, Boston, MA 02111-1307 USA use strict; +use C4::Auth; use C4::Output; +use C4::Interface::CGI::Output; use CGI; use HTML::Template; use C4::Search; @@ -41,9 +43,20 @@ if ($add){ $amount = -$amount; my $type=$input->param('type'); manualinvoice($bornum,$itemnum,$desc,$type,$amount); - print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$bornum"); + print $input->redirect("/cgi-bin/koha/boraccount.pl?bornum=$bornum"); } else { - my $template = gettemplate("mancredit.tmpl"); + my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "mancredit.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {borrowers => 1}, + debug => 1, + }); $template->param( bornum => $bornum); - print "Content-Type: text/html\n\n", $template->output; + print $input->header( + -type => guesstype($template->output), + -cookie => $cookie + ),$template->output; + }