new feature : recent acquisition in opac.

This commit is contained in:
tipaul 2003-12-08 16:27:10 +00:00
parent bc9f67122d
commit cf802b5ad8
15 changed files with 367 additions and 287 deletions

View file

@ -56,7 +56,9 @@ on what is passed to it, it calls the appropriate search function.
=cut
@ISA = qw(Exporter);
@EXPORT = qw(&CatSearch &BornameSearch &ItemInfo &KeywordSearch &subsearch
@EXPORT = qw(
&newsearch
&CatSearch &BornameSearch &ItemInfo &KeywordSearch &subsearch
&itemdata &bibdata &GetItems &borrdata &itemnodata &itemcount
&borrdata2 &NewBorrowerNumber &bibitemdata &borrissues
&getboracctrecord &ItemType &itemissues &subject &subtitle
@ -65,6 +67,34 @@ on what is passed to it, it calls the appropriate search function.
&isbnsearch &breedingsearch &getallthemes &getalllanguages &getbranchname &getborrowercategory);
# make all your functions, whether exported or not;
=item newsearch
my (@results) = newsearch($itemtype,$duration,$number_of_results,$startfrom);
c<newsearch> find biblio acquired recently (last 30 days)
=cut
sub newsearch {
my ($itemtype,$duration,$num,$offset)=@_;
my $dbh = C4::Context->dbh;
my $sth=$dbh->prepare("SELECT to_days( now( ) ) - to_days( dateaccessioned ) AS duration, biblio.biblionumber, barcode, title, author, classification, itemtype, dewey, dateaccessioned, price, replacementprice
FROM items, biblio, biblioitems
WHERE biblio.biblionumber = biblioitems.biblionumber AND
items.biblionumber = biblio.biblionumber AND
to_days( now( ) ) - to_days( dateaccessioned ) < ? and itemtype=?
ORDER BY duration ASC ");
$sth->execute($duration,$itemtype);
my $i=0;
my @result;
while (my $line = $sth->fetchrow_hashref) {
if ($i>=$offset && $i+$offset<$num) {
push @result,$line;
}
$i++
}
return(@result);
}
=item findguarantees
($num_children, $children_arrayref) = &findguarantees($parent_borrno);

View file

@ -6,6 +6,15 @@
<style type="text/css">
<!--
input{font-size:16px}
a {
font-weight: normal;
text-decoration: none;
cursor: hand;
color:#FFFFFF;
padding:4px;
font-weight: bold;
}
-->
</style>
@ -14,121 +23,85 @@ input{font-size:16px}
</HEAD>
<BODY onload="document.catsearch.keyword.focus()"
BGCOLOR="#339999"
text="black"
link="white"
vlink="white"
alink="#663366"
leftmargin=0
BGCOLOR="#339999"
text="black"
link="white"
vlink="white"
alink="#663366"
leftmargin=0
topmargin=0
marginheight=0
marginwidth=0 >
<center>
<table cellspacing=0 cellpadding=0 border=0 >
<tr valign=top >
<td background="<TMPL_VAR NAME='themelang'>/images/front-background-med.gif"><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif"
width=1 height=440 align=left alt="" hspace=0 vspace=0><table
cellspacing=0 cellpadding=0 border=0 >
<tr valign=top >
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=228 height=88
alt=" " hspace=0 vspace=0></td>
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=57 height=88
alt=" " hspace=0 vspace=0></td>
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=47 height=88
alt=" " hspace=0 vspace=0></td>
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=1 height=88
alt=" " hspace=0 vspace=0></td>
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=1 height=88
alt=" " hspace=0 vspace=0></td>
</tr>
<tr valign=center >
<td background="<TMPL_VAR NAME='themelang'>/images/front-background-med.gif">
<img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=1 height=440 align=left alt="" hspace=0 vspace=0>
<table cellspacing=0 cellpadding=0 border=0>
<tr valign=center >
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=260 height=88 alt=" " hspace=0 vspace=0></td>
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=30 height=88 alt=" " hspace=0 vspace=0></td>
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=350 height=88 alt=" " hspace=0 vspace=0></td>
</tr>
<tr valign=top >
<td background=" " rowspan=2 align="right" colspan=2><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif"
width=1 height=30
alt=" " hspace=0 vspace=0>
<i><b>Koha<br/>
Free Software ILS<br/><br/></b>
Koha : a gift, a contribution<br/> in Maori</i>
<td background=" " colspan=3><font size=+2><a href="/cgi-bin/koha/opac-search.pl"><img src="<TMPL_VAR NAME='themelang'>/images/front-arrow.gif" border=0>Search the catalogue</a></font></td>
</tr>
<tr valign=top >
<td>&nbsp; &nbsp; </td>
<FORM ACTION="/cgi-bin/koha/opac-searchresults.pl" name=catsearch>
<input type=hidden name=type value=opac>
<td background=" " >
<input type=text size="27" name="keyword"><br>
</font>
<b>Type in the box and press the enter key.</b><br>
<a href="/cgi-bin/koha/opac-search.pl">
<img src="<TMPL_VAR NAME='themelang'>/images/front-arrow.gif" width=27 height=22
alt="-" hspace=0 vspace=0 border=0 align=middle >Advanced Search, More Options</a><br>
<img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=1 height=8
alt=" " hspace=0 vspace=0>
<p>
<TMPL_IF NAME="loggedinuser">
<p align=left>Logged in as: <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-user.pl>Members Home</a>][<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Log Out</a>]</p>
<TMPL_ELSE>
<p align=left><a href="/cgi-bin/koha/opac-user.pl">Log In to Koha</a></p>
</TMPL_IF>
<tr valign=top >
<td align="right">
<img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=1 height=30 alt=" " hspace=0 vspace=0>
<i><b>Koha<br/>
Free Software ILS<br/><br/></b>
Koha : a gift, a contribution<br/> in Maori</i>
</td>
<td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="<TMPL_VAR NAME='themelang'>/images/front-arrow.gif" border=0>
</td>
<td>
<font size=+2>
Search the catalogue
</font>
<FORM ACTION="/cgi-bin/koha/opac-searchresults.pl" name=catsearch>
<input type=hidden name=type value=opac>
<input type=text size="27" name="keyword"><br>
<b>Type in the box and press the enter key.</b><br>
<a href="/cgi-bin/koha/opac-search.pl">
<img src="<TMPL_VAR NAME='themelang'>/images/front-arrow.gif" width=20 alt="-" hspace=0 vspace=0 border=0 align=middle >
Advanced Search, More Options
</a>
</form>
</td>
</tr>
<tr valign=top height="50">
<td>&nbsp;</td>
<td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="<TMPL_VAR NAME='themelang'>/images/front-arrow.gif" border=0>
</td>
<td>
<font size=+2>
Recent acquisitions
</font><br/>
<form action="/cgi-bin/koha/opac-new.pl" name="new">
<TMPL_VAR name="CGIitemtype"> acquired <br/>
in the last <b><input type="text" name="duration" value="30" size=3></b> days
<br/>
<input type="submit" value="OK">
</form>
</td>
</tr>
<tr valign=center>
<td>&nbsp;</td>
<td>
<img src="<TMPL_VAR NAME='themelang'>/images/front-arrow.gif" border=0>
</td>
<td>
<TMPL_IF NAME="loggedinuser">
<p align=left>Logged in as: <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-user.pl>Members Home</a>][<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Log Out</a>]</p>
<TMPL_ELSE>
<p align=left><a href="/cgi-bin/koha/opac-user.pl">Log In to Koha</a></p>
</TMPL_IF>
</td>
</tr>
</table>
</td>
</form>
</tr>
<!--
<tr valign=top ><form action="/cgi-bin/koha/member.pl" method=get >
<td background=" " colspan=3><img src="<TMPL_VAR NAME='themelang'>/images/heading-login.gif" width=279 height=38
alt="Member Login" hspace=0 vspace=0 border=0></td>
</tr>
<tr valign=top >
<td></td>
<form action="/cgi-bin/koha/member.pl" method=get >
<td background=" " >
<font size=3 face="arial narrow,arial,helvetica">Card Number &nbsp;</font></td>
<td background=" " ><input type=text size="12" name="card"></td>
</tr>
<tr valign=top><td></td>
<td></td>
<td></td>
<td background=" " >
<font size=3 face="arial narrow,arial,helvetica">Password</font></td>
<td background=" " ><input type=password size="12" name="password"><br>
<input type=submit value="OK"><br>
<img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=1 height=8
alt=" " hspace=0 vspace=0></td>
</font>
</tr>
<tr valign=top >
<td></td>
<td background=" " colspan=4><A href="/cgi-bin/koha/join.html"><img src="<TMPL_VAR NAME='themelang'>/images/heading-member.gif" width=331 height=38
alt="Become a Website Member" hspace=0 vspace=0 border=0></a>
</td>
<td>
</td>
</tr>
-->
</tr>
</table>
</td>
</tr>
</table>
<p>
</center>

