Lines 1-6
Link Here
|
1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
2 |
|
2 |
|
3 |
|
|
|
4 |
# Copyright 2000-2002 Katipo Communications |
3 |
# Copyright 2000-2002 Katipo Communications |
5 |
# |
4 |
# |
6 |
# This file is part of Koha. |
5 |
# This file is part of Koha. |
Lines 36-51
plugin_parameters : other parameters added when the plugin is called by the dopo
Link Here
|
36 |
|
35 |
|
37 |
=cut |
36 |
=cut |
38 |
|
37 |
|
39 |
# find today's date |
38 |
sub date_entered { |
40 |
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); |
39 |
# find today's date |
41 |
|
40 |
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); |
42 |
$year +=1900; $mon +=1; |
41 |
$year +=1900; |
43 |
my $dateentered = substr($year,2,2).sprintf ("%0.2d", $mon).sprintf ("%0.2d",$mday); |
42 |
$mon +=1; |
44 |
my $defaultval = Field008(); |
43 |
return substr($year,2,2).sprintf ("%0.2d", $mon).sprintf ("%0.2d",$mday); |
|
|
44 |
} |
45 |
|
45 |
|
46 |
sub plugin_javascript { |
46 |
sub plugin_javascript { |
47 |
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_; |
47 |
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_; |
48 |
my $function_name= $field_number; |
48 |
my $function_name= $field_number; |
|
|
49 |
my $dateentered = date_entered(); |
50 |
my $defaultval = Field008(); |
49 |
my $res=" |
51 |
my $res=" |
50 |
<script type=\"text/javascript\"> |
52 |
<script type=\"text/javascript\"> |
51 |
//<![CDATA[ |
53 |
//<![CDATA[ |
Lines 79-84
sub plugin {
Link Here
|
79 |
my $index= $input->param('index'); |
81 |
my $index= $input->param('index'); |
80 |
my $result= $input->param('result'); |
82 |
my $result= $input->param('result'); |
81 |
my $authtype= $input->param('authtypecode')||''; |
83 |
my $authtype= $input->param('authtypecode')||''; |
|
|
84 |
|
85 |
my $defaultval = Field008(); |
82 |
substr($defaultval,14-6,1)='b' if $authtype=~ /TOPIC_TERM|GENRE.FORM|CHRON_TERM/; |
86 |
substr($defaultval,14-6,1)='b' if $authtype=~ /TOPIC_TERM|GENRE.FORM|CHRON_TERM/; |
83 |
|
87 |
|
84 |
my $dbh = C4::Context->dbh; |
88 |
my $dbh = C4::Context->dbh; |
Lines 91-96
sub plugin {
Link Here
|
91 |
flagsrequired => {editcatalogue => '*'}, |
95 |
flagsrequired => {editcatalogue => '*'}, |
92 |
debug => 1, |
96 |
debug => 1, |
93 |
}); |
97 |
}); |
|
|
98 |
my $dateentered = date_entered(); |
94 |
$result = "$dateentered$defaultval" unless $result; |
99 |
$result = "$dateentered$defaultval" unless $result; |
95 |
my @f; |
100 |
my @f; |
96 |
for(0,6..17,28,29,31..33,38,39) { |
101 |
for(0,6..17,28,29,31..33,38,39) { |
97 |
- |
|
|