+#!/usr/bin/perl -w
+
package C4::Date;
use strict;
@EXPORT = qw(
&display_date_format
&format_date
- &format_date_in_iso
);
+
+
sub get_date_format
{
#Get the database handle
if ( $dateformat eq "us" )
{
- Date_Init("DateFormat=US");
$olddate = ParseDate($olddate);
$newdate = UnixDate($olddate,'%m/%d/%Y');
}
elsif ( $dateformat eq "metric" )
{
- Date_Init("DateFormat=metric");
$olddate = ParseDate($olddate);
$newdate = UnixDate($olddate,'%d/%m/%Y');
}
elsif ( $dateformat eq "iso" )
{
- Date_Init("DateFormat=iso");
$olddate = ParseDate($olddate);
$newdate = UnixDate($olddate,'%Y-%m-%d');
}
}
}
-sub format_date_in_iso
-{
- my $olddate = shift;
- my $newdate;
-
- my $dateformat = get_date_format();
-
- if ( $dateformat eq "us" )
- {
- Date_Init("DateFormat=US");
- $olddate = ParseDate($olddate);
- }
- elsif ( $dateformat eq "metric" )
- {
- Date_Init("DateFormat=metric");
- $olddate = ParseDate($olddate);
- }
- elsif ( $dateformat eq "iso" )
- {
- Date_Init("DateFormat=iso");
- $olddate = ParseDate($olddate);
- }
- else
- {
- return "9999-99-99";
- }
-
- $newdate = UnixDate($olddate, '%Y-%m-%d');
-
- return $newdate;
-}
-
1;
-__END__
<TMPL_INCLUDE NAME="cat-top.inc">
</TMPL_IF>
-<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>
-<TMPL_ELSE>
- <p align=left><a href=/cgi-bin/koha/userpage.pl>Log In</a> to Koha</p>
-</TMPL_IF>
-
<center>
<form name="f" method="post">
flagsrequired => {catalogue => 1},
debug => 1,
});
- $template->param(loggedinuser => $loggedinuser,
- result => \@results);
+ #$template->param(result => \@results);
} else {
($template, $loggedinuser, $cookie)
flagsrequired => {catalogue => 1},
debug => 1,
});
- $template->param(loggedinuser => $loggedinuser);
+ #$template->param(loggedinuser => $loggedinuser);
my $tagslib;
if ($type eq "opac") {
$tagslib = &MARCgettagslib($dbh,1);
$template->param(searchdesc => $searchdesc);
$template->param(SEARCH_RESULTS => $resultsarray);
#$template->param(includesdir => $includes);
-$template->param(loggedinuser => $loggedinuser);
my @numbers = ();
if ($count>10) {