View file

@ -12,7 +12,11 @@
<TMPL_IF NAME="searchdesc">
You searched on <b><TMPL_VAR NAME="searchdesc"></b>
<TMPL_ELSE>
You did not specify any seach criteria<br>
<TMPL_IF name="searchnew">
<TMPL_VAR name=itemtype> acquired in the last <i><TMPL_VAR name="duration"></i> days<br/>
<TMPL_ELSE>
You did not specify any seach criteria<br>
</TMPL_IF>
</TMPL_IF>
<TMPL_VAR NAME="numrecords"> results found

View file

@ -1,7 +1,7 @@
<TMPL_INCLUDE NAME="opac-top.inc">
<TMPL_IF NAME="nopermission">
<!-- This is what is displayed if user doesnt have permission -->
<h2>INTERDIT<h2>
<h2>Désolé, je pense que vous n'avez pas les permissions suffisantes.<h2>
</TMPL_IF>
<TMPL_IF NAME="timed_out">
@ -34,8 +34,8 @@
<table border="0" bgcolor="#dddddd" cellpadding="10" cellspacing="0">
<tr><th colspan="2" background="/images/background-mem.gif"><font size="+2">Identifiant Koha</font></th></tr>
<tr><td>N° de carte</td><td><input name="userid"></td></tr>
<tr><td>Mot de passe :</td><td><input type="password" name="password"></td></tr>
<tr><td>N° de carte:</td><td><input name="userid"></td></tr>
<tr><td>Mot de passe ::</td><td><input type="password" name="password"></td></tr>
<tr><td colspan="2" align="center"><input type="submit" value="Connecter"></td></tr>
</table>
</td><td align="center" valign="top">

View file

