diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl
index b1e8b63914..295c7ae261 100755
--- a/admin/auth_subfields_structure.pl
+++ b/admin/auth_subfields_structure.pl
@@ -189,7 +189,7 @@ if ($op eq 'add_form') {
-size=>1,
-multiple=>0,
);
- $row_data{tagsubfield} =$data->{'tagsubfield'}."{'tagsubfield'}."\" id=\"tagsubfield\">";
+ $row_data{tagsubfield} =$data->{'tagsubfield'}."{'tagsubfield'}."\" id=\"tagsubfield\" />";
$row_data{liblibrarian} = CGI::escapeHTML($data->{'liblibrarian'});
$row_data{libopac} = CGI::escapeHTML($data->{'libopac'});
$row_data{seealso} = CGI::escapeHTML($data->{'seealso'});
@@ -290,7 +290,7 @@ if ($op eq 'add_form') {
-size=>1,
-multiple=>0,
);
- $row_data{tagsubfield} = "{'tagsubfield'}."\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\">";
+ $row_data{tagsubfield} = "{'tagsubfield'}."\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\" />";
$row_data{liblibrarian} = "";
$row_data{libopac} = "";
$row_data{seealso} = "";
@@ -471,7 +471,7 @@ if ($op eq 'add_form') {
$row_data{value_builder} = $results->[$i]{'value_builder'};
$row_data{hidden} = $results->[$i]{'hidden'} if($results->[$i]{'hidden'} gt "000") ;
$row_data{isurl} = $results->[$i]{'isurl'};
- $row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagsubfield'}."&authtypecode=$authtypecode";
+ $row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagsubfield'}."&authtypecode=$authtypecode";
$row_data{toggle} = $toggle;
if ($row_data{tab} eq -1) {
$row_data{subfield_ignored} = 1;
diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl
index b7f5ba878a..7e96020b77 100755
--- a/admin/auth_tag_structure.pl
+++ b/admin/auth_tag_structure.pl
@@ -222,9 +222,9 @@ if ($op eq 'add_form') {
$row_data{repeatable} = $results->[$i]{'repeatable'};
$row_data{mandatory} = $results->[$i]{'mandatory'};
$row_data{authorised_value} = $results->[$i]{'authorised_value'};
- $row_data{subfield_link} ="auth_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode;
- $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode;
- $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode;
+ $row_data{subfield_link} ="auth_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode;
+ $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode;
+ $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode;
$row_data{toggle} = $toggle;
push(@loop_data, \%row_data);
}
diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl
index 1c2f03e9b9..fe56aee015 100755
--- a/admin/authorised_values.pl
+++ b/admin/authorised_values.pl
@@ -100,9 +100,9 @@ if ($op eq 'add_form') {
id => $data->{'id'}
);
if ($data->{'category'}) {
- $template->param(category => "$data->{'category'}");
+ $template->param(category => "{'category'}'\" />$data->{'category'}");
} else {
- $template->param(category => "");
+ $template->param(category => "");
}
################## ADD_VALIDATE ##################################
# called by add_form, used to insert/modify data in DB
@@ -164,21 +164,21 @@ if ($op eq 'add_form') {
$searchfield=$category_list[0];
}
my ($count,$results)=StringSearch($searchfield,'web');
- my $toggle="white";
+ my $toggle=1;
my @loop_data = ();
# builds value list
for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
- if ($toggle eq 'white'){
- $toggle="#ffffcc";
+ if ($toggle eq 1){
+ $toggle=1;
} else {
- $toggle="white";
+ $toggle=0;
}
my %row_data; # get a fresh hash for the row data
$row_data{category} = $results->[$i]{'category'};
$row_data{authorised_value} = $results->[$i]{'authorised_value'};
$row_data{lib} = $results->[$i]{'lib'};
- $row_data{edit} = "$script_name?op=add_form&id=".$results->[$i]{'id'};
- $row_data{delete} = "$script_name?op=delete_confirm&searchfield=$searchfield&id=".$results->[$i]{'id'};
+ $row_data{edit} = "$script_name?op=add_form&id=".$results->[$i]{'id'};
+ $row_data{delete} = "$script_name?op=delete_confirm&searchfield=$searchfield&id=".$results->[$i]{'id'};
push(@loop_data, \%row_data);
}
diff --git a/admin/categoryitem.pl b/admin/categoryitem.pl
deleted file mode 100755
index e2a8b83c19..0000000000
--- a/admin/categoryitem.pl
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/usr/bin/perl
-
-#script to administer the categories table
-#written 20/02/2002 by paul.poulain@free.fr
-# This software is placed under the gnu General Public License, v2 (http://www.gnu.org/licenses/gpl.html)
-
-# ALGO :
-# this script use an $op to know what to do.
-# if $op is empty or none of the above values,
-# - the default screen is build (with all records, or filtered datas).
-# - the user can clic on add, modify or delete record.
-# if $op=add_form
-# - if primkey exists, this is a modification,so we read the $primkey record
-# - builds the add/modify form
-# if $op=add_validate
-# - the user has just send datas, so we create/modify the record
-# if $op=delete_form
-# - we show the record having primkey=$primkey and ask for deletion validation form
-# if $op=delete_confirm
-# - we delete the record having primkey=$primkey
-
-
-# Copyright 2000-2002 Katipo Communications
-#
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
-
-use strict;
-use CGI;
-use C4::Context;
-use C4::Auth;
-use C4::Output;
-
-sub StringSearch {
- my ($searchstring,$type)=@_;
- my $dbh = C4::Context->dbh;
- $searchstring=~ s/\'/\\\'/g;
- my @data=split(' ',$searchstring);
- my $count=@data;
- my $sth=$dbh->prepare("Select * from categories where (description like ?)");
- $sth->execute("$data[0]%");
- my @results;
- while (my $data=$sth->fetchrow_hashref){
- push(@results,$data);
- }
- # $sth->execute;
- $sth->finish;
- return (scalar(@results),\@results);
-}
-
-my $input = new CGI;
-my $searchfield=$input->param('description');
-my $script_name="/cgi-bin/koha/admin/categorie.pl";
-my $categorycode=$input->param('categorycode');
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-
-my ($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => "admin/categoryitem.tmpl",
- query => $input,
- type => "intranet",
- authnotrequired => 0,
- debug => 1,
- });
-
-
-$template->param(script_name => $script_name,
- categorycode => $categorycode,
- searchfield => $searchfield);
-
-
-################## ADD_FORM ##################################
-# called by default. Used to create form to add or modify a record
-if ($op eq 'add_form') {
- $template->param(add_form => 1);
- #---- if primkey exists, it's a modify action, so read values to modify...
- my $data;
- if ($categorycode) {
- my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("select categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,reservefee,overduenoticerequired from categories where categorycode=?");
- $sth->execute($categorycode);
- $data=$sth->fetchrow_hashref;
- $sth->finish;
- }
-
- $template->param(description => $data->{'description'},
- enrolmentperiod => $data->{'enrolmentperiod'},
- upperagelimit => $data->{'upperagelimit'},
- dateofbirthrequired => $data->{'dateofbirthrequired'},
- finetype => $data->{'finetype'},
- bulk => $data->{'bulk'},
- enrolmentfee => $data->{'enrolmentfee'},
- overduenoticerequired => $data->{'overduenoticerequired'},
- reservefee => $data->{'reservefee'});
-
-
-;
- # END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
- $template->param(add_validate => 1);
- my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("replace categories (categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,reservefee,overduenoticerequired) values (?,?,?,?,?,?,?,?,?,?)");
- $sth->execute(map {$input->param($_)} ('categorycode','description','enrolmentperiod','upperagelimit','dateofbirthrequired','finetype','bulk','enrolmentfee','reservefee','overduenoticerequired'));
- $sth->finish;
- print "data recorded";
- print "
";
- # END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
- $template->param(delete_confirm => 1);
- my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("select count(*) as total from categoryitem where categorycode=?");
- $sth->execute($categorycode);
- my $total = $sth->fetchrow_hashref;
- print "TOTAL : $categorycode : $total->{'total'} ";
- $sth->finish;
- my $sth2=$dbh->prepare("select categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,reservefee,overduenoticerequired from categories where categorycode=?");
- $sth2->execute($categorycode);
- my $data=$sth2->fetchrow_hashref;
- $sth2->finish;
-
- $template->param(description => $data->{'description'},
- enrolmentperiod => $data->{'enrolmentperiod'},
- upperagelimit => $data->{'upperagelimit'},
- dateofbirthrequired => $data->{'dateofbirthrequired'},
- finetype => $data->{'finetype'},
- bulk => $data->{'bulk'},
- enrolmentfee => $data->{'enrolmentfee'},
- overduenoticerequired => $data->{'overduenoticerequired'},
- reservefee => $data->{'reservefee'});
-
- # END $OP eq DELETE_CONFIRM
-################## DELETE_CONFIRMED ##################################
-# called by delete_confirm, used to effectively confirm deletion of data in DB
-} elsif ($op eq 'delete_confirmed') {
- $template->param(delete_confirmed => 1);
- my $dbh = C4::Context->dbh;
- my $categorycode=uc($input->param('categorycode'));
- my $sth=$dbh->prepare("delete from categories where categorycode=?");
- $sth->execute($categorycode);
- $sth->finish;
- # END $OP eq DELETE_CONFIRMED
-} else { # DEFAULT
- $template->param(else => 1);
- my @loop;
- my ($count,$results)=StringSearch($searchfield,'web');
- my $toggle = 'white';
- for (my $i=0; $i < $count; $i++){
- my %row = (categorycode => $results->[$i]{'categorycode'},
- description => $results->[$i]{'description'},
- enrolmentperiod => $results->[$i]{'enrolmentperiod'},
- upperagelimit => $results->[$i]{'upperagelimit'},
- dateofbirthrequired => $results->[$i]{'dateofbirthrequired'},
- finetype => $results->[$i]{'finetype'},
- bulk => $results->[$i]{'bulk'},
- enrolmentfee => $results->[$i]{'enrolmentfee'},
- overduenoticerequired => $results->[$i]{'overduenoticerequired'},
- reservefee => $results->[$i]{'reservefee'},
- toggle => $toggle );
- push @loop, \%row;
- if ( $toggle eq 'white' )
- {
- $toggle = '#ffffcc';
- }
- else
- {
- $toggle = 'white';
- }
-
- }
- $template->param(loop => \@loop);
-
-
-} #---- END $OP eq DEFAULT
-$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
- intranetstylesheet => C4::Context->preference("intranetstylesheet"),
- IntranetNav => C4::Context->preference("IntranetNav"),
- );
-output_html_with_http_headers $input, $cookie, $template->output;
-
-
-
diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl
index 8bdcfe6077..ae3d94b2ab 100755
--- a/admin/marc_subfields_structure.pl
+++ b/admin/marc_subfields_structure.pl
@@ -204,7 +204,7 @@ if ( $op eq 'add_form' ) {
$data->{'tagsubfield'}
. "{'tagsubfield'}
- . "\" id=\"tagsubfield\">";
+ . "\" id=\"tagsubfield\" />";
$row_data{subfieldcode} = $data->{'tagsubfield'};
$row_data{liblibrarian} = CGI::escapeHTML( $data->{'liblibrarian'} );
$row_data{libopac} = CGI::escapeHTML( $data->{'libopac'} );
@@ -309,7 +309,7 @@ if ( $op eq 'add_form' ) {
$row_data{tagsubfield} =
"{'tagsubfield'}
- . "\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\">";
+ . "\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\" />";
$row_data{liblibrarian} = "";
$row_data{libopac} = "";
$row_data{seealso} = "";
@@ -383,7 +383,7 @@ if ( $op eq 'add_form' ) {
$template->param(
action => "Edit subfields",
tagfield =>
-"$tagfield",
+"$tagfield",
loop => \@loop_data,
more_subfields => $more_subfields,
more_tag => $tagfield
@@ -540,7 +540,7 @@ else { # DEFAULT
$row_data{delete} =
"$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield="
. $results->[$i]{'tagsubfield'}
- . "&frameworkcode=$frameworkcode";
+ . "&frameworkcode=$frameworkcode";
$row_data{toggle} = $toggle;
if ( $row_data{tab} eq -1 ) {
diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl
index 99edb1cc6a..e65d92fedb 100755
--- a/admin/marctagstructure.pl
+++ b/admin/marctagstructure.pl
@@ -258,9 +258,9 @@ if ($op eq 'add_form') {
$row_data{repeatable} = $results[$i]->{'mts_repeatable'};
$row_data{mandatory} = $results[$i]->{'mts_mandatory'};
$row_data{authorised_value} = $results[$i]->{'mts_authorised_value'};
- $row_data{subfield_link} ="marc_subfields_structure.pl?op=add_form&tagfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
- $row_data{edit} = "$script_name?op=add_form&searchfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
- $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
+ $row_data{subfield_link} ="marc_subfields_structure.pl?op=add_form&tagfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
+ $row_data{edit} = "$script_name?op=add_form&searchfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
+ $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
$row_data{toggle} = $toggle;
$j=$i;
my @internal_loop = ();
@@ -308,9 +308,9 @@ if ($op eq 'add_form') {
$row_data{repeatable} = $results->[$i]{'repeatable'};
$row_data{mandatory} = $results->[$i]{'mandatory'};
$row_data{authorised_value} = $results->[$i]{'authorised_value'};
- $row_data{subfield_link} ="marc_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
- $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
- $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
+ $row_data{subfield_link} ="marc_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
+ $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
+ $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
$row_data{toggle} = $toggle;
push(@loop_data, \%row_data);
}
diff --git a/admin/roadtype.pl b/admin/roadtype.pl
index 44c801570a..12d6e75c14 100755
--- a/admin/roadtype.pl
+++ b/admin/roadtype.pl
@@ -121,7 +121,7 @@ if ($op eq 'add_form') {
}
$template->param(
- city_name => ( $data->{'road_type'}),
+ road_type => ( $data->{'road_type'}),
);
diff --git a/admin/thesaurus.pl b/admin/thesaurus.pl
deleted file mode 100755
index 4c54a0d7d4..0000000000
--- a/admin/thesaurus.pl
+++ /dev/null
@@ -1,267 +0,0 @@
-#!/usr/bin/perl
-
-# Copyright 2000-2002 Katipo Communications
-#
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
-
-use strict;
-use CGI;
-use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::AuthoritiesMarc;
-
-my $input = new CGI;
-my $search_category=$input->param('search_category');
-# $search_category=$input->param('category') unless $search_category;
-#my $toponly = $input->param('toponly');
-my $branch = $input->param('branch');
-my $searchstring = $input->param('searchstring');
-# $searchstring=~ s/\,//g;
-my $id = $input->param('id');
-my $offset=$input->param('offset');
-my $father=$input->param('father');
-
-my $reqsel="";
-my $reqdel="delete from bibliothesaurus where id='$id'";
-my $script_name="/cgi-bin/koha/admin/thesaurus.pl";
-my $dbh = C4::Context->dbh;
-my $authoritysep = C4::Context->preference("authoritysep");
-
-my ($template, $borrowernumber, $cookie)
- = get_template_and_user({template_name => "admin/thesaurus.tmpl",
- query => $input,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => {parameters => 1},
- debug => 1,
- });
-
-my $pagesize=20;
-
-my $prevpage = $offset-$pagesize;
-my $nextpage =$offset+$pagesize;
-
-my $op = $input->param('op');
-
-if ($op) {
-$template->param(script_name => $script_name,
- $op => 1); # we show only the TMPL_VAR names $op
-} else {
-$template->param(script_name => $script_name,
- else => 1); # we show only the TMPL_VAR names $op
-}
-################## ADD_FORM ##################################
-# called by default. Used to create form to add or modify a record
-if ($op eq 'add_form') {
- my $data;
- if ($id) {
- my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("select id,category,freelib,stdlib from bibliothesaurus where id=?");
- $sth->execute($id);
- $data=$sth->fetchrow_hashref;
- $sth->finish;
- } else {
- $data->{'category'} = $input->param('category');
- $data->{'stdlib'} = $input->param('stdlib');
- }
- if ($search_category) {
- $template->param(action => "Modify thesaurus");
- } else {
- $template->param(action => "Add thesaurus");
- }
- $template->param(category => $data->{'category'},
- stdlib => $data->{'stdlib'},
- freelib => $data->{'freelib'},
- id => $data->{'id'},
- branch => $branch,
-# toponly => $toponly,
- search_category => $search_category,
- searchstring => $searchstring,
- offset => $offset,
- father => $father,
- );
- if ($data->{'category'}) {
- $template->param(category => "$data->{'category'}");
- } else {
- $template->param(category => "");
- }
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert data in DB
-} elsif ($op eq 'add_validate') {
- my $dbh = C4::Context->dbh;
- my $freelib = $input->param('freelib');
- $freelib = $input->param('stdlib') unless ($input->param('freelib'));
- newauthority($dbh,$input->param('category'),$input->param('father')." ".$input->param('stdlib'), $freelib,'',1,'');
- print "Content-Type: text/html\n\n