Removed hard coded directories (as reported by Ville Huhtala).
[koha.git] / loadmodules.pl
blob83a3d3d4b16f9419d4f7d6d4fd821c5a7b1089bd
1 #!/usr/bin/perl
3 #script to show list of budgets and bookfunds
4 #written 4/2/00 by chris@katipo.co.nz
5 #called as an include by the acquisitions index page
7 use C4::Acquisitions;
8 use C4::Biblio;
9 use C4::Search;
10 use CGI;
11 my $input=new CGI;
13 my $module=$input->param('module');
15 SWITCH: {
16 if ($module eq 'acquisitions') { acquisitions(); last SWITCH; }
17 if ($module eq 'somethingelse') { somethingelse(); last SWITCH; }
21 sub acquisitions {
22 # FIXME
23 # instead of getting a hash, then reading/writing to it at least twice
24 # and up to four times, maybe this should be a different function -
25 # areAquisitionsSimple() which returns a boolean
26 my %systemprefs=systemprefs();
27 ($systemprefs{'acquisitions'}) || ($systemprefs{'acquisitions'}='normal');
28 if ($systemprefs{'acquisitions'} eq 'simple') {
29 print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl");
30 } elsif ($systemprefs{'acquisitions'} eq 'normal') {
31 print $input ->redirect("/acquisitions");
32 } else {
33 print $input ->redirect("/acquisitions");
38 sub somethingelse {
39 # just an example subroutine