@ -1,7 +1,7 @@
<TMPL_INCLUDE NAME="opac-top.inc">
<TMPL_IF NAME="loggedinusername">
<p align="left">Connecté en tant que : <TMPL_VAR NAME="loggedinuser"> [<a href="/cgi-bin/koha/opac-user.pl">Accueil lecteur</a>][<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Déconnecter</a>]</p>
<p align="left">Connecté en tant que: <TMPL_VAR NAME="loggedinuser"> [<a href="/cgi-bin/koha/opac-user.pl">Accueil lecteur</a>][<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Déconnecter</a>]</p>
<TMPL_ELSE>
<p align="left"><a href="/cgi-bin/koha/opac-user.pl">S'identifier</a> à Koha</p>
</TMPL_IF>
@ -25,22 +25,22 @@
<tr valign="top">
<td>
<FONT size="2" face="arial,helvetica,sans-serif">
<TMPL_IF name="subtitle"><b>Sous-titre</b></TMPL_IF> <TMPL_VAR NAME="subtitle">
<TMPL_IF name="author"><b>Auteur</b> <a href="/cgi-bin/koha/search.pl?author=<TMPL_VAR NAME="author" ESCAPE=URL>"><TMPL_VAR NAME="author"></a></TMPL_IF><br>
<TMPL_IF name="additional"><b>Autres auteurs</b><TMPL_VAR NAME="additional"><br></TMPL_IF>
<TMPL_IF name="publishercode"><b>Publié par</b></TMPL_IF> <TMPL_VAR NAME="publishercode">
<TMPL_IF name="subtitle"><b>Sous-titre:</b></TMPL_IF> <TMPL_VAR NAME="subtitle">
<TMPL_IF name="author"><b>Auteur:</b> <a href="/cgi-bin/koha/search.pl?author=<TMPL_VAR NAME="author" ESCAPE=URL>"><TMPL_VAR NAME="author"></a></TMPL_IF><br>
<TMPL_IF name="additional"><b>Autres auteurs:</b><TMPL_VAR NAME="additional"><br></TMPL_IF>
<TMPL_IF name="publishercode"><b>Publié par :</b></TMPL_IF> <TMPL_VAR NAME="publishercode">
<TMPL_IF name="publicationyear"><b>dans </b></TMPL_IF><TMPL_VAR NAME="publicationyear">
<TMPL_IF name="pages">, </TMPL_IF><TMPL_VAR name="pages">
<TMPL_IF name="size">, </TMPL_IF><TMPL_VAR name="size"><br>
<TMPL_IF name="collection"><b>Collection:</b></TMPL_IF> <TMPL_VAR NAME="seriestitle"><br>
<TMPL_IF name="subject"><b>Sujet :</b></TMPL_IF> <TMPL_VAR NAME="subject"><br>
<TMPL_IF name="subject"><b>Sujet:</b></TMPL_IF> <TMPL_VAR NAME="subject"><br>
<TMPL_IF name="copyrightdate"><b>Année :</b></TMPL_IF> <TMPL_VAR NAME="copyrightdate"><br>
<TMPL_IF name="notes"><b>Notes</b></TMPL_IF> <TMPL_VAR NAME="notes"><br>
<TMPL_IF name="unititle"><b>Titre unifié</b></TMPL_IF> <TMPL_VAR NAME="unititle"><br>
<TMPL_IF name="serial"><b>Périodique</b><TMPL_VAR NAME="serial"></TMPL_IF><br>
<TMPL_IF name="notes"><b>Notes:</b></TMPL_IF> <TMPL_VAR NAME="notes"><br>
<TMPL_IF name="unititle"><b>Titre unifié:</b></TMPL_IF> <TMPL_VAR NAME="unititle"><br>
<TMPL_IF name="serial"><b>Périodique:</b><TMPL_VAR NAME="serial"></TMPL_IF><br>
<TMPL_IF name="dewey"><b>Dewey:</b></TMPL_IF><TMPL_VAR name="dewey"><br>
<TMPL_IF name="url"><b>URL</b> <a href="<TMPL_VAR name="url">"><TMPL_VAR NAME="url"></a></TMPL_IF><br>
<b>Nombre total d'exemplaires</b> <TMPL_VAR NAME="count">
<TMPL_IF name="url"><b>URL:</b> <a href="<TMPL_VAR name="url">"><TMPL_VAR NAME="url"></a></TMPL_IF><br>
<b>Nombre total d'exemplaires:</b> <TMPL_VAR NAME="count">
</font>
</td>
</tr>
@ -48,7 +48,7 @@
</TMPL_LOOP>
<table border="0" cellspacing="2" cellpadding="2" align="center">
<tr bgcolor="#99cccc">
<td>Type d'ouvrage</td>
<td>Type d'ouvrage :</td>
<td>Classe</td>
<td>Localisation</td>
<td>Date retour</td>

View file

@ -1,11 +1,20 @@
<HTML>
<meta http-equiv="Content-Type" content="text/html; charset=iso8859-1">
<TITLE>Bienvenue dans l'OPAC de Koha </TITLE>
<TITLE>WELCOME TO THE KOHA OPAC </TITLE>
<style type="text/css">
<!--
input{font-size:16px}
a {
font-weight: normal;
text-decoration: none;
cursor: hand;
color:#FFFFFF;
padding:4px;
font-weight: bold;
}
-->
</style>
@ -14,121 +23,85 @@ input{font-size:16px}
</HEAD>
<BODY onload="document.catsearch.keyword.focus()"
BGCOLOR="#339999"
text="black"
link="white"
vlink="white"
alink="#663366"
leftmargin=0
BGCOLOR="#339999"
text="black"
link="white"
vlink="white"
alink="#663366"
leftmargin=0
topmargin=0
marginheight=0
marginwidth=0 >
<center>
<table cellspacing=0 cellpadding=0 border=0 >
<tr valign=top >
<td background="<TMPL_VAR NAME='themelang'>/images/front-background-med.gif"><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif"
width=1 height=440 align=left alt="" hspace=0 vspace=0><table
cellspacing=0 cellpadding=0 border=0 >
<tr valign=top >
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=228 height=88
alt=" " hspace=0 vspace=0></td>
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=57 height=88
alt=" " hspace=0 vspace=0></td>
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=47 height=88
alt=" " hspace=0 vspace=0></td>
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=1 height=88
alt=" " hspace=0 vspace=0></td>
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=1 height=88
alt=" " hspace=0 vspace=0></td>
</tr>
<tr valign=center >
<td background="<TMPL_VAR NAME='themelang'>/images/front-background-med.gif">
<img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=1 height=440 align=left alt="" hspace=0 vspace=0>
<table cellspacing=0 cellpadding=0 border=0>
<tr valign=center >
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=260 height=88 alt=" " hspace=0 vspace=0></td>
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=30 height=88 alt=" " hspace=0 vspace=0></td>
<td background=" "><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=350 height=88 alt=" " hspace=0 vspace=0></td>
</tr>
<tr valign=top >
<td background=" " rowspan=2 align="right" colspan=2><img src="<TMPL_VAR NAME='themelang'>/images/holder.gif"
width=1 height=30
alt=" " hspace=0 vspace=0>
<i><b>Koha<br/>
SIGB sous licence libre<br/><br/></b>
Koha : un don, une contribution<br/> en langue Maori</i>
<td background=" " colspan=3><font size=+2><a href="/cgi-bin/koha/opac-search.pl"><img src="<TMPL_VAR NAME='themelang'>/images/front-arrow.gif" border=0>Chercher dans le catalogue</a></font></td>
</tr>
<tr valign=top >
<td>&nbsp; &nbsp; </td>
<FORM ACTION="/cgi-bin/koha/opac-searchresults.pl" name=catsearch>
<input type=hidden name=type value=opac>
<td background=" " >
<input type=text size="27" name="keyword"><br>
</font>
<b>Saisissez et validez avec Entrée</b><br>
<a href="/cgi-bin/koha/opac-search.pl">
<img src="<TMPL_VAR NAME='themelang'>/images/front-arrow.gif" width=27 height=22
alt="-" hspace=0 vspace=0 border=0 align=middle >Recherche avancée</a><br>
<img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=1 height=8
alt=" " hspace=0 vspace=0>
<p>
<TMPL_IF NAME="loggedinuser">
<p align=left>Connecté en tant que : <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-user.pl>Accueil lecteur</a>][<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Déconnecter</a>]</p>
<TMPL_ELSE>
<p align=left><a href="/cgi-bin/koha/opac-user.pl">S'identifier</a></p>
</TMPL_IF>
<tr valign=top >
<td align="right">
<img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=1 height=30 alt=" " hspace=0 vspace=0>
<i><b>Koha<br/>
SIGB sous licence libre<br/><br/></b>
Koha : un don, une contribution<br/> en langue Maori</i>
</td>
<td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="<TMPL_VAR NAME='themelang'>/images/front-arrow.gif" border=0>
</td>
<td>
<font size=+2>
Chercher dans le catalogue
</font>
<FORM ACTION="/cgi-bin/koha/opac-searchresults.pl" name=catsearch>
<input type=hidden name=type value=opac>
<input type=text size="27" name="keyword"><br>
<b>Saisissez et validez avec Entrée</b><br>
<a href="/cgi-bin/koha/opac-search.pl">
<img src="<TMPL_VAR NAME='themelang'>/images/front-arrow.gif" width=20 alt="-" hspace=0 vspace=0 border=0 align=middle >
Recherche avancée
</a>
</form>
</td>
</tr>
<tr valign=top height="50">
<td>&nbsp;</td>
<td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="<TMPL_VAR NAME='themelang'>/images/front-arrow.gif" border=0>
</td>
<td>
<font size=+2>
Acquisitions récentes
</font><br/>
<form action="/cgi-bin/koha/opac-new.pl" name="new">
<TMPL_VAR name="CGIitemtype"> acquis <br/>
dans les derniers <b><input type="text" name="duration" value="30" size=3></b> jours
<br/>
<input type="submit" value="OK">
</form>
</td>
</tr>
<tr valign=center>
<td>&nbsp;</td>
<td>
<img src="<TMPL_VAR NAME='themelang'>/images/front-arrow.gif" border=0>
</td>
<td>
<TMPL_IF NAME="loggedinuser">
<p align=left>Connecté en tant que: <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-user.pl>Accueil lecteur</a>][<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Déconnecter</a>]</p>
<TMPL_ELSE>
<p align=left><a href="/cgi-bin/koha/opac-user.pl">S'identifier</a></p>
</TMPL_IF>
</td>
</tr>
</table>
</td>
</form>
</tr>
<!--
<tr valign=top ><form action="/cgi-bin/koha/member.pl" method=get >
<td background=" " colspan=3><img src="<TMPL_VAR NAME='themelang'>/images/heading-Connecter.gif" width=279 height=38
alt="Member Login" hspace=0 vspace=0 border=0></td>
</tr>
<tr valign=top >
<td></td>
<form action="/cgi-bin/koha/member.pl" method=get >
<td background=" " >
<font size=3 face="arial narrow,arial,helvetica">Card Number &nbsp;</font></td>
<td background=" " ><input type=text size="12" name="card"></td>
</tr>
<tr valign=top><td></td>
<td></td>
<td></td>
<td background=" " >
<font size=3 face="arial narrow,arial,helvetica">Password</font></td>
<td background=" " ><input type=password size="12" name="password"><br>
<input type=submit value="OK"><br>
<img src="<TMPL_VAR NAME='themelang'>/images/holder.gif" width=1 height=8
alt=" " hspace=0 vspace=0></td>
</font>
</tr>
<tr valign=top >
<td></td>
<td background=" " colspan=4><A href="/cgi-bin/koha/join.html"><img src="<TMPL_VAR NAME='themelang'>/images/heading-member.gif" width=331 height=38
alt="Become a Site web Member" hspace=0 vspace=0 border=0></a>
</td>
<td>
</td>
</tr>
-->
</tr>
</table>
</td>
</tr>
</table>
<p>
</center>

View file

@ -1,7 +1,7 @@
<TMPL_INCLUDE NAME="opac-top.inc">
<center>
<TMPL_IF NAME="loggedinuser">
<p align=left>Connecté en tant que : <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-user.pl>Accueil lecteur</a>][<a href=/cgi-bin/koha/opac-main.pl?logout.x=1>Déconnecter</a>]</p>
<p align=left>Connecté en tant que: <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-user.pl>Accueil lecteur</a>][<a href=/cgi-bin/koha/opac-main.pl?logout.x=1>Déconnecter</a>]</p>
<TMPL_ELSE>
<p align=left><a href=/cgi-bin/koha/opac-user.pl>S'identifier</a> à Koha</p>
</TMPL_IF>
@ -29,26 +29,26 @@ href=/cgi-bin/koha/detail.pl?bib=<TMPL_VAR NAME="biblionumber">&type=intra><TMPL
<TD width=210 >
<INPUT TYPE="image" name="submit" VALUE="Modifier" height=42 WIDTH=93
BORDER=0 src="/images/Modifier-mem.gif">
<INPUT TYPE="image" name="delete" VALUE="delete" height=42 WIDTH=93
BORDER=0 src="/images/delete-mem.gif">
<INPUT TYPE="image" name="Supprimer" VALUE="Supprimer" height=42 WIDTH=93
BORDER=0 src="/images/Supprimer-mem.gif">
<br>
<FONT SIZE=2 face="arial, helvetica">
<b>Numéro notice :</b> <TMPL_VAR NAME="biblionumber"><br>
<b>Type d'ouvrage :</b> <TMPL_VAR NAME="itemtype"><br>
<b>URL</b> <TMPL_VAR NAME="url"><br>
<b>Durée prêt</b> <TMPL_VAR NAME="loanlength"><br>
<b>Coût du prêt</b> <TMPL_VAR NAME="rentalcharge"><br>
<b>Numéro notice ::</b> <TMPL_VAR NAME="biblionumber"><br>
<b>Type d'ouvrage ::</b> <TMPL_VAR NAME="itemtype"><br>
<b>URL:</b> <TMPL_VAR NAME="url"><br>
<b>Durée prêt:</b> <TMPL_VAR NAME="loanlength"><br>
<b>Coût du prêt:</b> <TMPL_VAR NAME="rentalcharge"><br>
<b>Classification:</b> <TMPL_VAR NAME="classification"><TMPL_VAR NAME="dewey"><TMPL_VAR NAME="subclass"><br>
<b>ISBN:</b> <TMPL_VAR NAME="isbn"><br>
<b>Editions</b> <TMPL_VAR NAME="publishercode"> <br>
<b>Place:</b> <TMPL_VAR NAME="place"><br>
<b>Editions:</b> <TMPL_VAR NAME="publishercode"> <br>
<b>Placer:</b> <TMPL_VAR NAME="place"><br>
<b>Date:</b> <TMPL_VAR NAME="publicationyear"><br>
<b>Volume:</b> <TMPL_VAR NAME="volumeddesc"><br>
<b>Pages:</b> <TMPL_VAR NAME="pages"><br>
<b>Illus:</b> <TMPL_VAR NAME="illus"><br>
<b>Taille</b> <TMPL_VAR NAME="size"><br>
<b>Notes</b> <TMPL_VAR NAME="bnotes"><br>
<b>N° ouvrage</b> <TMPL_VAR NAME="count">
<b>Taille:</b> <TMPL_VAR NAME="size"><br>
<b>Notes:</b> <TMPL_VAR NAME="bnotes"><br>
<b>N° ouvrage:</b> <TMPL_VAR NAME="count">
</font>
</TD>
</tr>
@ -70,31 +70,31 @@ BORDER=0 src="/images/delete-mem.gif">
<input type=hidden name=type value=<TMPL_VAR NAME="type">>
<INPUT TYPE="image" name="submit" VALUE="Modifier" height=42 WIDTH=93
BORDER=0 src="/images/Modifier-mem.gif">
<INPUT TYPE="image" name="delete" VALUE="delete" height=42 WIDTH=93
BORDER=0 src="/images/delete-mem.gif">
<INPUT TYPE="image" name="Supprimer" VALUE="Supprimer" height=42 WIDTH=93
BORDER=0 src="/images/Supprimer-mem.gif">
<br>
<FONT SIZE=2 face="arial, helvetica">
<b>Annexe propriétaire</b> <TMPL_VAR NAME="homebranch"><br>
<b>Vu :</b> <TMPL_VAR NAME="datelastseen"><br>
<b>Dernier prêt</b> <TMPL_VAR NAME="timestamp0"><br>
<b>Annexe propriétaire:</b> <TMPL_VAR NAME="homebranch"><br>
<b>Vu:</b> <TMPL_VAR NAME="datelastseen"><br>
<b>Dernier prêt:</b> <TMPL_VAR NAME="timestamp0"><br>
on issue bit <!-- FIXME - What's this, then? -->
<b>Dernier emprunteur 1</b> <TMPL_VAR NAME="card0"><br>
<b>Dernier emprunteur 2</b> <TMPL_VAR NAME="card1"><br>
<b>Annexe</b> <TMPL_VAR NAME="holdingbranch"><br>
<b>Coût de remplacement</b> <TMPL_VAR NAME="replacementprice"><br>
<b>Ouvrage perdu</b> <TMPL_VAR NAME="itemlost"><br>
<b>Payé pour :</b> <TMPL_VAR NAME="paidfor"><br>
<b>Notes</b> <TMPL_VAR NAME="itemnotes"><br>
<b>Renouvellements</b> <TMPL_VAR NAME="renewals"><br>
<b>Dernier emprunteur 1:</b> <TMPL_VAR NAME="card0"><br>
<b>Dernier emprunteur 2:</b> <TMPL_VAR NAME="card1"><br>
<b>Annexe:</b> <TMPL_VAR NAME="holdingbranch"><br>
<b>Coût de remplacement:</b> <TMPL_VAR NAME="replacementprice"><br>
<b>Ouvrage perdu:</b> <TMPL_VAR NAME="itemlost"><br>
<b>Payé pour ::</b> <TMPL_VAR NAME="paidfor"><br>
<b>Notes:</b> <TMPL_VAR NAME="itemnotes"><br>
<b>Renouvellements:</b> <TMPL_VAR NAME="renewals"><br>
<b><a href="/cgi-bin/koha/acqui/acquire.pl?recieve=<TMPL_VAR NAME="ordernumber">&biblio=<TMPL_VAR NAME="biblionumber">&invoice=<TMPL_VAR NAME="booksellerinvoicenumber">&catview=yes">
Accession</a>
Date:<TMPL_VAR NAME="dateaccessioned"><br>
<b>Annul? <TMPL_VAR NAME="wthdrawn"><br>
<b>Annul?: <TMPL_VAR NAME="wthdrawn"><br>
<b><a
href=/cgi-bin/koha/bookcount.pl?&bib=<TMPL_VAR NAME="biblionumber">&bi=<TMPL_VAR NAME="biblioitemnumber">&itm=<TMPL_VAR NAME="itemnumber">>Total
Issues:</a></b> <TMPL_VAR NAME="issues"><br>
<b>Numéro groupe :</b> <TMPL_VAR NAME="biblioitemnumber"> <br>
<b>Notice biblio :</b> <TMPL_VAR NAME="biblionumber"> <br>
<b>Groupe numéro:</b> <TMPL_VAR NAME="biblioitemnumber"> <br>
<b>Notice biblio ::</b> <TMPL_VAR NAME="biblionumber"> <br>

View file

@ -3,7 +3,7 @@
<center>
<TMPL_IF NAME="loggedinusername">
<p align=left>Connecté en tant que : <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-user.pl>Accueil lecteur</a>][<a href=/cgi-bin/koha/opac-main.pl?logout.x=1>Déconnecter</a>]</p>
<p align=left>Connecté en tant que: <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-user.pl>Accueil lecteur</a>][<a href=/cgi-bin/koha/opac-main.pl?logout.x=1>Déconnecter</a>]</p>
<TMPL_ELSE>
<p align=left><a href=/cgi-bin/koha/opac-user.pl>S'identifier</a> à Koha</p>
</TMPL_IF>
@ -12,7 +12,7 @@
<table cellpadding=5 cellspacing=0 border=1 >
<tr bgcolor="#fecc99" >
<td><font face="arial,helvetica" color="red" size=+1><B>
<TMPL_IF NAME="too_much_oweing">Vous ne pouvez réserver parce que vous devez <TMPL_VAR NAME="too_much_oweing">. </TMPL_IF><br/>
<TMPL_IF NAME="too_much_oweing">Sorry, you cannot make reserves because you owe <TMPL_VAR NAME="too_much_oweing">. </TMPL_IF><br/>
<TMPL_IF NAME="too_many_reserves">Impossible de faire plus de <TMPL_VAR NAME="too_many_reserves"> Réservations </TMPL_IF><br/>
<TMPL_IF NAME="already_reserved">Vous avez déjà placé une réservation sur cet exemplaire</TMPL_IF><br/>
<TMPL_IF NAME="no_items_selected">Vous devez sélectionner au moins 1 type d'exemplaire</TMPL_IF><br/>
@ -21,7 +21,7 @@
</TMPL_IF>
<TMPL_IF NAME="select_item_types">
<!-- The first time round you select which bibitems you want -->
<p>Réservation de l'ouvrage : <b><TMPL_VAR NAME="title"> (<TMPL_VAR NAME="author"> <TMPL_VAR name="biblionumber">)</b></p>
<p>Réservation de l'ouvrage :: <b><TMPL_VAR NAME="title"> (<TMPL_VAR NAME="author"> <TMPL_VAR name="biblionumber">)</b></p>
<p> Il y a <b><TMPL_VAR NAME="reservecount"></b> Réservations déjà faites sur cet ouvrage </p>
<p>Sélectionnez les types d'ouvrages souhaités. Le premier disponible sera gardé pour vous.<p>
@ -31,7 +31,7 @@
<TABLE border=1>
<tr bgcolor="#99cccc" background='<TMPL_VAR NAME="themelang">/images/background-opac.gif'>
<th>Reserver</th>
<th>Type d'ouvrage</th>
<th>Type d'ouvrage :</th>
<th>Copies</th>
</tr>
<TMPL_LOOP NAME="TYPES">
@ -47,12 +47,12 @@
</TMPL_LOOP>
</table>
<p>
Sélectionnez l'annexe ou vous prendrez l'ouvrage
Sélectionnez l'annexe ou vous prendrez l'ouvrage:
<TMPL_VAR NAME="CGIbranch"><br>
<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td>Réserver à cette date :</td>
<td>Réserver à cette date ::</td>
<td>
<select name=required-day><option value=0>Jour<option value=1 >1<option value=2 >2<option value=3 >3<option value=4 >4<option value=5 >5<option value=6 >6<option value=7 >7<option value=8 >8<option value=9 >9<option value=10 >10<option value=11 >11<option value=12 >12<option value=13 >13<option value=14 >14<option value=15 >15<option value=16 >16<option value=17 >17<option value=18 >18<option value=19 >19<option value=20 >20<option value=21 >21<option value=22 >22<option value=23 >23<option value=24 >24<option value=25 >25<option value=26 >26<option value=27 >27<option value=28 >28<option value=29 >29<option value=30 >30<option value=31 >31</select>
</td>
@ -64,7 +64,7 @@
</td>
</tr>
<tr>
<td>Annuler réservation à cette date</td>
<td>Annuler réservation à cette date:</td>
<td>
<select name=expires-day><option value=0>Jour<option value=1 >1<option value=2 >2<option value=3 >3<option value=4 >4<option value=5 >5<option value=6 >6<option value=7 >7<option value=8 >8<option value=9 >9<option value=10 >10<option value=11 >11<option value=12 >12<option value=13 >13<option value=14 >14<option value=15 >15<option value=16 >16<option value=17 >17<option value=18 >18<option value=19 >19<option value=20 >20<option value=21 >21<option value=22 >22<option value=23 >23<option value=24 >24<option value=25 >25<option value=26 >26<option value=27 >27<option value=28 >28<option value=29 >29<option value=30 >30<option value=31 >31</select>
</td>
@ -83,7 +83,7 @@
<TMPL_IF NAME="item_types_selected">
<!-- if the bibitems have already been selected -->
<p>Confirmez que vous souhaitez réserver un ouvrage :<p>
<p>Confirmez que vous souhaitez réserver un ouvrage ::<p>
<FORM ACTION="/cgi-bin/koha/opac-reserve.pl" method=post>
<input type="hidden" name="place_reserve" value="1">
@ -92,7 +92,7 @@
<input type="hidden" name="expires_date" value="<TMPL_VAR NAME='expires_date'>">
<TABLE border=1>
<tr>
<th bgcolor="#99cccc" background='<TMPL_VAR NAME="themelang">/images/background-opac.gif'>Type d'ouvrage</th>
<th bgcolor="#99cccc" background='<TMPL_VAR NAME="themelang">/images/background-opac.gif'>Type d'ouvrage :</th>
</tr>
<TMPL_LOOP NAME="TYPES">
<tr>
@ -101,7 +101,7 @@
</tr>
</TMPL_LOOP>
</table>
Qui sera retiré ? <b><TMPL_VAR NAME="branchname"></b>.<br>
Qui sera retiré à <b><TMPL_VAR NAME="branchname"></b>.<br>
<input type="hidden" name="branch" value="<TMPL_VAR NAME='branch'>">
<TMPL_IF NAME="fee">
<br>Il y aura des frais de réservation de <b>$<TMPL_VAR NAME="fee"></b><br>

View file

@ -1,7 +1,7 @@
<TMPL_INCLUDE NAME="opac-top.inc">
<TMPL_IF NAME="loggedinusername">
<p align=left>Connecté en tant que : <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-user.pl>Accueil lecteur</a>][<a href=/cgi-bin/koha/opac-main.pl?logout.x=1>Déconnecter</a>]</p>
<p align=left>Connecté en tant que: <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-user.pl>Accueil lecteur</a>][<a href=/cgi-bin/koha/opac-main.pl?logout.x=1>Déconnecter</a>]</p>
<TMPL_ELSE>
<p align=left><a href=/cgi-bin/koha/opac-user.pl>S'identifier</a> à Koha</p>
</TMPL_IF>
@ -19,7 +19,7 @@
</TR>
<TR VALIGN=TOP>
<TD colspan=3><B>OU</B></TD>
<TD colspan=3><B>OU :</B></TD>
<td></TD></TR>
<TR VALIGN=TOP>
<TD>Sujet</TD>
@ -28,7 +28,7 @@
</TR>
<TR VALIGN=TOP>
<TD colspan=3><B>OU un ou plus de :</B></TD>
<TD colspan=3><B>OU un ou plus de : :</B></TD>
<td></TD></TR>
<TR VALIGN=TOP>

View file

@ -3,7 +3,7 @@
<center>
<TMPL_IF NAME="loggedinusername">
<p align=left>Connecté en tant que : <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-user.pl>Accueil lecteur</a>][<a href=/cgi-bin/koha/opac-main.pl?logout.x=1>Déconnecter</a>]</p>
<p align=left>Connecté en tant que: <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-user.pl>Accueil lecteur</a>][<a href=/cgi-bin/koha/opac-main.pl?logout.x=1>Déconnecter</a>]</p>
<TMPL_ELSE>
<p align=left><a href=/cgi-bin/koha/opac-user.pl>S'identifier</a> à Koha</p>
</TMPL_IF>
@ -12,7 +12,11 @@
<TMPL_IF NAME="searchdesc">
Recherche effectuée sur <b><TMPL_VAR NAME="searchdesc"></b>
<TMPL_ELSE>
Vous n'avez pas spécifié de critère<br>
<TMPL_IF name="searchnew">
<TMPL_VAR name=itemtype> acquis dans les derniers <i><TMPL_VAR name="duration"></i> jours<br/>
<TMPL_ELSE>
Vous n'avez pas spécifié de critère<br>
</TMPL_IF>
</TMPL_IF>
<TMPL_VAR NAME="numrecords"> Réponses trouvées

View file

@ -7,7 +7,7 @@
<td><b>Est-ce correct?</B></td>
</tr>
<tr>
<td><font size=2 face="arial,helvetica">Carte lecteur <TMPL_VAR NAME="cardnumber"> <br/>
<td><font size=2 face="arial,helvetica">Carte lecteur: <TMPL_VAR NAME="cardnumber"> <br/>
<TMPL_VAR NAME="firstname"> <TMPL_VAR NAME="surname"> (<TMPL_VAR NAME="title">) <br>
<TMPL_VAR NAME="streetaddress">, <TMPL_VAR NAME="city"><br>
<TMPL_VAR NAME="phone"> (hm)<br>
@ -67,7 +67,7 @@
<tr bgcolor="#fecc99" >
<td colspan=2>
<font color="red" face="arial,helvetica" size=+2>
<B> Vouas avez des réservations en attente</B>
<B> Vous avez des réservations en attente:</B>
</font>
<P>
</td>
@ -75,7 +75,7 @@
<TMPL_LOOP NAME="WAITING">
<tr>
<td>
<b><TMPL_VAR NAME="btitle"></b></td><td>Prendre à : <b><TMPL_VAR NAME="branch"></b>
<b><TMPL_VAR NAME="btitle"></b></td><td>Prendre à :: <b><TMPL_VAR NAME="branch"></b>
</td>
</tr>
</TMPL_LOOP>

View file

@ -1,7 +1,7 @@
<TMPL_INCLUDE NAME="opac-top.inc">
<TMPL_IF NAME="loggedinusername">
<p align=left>Connecté en tant que : <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-main.pl?logout.x=1>Déconnecter</a>]</p>
<p align=left>Connecté en tant que: <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/opac-main.pl?logout.x=1>Déconnecter</a>]</p>
<TMPL_ELSE>
<p align=left><a href=/cgi-bin/koha/opac-user.pl>S'identifier</a> à Koha</p>
</TMPL_IF>

View file

@ -2,7 +2,7 @@
<TMPL_IF NAME="loggedinuser">
<p align=left>Connecté en tant que : <TMPL_VAR NAME="loggedinuser"> [<a href=./logout.pl>Déconnecter</a>]</p>
<p align=left>Connecté en tant que: <TMPL_VAR NAME="loggedinuser"> [<a href=./logout.pl>Déconnecter</a>]</p>
<TMPL_ELSE>
<p align=left><a href=./userpage.pl>S'identifier</a> à Koha</p>
</TMPL_IF>

View file

@ -7,14 +7,31 @@ use HTML::Template;
use C4::Auth; # get_template_and_user
use C4::Interface::CGI::Output;
my $query = new CGI;
my $input = new CGI;
my $dbh = C4::Context->dbh;
my $query="Select itemtype,description from itemtypes order by description";
my $sth=$dbh->prepare($query);
$sth->execute;
my @itemtype;
my %itemtypes;
while (my ($value,$lib) = $sth->fetchrow_array) {
push @itemtype, $value;
$itemtypes{$value}=$lib;
}
my ($template, $borrowernumber, $cookie)
my $CGIitemtype=CGI::scrolling_list( -name => 'itemtype',
-values => \@itemtype,
-labels => \%itemtypes,
-size => 1,
-multiple => 0 );
$sth->finish;
my ($template, $borrowernumber, $cookie)
= get_template_and_user({template_name => "opac-main.tmpl",
query => $query,
type => "opac",
query => $input,
authnotrequired => 1,
flagsrequired => {borrow => 1},
});
output_html_with_http_headers $query, $cookie, $template->output;
$template->param(CGIitemtype => $CGIitemtype);
output_html_with_http_headers $input, $cookie, $template->output;

79
opac/opac-new.pl Executable file
View file

@ -0,0 +1,79 @@
#!/usr/bin/perl
use strict;
require Exporter;
use CGI;
use C4::Search;
use C4::Auth;
use C4::Interface::CGI::Output;
use HTML::Template;
my $query=new CGI;
my ($template, $borrowernumber, $cookie)
= get_template_and_user({template_name => "opac-searchresults.tmpl",
query => $query,
type => "opac",
authnotrequired => 1,
flagsrequired => {borrow => 1},
});
my $itemtype=$query->param('itemtype');
my $duration =$query->param('duration');
my $number_of_results = 20;
my $startfrom = $query->param('startfrom');
($startfrom) || ($startfrom=0);
my $subjectitems=$query->param('subjectitems');
my (@results) = newsearch($itemtype,$duration,$number_of_results,$startfrom);
my $count= $#results+1;
my $num = 1;
foreach my $res (@results) {
my @items = ItemInfo(undef, $res->{'biblionumber'}, "intra");
my $norequests = 1;
foreach my $itm (@items) {
$norequests = 0 unless $itm->{'notforloan'};
}
$res->{'norequests'} = $norequests;
# set up the even odd elements....
$res->{'even'} = 1 if $num % 2 == 0;
$res->{'odd'} = 1 if $num % 2 == 1;
$num++;
}
my $resultsarray=\@results;
($resultsarray) || (@$resultsarray=());
# sorting out which results to display.
$template->param(startfrom => $startfrom+1);
($startfrom+$num<=$count) ? ($template->param(endat => $startfrom+$num)) : ($template->param(endat => $count));
$template->param(numrecords => $count);
my $nextstartfrom=($startfrom+$num<$count) ? ($startfrom+$num) : (-1);
my $prevstartfrom=($startfrom-$num>=0) ? ($startfrom-$number_of_results) : (-1);
my $displaynext=($nextstartfrom==-1) ? 0 : 1;
my $displayprev=($prevstartfrom==-1) ? 0 : 1;
$template->param(nextstartfrom => $nextstartfrom,
displaynext => $displaynext,
displayprev => $displayprev,
prevstartfrom => $prevstartfrom,
searchnew => 1,
itemtype => ItemType($itemtype),
duration => $duration);
$template->param(SEARCH_RESULTS => $resultsarray);
my $numbers;
@$numbers = ();
if ($count>$number_of_results) {
for (my $i=1; $i<$count/$number_of_results+1; $i++) {
my $highlight=0;
my $themelang = $template->param('themelang');
($startfrom==($i-1)*$number_of_results+1) && ($highlight=1);
push @$numbers, { number => $i, highlight => $highlight , startfrom => ($i-1)*$number_of_results+1 };
}
}
$template->param(numbers => $numbers);
output_html_with_http_headers $query, $cookie, $template->output;