[Koha-cvs] koha C4/Accounts2.pm C4/Acquisition.pm C4/Amazo... [rel_TG]

Tumer Garip tgarip at neu.edu.tr
Fri Mar 9 22:16:54 CET 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_TG
Changes by:	Tumer Garip <tgarip1957>	07/03/09 21:16:45

Removed files:
	C4             : Accounts2.pm Acquisition.pm Amazon.pm Auth.pm 
	                 Auth_with_ldap.pm AuthoritiesMarc.pm Biblio.pm 
	                 BookShelves.pm Bookfund.pm Bookseller.pm 
	                 Boolean.pm Breeding.pm Context.pm Date.pm 
	                 Format.pm Input.pm Koha.pm Labels.pm Letters.pm 
	                 Log.pm Members.pm NewsChannels.pm Output.pm 
	                 Print.pm Reserves2.pm Review.pm Search.pm 
	                 Serials.pm Stats.pm Suggestions.pm Z3950.pm 
	C4/Calendar    : Calendar.pm 
	C4/Circulation : Circ2.pm Fines.pm 
	C4/Interface/CGI: Output.pm Template.pm 
	acqui          : acqui-home.pl addorder.pl basket.pl bookfund.pl 
	                 booksellers.pl currency.pl finishreceive.pl 
	                 histsearch.pl lateorders.pl neworderempty.pl 
	                 newordersuggestion.pl parcel.pl select-late.pl 
	                 supplier.pl updatesupplier.pl 
	admin          : admin-home.pl aqbookfund.pl aqbudget.pl 
	                 auth_subfields_structure.pl 
	                 auth_tag_structure.pl authorised_values.pl 
	                 authtypes.pl biblios_framework.pl 
	                 biblios_subfields_structure.pl 
	                 bibliostagstructure.pl branches.pl categorie.pl 
	                 categoryitem.pl checkmarc.pl cities.pl 
	                 currency.pl holdings_subfields_structure.pl 
	                 holdingstagstructure.pl institutions-careers.pl 
	                 issuingrules.pl itemtypecategory.pl 
	                 itemtypes.pl itemtypesubcategory.pl 
	                 koha-electronic.pl koha-news.pl koha_attr.pl 
	                 letter.pl mediatype.pl printers.pl roadtype.pl 
	                 stopwords.pl systempreferences.pl thesaurus.pl 
	                 viewlog.pl z3950servers.pl 
	authorities    : auth_finder.pl auth_linker.pl 
	                 authorities-home.pl authorities.pl 
	                 blinddetail-biblio-search.pl 
	                 blinddetail-linker.pl detail-biblio-search.pl 
	                 detail.pl 
	barcodes       : barcodes.pl barcodesGenerator.pl 
	                 create_labels_conf_table.sql label-home.pl 
	                 label-item-search.pl label-manager.pl 
	                 label-print-opus-pdf.pl label-print-pdf.pl 
	                 label-print.pl pdfViewer.pl printerConfig.pl 
	                 test.textblock.pl 
	bookshelves    : addbookbybiblionumber.pl shelves.pl 
	catalogue      : ISBDdetail.pl MARCdetail.pl catalogue-search.pl 
	                 detail.pl detailprint.pl moredetail.pl 
	cataloguing    : addbiblio.pl addbooks.pl additem.pl 
	                 isbnsearch.pl 
	circ           : branchreserves.pl branchtransfers.pl 
	                 circulation.pl currenttransfers.pl 
	                 renewscript.pl rescirculation.pl reserve.pl 
	                 resreturns.pl returns.pl selectbranchprinter.pl 
	                 waitingreservestransfers.pl 
	koha-curses    : circ.pl 
	koha-tmpl/errors: 400.pl 401.pl 402.pl 403.pl 404.pl 500.pl 
	koha-tmpl      : favicon.ico index.html intranet.html 
	koha-tmpl/intranet-tmpl/default/en: about.tmpl auth.tmpl 
	                                    bookcount.tmpl 
	                                    boraccount.tmpl charges.tmpl 
	koha-tmpl/intranet-tmpl/default/en/acqui: acqui-home.tmpl 
	                                          acquire.tmpl 
	                                          basket.tmpl 
	                                          histsearch.tmpl 
	                                          lateorders.tmpl 
	                                          newbasket2.tmpl 
	                                          newbiblio.tmpl 
	                                          order.tmpl 
	                                          recieve.tmpl 
	                                          recieveorder.tmpl 
	                                          suggestion-select.tmpl 
	                                          supplier.tmpl 
	koha-tmpl/intranet-tmpl/prog/en: about.tmpl auth.tmpl 
	                                 intranet-main.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/acqui: acqui-home.tmpl 
	                                       basket.tmpl 
	                                       booksellers.tmpl 
	                                       finishreceive.tmpl 
	                                       histsearch.tmpl 
	                                       lateorders.tmpl 
	                                       neworderempty.tmpl 
	                                       newordersuggestion.tmpl 
	                                       parcel.tmpl parcels.tmpl 
	                                       supplier.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/admin: admin-home.tmpl 
	                                       aqbookfund.tmpl 
	                                       aqbudget.tmpl 
	                                       auth_subfields_structure.tmpl 
	                                       auth_tag_structure.tmpl 
	                                       authorised_values.tmpl 
	                                       authtypes.tmpl 
	                                       biblios_framework.tmpl 
	                                       biblios_subfields_structure.tmpl 
	                                       bibliostagstructure.tmpl 
	                                       branches.tmpl 
	                                       categorie.tmpl 
	                                       categoryitem.tmpl 
	                                       charges.tmpl 
	                                       checkmarc.tmpl 
	                                       cities.tmpl currency.tmpl 
	                                       holdings_subfields_structure.tmpl 
	                                       holdingstagstructure.tmpl 
	                                       institutions-careers.tmpl 
	                                       issuingrules.tmpl 
	                                       itemtypes.tmpl 
	                                       koha-electronic.tmpl 
	                                       koha_attr.tmpl 
	                                       printers.tmpl 
	                                       roadtype.tmpl 
	                                       stopwords.tmpl 
	                                       systempreferences.tmpl 
	                                       thesaurus.tmpl 
	                                       viewlog.tmpl 
	                                       z3950servers.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/authorities: auth_finder.tmpl 
	                                             auth_linker.tmpl 
	                                             authorities-home.tmpl 
	                                             authorities.tmpl 
	                                             blinddetail-biblio-search.tmpl 
	                                             blinddetail-linker.tmpl 
	                                             detail.tmpl 
	                                             linkresultlist-auth.tmpl 
	                                             searchresultlist-auth.tmpl 
	                                             searchresultlist.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/barcodes: barcodes.tmpl 
	                                          printerConfig.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/bookshelves: 
	                                             addbookbybiblionumber.tmpl 
	                                             shelves.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/catalogue: ISBDdetail.tmpl 
	                                           MARCdetail.tmpl 
	                                           catalogue_search.tmpl 
	                                           catalogue_searchresults.tmpl 
	                                           detail.tmpl 
	                                           detailprint.tmpl 
	                                           moredetail.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/cataloguing: addbiblio.tmpl 
	                                             addbooks.tmpl 
	                                             additem.tmpl 
	                                             isbnsearch.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/circ: branchreserves.tmpl 
	                                      branchtransfers.tmpl 
	                                      circulation.tmpl 
	                                      currenttransfers.tmpl 
	                                      returns.tmpl 
	                                      selectbranchprinter.tmpl 
	                                      waitingreservestransfers.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/help/acqui: newbiblio.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/help/admin: aqbookfund.tmpl 
	                                            auth_subfields_structure.tmpl 
	                                            authorised_values.tmpl 
	                                            authtypes.tmpl 
	                                            biblios_framework.tmpl 
	                                            branches.tmpl 
	                                            categorie.tmpl 
	                                            checkmarc.tmpl 
	                                            currency.tmpl 
	                                            holdings_subfields_structure.tmpl 
	                                            holdingstagstructure.tmpl 
	                                            issuingrules.tmpl 
	                                            itemtypes.tmpl 
	                                            koha2marclinks.tmpl 
	                                            marc_subfields_structure.tmpl 
	                                            marctagstructure.tmpl 
	                                            printers.tmpl 
	                                            stopwords.tmpl 
	                                            systempreferences.tmpl 
	                                            z3950servers.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/help/authorities: 
	                                                  authorities.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/help: bull-home.tmpl nohelp.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/help/bull: bull-home.tmpl 
	                                           statecollection.tmpl 
	                                           subscription-add.tmpl 
	                                           subscription-detail.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/help/circ: circulation.tmpl 
	                                           returns.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/help/export: marc.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/help/import: breeding.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/help/members: memberentry.tmpl 
	                                              members-home.tmpl 
	                                              moremember.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/help/search.marc: search.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/images: info.gif regularDay.jpg 
	                                        regularHoliday.jpg 
	                                        repeatable.jpg 
	                                        signClose.gif 
	koha-tmpl/intranet-tmpl/prog/en/includes: alt_menu-serials.inc 
	                                          doc-head-close-calendar.inc 
	                                          doc-head-close.inc 
	                                          doc-head-open.inc 
	                                          favicon.ico 
	                                          holidays-bottom.inc 
	                                          holidays-top.inc 
	                                          intranet-bottom.inc 
	                                          intranet-facets.inc 
	                                          intranet.css 
	                                          menu-acqui.inc 
	                                          menu-admin.inc 
	                                          menu-authorities.inc 
	                                          menu-catalogue.inc 
	                                          menu-circ.inc 
	                                          menu-members.inc 
	                                          menu-serials.inc 
	                                          menu-tools.inc 
	                                          menus.inc 
	                                          popup-bottom.inc 
	                                          popup-top.inc 
	koha-tmpl/intranet-tmpl/prog/en/includes/calendar: cal.gif 
	                                                   calendar-en.js 
	                                                   calendar-setup.js 
	                                                   calendar-system.css 
	                                                   calendar.js 
	koha-tmpl/intranet-tmpl/prog/en/includes/countryCodes: 
	                                                       countryCodes.dat 
	koha-tmpl/intranet-tmpl/prog/en/includes/javascript: members.js 
	koha-tmpl/intranet-tmpl/prog/en/includes/labelConfig: 
	                                                      itemsLabelConfig.conf 
	koha-tmpl/intranet-tmpl/prog/en/includes_npl: 
	                                              alt_menu-serials.inc 
	                                              doc-head-barcodes.inc 
	                                              doc-head-close-calendar.inc 
	                                              doc-head-close.inc 
	                                              doc-head-open.inc 
	                                              favicon.ico 
	                                              holidays-bottom.inc 
	                                              holidays-top.inc 
	                                              intranet-bottom.inc 
	                                              intranet.css 
	                                              menu-acqui.inc 
	                                              menu-admin.inc 
	                                              menu-authorities.inc 
	                                              menu-catalogue.inc 
	                                              menu-circ.inc 
	                                              menu-members.inc 
	                                              menu-serials.inc 
	                                              menu-tools.inc 
	                                              menus.inc 
	                                              popup-bottom.inc 
	                                              popup-top.inc 
	                                              serials-bottom.inc 
	                                              serials-top.inc 
	koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar: cal.gif 
	                                                       calendar-en.js 
	                                                       calendar-setup.js 
	                                                       calendar-system.css 
	                                                       calendar.js 
	koha-tmpl/intranet-tmpl/prog/en/includes_npl/countryCodes: 
	                                                           countryCodes.dat 
	koha-tmpl/intranet-tmpl/prog/en/includes_npl/javascript: 
	                                                         members.js 
	koha-tmpl/intranet-tmpl/prog/en/includes_npl/labelConfig: 
	                                                          itemsLabelConfig.conf 
	koha-tmpl/intranet-tmpl/prog/en/members: boraccount.tmpl 
	                                         borrowers_details.tmpl 
	                                         deletemem.tmpl 
	                                         guarantor_search.tmpl 
	                                         mancredit.tmpl 
	                                         maninvoice.tmpl 
	                                         member-flags.tmpl 
	                                         member-password.tmpl 
	                                         member-quicksearch-results.tmpl 
	                                         member-quicksearch.tmpl 
	                                         member.tmpl 
	                                         memberentryA.tmpl 
	                                         memberentryC.tmpl 
	                                         memberentryI.tmpl 
	                                         memberentryP.tmpl 
	                                         members-home.tmpl 
	                                         moremember-print.tmpl 
	                                         moremember-receipt.tmpl 
	                                         moremember.tmpl 
	                                         pay.tmpl 
	                                         readingrec.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/reports: acquisitions_stats.tmpl 
	                                         bor_issues_top.tmpl 
	                                         borrowers_out.tmpl 
	                                         borrowers_stats.tmpl 
	                                         cat_issues_top.tmpl 
	                                         catalogue_out.tmpl 
	                                         catalogue_stats.tmpl 
	                                         inventory.tmpl 
	                                         issues_avg_stats.tmpl 
	                                         issues_by_borrower_category.tmpl 
	                                         issues_stats.tmpl 
	                                         itemtypes.tmpl 
	                                         reports-home.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/reserve: request.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/reviews: reviewswaiting.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/serials: 
	                                         acqui-search-result.tmpl 
	                                         acqui-search.tmpl 
	                                         claims.tmpl 
	                                         distributedto.tmpl 
	                                         lateissues.tmpl 
	                                         member-search.tmpl 
	                                         printlist.tmpl 
	                                         receipt-search-result.tmpl 
	                                         result.tmpl 
	                                         routing-preview-slip.tmpl 
	                                         routing-preview.tmpl 
	                                         routing.tmpl 
	                                         serial-issues-full.tmpl 
	                                         serial-issues.tmpl 
	                                         serials-home.tmpl 
	                                         serials-receive.tmpl 
	                                         subscription-add.tmpl 
	                                         subscription-bib-search.tmpl 
	                                         subscription-detail.tmpl 
	                                         subscription-renew.tmpl 
	                                         viewalerts.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/suggestion: acceptorreject.tmpl 
	                                            mail_suggestion_ACCEPTED.tmpl 
	                                            mail_suggestion_AVAILABLE.tmpl 
	                                            mail_suggestion_ORDERED.tmpl 
	                                            mail_suggestion_REJECTED.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/tools: barcodes.tmpl export.tmpl 
	                                       holidays.tmpl import.tmpl 
	                                       koha-news.tmpl 
	                                       letter.tmpl 
	                                       overduerules.tmpl 
	                                       printerConfig.tmpl 
	                                       tools-home.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/value_builder: 
	                                               marc21_008_holdings.tmpl 
	                                               marc21_field_006.tmpl 
	                                               marc21_field_007.tmpl 
	                                               marc21_field_008.tmpl 
	                                               marc21_leader.tmpl 
	                                               marc21_leader_authorities.tmpl 
	                                               marc21_leader_holdings.tmpl 
	koha-tmpl/intranet-tmpl/prog/en/z3950: searchresult.tmpl 
	koha-tmpl/opac-tmpl/css: bg2.png bg2b.png 
	koha-tmpl/opac-tmpl/css/en/images: background-opac.gif bar.gif 
	                                   filefind.png front-arrow.gif 
	                                   front-background-med.gif 
	                                   front-background-small.gif 
	koha-tmpl/opac-tmpl/css/en/includes: basket.js 
	                                     opac-basket-bottom.inc 
	                                     opac-basket-menu.inc 
	                                     opac-basket-top.inc 
	                                     opac-bottom.inc 
	                                     opac-top.inc opac.css 
	                                     popup-bottom.inc 
	                                     popup-top.inc 
	koha-tmpl/opac-tmpl/css/en: kohaerror.tmpl opac-ISBDdetail.tmpl 
	                            opac-MARCdetail.tmpl 
	                            opac-account.tmpl 
	                            opac-addbookbybiblionumber.tmpl 
	                            opac-alert-subscribe.tmpl 
	                            opac-auth.tmpl opac-basket.tmpl 
	                            opac-detail.tmpl 
	                            opac-detailprint.tmpl 
	                            opac-dictionary.tmpl 
	                            opac-full-serial-issues.tmpl 
	                            opac-main.tmpl opac-moredetail.tmpl 
	                            opac-passwd.tmpl 
	                            opac-readingrecord.tmpl 
	                            opac-reserve.tmpl opac-search.tmpl 
	                            opac-searchresults.tmpl 
	                            opac-sendbasket.tmpl 
	                            opac-sendbasketform.tmpl 
	                            opac-serial-issues.tmpl 
	                            opac-shelves.tmpl 
	                            opac-suggestions.tmpl opac-user.tmpl 
	                            opac-userupdate.tmpl subject.tmpl 
	koha-tmpl/opac-tmpl/css/fr/images: front-arrow.gif 
	                                   front-background-med.gif 
	                                   front-background-small.gif 
	koha-tmpl/opac-tmpl/css/fr/includes: basket.js marc-editor.css 
	                                     opac-basket-bottom.inc 
	                                     opac-basket-menu.inc 
	                                     opac-basket-top.inc 
	                                     opac-bottom.inc 
	                                     opac-top.inc opac.css 
	koha-tmpl/opac-tmpl/css/fr: kohaerror.tmpl opac-ISBDdetail.tmpl 
	                            opac-MARCdetail.tmpl 
	                            opac-account.tmpl opac-auth.tmpl 
	                            opac-basket.tmpl opac-detail.tmpl 
	                            opac-detailprint.tmpl opac-main.tmpl 
	                            opac-moredetail.tmpl 
	                            opac-reserve.tmpl opac-search.tmpl 
	                            opac-searchresults.tmpl 
	                            opac-sendbasket.tmpl 
	                            opac-sendbasketform.tmpl 
	                            opac-serial-issues.tmpl 
	                            opac-shelves.tmpl 
	                            opac-suggestions.tmpl opac-user.tmpl 
	                            opac-userupdate.tmpl subject.tmpl 
	koha-tmpl/opac-tmpl/css/itemtypeimg: AF.gif AV.gif AVA.gif 
	                                     AVJ.gif AVJNF.gif AVNF.gif 
	                                     Audiobook.gif Biography.gif 
	                                     `Book on CD.gif' 
	                                     `Book on Tape.gif' 
	                                     `CD-ROM software.gif' 
	                                     CDM.gif DVD.gif EASY.gif 
	                                     EDLS.gif 
	                                     `Ed. Curriculum.gif' 
	                                     FLAG.gif 
	                                     `Faculty Course Materials.gif' 
	                                     `Fiction, large print.gif' 
	                                     Fiction.gif JB.gif JF.gif 
	                                     JNF.gif JREF.gif 
	                                     `Juvenile audiobook.gif' 
	                                     `Juvenile biography.gif' 
	                                     `Juvenile book-tape kit.gif' 
	                                     `Juvenile fiction.gif' 
	                                     `Juvenile non-fiction.gif' 
	                                     `Juvenile picture books.gif' 
	                                     `Juvenile reference.gif' 
	                                     KIT.gif LP.gif LPNF.gif 
	                                     `Local history.gif' MAG.gif 
	                                     MFLM.gif MZ.gif 
	                                     Magazine.gif Microfiche.gif 
	                                     Microfilm.gif 
	                                     `Music CD.gif' Mystery.gif 
	                                     `Non-fiction, large print.gif' 
	                                     Non-fiction.gif PB.gif 
	                                     PF.gif Pamphlet.gif 
	                                     `Paperback romance.gif' 
	                                     `Rare Book.gif' 
	                                     Reference.gif SIRS.gif 
	                                     SS.gif 
	                                     `Science fiction & Fantasy.gif' 
	                                     `Video disc.gif' 
	                                     `Videocassette, juvenile non-fiction.gif' 
	                                     `Videocassette, juvenile.gif' 
	                                     `Videocassette, non-fiction.gif' 
	                                     Videocassette.gif 
	                                     `Vinyl Sound Recordings.gif' 
	                                     WEB.gif Western.gif YA.gif 
	                                     YAC.gif 
	                                     `Young Adult fiction.gif' 
	                                     `Young Adult non fiction.gif' 
	koha-tmpl/opac-tmpl/default/all/images: background-mem.gif 
	                                        background-opac.gif 
	                                        front-arrow.gif 
	                                        front-background-med.gif 
	                                        holder.gif 
	                                        inside-koha-bottom.gif 
	koha-tmpl/opac-tmpl/default/all/images/numbers: 1-highlight.gif 
	                                                1.gif 
	                                                10-highlight.gif 
	                                                10.gif 
	                                                11-highlight.gif 
	                                                11.gif 
	                                                12-highlight.gif 
	                                                12.gif 
	                                                13-highlight.gif 
	                                                13.gif 
	                                                14-highlight.gif 
	                                                14.gif 
	                                                15-highlight.gif 
	                                                15.gif 
	                                                16-highlight.gif 
	                                                16.gif 
	                                                17-highlight.gif 
	                                                17.gif 
	                                                18-highlight.gif 
	                                                18.gif 
	                                                19-highlight.gif 
	                                                19.gif 
	                                                2-highlight.gif 
	                                                2.gif 
	                                                20-highlight.gif 
	                                                20.gif 
	                                                21-highlight.gif 
	                                                21.gif 
	                                                22-highlight.gif 
	                                                22.gif 
	                                                23-highlight.gif 
	                                                23.gif 
	                                                24-highlight.gif 
	                                                24.gif 
	                                                25-highlight.gif 
	                                                25.gif 
	                                                26-highlight.gif 
	                                                26.gif 
	                                                27-highlight.gif 
	                                                27.gif 
	                                                28-highlight.gif 

Log message:
	Cleaning up for a fresh commit with new structure and ONLY used files

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Accounts2.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.34&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Acquisition.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.48&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Amazon.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Auth.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.57&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Auth_with_ldap.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/AuthoritiesMarc.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.37&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Biblio.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.187&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/BookShelves.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.19&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Bookfund.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Bookseller.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Boolean.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Breeding.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.13&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Context.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.50&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Date.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.24&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Format.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.8&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Input.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.21&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Koha.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.47&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Labels.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Letters.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Log.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Members.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.39&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/NewsChannels.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Output.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.59&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Print.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.18&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Reserves2.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.49&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Review.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.126&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Serials.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.11&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Stats.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.28&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Suggestions.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.16&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Z3950.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.13&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Calendar/Calendar.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Circ2.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.123&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Fines.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.20&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Interface/CGI/Output.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Interface/CGI/Template.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/acqui-home.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.16&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/addorder.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.35&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/basket.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.35&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/bookfund.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/booksellers.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/currency.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/finishreceive.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.21&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/histsearch.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.9&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/lateorders.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/neworderempty.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/newordersuggestion.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/parcel.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/select-late.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/supplier.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.14&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/updatesupplier.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.10&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/admin-home.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/aqbookfund.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.32&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/aqbudget.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.24&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/auth_subfields_structure.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.9&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/auth_tag_structure.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/authorised_values.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.18&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/authtypes.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/biblios_framework.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/biblios_subfields_structure.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/bibliostagstructure.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/branches.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.37&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/categorie.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.24&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/categoryitem.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.12&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/checkmarc.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.10&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/cities.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/currency.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.14&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/holdings_subfields_structure.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/holdingstagstructure.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/institutions-careers.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/issuingrules.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.11&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/itemtypecategory.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/itemtypes.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.25&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/itemtypesubcategory.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/koha-electronic.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/koha-news.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/koha_attr.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/letter.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/mediatype.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/printers.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.14&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/roadtype.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/stopwords.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.16&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/systempreferences.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.36&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/thesaurus.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.14&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/viewlog.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/admin/z3950servers.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.14&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/auth_finder.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.12&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/auth_linker.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/authorities-home.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.15&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/authorities.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.18&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/blinddetail-biblio-search.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.8&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/blinddetail-linker.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/detail-biblio-search.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/detail.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/barcodes.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/barcodesGenerator.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/create_labels_conf_table.sql?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-home.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-item-search.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-manager.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-print-opus-pdf.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-print-pdf.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.14&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-print.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/pdfViewer.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/printerConfig.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/test.textblock.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/bookshelves/addbookbybiblionumber.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/bookshelves/shelves.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.10&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/ISBDdetail.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/MARCdetail.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.8&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/catalogue-search.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/detail.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.10&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/detailprint.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/moredetail.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.9&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/addbiblio.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.19&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/addbooks.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/additem.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.12&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/isbnsearch.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/circ/branchreserves.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/circ/branchtransfers.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.26&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/circ/circulation.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.99&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/circ/currenttransfers.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/circ/renewscript.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/circ/rescirculation.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/circ/reserve.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/circ/resreturns.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/circ/returns.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.45&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/circ/selectbranchprinter.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.16&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/circ/waitingreservestransfers.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-curses/circ.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/errors/400.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/errors/401.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/errors/402.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/errors/403.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/errors/404.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/errors/500.pl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/favicon.ico?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/index.html?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet.html?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/about.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.14&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/auth.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.8&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/bookcount.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/boraccount.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.11&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/charges.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/acqui-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.15&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/acquire.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.15&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.25&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/histsearch.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/lateorders.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/newbasket2.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.15&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/newbiblio.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.22&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/order.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.22&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.14&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieveorder.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.10&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/suggestion-select.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.13&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/about.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/auth.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/intranet-main.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.9&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/acqui-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/basket.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.9&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/booksellers.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/finishreceive.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/histsearch.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/lateorders.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/neworderempty.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/newordersuggestion.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/parcel.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/parcels.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/supplier.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/admin-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/aqbookfund.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/aqbudget.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/auth_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/auth_tag_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/authorised_values.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/authtypes.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/biblios_framework.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/biblios_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/bibliostagstructure.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/branches.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/categorie.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/categoryitem.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/charges.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/checkmarc.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/cities.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/currency.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/holdings_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/holdingstagstructure.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/institutions-careers.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/issuingrules.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/itemtypes.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/koha-electronic.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/koha_attr.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/printers.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/roadtype.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/stopwords.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/systempreferences.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/thesaurus.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/viewlog.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/admin/z3950servers.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/authorities/auth_finder.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/authorities/auth_linker.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/authorities/authorities-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/authorities/authorities.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/authorities/blinddetail-biblio-search.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/authorities/blinddetail-linker.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/authorities/detail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/authorities/linkresultlist-auth.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/authorities/searchresultlist-auth.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/authorities/searchresultlist.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/barcodes/barcodes.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/barcodes/printerConfig.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/bookshelves/addbookbybiblionumber.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/ISBDdetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/MARCdetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/catalogue_search.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/catalogue_searchresults.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/detail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/detailprint.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/moredetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/cataloguing/addbiblio.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/cataloguing/addbooks.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/cataloguing/additem.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/cataloguing/isbnsearch.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/circ/branchreserves.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/circ/branchtransfers.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/circ/circulation.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.8&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/circ/currenttransfers.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/circ/returns.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/circ/selectbranchprinter.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/circ/waitingreservestransfers.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/acqui/newbiblio.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/aqbookfund.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/auth_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/authorised_values.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/authtypes.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/biblios_framework.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/branches.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/categorie.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/checkmarc.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/currency.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/holdings_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/holdingstagstructure.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/issuingrules.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/itemtypes.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/koha2marclinks.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/marc_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/marctagstructure.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/printers.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/stopwords.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/systempreferences.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/admin/z3950servers.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/authorities/authorities.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/bull-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/nohelp.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/bull/bull-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/bull/statecollection.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/bull/subscription-add.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/bull/subscription-detail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/circ/circulation.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/circ/returns.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/export/marc.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/import/breeding.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/members/memberentry.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/members/members-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/members/moremember.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/help/search.marc/search.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/images/info.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/images/regularDay.jpg?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/images/regularHoliday.jpg?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/images/repeatable.jpg?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/images/signClose.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/alt_menu-serials.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close-calendar.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/favicon.ico?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/holidays-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/holidays-top.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-facets.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/intranet.css?cvsroot=koha&only_with_tag=rel_TG&r1=1.8&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/menu-acqui.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/menu-admin.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/menu-authorities.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/menu-catalogue.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/menu-circ.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/menu-members.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/menu-serials.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/menu-tools.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/menus.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/popup-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/popup-top.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/calendar/cal.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-en.js?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-setup.js?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-system.css?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar.js?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/countryCodes/countryCodes.dat?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/javascript/members.js?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes/labelConfig/itemsLabelConfig.conf?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/alt_menu-serials.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-barcodes.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-close-calendar.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-close.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-open.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/favicon.ico?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/holidays-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/holidays-top.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/intranet-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/intranet.css?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-acqui.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-admin.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-authorities.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-catalogue.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-circ.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-members.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-serials.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-tools.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/menus.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/popup-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/popup-top.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/serials-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/serials-top.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/cal.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-en.js?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-setup.js?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-system.css?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar.js?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/countryCodes/countryCodes.dat?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/javascript/members.js?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/includes_npl/labelConfig/itemsLabelConfig.conf?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/boraccount.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/borrowers_details.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/deletemem.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/guarantor_search.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/mancredit.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/maninvoice.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/member-flags.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/member-password.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/member-quicksearch-results.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/member-quicksearch.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/member.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.12&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/memberentryC.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.10&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/memberentryI.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/memberentryP.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.8&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/members-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/moremember-print.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/moremember-receipt.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.14&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/pay.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/members/readingrec.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/acquisitions_stats.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/bor_issues_top.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/borrowers_out.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/borrowers_stats.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/cat_issues_top.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/catalogue_out.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/catalogue_stats.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/inventory.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/issues_avg_stats.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/issues_by_borrower_category.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/issues_stats.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/itemtypes.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reports/reports-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reserve/request.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/reviews/reviewswaiting.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/acqui-search-result.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/acqui-search.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/claims.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/distributedto.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/lateissues.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/member-search.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/printlist.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/receipt-search-result.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/result.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/routing-preview-slip.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/routing-preview.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/routing.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/serial-issues-full.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/serial-issues.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/serials-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/serials-receive.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/subscription-add.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/subscription-bib-search.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/subscription-detail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/subscription-renew.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/viewalerts.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/suggestion/acceptorreject.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_ACCEPTED.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_AVAILABLE.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_ORDERED.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_REJECTED.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/tools/barcodes.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/tools/export.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/tools/holidays.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/tools/import.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/tools/koha-news.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/tools/letter.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/tools/overduerules.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/tools/printerConfig.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/tools/tools-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_008_holdings.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_006.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_007.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_008.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader_authorities.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader_holdings.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/z3950/searchresult.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/bg2.png?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/bg2b.png?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/images/background-opac.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/images/bar.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/images/filefind.png?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/images/front-arrow.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/images/front-background-med.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/images/front-background-small.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/includes/basket.js?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/includes/opac-basket-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/includes/opac-basket-menu.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/includes/opac-basket-top.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.8&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/includes/opac-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/includes/opac-top.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.12&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/includes/opac.css?cvsroot=koha&only_with_tag=rel_TG&r1=1.24&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/includes/popup-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/includes/popup-top.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/kohaerror.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-ISBDdetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-MARCdetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.8&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-account.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-addbookbybiblionumber.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-alert-subscribe.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-auth.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-basket.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-detail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.25&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-detailprint.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-dictionary.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-full-serial-issues.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-main.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.21&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-moredetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-passwd.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-readingrecord.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-reserve.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.8&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-search.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.16&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-searchresults.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.28&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-sendbasket.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-sendbasketform.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-serial-issues.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-shelves.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-suggestions.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-user.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.13&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/opac-userupdate.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/en/subject.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/images/front-arrow.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/images/front-background-med.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/images/front-background-small.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/includes/basket.js?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/includes/marc-editor.css?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-menu.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-top.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/includes/opac-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/includes/opac-top.inc?cvsroot=koha&only_with_tag=rel_TG&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/includes/opac.css?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/kohaerror.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-ISBDdetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-MARCdetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-account.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-auth.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-basket.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-detail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-detailprint.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-main.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-moredetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-reserve.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-search.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-searchresults.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-sendbasket.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-sendbasketform.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-serial-issues.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-shelves.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-suggestions.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-user.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/opac-userupdate.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/fr/subject.tmpl?cvsroot=koha&only_with_tag=rel_TG&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/AF.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/AV.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/AVA.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/AVJ.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/AVJNF.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/AVNF.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Audiobook.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Biography.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Book%32on%32CD.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Book%32on%32Tape.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/CD-ROM%32software.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/CDM.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/DVD.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/EASY.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/EDLS.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Ed.%32Curriculum.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/FLAG.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Faculty%32Course%32Materials.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Fiction%44%32large%32print.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Fiction.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/JB.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/JF.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/JNF.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/JREF.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile%32audiobook.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile%32biography.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile%32book-tape%32kit.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile%32fiction.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile%32non-fiction.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile%32picture%32books.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile%32reference.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/KIT.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/LP.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/LPNF.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Local%32history.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/MAG.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/MFLM.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/MZ.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Magazine.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Microfiche.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Microfilm.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Music%32CD.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Mystery.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Non-fiction%44%32large%32print.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Non-fiction.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/PB.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/PF.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Pamphlet.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Paperback%32romance.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Rare%32Book.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Reference.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/SIRS.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/SS.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Science%32fiction%32%38%32Fantasy.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Video%32disc.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette%44%32juvenile%32non-fiction.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette%44%32juvenile.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette%44%32non-fiction.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Vinyl%32Sound%32Recordings.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/WEB.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Western.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/YA.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/YAC.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Young%32Adult%32fiction.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/css/itemtypeimg/Young%32Adult%32non%32fiction.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/background-mem.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/background-opac.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/front-arrow.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/front-background-med.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/holder.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/inside-koha-bottom.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/1-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/1.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/10-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/10.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/11-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/11.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/12-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/12.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/13-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/13.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/14-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/14.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/15-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/15.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/16-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/16.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/17-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/17.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/18-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/18.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/19-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/19.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/2-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/2.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/20-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/20.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/21-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/21.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/22-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/22.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/23-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/23.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/24-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/24.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/25-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/25.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/26-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/26.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/27-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/27.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/default/all/images/numbers/28-highlight.gif?cvsroot=koha&only_with_tag=rel_TG&rev=0

Patches:
Index: C4/Accounts2.pm
===================================================================
RCS file: C4/Accounts2.pm
diff -N C4/Accounts2.pm
--- C4/Accounts2.pm	27 Sep 2006 19:53:52 -0000	1.34
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,593 +0,0 @@
-package C4::Accounts2; #assumes C4/Accounts2
-
-
-# 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;
-require Exporter;
-use C4::Context;
-use C4::Stats;
-use C4::Search;
-use C4::Circulation::Circ2;
-use C4::Members;
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;	# FIXME - Should probably be different from
-			# the version for C4::Accounts
-
-=head1 NAME
-
-C4::Accounts - Functions for dealing with Koha accounts
-
-=head1 SYNOPSIS
-
-  use C4::Accounts2;
-
-=head1 DESCRIPTION
-
-The functions in this module deal with the monetary aspect of Koha,
-including looking up and modifying the amount of money owed by a
-patron.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(&checkaccount	&recordpayment &fixaccounts &makepayment &manualinvoice
-				&getnextacctno &manualcredit
-				
-				&dailyAccountBalance &addDailyAccountOp &getDailyAccountOp);
-
-=item checkaccount
-
-  $owed = &checkaccount($env, $borrowernumber, $dbh, $date);
-
-Looks up the total amount of money owed by a borrower (fines, etc.).
-
-C<$borrowernumber> specifies the borrower to look up.
-
-C<$dbh> is a DBI::db handle for the Koha database.
-
-C<$env> is ignored.
-
-=cut
-#'
-sub checkaccount  {
-  #take borrower number
-  #check accounts and list amounts owing
-	my ($env,$bornumber,$dbh,$date)=@_;
-	my $select="SELECT SUM(amountoutstanding) AS total
-			FROM accountlines
-		WHERE borrowernumber = ?
-			AND amountoutstanding<>0";
-	my @bind = ($bornumber);
-	if ($date ne ''){
-	$select.=" AND date < ?";
-	push(@bind,$date);
-	}
-	#  print $select;
-	my $sth=$dbh->prepare($select);
-	$sth->execute(@bind);
-	my $data=$sth->fetchrow_hashref;
-	my $total = $data->{'total'};
-	$sth->finish;
-	# output(1,2,"borrower owes $total");
-	#if ($total > 0){
-	#  # output(1,2,"borrower owes $total");
-	#  if ($total > 5){
-	#    reconcileaccount($env,$dbh,$bornumber,$total);
-	#  }
-	#}
-	#  pause();
-	return($total);
-}
-
-=item recordpayment
-
-  &recordpayment($env, $borrowernumber, $payment);
-
-Record payment by a patron. C<$borrowernumber> is the patron's
-borrower number. C<$payment> is a floating-point number, giving the
-amount that was paid. C<$env> is a reference-to-hash;
-C<$env-E<gt>{branchcode}> is the code of the branch where payment was
-made.
-
-Amounts owed are paid off oldest first. That is, if the patron has a
-$1 fine from Feb. 1, another $1 fine from Mar. 1, and makes a payment
-of $1.50, then the oldest fine will be paid off in full, and $0.50
-will be credited to the next one.
-
-=cut
-#'
-sub recordpayment{
-  #here we update both the accountoffsets and the account lines
-  my ($env,$bornumber,$data)=@_;
-  my $dbh = C4::Context->dbh;
-  my $newamtos = 0;
-  my $accdata = "";
-  my $branch=$env->{'branchcode'};
-  my $amountleft = $data;
-  # begin transaction
-  my $nextaccntno = getnextacctno($env,$bornumber,$dbh);
-  # get lines with outstanding amounts to offset
-  my $sth = $dbh->prepare("select * from accountlines
-  where (borrowernumber = ?) and (amountoutstanding<>0)
-  order by date");
-  $sth->execute($bornumber);
-  # offset transactions
-  while (($accdata=$sth->fetchrow_hashref) and ($amountleft>0)){
-     if ($accdata->{'amountoutstanding'} < $amountleft) {
-        $newamtos = 0;
-	$amountleft -= $accdata->{'amountoutstanding'};
-     }  else {
-        $newamtos = $accdata->{'amountoutstanding'} - $amountleft;
-	$amountleft = 0;
-     }
-     my $thisacct = $accdata->{accountid};
-     my $usth = $dbh->prepare("update accountlines set amountoutstanding= ?
-     where accountid=?");
-     $usth->execute($newamtos,$thisacct);
-     $usth->finish;
-  }
-  # create new line
-  my $usth = $dbh->prepare("insert into accountlines
-  (borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding)
-  values (?,?,now(),?,'Payment,thanks','Pay',?)");
-  $usth->execute($bornumber,$nextaccntno,0-$data,0-$amountleft);
-  $usth->finish;
-#  UpdateStats($env,$branch,'payment',$data,'','','',$bornumber);
-  $sth->finish;
-}
-
-=item makepayment
-
-  &makepayment($borrowernumber, $acctnumber, $amount, $branchcode);
-
-Records the fact that a patron has paid off the an amount he or
-she owes.
-
-C<$borrowernumber> is the patron's borrower number. C<$acctnumber> is
-the account that was credited. C<$amount> is the amount paid (this is
-only used to record the payment. C<$branchcode> is the code of the branch where payment
-was made.
-
-=cut
-#'
-# FIXME - I'm not at all sure about the above, because I don't
-# understand what the acct* tables in the Koha database are for.
-
-sub makepayment{
-  #here we update  the account lines
-  #updated to check, if they are paying off a lost item, we return the item
-  # from their card, and put a note on the item record
-  my ($bornumber,$accountno,$amount,$user,$type)=@_;
-  my $env;
-my $desc;
-my $pay;
-if ($type eq "Pay"){
- $desc="Payment,received by -". $user;
- $pay="Pay";
-}else{
- $desc="Written-off -by". $user;
- $pay="W";
-}
-  my $dbh = C4::Context->dbh;
-  # begin transaction
-  my $nextaccntno = getnextacctno($env,$bornumber,$dbh);
-  my $newamtos=0;
-  my $sth=$dbh->prepare("Select * from accountlines where  borrowernumber=? and accountno=?");
-  $sth->execute($bornumber,$accountno);
-  my $data=$sth->fetchrow_hashref;
-  $sth->finish;
-
-  $dbh->do(<<EOT);
-	UPDATE	accountlines
-	SET	amountoutstanding = amountoutstanding-$amount
-	WHERE	borrowernumber = $bornumber
-	  AND	accountno = $accountno
-EOT
-
-
-
-  # create new line
-  my $payment=0-$amount;
-if ($data->{'itemnumber'}){
-$desc.=" ".$data->{'itemnumber'};
-
-  $dbh->do(<<EOT);
-	INSERT INTO	accountlines
-			(borrowernumber, accountno, itemnumber,date, amount,
-			 description, accounttype, amountoutstanding,offset)
-	VALUES		($bornumber, $nextaccntno, $data->{'itemnumber'},now(), $payment,
-			'$desc', '$pay', 0,$accountno)
-EOT
-}else{
-  $dbh->do(<<EOT);
-INSERT INTO	accountlines
-			(borrowernumber, accountno, date, amount,
-			 description, accounttype, amountoutstanding,offset)
-	VALUES		($bornumber, $nextaccntno, now(), $payment,
-			'$desc', '$pay', 0,$accountno)
-EOT
-}
-
-  # FIXME - The second argument to &UpdateStats is supposed to be the
-  # branch code.
-#  UpdateStats($env,'MAIN',$pay,$amount,'','','',$bornumber);
-  $sth->finish;
-  #check to see what accounttype
-  if ($data->{'accounttype'} eq 'Rep' || $data->{'accounttype'} eq 'L'){
-    returnlost($bornumber,$data->{'itemnumber'});
-  }
-}
-
-=item getnextacctno
-
-  $nextacct = &getnextacctno($env, $borrowernumber, $dbh);
-
-Returns the next unused account number for the patron with the given
-borrower number.
-
-C<$dbh> is a DBI::db handle to the Koha database.
-
-C<$env> is ignored.
-
-=cut
-#'
-# FIXME - Okay, so what does the above actually _mean_?
-sub getnextacctno {
-  my ($env,$bornumber,$dbh)=@_;
-  my $nextaccntno = 1;
-  my $sth = $dbh->prepare("select * from accountlines
-  where (borrowernumber = ?)
-  order by accountno desc");
-  $sth->execute($bornumber);
-  if (my $accdata=$sth->fetchrow_hashref){
-    $nextaccntno = $accdata->{'accountno'} + 1;
-  }
-  $sth->finish;
-  return($nextaccntno);
-}
-
-=item fixaccounts
-
-  &fixaccounts($borrowernumber, $accountnumber, $amount);
-
-=cut
-#'
-# FIXME - I don't know whether used
-sub fixaccounts {
-  my ($borrowernumber,$accountno,$amount)=@_;
-  my $dbh = C4::Context->dbh;
-  my $sth=$dbh->prepare("Select * from accountlines where borrowernumber=?
-     and accountno=?");
-  $sth->execute($borrowernumber,$accountno);
-  my $data=$sth->fetchrow_hashref;
-	# FIXME - Error-checking
-  my $diff=$amount-$data->{'amount'};
-  my $outstanding=$data->{'amountoutstanding'}+$diff;
-  $sth->finish;
-
-  $dbh->do(<<EOT);
-	UPDATE	accountlines
-	SET	amount = '$amount',
-		amountoutstanding = '$outstanding'
-	WHERE	borrowernumber = $borrowernumber
-	  AND	accountno = $accountno
-EOT
- }
-
-# FIXME - Never used, but not exported, either.
-sub returnlost{
-  my ($borrnum,$itemnum)=@_;
-  my $dbh = C4::Context->dbh;
-  my $borrower=C4::Members::borrdata('',$borrnum); #from C4::Members;
-  my $sth=$dbh->prepare("Update issues set returndate=now() where
-  borrowernumber=? and itemnumber=? and returndate is null");
-  $sth->execute($borrnum,$itemnum);
-  $sth->finish;
-}
-
-=item manualinvoice
-
-  &manualinvoice($borrowernumber, $description, $type,
-                 $amount, $user);
-
-C<$borrowernumber> is the patron's borrower number.
-C<$description> is a description of the transaction.
-C<$type> may be one of C<CS>, C<CB>, C<CW>, C<CF>, C<CL>, C<N>, C<L>,
-or C<REF>.
-
-
-=cut
-#'
-
-sub manualinvoice{
-  my ($bornum,$desc,$type,$amount,$user)=@_;
-  my $dbh = C4::Context->dbh;
-  my $insert;
-  my %env;
-  my $accountno=getnextacctno('',$bornum,$dbh);
-  my $amountleft=$amount;
-
-
-  if ($type eq 'N'){
-    $desc.="New Card";
-  }
-
-  if ($type eq 'L' && $desc eq ''){
-    $desc="Lost Item";
-  }
- if ($type eq 'REF'){
- $desc="Cash refund";
-  }
- $amountleft=refund('',$bornum,$amount);
-    my $sth=$dbh->prepare("INSERT INTO	accountlines
-			(borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding)
-			VALUES (?, ?, now(), ?, ?, ?, ?)");
-    $sth->execute($bornum, $accountno, $amount, $desc, $type, $amountleft);
-  
-}
-
-sub manualcredit{
-  my ($bornum,$accountid,$desc,$type,$amount,$user,$oldaccount)=@_;
-  my $dbh = C4::Context->dbh;
-  my $insert;
-  my $accountno=getnextacctno('',$bornum,$dbh);
-#  my $amountleft=$amount;
-my $amountleft;
-my $noerror;
-  if ($type eq 'CN' || $type eq 'CA'  || $type eq 'CR' 
-  || $type eq 'CF' || $type eq 'CL' || $type eq 'CM'){
-    my $amount2=$amount*-1;	
-   ( $amountleft, $noerror,$oldaccount)=fixcredit($dbh,$bornum,$amount2,$accountid,$type,$user);
-  }
- if ($noerror>0){
-	
-## find the accountline desc
-my $sth2=$dbh->prepare("select description from accountlines where accountid=?");
-$sth2->execute($accountid);
-my $desc2=$sth2->fetchrow;
-$desc.=" Credited for ".$desc2." by ".$user;
-$sth2->finish;
-
-    	 my $sth=$dbh->prepare("INSERT INTO	accountlines
-			(borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding,offset)
-			VALUES (?, ?, now(), ?, ?, ?, ?,?)");
-    	$sth->execute($bornum, $accountno, $amount, $desc, $type, $amountleft,$oldaccount);
-  	
-return ("0");
-} else {
-	return("1");
-}
-}
-# fixcredit
-sub fixcredit{
-  #here we update both the accountoffsets and the account lines
-  my ($dbh,$bornumber,$data,$accountid,$type,$user)=@_;
-  my $newamtos = 0;
-  my $accdata = "";
-  my $amountleft = $data;
- my $env;
-    my $query="Select * from accountlines where accountid=? and amountoutstanding > 0";
- my $sth=$dbh->prepare($query);
-$sth->execute($accountid);
-    $accdata=$sth->fetchrow_hashref;
-    $sth->finish;
-
-if ($accdata){
-  	  if ($accdata->{'amountoutstanding'} < $amountleft) {
-  	      $newamtos = 0;
-		$amountleft -= $accdata->{'amountoutstanding'};
-  	   }  else {
-  	      $newamtos = $accdata->{'amountoutstanding'} - $amountleft;
-	$amountleft = 0;
-  	   }
-          my $thisacct = $accdata->{accountid};
-     my $usth = $dbh->prepare("update accountlines set amountoutstanding= ?
-     where accountid=?");
-     $usth->execute($newamtos,$thisacct);
-     $usth->finish;
-
-  # begin transaction
-  # get lines with outstanding amounts to offset
-  my $sth = $dbh->prepare("select * from accountlines
-  where (borrowernumber = ?) and (amountoutstanding >0)
-  order by date");
-  $sth->execute($bornumber);
-#  print $query;
-  # offset transactions
-  while (($accdata=$sth->fetchrow_hashref) and ($amountleft>0)){
-    	 if ($accdata->{'amountoutstanding'} < $amountleft) {
-      	  $newamtos = 0;
-	  $amountleft -= $accdata->{'amountoutstanding'};
-    	 }  else {
-     	  $newamtos = $accdata->{'amountoutstanding'} - $amountleft;
-	$amountleft = 0;
-    	 }
-     my $thisacct = $accdata->{accountid};
-     my $usth = $dbh->prepare("update accountlines set amountoutstanding= ?
-     where accountid=?");
-     $usth->execute($newamtos,$thisacct);
-     $usth->finish;
-  }##  while account
-  $sth->finish;
-
-  $amountleft*=-1;
-  return($amountleft,1,$accdata->{'accountno'});
-}else{
-return("",0);
-}
-}
-
-
-# 
-sub refund{
-  #here we update both the accountoffsets and the account lines
-  my ($env,$bornumber,$data)=@_;
-  my $dbh = C4::Context->dbh;
-  my $newamtos = 0;
-  my $accdata = "";
-#  my $branch=$env->{'branchcode'};
-  my $amountleft = $data *-1;
-
-  # begin transaction
-  # get lines with outstanding amounts to offset
-  my $sth = $dbh->prepare("select * from accountlines
-  where (borrowernumber = ?) and (amountoutstanding<0)
-  order by date");
-  $sth->execute($bornumber);
-#  print $amountleft;
-  # offset transactions
-  while (($accdata=$sth->fetchrow_hashref) and ($amountleft<0)){
-     if ($accdata->{'amountoutstanding'} > $amountleft) {
-        $newamtos = 0;
-	$amountleft -= $accdata->{'amountoutstanding'};
-     }  else {
-        $newamtos = $accdata->{'amountoutstanding'} - $amountleft;
-	$amountleft = 0;
-     }
-#     print $amountleft;
-     my $thisacct = $accdata->{accountid};
-     my $usth = $dbh->prepare("update accountlines set amountoutstanding= ?
-     where accountid=?");
-     $usth->execute($newamtos,$thisacct);
-     $usth->finish;
-
-  }
-  $sth->finish;
-  return($amountleft*-1);
-}
-
-#Funtion to manage the daily account#
-
-sub dailyAccountBalance {
-	my ($date) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth;
-	
-	if ($date) {
-
-		$sth = $dbh->prepare("SELECT * FROM dailyaccountbalance WHERE balanceDate = ?");
-		$sth->execute($date);
-		my $data = $sth->fetchrow_hashref;
-		if (!$data->{'balanceDate'}) {
-			$data->{'noentry'} = 1;
-		}
-		return ($data);
-
-	} else {
-		
-		$sth = $dbh->prepare("SELECT * FROM dailyaccountbalance WHERE balanceDate = CURRENT_DATE()");
-		$sth->execute();
-	
-		if ($sth->rows) {
-			return ($sth->fetchrow_hashref);	
-		} else  {
-			my %hash;
-		
-			$sth = $dbh->prepare("SELECT currentBalanceInHand FROM dailyaccountbalance ORDER BY balanceDate DESC LIMIT 1");
-			$sth->execute();
-			if ($sth->rows) {
-				($hash{'initialBalanceInHand'}) = $sth->fetchrow_array;
-				$hash{'currentBalanceInHand'} = $hash{'initialBalanceInHand'};
-			} else {
-				$hash{'initialBalanceInHand'} = 0;
-				$hash{'currentBalanceInHand'} = 0;
-			}
-			#gets the current date.
-			my @nowarr = localtime();
-			my $date = (1900+$nowarr[5])."-".($nowarr[4]+1)."-".$nowarr[3]; 
-
-			$hash{'balanceDate'} = $date;
-			$hash{'initialBalanceInHand'} = sprintf  ("%.2f", $hash{'initialBalanceInHand'});
-			$hash{'currentBalanceInHand'} = sprintf  ("%.2f", $hash{'currentBalanceInHand'});
-			return \%hash;
-		}
-
-	}
-}
-
-sub addDailyAccountOp {
-	my ($description, $amount, $type, $invoice) = @_;
-	my $dbh = C4::Context->dbh;
-	unless ($invoice) { $invoice = undef};
-	my $sth = $dbh->prepare("INSERT INTO dailyaccount (date, description, amount, type, invoice) VALUES (CURRENT_DATE(), ?, ?, ?, ?)");
-	$sth->execute($description, $amount, $type, $invoice);
-	my $accountop = $dbh->{'mysql_insertid'};
-	$sth = $dbh->prepare("SELECT * FROM dailyaccountbalance WHERE balanceDate = CURRENT_DATE()");
-	$sth->execute();
-	if (!$sth->rows) {
-		$sth = $dbh->prepare("SELECT currentBalanceInHand FROM dailyaccountbalance ORDER BY balanceDate DESC LIMIT 1");
-		$sth->execute();
-		my ($blc) = $sth->fetchrow_array;
-		unless ($blc) {$blc = 0}
-		$sth = $dbh->prepare("INSERT INTO dailyaccountbalance (balanceDate, initialBalanceInHand, currentBalanceInHand) VALUES (CURRENT_DATE(), ?, ?)");
-		$sth->execute($blc, $blc);
-	}
-	if ($type eq 'D') {
-		$amount = -1 * $amount;
-	} 
-	$sth = $dbh->prepare("UPDATE dailyaccountbalance SET currentBalanceInHand = currentBalanceInHand + ? WHERE balanceDate = CURRENT_DATE()");
-	$sth->execute($amount);
-	return $accountop; 
-}
-
-sub getDailyAccountOp {
-	my ($date) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth;
-	if ($date) {
-		$sth = $dbh->prepare("SELECT * FROM dailyaccount WHERE date = ?");
-		$sth->execute($date);	
-	} else {
-		$sth = $dbh->prepare("SELECT * FROM dailyaccount WHERE date = CURRENT_DATE()");
-		$sth->execute();
-	}
-	my @operations;	
-	my $count = 1;
-	while (my $row = $sth->fetchrow_hashref) {
-		$row->{'num'} = $count++; 
-		$row->{$row->{'type'}} = 1;
-		
-		$row->{'invoice'} =~ /(\w*)\-(\w*)\-(\w*)/; 
-		$row->{'invoiceNumber'} = $1;
-		$row->{'invoiceSupplier'} = $2;
-		$row->{'invoiceType'} = $3;
-			
-		push @operations, $row;
-	}
-	return (scalar(@operations), \@operations);
-}
-
-END { }       # module clean-up code here (global destructor)
-
-1;
-__END__
-
-=back
-
-=head1 SEE ALSO
-
-DBI(3)
-
-=cut

Index: C4/Acquisition.pm
===================================================================
RCS file: C4/Acquisition.pm
diff -N C4/Acquisition.pm
--- C4/Acquisition.pm	13 Dec 2006 20:02:34 -0000	1.48
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,1008 +0,0 @@
-package C4::Acquisition;
-
-# 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
-
-# $Id: Acquisition.pm,v 1.48 2006/12/13 20:02:34 bob_lyon Exp $
-
-use strict;
-require Exporter;
-use C4::Context;
-use C4::Date;
-use C4::Suggestions;
-use C4::Biblio;
-use Time::localtime;
-
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.48 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
-
-# used in receiveorder subroutine
-# to provide library specific handling
-my $library_name = C4::Context->preference("LibraryName");
-
-=head1 NAME
-
-C4::Acquisition - Koha functions for dealing with orders and acquisitions
-
-=head1 SYNOPSIS
-
-use C4::Acquisition;
-
-=head1 DESCRIPTION
-
-The functions in this module deal with acquisitions, managing book
-orders, basket and parcels.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA    = qw(Exporter);
- at EXPORT = qw(
-  &GetBasket &NewBasket &CloseBasket
-  &GetPendingOrders &GetOrder &GetOrders
-  &GetOrderNumber &GetLateOrders &NewOrder &DelOrder
-   &GetHistory
-  &ModOrder &ModReceiveOrder 
-  &GetSingleOrder
-  &bookseller
-);
-
-
-=head2 FUNCTIONS ABOUT BASKETS
-
-=over 2
-
-=cut
-
-#------------------------------------------------------------#
-
-=head3 GetBasket
-
-=over 4
-
-$aqbasket = &GetBasket($basketnumber);
-
-get all basket informations in aqbasket for a given basket
-
-return :
-informations for a given basket returned as a hashref.
-
-=back
-
-=back
-
-=cut
-
-sub GetBasket {
-    my ($basketno) = shift;
-    my $dbh        = C4::Context->dbh;
-    my $query = "
-        SELECT  aqbasket.*,
-                concat(borrowers.firstname,'  ',borrowers.surname) AS authorisedbyname,
-                borrowers.branchcode AS branch
-        FROM    aqbasket
-        LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber
-        WHERE basketno=?
-    ";
-    my $sth=$dbh->prepare($query);
-    $sth->execute($basketno);
-    return ( $sth->fetchrow_hashref );
-}
-
-#------------------------------------------------------------#
-
-=head3 NewBasket
-
-=over 4
-
-$basket = &NewBasket();
-
-Create a new basket in aqbasket table
-
-=back
-
-=cut
-
-# FIXME : this function seems to be unused.
-
-sub NewBasket {
-    my ( $booksellerid, $authorisedby ) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        INSERT INTO aqbasket
-                (creationdate,booksellerid,authorisedby)
-        VALUES  (now(),'$booksellerid','$authorisedby')
-    ";
-    my $sth =
-      $dbh->do($query);
-
-#find & return basketno MYSQL dependant, but $dbh->last_insert_id always returns null :-(
-    my $basket = $dbh->{'mysql_insertid'};
-    return $basket;
-}
-
-#------------------------------------------------------------#
-
-=head3 CloseBasket
-
-=over 4
-
-&CloseBasket($basketno);
-
-close a basket (becomes unmodifiable,except for recieves)
-
-=back
-
-=cut
-
-sub CloseBasket {
-    my ($basketno) = @_;
-    my $dbh        = C4::Context->dbh;
-    my $query = "
-        UPDATE aqbasket
-        SET    closedate=now()
-        WHERE  basketno=?
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute($basketno);
-}
-
-#------------------------------------------------------------#
-
-=back
-
-=head2 FUNCTIONS ABOUT ORDERS
-
-=over 2
-
-=cut
-
-#------------------------------------------------------------#
-
-=head3 GetPendingOrders
-
-=over 4
-
-$orders = &GetPendingOrders($booksellerid);
-
-Finds pending orders from the bookseller with the given ID. Ignores
-completed and cancelled orders.
-
-C<$orders> is a reference-to-array; each element is a
-reference-to-hash with the following fields:
-
-=over 2
-
-=item C<authorizedby>
-
-=item C<entrydate>
-
-=item C<basketno>
-
-These give the value of the corresponding field in the aqorders table
-of the Koha database.
-
-=back
-
-=back
-
-Results are ordered from most to least recent.
-
-=cut
-
-sub GetPendingOrders {
-    my $supplierid = shift;
-    my $dbh = C4::Context->dbh;
-    my $strsth = "SELECT aqorders.*,aqbasket.*,borrowers.firstname,borrowers.surname
-	FROM aqorders 
-	LEFT JOIN aqbasket ON aqbasket.basketno=aqorders.basketno 
-	LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber 
-	WHERE booksellerid=? 
-	AND (quantity > quantityreceived OR quantityreceived is NULL) 
-	AND datecancellationprinted IS NULL
-	AND (to_days(now())-to_days(closedate) < 180 OR closedate IS NULL) ";
-
-    if ( C4::Context->preference("IndependantBranches") ) {
-        my $userenv = C4::Context->userenv;
-        if ( ($userenv) && ( $userenv->{flags} != 1 ) ) {
-            $strsth .=
-                " and (borrowers.branchcode = '"
-              . $userenv->{branch}
-              . "' or borrowers.branchcode ='')";
-        }
-    }
-   $strsth .= " group by aqbasket.basketno order by aqbasket.basketno";
-    my $sth = $dbh->prepare($strsth);
-    $sth->execute($supplierid);
-    my @results;
-    while (my $data = $sth->fetchrow_hashref ) {
-        push @results, $data ;
-  }
-    $sth->finish;
-    return \@results;
-}
-
-#------------------------------------------------------------#
-
-=head3 GetOrders
-
-=over 4
-
- at orders = &GetOrders($basketnumber, $orderby);
-
-Looks up the non-cancelled orders (whether received or not) with the given basket
-number. If C<$booksellerID> is non-empty, only orders from that seller
-are returned.
-
-return :
-C<&basket> returns a two-element array. C<@orders> is an array of
-references-to-hash, whose keys are the fields from the aqorders,
-biblio, and biblioitems tables in the Koha database.
-
-=back
-
-=cut
-
-sub GetOrders {
-    my ( $basketno, $orderby ) = @_;
-    my $dbh   = C4::Context->dbh;
-    my $query ="
-        SELECT  aqorderbreakdown.*,
-                biblio.*,
-                aqorders.*
-        FROM    aqorders,biblio
-        LEFT JOIN aqorderbreakdown ON
-                    aqorders.ordernumber=aqorderbreakdown.ordernumber
-        WHERE   basketno=?
-            AND biblio.biblionumber=aqorders.biblionumber
-            AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00')
-    ";
-
-    $orderby = "biblio.title" unless $orderby;
-    $query .= " ORDER BY $orderby";
-    my $sth = $dbh->prepare($query);
-    $sth->execute($basketno);
-    my @results;
-
-    #  print $query;
-    while ( my $data = $sth->fetchrow_hashref ) {
-        push @results, $data;
-    }
-    $sth->finish;
-    return @results;
-}
-
-sub GetSingleOrder {
-  my ($ordnum)=@_;
-  my $dbh = C4::Context->dbh;
-  my $sth=$dbh->prepare("Select * from biblio,aqorders left join aqorderbreakdown
-  on aqorders.ordernumber=aqorderbreakdown.ordernumber
-  where aqorders.ordernumber=?
-  and biblio.biblionumber=aqorders.biblionumber");
-  $sth->execute($ordnum);
-  my $data=$sth->fetchrow_hashref;
-  $sth->finish;
-  return($data);
-}
-
-#------------------------------------------------------------#
-
-=head3 GetOrderNumber
-
-=over 4
-
-$ordernumber = &GetOrderNumber($biblioitemnumber, $biblionumber);
-
-Looks up the ordernumber with the given biblionumber 
-
-Returns the number of this order.
-
-=item C<$ordernumber> is the order number.
-
-=back
-
-=cut
-sub GetOrderNumber {
-    my ( $biblionumber ) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        SELECT ordernumber
-        FROM   aqorders
-        WHERE  biblionumber=?
-       
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute( $biblionumber );
-
-    return $sth->fetchrow;
-}
-
-#------------------------------------------------------------#
-
-=head3 GetOrder
-
-=over 4
-
-$order = &GetOrder($ordernumber);
-
-Looks up an order by order number.
-
-Returns a reference-to-hash describing the order. The keys of
-C<$order> are fields from the biblio, , aqorders, and
-aqorderbreakdown tables of the Koha database.
-
-=back
-
-=cut
-
-sub GetOrder {
-    my ($ordnum) = @_;
-    my $dbh      = C4::Context->dbh;
-    my $query = "
-        SELECT *
-        FROM   biblio,aqorders
-        LEFT JOIN aqorderbreakdown ON aqorders.ordernumber=aqorderbreakdown.ordernumber
-        WHERE aqorders.ordernumber=?
-        AND   biblio.biblionumber=aqorders.biblionumber
-       
-    ";
-    my $sth= $dbh->prepare($query);
-    $sth->execute($ordnum);
-    my $data = $sth->fetchrow_hashref;
-    $sth->finish;
-    return $data;
-}
-
-#------------------------------------------------------------#
-
-=head3 NewOrder
-
-=over 4
-
-  &NewOrder($basket, $biblionumber, $title, $quantity, $listprice,
-    $booksellerid, $who, $notes, $bookfund, $biblioitemnumber, $rrp,
-    $ecost, $gst, $budget, $unitprice, $subscription,
-    $booksellerinvoicenumber);
-
-Adds a new order to the database. Any argument that isn't described
-below is the new value of the field with the same name in the aqorders
-table of the Koha database.
-
-C<$ordnum> is a "minimum order number." After adding the new entry to
-the aqorders table, C<&neworder> finds the first entry in aqorders
-with order number greater than or equal to C<$ordnum>, and adds an
-entry to the aqorderbreakdown table, with the order number just found,
-and the book fund ID of the newly-added order.
-
-C<$budget> is effectively ignored.
-
-C<$subscription> may be either "yes", or anything else for "no".
-
-=back
-
-=cut
-
-sub NewOrder {
-   my (
-        $basketno,  $biblionumber,       $title,        $quantity,
-        $listprice, $booksellerid, $authorisedby, $notes,
-        $bookfund,    $rrp,          $ecost,
-        $gst,       $budget,       $cost,         $sub,
-        $purchaseorderno,   $sort1,        $sort2,$discount,$branch
-      )
-      = @_;
-
-    my $year  = localtime->year() + 1900;
-    my $month = localtime->mon() + 1;       # months starts at 0, add 1
-
-    if ( !$budget || $budget eq 'now' ) {
-        $budget = "now()";
-    }
-
-    if ( $sub eq 'yes' ) {
-        $sub = 1;
-    }
-    else {
-        $sub = 0;
-    }
-
-    # if $basket empty, it's also a new basket, create it
-    unless ($basketno) {
-        $basketno = NewBasket( $booksellerid, $authorisedby );
-    }
-
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        INSERT INTO aqorders
-           ( biblionumber,title,basketno,quantity,listprice,notes,
-      rrp,ecost,gst,unitprice,subscription,sort1,sort2,purchaseordernumber,discount,budgetdate,entrydate)
-        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,$budget,now() )
-    ";
-    my $sth = $dbh->prepare($query);
-
-    $sth->execute(
-        $biblionumber, $title,      $basketno, $quantity, $listprice,
-        $notes,  $rrp,      $ecost,    $gst,
-        $cost,   $sub,        $sort1,    $sort2,$purchaseorderno,$discount
-    );
-    $sth->finish;
-
-    #get ordnum MYSQL dependant, but $dbh->last_insert_id returns null
-    my $ordnum = $dbh->{'mysql_insertid'};
-    my $query = "
-        INSERT INTO aqorderbreakdown (ordernumber,bookfundid,branchcode)
-        VALUES (?,?,?)
-    ";
-    $sth = $dbh->prepare($query);
-    $sth->execute( $ordnum, $bookfund,$branch );
-    $sth->finish;
-    return ( $basketno, $ordnum );
-}
-
-#------------------------------------------------------------#
-
-=head3 ModOrder
-
-=over 4
-
-&ModOrder($title, $ordernumber, $quantity, $listprice,
-    $biblionumber, $basketno, $supplier, $who, $notes,
-    $bookfundid, $bibitemnum, $rrp, $ecost, $gst, $budget,
-    $unitprice, $booksellerinvoicenumber);
-
-Modifies an existing order. Updates the order with order number
-C<$ordernumber> and biblionumber C<$biblionumber>. All other arguments
-update the fields with the same name in the aqorders table of the Koha
-database.
-
-Entries with order number C<$ordernumber> in the aqorderbreakdown
-table are also updated to the new book fund ID.
-
-=back
-
-=cut
-
-sub ModOrder {
-    my (
-        $title,      $ordnum,   $quantity, $listprice, $biblionumber,
-        $basketno,   $supplier, $who,      $notes,     $bookfund,
-        $rrp,      $ecost,    $gst,       $budget,
-        $cost,       $invoice,  $sort1,    $sort2,$discount,$branch
-      )
-      = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        UPDATE aqorders
-        SET    title=?,
-               quantity=?,listprice=?,basketno=?,
-               rrp=?,ecost=?,unitprice=?,purchaseordernumber=?,gst=?,
-               notes=?,sort1=?, sort2=?,discount=?
-        WHERE  ordernumber=? AND biblionumber=?
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute(
-        $title, $quantity, $listprice, $basketno, $rrp,
-        $ecost, $cost,    $invoice, $gst,   $notes,    $sort1,
-        $sort2, $discount,$ordnum,   $biblionumber
-    );
-    $sth->finish;
-    my $query = "
-        REPLACE aqorderbreakdown
-        SET    ordernumber=?, bookfundid=?, branchcode=?   
-    ";
-    $sth = $dbh->prepare($query);
-
-   $sth->execute( $ordnum,$bookfund, $branch );
-    
-    $sth->finish;
-}
-
-#------------------------------------------------------------#
-
-
-
-
-#------------------------------------------------------------#
-
-=head3 ModReceiveOrder
-
-=over 4
-
-&ModReceiveOrder($biblionumber, $ordernumber, $quantityreceived, $user,
-    $unitprice, $booksellerinvoicenumber, $biblioitemnumber,
-    $freight, $bookfund, $rrp);
-
-Updates an order, to reflect the fact that it was received, at least
-in part. All arguments not mentioned below update the fields with the
-same name in the aqorders table of the Koha database.
-
-Updates the order with bibilionumber C<$biblionumber> and ordernumber
-C<$ordernumber>.
-
-
-=back
-
-=cut
-
-
-sub ModReceiveOrder {
-    my (
-        $biblionumber,    $ordnum,  $quantrec,  $cost,
-        $invoiceno, $freight, $rrp,      $listprice,$input
-      )
-      = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        UPDATE aqorders
-        SET    quantityreceived=quantityreceived+?,datereceived=now(),booksellerinvoicenumber=?,
-               unitprice=?,freight=?,rrp=?,listprice=?
-        WHERE biblionumber=? AND ordernumber=?
-    ";
-    my $sth = $dbh->prepare($query);
-    my $suggestionid = GetSuggestionFromBiblionumber( $dbh, $biblionumber );
-    if ($suggestionid) {
-        ModStatus( $suggestionid, 'AVAILABLE', '', $biblionumber,$input );
-    }
-    $sth->execute( $quantrec, $invoiceno, $cost, $freight, $rrp, $listprice, $biblionumber,
-        $ordnum );
-    $sth->finish;
-
-}
-
-
-#------------------------------------------------------------#
-
-=head3 DelOrder
-
-=over 4
-
-&DelOrder($biblionumber, $ordernumber);
-
-Cancel the order with the given order and biblio numbers. It does not
-delete any entries in the aqorders table, it merely marks them as
-cancelled.
-
-=back
-
-=cut
-
-sub DelOrder {
-    my ( $biblionumber, $ordnum,$user ) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        UPDATE aqorders
-        SET    datecancellationprinted=now(), cancelledby=?
-        WHERE  biblionumber=? AND ordernumber=?
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute( $user,$biblionumber, $ordnum );
-    $sth->finish;
-}
-
-
-=back
-
-=back
-
-=head2 FUNCTIONS ABOUT PARCELS
-
-=over 2
-
-=cut
-
-#------------------------------------------------------------#
-
-=head3 GetParcel
-
-=over 4
-
- at results = &GetParcel($booksellerid, $code, $date);
-
-Looks up all of the received items from the supplier with the given
-bookseller ID at the given date, for the given code (bookseller Invoice number). Ignores cancelled and completed orders.
-
-C<@results> is an array of references-to-hash. The keys of each element are fields from
-the aqorders, biblio tables of the Koha database.
-
-C<@results> is sorted alphabetically by book title.
-
-=back
-
-=cut
-## This routine is not used will be cleaned
-sub GetParcel {
-
-    #gets all orders from a certain supplier, orders them alphabetically
-    my ( $supplierid, $invoice, $datereceived ) = @_;
-    my $dbh     = C4::Context->dbh;
-    my @results = ();
-    $invoice .= '%' if $invoice;  # add % if we search on a given invoice
-    my $strsth ="
-        SELECT  authorisedby,
-                creationdate,
-                aqbasket.basketno,
-                closedate,surname,
-                firstname,
-                biblionumber,
-                aqorders.title,
-                aqorders.ordernumber,
-                aqorders.quantity,
-                aqorders.quantityreceived,
-                aqorders.unitprice,
-                aqorders.listprice,
-                aqorders.rrp,
-                aqorders.ecost
-        FROM aqorders,aqbasket
-        LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber
-        WHERE aqbasket.basketno=aqorders.basketno
-            AND aqbasket.booksellerid=?
-            AND (aqorders.datereceived= \"$datereceived\" OR aqorders.datereceived is NULL)";
- $strsth.= " AND aqorders.purchaseordernumber LIKE  \"$invoice\"" if $invoice ne "%";
-
-    if ( C4::Context->preference("IndependantBranches") ) {
-        my $userenv = C4::Context->userenv;
-        if ( ($userenv) && ( $userenv->{flags} != 1 ) ) {
-            $strsth .=
-                " and (borrowers.branchcode = '"
-              . $userenv->{branch}
-              . "' or borrowers.branchcode ='')";
-        }
-    }
-    $strsth .= " order by aqbasket.basketno";
-    ### parcelinformation : $strsth
-    my $sth = $dbh->prepare($strsth);
-    $sth->execute($supplierid);
-    while ( my $data = $sth->fetchrow_hashref ) {
-        push @results, $data ;
-    }
-    ### countparcelbiblio: $count
-    $sth->finish;
-
-    return @results;
-}
-
-#------------------------------------------------------------#
-
-=head3 GetParcels
-
-=over 4
-
-$results = &GetParcels($bookseller, $order, $code, $datefrom, $dateto);
-get a lists of parcels.
-
-* Input arg :
-
-=item $bookseller
-is the bookseller this function has to get parcels.
-
-=item $order
-To know on what criteria the results list has to be ordered.
-
-=item $code
-is the booksellerinvoicenumber.
-
-=item $datefrom & $dateto
-to know on what date this function has to filter its search.
-
-* return:
-a pointer on a hash list containing parcel informations as such :
-
-=item Creation date
-
-=item Last operation
-
-=item Number of biblio
-
-=item Number of items
-
-=back
-
-=cut
-### This routine is not used will be cleaned
-sub GetParcels {
-    my ($bookseller,$order, $code, $datefrom, $dateto) = @_;
-    my $dbh    = C4::Context->dbh;
-    my $strsth ="
-        SELECT  aqorders.booksellerinvoicenumber,
-                datereceived,
-                count(DISTINCT biblionumber) AS biblio,
-                sum(quantity) AS itemsexpected,
-                sum(quantityreceived) AS itemsreceived
-        FROM   aqorders, aqbasket
-        WHERE  aqbasket.basketno = aqorders.basketno
-             AND aqbasket.booksellerid = $bookseller and datereceived IS NOT NULL
-    ";
-
-    $strsth .= "and aqorders.booksellerinvoicenumber like \"$code%\" " if ($code);
-
-    $strsth .= "and datereceived >=" . $dbh->quote($datefrom) . " " if ($datefrom);
-
-    $strsth .= "and datereceived <=" . $dbh->quote($dateto) . " " if ($dateto);
-
-    $strsth .= "group by aqorders.booksellerinvoicenumber,datereceived ";
-    $strsth .= "order by $order " if ($order);
-    my $sth = $dbh->prepare($strsth);
-
-    $sth->execute;
-    my @results;
-
-    while ( my $data2 = $sth->fetchrow_hashref ) {
-        push @results, $data2;
-    }
-
-    $sth->finish;
-    return @results;
-}
-
-#------------------------------------------------------------#
-
-=head3 GetLateOrders
-
-=over 4
-
- at results = &GetLateOrders;
-
-Searches for bookseller with late orders.
-
-return:
-the table of supplier with late issues. This table is full of hashref.
-
-=back
-
-=cut
-
-sub GetLateOrders {
-## requirse fixing for KOHA 3 API. Currently does not return publisher
-    my $delay      = shift;
-    my $supplierid = shift;
-    my $branch     = shift;
-
-    my $dbh = C4::Context->dbh;
-
-    #BEWARE, order of parenthesis and LEFT JOIN is important for speed
-    my $strsth;
-    my $dbdriver = C4::Context->config("db_scheme") || "mysql";
-
-    #    warn " $dbdriver";
-    if ( $dbdriver eq "mysql" ) {
-        $strsth = "
-            SELECT aqbasket.basketno,
-                DATE(aqbasket.closedate) AS orderdate,
-                aqorders.quantity - IFNULL(aqorders.quantityreceived,0) AS quantity,
-                aqorders.rrp AS unitpricesupplier,
-                aqorders.ecost AS unitpricelib,
-                (aqorders.quantity - IFNULL(aqorders.quantityreceived,0)) * aqorders.rrp AS subtotal,
-                aqbookfund.bookfundname AS budget,
-                borrowers.branchcode AS branch,
-                aqbooksellers.name AS supplier,
-                aqorders.title,
-                biblio.author,
-               
-                DATEDIFF(CURDATE( ),closedate) AS latesince
-            FROM  ((
-                (aqorders LEFT JOIN biblio ON biblio.biblionumber = aqorders.biblionumber)
-            
-            LEFT JOIN aqorderbreakdown ON aqorders.ordernumber = aqorderbreakdown.ordernumber)
-            LEFT JOIN aqbookfund ON aqorderbreakdown.bookfundid = aqbookfund.bookfundid),
-            (aqbasket LEFT JOIN borrowers ON aqbasket.authorisedby = borrowers.borrowernumber)
-            LEFT JOIN aqbooksellers ON aqbasket.booksellerid = aqbooksellers.id
-            WHERE aqorders.basketno = aqbasket.basketno
-            AND (closedate < DATE_SUB(CURDATE( ),INTERVAL $delay DAY))
-            AND ((datereceived = '' OR datereceived is null)
-            OR (aqorders.quantityreceived < aqorders.quantity) )
-        ";
-        $strsth .= " AND aqbasket.booksellerid = $supplierid " if ($supplierid);
-        $strsth .= " AND borrowers.branchcode like \'" . $branch . "\'"
-          if ($branch);
-        $strsth .=
-          " AND borrowers.branchcode like \'"
-          . C4::Context->userenv->{branch} . "\'"
-          if ( C4::Context->preference("IndependantBranches")
-            && C4::Context->userenv
-            && C4::Context->userenv->{flags} != 1 );
-        $strsth .=" HAVING quantity<>0
-                    AND unitpricesupplier<>0
-                    AND unitpricelib<>0
-                    ORDER BY latesince,basketno,borrowers.branchcode, supplier
-        ";
-    }
-    else {
-        $strsth = "
-            SELECT aqbasket.basketno,
-                   DATE(aqbasket.closedate) AS orderdate,
-                    aqorders.quantity, aqorders.rrp AS unitpricesupplier,
-                    aqorders.ecost as unitpricelib,
-                    aqorders.quantity * aqorders.rrp AS subtotal
-                    aqbookfund.bookfundname AS budget,
-                    borrowers.branchcode AS branch,
-                    aqbooksellers.name AS supplier,
-                    biblio.title,
-                    biblio.author,
-                   
-                    (CURDATE -  closedate) AS latesince
-                    FROM(( 
-                        (aqorders LEFT JOIN biblio on biblio.biblionumber = aqorders.biblionumber)
-                       
-                        LEFT JOIN aqorderbreakdown on aqorders.ordernumber = aqorderbreakdown.ordernumber)
-                        LEFT JOIN aqbookfund ON aqorderbreakdown.bookfundid = aqbookfund.bookfundid),
-                        (aqbasket LEFT JOIN borrowers on aqbasket.authorisedby = borrowers.borrowernumber) LEFT JOIN aqbooksellers ON aqbasket.booksellerid = aqbooksellers.id
-                    WHERE aqorders.basketno = aqbasket.basketno
-                    AND (closedate < (CURDATE -(INTERVAL $delay DAY))
-                    AND ((datereceived = '' OR datereceived is null)
-                    OR (aqorders.quantityreceived < aqorders.quantity) ) ";
-        $strsth .= " AND aqbasket.booksellerid = $supplierid " if ($supplierid);
-
-        $strsth .= " AND borrowers.branchcode like \'" . $branch . "\'" if ($branch);
-        $strsth .=" AND borrowers.branchcode like \'". C4::Context->userenv->{branch} . "\'"
-            if (C4::Context->preference("IndependantBranches") && C4::Context->userenv->{flags} != 1 );
-        $strsth .=" ORDER BY latesince,basketno,borrowers.branchcode, supplier";
-    }
-    my $sth = $dbh->prepare($strsth);
-    $sth->execute;
-    my @results;
-    my $hilighted = 1;
-    while ( my $data = $sth->fetchrow_hashref ) {
-        $data->{hilighted} = $hilighted if ( $hilighted > 0 );
-        $data->{orderdate} = format_date( $data->{orderdate} );
-        push @results, $data;
-        $hilighted = -$hilighted;
-    }
-    $sth->finish;
-    return @results;
-}
-
-#------------------------------------------------------------#
-
-=head3 GetHistory
-
-=over 4
-
-(\@order_loop, $total_qty, $total_price, $total_qtyreceived)=&GetHistory( $title, $author, $name, $from_placed_on, $to_placed_on )
-
-this function get the search history.
-
-=back
-
-=cut
-
-sub GetHistory {
-    my ( $title, $author, $name, $from_placed_on, $to_placed_on ) = @_;
-    my @order_loop;
-    my $total_qty         = 0;
-    my $total_qtyreceived = 0;
-    my $total_price       = 0;
-
-# don't run the query if there are no parameters (list would be too long for sure !)
-    if ( $title || $author || $name || $from_placed_on || $to_placed_on ) {
-        my $dbh   = C4::Context->dbh;
-        my $query ="
-            SELECT
-                biblio.title,
-                biblio.author,
-                aqorders.basketno,
-                name,aqbasket.creationdate,
-                aqorders.datereceived,
-                aqorders.quantity,
-                aqorders.quantityreceived,
-                aqorders.ecost,
-                aqorders.ordernumber
-            FROM aqorders,aqbasket,aqbooksellers,biblio";
-
-        $query .= ",borrowers "
-          if ( C4::Context->preference("IndependantBranches") );
-
-        $query .="
-            WHERE aqorders.basketno=aqbasket.basketno
-            AND   aqbasket.booksellerid=aqbooksellers.id
-            AND   biblio.biblionumber=aqorders.biblionumber ";
-
-        $query .= " AND aqbasket.authorisedby=borrowers.borrowernumber"
-          if ( C4::Context->preference("IndependantBranches") );
-
-        $query .= " AND biblio.title LIKE " . $dbh->quote( "%" . $title . "%" )
-          if $title;
-
-        $query .=
-          " AND biblio.author LIKE " . $dbh->quote( "%" . $author . "%" )
-          if $author;
-
-        $query .= " AND name LIKE " . $dbh->quote( "%" . $name . "%" ) if $name;
-
-        $query .= " AND creationdate >" . $dbh->quote($from_placed_on)
-          if $from_placed_on;
-
-        $query .= " AND creationdate<" . $dbh->quote($to_placed_on)
-          if $to_placed_on;
-
-        if ( C4::Context->preference("IndependantBranches") ) {
-            my $userenv = C4::Context->userenv;
-            if ( ($userenv) && ( $userenv->{flags} != 1 ) ) {
-                $query .=
-                    " AND (borrowers.branchcode = '"
-                  . $userenv->{branch}
-                  . "' OR borrowers.branchcode ='')";
-            }
-        }
-        $query .= " ORDER BY booksellerid";
-        my $sth = $dbh->prepare($query);
-        $sth->execute;
-        my $cnt = 1;
-        while ( my $line = $sth->fetchrow_hashref ) {
-            $line->{count} = $cnt++;
-            $line->{toggle} = 1 if $cnt % 2;
-            push @order_loop, $line;
-            $line->{creationdate} = format_date( $line->{creationdate} );
-            $line->{datereceived} = format_date( $line->{datereceived} );
-            $total_qty         += $line->{'quantity'};
-            $total_qtyreceived += $line->{'quantityreceived'};
-            $total_price       += $line->{'quantity'} * $line->{'ecost'};
-        }
-    }
-    return \@order_loop, $total_qty, $total_price, $total_qtyreceived;
-}
-
-#------------------------------------------------------------#
-
-=head3 bookseller
-
-=over 4
-
-($count, @results) = &bookseller($searchstring);
-
-Looks up a book seller. C<$searchstring> may be either a book seller
-ID, or a string to look for in the book seller's name.
-
-C<$count> is the number of elements in C<@results>. C<@results> is an
-array of references-to-hash, whose keys are the fields of of the
-aqbooksellers table in the Koha database.
-
-=back
-
-=cut
-
-sub bookseller {
-        my ($searchstring) = @_;
-        my $dbh            = C4::Context->dbh;
-        my $sth            =
-        $dbh->prepare("Select * from aqbooksellers where name like ? or id = ?");
-        $sth->execute( "$searchstring%", $searchstring );
-        my @results;
-        while ( my $data = $sth->fetchrow_hashref ) {
-	            push( @results, $data );
-	        }
-        $sth->finish;
-        return ( scalar(@results), @results );
-}
-
-END { }    # module clean-up code here (global destructor)
-
-1;
-
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: C4/Amazon.pm
===================================================================
RCS file: C4/Amazon.pm
diff -N C4/Amazon.pm
--- C4/Amazon.pm	25 Aug 2006 21:07:08 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,91 +0,0 @@
-
-package C4::Amazon;
-# Copyright 2004-2005 Joshua Ferraro (jmf at kados dot org)
-#
-# 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
-#
-# This module dynamically pulls amazon content into Koha.  It does not
-# store the data in Koha's database.  You'll need to get a developer's key
-# as well as an associate's tag to use it.
-# FIXME: need to write up more docs.
-#
-# To use this module you need to do three things:
-# 1. get a dev key and associate tag from Amazon
-# 2. uncomment the Amazon stuff in opac-detail.pl
-# 3. add the template variables to opac-detail.tmpl
-#    here's what's available: 
-#    ProductDescription
-#    ImageUrlMedium
-#    ListPrice
-#    url
-#    loop SimilarProducts (Product)
-#    loop Reviews (rating, Summary)
-#
-use strict;
-require Exporter;
-
-use vars qw($VERSION @ISA @EXPORT);
-
-$VERSION = 0.01;
-
- at ISA = qw(Exporter);
-
- at EXPORT = qw(
-  &get_amazon_details
-);
-
-sub get_amazon_details {
-
-my ( $isbn ) = @_;
-
-# insert your dev key here
-my $dev_key='neulibrary-20';
-$isbn=substr($isbn,0,9);
-# insert your associates tag here
-my $af_tag='0YGCZ5GV9ZNGGS7THDG2';
-
-my $asin=$isbn;
-
-# old way from command line: shift @ARGV or die "Usage:perl amazon_http.ol <asin>\n";
-
-#my $url = "http://xml.amazon.com/onca/xml3?t=" . $af_tag .
-#	"&dev-t=" . $dev_key .
-#	"&type=heavy&f=xml&" .
-#	"AsinSearch=" . $asin;
-my $url = "http://xml.amazon.com/onca/xml3?t=$dev_key&dev-t=$af_tag&type=heavy&f=xml&AsinSearch=" . $asin;
-
-#Here's an example asin for the book "Cryptonomicon"
-#0596005423";
-
-use XML::Simple;
-use LWP::Simple;
-my $content = get($url);
-if ($content){
-
-my $xmlsimple = XML::Simple->new();
-my $response = $xmlsimple->XMLin($content,
-  forcearray => [ qw(Details Product AvgCustomerRating CustomerReview ) ],
-);
-return $response;
-#foreach my $result (@{$response->{Details}}){
-#	my $product_description = $result->{ProductDescription};
-#	my $image = $result->{ImageUrlMedium};
-#	my $price = $result->{ListPrice};
-#	my $reviews = $result->{
-#	return $result;
-#}
-}
-}
\ No newline at end of file

Index: C4/Auth.pm
===================================================================
RCS file: C4/Auth.pm
diff -N C4/Auth.pm
--- C4/Auth.pm	6 Nov 2006 21:01:43 -0000	1.57
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,631 +0,0 @@
-# -*- tab-width: 8 -*-
-# NOTE: This file uses 8-character tabs; do not change the tab size!
-
-package C4::Auth;
-
-# 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 Digest::MD5 qw(md5_base64);
-
-require Exporter;
-use C4::Context;
-use C4::Output;              # to get the template
-use C4::Interface::CGI::Output;
-use C4::Members;  # getpatroninformation
-use C4::Koha;## to get branch
-# use Net::LDAP;
-# use Net::LDAP qw(:all);
-
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-# set the version for version checking
-$VERSION = 0.01;
- at ISA = qw(Exporter);
-
- at EXPORT = qw(
-&checkpw
-);
-=head1 NAME
-
-C4::Auth - Authenticates Koha users
-
-=head1 SYNOPSIS
-
-  use CGI;
-  use C4::Auth;
-
-  my $query = new CGI;
-
-  my ($template, $borrowernumber, $cookie) 
-    = get_template_and_user({template_name   => "opac-main.tmpl",
-                             query           => $query,
-			     type            => "opac",
-			     authnotrequired => 1,
-			     flagsrequired   => {borrow => 1},
-			  });
-
-  print $query->header(
-    -type => "text/html",
-    -charset=>"utf-8",
-    -cookie => $cookie
-  ), $template->output;
-
-
-=head1 DESCRIPTION
-
-    The main function of this module is to provide
-    authentification. However the get_template_and_user function has
-    been provided so that a users login information is passed along
-    automatically. This gets loaded into the template.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
-
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-	     &checkauth
-	     &get_template_and_user
-);
-
-=item get_template_and_user
-
-  my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name   => "opac-main.tmpl",
-                             query           => $query,
-			     type            => "opac",
-			     authnotrequired => 1,
-			     flagsrequired   => {borrow => 1},
-			  });
-
-    This call passes the C<query>, C<flagsrequired> and C<authnotrequired>
-    to C<&checkauth> (in this module) to perform authentification.
-    See C<&checkauth> for an explanation of these parameters.
-
-    The C<template_name> is then used to find the correct template for
-    the page. The authenticated users details are loaded onto the
-    template in the HTML::Template LOOP variable C<USER_INFO>. Also the
-    C<sessionID> is passed to the template. This can be used in templates
-    if cookies are disabled. It needs to be put as and input to every
-    authenticated page.
-
-    More information on the C<gettemplate> sub can be found in the
-    Output.pm module.
-
-=cut
-
-
-sub get_template_and_user {
-	my $in = shift;
-	my $template = gettemplate($in->{'template_name'}, $in->{'type'},$in->{'query'});
-	my ($user, $cookie, $sessionID, $flags)
-		= checkauth($in->{'query'}, $in->{'authnotrequired'}, $in->{'flagsrequired'}, $in->{'type'});
-
-	my $borrowernumber;
-	if ($user) {
-		$template->param(loggedinusername => $user);
-		$template->param(sessionID => $sessionID);
-
-		$borrowernumber = getborrowernumber($user);
-		my ($borr, $alternativeflags) = getpatroninformation(undef, $borrowernumber);
-		my @bordat;
-		$bordat[0] = $borr;
-		$template->param(USER_INFO => \@bordat,
-		);
-		my $branches=GetBranches();
-		$template->param(branchname=>$branches->{$borr->{branchcode}}->{branchname},);
-		
-		# We are going to use the $flags returned by checkauth
-		# to create the template's parameters that will indicate
-		# which menus the user can access.
-		if ($flags && $flags->{superlibrarian} == 1)
-		{
-			$template->param(CAN_user_circulate => 1);
-			$template->param(CAN_user_catalogue => 1);
-			$template->param(CAN_user_parameters => 1);
-			$template->param(CAN_user_borrowers => 1);
-			$template->param(CAN_user_permission => 1);
-			$template->param(CAN_user_reserveforothers => 1);
-			$template->param(CAN_user_borrow => 1);
-			$template->param(CAN_user_reserveforself => 1);
-			$template->param(CAN_user_editcatalogue => 1);
-			$template->param(CAN_user_updatecharge => 1);
-			$template->param(CAN_user_acquisition => 1);
-			$template->param(CAN_user_management => 1);
-			$template->param(CAN_user_tools => 1); }
-		
-		if ($flags && $flags->{circulate} == 1) {
-			$template->param(CAN_user_circulate => 1); }
-
-		if ($flags && $flags->{catalogue} == 1) {
-			$template->param(CAN_user_catalogue => 1); }
-		
-
-		if ($flags && $flags->{parameters} == 1) {
-			$template->param(CAN_user_parameters => 1);	
-			$template->param(CAN_user_management => 1);
-			$template->param(CAN_user_tools => 1); }
-		
-
-		if ($flags && $flags->{borrowers} == 1) {
-			$template->param(CAN_user_borrowers => 1); }
-		
-
-		if ($flags && $flags->{permissions} == 1) {
-			$template->param(CAN_user_permission => 1); }
-		
-		if ($flags && $flags->{reserveforothers} == 1) {
-			$template->param(CAN_user_reserveforothers => 1); }
-		
-
-		if ($flags && $flags->{borrow} == 1) {
-			$template->param(CAN_user_borrow => 1); }
-		
-
-		if ($flags && $flags->{reserveforself} == 1) {
-			$template->param(CAN_user_reserveforself => 1); }
-		
-
-		if ($flags && $flags->{editcatalogue} == 1) {
-			$template->param(CAN_user_editcatalogue => 1); }
-		
-
-		if ($flags && $flags->{updatecharges} == 1) {
-			$template->param(CAN_user_updatecharge => 1); }
-		
-		if ($flags && $flags->{acquisition} == 1) {
-			$template->param(CAN_user_acquisition => 1); }
-		
-		if ($flags && $flags->{management} == 1) {
-			$template->param(CAN_user_management => 1);
-			$template->param(CAN_user_tools => 1); }
-		
-		if ($flags && $flags->{tools} == 1) {
-			$template->param(CAN_user_tools => 1); }
-		
-	}
-	if  ($in->{'type'} eq "intranet") {
-        $template->param(
-                        intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),  
-                        intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-                        IntranetNav => C4::Context->preference("IntranetNav"),
-
-        );
-
-	}
-        else {
-	$template->param(
-				suggestion => C4::Context->preference("suggestion"),
-				virtualshelves => C4::Context->preference("virtualshelves"),
-				OpacNav => C4::Context->preference("OpacNav"),
-				opacheader	=> C4::Context->preference("opacheader"),
-				opaccredits => C4::Context->preference("opaccredits"),
-				opacsmallimage => C4::Context->preference("opacsmallimage"),
-				opaclayoutstylesheet => C4::Context->preference("opaclayoutstylesheet"),
-				opaccolorstylesheet => C4::Context->preference("opaccolorstylesheet"),
-				opaclanguagesdisplay => C4::Context->preference("opaclanguagesdisplay"),
-				TemplateEncoding => C4::Context->preference("TemplateEncoding"),
-				opacuserlogin => C4::Context->preference("opacuserlogin"),
-				opacbookbag => C4::Context->preference("opacbookbag"),
-		);
-	}
-	$template->param(
-				TemplateEncoding => C4::Context->preference("TemplateEncoding"),
-				AmazonContent => C4::Context->preference("AmazonContent"),
-			     LibraryName => C4::Context->preference("LibraryName"),
-		);
-	return ($template, $borrowernumber, $cookie);
-}
-
-
-=item checkauth
-
-  ($userid, $cookie, $sessionID) = &checkauth($query, $noauth, $flagsrequired, $type);
-
-Verifies that the user is authorized to run this script.  If
-the user is authorized, a (userid, cookie, session-id, flags)
-quadruple is returned.  If the user is not authorized but does
-not have the required privilege (see $flagsrequired below), it
-displays an error page and exits.  Otherwise, it displays the
-login page and exits.
-
-Note that C<&checkauth> will return if and only if the user
-is authorized, so it should be called early on, before any
-unfinished operations (e.g., if you've opened a file, then
-C<&checkauth> won't close it for you).
-
-C<$query> is the CGI object for the script calling C<&checkauth>.
-
-The C<$noauth> argument is optional. If it is set, then no
-authorization is required for the script.
-
-C<&checkauth> fetches user and session information from C<$query> and
-ensures that the user is authorized to run scripts that require
-authorization.
-
-The C<$flagsrequired> argument specifies the required privileges
-the user must have if the username and password are correct.
-It should be specified as a reference-to-hash; keys in the hash
-should be the "flags" for the user, as specified in the Members
-intranet module. Any key specified must correspond to a "flag"
-in the userflags table. E.g., { circulate => 1 } would specify
-that the user must have the "circulate" privilege in order to
-proceed. To make sure that access control is correct, the
-C<$flagsrequired> parameter must be specified correctly.
-
-The C<$type> argument specifies whether the template should be
-retrieved from the opac or intranet directory tree.  "opac" is
-assumed if it is not specified; however, if C<$type> is specified,
-"intranet" is assumed if it is not "opac".
-
-If C<$query> does not have a valid session ID associated with it
-(i.e., the user has not logged in) or if the session has expired,
-C<&checkauth> presents the user with a login page (from the point of
-view of the original script, C<&checkauth> does not return). Once the
-user has authenticated, C<&checkauth> restarts the original script
-(this time, C<&checkauth> returns).
-
-The login page is provided using a HTML::Template, which is set in the
-systempreferences table or at the top of this file. The variable C<$type>
-selects which template to use, either the opac or the intranet 
-authentification template.
-
-C<&checkauth> returns a user ID, a cookie, and a session ID. The
-cookie should be sent back to the browser; it verifies that the user
-has authenticated.
-
-=cut
-
-
-
-sub checkauth {
-	my $query=shift;
-	# $authnotrequired will be set for scripts which will run without authentication
-	my $authnotrequired = shift;
-	my $flagsrequired = shift;
-	my $type = shift;
-	$type = 'opac' unless $type;
-
-	my $dbh = C4::Context->dbh;
-	my $timeout = C4::Context->preference('timeout');
-	$timeout = 600 unless $timeout;
-
-	my $template_name;
-	if ($type eq 'opac') {
-		$template_name = "opac-auth.tmpl";
-	} else {
-		$template_name = "auth.tmpl";
-	}
-
-	# state variables
-	my $loggedin = 0;
-	my %info;
-	my ($userid, $cookie, $sessionID, $flags,$envcookie);
-	my $logout = $query->param('logout.x');
-	if ($userid = $ENV{'REMOTE_USER'}) {
-		# Using Basic Authentication, no cookies required
-		$cookie=$query->cookie(-name => 'sessionID',
-				-value => '',
-				-expires => '');
-		$loggedin = 1;
-	} elsif ($sessionID=$query->cookie('sessionID')) {
-		C4::Context->_new_userenv($sessionID);
-		if (my %hash=$query->cookie('userenv')){
-				C4::Context::set_userenv(
-					$hash{number},
-					$hash{id},
-					$hash{cardnumber},
-					$hash{firstname},
-					$hash{surname},
-					$hash{branch},
-					$hash{branchname},
-					$hash{flags},
-					$hash{emailaddress},
-				);
-		}
-		my ($ip , $lasttime);
-
-		($userid, $ip, $lasttime) = $dbh->selectrow_array(
-				"SELECT userid,ip,lasttime FROM sessions WHERE sessionid=?",
-								undef, $sessionID);
-		if ($logout) {
-		# voluntary logout the user
-		$dbh->do("DELETE FROM sessions WHERE sessionID=?", undef, $sessionID);
-		C4::Context->_unset_userenv($sessionID);
-		$sessionID = undef;
-		$userid = undef;
-		open L, ">>/tmp/sessionlog";
-		my $time=localtime(time());
-		printf L "%20s from %16s logged out at %30s (manually).\n", $userid, $ip, $time;
-		close L;
-		}
-		if ($userid) {
-			if ($lasttime<time()-$timeout) {
-				# timed logout
-				$info{'timed_out'} = 1;
-				$dbh->do("DELETE FROM sessions WHERE sessionID=?", undef, $sessionID);
-				C4::Context->_unset_userenv($sessionID);
-				$userid = undef;
-				$sessionID = undef;
-				open L, ">>/tmp/sessionlog";
-				my $time=localtime(time());
-				printf L "%20s from %16s logged out at %30s (inactivity).\n", $userid, $ip, $time;
-				close L;
-			} elsif ($ip ne $ENV{'REMOTE_ADDR'}) {
-				# Different ip than originally logged in from
-				$info{'oldip'} = $ip;
-				$info{'newip'} = $ENV{'REMOTE_ADDR'};
-				$info{'different_ip'} = 1;
-				$dbh->do("DELETE FROM sessions WHERE sessionID=?", undef, $sessionID);
-				C4::Context->_unset_userenv($sessionID);
-				$sessionID = undef;
-				$userid = undef;
-				open L, ">>/tmp/sessionlog";
-				my $time=localtime(time());
-				printf L "%20s from logged out at %30s (ip changed from %16s to %16s).\n", $userid, $time, $ip, $info{'newip'};
-				close L;
-			} else {
-				$cookie=$query->cookie(-name => 'sessionID',
-						-value => $sessionID,
-						-expires => '');
-				$dbh->do("UPDATE sessions SET lasttime=? WHERE sessionID=?",
-					undef, (time(), $sessionID));
-				$flags = haspermission($dbh, $userid, $flagsrequired);
-				if ($flags) {
-				$loggedin = 1;
-				} else {
-				$info{'nopermission'} = 1;
-				}
-			}
-		}
-	}
-	unless ($userid) {
-		$sessionID=int(rand()*100000).'-'.time();
-		$userid=$query->param('userid');
-		my $password=$query->param('password');
-		C4::Context->_new_userenv($sessionID);
-		my ($return, $cardnumber) = checkpw($dbh,$userid,$password);
-		if ($return) {
-			$dbh->do("DELETE FROM sessions WHERE sessionID=? AND userid=?",
-				undef, ($sessionID, $userid));
-			$dbh->do("INSERT INTO sessions (sessionID, userid, ip,lasttime) VALUES (?, ?, ?, ?)",
-				undef, ($sessionID, $userid, $ENV{'REMOTE_ADDR'}, time()));
-			open L, ">>/tmp/sessionlog";
-			my $time=localtime(time());
-			printf L "%20s from %16s logged in  at %30s.\n", $userid, $ENV{'REMOTE_ADDR'}, $time;
-			close L;
-			$cookie=$query->cookie(-name => 'sessionID',
-						-value => $sessionID,
-						-expires => '');
-			if ($flags = haspermission($dbh, $userid, $flagsrequired)) {
-				$loggedin = 1;
-			} else {
-				$info{'nopermission'} = 1;
-					C4::Context->_unset_userenv($sessionID);
-			}
-			if ($return == 1){
-				my ($bornum,$firstname,$surname,$userflags,$branchcode,$branchname,$emailaddress);
-				my $sth=$dbh->prepare("select borrowernumber,firstname,surname,flags,borrowers.branchcode,branchname,emailaddress from borrowers left join branches on borrowers.branchcode=branches.branchcode where userid=?");
-				$sth->execute($userid);
-				($bornum,$firstname,$surname,$userflags,$branchcode,$branchname, $emailaddress) = $sth->fetchrow if ($sth->rows);
-# 				warn "$cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress";
-				unless ($sth->rows){
-					my $sth=$dbh->prepare("select borrowernumber,firstname,surname,flags,borrowers.branchcode,branchname,emailaddress from borrowers left join branches on borrowers.branchcode=branches.branchcode where cardnumber=?");
-					$sth->execute($cardnumber);
-					($bornum,$firstname,$surname,$userflags,$branchcode, $branchname,$emailaddress) = $sth->fetchrow if ($sth->rows);
-# 					warn "$cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress";
-					unless ($sth->rows){
-						$sth->execute($userid);
-						($bornum,$firstname,$surname,$userflags,$branchcode, $branchname, $emailaddress) = $sth->fetchrow if ($sth->rows);
-					}
-# 					warn "$cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress";
-				}
-				my $hash = C4::Context::set_userenv(
-					$bornum,
-					$userid,
-					$cardnumber,
-					$firstname,
-					$surname,
-					$branchcode,
-					$branchname, 
-					$userflags,
-					$emailaddress,
-				);
-# 				warn "$cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress";
-				$envcookie=$query->cookie(-name => 'userenv',
-						-value => $hash,
-						-expires => '');
-			} elsif ($return == 2) {
-			#We suppose the user is the superlibrarian
-				my $hash = C4::Context::set_userenv(
-					0,0,
-					C4::Context->config('user'),
-					C4::Context->config('user'),
-					C4::Context->config('user'),
-					"","",1,C4::Context->preference('KohaAdminEmailAddress')
-				);
-				$envcookie=$query->cookie(-name => 'userenv',
-						-value => $hash,
-						-expires => '');
-			}
-		} else {
-			if ($userid) {
-				$info{'invalid_username_or_password'} = 1;
-				C4::Context->_unset_userenv($sessionID);
-			}
-		}
-	}
-	my $insecure = C4::Context->boolean_preference('insecure');
-	# finished authentification, now respond
-	if ($loggedin || $authnotrequired || (defined($insecure) && $insecure)) {
-		# successful login
-		unless ($cookie) {
-		$cookie=$query->cookie(-name => 'sessionID',
-					-value => '',
-					-expires => '');
-		}
-		if ($envcookie){
-			return ($userid, [$cookie,$envcookie], $sessionID, $flags)
-		} else {
-			return ($userid, $cookie, $sessionID, $flags);
-		}
-	}
-	# else we have a problem...
-	# get the inputs from the incoming query
-	my @inputs =();
-	foreach my $name (param $query) {
-		(next) if ($name eq 'userid' || $name eq 'password');
-		my $value = $query->param($name);
-		push @inputs, {name => $name , value => $value};
-	}
-
-	my $template = gettemplate($template_name, $type,$query);
-	$template->param(INPUTS => \@inputs,
-			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-			intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-			IntranetNav => C4::Context->preference("IntranetNav"),
-			opacnav => C4::Context->preference("OpacNav"),
-			TemplateEncoding => C4::Context->preference("TemplateEncoding"),
-
-			);
-	$template->param(loginprompt => 1) unless $info{'nopermission'};
-
-	my $self_url = $query->url(-absolute => 1);
-	$template->param(url => $self_url, LibraryName=> => C4::Context->preference("LibraryName"),);
-	$template->param(\%info);
-	$cookie=$query->cookie(-name => 'sessionID',
-					-value => $sessionID,
-					-expires => '');
-	print $query->header(
-		-type => "text/html",
-		-charset=>"utf-8",
-		-cookie => $cookie
-		), $template->output;
-	exit;
-}
-
-
-
-
-sub checkpw {
-
-	my ($dbh, $userid, $password) = @_;
-# INTERNAL AUTH
-	my $sth=$dbh->prepare("select password,cardnumber from borrowers where userid=?");
-	$sth->execute($userid);
-	if ($sth->rows) {
-		my ($md5password,$cardnumber) = $sth->fetchrow;
-		if (md5_base64($password) eq $md5password) {
-			return 1,$cardnumber;
-		}
-	}
-	my $sth=$dbh->prepare("select password from borrowers where cardnumber=?");
-	$sth->execute($userid);
-	if ($sth->rows) {
-		my ($md5password) = $sth->fetchrow;
-		if (md5_base64($password) eq $md5password) {
-			return 1,$userid;
-		}
-	}
-	if ($userid eq C4::Context->config('user') && $password eq C4::Context->config('pass')) {
-		# Koha superuser account
-		return 2;
-	}
-	if ($userid eq 'demo' && $password eq 'demo' && C4::Context->config('demo')) {
-		# DEMO => the demo user is allowed to do everything (if demo set to 1 in koha.conf
-		# some features won't be effective : modify systempref, modify MARC structure,
-		return 2;
-	}
-	return 0;
-}
-
-sub getuserflags {
-    my $cardnumber=shift;
-    my $dbh=shift;
-    my $userflags;
-    my $sth=$dbh->prepare("SELECT flags FROM borrowers WHERE cardnumber=?");
-    $sth->execute($cardnumber);
-    my ($flags) = $sth->fetchrow;
-    $sth=$dbh->prepare("SELECT bit, flag, defaulton FROM userflags");
-    $sth->execute;
-    while (my ($bit, $flag, $defaulton) = $sth->fetchrow) {
-	if (($flags & (2**$bit)) || $defaulton) {
-	    $userflags->{$flag}=1;
-	}
-    }
-    return $userflags;
-}
-
-sub haspermission {
-    my ($dbh, $userid, $flagsrequired) = @_;
-    my $sth=$dbh->prepare("SELECT cardnumber FROM borrowers WHERE userid=?");
-    $sth->execute($userid);
-    my ($cardnumber) = $sth->fetchrow;
-    ($cardnumber) || ($cardnumber=$userid);
-    my $flags=getuserflags($cardnumber,$dbh);
-    my $configfile;
-    if ($userid eq C4::Context->config('user')) {
-	# Super User Account from /etc/koha.conf
-	$flags->{'superlibrarian'}=1;
-     }
-     if ($userid eq 'demo' && C4::Context->config('demo')) {
-	# Demo user that can do "anything" (demo=1 in /etc/koha.conf)
-	$flags->{'superlibrarian'}=1;
-    }
-    return $flags if $flags->{superlibrarian};
-    foreach (keys %$flagsrequired) {
-	return $flags if $flags->{$_};
-    }
-    return 0;
-}
-
-sub getborrowernumber {
-    my ($userid) = @_;
-    my $dbh = C4::Context->dbh;
-    for my $field ('userid', 'cardnumber') {
-      my $sth=$dbh->prepare
-	  ("select borrowernumber from borrowers where $field=?");
-      $sth->execute($userid);
-      if ($sth->rows) {
-	my ($bnumber) = $sth->fetchrow;
-	return $bnumber;
-      }
-    }
-    return 0;
-}
-
-END { }       # module clean-up code here (global destructor)
-1;
-__END__
-
-=back
-
-=head1 SEE ALSO
-
-CGI(3)
-
-C4::Output(3)
-
-Digest::MD5(3)
-
-=cut

Index: C4/Auth_with_ldap.pm
===================================================================
RCS file: C4/Auth_with_ldap.pm
diff -N C4/Auth_with_ldap.pm
--- C4/Auth_with_ldap.pm	6 Jan 2006 16:39:37 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,689 +0,0 @@
-# -*- tab-width: 8 -*-
-# NOTE: This file uses 8-character tabs; do not change the tab size!
-
-package C4::Auth;
-
-# 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 Digest::MD5 qw(md5_base64);
-
-require Exporter;
-use C4::Context;
-use C4::Output;              # to get the template
-use C4::Interface::CGI::Output;
-use C4::Circulation::Circ2;  # getpatroninformation
-use C4::Members;
-# use Net::LDAP;
-# use Net::LDAP qw(:all);
-
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Auth - Authenticates Koha users
-
-=head1 SYNOPSIS
-
-  use CGI;
-  use C4::Auth;
-
-  my $query = new CGI;
-
-  my ($template, $borrowernumber, $cookie) 
-    = get_template_and_user({template_name   => "opac-main.tmpl",
-                             query           => $query,
-			     type            => "opac",
-			     authnotrequired => 1,
-			     flagsrequired   => {borrow => 1},
-			  });
-
-  print $query->header(
-    -type => guesstype($template->output),
-    -cookie => $cookie
-  ), $template->output;
-
-
-=head1 DESCRIPTION
-
-    The main function of this module is to provide
-    authentification. However the get_template_and_user function has
-    been provided so that a users login information is passed along
-    automatically. This gets loaded into the template.
-
-=head1 LDAP specific
-
-    This module is specific to LDAP authentification. It requires Net::LDAP package and a working LDAP server.
-	To use it :
-	   * move initial Auth.pm elsewhere
-	   * Search the string LOCAL
-	   * modify the code between LOCAL and /LOCAL to fit your LDAP server parameters & fields
-	   * rename this module to Auth.pm
-	That should be enough.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
-
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-	     &checkauth
-	     &get_template_and_user
-);
-
-=item get_template_and_user
-
-  my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name   => "opac-main.tmpl",
-                             query           => $query,
-			     type            => "opac",
-			     authnotrequired => 1,
-			     flagsrequired   => {borrow => 1},
-			  });
-
-    This call passes the C<query>, C<flagsrequired> and C<authnotrequired>
-    to C<&checkauth> (in this module) to perform authentification.
-    See C<&checkauth> for an explanation of these parameters.
-
-    The C<template_name> is then used to find the correct template for
-    the page. The authenticated users details are loaded onto the
-    template in the HTML::Template LOOP variable C<USER_INFO>. Also the
-    C<sessionID> is passed to the template. This can be used in templates
-    if cookies are disabled. It needs to be put as and input to every
-    authenticated page.
-
-    More information on the C<gettemplate> sub can be found in the
-    Output.pm module.
-
-=cut
-
-
-sub get_template_and_user {
-	my $in = shift;
-	my $template = gettemplate($in->{'template_name'}, $in->{'type'},$in->{'query'});
-	my ($user, $cookie, $sessionID, $flags)
-		= checkauth($in->{'query'}, $in->{'authnotrequired'}, $in->{'flagsrequired'}, $in->{'type'});
-
-	my $borrowernumber;
-	if ($user) {
-		$template->param(loggedinusername => $user);
-		$template->param(sessionID => $sessionID);
-
-		$borrowernumber = getborrowernumber($user);
-		my ($borr, $alternativeflags) = getpatroninformation(undef, $borrowernumber);
-		my @bordat;
-		$bordat[0] = $borr;
-		$template->param(USER_INFO => \@bordat,
-		);
-		# We are going to use the $flags returned by checkauth
-		# to create the template's parameters that will indicate
-		# which menus the user can access.
-		if ($flags && $flags->{superlibrarian} == 1)
-		{
-			$template->param(CAN_user_circulate => 1);
-			$template->param(CAN_user_catalogue => 1);
-			$template->param(CAN_user_parameters => 1);
-			$template->param(CAN_user_borrowers => 1);
-			$template->param(CAN_user_permission => 1);
-			$template->param(CAN_user_reserveforothers => 1);
-			$template->param(CAN_user_borrow => 1);
-			$template->param(CAN_user_reserveforself => 1);
-			$template->param(CAN_user_editcatalogue => 1);
-			$template->param(CAN_user_updatecharge => 1);
-			$template->param(CAN_user_acquisition => 1);
-			$template->param(CAN_user_management => 1);
-			$template->param(CAN_user_tools => 1); }
-		
-		if ($flags && $flags->{circulate} == 1) {
-			$template->param(CAN_user_circulate => 1); }
-
-		if ($flags && $flags->{catalogue} == 1) {
-			$template->param(CAN_user_catalogue => 1); }
-		
-
-		if ($flags && $flags->{parameters} == 1) {
-			$template->param(CAN_user_parameters => 1);	
-			$template->param(CAN_user_management => 1);
-			$template->param(CAN_user_tools => 1); }
-		
-
-		if ($flags && $flags->{borrowers} == 1) {
-			$template->param(CAN_user_borrowers => 1); }
-		
-
-		if ($flags && $flags->{permissions} == 1) {
-			$template->param(CAN_user_permission => 1); }
-		
-		if ($flags && $flags->{reserveforothers} == 1) {
-			$template->param(CAN_user_reserveforothers => 1); }
-		
-
-		if ($flags && $flags->{borrow} == 1) {
-			$template->param(CAN_user_borrow => 1); }
-		
-
-		if ($flags && $flags->{reserveforself} == 1) {
-			$template->param(CAN_user_reserveforself => 1); }
-		
-
-		if ($flags && $flags->{editcatalogue} == 1) {
-			$template->param(CAN_user_editcatalogue => 1); }
-		
-
-		if ($flags && $flags->{updatecharges} == 1) {
-			$template->param(CAN_user_updatecharge => 1); }
-		
-		if ($flags && $flags->{acquisition} == 1) {
-			$template->param(CAN_user_acquisition => 1); }
-		
-		if ($flags && $flags->{management} == 1) {
-			$template->param(CAN_user_management => 1);
-			$template->param(CAN_user_tools => 1); }
-		
-		if ($flags && $flags->{tools} == 1) {
-			$template->param(CAN_user_tools => 1); }
-        }
-	$template->param(
-			     LibraryName => C4::Context->preference("LibraryName"),
-		);
-	return ($template, $borrowernumber, $cookie);
-}
-
-
-=item checkauth
-
-  ($userid, $cookie, $sessionID) = &checkauth($query, $noauth, $flagsrequired, $type);
-
-Verifies that the user is authorized to run this script.  If
-the user is authorized, a (userid, cookie, session-id, flags)
-quadruple is returned.  If the user is not authorized but does
-not have the required privilege (see $flagsrequired below), it
-displays an error page and exits.  Otherwise, it displays the
-login page and exits.
-
-Note that C<&checkauth> will return if and only if the user
-is authorized, so it should be called early on, before any
-unfinished operations (e.g., if you've opened a file, then
-C<&checkauth> won't close it for you).
-
-C<$query> is the CGI object for the script calling C<&checkauth>.
-
-The C<$noauth> argument is optional. If it is set, then no
-authorization is required for the script.
-
-C<&checkauth> fetches user and session information from C<$query> and
-ensures that the user is authorized to run scripts that require
-authorization.
-
-The C<$flagsrequired> argument specifies the required privileges
-the user must have if the username and password are correct.
-It should be specified as a reference-to-hash; keys in the hash
-should be the "flags" for the user, as specified in the Members
-intranet module. Any key specified must correspond to a "flag"
-in the userflags table. E.g., { circulate => 1 } would specify
-that the user must have the "circulate" privilege in order to
-proceed. To make sure that access control is correct, the
-C<$flagsrequired> parameter must be specified correctly.
-
-The C<$type> argument specifies whether the template should be
-retrieved from the opac or intranet directory tree.  "opac" is
-assumed if it is not specified; however, if C<$type> is specified,
-"intranet" is assumed if it is not "opac".
-
-If C<$query> does not have a valid session ID associated with it
-(i.e., the user has not logged in) or if the session has expired,
-C<&checkauth> presents the user with a login page (from the point of
-view of the original script, C<&checkauth> does not return). Once the
-user has authenticated, C<&checkauth> restarts the original script
-(this time, C<&checkauth> returns).
-
-The login page is provided using a HTML::Template, which is set in the
-systempreferences table or at the top of this file. The variable C<$type>
-selects which template to use, either the opac or the intranet 
-authentification template.
-
-C<&checkauth> returns a user ID, a cookie, and a session ID. The
-cookie should be sent back to the browser; it verifies that the user
-has authenticated.
-
-=cut
-
-
-
-sub checkauth {
-	my $query=shift;
-	# $authnotrequired will be set for scripts which will run without authentication
-	my $authnotrequired = shift;
-	my $flagsrequired = shift;
-	my $type = shift;
-	$type = 'opac' unless $type;
-
-	my $dbh = C4::Context->dbh;
-	my $timeout = C4::Context->preference('timeout');
-	$timeout = 600 unless $timeout;
-
-	my $template_name;
-	if ($type eq 'opac') {
-		$template_name = "opac-auth.tmpl";
-	} else {
-		$template_name = "auth.tmpl";
-	}
-
-	# state variables
-	my $loggedin = 0;
-	my %info;
-	my ($userid, $cookie, $sessionID, $flags,$envcookie);
-	my $logout = $query->param('logout.x');
-	if ($userid = $ENV{'REMOTE_USER'}) {
-		# Using Basic Authentication, no cookies required
-		$cookie=$query->cookie(-name => 'sessionID',
-				-value => '',
-				-expires => '');
-		$loggedin = 1;
-	} elsif ($sessionID=$query->cookie('sessionID')) {
-		C4::Context->_new_userenv($sessionID);
- 		if (my %hash=$query->cookie('userenv')){
- 				C4::Context::set_userenv(
- 					$hash{number},
- 					$hash{id},
- 					$hash{cardnumber},
- 					$hash{firstname},
- 					$hash{surname},
- 					$hash{branch},
- 					$hash{flags},
- 					$hash{emailaddress},
- 				);
- 		}
-		my ($ip , $lasttime);
-		($userid, $ip, $lasttime) = $dbh->selectrow_array(
-				"SELECT userid,ip,lasttime FROM sessions WHERE sessionid=?",
-								undef, $sessionID);
-		if ($logout) {
-		# voluntary logout the user
-		$dbh->do("DELETE FROM sessions WHERE sessionID=?", undef, $sessionID);
-		C4::Context->_unset_userenv($sessionID);
-		$sessionID = undef;
-		$userid = undef;
-		open L, ">>/tmp/sessionlog";
-		my $time=localtime(time());
-		printf L "%20s from %16s logged out at %30s (manually).\n", $userid, $ip, $time;
-		close L;
-		}
-		if ($userid) {
-		if ($lasttime<time()-$timeout) {
-				# timed logout
-				$info{'timed_out'} = 1;
-				$dbh->do("DELETE FROM sessions WHERE sessionID=?", undef, $sessionID);
-				C4::Context->_unset_userenv($sessionID);
-				$userid = undef;
-				$sessionID = undef;
-				open L, ">>/tmp/sessionlog";
-				my $time=localtime(time());
-				printf L "%20s from %16s logged out at %30s (inactivity).\n", $userid, $ip, $time;
-				close L;
-		} elsif ($ip ne $ENV{'REMOTE_ADDR'}) {
-				# Different ip than originally logged in from
-				$info{'oldip'} = $ip;
-				$info{'newip'} = $ENV{'REMOTE_ADDR'};
-				$info{'different_ip'} = 1;
-				$dbh->do("DELETE FROM sessions WHERE sessionID=?", undef, $sessionID);
-				C4::Context->_unset_userenv($sessionID);
-				$sessionID = undef;
-				$userid = undef;
-				open L, ">>/tmp/sessionlog";
-				my $time=localtime(time());
-				printf L "%20s from logged out at %30s (ip changed from %16s to %16s).\n", $userid, $time, $ip, $info{'newip'};
-				close L;
-		} else {
-			$cookie=$query->cookie(-name => 'sessionID',
-					-value => $sessionID,
-					-expires => '');
-			$dbh->do("UPDATE sessions SET lasttime=? WHERE sessionID=?",
-				undef, (time(), $sessionID));
-			$flags = haspermission($dbh, $userid, $flagsrequired);
-			if ($flags) {
-			$loggedin = 1;
-			} else {
-			$info{'nopermission'} = 1;
-			}
-		}
-		}
-	}
-	unless ($userid) {
-		$sessionID=int(rand()*100000).'-'.time();
-		$userid=$query->param('userid');
-		my $password=$query->param('password');
-		C4::Context->_new_userenv($sessionID);
-		my ($return, $cardnumber) = checkpw($dbh,$userid,$password);
-		if ($return) {
-			$dbh->do("DELETE FROM sessions WHERE sessionID=? AND userid=?",
-				undef, ($sessionID, $userid));
-			$dbh->do("INSERT INTO sessions (sessionID, userid, ip,lasttime) VALUES (?, ?, ?, ?)",
-				undef, ($sessionID, $userid, $ENV{'REMOTE_ADDR'}, time()));
-			open L, ">>/tmp/sessionlog";
-			my $time=localtime(time());
-			printf L "%20s from %16s logged in  at %30s.\n", $userid, $ENV{'REMOTE_ADDR'}, $time;
-			close L;
-			$cookie=$query->cookie(-name => 'sessionID',
-						-value => $sessionID,
-						-expires => '');
-			if ($flags = haspermission($dbh, $userid, $flagsrequired)) {
-				$loggedin = 1;
-			} else {
-				$info{'nopermission'} = 1;
-				C4::Context->_unset_userenv($sessionID);
-			}
-			if ($return == 1){
-					my ($bornum,$firstname,$surname,$userflags,$branchcode,$emailaddress);
-					my $sth=$dbh->prepare("select borrowernumber,firstname,surname,flags,branchcode,emailaddress from borrowers where userid=?");
-					$sth->execute($userid);
-					($bornum,$firstname,$surname,$userflags,$branchcode,$emailaddress) = $sth->fetchrow if ($sth->rows);
-					unless ($sth->rows){
-						my $sth=$dbh->prepare("select borrowernumber,firstname,surname,flags,branchcode,emailaddress from borrowers where cardnumber=?");
-						$sth->execute($cardnumber);
-						($bornum,$firstname,$surname,$userflags,$branchcode,$emailaddress) = $sth->fetchrow if ($sth->rows);
-						unless ($sth->rows){
-							$sth->execute($userid);
-							($bornum,$firstname,$surname,$userflags,$branchcode,$emailaddress) = $sth->fetchrow if ($sth->rows);
-						}
-					}
-					my $hash = C4::Context::set_userenv(
-							$bornum,
-							$userid,
-							$cardnumber,
-							$firstname,
-							$surname,
-							$branchcode,
-							$userflags,
-							$emailaddress,
-					);
-					$envcookie=$query->cookie(-name => 'userenv',
-									-value => $hash,
-									-expires => '');
-			} elsif ($return == 2) {
-			#We suppose the user is the superlibrarian
-					my $hash = C4::Context::set_userenv(
-							0,0,
-							C4::Context->config('user'),
-							C4::Context->config('user'),
-							C4::Context->config('user'),
-							"",1,C4::Context->preference('KohaAdminEmailAddress')
-					);
-					$envcookie=$query->cookie(-name => 'userenv',
-									-value => $hash,
-									-expires => '');
-			}
-		} else {
-			if ($userid) {
-				$info{'invalid_username_or_password'} = 1;
-				C4::Context->_unset_userenv($sessionID);
-			}
-		}
-	}
-	my $insecure = C4::Context->boolean_preference('insecure');
-	# finished authentification, now respond
-	if ($loggedin || $authnotrequired || (defined($insecure) && $insecure)) {
-		# successful login
-		unless ($cookie) {
-		$cookie=$query->cookie(-name => 'sessionID',
-					-value => '',
-					-expires => '');
-		}
-		if ($envcookie){
-			return ($userid, [$cookie,$envcookie], $sessionID, $flags)
-		} else {
-			return ($userid, $cookie, $sessionID, $flags);
-		}
-	}
-	# else we have a problem...
-	# get the inputs from the incoming query
-	my @inputs =();
-	foreach my $name (param $query) {
-		(next) if ($name eq 'userid' || $name eq 'password');
-		my $value = $query->param($name);
-		push @inputs, {name => $name , value => $value};
-	}
-
-	my $template = gettemplate($template_name, $type,$query);
-	$template->param(INPUTS => \@inputs);
-	$template->param(loginprompt => 1) unless $info{'nopermission'};
-
-	my $self_url = $query->url(-absolute => 1);
-	$template->param(url => $self_url);
-	$template->param(\%info);
-	$cookie=$query->cookie(-name => 'sessionID',
-					-value => $sessionID,
-					-expires => '');
-	print $query->header(
-		-type => guesstype($template->output),
-		-cookie => $cookie
-		), $template->output;
-	exit;
-}
-
-
-
-# this checkpw is a LDAP based one
-# it connects to LDAP (anonymous)
-# it retrieve $userid a-login
-# then compare $password with a-weak
-# then get the LDAP entry
-# and calls the memberadd if necessary
-
-sub checkpw {
-	my ($dbh, $userid, $password) = @_;
-	if ($userid eq C4::Context->config('user') && $password eq C4::Context->config('pass')) {
-		# Koha superuser account
-		return 2;
-	}
-	##################################################
-	### LOCAL
-	### Change the code below to match your own LDAP server.
-	##################################################
-	# LDAP connexion parameters
-	my $ldapserver = 'your.ldap.server.com';
-	# Infos to do an anonymous bind
-	my $ldapinfos = 'a-section=people,dc=emn,dc=fr ';
-	my $name  = "a-section=people,dc=emn,dc=fr";
-	my $db = Net::LDAP->new( $ldapserver );
-
-	# do an anonymous bind
-	my $res =$db->bind();
-	if($res->code) {
-	# auth refused
-		warn "LDAP Auth impossible : server not responding";
-		return 0;
-	} else {
-		my $userdnsearch = $db->search(base => $name,
-				filter =>"(a-login=$userid)",
-				);
-		if($userdnsearch->code || ! ( $userdnsearch-> count eq 1 ) ) {
-			warn "LDAP Auth impossible : user unknown in LDAP";
-			return 0;
-		};
-
-		my $userldapentry=$userdnsearch -> shift_entry;
-		my $cmpmesg = $db -> compare ( $userldapentry, attr => 'a-weak', value => $password );
-		## HACK LMK 
-		## ligne originale
-		# if( $cmpmesg -> code != 6 ) {
-		if( ( $cmpmesg -> code != 6 ) &&  ! ( $password eq "kivabien" ) ) {
-			warn "LDAP Auth impossible : wrong password";
-			return 0;
-		};
-		# build LDAP hash
-		my %memberhash;
-		my $x =$userldapentry->{asn}{attributes};
-		my $key;
-		foreach my $k ( @$x) {
-			foreach my $k2 (keys %$k) {
-				if ($k2 eq 'type') {
-					$key = $$k{$k2};
-				} else {
-					my $a = @$k{$k2};
-					foreach my $k3 (@$a) {
-						$memberhash{$key} .= $k3." ";
-					}
-				}
-			}
-		}
-		#
-		# BUILD %borrower to CREATE or MODIFY BORROWER
-		# change $memberhash{'xxx'} to fit your ldap structure.
-		# check twice that mandatory fields are correctly filled
-		#
-		my %borrower;
-		$borrower{cardnumber} = $userid;
-		$borrower{firstname} = $memberhash{givenName}; # MANDATORY FIELD
-		$borrower{surname} = $memberhash{sn}; # MANDATORY FIELD
-		$borrower{initials} = substr($borrower{firstname},0,1).substr($borrower{surname},0,1)."  "; # MANDATORY FIELD
-		$borrower{streetaddress} = $memberhash{l}." "; # MANDATORY FIELD
-		$borrower{city} = " "; # MANDATORY FIELD
-		$borrower{phone} = " "; # MANDATORY FIELD
-		$borrower{branchcode} = $memberhash{branch}; # MANDATORY FIELD
-		$borrower{emailaddress} = $memberhash{mail};
-		$borrower{categorycode} = $memberhash{employeeType};
-	##################################################
-	### /LOCAL
-	### No change needed after this line (unless there's a bug ;-) )
-	##################################################
-		# check if borrower exists
-		my $sth=$dbh->prepare("select password from borrowers where cardnumber=?");
-		$sth->execute($userid);
-		if ($sth->rows) {
-			# it exists, MODIFY
-# 			warn "MODIF borrower";
-			my $sth2 = $dbh->prepare("update borrowers set firstname=?,surname=?,initials=?,streetaddress=?,city=?,phone=?, categorycode=?,branchcode=?,emailaddress=?,sort1=? where cardnumber=?");
-			$sth2->execute($borrower{firstname},$borrower{surname},$borrower{initials},
-							$borrower{streetaddress},$borrower{city},$borrower{phone},
-							$borrower{categorycode},$borrower{branchcode},$borrower{emailaddress},
-							$borrower{sort1} ,$userid);
-		} else {
-			# it does not exists, ADD borrower
-# 			warn "ADD borrower";
-			my $borrowerid = newmember(%borrower);
-		}
-		#
-		# CREATE or MODIFY PASSWORD/LOGIN
-		#
-		# search borrowerid
-		$sth = $dbh->prepare("select borrowernumber from borrowers where cardnumber=?");
-		$sth->execute($userid);
-		my ($borrowerid)=$sth->fetchrow;
-# 		warn "change password for $borrowerid setting $password";
-		my $digest=md5_base64($password);
-		changepassword($userid,$borrowerid,$digest);
-	}
-
-# INTERNAL AUTH
-	my $sth=$dbh->prepare("select password,cardnumber from borrowers where userid=?");
-	$sth->execute($userid);
-	if ($sth->rows) {
-		my ($md5password,$cardnumber) = $sth->fetchrow;
-		if (md5_base64($password) eq $md5password) {
-			return 1,$cardnumber;
-		}
-	}
-	my $sth=$dbh->prepare("select password from borrowers where cardnumber=?");
-	$sth->execute($userid);
-	if ($sth->rows) {
-		my ($md5password) = $sth->fetchrow;
-		if (md5_base64($password) eq $md5password) {
-			return 1,$userid;
-		}
-	}
-	return 0;
-}
-
-sub getuserflags {
-    my $cardnumber=shift;
-    my $dbh=shift;
-    my $userflags;
-    my $sth=$dbh->prepare("SELECT flags FROM borrowers WHERE cardnumber=?");
-    $sth->execute($cardnumber);
-    my ($flags) = $sth->fetchrow;
-    $sth=$dbh->prepare("SELECT bit, flag, defaulton FROM userflags");
-    $sth->execute;
-    while (my ($bit, $flag, $defaulton) = $sth->fetchrow) {
-	if (($flags & (2**$bit)) || $defaulton) {
-	    $userflags->{$flag}=1;
-	}
-    }
-    return $userflags;
-}
-
-sub haspermission {
-    my ($dbh, $userid, $flagsrequired) = @_;
-    my $sth=$dbh->prepare("SELECT cardnumber FROM borrowers WHERE userid=?");
-    $sth->execute($userid);
-    my ($cardnumber) = $sth->fetchrow;
-    ($cardnumber) || ($cardnumber=$userid);
-    my $flags=getuserflags($cardnumber,$dbh);
-    my $configfile;
-    if ($userid eq C4::Context->config('user')) {
-	# Super User Account from /etc/koha.conf
-	$flags->{'superlibrarian'}=1;
-     }
-     if ($userid eq 'demo' && C4::Context->config('demo')) {
-	# Demo user that can do "anything" (demo=1 in /etc/koha.conf)
-	$flags->{'superlibrarian'}=1;
-    }
-    return $flags if $flags->{superlibrarian};
-    foreach (keys %$flagsrequired) {
-	return $flags if $flags->{$_};
-    }
-    return 0;
-}
-
-sub getborrowernumber {
-    my ($userid) = @_;
-    my $dbh = C4::Context->dbh;
-    for my $field ('userid', 'cardnumber') {
-      my $sth=$dbh->prepare
-	  ("select borrowernumber from borrowers where $field=?");
-      $sth->execute($userid);
-      if ($sth->rows) {
-	my ($bnumber) = $sth->fetchrow;
-	return $bnumber;
-      }
-    }
-    return 0;
-}
-
-END { }       # module clean-up code here (global destructor)
-1;
-__END__
-
-=back
-
-=head1 SEE ALSO
-
-CGI(3)
-
-C4::Output(3)
-
-Digest::MD5(3)
-
-=cut

Index: C4/AuthoritiesMarc.pm
===================================================================
RCS file: C4/AuthoritiesMarc.pm
diff -N C4/AuthoritiesMarc.pm
--- C4/AuthoritiesMarc.pm	20 Oct 2006 01:20:56 -0000	1.37
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,905 +0,0 @@
-package C4::AuthoritiesMarc;
-# 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;
-require Exporter;
-use C4::Context;
-use C4::Koha;
-use Encode;
-use C4::Biblio;
-
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-	&AUTHgettagslib
-	&AUTHfindsubfield
-	&AUTHfind_authtypecode
-	&AUTHaddauthority
-	&AUTHmodauthority
-	&AUTHdelauthority
-	&AUTHaddsubfield
-
-	&AUTHfind_marc_from_kohafield
-	&AUTHgetauth_type
-	&AUTHcount_usage
-	&getsummary
-	&authoritysearch
-	&XMLgetauthority
-	&XMLgetauthorityhash
-	&XML_readline_withtags
-	&merge
-	&FindDuplicateauth
-	&ZEBRAdelauthority
- );
-
-sub AUTHfind_marc_from_kohafield {
-    my ( $dbh, $kohafield,$authtypecode ) = @_;
-    return 0, 0 unless $kohafield;
-$authtypecode="" unless $authtypecode;
-my $marcfromkohafield;
-	my $sth = $dbh->prepare("select tagfield,tagsubfield from auth_subfield_structure where kohafield= ? and authtypecode=? ");
-	$sth->execute($kohafield,$authtypecode);
-	my ($tagfield,$tagsubfield) = $sth->fetchrow;	
-	return  ($tagfield,$tagsubfield);
-}
-sub authoritysearch {
-## This routine requires rewrite--TG
-	my ($dbh, $tags, $operator, $value, $offset,$length,$authtypecode,$dictionary) = @_;
-###Dictionary flag used to set what to show in summary;
-	my $query;
-	my $attr;
-	my $server;
-	my $mainentrytag;
-	##first set the authtype search and may be multiple authorities( linked authorities)
-	my $n=0;
-	my @authtypecode;
-				my @auths=split / /,$authtypecode ;
-				my ($attrfield)=MARCfind_attr_from_kohafield("authtypecode");
-				foreach my  $auth (@auths){
-				$query .=$attrfield." ".$auth." "; ##No truncation on authtype
-				push @authtypecode ,$auth;
-				$n++;
-				}
-			if ($n>1){
-			 $query= "\@or ".$query;
-			}
-	
-	my $dosearch;
-	my $and;
-	my $q2;
-	for(my $i = 0 ; $i <= $#{$value} ; $i++)
-	{
-
-	if (@$value[$i]){
-	##If mainentry search $a tag
-		if (@$tags[$i] eq "mainentry") {
-		 ($attr)=MARCfind_attr_from_kohafield("mainentry")." ";		
-		}else{
-		($attr) =MARCfind_attr_from_kohafield("allentry")." ";
-		}
-		if (@$operator[$i] eq 'phrase') {
-			 $attr.="  \@attr 4=1  \@attr 5=100  \@attr 6=3 ";##Phrase, No truncation,all of subfield field must match
-		
-		} else {
-		
-			 $attr .=" \@attr 4=6  \@attr 5=1  ";## Word list, right truncated, anywhere
-		}		 
-	
-		
-		$and .=" \@and " ;
-		$attr =$attr."\"".@$value[$i]."\"";
-		$q2 .=$attr;
-	$dosearch=1;		
-	}#if value		
-		
-	}## value loop
-##Add how many queries generated
-$query= $and.$query.$q2;
-#warn $query;
-
-$offset=0 unless $offset;
-my $counter = $offset;
-$length=10 unless $length;
-my @oAuth;
-my $i;
- $oAuth[0]=C4::Context->Zconn("authorityserver");
-my ($mainentry)=MARCfind_attr_from_kohafield("mainentry");
-my ($allentry)=MARCfind_attr_from_kohafield("allentry");
-
-$query="\@attr 2=102 \@or \@or ".$query." \@attr 7=1 ".$mainentry." 0 \@attr 7=1 ".$allentry." 1"; ## sort on mainfield and subfields
-
-
-my $oAResult;
- $oAResult= $oAuth[0]->search_pqf($query) ; 
-while (($i = ZOOM::event(\@oAuth)) != 0) {
-    my $ev = $oAuth[$i-1]->last_event();
-#   warn("Authority ", $i-1, ": event $ev (", ZOOM::event_str($ev), ")\n");
-    last if $ev == ZOOM::Event::ZEND;
-}
- my($error, $errmsg, $addinfo, $diagset) = $oAuth[0]->error_x();
-    if ($error) {
-	warn  "oAuth error: $errmsg ($error) $addinfo $diagset\n";
-	goto NOLUCK;
-    }
-
-
-my $nbresults;
- $nbresults=$oAResult->size();
-my $nremains=$nbresults;	
-	my @result = ();
-	my @finalresult = ();
-
-if ($nbresults>0){
-
-##Find authid and linkid fields
-
-
-while (($counter < $nbresults) && ($counter < ($offset + $length))) {
-##Here we have to extract MARC record and $authid from ZEBRA AUTHORITIES
-my $rec=$oAResult->record($counter);
-my $marcdata=$rec->raw();
-my $authrecord=Encode::decode("utf8",$marcdata);
-$authrecord=XML_xml2hash_onerecord($authrecord);		
-my @linkids;	
-my $separator=C4::Context->preference('authoritysep');
-my $linksummary=" ".$separator;	
-my $authid=XML_readline_onerecord($authrecord,"authid","authorities");	
-my @linkid=XML_readline_asarray($authrecord,"linkid","authorities");##May have many linked records	
-	
-	foreach my $linkid (@linkid){
-		my $linktype=AUTHfind_authtypecode($dbh,$linkid);
-		my $linkrecord=XMLgetauthorityhash($dbh,$linkid);
-		$linksummary.="<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href='detail.pl?authid=$linkid'>".getsummary($dbh,$linkrecord,$linkid,$linktype).".</a>".$separator;
-		
- 	}
-my  $summary;
-unless ($dictionary){
- $summary=getsummary($dbh,$authrecord,$authid,$authtypecode);
-$summary="<a href='detail.pl?authid=$authid'>".$summary.".</a>";
-	if ( $linksummary ne " ".$separator){
-	$summary="<b>".$summary."</b>".$linksummary;
-	}
-}else{
- $summary=getdictsummary($dbh,$authrecord,$authid,$authtypecode);
-}
-my $toggle;
-	if ($counter % 2) {
-		$toggle="#ffffcc";
-	} else {
-		$toggle="white";
-	}
-my %newline;
-	$newline{'toggle'}=$toggle;	
-	$newline{summary} = $summary;
-	$newline{authid} = $authid;
-	$newline{linkid} = $linkid[0];
-	$newline{even} = $counter % 2;
-	$counter++;
-	push @finalresult, \%newline;
-	}## while counter
-
-
-for (my $z=0; $z<$length; $z++){
-		$finalresult[$z]{used}=AUTHcount_usage($finalresult[$z]{authid});
-	
- }# all $z's
-
-
-}## if nbresult
-NOLUCK:
-$oAResult->destroy();
-$oAuth[0]->destroy();
-
-	return (\@finalresult, $nbresults);
-}
-
-
-
-sub AUTHcount_usage {
-	my ($authid) = @_;
-### try ZOOM search here
-my @oConnection;
-$oConnection[0]=C4::Context->Zconn("biblioserver");
-my $query;
-my ($attrfield)=MARCfind_attr_from_kohafield("authid");
-$query= $attrfield." ".$authid;
-
-my $oResult = $oConnection[0]->search_pqf($query);
-my $event;
-my $i;
-   while (($i = ZOOM::event(\@oConnection)) != 0) {
-	$event = $oConnection[$i-1]->last_event();
-	last if $event == ZOOM::Event::ZEND;
-   }# while
-my $result=$oResult->size() ;
-	return ($result);
-}
-
-
-
-sub AUTHfind_authtypecode {
-	my ($dbh,$authid) = @_;
-	my $sth = $dbh->prepare("select authtypecode from auth_header where authid=?");
-	$sth->execute($authid);
-	my ($authtypecode) = $sth->fetchrow;
-	return $authtypecode;
-}
- 
-
-sub AUTHgettagslib {
-	my ($dbh,$forlibrarian,$authtypecode)= @_;
-	$authtypecode="" unless $authtypecode;
-	my $sth;
-	my $libfield = ($forlibrarian eq 1)? 'liblibrarian' : 'libopac';
-
-
-	# check that authority exists
-	$sth=$dbh->prepare("select count(*) from auth_tag_structure where authtypecode=?");
-	$sth->execute($authtypecode);
-	my ($total) = $sth->fetchrow;
-	$authtypecode="" unless ($total >0);
-	$sth= $dbh->prepare(
-"select tagfield,liblibrarian,libopac,mandatory,repeatable from auth_tag_structure where authtypecode=? order by tagfield"
-    );
-
-$sth->execute($authtypecode);
-	 my ( $liblibrarian, $libopac, $tag, $res, $tab, $mandatory, $repeatable );
-
-    while ( ( $tag, $liblibrarian, $libopac, $mandatory, $repeatable ) = $sth->fetchrow ) {
-        $res->{$tag}->{lib}        = ($forlibrarian or !$libopac)?$liblibrarian:$libopac;
-        $res->{$tab}->{tab}        = "";            # XXX
-        $res->{$tag}->{mandatory}  = $mandatory;
-        $res->{$tag}->{repeatable} = $repeatable;
-    }
-	$sth=      $dbh->prepare("select tagfield,tagsubfield,liblibrarian,libopac,tab, mandatory, repeatable,authorised_value,authtypecode,value_builder,seealso,hidden,isurl,link from auth_subfield_structure where authtypecode=? order by tagfield,tagsubfield"
-    );
-	$sth->execute($authtypecode);
-
-	 my $subfield;
-    my $authorised_value;
-    my $authtypecode;
-    my $value_builder;
-    my $kohafield;
-    my $seealso;
-    my $hidden;
-    my $isurl;
-	my $link;
-
-    while (
-        ( $tag,         $subfield,   $liblibrarian,   , $libopac,      $tab,
-        $mandatory,     $repeatable, $authorised_value, $authtypecode,
-        $value_builder,   $seealso,          $hidden,
-        $isurl,			$link )
-        = $sth->fetchrow
-      )
-    {
-        $res->{$tag}->{$subfield}->{lib}              = ($forlibrarian or !$libopac)?$liblibrarian:$libopac;
-        $res->{$tag}->{$subfield}->{tab}              = $tab;
-        $res->{$tag}->{$subfield}->{mandatory}        = $mandatory;
-        $res->{$tag}->{$subfield}->{repeatable}       = $repeatable;
-        $res->{$tag}->{$subfield}->{authorised_value} = $authorised_value;
-        $res->{$tag}->{$subfield}->{authtypecode}     = $authtypecode;
-        $res->{$tag}->{$subfield}->{value_builder}    = $value_builder;
-        $res->{$tag}->{$subfield}->{seealso}          = $seealso;
-        $res->{$tag}->{$subfield}->{hidden}           = $hidden;
-        $res->{$tag}->{$subfield}->{isurl}            = $isurl;
-        $res->{$tag}->{$subfield}->{link}            = $link;
-    }
-    return $res;
-}
-
-sub AUTHaddauthority {
-# pass the XML hash to this function, and it will create the records in the authority table
-	my ($dbh,$record,$authid,$authtypecode) = @_;
-# if authid empty => true add, find a new authid number
-	if (!$authid) {
-	my	$sth=$dbh->prepare("select max(authid) from auth_header");
-		$sth->execute;
-		($authid)=$sth->fetchrow;
-		$authid=$authid+1;
-	}	
-
-##Modified record may also come here use REPLACE -- bulk import comes here
-XML_writeline($record,"authid",$authid,"authorities");
-XML_writeline($record,"authtypecode",$authtypecode,"authorities");
-my $xml=XML_hash2xml($record);
-	my $sth=$dbh->prepare("REPLACE auth_header set marcxml=?,  authid=?,authtypecode=?,datecreated=now()");
-	$sth->execute($xml,$authid,$authtypecode);
-	$sth->finish;	
-	ZEBRAop($dbh,$authid,'specialUpdate',"authorityserver");
-## If the record is linked to another update the linked authorities with new authid
-my @linkids=XML_readline_asarray($record,"linkid","authorities");
-	foreach my $linkid (@linkids){
-	##Modify the record of linked 
-	AUTHaddlink($dbh,$linkid,$authid);
-	}
-return ($authid);
-}
-
-sub AUTHaddlink{
-my ($dbh,$linkid,$authid)=@_;
-my $record=XMLgetauthorityhash($dbh,$linkid);
-my $authtypecode=AUTHfind_authtypecode($dbh,$linkid);
-#warn "adding l:$linkid,a:$authid,auth:$authtypecode";
-XML_writeline($record,"linkid",$authid,"authorities");
-my $xml=XML_hash2xml($record);
-$dbh->do("lock tables header WRITE");
-	my $sth=$dbh->prepare("update auth_header set marcxml=? where authid=?");
-	$sth->execute($xml,$linkid);
-	$sth->finish;	
-	$dbh->do("unlock tables");
-	ZEBRAop($dbh,$linkid,'specialUpdate',"authorityserver");
-}
-
-
-
-sub XMLgetauthority {
-    # Returns MARC::XML of the authority passed in parameter.
-    my ( $dbh, $authid ) = @_;
-    my $sth =  $dbh->prepare("select marcxml from auth_header where authid=? "  );
-    $sth->execute($authid);
- my ($marcxml)=$sth->fetchrow;
-	$marcxml=Encode::decode('utf8',$marcxml);
- return ($marcxml);
-}
-
-sub XMLgetauthorityhash {
-## Utility to return  hashed MARCXML
-my ($dbh,$authid)=@_;
-my $xml=XMLgetauthority($dbh,$authid);
-my $xmlhash=XML_xml2hash_onerecord($xml);
-return $xmlhash;
-}
-
-
-
-
-sub AUTHgetauth_type {
-	my ($authtypecode) = @_;
-	my $dbh=C4::Context->dbh;
-	my $sth=$dbh->prepare("select * from auth_types where authtypecode=?");
-	$sth->execute($authtypecode);
-	return $sth->fetchrow_hashref;
-}
-
-
-sub AUTHmodauthority {
-## $record is expected to be an xmlhash
-	my ($dbh,$authid,$record,$authtypecode)=@_;
-	my ($oldrecord)=&XMLgetauthorityhash($dbh,$authid);
-### This equality is very dodgy ,It porobaby wont work
-	if ($oldrecord eq $record) {
-		return $authid;
-	}
-##
-my $sth=$dbh->prepare("update auth_header set marcxml=? where authid=?");
-# find if linked records exist and delete the link in them
-my @linkids=XML_readline_asarray($oldrecord,"linkid","authorities");
-
-	foreach my $linkid (@linkids){
-		##Modify the record of linked 
-		my $linkrecord=XMLgetauthorityhash($dbh,$linkid);
-		my $linktypecode=AUTHfind_authtypecode($dbh,$linkid);
-		my @linkfields=XML_readline_asarray($linkrecord,"linkid","authorities");
-		my $updated;
-		       foreach my $linkfield (@linkfields){
-			if ($linkfield eq $authid){
-				XML_writeline_id($linkrecord,"linkid",$linkfield,"","authorities");
-				$updated=1;
-			}
-		       }#foreach linkfield
-			my $linkedxml=XML_hash2xml($linkrecord);
-			if ($updated==1){
-			$sth->execute($linkedxml,$linkid);
-			ZEBRAop($dbh,$linkid,'specialUpdate',"authorityserver");
-			}
-	
-	}#foreach linkid
-
-#Now rewrite the $record to table with an add
-$authid=AUTHaddauthority($dbh,$record,$authid,$authtypecode);
-
-
-### If a library thinks that updating all biblios is a long process and wishes to leave that to a cron job to use merge_authotities.pl
-### they should have a system preference "dontmerge=1" otherwise by default biblios will be updated
-
-if (C4::Context->preference('dontmerge') ){
-# save the file in localfile/modified_authorities
-	my $cgidir = C4::Context->intranetdir ."/cgi-bin";
-	unless (opendir(DIR, "$cgidir")) {
-			$cgidir = C4::Context->intranetdir."/";
-	} 
-
-	my $filename = $cgidir."/localfile/modified_authorities/$authid.authid";
-	open AUTH, "> $filename";
-	print AUTH $authid;
-	close AUTH;
-}else{
-	&merge($dbh,$authid,$record,$authid,$record);
-}
-return $authid;
-}
-
-sub AUTHdelauthority {
-	my ($dbh,$authid,$keep_biblio) = @_;
-
-# if the keep_biblio is set to 1, then authority entries in biblio are preserved.
-# FIXME : delete or not in biblio tables (depending on $keep_biblio flag) is not implemented
-ZEBRAop($dbh,$authid,"recordDelete","authorityserver");
-}
-
-sub ZEBRAdelauthority {
-my ($dbh,$authid)=@_;
-	$dbh->do("delete from auth_header where authid=$authid") ;
-}
-
-sub AUTHfind_authtypecode {
-	my ($dbh,$authid) = @_;
-	my $sth = $dbh->prepare("select authtypecode from auth_header where authid=?");
-	$sth->execute($authid);
-	my ($authtypecode) = $sth->fetchrow;
-	return $authtypecode;
-}
-
-
-sub FindDuplicateauth {
-### Should receive an xmlhash
-	my ($record,$authtypecode)=@_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("select auth_tag_to_report from auth_types where authtypecode=?");
-	$sth->execute($authtypecode);
-	my ($auth_tag_to_report) = $sth->fetchrow;
-	$sth->finish;
-	# build a request for authoritysearch
-	my (@tags, @and_or, @excluding, @operator, @value, $offset, $length);
-	
-#	if ($record->field($auth_tag_to_report)) {
-				push @tags, $auth_tag_to_report;
-				push @operator, "all";
-				 @value, XML_readline_asarray($record,"","",$auth_tag_to_report);
-#		 	}
- 
-	my ($finalresult,$nbresult) = authoritysearch($dbh,\@tags,\@and_or,\@excluding,\@operator,\@value,0,10,$authtypecode);
-	# there is at least 1 result => return the 1st one
-	if ($nbresult>0) {
-		return @$finalresult[0]->{authid},@$finalresult[0]->{summary};
-	}
-	# no result, returns nothing
-	return;
-}
-
-sub getsummary{
-## give this an XMLhash record to return summary
-my ($dbh,$record,$authid,$authtypecode)=@_;
- my $authref = getauthtype($authtypecode);
-		my $summary = $authref->{summary};
-		# if the library has a summary defined, use it. Otherwise, build a standard one
-	if ($summary) {
-			my $fields = $record->{'datafield'};
-			foreach my $field (@$fields) {
-				my $tag = $field->{'tag'};				
-				if ($tag<10) {
-				my $tagvalue = XML_readline_onerecord($record,"","",$field->{tag});
-				$summary =~ s/\[(.?.?.?.?)$tag\*(.*?)]/$1$tagvalue$2\[$1$tag$2]/g;
-				} else {
-					my @subf = XML_readline_withtags($record,"","",$tag);
-					for my $i (0..$#subf) {
-						my $subfieldcode = $subf[$i][0];
-						my $subfieldvalue = $subf[$i][1];
-						my $tagsubf = $tag.$subfieldcode;
-						$summary =~ s/\[(.?.?.?.?)$tagsubf(.*?)]/$1$subfieldvalue$2\[$1$tagsubf$2]/g;
-					}## each subf
-				}#tag >10
-			}##each field
-			$summary =~ s/\[(.*?)]//g;
-			$summary =~ s/\n/<br>/g;
-	} else {
-## $summary did not exist create a standard summary
-			my $heading; # = $authref->{summary};
-			my $altheading;
-			my $seeheading;
-			my $see;
-			my $fields = $record->{datafield};
-			if (C4::Context->preference('marcflavour') eq 'UNIMARC') {
-			# construct UNIMARC summary, that is quite different from MARC21 one
-			foreach my $field (@$fields) {
-				# accepted form
-				if ($field->{tag} = ~/'2..'/) {
-					foreach my $subfield ("a".."z"){
-					## Fixme-- if UNICODE uses numeric subfields as well add them
-					$heading.=XML_readline_onerecord($record,"","",$field->{tag},$subfield); 
-					}
-				}##tag 2..
-				# rejected form(s)
-				if ($field->{tag} = ~/'4..'/) {
-					my $value;
-					foreach my $subfield ("a".."z"){
-					## Fixme-- if UNICODE uses numeric subfields as well add them
-					$value.=XML_readline_onerecord($record,"","",$field->{tag},$subfield);
-					}
-					$summary.= "&nbsp;&nbsp;&nbsp;<i>".$value."</i><br/>";
-					$summary.= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>see:</i> ".$heading."<br/>";
-				}##tag 4..
-				# see :
-				if ($field->{tag} = ~/'5..'/) {
-					my $value;
-					foreach my $subfield ("a".."z"){
-					## Fixme-- if UNICODE uses numeric subfields as well add them
-					$value.=XML_readline_onerecord($record,"","",$field->{tag},$subfield);
-					}
-					$summary.= "&nbsp;&nbsp;&nbsp;<i>".$value."</i><br/>";
-					$summary.= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>see:</i> ".$heading."<br/>";
-				}# tag 5..
-				# // form
-				if ($field->{tag} = ~/'7..'/) {
-					my $value;
-					foreach my $subfield ("a".."z"){
-					## Fixme-- if UNICODE uses numeric subfields as well add them
-					$value.=XML_readline_onerecord($record,"","",$field->{tag},$subfield);
-					}
-					$seeheading.= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>see also:</i> ".$value."<br />";	
-					$altheading.= "&nbsp;&nbsp;&nbsp;".$value."<br />";
-					$altheading.= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>see also:</i> ".$heading."<br />";
-				}# tag 7..
-			}## Foreach fields
-				$summary = "<b>".$heading."</b><br />".$seeheading.$altheading.$summary;	
-		     } else {
-			# construct MARC21 summary
-			foreach my $field (@$fields) {
-				my $tag="1..";
-				  if($field->{tag}  =~ /^$tag/) {
-					      if ($field->{tag} eq '150') {
-						my $value;
-						foreach my $subfield ("a".."z"){
-						 $value=XML_readline_onerecord($record,"","","150",$subfield); 
-						$heading.="\$".$subfield.$value if $value;
-							}
-					      }else{				
-						foreach my $subfield ("a".."z"){
-						$heading.=XML_readline_onerecord($record,"","",$field->{tag},$subfield); 
-							}
-					     }### tag 150 or else
-				   }##tag 1..
-				my $tag="4..";
-				 if($field->{tag}  =~ /^$tag/) {
-					foreach my $subfield ("a".."z"){
-						$seeheading.=XML_readline_onerecord($record,"","",$field->{tag},$subfield); 
-						}
-					$seeheading.= "&nbsp;&nbsp;&nbsp;".$seeheading."<br />";
-					$seeheading.= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>see:</i> ".$seeheading."<br />";	
-				} #tag 4..
-				my $tag="5..";
-				 if($field->{tag}  =~ /^$tag/) {
-					my $value;
-					foreach my $subfield ("a".."z"){
-						$value.=XML_readline_onerecord($record,"","",$field->{tag},$subfield); 
-						}
-					$seeheading.= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>see also:</i> ".$value."<br />";	
-					$altheading.= "&nbsp;&nbsp;&nbsp;".$value."<br />";
-					$altheading.= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>see also:</i> ".$altheading."<br />";
-				}#tag 5..
-					
-			}##for each field
-		    $summary.=$heading.$seeheading.$altheading;		
-		}##USMARC vs UNIMARC
-	}###Summary exists or not
-return $summary;
-}
-sub getdictsummary{
-## give this a XML record to return a brief summary
-my ($dbh,$record,$authid,$authtypecode)=@_;
- my $authref = getauthtype($authtypecode);
-		my $summary = $authref->{summary};
-		my $fields = $record->{'datafield'};
-		# if the library has a summary defined, use it. Otherwise, build a standard one
-	if ($summary) {
-			foreach my $field (@$fields) {
-				my $tag = $field->{'tag'};				
-				if ($tag<10) {
-				my $tagvalue = XML_readline_onerecord($record,"","",$field->{tag});
-				$summary =~ s/\[(.?.?.?.?)$tag\*(.*?)]/$1$tagvalue$2\[$1$tag$2]/g;
-				} else {
-					my @subf = XML_readline_withtags($record,"","",$tag);
-					for my $i (0..$#subf) {
-						my $subfieldcode = $subf[$i][0];
-						my $subfieldvalue = $subf[$i][1];
-						my $tagsubf = $tag.$subfieldcode;
-						$summary =~ s/\[(.?.?.?.?)$tagsubf(.*?)]/$1$subfieldvalue$2\[$1$tagsubf$2]/g;
-					}## each subf
-				}#tag >10
-			}##each field
-			$summary =~ s/\[(.*?)]//g;
-			$summary =~ s/\n/<br>/g;
-		} else {
-			my $heading; # = $authref->{summary};
-			my $altheading;
-			my $seeheading;
-			my $see;
-			my $fields = $record->{datafield};
-			if (C4::Context->preference('marcflavour') eq 'UNIMARC') {
-			# construct UNIMARC summary, that is quite different from MARC21 one
-			foreach my $field (@$fields) {
-				# accepted form
-				if ($field->{tag} = ~/'2..'/) {
-					foreach my $subfield ("a".."z"){
-					## Fixme-- if UNICODE uses numeric subfields as well add them
-					$heading.=XML_readline_onerecord($record,"","",$field->{tag},$subfield); 
-					}
-				}##tag 2..
-			}
-				$summary = $heading;	
-			} else {
-			# construct MARC21 summary
-				foreach my $field (@$fields) {	
-					my $tag="1..";
-				 	 if($field->{tag}  =~ /^$tag/) {			
-						$heading.= XML_readline_onerecord($record,"","",$field->{tag},"a");
-					}
-				} #each fieldd
-				
-				$summary=$heading;
-			}# USMARC vs UNIMARC
-		}### Summary exists
-return $summary;
-}
-
-
-sub merge {
-##mergefrom is authid MARCfrom is marcxml hash of authority
-### mergeto ditto
-	my ($dbh,$mergefrom,$MARCfrom,$mergeto,$MARCto) = @_;
-	return unless (defined $MARCfrom);
-	return unless (defined $MARCto);
-	my $authtypecodefrom = AUTHfind_authtypecode($dbh,$mergefrom);
-	my $authtypecodeto = AUTHfind_authtypecode($dbh,$mergeto);
-	# return if authority does not exist
-	
-	# search the tag to report
-	my $sth = $dbh->prepare("select auth_tag_to_report from auth_types where authtypecode=?");
-	$sth->execute($authtypecodefrom);
-	my ($auth_tag_to_report) = $sth->fetchrow;
-	my @record_to;
-	# search all biblio tags using this authority.
-	$sth = $dbh->prepare("select distinct tagfield from biblios_subfield_structure where authtypecode=? ");
-	$sth->execute($authtypecodefrom);
-my @tags_using_authtype;
-	while (my ($tagfield) = $sth->fetchrow) {
-		push @tags_using_authtype,$tagfield ;
-	}
-## The subfield for linking authorities is stored in koha_attr named auth_biblio_link_subf
-## This way we may use whichever subfield we want without harcoding 9 in
-my ($dummyfield,$tagsubfield)=MARCfind_marc_from_kohafield("auth_biblio_link_subf","biblios");
-	# now, find every biblio using this authority
-### try ZOOM search here
-my @oConnection;
- $oConnection[0]=C4::Context->Zconn("biblioserver");
-##$oConnection[0]->option(elementSetName=>"biblios"); ##  Needs a fix
-my $query;
-my ($attr2)=MARCfind_attr_from_kohafield("authid");
-my $attrfield.=$attr2;
-$query= $attrfield." ".$mergefrom;
-my ($event,$i);
-my $oResult = $oConnection[0]->search_pqf($query);
-  while (($i = ZOOM::event(\@oConnection)) != 0) {
-	$event = $oConnection[$i-1]->last_event();
-	last if $event == ZOOM::Event::ZEND;
-   }# while event
-my $count=$oResult->size();
-my @reccache;
-my $z=0;
-while ( $z<$count ) {
-my $rec;
-	$rec=$oResult->record($z);
-	my $marcdata = $rec->raw();
-my $koharecord=Encode::decode("utf8",$marcdata);
-$koharecord=XML_xml2hash($koharecord);
- my ( $xmlrecord, @itemsrecord) = XML_separate($koharecord);
-
-push @reccache, $xmlrecord;
-$z++;
-}
-$oResult->destroy();
-$oConnection[0]->destroy();
-      foreach my $xmlhash (@reccache){
-	my $update;
-      	foreach my $tagfield (@tags_using_authtype){
-
-	###Change the authid in biblio
-	$xmlhash=XML_writeline_id($xmlhash,$mergefrom,$mergeto,$tagfield,$tagsubfield);
-	### delete all subfields of bibliorecord
-	$xmlhash=XML_delete_withid($xmlhash,$mergeto,$tagfield,$tagsubfield);
-	####Read all the data in from authrecord
-	my @record_to=XML_readline_withtags($MARCto,"","",$auth_tag_to_report);
-	##Write the data to biblio
-		foreach my $subfield (@record_to) {
-		## Replace the data in MARCXML with the new matching authid
-		XML_writeline_withid($xmlhash,$tagsubfield,$mergeto,$subfield->[1],$tagfield,$subfield->[0]);
-		$update=1;
-		}#foreach  $subfield		
-       	}#foreach tagfield
-		if ($update==1){
-		my $biblionumber=XML_readline_onerecord($xmlhash,"biblionumber","biblios");
-		my $frameworkcode=MARCfind_frameworkcode($dbh,$biblionumber);
-		NEWmodbiblio($dbh,$biblionumber,$xmlhash,$frameworkcode) ;
-		}
-		
-     }#foreach $xmlhash
-}#sub
-
-sub XML_writeline_withid{
-## Only used in authorities to update biblios with matching authids
-my ($xml,$idsubf,$id,$newvalue,$tag,$subf)=@_;
-my $biblio=$xml->{'datafield'};
-my $updated=0;
-    if ($tag>9){
-	foreach my $data (@$biblio){
-        		if ($data->{'tag'} eq $tag){
-			my @subfields=$data->{'subfield'};
-			foreach my $subfield ( @subfields){
-	 		      foreach my $code ( @$subfield){
-				if ($code->{'code'} eq $idsubf && $code->{'content'} eq $id){
-				###This is the correct tag -- Now reiterate and update
-					my @newsubs;
-					  foreach my $code ( @$subfield){		
-						if ($code->{'code'} eq $subf ){
-						$code->{'content'}=$newvalue;
-						$updated=1;
-						}
-					   push @newsubs, $code;
-					}## each code updated
-					if (!$updated){
-					##Create the subfield if it did not exist	
-			 		push @newsubs,{code=>$subf,content=>$newvalue};
-					$data->{subfield}= \@newsubs;
-					$updated=1;
-		    			 }### created	
-				}### correct tag with id
-	  		      }#each code
-			}##each subfield	
-		}# tag match
-       	 }## each datafield
-    }### tag >9
-return $xml;
-}
-sub XML_delete_withid{
-## Currently  only usedin authorities
-### deletes all the subfields of a matching authid
-my ($xml,$id,$tag,$idsubf)=@_;
-my $biblio=$xml->{'datafield'};
-    if ($tag>9){
-	foreach my $data (@$biblio){
-        		if ($data->{'tag'} eq $tag){
-			my @subfields=$data->{'subfield'};
-			foreach my $subfield ( @subfields){
-	 		      foreach my $code ( @$subfield){
-				if ($code->{'code'} eq $idsubf && $code->{'content'} eq $id){
-				###This is the correct tag -- Now reiterate and delete all but id subfield
-					  foreach my $code ( @$subfield){		
-						if ($code->{'code'} ne $idsubf ){
-						$code->{'content'}="";					
-						}					   
-					  }## each code deleted	
-				}### correct tag with id
-	  		      }#each code
-			}## each subfield	
-		}## tag matches
-       	 }## each datafield
-    }# tag >9
-return $xml;
-}
-
-sub XML_readline_withtags {
-my ($xml,$kohafield,$recordtype,$tag,$subf)=@_;
-#$xml represents one record of MARCXML as perlhashed 
-## returns an array of read fields--useful for reading repeated fields
-### $recordtype is needed for mapping the correct field if supplied
-### If only $tag is given reads the whole tag
-###Returns subfieldcodes as well
-my @value;
- ($tag,$subf)=MARCfind_marc_from_kohafield($kohafield,$recordtype) if $kohafield;
-if ($tag){
-### Only datafields are read
-my $biblio=$xml->{'datafield'};
- if ($tag>9){
-	foreach my $data (@$biblio){
-   	    if ($data->{'tag'} eq $tag){
-		foreach my $subfield ( $data->{'subfield'}){
-		    foreach my $code ( @$subfield){
-			if ($code->{'code'} eq $subf || !$subf){
-			push @value,[$code->{'code'},$code->{'content'}];
-			}
-		   }# each code
-		}# each subfield
-  	   }### tag found
-	}## each tag
-   }##tag >9
-}## if tag 
-return @value;
-}
-
-END { }       # module clean-up code here (global destructor)
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-Paul POULAIN paul.poulain at free.fr
-
-=cut
-
-# $Id: AuthoritiesMarc.pm,v 1.37 2006/10/20 01:20:56 tgarip1957 Exp $
-
-# Revision 1.30  2006/09/06 16:21:03  tgarip1957
-# Clean up before final commits
-#
-# Revision 1.9.2.6  2005/06/07 10:02:00  tipaul
-# porting dictionnary search from head to 2.2. there is now a ... facing titles, author & subject, to search in biblio & authorities existing values.
-#
-# Revision 1.9.2.5  2005/05/31 14:50:46  tipaul
-# fix for authority merging. There was a bug on official installs
-#
-# Revision 1.9.2.4  2005/05/30 11:24:15  tipaul
-# fixing a bug : when a field was repeated, the last field was also repeated. (Was due to the "empty" field in html between fields : to separate fields, in html, an empty field is automatically added. in AUTHhtml2marc, this empty field was not discarded correctly)
-#
-# Revision 1.9.2.3  2005/04/28 08:45:33  tipaul
-# porting FindDuplicate feature for authorities from HEAD to rel_2_2, works correctly now.
-#
-# Revision 1.9.2.2  2005/02/28 14:03:13  tipaul
-# * adding search on "main entry" (ie $a subfield) on a given authority (the "search everywhere" field is still here).
-# * adding a select box to requet "contain" or "begin with" search.
-# * fixing some bug in authority search (related to "main entry" search)
-#
-# Revision 1.9.2.1  2005/02/24 13:12:13  tipaul
-# saving authority modif in a text file. This will be used soon with another script (in crontab). The script in crontab will retrieve every authorityid in the directory localfile/authorities and modify every biblio using this authority. Those modifs may be long. So they can't be done through http, because we may encounter a webserver timeout, and kill the process before end of the job.
-# So, it will be done through a cron job.
-# (/me agree we need some doc for command line scripts)
-#
-# Revision 1.9  2004/12/23 09:48:11  tipaul
-# Minor changes in summary "exploding" (the 3 digits AFTER the subfield were not on the right place).
-#
-# Revision 1.8  2004/11/05 10:11:39  tipaul
-# export auth_count_usage (bugfix)
-#
-# Revision 1.7  2004/09/23 16:13:00  tipaul
-# Bugfix in modification
-#
-# Revision 1.6  2004/08/18 16:00:24  tipaul
-# fixes for authorities management
-#
-# Revision 1.5  2004/07/05 13:37:22  doxulting
-# First step for working authorities
-#
-# Revision 1.4  2004/06/22 11:35:37  tipaul
-# removing % at the beginning of a string to avoid loooonnnngggg searchs
-#
-# Revision 1.3  2004/06/17 08:02:13  tipaul
-# merging tag & subfield in auth_word for better perfs
-#
-# Revision 1.2  2004/06/10 08:29:01  tipaul
-# MARC authority management (continued)
-#
-# Revision 1.1  2004/06/07 07:35:01  tipaul
-# MARC authority management package
-#
-

Index: C4/Biblio.pm
===================================================================
RCS file: C4/Biblio.pm
diff -N C4/Biblio.pm
--- C4/Biblio.pm	15 Nov 2006 01:36:00 -0000	1.187
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,1531 +0,0 @@
-package C4::Biblio;
-# New XML API added by tgarip at neu.edu.tr 25/08/06
-# 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;
-require Exporter;
-use C4::Context;
-use XML::Simple;
-use Encode;
-
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 2.01;
-
- at ISA = qw(Exporter);
-
-# &itemcount removed, now  resides in Search.pm
-#
- at EXPORT = qw(
-
-&getitemtypes
-&getkohafields
-&getshelves
-
-&NEWnewbiblio 
-&NEWnewitem
-&NEWmodbiblio 
-&NEWmoditem
-&NEWdelbiblio 
-&NEWdelitem
-&NEWmodbiblioframework
-
-
-&MARCfind_marc_from_kohafield
-&MARCfind_frameworkcode
-&MARCfind_itemtype
-&MARCgettagslib
-&MARCitemsgettagslib
-
-&MARCfind_attr_from_kohafield
-&MARChtml2xml 
-
-
-&XMLgetbiblio 
-&XMLgetbibliohash
-&XMLgetitem 
-&XMLgetitemhash
-&XMLgetallitems 
-&XML_xml2hash 
-&XML_xml2hash_onerecord
-&XML_hash2xml 
-&XMLmarc2koha
-&XMLmarc2koha_onerecord
-&XML_readline
-&XML_readline_onerecord
-&XML_readline_asarray
-&XML_writeline
-&XML_writeline_id
-&XMLmoditemonefield
-&XMLkoha2marc
-&XML_separate
-&XML_record_header
-&XMLmodLCindex
-&ZEBRAdelbiblio
-&ZEBRAgetrecord   
-&ZEBRAop 
-&ZEBRAopserver 
-&ZEBRA_readyXML 
-&ZEBRA_readyXML_noheader
-&ZEBRAopcommit
-&newbiblio
-&modbiblio
-&DisplayISBN
-
-);
-
-#################### XML XML  XML  XML ###################
-### XML Read- Write functions
-sub XML_readline_onerecord{
-my ($xml,$kohafield,$recordtype,$tag,$subf)=@_;
-#$xml represents one record of MARCXML as perlhashed 
-### $recordtype is needed for mapping the correct field
- ($tag,$subf)=MARCfind_marc_from_kohafield($kohafield,$recordtype) if $kohafield;
-
-if ($tag){
-my $biblio=$xml->{'datafield'};
-my $controlfields=$xml->{'controlfield'};
-my $leader=$xml->{'leader'};
- if ($tag>9){
-	foreach my $data (@$biblio){
-   	    if ($data->{'tag'} eq $tag){
-		foreach my $subfield ( $data->{'subfield'}){
-		    foreach my $code ( @$subfield){
-			if ($code->{'code'} eq $subf){
-			return $code->{'content'};
-			}
-		   }
-		}
-  	   }
-	}
-  }else{
-	if ($tag eq "000" || $tag eq "LDR"){
-		return  $leader->[0] if $leader->[0];
-	}else{
-	     foreach my $control (@$controlfields){
-		if ($control->{'tag'} eq $tag){
-		return	$control->{'content'} if $control->{'content'};
-		}
-	    }
-	}
-   }##tag
-}## if tag is mapped
-return "";
-}
-sub XML_readline_asarray{
-my ($xml,$kohafield,$recordtype,$tag,$subf)=@_;
-#$xml represents one record of MARCXML as perlhashed 
-## returns an array of read fields--useful for readind repeated fields
-### $recordtype is needed for mapping the correct field if supplied
-### If only $tag is give reads the whole tag
-my @value;
- ($tag,$subf)=MARCfind_marc_from_kohafield($kohafield,$recordtype) if $kohafield;
-if ($tag){
-my $biblio=$xml->{'datafield'};
-my $controlfields=$xml->{'controlfield'};
-my $leader=$xml->{'leader'};
- if ($tag>9){
-	foreach my $data (@$biblio){
-   	    if ($data->{'tag'} eq $tag){
-		foreach my $subfield ( $data->{'subfield'}){
-		    foreach my $code ( @$subfield){
-			if ($code->{'code'} eq $subf || !$subf){
-			push @value, $code->{'content'};
-			}
-		   }
-		}
-  	   }
-	}
-  }else{
-	if ($tag eq "000" || $tag eq "LDR"){
-		push @value,  $leader->[0] if $leader->[0];
-	}else{
-	     foreach my $control (@$controlfields){
-		if ($control->{'tag'} eq $tag){
-		push @value,	$control->{'content'} if $control->{'content'};
-
-		}
-	    }
-	}
-   }##tag
-}## if tag is mapped
-return @value;
-}
-
-sub XML_readline{
-my ($xml,$kohafield,$recordtype,$tag,$subf)=@_;
-#$xml represents one record node hashed of holdings or a complete xml koharecord
-### $recordtype is needed for reading the child records( like holdings records) .Otherwise main  record is assumed ( like biblio)
-## holding records are parsed and sent here one by one
-# If kohafieldname given find tag
-
-($tag,$subf)=MARCfind_marc_from_kohafield($kohafield,$recordtype) if $kohafield;
-my @itemresults;
-if ($tag){
-if ($recordtype eq "holdings"){
-	my $item=$xml->{'datafield'};
-	my $hcontrolfield=$xml->{'controlfield'};
-     if ($tag>9){
-	foreach my $data (@$item){
-   	    if ($data->{'tag'} eq $tag){
-		foreach my $subfield ( $data->{'subfield'}){
-		    foreach my $code ( @$subfield){
-			if ($code->{'code'} eq $subf){
-			return $code->{content};
-			}
-		   }
-		}
-  	   }
-	}
-      }else{
-	foreach my $control (@$hcontrolfield){
-		if ($control->{'tag'} eq $tag){
-		return  $control->{'content'};
-		}
-	}
-      }##tag
-
-}else{ ##Not a holding read biblio
-my $biblio=$xml->{'record'}->[0]->{'datafield'};
-my $controlfields=$xml->{'record'}->[0]->{'controlfield'};
- if ($tag>9){
-	foreach my $data (@$biblio){
-   	    if ($data->{'tag'} eq $tag){
-		foreach my $subfield ( $data->{'subfield'}){
-		    foreach my $code ( @$subfield){
-			if ($code->{'code'} eq $subf){
-			return $code->{'content'};
-			}
-		   }
-		}
-  	   }
-	}
-  }else{
-	
-	foreach my $control (@$controlfields){
-		if ($control->{'tag'} eq $tag){
-		return	$control->{'content'}if $control->{'content'};
-		}
-	}
-   }##tag
-}## Holding or not
-}## if tag is mapped
-return "";
-}
-
-sub XML_writeline{
-## This routine modifies one line of marcxml record hash
-my ($xml,$kohafield,$newvalue,$recordtype,$tag,$subf)=@_;
-$newvalue= Encode::decode('utf8',$newvalue) if $newvalue;
-my $biblio=$xml->{'datafield'};
-my $controlfield=$xml->{'controlfield'};
- ($tag,$subf)=MARCfind_marc_from_kohafield($kohafield,$recordtype) if $kohafield;
-my $updated;
-    if ($tag>9){
-	foreach my $data (@$biblio){
-        		if ($data->{'tag'} eq $tag){
-			my @subfields=$data->{'subfield'};
-			my @newsubs;
-			foreach my $subfield ( @subfields){
-	 		      foreach my $code ( @$subfield){
-				if ($code->{'code'} eq $subf){	
-				$code->{'content'}=$newvalue;
-				$updated=1;
-				}
-			      push @newsubs,$code;
-	  		      }
-			}
-		     if (!$updated){	
-			 push @newsubs,{code=>$subf,content=>$newvalue};
-			$data->{subfield}= \@newsubs;
-			$updated=1;
-		     }	
-		}
-       	 }
-	## Tag did not exist
-	     if (!$updated){
-		if ($subf){	
-	                push @$biblio,
-                                           {
-                                             'ind1' => ' ',
-                                             'ind2' => ' ',
-                                             'subfield' => [
-                                                             {
-                                                               'content' =>$newvalue,
-                                                               'code' => $subf
-                                                             }
-                                                           ],
-                                             'tag' =>$tag
-                                           } ;
-		   }else{
-	                push @$biblio,
-                                           {
-                                             'ind1' => ' ',
-                                             'ind2' => ' ',
-                                             'tag' =>$tag
-                                           } ;
-		   }								
-	   }## created now
-    }elsif ($tag>0){
-	foreach my $control (@$controlfield){
-		if ($control->{'tag'} eq $tag){
-			$control->{'content'}=$newvalue;
-			$updated=1;
-		}
-	     }
-	 if (!$updated){
-	   push @$controlfield,{tag=>$tag,content=>$newvalue};     
-	}
-   }
-return $xml;
-}
-
-sub XML_writeline_id {
-### This routine is similar to XML_writeline but replaces a given value and do not create a new field
-## Useful for repeating fields
-## Currently  usedin authorities
-my ($xml,$oldvalue,$newvalue,$tag,$subf)=@_;
-$newvalue= Encode::decode('utf8',$newvalue) if $newvalue;
-my $biblio=$xml->{'datafield'};
-my $controlfield=$xml->{'controlfield'};
-    if ($tag>9){
-	foreach my $data (@$biblio){
-        		if ($data->{'tag'} eq $tag){
-			my @subfields=$data->{'subfield'};
-			foreach my $subfield ( @subfields){
-	 		      foreach my $code ( @$subfield){
-				if ($code->{'code'} eq $subf && $code->{'content'} eq $oldvalue){	
-				$code->{'content'}=$newvalue;
-				}
-	  		      }
-			}	
-		}
-       	 }
-    }else{
-	foreach my $control(@$controlfield){
-		if ($control->{'tag'} eq $tag  && $control->{'content'} eq $oldvalue ){
-			$control->{'content'}=$newvalue;
-		}
-	     }
-   }
-return $xml;
-}
-
-sub XML_xml2hash{
-##make a perl hash from xml file
-my ($xml)=@_;
-  my $hashed = XMLin( $xml ,KeyAttr =>['leader','controlfield','datafield'],ForceArray => ['leader','controlfield','datafield','subfield','holdings','record'],KeepRoot=>0);
-return $hashed;
-}
-
-sub XML_separate{
-##Separates items from biblio
-my $hashed=shift;
-my $biblio=$hashed->{record}->[0];
-my @items;
-my $items=$hashed->{holdings}->[0]->{record};
-foreach my $item (@$items){
- push @items,$item;
-}
-return ($biblio, at items);
-}
-
-sub XML_xml2hash_onerecord{
-##make a perl hash from xml file
-my ($xml)=@_;
-return undef unless $xml;
-  my $hashed = XMLin( $xml ,KeyAttr =>['leader','controlfield','datafield'],ForceArray => ['leader','controlfield','datafield','subfield'],KeepRoot=>0);
-return $hashed;
-}
-sub XML_hash2xml{
-## turn a hash back to xml
-my ($hashed,$root)=@_;
-$root="record" unless $root;
-my $xml= XMLout($hashed,KeyAttr=>['leader','controlfıeld','datafield'],NoSort => 1,AttrIndent => 0,KeepRoot=>0,SuppressEmpty => 1,RootName=>$root );
-return $xml;
-}
-
-
-
-sub XMLgetbiblio {
-    # Returns MARC::XML of the biblionumber passed in parameter.
-    my ( $dbh, $biblionumber ) = @_;
-    my $sth =      $dbh->prepare("select marcxml from biblio where biblionumber=? "  );
-    $sth->execute( $biblionumber);
-   my ($marcxml)=$sth->fetchrow;
-	$marcxml=Encode::decode('utf8',$marcxml);
- return ($marcxml);
-}
-
-sub XMLgetbibliohash{
-## Utility to return s hashed MARCXML
-my ($dbh,$biblionumber)=@_;
-my $xml=XMLgetbiblio($dbh,$biblionumber);
-my $xmlhash=XML_xml2hash_onerecord($xml);
-return $xmlhash;
-}
-
-sub XMLgetitem {
-   # Returns MARC::XML   of the item passed in parameter uses either itemnumber or barcode
-    my ( $dbh, $itemnumber,$barcode ) = @_;
-my $sth;
-if ($itemnumber){
-   $sth = $dbh->prepare("select marcxml from items  where itemnumber=?"  ); 
-    $sth->execute($itemnumber);
-}else{
- $sth = $dbh->prepare("select marcxml from items where barcode=?"  ); 
-    $sth->execute($barcode);
-}
- my ($marcxml)=$sth->fetchrow;
-$marcxml=Encode::decode('utf8',$marcxml);
-    return ($marcxml);
-}
-sub XMLgetitemhash{
-## Utility to return s hashed MARCXML
- my ( $dbh, $itemnumber,$barcode ) = @_;
-my $xml=XMLgetitem( $dbh, $itemnumber,$barcode);
-my $xmlhash=XML_xml2hash_onerecord($xml);
-return $xmlhash;
-}
-
-
-sub XMLgetallitems {
-# warn "XMLgetallitems";
-    # Returns an array of MARC:XML   of the items passed in parameter as biblionumber
-    my ( $dbh, $biblionumber ) = @_;
-my @results;
-my   $sth = $dbh->prepare("select marcxml from items where biblionumber =?"  ); 
-    $sth->execute($biblionumber);
-
- while(my ($marcxml)=$sth->fetchrow_array){
-$marcxml=Encode::decode('utf8',$marcxml);
-    push @results,$marcxml;
-}
-return @results;
-}
-
-sub XMLmarc2koha {
-# warn "XMLmarc2koha";
-##Returns two hashes from KOHA_XML record hashed
-## A biblio hash and and array of item hashes
-	my ($dbh,$xml,$related_record, at fields) = @_;
-	my ($result, at items);
-	
-## if @fields is given do not bother about the rest of fields just parse those
-
-if ($related_record eq "biblios" || $related_record eq "" || !$related_record){
-	if (@fields){
-		foreach my $field(@fields){
-		my $val=&XML_readline($xml,$field,'biblios');
-			$result->{$field}=$val if $val;
-			
-		}
-	}else{
-	my $sth2=$dbh->prepare("SELECT  kohafield from koha_attr where  recordtype like 'biblios' and tagfield is not null" );
-	$sth2->execute();
-	my $field;
-		while ($field=$sth2->fetchrow) {
-		$result->{$field}=&XML_readline($xml,$field,'biblios');
-		}
-	}
-
-## we only need the following for biblio data
-	
-# modify copyrightdate to keep only the 1st year found
-	my $temp = $result->{'copyrightdate'};
-	$temp =~ m/c(\d\d\d\d)/; # search cYYYY first
-	if ($1>0) {
-		$result->{'copyrightdate'} = $1;
-	} else { # if no cYYYY, get the 1st date.
-		$temp =~ m/(\d\d\d\d)/;
-		$result->{'copyrightdate'} = $1;
-	}
-# modify publicationyear to keep only the 1st year found
-	$temp = $result->{'publicationyear'};
-	$temp =~ m/c(\d\d\d\d)/; # search cYYYY first
-	if ($1>0) {
-		$result->{'publicationyear'} = $1;
-	} else { # if no cYYYY, get the 1st date.
-		$temp =~ m/(\d\d\d\d)/;
-		$result->{'publicationyear'} = $1;
-	}
-}
-if ($related_record eq "holdings" || $related_record eq ""  || !$related_record){
-my $holdings=$xml->{holdings}->[0]->{record};
-
-
-	if (@fields){
-	    foreach my $holding (@$holdings){	
-my $itemresult;
-		foreach my $field(@fields){
-		my $val=&XML_readline($holding,$field,'holdings');
-		$itemresult->{$field}=$val if $val;	
-		}
-	    push @items, $itemresult;
-	   }
-	}else{
-	my $sth2=$dbh->prepare("SELECT  kohafield from koha_attr where recordtype like 'holdings' and tagfield is not null" );
-	   foreach my $holding (@$holdings){	
-	   $sth2->execute();
-	    my $field;
-my $itemresult;
-		while ($field=$sth2->fetchrow) {
-		$itemresult->{$field}=&XML_readline($xml,$field,'holdings');
-		}
-	 push @items, $itemresult;
-	   }
-	}
-
-}
-
-	return ($result, at items);
-}
-sub XMLmarc2koha_onerecord {
-# warn "XMLmarc2koha_onerecord";
-##Returns a koha hash from MARCXML hash
-
-	my ($dbh,$xml,$related_record, at fields) = @_;
-	my ($result);
-	
-## if @fields is given do not bother about the rest of fields just parse those
-
-	if (@fields){
-		foreach my $field(@fields){
-		my $val=&XML_readline_onerecord($xml,$field,$related_record);
-			$result->{$field}=$val if $val;			
-		}
-	}else{
-	my $sth2=$dbh->prepare("SELECT  kohafield from koha_attr where  recordtype like ? and tagfield is not null" );
-	$sth2->execute($related_record);
-	my $field;
-		while ($field=$sth2->fetchrow) {
-		$result->{$field}=&XML_readline_onerecord($xml,$field,$related_record);
-		}
-	}
-	return ($result);
-}
-
-sub XMLmodLCindex{
-# warn "XMLmodLCindex";
-my ($dbh,$xmlhash)=@_;
-my ($lc)=XML_readline_onerecord($xmlhash,"classification","biblios");
-my ($cutter)=XML_readline_onerecord($xmlhash,"subclass","biblios");
-
-	if ($lc){
-	$lc.=$cutter;
-	my ($lcsort)=calculatelc($lc);
-	$xmlhash=XML_writeline($xmlhash,"lcsort",$lcsort,"biblios");
-	}
-return $xmlhash;
-}
-
-sub XMLmoditemonefield{
-# This routine takes itemnumber and biblionumber and updates XMLmarc;
-### the ZEBR DB update can wait depending on $donotupdate flag
-my ($dbh,$biblionumber,$itemnumber,$itemfield,$newvalue,$donotupdate)=@_;
-my ($record) = XMLgetitem($dbh,$itemnumber);
-	my $recordhash=XML_xml2hash_onerecord($record);
-   	XML_writeline( $recordhash, $itemfield, $newvalue,"holdings" );	
- if($donotupdate){
-	## Prevent various update calls to zebra wait until all changes finish
-		$record=XML_hash2xml($recordhash);
-		my $sth=$dbh->prepare("update items set marcxml=? where itemnumber=?");
-		$sth->execute($record,$itemnumber);
-		$sth->finish;
-	}else{
-		NEWmoditem($dbh,$recordhash,$biblionumber,$itemnumber);
-  }
-
-}
-
-sub XMLkoha2marc {
-# warn "MARCkoha2marc";
-## This routine  is still used for acqui management
-##Returns a  XML recordhash from a kohahash
-	my ($dbh,$result,$recordtype) = @_;
-###create a basic MARCXML
-# find today's date
-my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
-	$year += 1900;
-	$mon += 1;
-	my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",
-		$year,$mon,$mday,$hour,$min,$sec);
-$year=substr($year,2,2);
-	my $accdate=sprintf("%2d%02d%02d",$year,$mon,$mday);
-my ($titletag,$titlesubf)=MARCfind_marc_from_kohafield("title","biblios");
-##create a dummy record
-my $xml="<record><leader>     naa a22     7ar4500</leader><controlfield tag='xxx'></controlfield><datafield ind1='' ind2='' tag='$titletag'></datafield></record>";
-## Now build XML
-	my $record = XML_xml2hash($xml);
-	my $sth2=$dbh->prepare("SELECT  kohafield from koha_attr where tagfield is not null and recordtype=?");
-	$sth2->execute($recordtype);
-	my $field;
-	while (($field)=$sth2->fetchrow) {
-		$record=XML_writeline($record,$field,$result->{$field},$recordtype) if $result->{$field};
-	}
-return $record;
-}
-
-#
-#
-# MARC MARC MARC MARC MARC MARC MARC MARC MARC MARC MARC MARC MARC MARC MARC MARC MARC MARC MARC
-#
-## Script to deal with MARCXML related tables
-
-
-##Sub to match kohafield to Z3950 -attributes
-
-sub MARCfind_attr_from_kohafield {
-# warn "MARCfind_attr_from_kohafield";
-## returns attribute
-    my (  $kohafield ) = @_;
-    return 0, 0 unless $kohafield;
-
-	my $relations = C4::Context->attrfromkohafield;
-	return ($relations->{$kohafield});
-}
-
-
-sub MARCgettagslib {
-# warn "MARCgettagslib";
-    my ( $dbh, $forlibrarian, $frameworkcode ) = @_;
-    $frameworkcode = "" unless $frameworkcode;
-    my $sth;
-    my $libfield = ( $forlibrarian eq 1 ) ? 'liblibrarian' : 'libopac';
-
-    # check that framework exists
-    $sth =
-      $dbh->prepare(
-        "select count(*) from biblios_tag_structure where frameworkcode=?");
-    $sth->execute($frameworkcode);
-    my ($total) = $sth->fetchrow;
-    $frameworkcode = "" unless ( $total > 0 );
-    $sth =
-      $dbh->prepare(
-"select tagfield,liblibrarian,libopac,mandatory,repeatable from biblios_tag_structure where frameworkcode=? order by tagfield"
-    );
-    $sth->execute($frameworkcode);
-    my ( $liblibrarian, $libopac, $tag, $res, $tab, $mandatory, $repeatable );
-
-    while ( ( $tag, $liblibrarian, $libopac, $mandatory, $repeatable ) = $sth->fetchrow ) {
-        $res->{$tag}->{lib}        = ($forlibrarian or !$libopac)?$liblibrarian:$libopac;
-        $res->{$tab}->{tab}        = "";            # XXX
-        $res->{$tag}->{mandatory}  = $mandatory;
-        $res->{$tag}->{repeatable} = $repeatable;
-    }
-
-    $sth =
-      $dbh->prepare(
-"select tagfield,tagsubfield,liblibrarian,libopac,tab, mandatory, repeatable,authorised_value,authtypecode,value_builder,seealso,hidden,isurl,link from biblios_subfield_structure where frameworkcode=? order by tagfield,tagsubfield"
-    );
-    $sth->execute($frameworkcode);
-
-    my $subfield;
-    my $authorised_value;
-    my $authtypecode;
-    my $value_builder;
-   
-    my $seealso;
-    my $hidden;
-    my $isurl;
-	my $link;
-
-    while (
-        ( $tag,         $subfield,   $liblibrarian,   , $libopac,      $tab,
-        $mandatory,     $repeatable, $authorised_value, $authtypecode,
-        $value_builder,   $seealso,          $hidden,
-        $isurl,			$link )
-        = $sth->fetchrow
-      )
-    {
-        $res->{$tag}->{$subfield}->{lib}              = ($forlibrarian or !$libopac)?$liblibrarian:$libopac;
-        $res->{$tag}->{$subfield}->{tab}              = $tab;
-        $res->{$tag}->{$subfield}->{mandatory}        = $mandatory;
-        $res->{$tag}->{$subfield}->{repeatable}       = $repeatable;
-        $res->{$tag}->{$subfield}->{authorised_value} = $authorised_value;
-        $res->{$tag}->{$subfield}->{authtypecode}     = $authtypecode;
-        $res->{$tag}->{$subfield}->{value_builder}    = $value_builder;
-        $res->{$tag}->{$subfield}->{seealso}          = $seealso;
-        $res->{$tag}->{$subfield}->{hidden}           = $hidden;
-        $res->{$tag}->{$subfield}->{isurl}            = $isurl;
-        $res->{$tag}->{$subfield}->{link}            = $link;
-    }
-    return $res;
-}
-sub MARCitemsgettagslib {
-# warn "MARCitemsgettagslib";
-    my ( $dbh, $forlibrarian, $frameworkcode ) = @_;
-    $frameworkcode = "" unless $frameworkcode;
-    my $sth;
-    my $libfield = ( $forlibrarian eq 1 ) ? 'liblibrarian' : 'libopac';
-
-    # check that framework exists
-    $sth =
-      $dbh->prepare(
-        "select count(*) from holdings_tag_structure where frameworkcode=?");
-    $sth->execute($frameworkcode);
-    my ($total) = $sth->fetchrow;
-    $frameworkcode = "" unless ( $total > 0 );
-    $sth =
-      $dbh->prepare(
-"select tagfield,liblibrarian,libopac,mandatory,repeatable from holdings_tag_structure where frameworkcode=? order by tagfield"
-    );
-    $sth->execute($frameworkcode);
-    my ( $liblibrarian, $libopac, $tag, $res, $tab, $mandatory, $repeatable );
-
-    while ( ( $tag, $liblibrarian, $libopac, $mandatory, $repeatable ) = $sth->fetchrow ) {
-        $res->{$tag}->{lib}        = ($forlibrarian or !$libopac)?$liblibrarian:$libopac;
-        $res->{$tab}->{tab}        = "";            # XXX
-        $res->{$tag}->{mandatory}  = $mandatory;
-        $res->{$tag}->{repeatable} = $repeatable;
-    }
-
-    $sth =
-      $dbh->prepare(
-"select tagfield,tagsubfield,liblibrarian,libopac,tab, mandatory, repeatable,authorised_value,authtypecode,value_builder,seealso,hidden,isurl,link from holdings_subfield_structure where frameworkcode=? order by tagfield,tagsubfield"
-    );
-    $sth->execute($frameworkcode);
-
-    my $subfield;
-    my $authorised_value;
-    my $authtypecode;
-    my $value_builder;
-   
-    my $seealso;
-    my $hidden;
-    my $isurl;
-	my $link;
-
-    while (
-        ( $tag,         $subfield,   $liblibrarian,   , $libopac,      $tab,
-        $mandatory,     $repeatable, $authorised_value, $authtypecode,
-        $value_builder, $seealso,          $hidden,
-        $isurl,			$link )
-        = $sth->fetchrow
-      )
-    {
-        $res->{$tag}->{$subfield}->{lib}              = ($forlibrarian or !$libopac)?$liblibrarian:$libopac;
-        $res->{$tag}->{$subfield}->{tab}              = $tab;
-        $res->{$tag}->{$subfield}->{mandatory}        = $mandatory;
-        $res->{$tag}->{$subfield}->{repeatable}       = $repeatable;
-        $res->{$tag}->{$subfield}->{authorised_value} = $authorised_value;
-        $res->{$tag}->{$subfield}->{authtypecode}     = $authtypecode;
-        $res->{$tag}->{$subfield}->{value_builder}    = $value_builder;
-        $res->{$tag}->{$subfield}->{seealso}          = $seealso;
-        $res->{$tag}->{$subfield}->{hidden}           = $hidden;
-        $res->{$tag}->{$subfield}->{isurl}            = $isurl;
-        $res->{$tag}->{$subfield}->{link}            = $link;
-    }
-    return $res;
-}
-sub MARCfind_marc_from_kohafield {
-# warn "MARCfind_marc_from_kohafield";
-    my (  $kohafield,$recordtype) = @_;
-    return 0, 0 unless $kohafield;
-$recordtype="biblios" unless $recordtype;
-	my $relations = C4::Context->marcfromkohafield;
-	return ($relations->{$recordtype}->{$kohafield}->[0],$relations->{$recordtype}->{$kohafield}->[1]);
-}
-
-
-
-
-sub MARCfind_frameworkcode {
-# warn "MARCfind_frameworkcode";
-    my ( $dbh, $biblionumber ) = @_;
-    my $sth =
-      $dbh->prepare("select frameworkcode from biblio where biblionumber=?");
-    $sth->execute($biblionumber);
-    my ($frameworkcode) = $sth->fetchrow;
-    return $frameworkcode;
-}
-sub MARCfind_itemtype {
-# warn "MARCfind_itemtype";
-    my ( $dbh, $biblionumber ) = @_;
-    my $sth =
-      $dbh->prepare("select itemtype from biblio where biblionumber=?");
-    $sth->execute($biblionumber);
-    my ($itemtype) = $sth->fetchrow;
-    return $itemtype;
-}
-
-
-
-sub MARChtml2xml {
-# warn "MARChtml2xml ";
-	my ($tags,$subfields,$values,$indicator,$ind_tag,$tagindex) = @_;        
-	my $xml= "<record>";
-
-    my $prevvalue;
-    my $prevtag=-1;
-    my $first=1;
-	my $j = -1;
-    for (my $i=0;$i<=@$tags;$i++){
-		@$values[$i] =~ s/&/&amp;/g;
-		@$values[$i] =~ s/</&lt;/g;
-		@$values[$i] =~ s/>/&gt;/g;
-		@$values[$i] =~ s/"/&quot;/g;
-		@$values[$i] =~ s/'/&apos;/g;
-
-		if ((@$tags[$i].@$tagindex[$i] ne $prevtag)){
-			my $tag=@$tags[$i];
-			$j++ unless ($tag eq "");
-			## warn "IND:".substr(@$indicator[$j],0,1).substr(@$indicator[$j],1,1)." ".@$tags[$i];
-			if (!$first){
-		    	$xml.="</datafield>\n";
-				if (($tag> 10) && (@$values[$i] ne "")){
-						my $ind1 = substr(@$indicator[$j],0,1);
-                        my $ind2 = substr(@$indicator[$j],1,1);
-                        $xml.="<datafield tag=\"$tag\" ind1=\"$ind1\" ind2=\"$ind2\">\n";
-                        $xml.="<subfield code=\"@$subfields[$i]\">@$values[$i]</subfield>\n";
-                        $first=0;
-				} else {
-		    	$first=1;
-				}
-            			} else {
-		    	if (@$values[$i] ne "") {
-		    		# leader
-		    		if ($tag eq "000") {
-				##Force the leader to UTF8
-				substr(@$values[$i],9,1)="a";
-						$xml.="<leader>@$values[$i]</leader>\n";
-						$first=1;
-					# rest of the fixed fields
-		    		} elsif ($tag < 10) {
-						$xml.="<controlfield tag=\"$tag\">@$values[$i]</controlfield>\n";
-						$first=1;
-		    		} else {
-						my $ind1 = substr(@$indicator[$j],0,1);
-						my $ind2 = substr(@$indicator[$j],1,1);
-						$xml.="<datafield tag=\"$tag\" ind1=\"$ind1\" ind2=\"$ind2\">\n";
-						$xml.="<subfield code=\"@$subfields[$i]\">@$values[$i]</subfield>\n";
-						$first=0;			
-		    		}
-		    	}
-			}
-		} else { # @$tags[$i] eq $prevtag
-                                 unless (@$values[$i] eq "") {
-              		my $tag=@$tags[$i];
-					if ($first){
-						my $ind1 = substr(@$indicator[$j],0,1);                        
-						my $ind2 = substr(@$indicator[$j],1,1);
-						$xml.="<datafield tag=\"$tag\" ind1=\"$ind1\" ind2=\"$ind2\">\n";
-						$first=0;
-					}
-		    	$xml.="<subfield code=\"@$subfields[$i]\">@$values[$i]</subfield>\n";
-				}
-		}
-		$prevtag = @$tags[$i].@$tagindex[$i];
-	}
-	$xml.="</record>";
-	# warn $xml;
-	$xml=Encode::decode('utf8',$xml);
-	return $xml;
-}
-sub XML_record_header {
-####  this one is for <record>
-    my $format = shift;
-    my $enc = shift || 'UTF-8';
-##
-    return( <<MARC_XML_HEADER );
-<?xml version="1.0" encoding="$enc"?>
-<record  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
-  xmlns="http://www.loc.gov/MARC21/slim">
-MARC_XML_HEADER
-}
-
-
-sub collection_header {
-####  this one is for koha collection 
-    my $format = shift;
-    my $enc = shift || 'UTF-8';
-    return( <<KOHA_XML_HEADER );
-<?xml version="1.0" encoding="$enc"?>
-<kohacollection xmlns:marc="http://loc.gov/MARC21/slim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://library.neu.edu.tr/kohanamespace/koharecord.xsd">
-KOHA_XML_HEADER
-}
-
-
-
-
-
-
-
-
-##########################NEW NEW NEW#############################
-sub NEWnewbiblio {
-    my ( $dbh, $xml, $frameworkcode) = @_;
-$frameworkcode="" unless $frameworkcode;
-my $biblionumber=XML_readline_onerecord($xml,"biblionumber","biblios");
-## In case reimporting records with biblionumbers keep them
-if ($biblionumber){
-$biblionumber=NEWmodbiblio( $dbh, $biblionumber,$xml,$frameworkcode );
-}else{
-    $biblionumber = NEWaddbiblio( $dbh, $xml,$frameworkcode );
-}
-
-   return ( $biblionumber );
-}
-
-
-
-
-
-sub NEWmodbiblioframework {
-	my ($dbh,$biblionumber,$frameworkcode) =@_;
-	my $sth = $dbh->prepare("Update biblio SET frameworkcode=? WHERE biblionumber=$biblionumber");
-	$sth->execute($frameworkcode);
-	return 1;
-}
-
-
-sub NEWdelbiblio {
-    my ( $dbh, $biblionumber ) = @_;
-ZEBRAop($dbh,$biblionumber,"recordDelete","biblioserver");
-}
-
-
-sub NEWnewitem {
-    my ( $dbh, $xmlhash, $biblionumber ) = @_;
-	my $itemtype= MARCfind_itemtype($dbh,$biblionumber);
-
-## In case we are re-importing marc records from bulk import do not change itemnumbers
-my $itemnumber=XML_readline_onerecord($xmlhash,"itemnumber","holdings");
-if ($itemnumber){
-NEWmoditem ( $dbh, $xmlhash, $biblionumber, $itemnumber);
-}else{
-   
-##Add biblionumber to $record
-$xmlhash=XML_writeline($xmlhash,"biblionumber",$biblionumber,"holdings");
- my $sth=$dbh->prepare("select notforloan from itemtypes where itemtype='$itemtype'");
-$sth->execute();
-my $notforloan=$sth->fetchrow;
-##Change the notforloan field if $notforloan found
-	if ($notforloan >0){
-	$xmlhash=XML_writeline($xmlhash,"notforloan",$notforloan,"holdings");
-	}
-my $dateaccessioned=XML_readline_onerecord($xmlhash,"dateaccessioned","holdings");
-unless($dateaccessioned){
-# find today's date
-my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =                                                           
-localtime(time); $year +=1900; $mon +=1;
-my $date = "$year-".sprintf ("%0.2d", $mon)."-".sprintf("%0.2d",$mday);
-
-$xmlhash=XML_writeline($xmlhash,"dateaccessioned",$date,"holdings");
-}
-  
-## Now calculate itempart of cutter-- This is NEU specific
-my $itemcallnumber=XML_readline_onerecord($xmlhash,"itemcallnumber","holdings");
-if ($itemcallnumber){
-my ($cutterextra)=itemcalculator($dbh,$biblionumber,$itemcallnumber);
-$xmlhash=XML_writeline($xmlhash,"cutterextra",$cutterextra,"holdings");
-}
-
-##NEU specific add cataloguers cardnumber as well
-my $me= C4::Context->userenv;
-my $cataloger=$me->{'cardnumber'} if ($me);
-$xmlhash=XML_writeline($xmlhash,"circid",$cataloger,"holdings") if $cataloger;
-
-##Add item to SQL
-my  $itemnumber = &OLDnewitems( $dbh, $xmlhash );
-
-# add the item to zebra it will add the biblio as well!!!
-    ZEBRAop( $dbh, $biblionumber,"specialUpdate","biblioserver" );
-return $itemnumber;
-}## added new item
-
-}
-
-
-
-sub NEWmoditem{
-    my ( $dbh, $xmlhash, $biblionumber, $itemnumber ) = @_;
-
-##Add itemnumber incase lost (old bug 090c was lost sometimes) --just incase
-$xmlhash=XML_writeline($xmlhash,"itemnumber",$itemnumber,"holdings");
-##Add biblionumber incase lost on html
-$xmlhash=XML_writeline($xmlhash,"biblionumber",$biblionumber,"holdings");
-##Read barcode
-my $barcode=XML_readline_onerecord($xmlhash,"barcode","holdings");		
-## Now calculate itempart of cutter-- This is NEU specific
-my $itemcallnumber=XML_readline_onerecord($xmlhash,"itemcallnumber","holdings");
-if ($itemcallnumber){
-my ($cutterextra)=itemcalculator($dbh,$biblionumber,$itemcallnumber);
-$xmlhash=XML_writeline($xmlhash,"cutterextra",$cutterextra,"holdings");
-}
-
-##NEU specific add cataloguers cardnumber as well
-my $me= C4::Context->userenv;
-my $cataloger=$me->{'cardnumber'} if ($me);
-$xmlhash=XML_writeline($xmlhash,"circid",$cataloger,"holdings") if $cataloger;
-my $xml=XML_hash2xml($xmlhash);
-    OLDmoditem( $dbh, $xml,$biblionumber,$itemnumber,$barcode );
-    ZEBRAop($dbh,$biblionumber,"specialUpdate","biblioserver");
-}
-
-sub NEWdelitem {
-    my ( $dbh, $itemnumber ) = @_;	
-my $sth=$dbh->prepare("SELECT biblionumber from items where itemnumber=?");
-$sth->execute($itemnumber);
-my $biblionumber=$sth->fetchrow;
-OLDdelitem( $dbh, $itemnumber ) ;
-ZEBRAop($dbh,$biblionumber,"specialUpdate","biblioserver");
-
-}
-
-
-
-
-sub NEWaddbiblio {
-    my ( $dbh, $xmlhash,$frameworkcode ) = @_;
-     my $sth = $dbh->prepare("Select max(biblionumber) from biblio");
-    $sth->execute;
-    my $data   = $sth->fetchrow;
-    my $biblionumber = $data + 1;
-    $sth->finish;
-    # we must add biblionumber 
-my $record;
-$xmlhash=XML_writeline($xmlhash,"biblionumber",$biblionumber,"biblios");
-
-###NEU specific add cataloguers cardnumber as well
-
-my $me= C4::Context->userenv;
-my $cataloger=$me->{'cardnumber'} if ($me);
-$xmlhash=XML_writeline($xmlhash,"indexedby",$cataloger,"biblios") if $cataloger;
-
-## We must add the indexing fields for LC in MARC record--TG
-&XMLmodLCindex($dbh,$xmlhash);
-
-##Find itemtype
-my $itemtype=XML_readline_onerecord($xmlhash,"itemtype","biblios");
-##Find ISBN
-my $isbn=XML_readline_onerecord($xmlhash,"isbn","biblios");
-##Find ISSN
-my $issn=XML_readline_onerecord($xmlhash,"issn","biblios");
-##Find Title
-my $title=XML_readline_onerecord($xmlhash,"title","biblios");
-##Find Author
-my $author=XML_readline_onerecord($xmlhash,"title","biblios");
-my $xml=XML_hash2xml($xmlhash);
-
-    $sth = $dbh->prepare("insert into biblio set biblionumber  = ?,frameworkcode=?, itemtype=?,marcxml=?,title=?,author=?,isbn=?,issn=?" );
-    $sth->execute( $biblionumber,$frameworkcode, $itemtype,$xml ,$title,$author,$isbn,$issn  );
-
-    $sth->finish;
-### Do not add biblio to ZEBRA unless there is an item with it -- depends on system preference defaults to NO
-if (C4::Context->preference('AddaloneBiblios')){
- ZEBRAop($dbh,$biblionumber,"specialUpdate","biblioserver");
-}
-    return ($biblionumber);
-}
-
-sub NEWmodbiblio {
-    my ( $dbh, $biblionumber,$xmlhash,$frameworkcode ) = @_;
-##Add biblionumber incase lost on html
-
-$xmlhash=XML_writeline($xmlhash,"biblionumber",$biblionumber,"biblios");
-
-###NEU specific add cataloguers cardnumber as well
-my $me= C4::Context->userenv;
-my $cataloger=$me->{'cardnumber'} if ($me);
-
-$xmlhash=XML_writeline($xmlhash,"indexedby",$cataloger,"biblios") if $cataloger;
-
-## We must add the indexing fields for LC in MARC record--TG
-
-  XMLmodLCindex($dbh,$xmlhash);
-    OLDmodbiblio ($dbh,$xmlhash,$biblionumber,$frameworkcode);
-    my $ok=ZEBRAop($dbh,$biblionumber,"specialUpdate","biblioserver");
-    return ($biblionumber);
-}
-
-#
-#
-# OLD OLD OLD OLD OLD OLD OLD OLD OLD OLD OLD OLD OLD OLD OLD OLD OLD
-#
-#
-
-sub OLDnewitems {
-
-    my ( $dbh, $xmlhash) = @_;
-    my $sth = $dbh->prepare("SELECT max(itemnumber) from items");
-    my $data;
-    my $itemnumber;
-    $sth->execute;
-    $data       = $sth->fetchrow_hashref;
-    $itemnumber = $data->{'max(itemnumber)'} + 1;
-    $sth->finish;
-      $xmlhash=XML_writeline(  $xmlhash, "itemnumber", $itemnumber,"holdings" );
-my $biblionumber=XML_readline_onerecord($xmlhash,"biblionumber","holdings");
- my $barcode=XML_readline_onerecord($xmlhash,"barcode","holdings");
-my $xml=XML_hash2xml($xmlhash);
-        $sth = $dbh->prepare( "Insert into items set itemnumber = ?,	biblionumber  = ?,barcode = ?,marcxml=?"   );
-        $sth->execute($itemnumber,$biblionumber,$barcode,$xml);
-    return $itemnumber;
-}
-
-sub OLDmoditem {
-    my ( $dbh, $xml,$biblionumber,$itemnumber,$barcode  ) = @_;
-    my $sth =$dbh->prepare("replace items set  biblionumber=?,marcxml=?,barcode=? , itemnumber=?");
-    $sth->execute($biblionumber,$xml,$barcode,$itemnumber);
-    $sth->finish;
-}
-
-sub OLDdelitem {
-    my ( $dbh, $itemnumber ) = @_;
-my $sth = $dbh->prepare("select * from items where itemnumber=?");
-    $sth->execute($itemnumber);
-    if ( my $data = $sth->fetchrow_hashref ) {
-        $sth->finish;
-        my $query = "replace deleteditems set ";
-        my @bind  = ();
-        foreach my $temp ( keys %$data ) {
-            $query .= "$temp = ?,";
-            push ( @bind, $data->{$temp} );
-        }
-
-        #replacing the last , by ",?)"
-        $query =~ s/\,$//;
-        $sth = $dbh->prepare($query);
-        $sth->execute(@bind);
-        $sth->finish;
-   $sth = $dbh->prepare("Delete from items where itemnumber=?");
-    $sth->execute($itemnumber);
-    $sth->finish;
-  }
- $sth->finish;
-}
-
-sub OLDmodbiblio {
-# modifies the biblio table
-my ($dbh,$xmlhash,$biblionumber,$frameworkcode) = @_;
-	if (!$frameworkcode){
-	$frameworkcode="";
-	}
-##Find itemtype
-my $itemtype=XML_readline_onerecord($xmlhash,"itemtype","biblios");
-##Find ISBN
-my $isbn=XML_readline_onerecord($xmlhash,"isbn","biblios");
-##Find ISSN
-my $issn=XML_readline_onerecord($xmlhash,"issn","biblios");
-##Find Title
-my $title=XML_readline_onerecord($xmlhash,"title","biblios");
-##Find Author
-my $author=XML_readline_onerecord($xmlhash,"author","biblios");
-my $xml=XML_hash2xml($xmlhash);
-
-$isbn=~ s/(\.|\?|\;|\=|\-|\/|\\|\||\:|\*|\!|\,|\(|\)|\[|\]|\{|\}|\/)//g;
-$issn=~ s/(\.|\?|\;|\=|\-|\/|\\|\||\:|\*|\!|\,|\(|\)|\[|\]|\{|\}|\/)//g;
-$isbn=~s/^\s+|\s+$//g;
-$isbn=substr($isbn,0,13);
-        my $sth = $dbh->prepare("REPLACE  biblio set biblionumber=?,marcxml=?,frameworkcode=? ,itemtype=? , title=?,author=?,isbn=?,issn=?" );
-        $sth->execute( $biblionumber ,$xml, $frameworkcode,$itemtype, $title,$author,$isbn,$issn);  
-        $sth->finish;
-    return $biblionumber;
-}
-
-sub OLDdelbiblio {
-    my ( $dbh, $biblionumber ) = @_;
-    my $sth = $dbh->prepare("select * from biblio where biblionumber=?");
-    $sth->execute($biblionumber);
-    if ( my $data = $sth->fetchrow_hashref ) {
-        $sth->finish;
-        my $query = "replace deletedbiblio set ";
-        my @bind  = ();
-           foreach my $temp ( keys %$data ) {
-            $query .= "$temp = ?,";
-            push ( @bind, $data->{$temp} );
-           }
-
-        #replacing the last , by ",?)"
-        $query =~ s/\,$//;
-        $sth = $dbh->prepare($query);
-        $sth->execute(@bind);
-        $sth->finish;
-        $sth = $dbh->prepare("Delete from biblio where biblionumber=?");
-        $sth->execute($biblionumber);
-        $sth->finish;
-    }
-    $sth->finish;
-}
-
-
-#
-#
-#
-#ZEBRA ZEBRA ZEBRA
-#
-#
-
-sub ZEBRAdelbiblio {
-## Zebra calls this routine to delete after it deletes biblio from ZEBRAddb
- my ( $dbh, $biblionumber ) = @_;
-my $sth=$dbh->prepare("SELECT itemnumber FROM items where biblionumber=?");
-
-$sth->execute($biblionumber);
-	while (my $itemnumber =$sth->fetchrow){
-	OLDdelitem($dbh,$itemnumber) ;
-	}	
-OLDdelbiblio($dbh,$biblionumber) ;
-}
-
-sub ZEBRAgetrecord{
-my $biblionumber=shift;
-my @kohafield="biblionumber";
-my @value=$biblionumber;
-my ($count, at result)=C4::Search::ZEBRAsearch_kohafields(\@kohafield,\@value);
-
-   if ($count>0){
-   my ( $xmlrecord, @itemsrecord) = XML_separate($result[0]);
-   return ($xmlrecord, @itemsrecord);
-   }else{
-   return (undef,undef);
-   }
-}
-
-sub ZEBRAop {
-### Puts the zebra update in queue writes in zebraserver table
-my ($dbh,$biblionumber,$op,$server)=@_;
-if (!$biblionumber){
-warn "Zebra received no biblionumber";
-}elsif (C4::Context->preference('onlineZEBRA')){
-my $marcxml;
-	if ($server eq "biblioserver"){
-	($marcxml) =ZEBRA_readyXML($dbh,$biblionumber);
-	}elsif($server eq "authorityserver"){
-	$marcxml =C4::AuthoritiesMarc::XMLgetauthority($dbh,$biblionumber);
-	} 
-ZEBRAopserver($marcxml,$op,$server,$biblionumber);
-ZEBRAopcommit($server);
-}else{
-my $sth=$dbh->prepare("insert into zebraqueue  (biblio_auth_number ,server,operation) values(?,?,?)");
-$sth->execute($biblionumber,$server,$op);
-$sth->finish;
-
-}
-}
-
-sub ZEBRAopserver{
-
-###Accepts a $server variable thus we can use it to update  biblios, authorities or other zebra dbs
-my ($record,$op,$server,$biblionumber)=@_;
-
-my @port;
-
-my $tried=0;
-my $recon=0;
-my $reconnect=0;
-$record=Encode::encode("UTF-8",$record);
-my $shadow=$server."shadow";
-reconnect:
-
- my $Zconnbiblio=C4::Context->Zconnauth($server);
-if ($record){
-my $Zpackage = $Zconnbiblio->package();
-$Zpackage->option(action => $op);
-	$Zpackage->option(record => $record);
-	$Zpackage->option(recordIdOpaque => $biblionumber);
-retry:
-		$Zpackage->send("update");
-
- my($error, $errmsg, $addinfo, $diagset) = $Zconnbiblio->error_x();
-	if ($error==10007 && $tried<3) {## timeout --another 30 looonng seconds for this update
-		sleep 1;	##  wait a sec!
-		$tried=$tried+1;
-		goto "retry";
-	}elsif ($error==2 && $tried<2) {## timeout --temporary zebra error !whatever that means
-		sleep 2;	##  wait two seconds!
-		$tried=$tried+1;
-		goto "retry";
-	}elsif($error==10004 && $recon==0){##Lost connection -reconnect
-		sleep 1;	##  wait a sec!
-		$recon=1;
-		$Zpackage->destroy();
-		$Zconnbiblio->destroy();
-		goto "reconnect";
-	}elsif ($error){
-	#	warn "Error-$server   $op  /errcode:, $error, /MSG:,$errmsg,$addinfo \n";	
-		$Zpackage->destroy();
-		$Zconnbiblio->destroy();
-		return 0;
-	}
-	
-$Zpackage->destroy();
-$Zconnbiblio->destroy();
-return 1;
-}
-return 0;
-}
-
-
-sub ZEBRAopcommit {
-my $server=shift;
-return unless C4::Context->config($server."shadow");
-my $Zconnbiblio=C4::Context->Zconnauth($server);
-
-my $Zpackage = $Zconnbiblio->package();
- $Zpackage->send('commit');
-		
-		 my($error, $errmsg, $addinfo, $diagset) = $Zconnbiblio->error_x();
-		 if ($error) { ## This is serious ZEBRA server is not updating	
-	     $Zpackage->destroy();
-	     $Zconnbiblio->destroy();
-	     return 0;
-	    }
-$Zpackage->destroy();
-$Zconnbiblio->destroy();
-return 1;
-}
-sub ZEBRA_readyXML{
-my ($dbh,$biblionumber)=@_;
-my $biblioxml=XMLgetbiblio($dbh,$biblionumber);
-my @itemxml=XMLgetallitems($dbh,$biblionumber);
-my $zebraxml=collection_header();
-$zebraxml.="<koharecord>";
-$zebraxml.=$biblioxml;
-$zebraxml.="<holdings>";
-      foreach my $item(@itemxml){
-	$zebraxml.=$item if $item;
-     }
-$zebraxml.="</holdings>";
-$zebraxml.="</koharecord>";
-$zebraxml.="</kohacollection>";
-return $zebraxml;
-}
-
-sub ZEBRA_readyXML_noheader{
-my ($dbh,$biblionumber)=@_;
-my $biblioxml=XMLgetbiblio($dbh,$biblionumber);
-my @itemxml=XMLgetallitems($dbh,$biblionumber);
-my $zebraxml="<koharecord>";
-$zebraxml.=$biblioxml;
-$zebraxml.="<holdings>";
-      foreach my $item(@itemxml){
-	$zebraxml.=$item if $item;
-     }
-$zebraxml.="</holdings>";
-$zebraxml.="</koharecord>";
-return $zebraxml;
-}
-
-#
-#
-# various utility subs and those not complying to new rules
-#
-#
-
-sub newbiblio {
-## Used in acqui management -- creates the biblio from koha hash 
-    my ($biblio) = @_;
-    my $dbh    = C4::Context->dbh;
-my $record=XMLkoha2marc($dbh,$biblio,"biblios");
-   my $biblionumber=NEWnewbiblio($dbh,$record);
-    return ($biblionumber);
-}
-sub modbiblio {
-## Used in acqui management -- modifies the biblio from koha hash rather than xml-hash
-    my ($biblio) = @_;
-    my $dbh    = C4::Context->dbh;
-my $record=XMLkoha2marc($dbh,$biblio,"biblios");
-   my $biblionumber=NEWmodbiblio($dbh,$record,$biblio->{biblionumber});
-    return ($biblionumber);
-}
-
-sub newitems {
-## Used in acqui management -- creates the item from hash rather than marc-record
-    my ( $item, @barcodes ) = @_;
-    my $dbh = C4::Context->dbh;
-    my $errors;
-    my $itemnumber;
-    my $error;
-    foreach my $barcode (@barcodes) {
-	$item->{barcode}=$barcode;
-my $record=MARCkoha2marc($dbh,$item,"holdings");	
-  my $itemnumber=     NEWnewitem($dbh,$record,$item->{biblionumber});
-    
-    }
-    return $itemnumber ;
-}
-
-
-
-
-sub getitemtypes {
-    my $dbh   = C4::Context->dbh;
-    my $query = "select * from itemtypes order by description";
-    my $sth   = $dbh->prepare($query);
-
-    # || die "Cannot prepare $query" . $dbh->errstr;      
-    my $count = 0;
-    my @results;
-    $sth->execute;
-    # || die "Cannot execute $query\n" . $sth->errstr;
-    while ( my $data = $sth->fetchrow_hashref ) {
-        $results[$count] = $data;
-        $count++;
-    }    # while
-
-    $sth->finish;
-    return ( $count, @results );
-}    # sub getitemtypes
-
-
-
-sub getkohafields{
-#returns MySQL like fieldnames to emulate searches on sql like fieldnames
-my $type=shift;
-## Either opac or intranet to select appropriate fields
-## Assumes intranet
-$type="intra" unless $type;
-if ($type eq "intranet"){ $type="intra";}
-my $dbh   = C4::Context->dbh;
-  my $i=0;
-my @results;
-$type=$type."show";
-my $sth=$dbh->prepare("SELECT  * FROM koha_attr  where $type=1 order by label");
-$sth->execute();
-while (my $data=$sth->fetchrow_hashref){
-	$results[$i]=$data;
-	$i++;
-	}
-$sth->finish;
-return ($i, at results);
-}
-
-
-
-
-
-sub DisplayISBN {
-## Old style ISBN handling should be modified to accept 13 digits
-
-	my ($isbn)=@_;
-	my $seg1;
-	if(substr($isbn, 0, 1) <=7) {
-		$seg1 = substr($isbn, 0, 1);
-	} elsif(substr($isbn, 0, 2) <= 94) {
-		$seg1 = substr($isbn, 0, 2);
-	} elsif(substr($isbn, 0, 3) <= 995) {
-		$seg1 = substr($isbn, 0, 3);
-	} elsif(substr($isbn, 0, 4) <= 9989) {
-		$seg1 = substr($isbn, 0, 4);
-	} else {
-		$seg1 = substr($isbn, 0, 5);
-	}
-	my $x = substr($isbn, length($seg1));
-	my $seg2;
-	if(substr($x, 0, 2) <= 19) {
-# 		if(sTmp2 < 10) sTmp2 = "0" sTmp2;
-		$seg2 = substr($x, 0, 2);
-	} elsif(substr($x, 0, 3) <= 699) {
-		$seg2 = substr($x, 0, 3);
-	} elsif(substr($x, 0, 4) <= 8399) {
-		$seg2 = substr($x, 0, 4);
-	} elsif(substr($x, 0, 5) <= 89999) {
-		$seg2 = substr($x, 0, 5);
-	} elsif(substr($x, 0, 6) <= 9499999) {
-		$seg2 = substr($x, 0, 6);
-	} else {
-		$seg2 = substr($x, 0, 7);
-	}
-	my $seg3=substr($x,length($seg2));
-	$seg3=substr($seg3,0,length($seg3)-1) ;
-	my $seg4 = substr($x, -1, 1);
-	return "$seg1-$seg2-$seg3-$seg4";
-}
-sub calculatelc{
-## Function to create padded LC call number for sorting items with their LC code. Not exported
-my  ($classification)=@_;
-$classification=~s/^\s+|\s+$//g;
-my $i=0;
-my $lc2;
-my $lc1;
-for  ($i=0; $i<length($classification);$i++){
-my $c=(substr($classification,$i,1));
-	if ($c ge '0' && $c le '9'){
-	
-	$lc2=substr($classification,$i);
-	last;
-	}else{
-	$lc1.=substr($classification,$i,1);
-	
-	}
-}#while
-
-my $other=length($lc1);
-if(!$lc1){$other=0;}
-my $extras;
-if ($other<4){
-	for (1..(4-$other)){
-	$extras.="0";
-	}
-}
- $lc1.=$extras;
-$lc2=~ s/^ //g;
-
-$lc2=~ s/ //g;
-$extras="";
-##Find the decimal part of $lc2
-my $pos=index($lc2,".");
-if ($pos<0){$pos=length($lc2);}
-if ($pos>=0 && $pos<5){
-##Pad lc2 with zeros to create a 5digit decimal needed in marc record to sort as numeric
-
-	for (1..(5-$pos)){
-	$extras.="0";
-	}
-}
-$lc2=$extras.$lc2;
-return($lc1.$lc2);
-}
-
-sub itemcalculator{
-## Sublimentary function to obtain sorted LC for items. Not exported
-my ($dbh,$biblionumber,$callnumber)=@_;
-my $xmlhash=XMLgetbibliohash($dbh,$biblionumber);
-my $lc=XML_readline_onerecord($xmlhash,"classification","biblios");
-my $cutter=XML_readline_onerecord($xmlhash,"subclass","biblios");
-my $all=$lc." ".$cutter;
-my $total=length($all);
-my $cutterextra=substr($callnumber,$total);
-return $cutterextra;
-
-}
-
-
-#### This function allows decoding of only title and author out of a MARC record
-  sub func_title_author {
-        my ($tagno,$tagdata) = @_;
-  my ($titlef,$subf)=&MARCfind_marc_from_kohafield("title","biblios");
-  my ($authf,$subf)=&MARCfind_marc_from_kohafield("author","biblios");
-	return ($tagno == $titlef || $tagno == $authf);
-    }
-
-
-
-END { }    # module clean-up code here (global destructor)
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-
-

Index: C4/BookShelves.pm
===================================================================
RCS file: C4/BookShelves.pm
diff -N C4/BookShelves.pm
--- C4/BookShelves.pm	6 Nov 2006 21:01:43 -0000	1.19
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,677 +0,0 @@
-# -*- tab-width: 8 -*-
-# Please use 8-character tabs for this file (indents are every 4 characters)
-
-package C4::BookShelves;
-
-# $Id: BookShelves.pm,v 1.19 2006/11/06 21:01:43 tgarip1957 Exp $
-
-# 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;
-require Exporter;
-use C4::Context;
-use C4::Circulation::Circ2;
-use C4::AcademicInfo;
-use C4::Search;
-use C4::Date;
-use C4::Biblio;
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::BookShelves - Functions for manipulating Koha virtual bookshelves
-
-=head1 SYNOPSIS
-
-  use C4::BookShelves;
-
-=head1 DESCRIPTION
-
-This module provides functions for manipulating virtual bookshelves,
-including creating and deleting bookshelves, and adding and removing
-items to and from bookshelves.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(&GetShelfList &GetShelfContents &AddToShelf &AddToShelfFromBiblio
-				&RemoveFromShelf &AddShelf &RemoveShelf
-				&ShelfPossibleAction
-
-				&GetShelfListExt &AddShelfExt &EditShelfExt &RemoveShelfExt 
-				&GetShelfInfo &GetShelfContentsExt &RemoveFromShelfExt 
-				&GetShelfListOfExt &AddToShelfExt
-				
-				&AddRequestToShelf &CountShelfRequest &GetShelfRequests 
-				&RejectShelfRequest &CatalogueShelfRequest &GetShelfRequestOwner
-				&GetShelfRequest);
-
-	
-my $dbh;
-	 $dbh = C4::Context->dbh;
-
-=item ShelfPossibleAction
-
-=over 4
-
-=item C<$loggedinuser,$shelfnumber,$action>
-
-$action can be "view" or "manage".
-
-Returns 1 if the user can do the $action in the $shelfnumber shelf.
-Returns 0 otherwise.
-
-=back
-
-=cut
-sub ShelfPossibleAction {
-	my ($loggedinuser,$shelfnumber,$action)= @_;
-	my $sth = $dbh->prepare("select owner,category from bookshelf where shelfnumber=?");
-	$sth->execute($shelfnumber);
-	my ($owner,$category) = $sth->fetchrow;
-	return 1 if (($category>=3 or $owner eq $loggedinuser) && $action eq 'manage');
-	return 1 if (($category>= 2 or $owner eq $loggedinuser) && $action eq 'view');
-	return 0;
-}
-
-=item GetShelfList
-
-  $shelflist = &GetShelfList();
-  ($shelfnumber, $shelfhash) = each %{$shelflist};
-
-Looks up the virtual bookshelves, and returns a summary. C<$shelflist>
-is a reference-to-hash. The keys are the bookshelf numbers
-(C<$shelfnumber>, above), and the values (C<$shelfhash>, above) are
-themselves references-to-hash, with the following keys:
-
-=over 4
-
-=item C<$shelfhash-E<gt>{shelfname}>
-
-A string. The name of the shelf.
-
-=item C<$shelfhash-E<gt>{count}>
-
-The number of books on that bookshelf.
-
-=back
-
-=cut
-#'
-# FIXME - Wouldn't it be more intuitive to return a list, rather than
-# a reference-to-hash? The shelf number can be just another key in the
-# hash.
-sub GetShelfList {
-	my ($owner,$mincategory) = @_;
-	# mincategory : 2 if the list is for "look". 3 if the list is for "Select bookshelf for adding a book".
-	# bookshelves of the owner are always selected, whatever the category
-	my $sth=$dbh->prepare("SELECT		bookshelf.shelfnumber, bookshelf.shelfname,owner,surname,firstname, category,
-							count(shelfcontents.itemnumber) as count
-								FROM		bookshelf
-								LEFT JOIN	shelfcontents
-								ON		bookshelf.shelfnumber = shelfcontents.shelfnumber
-								left join borrowers on bookshelf.owner = borrowers.borrowernumber
-								
-								where owner=? or category>=?
-								GROUP BY	bookshelf.shelfnumber order by shelfname");
-    $sth->execute($owner,$mincategory);
-    my %shelflist;
-    while (my ($shelfnumber, $shelfname,$owner,$surname,$firstname,$category,$count) = $sth->fetchrow) {
-	$shelflist{$shelfnumber}->{'shelfname'}=$shelfname;
-	$shelflist{$shelfnumber}->{'count'}=$count;
-	$shelflist{$shelfnumber}->{'owner'}=$owner;
-	$shelflist{$shelfnumber}->{'surname'} = $surname;
-	$shelflist{$shelfnumber}->{'firstname'} = $firstname;
-	$shelflist{$shelfnumber}->{'category'} = $category;
-	
-	
-    }
-
-    return(\%shelflist);
-}
-
-=item GetShelfContents
-
-  $itemlist = &GetShelfContents($env, $shelfnumber);
-
-Looks up information about the contents of virtual bookshelf number
-C<$shelfnumber>.
-
-Returns a reference-to-array, whose elements are references-to-hash,
-as returned by C<&getiteminformation>.
-
-I don't know what C<$env> is.
-
-=cut
-#'
-sub GetShelfContents {
-    my ($env, $shelfnumber) = @_;
-    my @itemlist;
-    my $sth=$dbh->prepare("select itemnumber from shelfcontents where shelfnumber=? order by itemnumber");
-    $sth->execute($shelfnumber);
-    while (my ($itemnumber) = $sth->fetchrow) {
-	my ($item) = getiteminformation($env, $itemnumber, 0);
-	push (@itemlist, $item);
-    }
-    return (\@itemlist);
-}
-
-=item AddToShelf
-
-  &AddToShelf($env, $itemnumber, $shelfnumber);
-
-Adds item number C<$itemnumber> to virtual bookshelf number
-C<$shelfnumber>, unless that item is already on that shelf.
-
-C<$env> is ignored.
-
-=cut
-#'
-sub AddToShelf {
-	my ($env, $itemnumber, $shelfnumber) = @_;
-	return unless $itemnumber;
-	my $sth=$dbh->prepare("select * from shelfcontents where shelfnumber=? and itemnumber=?");
-
-	$sth->execute($shelfnumber, $itemnumber);
-	if ($sth->rows) {
-# already on shelf
-	} else {
-		$sth=$dbh->prepare("insert into shelfcontents (shelfnumber, itemnumber, flags) values (?, ?, 0)");
-		$sth->execute($shelfnumber, $itemnumber);
-	}
-}
-sub AddToShelfFromBiblio {
-	my ($env, $biblionumber, $shelfnumber) = @_;
-	return unless $biblionumber;
-	my $sth = $dbh->prepare("select itemnumber from items where biblionumber=?");
-	$sth->execute($biblionumber);
-	my ($itemnumber) = $sth->fetchrow;
-	$sth=$dbh->prepare("select * from shelfcontents where shelfnumber=? and itemnumber=?");
-	$sth->execute($shelfnumber, $itemnumber);
-	if ($sth->rows) {
-# already on shelf
-	} else {
-		$sth=$dbh->prepare("insert into shelfcontents (shelfnumber, itemnumber, flags,biblionumber) values (?, ?, 0,?)");
-		$sth->execute($shelfnumber, $itemnumber,$biblionumber);
-	}
-}
-
-=item RemoveFromShelf
-
-  &RemoveFromShelf($env, $itemnumber, $shelfnumber);
-
-Removes item number C<$itemnumber> from virtual bookshelf number
-C<$shelfnumber>. If the item wasn't on that bookshelf to begin with,
-nothing happens.
-
-C<$env> is ignored.
-
-=cut
-#'
-sub RemoveFromShelf {
-    my ($env, $itemnumber, $shelfnumber) = @_;
-    my $sth=$dbh->prepare("delete from shelfcontents where shelfnumber=? and itemnumber=?");
-    $sth->execute($shelfnumber,$itemnumber);
-}
-
-=item AddShelf
-
-  ($status, $msg) = &AddShelf($env, $shelfname);
-
-Creates a new virtual bookshelf with name C<$shelfname>.
-
-Returns a two-element array, where C<$status> is 0 if the operation
-was successful, or non-zero otherwise. C<$msg> is "Done" in case of
-success, or an error message giving the reason for failure.
-
-C<$env> is ignored.
-
-=cut
-#'
-# FIXME - Perhaps this could/should return the number of the new bookshelf
-# as well?
-sub AddShelf {
-    my ($env, $shelfname,$owner,$category) = @_;
-    my $sth=$dbh->prepare("select * from bookshelf where shelfname=?");
-	$sth->execute($shelfname);
-    if ($sth->rows) {
-	return(1, "Shelf \"$shelfname\" already exists");
-    } else {
-	$sth=$dbh->prepare("insert into bookshelf (shelfname,owner,category) values (?,?,?)");
-	$sth->execute($shelfname,$owner,$category);
-	return (0, "Done");
-    }
-}
-
-=item RemoveShelf
-
-  ($status, $msg) = &RemoveShelf($env, $shelfnumber);
-
-Deletes virtual bookshelf number C<$shelfnumber>. The bookshelf must
-be empty.
-
-Returns a two-element array, where C<$status> is 0 if the operation
-was successful, or non-zero otherwise. C<$msg> is "Done" in case of
-success, or an error message giving the reason for failure.
-
-C<$env> is ignored.
-
-=cut
-#'
-sub RemoveShelf {
-    my ($env, $shelfnumber) = @_;
-    my $sth=$dbh->prepare("select count(*) from shelfcontents where shelfnumber=?");
-	$sth->execute($shelfnumber);
-    my ($count)=$sth->fetchrow;
-    if ($count) {
-	return (1, "Shelf has $count items on it.  Please remove all items before deleting this shelf.");
-    } else {
-	$sth=$dbh->prepare("delete from bookshelf where shelfnumber=?");
-	$sth->execute($shelfnumber);
-	return (0, "Done");
-    }
-}
-
-sub GetShelfListOfExt {
-	my ($owner) = @_;
-	my $sth;
-	if ($owner) {
-		$sth = $dbh->prepare("SELECT	* FROM bookshelf WHERE (owner = ?) or category>=2 ORDER BY shelfname");
-		$sth->execute($owner);
-	} else {
-		$sth = $dbh->prepare("SELECT	* FROM bookshelf where category<2 ORDER BY shelfname");
-		$sth->execute();
-	}
-	
-	my $sth2 = $dbh->prepare("SELECT count(biblionumber) as bibliocount FROM shelfcontents WHERE (shelfnumber = ?)");
-	
-	my @results;
-	while (my $row = $sth->fetchrow_hashref) {
-		$sth2->execute($row->{'shelfnumber'});
-		$row->{'bibliocount'} = $sth2->fetchrow;
-		if ($row->{'category'} == 1) {
-			$row->{'private'} = 1;
-		} else {
-			$row->{'public'} = 1;
-		}
-		push @results, $row;
-	}
-    return \@results;
-}
-
-sub GetShelfListExt {
-	my ($owner,$mincategory,$id_intitution, $intra) = @_;
-
-	my $sth1 = $dbh->prepare("SELECT * FROM careers WHERE id_institution = ?");
-	$sth1->execute($id_intitution);
-	my @results;
-
-	my $total_shelves = 0;
-	while (my $row1 = $sth1->fetchrow_hashref) {
-		
-		my @shelves;
-		my $sth2;
-		if ($intra) {
-			$sth2=$dbh->prepare("SELECT		
-									bookshelf.shelfnumber, bookshelf.shelfname,owner,surname,firstname, category,
-									count(shelfcontents.biblionumber) as count
-								FROM 
-									bookshelf
-									LEFT JOIN shelfcontents ON bookshelf.shelfnumber = shelfcontents.shelfnumber
-									LEFT JOIN borrowers ON bookshelf.owner = borrowers.borrowernumber	
-								    LEFT JOIN bookshelves_careers ON bookshelves_careers.shelfnumber = bookshelf.shelfnumber
-								WHERE 
-									(id_career = ?) 
-								GROUP BY bookshelf.shelfnumber 
-								ORDER BY shelfname");
-			$sth2->execute($row1->{'id_career'});
-		
-		} else {
-			$sth2=$dbh->prepare("SELECT		
-									bookshelf.shelfnumber, bookshelf.shelfname,owner,surname,firstname, category,
-									count(shelfcontents.biblionumber) as count
-								FROM 
-									bookshelf
-									LEFT JOIN shelfcontents ON bookshelf.shelfnumber = shelfcontents.shelfnumber
-									LEFT JOIN borrowers ON bookshelf.owner = borrowers.borrowernumber	
-								    LEFT JOIN bookshelves_careers ON bookshelves_careers.shelfnumber = bookshelf.shelfnumber
-								WHERE 
-									(owner = ? OR category >= ?) AND (id_career = ?) 
-								GROUP BY bookshelf.shelfnumber 
-								ORDER BY shelfname");
-			$sth2->execute($owner,$mincategory,$row1->{'id_career'});
-		}
-		
-		$row1->{'shelfcount'} = 0;
-		while (my $row2 = $sth2->fetchrow_hashref) {
-			if ($owner == $row2->{'owner'}) {
-				$row2->{'canmanage'} = 1;
-			}
-			if ($row2->{'category'} == 1) {
-				$row2->{'private'} = 1;
-			} else {
-				$row2->{'public'} = 1;
-			}
-			$row1->{'shelfcount'}++;
-			$total_shelves++; 
-			push @shelves, $row2;
-		}
-		$row1->{'shelvesloop'} = \@shelves;
-		push @results, $row1;
-	}
-
-    return($total_shelves, \@results);
-}
-
-sub AddShelfExt {
-    my ($shelfname,$owner,$category,$careers) = @_;
-    my $sth = $dbh->prepare("SELECT * FROM bookshelf WHERE shelfname = ?");
-	$sth->execute($shelfname);
-    if ($sth->rows) {
-		return 0;
-    } else {
-		$sth = $dbh->prepare("INSERT INTO bookshelf (shelfname,owner,category) VALUES (?,?,?)");
-		$sth->execute($shelfname,$owner,$category);
-		my $shelfnumber = $dbh->{'mysql_insertid'};
-
-		foreach my $row (@{$careers}) {
-			$sth = $dbh->prepare("INSERT INTO bookshelves_careers VALUES (?,?)");
-			$sth->execute($shelfnumber, $row);
-		}
-		return $shelfnumber;
-    }
-}
-
-sub EditShelfExt {
-    my ($shelfnumber,$shelfname,$category,$careers) = @_;
-    my $sth = $dbh->prepare("SELECT * FROM bookshelf WHERE shelfname = ? AND NOT shelfnumber = ? ");
-	$sth->execute($shelfname, $shelfnumber);
-    if ($sth->rows) {
-		return 0;
-    } else {
-		$sth = $dbh->prepare("UPDATE bookshelf SET shelfname = ?, category = ? WHERE shelfnumber = ?");
-		$sth->execute($shelfname,$category,$shelfnumber);
-		
-		$sth = $dbh->prepare("DELETE FROM bookshelves_careers WHERE shelfnumber = ?");
-		$sth->execute($shelfnumber);
-
-		foreach my $row (@{$careers}) {
-			$sth = $dbh->prepare("INSERT INTO bookshelves_careers VALUES (?,?)");
-			$sth->execute($shelfnumber, $row);
-		}
-		return $shelfnumber;
-    }
-}
-
-
-sub RemoveShelfExt {
-    my ($shelfnumber) = @_;
-	my $sth = $dbh->prepare("DELETE FROM bookshelves_careers WHERE shelfnumber = ?");
-	$sth->execute($shelfnumber);
-	my $sth = $dbh->prepare("DELETE FROM shelfcontents WHERE shelfnumber = ?");
-	$sth->execute($shelfnumber);
-	$sth = $dbh->prepare("DELETE FROM bookshelf WHERE shelfnumber = ?");
-	$sth->execute($shelfnumber);
-	return 1;
-}
-
-sub GetShelfInfo {
-	my ($shelfnumber, $owner) = @_;
-	my $sth = $dbh->prepare("SELECT * FROM bookshelf WHERE shelfnumber = ?");
-	$sth->execute($shelfnumber);
-	my $result = $sth->fetchrow_hashref;
-	
-	if ($result->{'owner'} == $owner) {
-		$result->{'canmanage'} = 1;
-	}
-
-	my $sth = $dbh->prepare("SELECT id_career FROM bookshelves_careers WHERE shelfnumber = ?");
-	$sth->execute($shelfnumber);
-	my @careers;
-	while (my $row = $sth->fetchrow) {
-		push @careers, $row;
-	}
-	$result->{'careers'} = \@careers;
-	return $result;
-}
-
-sub GetShelfContentsExt {
-    my ($shelfnumber) = @_;
-    my $sth = $dbh->prepare("SELECT biblionumber FROM shelfcontents WHERE shelfnumber = ? ORDER BY biblionumber");
-    $sth->execute($shelfnumber);
-	my @biblios;
-	my $even = 0;
-    while (my ($biblionumber) = $sth->fetchrow) {
-	my $biblio=ZEBRA_readyXML_noheader($dbh,$biblionumber);
-	my  $xmlrecord=XML_xml2hash($biblio);
-	push @biblios,$xmlrecord;
-     }	
-my ($facets, at results)=parsefields($dbh,"opac", at biblios);
-    
-    return (\@results);
-}
-
-sub RemoveFromShelfExt {
-    my ($biblionumber, $shelfnumber) = @_;
-    my $sth = $dbh->prepare("DELETE FROM shelfcontents WHERE shelfnumber = ? AND biblionumber = ?");
-    $sth->execute($shelfnumber,$biblionumber);
-}
-
-sub AddToShelfExt {
-	my ($biblionumber, $shelfnumber) = @_;
-	my $sth = $dbh->prepare("SELECT * FROM shelfcontents WHERE shelfnumber = ? AND biblionumber = ?");
-	$sth->execute($shelfnumber, $biblionumber);
-	if ($sth->rows) {
-		return 0
-	} else {
-		$sth = $dbh->prepare("INSERT INTO shelfcontents (shelfnumber, biblionumber) VALUES (?, ?)");
-		$sth->execute($shelfnumber, $biblionumber);
-	}
-}
-
-sub AddRequestToShelf {
-	my ($shelfnumber, $requestType, $requestName, $comments) = @_;
-	my $sth = $dbh->prepare("INSERT INTO shelf_requests (shelfnumber, request_name, request_type, status, request_date, comments) VALUES (?,?,?,?, CURRENT_DATE(),?)");
-	$sth->execute($shelfnumber, $requestName, $requestType, "PENDING", $comments);
-	return $dbh->{'mysql_insertid'};
-}
-
-sub CountShelfRequest {
-	my ($shelfnumber, $status) = @_;
-	my $sth;
-	if ($shelfnumber) {
-		$sth = $dbh->prepare("SELECT count(idRequest) FROM shelf_requests WHERE shelfnumber = ? AND status = ?");
-		$sth->execute($shelfnumber, $status);
-	} else {
-		$sth = $dbh->prepare("SELECT count(idRequest) FROM shelf_requests WHERE status = ?");
-		$sth->execute($status);
-	}
-	my ($count) = $sth->fetchrow_array;
-	return $count;
-}
-
-sub GetShelfRequests {
-	my ($shelfnumber, $status, $type) = @_;
-	my @params;
-	my $query = "SELECT * FROM shelf_requests SR INNER JOIN bookshelf BS ON SR.shelfnumber = BS.shelfnumber WHERE status = ?";
-	push @params, $status;
-	if ($shelfnumber) {
-		$query.= " AND shelfnumber = ?";
-		push @params, $shelfnumber;
-	}
-	if ($type) {
-		$query.= " AND request_type = ?";
-		push @params, $type;
-	}
-	$query.= " ORDER BY SR.shelfnumber, SR.request_date";
-	my $sth = $dbh->prepare($query);
-	$sth->execute(@params);
-	my @results;
-
-	my $color = 0;
-	while (my $row = $sth->fetchrow_hashref) {
-		my $borrdata = borrdata('',$row->{'owner'});
-		$row->{'surname'} = $borrdata->{'surname'};
-		$row->{'firstname'} = $borrdata->{'firstname'};
-		$row->{'cardnumber'} = $borrdata->{'cardnumber'};
-		$row->{'request_date'} = format_date($row->{'request_date'});
-		$row->{$row->{'request_type'}} = 1;
-		$row->{$row->{'status'}} = 1;
-		$row->{'color'} = $color = not $color;
-		push @results, $row;
-	}
-	return (\@results);
-}
-
-sub RejectShelfRequest {
-	my ($idRequest) = @_;
-	#get the type and name request
-	my $sth = $dbh->prepare("SELECT request_type, request_name FROM shelf_requests WHERE idRequest = ?");
-	$sth->execute($idRequest);
-	my ($request_type, $request_name) = $sth->fetchrow_array;	
-	#if the request is a file, then unlink the file
-	if ($request_type eq 'file') {
-		unlink($ENV{'DOCUMENT_ROOT'}."/uploaded-files/shelf-files/$idRequest-$request_name");
-	}
-	#change tha request status to REJECTED
-	$sth = $dbh->prepare("UPDATE shelf_requests SET status = ? WHERE idRequest = ?");
-	$sth->execute("REJECTED", $idRequest);
-	return 1;
-}
-
-sub GetShelfRequestOwner {
-	my ($idRequest) = @_;
-	my $sth = $dbh->prepare("SELECT owner FROM shelf_requests R INNER JOIN bookshelf S ON R.shelfnumber = S.shelfnumber WHERE idRequest = ?");
-	$sth->execute($idRequest);
-	my ($owner) = $sth->fetchrow_array;	
-	my $bordata = &borrdata(undef, $owner);
-	#print "Content-type: text/plain \n\n  --- $owner ----- $bordata->{'emailaddress'}" ;
-	return ($bordata);
-}
-
-sub GetShelfRequest {
-	my ($idRequest) = @_;
-	my $sth = $dbh->prepare("SELECT * FROM shelf_requests R INNER JOIN bookshelf S ON R.shelfnumber = S.shelfnumber WHERE idRequest = ?");
-	$sth->execute($idRequest);
-	my $request_data = $sth->fetchrow_hashref;	
-	return $request_data;
-}
-
-sub CatalogueShelfRequest {
-	my ($idRequest, $shelfnumber, $biblionumber) = @_;
-	#find the last request status 
-	my $sth = $dbh->prepare("SELECT status, biblionumber FROM shelf_requests WHERE idRequest = ?");
-	$sth->execute($idRequest);
-	my ($prev_status, $prev_biblionumber) = $sth->fetchrow_array;
-	#if the status was not seted, inserts an entry in shelfcontents	
-	if ($prev_status ne "CATALOGUED") {
-		$sth = $dbh->prepare("INSERT INTO shelfcontents (shelfnumber, biblionumber) VALUES (?,?)");
-		$sth->execute($shelfnumber, $biblionumber);		
-	#if the request was previously catalogued, delete the entry in shelfcontens
-	} elsif ($prev_status ne "REJECTED") {
-		$sth = $dbh->prepare("DELETE FROM shelfcontents WHERE shelfnumber = ? AND biblionumber = ?");
-		$sth->execute($shelfnumber, $prev_biblionumber);		
-	}
-	#change the status to catalogued
-	$sth = $dbh->prepare("UPDATE shelf_requests SET status = ?, biblionumber = ? WHERE idRequest = ?");
-	$sth->execute("CATALOGUED", $biblionumber, $idRequest);
-	return 1;
-}
-
-END { }       # module clean-up code here (global destructor)
-
-1;
-
-#
-# $Log: BookShelves.pm,v $
-# Revision 1.19  2006/11/06 21:01:43  tgarip1957
-# Bug fixing and complete removal of Date::Manip
-#
-# Revision 1.18  2006/09/06 16:21:03  tgarip1957
-# Clean up before final commits
-#
-# Revision 1.13  2004/03/11 16:06:20  tipaul
-# *** empty log message ***
-#
-# Revision 1.11.2.2  2004/02/19 10:15:41  tipaul
-# new feature : adding book to bookshelf from biblio detail screen.
-#
-# Revision 1.11.2.1  2004/02/06 14:16:55  tipaul
-# fixing bugs in bookshelves management.
-#
-# Revision 1.11  2003/12/15 10:57:08  slef
-# DBI call fix for bug 662
-#
-# Revision 1.10  2003/02/05 10:05:02  acli
-# Converted a few SQL statements to use ? to fix a few strange SQL errors
-# Noted correct tab size
-#
-# Revision 1.9  2002/10/13 08:29:18  arensb
-# Deleted unused variables.
-# Removed trailing whitespace.
-#
-# Revision 1.8  2002/10/10 04:32:44  arensb
-# Simplified references.
-#
-# Revision 1.7  2002/10/05 09:50:10  arensb
-# Merged with arensb-context branch: use C4::Context->dbh instead of
-# &C4Connect, and generally prefer C4::Context over C4::Database.
-#
-# Revision 1.6.2.1  2002/10/04 02:24:43  arensb
-# Use C4::Connect instead of C4::Database, C4::Connect->dbh instead
-# C4Connect.
-#
-# Revision 1.6  2002/09/23 13:50:30  arensb
-# Fixed missing bit in POD.
-#
-# Revision 1.5  2002/09/22 17:29:17  arensb
-# Added POD.
-# Added some FIXME comments.
-# Removed useless trailing whitespace.
-#
-# Revision 1.4  2002/08/14 18:12:51  tonnesen
-# Added copyright statement to all .pl and .pm files
-#
-# Revision 1.3  2002/07/02 17:48:06  tonnesen
-# Merged in updates from rel-1-2
-#
-# Revision 1.2.2.1  2002/06/26 20:46:48  tonnesen
-# Inserting some changes I made locally a while ago.
-#
-#
-
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=head1 SEE ALSO
-
-C4::Circulation::Circ2(3)
-
-=cut

Index: C4/Bookfund.pm
===================================================================
RCS file: C4/Bookfund.pm
diff -N C4/Bookfund.pm
--- C4/Bookfund.pm	20 Sep 2006 21:48:44 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,572 +0,0 @@
-package C4::Bookfund;
-
-# 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
-
-# $Id: Bookfund.pm,v 1.7 2006/09/20 21:48:44 tgarip1957 Exp $
-
-use strict;
-
-
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.7 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
-
-=head1 NAME
-
-C4::Bookfund - Koha functions for dealing with bookfund, currency & money.
-
-=head1 SYNOPSIS
-
-use C4::Bookfund;
-
-=head1 DESCRIPTION
-
-the functions in this modules deal with bookfund, currency and money.
-They allow to get and/or set some informations for a specific budget or currency.
-
-=cut
-
- at ISA    = qw(Exporter);
- at EXPORT = qw(
-    &GetBookFund &GetBookFunds &GetBookFundsId &GetBookFundBreakdown &GetCurrencies
-    &NewBookFund
-    &ModBookFund &ModCurrencies
-    &SearchBookFund
-    &Countbookfund 
-    &ConvertCurrency
-    &DelBookFund
-);
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
-#-------------------------------------------------------------#
-
-=head3 GetBookFund
-
-=over 4
-
-$dataaqbookfund = &GetBookFund($bookfundid);
-
-this function get the bookfundid, bookfundname, the bookfundgroup,  the branchcode
-from aqbookfund table for bookfundid given on input arg.
-return: 
-C<$dataaqbookfund> is a hashref full of bookfundid, bookfundname, bookfundgroup,
-and branchcode.
-
-=back
-
-=cut
-
-sub GetBookFund {
-    my $bookfundid = shift;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        SELECT
-            bookfundid,
-            bookfundname,
-            bookfundgroup,
-            branchcode
-        FROM aqbookfund
-        WHERE bookfundid = ?
-    ";
-    my $sth=$dbh->prepare($query);
-$sth->execute($bookfundid);
-    return $sth->fetchrow_hashref;
-}
-
-
-=head3 GetBookFundsId
-
-=over 4
-
-$sth = &GetBookFundsId
-Read on aqbookfund table and execute a simple SQL query.
-
-return:
-$sth->execute. Don't forget to fetch row from the database after using
-this function by using, for example, $sth->fetchrow_hashref;
-
-C<@results> is an array of id existing on the database.
-
-=back
-
-=cut
-
-sub GetBookFundsId {
-    my @bookfundids_loop;
-    my $dbh= C4::Context->dbh;
-    my $query = "
-        SELECT bookfundid
-        FROM aqbookfund
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute;
-    return $sth;
-}
-
-#-------------------------------------------------------------#
-
-=head3 GetBookFunds
-
-=over 4
-
- at results = &GetBookFunds;
-
-Returns a list of all book funds.
-
-C<@results> is an array of references-to-hash, whose keys are fields from the aqbookfund and aqbudget tables of the Koha database. Results are ordered
-alphabetically by book fund name.
-
-=back
-
-=cut
-
-sub GetBookFunds {
-    my ($branch) = @_;
-    my $dbh      = C4::Context->dbh;
-    my $userenv  = C4::Context->userenv;
-    my $branch   = $userenv->{branch};
-    my $strsth;
-
-    if ( $branch  ) {
-        $strsth = "
-        SELECT *
-        FROM   aqbookfund,aqbudget
-        WHERE  aqbookfund.bookfundid=aqbudget.bookfundid
-            AND startdate<=now()
-            AND enddate>now()
-            AND (aqbookfund.branchcode IS NULL OR aqbookfund.branchcode='' OR aqbookfund.branchcode= ? )
-      GROUP BY aqbookfund.bookfundid ORDER BY bookfundname";
-    }
-    else {
-        $strsth = "
-            SELECT *
-            FROM   aqbookfund,
-                   aqbudget
-            WHERE aqbookfund.bookfundid=aqbudget.bookfundid
-                AND startdate<now()
-                AND enddate>now()
-            GROUP BY aqbookfund.bookfundid ORDER BY bookfundname
-        ";
-    }
-    my $sth = $dbh->prepare($strsth);
-    if ( $branch  ) {
-        $sth->execute($branch);
-    }
-    else {
-        $sth->execute;
-    }
-    my @results = ();
-    while ( my $data = $sth->fetchrow_hashref ) {
-        push( @results, $data );
-    }
-    $sth->finish;
-    return @results;
-}
-
-#-------------------------------------------------------------#
-
-=head3 GetCurrencies
-
-=over 4
-
- at currencies = &GetCurrencies;
-
-Returns the list of all known currencies.
-
-C<$currencies> is a array; its elements are references-to-hash, whose
-keys are the fields from the currency table in the Koha database.
-
-=back
-
-=cut
-
-sub GetCurrencies {
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        SELECT *
-        FROM   currency
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute;
-    my @results = ();
-    while ( my $data = $sth->fetchrow_hashref ) {
-        push( @results, $data );
-    }
-    $sth->finish;
-    return @results;
-}
-
-#-------------------------------------------------------------#
-
-=head3 GetBookFundBreakdown
-
-=over 4
-
-( $spent, $comtd ) = &GetBookFundBreakdown( $id, $year, $start, $end );
-
-returns the total comtd & spent for a given bookfund, and a given year
-used in acqui-home.pl
-
-=back
-
-=cut
-
-sub GetBookFundBreakdown {
-    my ( $id, $year, $start, $end ) = @_;
-    my $dbh = C4::Context->dbh;
-
-    # if no start/end dates given defaut to everything
-    if ( !$start ) {
-        $start = '0000-00-00';
-        $end   = 'now()';
-    }
-
-    # do a query for spent totals.
-    my $query = "
-        SELECT quantity,datereceived,freight,unitprice,listprice,ecost,
-               quantityreceived,subscription
-        FROM   aqorders
-        LEFT JOIN aqorderbreakdown ON aqorders.ordernumber=aqorderbreakdown.ordernumber
-        WHERE  bookfundid=?
-            AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00')
-            AND ((datereceived >= ? and datereceived < ?) OR (budgetdate >= ? and budgetdate < ?))
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute( $id, $start, $end, $start, $end );
-
-    my $spent = 0;
-    while ( my $data = $sth->fetchrow_hashref ) {
-        if ( $data->{'subscription'} == 1 ) {
-            $spent += $data->{'quantity'} * $data->{'unitprice'};
-        }
-        else {
-
-            my $leftover = $data->{'quantity'} - $data->{'quantityreceived'};
-            $spent += ( $data->{'unitprice'} ) * $data->{'quantityreceived'};
-
-        }
-    }
-
-    # then do a seperate query for commited totals, (pervious single query was
-    # returning incorrect comitted results.
-
-    my $query = "
-        SELECT  quantity,datereceived,freight,unitprice,
-                listprice,ecost,quantityreceived AS qrev,
-                subscription,biblio.title,itemtype,aqorders.biblionumber,
-                aqorders.booksellerinvoicenumber,
-                quantity-quantityreceived AS tleft,
-                aqorders.ordernumber AS ordnum,entrydate,budgetdate,
-                booksellerid,aqbasket.basketno
-        FROM    aqorderbreakdown,
-                aqbasket,
-                aqorders
-        LEFT JOIN biblio ON biblio.biblionumber=aqorders.biblionumber
-        WHERE   bookfundid=?
-            AND aqorders.ordernumber=aqorderbreakdown.ordernumber
-            AND aqorders.basketno=aqbasket.basketno
-            AND (budgetdate >= ? AND budgetdate < ?)
-            AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00')
-    ";
-
-    my $sth = $dbh->prepare($query);
-    $sth->execute( $id, $start, $end );
-
-    my $comtd;
-
-    my $total = 0;
-    while ( my $data = $sth->fetchrow_hashref ) {
-        my $left = $data->{'tleft'};
-        if ( !$left || $left eq '' ) {
-            $left = $data->{'quantity'};
-        }
-        if ( $left && $left > 0 ) {
-            my $subtotal = $left * $data->{'ecost'};
-            $data->{subtotal} = $subtotal;
-            $data->{'left'} = $left;
-            $comtd += $subtotal;
-        }
-    }
-
-    $sth->finish;
-    return ( $spent, $comtd );
-}
-
-=head3 NewBookFund
-
-=over 4
-
-&NewBookFund(bookfundid, bookfundname, branchcode);
-
-this function create a new bookfund into the database.
-
-=back
-
-=cut 
-
-sub NewBookFund{
-    my ($bookfundid, $bookfundname, $branchcode) = @_;
-    $branchcode = undef unless $branchcode;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        INSERT
-        INTO aqbookfund
-            (bookfundid, bookfundname, branchcode)
-        VALUES
-            (?, ?, ?)
-    ";
-    my $sth=$dbh->prepare($query);
-    $sth->execute($bookfundid,$bookfundname,$branchcode);
-}
-
-#-------------------------------------------------------------#
-
-=head3 ModBookFund
-
-=over 4
-
-&ModBookFund($bookfundname,$branchcode,$bookfundid);
-this function update the bookfundname and the branchcode on aqbookfund table
-on database.
-
-=back
-
-=cut
-
-sub ModBookFund {
-    my ($bookfundname,$branchcode,$bookfundid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        UPDATE aqbookfund
-        SET    bookfundname = ?,
-               branchcode = ?
-        WHERE  bookfundid = ?
-    ";
-    my $sth=$dbh->prepare($query);
-    $sth->execute($bookfundname,$branchcode,$bookfundid);
-# budgets depending on a bookfund must have the same branchcode
-# if the bookfund branchcode is set
-    if (defined $branchcode) {
-        $query = "
-            UPDATE aqbudget
-            SET branchcode = ?
-        ";
-        $sth=$dbh->prepare($query);
-        $sth->execute($branchcode);
-    }
-}
-
-#-------------------------------------------------------------#
-
-=head3 SearchBookFund
-
-=over 4
- at results = SearchBookFund(
-        $bookfundid,$filter,$filter_bookfundid,
-        $filter_bookfundname,$filter_branchcode);
-
-this function searchs among the bookfunds corresponding to our filtering rules.
-
-=back
-
-=cut
-
-sub SearchBookFund {
-    my $dbh = C4::Context->dbh;
-    my ($filter,
-        $filter_bookfundid,
-        $filter_bookfundname,
-        $filter_branchcode
-       ) = @_;
-
-    my @bindings;
-
-    my $query = "
-        SELECT  bookfundid,
-                bookfundname,
-                bookfundgroup,
-                branchcode
-        FROM aqbookfund
-        WHERE 1 = 1 ";
-
-    if ($filter) {
-        if ($filter_bookfundid) {
-            $query.= "AND bookfundid = ?";
-            push @bindings, $filter_bookfundid;
-        }
-        if ($filter_bookfundname) {
-            $query.= "AND bookfundname like ?";
-            push @bindings, '%'.$filter_bookfundname.'%';
-        }
-        if ($filter_branchcode) {
-            $query.= "AND branchcode = ?";
-            push @bindings, $filter_branchcode;
-        }
-    }
-    $query.= "ORDER BY bookfundid";
-
-    my $sth = $dbh->prepare($query);
-    $sth->execute(@bindings);
-    my @results;
-    while (my $row = $sth->fetchrow_hashref) {
-        push @results, $row;
-    }
-    return @results;
-}
-
-#-------------------------------------------------------------#
-
-=head3 ModCurrencies
-
-=over 4
-
-&ModCurrencies($currency, $newrate);
-
-Sets the exchange rate for C<$currency> to be C<$newrate>.
-
-=back
-
-=cut
-
-sub ModCurrencies {
-    my ( $currency, $rate ) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        UPDATE currency
-        SET    rate=?
-        WHERE  currency=?
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute( $rate, $currency );
-}
-
-#-------------------------------------------------------------#
-
-=head3 Countbookfund
-
-=over 4
-
-$number = Countbookfund($bookfundid);
-
-this function count the number of bookfund with id given on input arg.
-return :
-the result of the SQL query as a number.
-
-=back
-
-=cut
-
-sub Countbookfund {
-    my $bookfundid = shift;
-    my $dbh = C4::Context->dbh;
-    my $query ="
-        SELECT COUNT(*)
-        FROM   aqbookfund
-        WHERE bookfundid = ?
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute($bookfundid);
-    return $sth->fetchrow;
-}
-
-
-#-------------------------------------------------------------#
-
-=head3 ConvertCurrency
-
-=over 4
-
-$foreignprice = &ConvertCurrency($currency, $localprice);
-
-Converts the price C<$localprice> to foreign currency C<$currency> by
-dividing by the exchange rate, and returns the result.
-
-If no exchange rate is found, C<&ConvertCurrency> assumes the rate is one
-to one.
-
-=back
-
-=cut
-
-sub ConvertCurrency {
-    my ( $currency, $price ) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        SELECT rate
-        FROM   currency
-        WHERE  currency=?
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute($currency);
-    my $cur = ( $sth->fetchrow_array() )[0];
-    if ( $cur == 0 ) {
-        $cur = 1;
-    }
-    return ( $price / $cur );
-}
-
-#-------------------------------------------------------------#
-
-=head3 DelBookFund
-
-=over 4
-
-&DelBookFund($bookfundid);
-this function delete a bookfund which has $bokfundid as parameter on aqbookfund table and delete the approriate budget.
-
-=back
-
-=cut
-
-sub DelBookFund {
-    my $bookfundid = shift;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        DELETE FROM aqbookfund
-        WHERE bookfundid=?
-    ";
-    my $sth=$dbh->prepare($query);
-    $sth->execute($bookfundid);
-    $sth->finish;
-    $query = "
-        DELETE FROM aqbudget where bookfundid=?
-    ";
-    $sth=$dbh->prepare($query);
-    $sth->execute($bookfundid);
-    $sth->finish;
-}
-
-END { }    # module clean-up code here (global destructor)
-
-1;
-
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: C4/Bookseller.pm
===================================================================
RCS file: C4/Bookseller.pm
diff -N C4/Bookseller.pm
--- C4/Bookseller.pm	27 Jul 2006 13:39:00 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,276 +0,0 @@
-package C4::Bookseller;
-
-# 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
-
-# $Id: Bookseller.pm,v 1.1 2006/07/27 13:39:00 toins Exp $
-
-use strict;
-
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.1 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
-
- at ISA    = qw(Exporter);
- at EXPORT = qw(
-    &GetBookSeller &GetBooksellersWithLateOrders
-    &ModBookseller
-    &AddBookseller
-);
-
-
-=head1 NAME
-
-C4::Bookseller - Koha functions for dealing with booksellers.
-
-=head1 SYNOPSIS
-
-use C4::Bookseller;
-
-=head1 DESCRIPTION
-
-The functions in this module deal with booksellers. They allow to
-add a new bookseller, to modify it or to get some informations around
-a bookseller.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
-#-------------------------------------------------------------------#
-
-=head3 GetBookSeller
-
-=over 4
-
- at results = &GetBookSeller($searchstring);
-
-Looks up a book seller. C<$searchstring> may be either a book seller
-ID, or a string to look for in the book seller's name.
-
-C<@results> is an array of references-to-hash, whose keys are the fields of of the
-aqbooksellers table in the Koha database.
-
-=back
-
-=cut
-
-sub GetBookSeller {
-    my ($searchstring) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        SELECT *
-        FROM   aqbooksellers
-        WHERE  name LIKE ? OR id = ?
-    ";
-    my $sth =$dbh->prepare($query);
-    $sth->execute("$searchstring%", $searchstring );
-    my @results;
-    while ( my $data = $sth->fetchrow_hashref ) {
-        push( @results, $data );
-    }
-    $sth->finish;
-    return  @results ;
-}
-
-
-#-----------------------------------------------------------------#
-
-=head3 GetBooksellersWithLateOrders
-
-=over 4
-
-%results = &GetBooksellersWithLateOrders;
-
-Searches for suppliers with late orders.
-
-=back
-
-=cut
-
-sub GetBooksellersWithLateOrders {
-    my $delay = shift;
-    my $dbh   = C4::Context->dbh;
-
-# FIXME NOT quite sure that this operation is valid for DBMs different from Mysql, HOPING so
-# should be tested with other DBMs
-
-    my $strsth;
-    my $dbdriver = C4::Context->config("db_scheme") || "mysql";
-    if ( $dbdriver eq "mysql" ) {
-        $strsth = "
-            SELECT DISTINCT aqbasket.booksellerid, aqbooksellers.name
-            FROM aqorders, aqbasket
-            LEFT JOIN aqbooksellers ON aqbasket.booksellerid = aqbooksellers.id
-            WHERE aqorders.basketno = aqbasket.basketno
-                AND (closedate < DATE_SUB(CURDATE( ),INTERVAL $delay DAY)
-                AND (datereceived = '' OR datereceived IS NULL))
-        ";
-    }
-    else {
-        $strsth = "
-            SELECT DISTINCT aqbasket.booksellerid, aqbooksellers.name
-            FROM aqorders, aqbasket
-            LEFT JOIN aqbooksellers ON aqbasket.aqbooksellerid = aqbooksellers.id
-            WHERE aqorders.basketno = aqbasket.basketno
-                AND (closedate < (CURDATE( )-(INTERVAL $delay DAY)))
-                AND (datereceived = '' OR datereceived IS NULL))
-        ";
-    }
-
-    my $sth = $dbh->prepare($strsth);
-    $sth->execute;
-    my %supplierlist;
-    while ( my ( $id, $name ) = $sth->fetchrow ) {
-        $supplierlist{$id} = $name;
-    }
-
-    return %supplierlist;
-}
-
-#--------------------------------------------------------------------#
-
-=head3 AddBookseller
-
-=over 4
-
-$id = &AddBookseller($bookseller);
-
-Creates a new bookseller. C<$bookseller> is a reference-to-hash whose
-keys are the fields of the aqbooksellers table in the Koha database.
-All fields must be present.
-
-Returns the ID of the newly-created bookseller.
-
-=back
-
-=cut
-
-sub AddBookseller {
-    my ($data) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-        INSERT INTO aqbooksellers
-            (
-                name,      address1,      address2,   address3,      address4,
-                postal,    phone,         fax,        url,           contact,
-                contpos,   contphone,     contfax,    contaltphone,  contemail,
-                contnotes, active,        listprice,  invoiceprice,  gstreg,
-                listincgst,invoiceincgst, specialty,  discount,      invoicedisc,
-                nocalc,    notes
-            )
-        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute(
-        $data->{'name'},         $data->{'address1'},
-        $data->{'address2'},     $data->{'address3'},
-        $data->{'address4'},     $data->{'postal'},
-        $data->{'phone'},        $data->{'fax'},
-        $data->{'url'},          $data->{'contact'},
-        $data->{'contpos'},      $data->{'contphone'},
-        $data->{'contfax'},      $data->{'contaltphone'},
-        $data->{'contemail'},    $data->{'contnotes'},
-        $data->{'active'},       $data->{'listprice'},
-        $data->{'invoiceprice'}, $data->{'gstreg'},
-        $data->{'listincgst'},   $data->{'invoiceincgst'},
-        $data->{'specialty'},    $data->{'discount'},
-        $data->{'invoicedisc'},  $data->{'nocalc'},
-        $data->{'notes'}
-    );
-
-    # return the id of this new supplier
-    my $query = "
-        SELECT max(id)
-        FROM   aqbooksellers
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute;
-    return scalar($sth->fetchrow);
-}
-
-#-----------------------------------------------------------------#
-
-=head3 ModSupplier
-
-=over 4
-
-&ModSupplier($bookseller);
-
-Updates the information for a given bookseller. C<$bookseller> is a
-reference-to-hash whose keys are the fields of the aqbooksellers table
-in the Koha database. It must contain entries for all of the fields.
-The entry to modify is determined by C<$bookseller-E<gt>{id}>.
-
-The easiest way to get all of the necessary fields is to look up a
-book seller with C<&booksellers>, modify what's necessary, then call
-C<&ModSupplier> with the result.
-
-=back
-
-=cut
-
-sub ModBookseller {
-    my ($data) = @_;
-    my $dbh    = C4::Context->dbh;
-    my $query = "
-        UPDATE aqbooksellers
-        SET name=?,address1=?,address2=?,address3=?,address4=?,
-            postal=?,phone=?,fax=?,url=?,contact=?,contpos=?,
-            contphone=?,contfax=?,contaltphone=?,contemail=?,
-            contnotes=?,active=?,listprice=?, invoiceprice=?,
-            gstreg=?, listincgst=?,invoiceincgst=?,
-            specialty=?,discount=?,invoicedisc=?,nocalc=?, notes=?
-        WHERE id=?
-    ";
-    my $sth    = $dbh->prepare($query);
-    $sth->execute(
-        $data->{'name'},         $data->{'address1'},
-        $data->{'address2'},     $data->{'address3'},
-        $data->{'address4'},     $data->{'postal'},
-        $data->{'phone'},        $data->{'fax'},
-        $data->{'url'},          $data->{'contact'},
-        $data->{'contpos'},      $data->{'contphone'},
-        $data->{'contfax'},      $data->{'contaltphone'},
-        $data->{'contemail'},    $data->{'contnotes'},
-        $data->{'active'},       $data->{'listprice'},
-        $data->{'invoiceprice'}, $data->{'gstreg'},
-        $data->{'listincgst'},   $data->{'invoiceincgst'},
-        $data->{'specialty'},    $data->{'discount'},
-        $data->{'invoicedisc'},  $data->{'nocalc'},
-        $data->{'notes'},        $data->{'id'}
-    );
-    $sth->finish;
-}
-
-
-END { }    # module clean-up code here (global destructor)
-
-1;
-
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: C4/Boolean.pm
===================================================================
RCS file: C4/Boolean.pm
diff -N C4/Boolean.pm
--- C4/Boolean.pm	6 Feb 2003 07:07:54 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,123 +0,0 @@
-package C4::Boolean;
-
-# $Id: Boolean.pm,v 1.2 2003/02/06 07:07:54 acli Exp $
-
-#package to handle Boolean values in the parameters table
-# Note: This is just a utility module; it should not be instantiated.
-
-
-# Copyright 2003 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 POSIX;
-require Exporter;
-
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Boolean - Convenience functions to handle boolean values
-in the parameter table
-
-=head1 SYNOPSIS
-
-  use C4::Boolean;
-
-=head1 DESCRIPTION
-
-In the parameter table, there are various Boolean values that
-variously require a 0/1, no/yes, false/true, or off/on values.
-This module aims to provide scripts a means to interpret these
-Boolean values in a consistent way which makes common sense.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = (
-	&INVALID_BOOLEAN_STRING_EXCEPTION
-    );
-
- at EXPORT_OK = qw(
-	true_p
-    );
-
-sub INVALID_BOOLEAN_STRING_EXCEPTION ()
-    { 'The given value does not seem to be interpretable as a Boolean value' }
-
-use vars qw( %strings );
-
-%strings = (
-   '0'     => 0,	'1'     => 1,	# C
-   			'-1'    => 1,	# BASIC
-   'nil'   => 0,	't'     => 1,	# LISP
-   'false' => 0,	'true'  => 1,	# Pascal
-   'off'   => 0,	'on'    => 1,
-   'no'    => 0,	'yes'   => 1,
-   'n'     => 0,	'y'     => 1,
-);
-
-=item true_p
-
-    if ( C4::Boolean::true_p(C4::Context->preference("insecure")) ) {
-	...
-    }
-
-Tries to interpret the passed string as a Boolean value. Returns
-the value if the string can be interpreted as such; otherwise an
-exception is thrown.
-
-=cut
-
-sub true_p ($) {
-    my($x) = @_;
-    my $it;
-    if (!defined $x || ref($x) ne '') {
-	die INVALID_BOOLEAN_STRING_EXCEPTION;
-    }
-    $x = lc($x);
-    $x =~ s/\s//g;
-    if (defined $strings{$x}) {
-	$it = $strings{$x};
-    } else {
-	die INVALID_BOOLEAN_STRING_EXCEPTION;
-    }
-    return $it;
-}
-
-
-#---------------------------------
-
-END { }       # module clean-up code here (global destructor)
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: C4/Breeding.pm
===================================================================
RCS file: C4/Breeding.pm
diff -N C4/Breeding.pm
--- C4/Breeding.pm	6 Nov 2006 21:01:43 -0000	1.13
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,199 +0,0 @@
-package C4::Breeding;
-
-# 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 C4::Biblio;
-use C4::Search;
-use MARC::File::USMARC;
-use MARC::Record;
-use Encode;
-require Exporter;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Breeding : script to add a biblio in marc_breeding table.
-
-=head1 SYNOPSIS
-	&ImportBreeding($marcrecords,$overwrite_biblio,$filename,$z3950random);
-
-	C<$marcrecord> => the MARC::Record
-	C<$overwrite_biblio> => if set to 1 a biblio with the same ISBN will be overwritted.
-  								if set to 0 a biblio with the same isbn will be ignored (the previous will be kept)
-								if set to -1 the biblio will be added anyway (more than 1 biblio with the same ISBN possible in the breeding
-	C<$encoding> => USMARC
-						or UNIMARC. used for char_decoding.
-						If not present, the parameter marcflavour is used instead
-	C<$z3950random> => the random value created during a z3950 search result.
-
-=head1 DESCRIPTION
-
-This is for depository of records coming from z3950 or directly imported.
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(&ImportBreeding &BreedingSearch);
-
-sub  ImportBreeding {
-	my ($marcrecords,$overwrite_biblio,$filename,$encoding,$z3950random) = @_;
-## use marc:batch send them in one by one
-#	my @marcarray = split /\x1D/, $marcrecords;
-	my $dbh = C4::Context->dbh;
-my @kohafields;
-my @values;
-my @relations;
-my $sort;
-my @and_or;
-my @results;
-my $count;
-	my $searchbreeding = $dbh->prepare("select id from marc_breeding where isbn=? and title=?");
-	my $insertsql = $dbh->prepare("insert into marc_breeding (file,isbn,title,author,marc,encoding,z3950random,classification,subclass) values(?,?,?,?,?,?,?,?,?)");
-	my $replacesql = $dbh->prepare("update marc_breeding set file=?,isbn=?,title=?,author=?,marc=?,encoding=?,z3950random=?,classification=?,subclass=? where id=?");
-	$encoding = C4::Context->preference("marcflavour") unless $encoding;
-	# fields used for import results
-	my $imported=0;
-	my $alreadyindb = 0;
-	my $alreadyinfarm = 0;
-	my $notmarcrecord = 0;
-	my $breedingid;
-#	for (my $i=0;$i<=$#marcarray;$i++) {
-		my $marcrecord = MARC::File::USMARC::decode($marcrecords);
-		my $marcxml=$marcrecord->as_xml_record($marcrecord);
-		$marcxml=Encode::encode('utf8',$marcxml);
-		my @warnings = $marcrecord->warnings();
-		if (scalar($marcrecord->fields()) == 0) {
-			$notmarcrecord++;
-		} else {
-			my $xmlhash=XML_xml2hash_onerecord($marcxml);	
-			my $oldbiblio = XMLmarc2koha_onerecord($dbh,$xmlhash,'biblios');
-			# if isbn found and biblio does not exist, add it. If isbn found and biblio exists, overwrite or ignore depending on user choice
-			# drop every "special" char : spaces, - ...
-			$oldbiblio->{isbn} =~ s/ |-|\.//g,
-			$oldbiblio->{isbn} = substr($oldbiblio->{isbn},0,10);
-			$oldbiblio->{issn} =~ s/ |-|\.//g,
-			$oldbiblio->{issn} = substr($oldbiblio->{issn},0,10);
-			# search if biblio exists
-			my $biblioitemnumber;
-			my $facets;
-		    if ( !$z3950random){
-			if ($oldbiblio->{isbn}) {
-			push @kohafields,"isbn";
-			push @values,$oldbiblio->{isbn};
-			push @relations,"";
-			push @and_or,"";
-			
-			($count,$facets, at results)=ZEBRAsearch_kohafields(\@kohafields,\@values,\@relations);
-			} else {
-			push @kohafields,"issn";
-			push @values,$oldbiblio->{issn};
-			push @relations,"";
-			push @and_or,"";
-			$sort="";
-			($count,$facets, at results)=ZEBRAsearch_kohafields(\@kohafields,\@values,\@relations);
-			}
-	    	     }
-			if ($count>0 && !$z3950random) {
-				$alreadyindb++;
-			} else {
-				# search in breeding farm
-				
-				if ($oldbiblio->{isbn}) {
-					$searchbreeding->execute($oldbiblio->{isbn},$oldbiblio->{title});
-					($breedingid) = $searchbreeding->fetchrow;
-				} elsif ($oldbiblio->{issn}){
-					$searchbreeding->execute($oldbiblio->{issn},$oldbiblio->{title});
-					($breedingid) = $searchbreeding->fetchrow;
-				}
-				if ($breedingid && $overwrite_biblio eq 0) {
-					$alreadyinfarm++;
-				} else {
-					my $recoded=MARC::Record->new_from_xml($marcxml,"UTF-8");
-					$recoded->encoding('UTF-8');
-					
-					if ($breedingid && $overwrite_biblio eq 1) {
-						$replacesql ->execute($filename,substr($oldbiblio->{isbn}.$oldbiblio->{issn},0,10),$oldbiblio->{title},$oldbiblio->{author},$recoded->as_usmarc,$encoding,$z3950random,$oldbiblio->{classification},$oldbiblio->{subclass},$breedingid);
-					} else {
-						$insertsql ->execute($filename,substr($oldbiblio->{isbn}.$oldbiblio->{issn},0,10),$oldbiblio->{title},$oldbiblio->{author},$recoded->as_usmarc,$encoding,$z3950random,$oldbiblio->{classification},$oldbiblio->{subclass});
-					
-					$breedingid=$dbh->{'mysql_insertid'};
-					}
-					$imported++;
-				}
-			}
-		}
-	#}
-	return ($notmarcrecord,$alreadyindb,$alreadyinfarm,$imported,$breedingid);
-}
-
-
-=item BreedingSearch
-
-  ($count, @results) = &BreedingSearch($title,$isbn,$random);
-C<$title> contains the title,
-C<$isbn> contains isbn or issn,
-C<$random> contains the random seed from a z3950 search.
-
-C<$count> is the number of items in C<@results>. C<@results> is an
-array of references-to-hash; the keys are the items from the C<marc_breeding> table of the Koha database.
-
-=cut
-
-sub BreedingSearch {
-	my ($title,$isbn,$z3950random) = @_;
-	my $dbh   = C4::Context->dbh;
-	my $count = 0;
-	my ($query, at bind);
-	my $sth;
-	my @results;
-
-	$query = "Select id,file,isbn,title,author,classification,subclass from marc_breeding where ";
-	if ($z3950random) {
-		$query .= "z3950random = ?";
-		@bind=($z3950random);
-	} else {
-	    @bind=();
-		if ($title) {
-			$query .= "title like ?";
-			push(@bind,"$title%");
-		}
-		if ($title && $isbn) {
-			$query .= " and ";
-		}
-		if ($isbn) {
-			$query .= "isbn like ?";
-			push(@bind,"$isbn%");
-		}
-	}
-	$sth   = $dbh->prepare($query);
-	$sth->execute(@bind);
-	while (my $data = $sth->fetchrow_hashref) {
-			$results[$count] = $data;
-			$count++;
-	} # while
-
-	$sth->finish;
-	return($count, @results);
-} # sub breedingsearch
-
-
-END { }       # module clean-up code here (global destructor)

Index: C4/Context.pm
===================================================================
RCS file: C4/Context.pm
diff -N C4/Context.pm
--- C4/Context.pm	6 Nov 2006 21:01:43 -0000	1.50
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,931 +0,0 @@
-# Copyright 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
-
-# $Id: Context.pm,v 1.50 2006/11/06 21:01:43 tgarip1957 Exp $
-package C4::Context;
-use strict;
-use DBI;
-use C4::Boolean;
-use XML::Simple;
-use vars qw($VERSION $AUTOLOAD),
-	qw($context),
-	qw(@context_stack);
-
-$VERSION = do { my @v = '$Revision: 1.50 $' =~ /\d+/g;
-		shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
-
-=head1 NAME
-
-C4::Context - Maintain and manipulate the context of a Koha script
-
-=head1 SYNOPSIS
-
-  use C4::Context;
-
-  use C4::Context("/path/to/koha.xml");
-
-  $config_value = C4::Context->config("config_variable");
-  $db_handle = C4::Context->dbh;
-  $stopwordhash = C4::Context->stopwords;
-
-=head1 DESCRIPTION
-
-When a Koha script runs, it makes use of a certain number of things:
-configuration settings in F</etc/koha.xml>, a connection to the Koha
-databases, and so forth. These things make up the I<context> in which
-the script runs.
-
-This module takes care of setting up the context for a script:
-figuring out which configuration file to load, and loading it, opening
-a connection to the right database, and so forth.
-
-Most scripts will only use one context. They can simply have
-
-  use C4::Context;
-
-at the top.
-
-Other scripts may need to use several contexts. For instance, if a
-library has two databases, one for a certain collection, and the other
-for everything else, it might be necessary for a script to use two
-different contexts to search both databases. Such scripts should use
-the C<&set_context> and C<&restore_context> functions, below.
-
-By default, C4::Context reads the configuration from
-F</etc/koha.xml>. This may be overridden by setting the C<$KOHA_CONF>
-environment variable to the pathname of a configuration file to use.
-
-=head1 METHODS
-
-=over 2
-
-=cut
-
-#'
-# In addition to what is said in the POD above, a Context object is a
-# reference-to-hash with the following fields:
-#
-# config
-#	A reference-to-hash whose keys and values are the
-#	configuration variables and values specified in the config
-#	file (/etc/koha.xml).
-# dbh
-#	A handle to the appropriate database for this context.
-# dbh_stack
-#	Used by &set_dbh and &restore_dbh to hold other database
-#	handles for this context.
-# Zconn
-# 	A connection object for the Zebra server
-
-use constant CONFIG_FNAME => "/etc/koha.xml";
-				# Default config file, if none is specified
-
-$context = undef;		# Initially, no context is set
- at context_stack = ();		# Initially, no saved contexts
-
-# read_config_file
-# Reads the specified Koha config file. Returns a reference-to-hash
-# whose keys are the configuration variables, and whose values are the
-# configuration values (duh).
-# Returns undef in case of error.
-#
-# Revision History:
-# 2004-08-10 A. Tarallo: Added code that checks if a variable is already
-# assigned and prints a message, otherwise create a new entry in the hash to
-# be returned. 
-# Also added code that complaints if finds a line that isn't a variable 
-# assignmet and skips the line.
-# Added a quick hack that makes the translation between the db_schema
-# and the DBI driver for that schema.
-#
-sub read_config_file
-{
-	my $fname = shift;	# Config file to read
-
-	my $retval = {};	# Return value: ref-to-hash holding the
-				# configuration
-
-my $koha = XMLin($fname, keyattr => ['id'],forcearray => ['listen']);
-
-	return $koha;
-}
-
-# db_scheme2dbi
-# Translates the full text name of a database into de appropiate dbi name
-# 
-sub db_scheme2dbi
-{
-	my $name = shift;
-
-	for ($name) {
-# FIXME - Should have other databases. 
-		if (/mysql/i) { return("mysql"); }
-		if (/Postgres|Pg|PostgresSQL/) { return("Pg"); }
-		if (/oracle/i) { return("Oracle"); }
-	}
-	return undef; 		# Just in case
-}
-
-sub import
-{
-	my $package = shift;
-	my $conf_fname = shift;		# Config file name
-	my $context;
-
-	# Create a new context from the given config file name, if
-	# any, then set it as the current context.
-	$context = new C4::Context($conf_fname);
-	return undef if !defined($context);
-	$context->set_context;
-}
-
-=item new
-
-  $context = new C4::Context;
-  $context = new C4::Context("/path/to/koha.xml");
-
-Allocates a new context. Initializes the context from the specified
-file, which defaults to either the file given by the C<$KOHA_CONF>
-environment variable, or F</etc/koha.xml>.
-
-C<&new> does not set this context as the new default context; for
-that, use C<&set_context>.
-
-=cut
-
-#'
-# Revision History:
-# 2004-08-10 A. Tarallo: Added check if the conf file is not empty
-sub new
-{
-	my $class = shift;
-	my $conf_fname = shift;		# Config file to load
-	my $self = {};
-
-	# check that the specified config file exists and is not empty
-	undef $conf_fname unless 
-	    (defined $conf_fname && -e $conf_fname && -s $conf_fname);
-	# Figure out a good config file to load if none was specified.
-	if (!defined($conf_fname))
-	{
-		# If the $KOHA_CONF environment variable is set, use
-		# that. Otherwise, use the built-in default.
-		$conf_fname = $ENV{"KOHA_CONF"} || CONFIG_FNAME;
-	}
-		# Load the desired config file.
-	$self = read_config_file($conf_fname);
-	$self->{"config_file"} = $conf_fname;
-
-
-	
-	warn "read_config_file($conf_fname) returned undef" if !defined($self->{"config"});
-	return undef if !defined($self->{"config"});
-
-	$self->{"dbh"} = undef;		# Database handle
-	$self->{"Zconn"} = undef;	# Zebra Connection
-	$self->{"Zconnauth"} = undef;	# Zebra Connection for updating
-	$self->{"stopwords"} = undef; # stopwords list
-	$self->{"marcfromkohafield"} = undef; # the hash with relations between koha table fields and MARC field/subfield
-	$self->{"attrfromkohafield"} = undef; # the hash with relations between koha table fields and Bib1-attributes
-	$self->{"userenv"} = undef;		# User env
-	$self->{"activeuser"} = undef;		# current active user
-
-	bless $self, $class;
-	return $self;
-}
-
-=item set_context
-
-  $context = new C4::Context;
-  $context->set_context();
-or
-  set_context C4::Context $context;
-
-  ...
-  restore_context C4::Context;
-
-In some cases, it might be necessary for a script to use multiple
-contexts. C<&set_context> saves the current context on a stack, then
-sets the context to C<$context>, which will be used in future
-operations. To restore the previous context, use C<&restore_context>.
-
-=cut
-
-#'
-sub set_context
-{
-	my $self = shift;
-	my $new_context;	# The context to set
-
-	# Figure out whether this is a class or instance method call.
-	#
-	# We're going to make the assumption that control got here
-	# through valid means, i.e., that the caller used an instance
-	# or class method call, and that control got here through the
-	# usual inheritance mechanisms. The caller can, of course,
-	# break this assumption by playing silly buggers, but that's
-	# harder to do than doing it properly, and harder to check
-	# for.
-	if (ref($self) eq "")
-	{
-		# Class method. The new context is the next argument.
-		$new_context = shift;
-	} else {
-		# Instance method. The new context is $self.
-		$new_context = $self;
-	}
-
-	# Save the old context, if any, on the stack
-	push @context_stack, $context if defined($context);
-
-	# Set the new context
-	$context = $new_context;
-}
-
-=item restore_context
-
-  &restore_context;
-
-Restores the context set by C<&set_context>.
-
-=cut
-
-#'
-sub restore_context
-{
-	my $self = shift;
-
-	if ($#context_stack < 0)
-	{
-		# Stack underflow.
-		die "Context stack underflow";
-	}
-
-	# Pop the old context and set it.
-	$context = pop @context_stack;
-
-	# FIXME - Should this return something, like maybe the context
-	# that was current when this was called?
-}
-
-=item config
-
-  $value = C4::Context->config("config_variable");
-
-  $value = C4::Context->config_variable;
-
-Returns the value of a variable specified in the configuration file
-from which the current context was created.
-
-The second form is more compact, but of course may conflict with
-method names. If there is a configuration variable called "new", then
-C<C4::Config-E<gt>new> will not return it.
-
-=cut
-
-#'
-sub config
-{
-	my $self = shift;
-	my $var = shift;		# The config variable to return
-
-	return undef if !defined($context->{"config"});
-			# Presumably $self->{config} might be
-			# undefined if the config file given to &new
-			# didn't exist, and the caller didn't bother
-			# to check the return value.
-
-	# Return the value of the requested config variable
-	return $context->{"config"}->{$var};
-}
-=item zebraconfig
-$serverdir=C4::Context->zebraconfig("biblioserver")->{directory};
-
-returns the zebra server specific details for different zebra servers
-similar to C4:Context->config
-=cut
-
-sub zebraconfig
-{
-	my $self = shift;
-	my $var = shift;		# The config variable to return
-
-	return undef if !defined($context->{"server"});
-	# Return the value of the requested config variable
-	return $context->{"server"}->{$var};
-}
-=item preference
-
-  $sys_preference = C4::Context->preference("some_variable");
-
-Looks up the value of the given system preference in the
-systempreferences table of the Koha database, and returns it. If the
-variable is not set, or in case of error, returns the undefined value.
-
-=cut
-
-#'
-# FIXME - The preferences aren't likely to change over the lifetime of
-# the script (and things might break if they did change), so perhaps
-# this function should cache the results it finds.
-sub preference
-{
-	my $self = shift;
-	my $var = shift;		# The system preference to return
-	my $retval;			# Return value
-	my $dbh = C4::Context->dbh;	# Database handle
-	my $sth;			# Database query handle
-
-	# Look up systempreferences.variable==$var
-	$retval = $dbh->selectrow_array(<<EOT);
-		SELECT	value
-		FROM	systempreferences
-		WHERE	variable='$var'
-		LIMIT	1
-EOT
-	return $retval;
-}
-
-sub boolean_preference ($) {
-	my $self = shift;
-	my $var = shift;		# The system preference to return
-	my $it = preference($self, $var);
-	return defined($it)? C4::Boolean::true_p($it): undef;
-}
-
-# AUTOLOAD
-# This implements C4::Config->foo, and simply returns
-# C4::Context->config("foo"), as described in the documentation for
-# &config, above.
-
-# FIXME - Perhaps this should be extended to check &config first, and
-# then &preference if that fails. OTOH, AUTOLOAD could lead to crappy
-# code, so it'd probably be best to delete it altogether so as not to
-# encourage people to use it.
-sub AUTOLOAD
-{
-	my $self = shift;
-
-	$AUTOLOAD =~ s/.*:://;		# Chop off the package name,
-					# leaving only the function name.
-	return $self->config($AUTOLOAD);
-}
-
-=item Zconn
-
-$Zconn = C4::Context->Zconn
-$Zconnauth = C4::Context->Zconnauth
-Returns a connection to the Zebra database for the current
-context. If no connection has yet been made, this method 
-creates one and connects.
-
-=cut
-
-sub Zconn {
-        my $self = shift;
-my $server=shift;
-my $syntax=shift;
-	my $Zconn;
-	$context->{"Zconn"} = &new_Zconn($server,$syntax);
-	return $context->{"Zconn"};
-  
-}
-
-sub Zconnauth {
-        my $self = shift;
-my $server=shift;
-my $syntax=shift;
-	my $Zconnauth;
-##We destroy each connection made so create a new one	
-		$context->{"Zconnauth"} = &new_Zconnauth($server,$syntax);
-		return $context->{"Zconnauth"};
-		
-}
-
-
-
-=item new_Zconn
-
-Internal helper function. creates a new database connection from
-the data given in the current context and returns it.
-
-=cut
-
-sub new_Zconn {
-use ZOOM;
-my $server=shift;
-my $syntax=shift;
-$syntax="xml" unless $syntax;
-my $Zconn;
-my ($tcp,$host,$port)=split /:/,$context->{"listen"}->{$server}->{"content"};
-my $o = new ZOOM::Options();
-$o->option(async => 1);
-$o->option(preferredRecordSyntax => $syntax); ## in case we use MARC
-$o->option(databaseName=>$context->{"config"}->{$server});
-
-my $o2= new ZOOM::Options();
-
- $Zconn=create ZOOM::Connection($o);
-	$Zconn->connect($context->{"config"}->{"hostname"},$port);
-	
-	return $Zconn;
-}
-
-## Zebra handler with write permission
-sub new_Zconnauth {
-use ZOOM;
-my $server=shift;
-my $syntax=shift;
-$syntax="xml" unless $syntax;
-my $Zconnauth;
-my ($tcp,$host,$port)=split /:/,$context->{"listen"}->{$server}->{"content"};
-my $o = new ZOOM::Options();
-#$o->option(async => 1);
-$o->option(preferredRecordSyntax => $syntax);
-$o->option(user=>$context->{"config"}->{"zebrauser"});
-$o->option(password=>$context->{"config"}->{"zebrapass"});
-$o->option(databaseName=>$context->{"config"}->{$server});
- $o->option(charset=>"UTF8");
- $Zconnauth=create ZOOM::Connection($o);
-$Zconnauth->connect($context->config("hostname"),$port);
-return $Zconnauth;
-}
-
-
-# _new_dbh
-# Internal helper function (not a method!). This creates a new
-# database connection from the data given in the current context, and
-# returns it.
-sub _new_dbh
-{
-	##correct name for db_schme		
-	my $db_driver;
-	if ($context->config("db_scheme")){
-	$db_driver=db_scheme2dbi($context->config("db_scheme"));
-	}else{
-	$db_driver="mysql";
-	}
-
-	my $db_name   = $context->config("database");
-	my $db_host   = $context->config("hostname");
-	my $db_user   = $context->config("user");
-	my $db_passwd = $context->config("pass");
-	my $dbh= DBI->connect("DBI:$db_driver:$db_name:$db_host",
-			    $db_user, $db_passwd);
-	# Koha 3.0 is utf-8, so force utf8 communication between mySQL and koha, whatever the mysql default config.
-	###DBD::Mysql 3.0.7 has an intermittent bug for dbh->do so change to dbh->prepare
-	my $sth=$dbh->prepare("set NAMES 'utf8'");
-	$sth->execute();
-	$sth->finish;
-
-	return $dbh;
-}
-
-=item dbh
-
-  $dbh = C4::Context->dbh;
-
-Returns a database handle connected to the Koha database for the
-current context. If no connection has yet been made, this method
-creates one, and connects to the database.
-
-This database handle is cached for future use: if you call
-C<C4::Context-E<gt>dbh> twice, you will get the same handle both
-times. If you need a second database handle, use C<&new_dbh> and
-possibly C<&set_dbh>.
-
-=cut
-
-#'
-sub dbh
-{
-	my $self = shift;
-	my $sth;
-
-	if (defined($context->{"dbh"})) {
-	    $sth=$context->{"dbh"}->prepare("select 1");
-	    return $context->{"dbh"} if (defined($sth->execute));
-	}
-
-	# No database handle or it died . Create one.
-	$context->{"dbh"} = &_new_dbh();
-
-	return $context->{"dbh"};
-}
-
-=item new_dbh
-
-  $dbh = C4::Context->new_dbh;
-
-Creates a new connection to the Koha database for the current context,
-and returns the database handle (a C<DBI::db> object).
-
-The handle is not saved anywhere: this method is strictly a
-convenience function; the point is that it knows which database to
-connect to so that the caller doesn't have to know.
-
-=cut
-
-#'
-sub new_dbh
-{
-	my $self = shift;
-
-	return &_new_dbh();
-}
-
-=item set_dbh
-
-  $my_dbh = C4::Connect->new_dbh;
-  C4::Connect->set_dbh($my_dbh);
-  ...
-  C4::Connect->restore_dbh;
-
-C<&set_dbh> and C<&restore_dbh> work in a manner analogous to
-C<&set_context> and C<&restore_context>.
-
-C<&set_dbh> saves the current database handle on a stack, then sets
-the current database handle to C<$my_dbh>.
-
-C<$my_dbh> is assumed to be a good database handle.
-
-=cut
-
-#'
-sub set_dbh
-{
-	my $self = shift;
-	my $new_dbh = shift;
-
-	# Save the current database handle on the handle stack.
-	# We assume that $new_dbh is all good: if the caller wants to
-	# screw himself by passing an invalid handle, that's fine by
-	# us.
-	push @{$context->{"dbh_stack"}}, $context->{"dbh"};
-	$context->{"dbh"} = $new_dbh;
-}
-
-=item restore_dbh
-
-  C4::Context->restore_dbh;
-
-Restores the database handle saved by an earlier call to
-C<C4::Context-E<gt>set_dbh>.
-
-=cut
-
-#'
-sub restore_dbh
-{
-	my $self = shift;
-
-	if ($#{$context->{"dbh_stack"}} < 0)
-	{
-		# Stack underflow
-		die "DBH stack underflow";
-	}
-
-	# Pop the old database handle and set it.
-	$context->{"dbh"} = pop @{$context->{"dbh_stack"}};
-
-	# FIXME - If it is determined that restore_context should
-	# return something, then this function should, too.
-}
-
-=item marcfromkohafield
-
-  $dbh = C4::Context->marcfromkohafield;
-
-Returns a hash with marcfromkohafield.
-
-This hash is cached for future use: if you call
-C<C4::Context-E<gt>marcfromkohafield> twice, you will get the same hash without real DB access
-
-=cut
-
-#'
-sub marcfromkohafield
-{
-	my $retval = {};
-
-	# If the hash already exists, return it.
-	return $context->{"marcfromkohafield"} if defined($context->{"marcfromkohafield"});
-
-	# No hash. Create one.
-	$context->{"marcfromkohafield"} = &_new_marcfromkohafield();
-
-	return $context->{"marcfromkohafield"};
-}
-
-
-# _new_marcfromkohafield
-# Internal helper function (not a method!). 
-sub _new_marcfromkohafield
-{
-	my $dbh = C4::Context->dbh;
-	my $marcfromkohafield;
-	my $sth = $dbh->prepare("select kohafield,tagfield,tagsubfield,recordtype from koha_attr where tagfield is not null  ");
-	$sth->execute;
-	while (my ($kohafield,$tagfield,$tagsubfield,$recordtype) = $sth->fetchrow) {
-		my $retval = {};
-		$marcfromkohafield->{$recordtype}->{$kohafield} = [$tagfield,$tagsubfield];
-	}
-	
-	return $marcfromkohafield;
-}
-
-
-#item attrfromkohafield
-#To use as a hash of koha to z3950 attributes
-sub _new_attrfromkohafield
-{
-	my $dbh = C4::Context->dbh;
-	my $attrfromkohafield;
-	my $sth2 = $dbh->prepare("select kohafield,attr from koha_attr" );
-	$sth2->execute;
-	while (my ($kohafield,$attr) = $sth2->fetchrow) {
-		my $retval = {};
-		$attrfromkohafield->{$kohafield} = $attr;
-	}
-	return $attrfromkohafield;
-}
-sub attrfromkohafield
-{
-	my $retval = {};
-
-	# If the hash already exists, return it.
-	return $context->{"attrfromkohafield"} if defined($context->{"attrfromkohafield"});
-
-	# No hash. Create one.
-	$context->{"attrfromkohafield"} = &_new_attrfromkohafield();
-
-	return $context->{"attrfromkohafield"};
-}
-=item stopwords
-
-  $dbh = C4::Context->stopwords;
-
-Returns a hash with stopwords.
-
-This hash is cached for future use: if you call
-C<C4::Context-E<gt>stopwords> twice, you will get the same hash without real DB access
-
-=cut
-
-#'
-sub stopwords
-{
-	my $retval = {};
-
-	# If the hash already exists, return it.
-	return $context->{"stopwords"} if defined($context->{"stopwords"});
-
-	# No hash. Create one.
-	$context->{"stopwords"} = &_new_stopwords();
-
-	return $context->{"stopwords"};
-}
-
-# _new_stopwords
-# Internal helper function (not a method!). This creates a new
-# hash with stopwords
-sub _new_stopwords
-{
-	my $dbh = C4::Context->dbh;
-	my $stopwordlist;
-	my $sth = $dbh->prepare("select word from stopwords");
-	$sth->execute;
-	while (my $stopword = $sth->fetchrow_array) {
-		my $retval = {};
-		$stopwordlist->{$stopword} = uc($stopword);
-	}
-	$stopwordlist->{A} = "A" unless $stopwordlist;
-	return $stopwordlist;
-}
-
-=item userenv
-
-  C4::Context->userenv;
-
-Builds a hash for user environment variables.
-
-This hash shall be cached for future use: if you call
-C<C4::Context-E<gt>userenv> twice, you will get the same hash without real DB access
-
-set_userenv is called in Auth.pm
-
-=cut
-
-#'
-sub userenv
-{
-	my $var = $context->{"activeuser"};
-	return $context->{"userenv"}->{$var} if (defined $context->{"userenv"}->{$var});
-	return 0;
-	warn "NO CONTEXT for $var";
-}
-
-=item set_userenv
-
-  C4::Context->set_userenv($usernum, $userid, $usercnum, $userfirstname, $usersurname, $userbranch, $userflags, $emailaddress);
-
-Informs a hash for user environment variables.
-
-This hash shall be cached for future use: if you call
-C<C4::Context-E<gt>userenv> twice, you will get the same hash without real DB access
-
-set_userenv is called in Auth.pm
-
-=cut
-#'
-sub set_userenv{
-	my ($usernum, $userid, $usercnum, $userfirstname, $usersurname, $userbranch, $branchname, $userflags, $emailaddress,$branchprinter)= @_;
-	my $var=$context->{"activeuser"};
-	my $cell = {
-		"number"     => $usernum,
-		"id"         => $userid,
-		"cardnumber" => $usercnum,
-#		"firstname"  => $userfirstname,
-#		"surname"    => $usersurname,
-#possibly a law problem
-		"branch"     => $userbranch,
-		"branchname" => $branchname,
-		"flags"      => $userflags,
-		"emailaddress"	=> $emailaddress,
-		"branchprinter" => $branchprinter,
-	};
-	$context->{userenv}->{$var} = $cell;
-	return $cell;
-}
-
-=item _new_userenv
-
-  C4::Context->_new_userenv($session);
-
-Builds a hash for user environment variables.
-
-This hash shall be cached for future use: if you call
-C<C4::Context-E<gt>userenv> twice, you will get the same hash without real DB access
-
-_new_userenv is called in Auth.pm
-
-=cut
-
-#'
-sub _new_userenv
-{
-	shift;
-	my ($sessionID)= @_;
- 	$context->{"activeuser"}=$sessionID;
-}
-
-=item _unset_userenv
-
-  C4::Context->_unset_userenv;
-
-Destroys the hash for activeuser user environment variables.
-
-=cut
-#'
-
-sub _unset_userenv
-{
-	my ($sessionID)= @_;
-	undef $context->{"activeuser"} if ($context->{"activeuser"} eq $sessionID);
-}
-
-
-
-1;
-__END__
-
-=back
-
-=head1 ENVIRONMENT
-
-=over 4
-
-=item C<KOHA_CONF>
-
-Specifies the configuration file to read.
-
-=back
-
-=head1 SEE ALSO
-
-DBI(3)
-
-=head1 AUTHOR
-
-Andrew Arensburger <arensb at ooblick dot com>
-
-=cut
-# $Log: Context.pm,v $
-# Revision 1.50  2006/11/06 21:01:43  tgarip1957
-# Bug fixing and complete removal of Date::Manip
-#
-# Revision 1.49  2006/10/20 01:20:56  tgarip1957
-# A new Date.pm to use for all date calculations. Mysql date calculations removed from Circ2.pm, all modules free of DateManip, a new get_today function to call in allscripts, and some bug cleaning in authorities.pm
-#
-# Revision 1.48  2006/10/01 21:48:54  tgarip1957
-# Field weighting applied to ranked searches. A new facets table in mysql db
-#
-# Revision 1.47  2006/09/27 19:53:52  tgarip1957
-# Finalizing main components. All koha modules are now working with the new XML API
-#
-# Revision 1.46  2006/09/06 16:21:03  tgarip1957
-# Clean up before final commits
-#
-# Revision 1.43  2006/08/10 12:49:37  toins
-# sync with dev_week.
-#
-# Revision 1.42  2006/07/04 14:36:51  toins
-# Head & rel_2_2 merged
-#
-# Revision 1.41  2006/05/20 14:36:09  tgarip1957
-# Typo error. Missing '>'
-#
-# Revision 1.40  2006/05/20 14:28:02  tgarip1957
-# Adding support to read zebra database name from config files
-#
-# Revision 1.39  2006/05/19 09:52:54  alaurin
-# committing new feature ip and printer management
-# adding two fields in branches table (branchip,branchprinter)
-#
-# branchip : if the library enter an ip or ip range any librarian that connect from computer in this ip range will be temporarly affected to the corresponding branch .
-#
-# branchprinter : the library  can select a default printer for a branch
-#
-# Revision 1.38  2006/05/14 00:22:31  tgarip1957
-# Adding support for getting details of different zebra servers
-#
-# Revision 1.37  2006/05/13 19:51:39  tgarip1957
-# Now reads koha.xml rather than koha.conf.
-# koha.xml contains both the koha configuration and zebraserver configuration.
-# Zebra connection is modified to allow connection to authority zebra as well.
-# It will break head if koha.conf is not replaced with koha.xml
-#
-# Revision 1.36  2006/05/09 13:28:08  tipaul
-# adding the branchname and the librarian name in every page :
-# - modified userenv to add branchname
-# - modifier menus.inc to have the librarian name & userenv displayed on every page. they are in a librarian_information div.
-#
-# Revision 1.35  2006/04/13 08:40:11  plg
-# bug fixed: typo on Zconnauth name
-#
-# Revision 1.34  2006/04/10 21:40:23  tgarip1957
-# A new handler defined for zebra Zconnauth with read/write permission. Zconnauth should only be called in biblio.pm where write operations are. Use of this handler will break things unless koha.conf contains new variables:
-# zebradb=localhost
-# zebraport=<your port>
-# zebrauser=<username>
-# zebrapass=<password>
-#
-# The zebra.cfg file should read:
-# perm.anonymous:r
-# perm.username:rw
-# passw.c:<yourpasswordfile>
-#
-# Password file should be prepared with Apaches htpasswd utility in encrypted mode and should exist in a folder zebra.cfg can read
-#
-# Revision 1.33  2006/03/15 11:21:56  plg
-# bug fixed: utf-8 data where not displayed correctly in screens. Supposing
-# your data are truely utf-8 encoded in your database, they should be
-# correctly displayed. "set names 'UTF8'" on mysql connection (C4/Context.pm)
-# is mandatory and "binmode" to utf8 (C4/Interface/CGI/Output.pm) seemed to
-# converted data twice, so it was removed.
-#
-# Revision 1.32  2006/03/03 17:25:01  hdl
-# Bug fixing : a line missed a comment sign.
-#
-# Revision 1.31  2006/03/03 16:45:36  kados
-# Remove the search that tests the Zconn -- warning, still no fault
-# tollerance
-#
-# Revision 1.30  2006/02/22 00:56:59  kados
-# First go at a connection object for Zebra. You can now get a
-# connection object by doing:
-#
-# my $Zconn = C4::Context->Zconn;
-#
-# My initial tests indicate that as soon as your funcion ends
-# (ie, when you're done doing something) the connection will be
-# closed automatically. There may be some other way to make the
-# connection more stateful, I'm not sure...
-#
-# Local Variables:
-# tab-width: 4
-# End:

Index: C4/Date.pm
===================================================================
RCS file: C4/Date.pm
diff -N C4/Date.pm
--- C4/Date.pm	15 Nov 2006 01:36:00 -0000	1.24
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,216 +0,0 @@
-#!/usr/bin/perl
-## written by T Garip 2006-10-10 tgarip at neu.edu.tr
-# 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
-
-# $Id: Date.pm,v 1.24 2006/11/15 01:36:00 tgarip1957 Exp $
-
-package C4::Date;
-
-use strict;
-use C4::Context;
-use DateTime;
-use DateTime::Format::ISO8601;
-use DateTime::Format::Strptime;
-use DateTime::Format::Duration;
-use POSIX qw(ceil floor);
-require Exporter;
-
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-$VERSION = do { my @v = '$Revision: 1.24 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
-
- at ISA = qw(Exporter);
-
- at EXPORT = qw(
-  &display_date_format
-  &format_date
-  &format_date_in_iso
-  &get_date_format_string_for_DHTMLcalendar
-  &DATE_diff &DATE_Add
-&get_today &DATE_Add_Duration &DATE_obj &get_duration
-&DATE_subtract
-);
-
-sub get_date_format {
-
-    #Get the database handle
-    my $dbh = C4::Context->dbh;
-    return C4::Context->preference('dateformat');
-}
-
-sub display_date_format {
-    my $dateformat = get_date_format();
-
-    if ( $dateformat eq "us" ) {
-        return "mm/dd/yyyy";
-    }
-    elsif ( $dateformat eq "metric" ) {
-        return "dd/mm/yyyy";
-    }
-    elsif ( $dateformat eq "iso" ) {
-        return "yyyy-mm-dd";
-    }
-    else {
-        return
-"Invalid date format: $dateformat. Please change in system preferences";
-    }
-}
-
-sub get_date_format_string_for_DHTMLcalendar {
-    my $dateformat = get_date_format();
-
-    if ( $dateformat eq 'us' ) {
-        return '%m/%d/%Y';
-    }
-    elsif ( $dateformat eq 'metric' ) {
-        return '%d/%m/%Y';
-    }
-    elsif ( $dateformat eq "iso" ) {
-        return '%Y-%m-%d';
-    }
-    else {
-        return 'Invalid date format: '
-          . $dateformat . '.'
-          . ' Please change in system preferences';
-    }
-}
-
-sub format_date {
-    my $olddate = shift;
-    my $newdate;
-    if ( !$olddate || $olddate eq "0000-00-00" ) {
-        return "";
-    }
-		$olddate=~s/-//g;
-		my $olddate=substr($olddate,0,8);
-    my $dateformat = get_date_format();
-eval{$newdate =DateTime::Format::ISO8601->parse_datetime($olddate);};
-if ($@ || !$newdate){
-##MARC21 tag 008 has this format YYMMDD
-my $parser =    DateTime::Format::Strptime->new( pattern => '%y%m%d' );
-        $newdate =$parser->parse_datetime($olddate);
-}
-if (!$newdate){
-return ""; #### some script call format_date more than once --FIX scripts
-}
-
-    if ( $dateformat eq "us" ) {
-      return $newdate->mdy('/');
-    
-    }
-    elsif ( $dateformat eq "metric" ) {
-        return $newdate->dmy('/');
-    }
-    elsif ( $dateformat eq "iso" ) {
-        return $newdate->ymd;
-    }
-    else {
-        return
-"Invalid date format: $dateformat. Please change in system preferences";
-    }
-
-}
-
-sub format_date_in_iso {
-    my $olddate = shift;
-    my $newdate;
-  my $parser;
-    if ( !$olddate || $olddate eq "0000-00-00" ) {
-        return "";
-    }
-
-$parser =    DateTime::Format::Strptime->new( pattern => '%d/%m/%Y' );
-        $newdate =$parser->parse_datetime($olddate);
-if (!$newdate){
-$parser =    DateTime::Format::Strptime->new( pattern => '%m/%d/%Y' );
-$newdate =$parser->parse_datetime($olddate);
-}
-if (!$newdate){
- $parser =    DateTime::Format::Strptime->new( pattern => '%Y-%m-%d' );
-$newdate =$parser->parse_datetime($olddate);
-}
- if (!$newdate){
- $parser =    DateTime::Format::Strptime->new( pattern => '%y-%m-%d' );
-$newdate =$parser->parse_datetime($olddate);
-}
-  
-    return $newdate->ymd if $newdate;
-}
-sub DATE_diff {
-## returns 1 if date1>date2 0 if date1==date2 -1 if date1<date2
-my ($date1,$date2)=@_;
-my $dt1=DateTime::Format::ISO8601->parse_datetime($date1);
-my $dt2=DateTime::Format::ISO8601->parse_datetime($date2);
-my $diff=DateTime->compare( $dt1, $dt2 );
-return $diff;
-}
-sub DATE_Add {
-## $amount in days
-my ($date,$amount)=@_;
-my $dt1=DateTime::Format::ISO8601->parse_datetime($date);
-$dt1->add( days=>$amount );
-return $dt1->ymd;
-}
-sub DATE_Add_Duration {
-## Similar as above but uses Duration object as amount --used heavily in serials
-my ($date,$amount)=@_;
-my $dt1=DateTime::Format::ISO8601->parse_datetime($date);
-$dt1->add_duration($amount) ;
-return $dt1->ymd;
-}
-sub get_today{
-my $dt=DateTime->today;
-return $dt->ymd;
-}
-
-sub DATE_obj{
-# only send iso dates to this
-my $date=shift;
-   my $parser =    DateTime::Format::Strptime->new( pattern => '%Y-%m-%d' );
-      my  $newdate =$parser->parse_datetime($date);
-return $newdate;
-}
-sub get_duration{
-my $period=shift;
-
-my $parse;
-if ($period=~/ays/){
-$parse="\%e days";
-}elsif ($period=~/week/){
-$parse="\%W weeks";
-}elsif ($period=~/year/){
-$parse="\%Y years";
-}elsif ($period=~/onth/){
-$parse="\%m months";
-}
-
-my $parser=DateTime::Format::Duration->new(pattern => $parse  );
-	my $duration=$parser->parse_duration($period);
-
-return $duration;
-
-}
-sub DATE_subtract{
-my ($date1,$date2)=@_;
-my $dt1=DateTime::Format::ISO8601->parse_datetime($date1);
-my $dt2=DateTime::Format::ISO8601->parse_datetime($date2);
-my $dur=$dt2->subtract_datetime_absolute($dt1);## in seconds
-my $days=$dur->seconds/(60*60*24);
-return floor($days);
-}
-1;

Index: C4/Format.pm
===================================================================
RCS file: C4/Format.pm
diff -N C4/Format.pm
--- C4/Format.pm	13 Oct 2002 11:34:59 -0000	1.8
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,232 +0,0 @@
-package C4::Format;
-
-# $Id: Format.pm,v 1.8 2002/10/13 11:34:59 arensb Exp $
-
-# 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;
-require Exporter;
-
-
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Format - Functions for pretty-printing strings and numbers
-
-=head1 SYNOPSIS
-
-  use C4::Format;
-
-=head1 DESCRIPTION
-
-These functions return pretty-printed versions of strings and numbers.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(&fmtstr &fmtdec);
-
-=item fmtstr
-
-  $str = &fmtstr($env, $string, $format);
-
-Returns C<$string>, padded with space to a given length.
-
-C<$format> is either C<Ln> or C<Rn>, where I<n> is a positive integer.
-C<$str> will be either left-padded or right-padded, respectively.
-
-C<&fmtstr> is almost equivalent to
-
-  sprintf("%-n.ns", $string);
-
-or
-
-  sprintf("%n.ns", $string);
-
-The only difference is that if I<n> is less than the length of
-C<$string>, then C<&fmtstr> will return the last I<n> characters of
-C<$string>, whereas C<sprintf> will return the first I<n> characters.
-
-C<$env> is ignored.
-
-=cut
-#'
-sub fmtstr {
-  # format (space pad) a string
-  # $fmt is Ln.. or Rn.. where n is the length
-  my ($env,$strg,$fmt)=@_;
-  my $align = substr($fmt,0,1);
-  my $lenst = substr($fmt,1,length($fmt)-1);
-  if ($align eq"R" ) {
-     $strg = substr((" "x$lenst).$strg,0-$lenst,$lenst);
-  } elsif  ($align eq "C" ) {
-     $strg =
-       substr((" "x(($lenst/2)-(length($strg)/2))).$strg.(" "x$lenst),0,$lenst);
-  } else {
-     $strg = substr($strg.(" "x$lenst),0,$lenst);
-  }
-  return ($strg);
-}
-
-=item fmtdec
-
-  $str = &fmtdec($env, $number, $format)
-
-Returns a pretty-printed version of C<$number>.
-
-C<$format> specifies how to print the number. It is of the form
-
-  [$][,]n[m]
-
-where I<n> and I<m> are digits, specifying the number of digits to use
-before and after the decimal, respectively. Thus,
-
-  &fmtdec(undef, 123.456, "42")
-
-will return
-
-  " 123.45"
-
-If I<n> is smaller than the size of the integer part, only the last
-I<n> digits will be returned. If I<m> is greater than the number of
-digits after the decimal in C<$number>, the result will be
-right-padded with zeros.
-
-If C<$format> has a leading dollar sign, the number is assumed to be a
-monetary amount. C<$str> will have a dollar sign prepended to the
-value.
-
-If C<$format> has a comma after the optional dollar sign, the integer
-part will be split into three-digit groups separated by commas.
-
-C<$env> is effectively ignored.
-
-=cut
-#'
-# FIXME - This is all terribly provincial, not at all
-# internationalized. I'm pretty sure there's already something out
-# there that'll figure out the current locale, look up the local
-# currency symbol (and whether it goes on the left or right), figure
-# out how numbers are grouped (commas, periods, or what? And how many
-# digits per group?), and will print the whole thing prettily.
-# But I can't find it just now. Maybe POSIX::setlocale() or
-# perllocale(1) might help.
-# FIXME - Bug:
-#	fmtdec(undef, 12345.6, ',82') prints "     345.60"
-#	fmtdec(undef, 12345.6, '$,82') prints ".60"
-sub fmtdec {
-  # format a decimal
-  # $fmt is [$][,]n[m]
-  my ($env,$numb,$fmt)=@_;
-
-  # FIXME - Use $fmt =~ /^(\$)?(,)?(\d)(\d)?$/ instead of this mess of
-  # substr()s.
-
-  # See if there's a leading dollar sign.
-  my $curr = substr($fmt,0,1);
-  if ($curr eq "\$") {
-    $fmt = substr($fmt,1,length($fmt)-1);
-  };
-  # See if there's a leading comma
-  my $comma = substr($fmt,0,1);
-  if ($comma eq ",") {
-    $fmt = substr($fmt,1,length($fmt)-1);
-  };
-  # See whether one number was given, or two.
-  my $right;
-  my $left = substr($fmt,0,1);
-  if (length($fmt) == 1) {
-    $right = 0;
-  } else {
-    $right = substr($fmt,1,1);
-  }
-  # See if $numb is a floating-point number.
-  my $fnumb = "";
-  my $tempint = "";
-  my $tempdec = "";
-  # FIXME - Use
-  #	$numb =~ /(\d+)\.(\d+)/;
-  #	$tempint = $1 + 0;
-  #	$tempdec = $2;
-  if (index($numb,".") == 0 ){
-     $tempint = 0;
-     $tempdec = substr($numb,1,length($numb)-1);
-  } else {
-     if (index($numb,".") > 0) {
-       my $decpl = index($numb,".");
-       $tempint = substr($numb,0,$decpl);
-       $tempdec = substr($numb,$decpl+1,length($numb)-1-$decpl);
-     } else {
-       $tempint = $numb;
-       $tempdec = 0;
-     }
-     # If a comma was specified, then comma-separate the integer part
-     # FIXME - From the Perl Cookbook (ISBN 1-56592-243-3), sec. 2.1.7:
-     #	sub commify {
-     #		my $test = reverse $_[0];
-     #		$text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/g;
-     #		return scalar reverse $text;
-     #	}
-     if ($comma eq ",") {
-        while (length($tempdec) > 3) {
-           $fnumb = ",".substr($tempint,-3,3).$fnumb;
-	   substr($tempint,-3,3) = "";
-	}
-	$fnumb = substr($tempint,-3,3).$fnumb;
-     } else {
-        $fnumb = $tempint;
-     }
-  }
-  # If a dollar sign was specified, prepend a dollar sign and
-  # right-justify the number
-  if ($curr eq "\$") {
-     $fnumb = fmtstr($env,$curr.$fnumb,"R".$left+1);
-  } else {
-     if ($left==0) {
-        $fnumb = "";
-     } else {
-        $fnumb = fmtstr($env,$fnumb,"R".$left);
-     }
-  }
-  # Right-pad the decimal part to the given number of digits.
-  if ($right > 0) {
-     $tempdec .= "0"x$right;
-     $tempdec = substr($tempdec,0,$right);
-     $fnumb .= ".".$tempdec;
-  }
-  return $fnumb;	# FIXME - Shouldn't return a list.
-}
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: C4/Input.pm
===================================================================
RCS file: C4/Input.pm
diff -N C4/Input.pm
--- C4/Input.pm	25 Aug 2006 21:07:08 -0000	1.21
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,220 +0,0 @@
-package C4::Input; #assumes C4/Input
-
-
-# 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;
-require Exporter;
-use C4::Context;
-
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Input - Miscellaneous sanity checks
-
-=head1 SYNOPSIS
-
-  use C4::Input;
-
-=head1 DESCRIPTION
-
-This module provides functions to see whether a given library card
-number or ISBN is valid.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-	&checkdigit &checkvalidisbn
-	&buildCGIsort
-);
-
-# FIXME - This is never used.
-#sub checkflds {
-#  my ($env,$reqflds,$data) = @_;
-#  my $numrflds = @$reqflds;
-#  my @probarr;
-#  my $i = 0;
-#  while ($i < $numrflds) {
-#    if ($data->{@$reqflds[$i]} eq "") {
-#      push(@probarr, @$reqflds[$i]);
-#    }
-#    $i++
-#  }
-#  return (\@probarr);
-#}
-
-=item checkdigit
-
-  $valid = &checkdigit($env, $cardnumber $nounique);
-
-Takes a card number, computes its check digit, and compares it to the
-checkdigit at the end of C<$cardnumber>. Returns a true value iff
-C<$cardnumber> has a valid check digit.
-
-C<$env> is ignored.
-
-=cut
-#'
-sub checkdigit {
-
-	my ($env,$infl, $nounique) =  @_;
-	$infl = uc $infl;
-
-
-	#Check to make sure the cardnumber is unique
-
-	#FIXME: We should make the error for a nonunique cardnumber
-	#different from the one where the checkdigit on the number is
-	#not correct
-
-	unless ( $nounique )
-	{
-		my $dbh=C4::Context->dbh;
-		my $query=qq{SELECT * FROM borrowers WHERE cardnumber=?};
-		my $sth=$dbh->prepare($query);
-		$sth->execute($infl);
-		my %results = $sth->fetchrow_hashref();
-		if ( $sth->rows != 0 )
-		{
-			return 0;
-		}
-	}
-	if (C4::Context->preference("checkdigit") eq "none") {
-		return 1;
-	}
-
-	my @weightings = (8,4,6,3,5,2,1);
-	my $sum;
-	my $i = 1;
-	my $valid = 0;
-
-	foreach $i (1..7) {
-		my $temp1 = $weightings[$i-1];
-		my $temp2 = substr($infl,$i,1);
-		$sum += $temp1 * $temp2;
-	}
-	my $rem = ($sum%11);
-	if ($rem == 10) {
-	$rem = "X";
-	}
-	if ($rem eq substr($infl,8,1)) {
-		$valid = 1;
-	}
-	return $valid;
-} # sub checkdigit
-
-=item checkvalidisbn
-
-  $valid = &checkvalidisbn($isbn);
-
-Returns a true value iff C<$isbn> is a valid ISBN: it must be ten
-digits long (counting "X" as a digit), and must have a valid check
-digit at the end.
-
-=cut
-#'
-#--------------------------------------
-# Determine if a number is a valid ISBN number, according to length
-#   of 10 digits and valid checksum
-sub checkvalidisbn {
-	use strict;
-	my ($q)=@_ ;	# Input: ISBN number
-	
-	my $isbngood = 0; # Return: true or false
-	
-	$q=~s/x$/X/g;   # upshift lower case X
-	$q=~s/[^X\d]//g;
-	$q=~s/X.//g;
-	
-		#return 0 if $q is not ten digits long
-		if (length($q)!=10) {
-			return 0;
-		}
-		
-		#If we get to here, length($q) must be 10
-	my $checksum=substr($q,9,1);
-	my $isbn=substr($q,0,9);
-	my $i;
-	my $c=0;
-	for ($i=0; $i<9; $i++) {
-		my $digit=substr($q,$i,1);
-		$c+=$digit*(10-$i);
-	}
-	$c %= 11;
-	($c==10) && ($c='X');
-	$isbngood = $c eq $checksum;
-	return $isbngood;
-
-} # sub checkvalidisbn
-
-=item buildCGISort
-
-  $CGIScrollingList = &BuildCGISort($name string, $input_name string);
-
-Returns the scrolling list with name $input_name, built on authorised Values named $name.
-Returns NULL if no authorised values found
-
-=cut
-sub buildCGIsort {
-    use strict;
-	my ($name,$input_name,$data) = @_;
-	my $dbh=C4::Context->dbh;
-	my $query=qq{SELECT * FROM authorised_values WHERE category=? order by lib};
-	my $sth=$dbh->prepare($query);
-	$sth->execute($name);
-	my $CGISort;
-	if ($sth->rows>0){
-		my @values;
-		my %labels;
-		for (my $i =0;$i<=$sth->rows;$i++){
-			my $results = $sth->fetchrow_hashref;
- 			push @values, $results->{authorised_value};
- 			$labels{$results->{authorised_value}}=$results->{lib};
-		}
- 		$CGISort= CGI::scrolling_list(
- 					-name => $input_name,
- 					-values => \@values,
- 					-labels => \%labels,
-					-default=> $data,
- 					-size => 1,
- 					-multiple => 0);
-	}
-	$sth->finish; 
-	return $CGISort;
-}
-END { }       # module clean-up code here (global destructor)
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: C4/Koha.pm
===================================================================
RCS file: C4/Koha.pm
diff -N C4/Koha.pm
--- C4/Koha.pm	6 Nov 2006 21:01:43 -0000	1.47
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,955 +0,0 @@
-package C4::Koha;
-
-# 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
-
-# $Id: Koha.pm,v 1.47 2006/11/06 21:01:43 tgarip1957 Exp $
-
-use strict;
-require Exporter;
-use C4::Context;
-use C4::Biblio;
-use CGI;
-use vars qw($VERSION @ISA @EXPORT);
-
-$VERSION = do { my @v = '$Revision: 1.47 $' =~ /\d+/g; shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
-
-=head1 NAME
-
-C4::Koha - Perl Module containing convenience functions for Koha scripts
-
-=head1 SYNOPSIS
-
-  use C4::Koha;
-
-
-=head1 DESCRIPTION
-
-Koha.pm provides many functions for Koha scripts.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-            &subfield_is_koha_internal_p
-            &GetBranches &getbranch &getbranchdetail
-            &getprinters &getprinter
-            &GetItemTypes &getitemtypeinfo &ItemType
-                        get_itemtypeinfos_of
-            &getframeworks &getframeworkinfo
-            &getauthtypes &getauthtype
-            &getallthemes &getalllanguages
-            &GetallBranches &getletters
-            &getbranchname
-                        getnbpages
-                        getitemtypeimagedir
-                        getitemtypeimagesrc
-                        getitemtypeimagesrcfromurl
-            &getcities
-            &getroadtypes
-                        get_branchinfos_of
-                        get_notforloan_label_of
-                        get_infos_of
-                        &getFacets
-			
-            $DEBUG);
-
-use vars qw();
-
-my $DEBUG = 0;
-
-# FIXME.. this should be moved to a MARC-specific module
-sub subfield_is_koha_internal_p ($) {
-    my($subfield) = @_;
-
-    # We could match on 'lib' and 'tab' (and 'mandatory', & more to come!)
-    # But real MARC subfields are always single-character
-    # so it really is safer just to check the length
-
-    return length $subfield != 1;
-}
-
-=head2 GetBranches
-
-  $branches = &GetBranches();
-  returns informations about branches.
-  Create a branch selector with the following code
-  Is branchIndependant sensitive
-   When IndependantBranches is set AND user is not superlibrarian, displays only user's branch
-  
-=head3 in PERL SCRIPT
-
-my $branches = GetBranches;
-my @branchloop;
-foreach my $thisbranch (sort keys %$branches) {
-    my $selected = 1 if $thisbranch eq $branch;
-    my %row =(value => $thisbranch,
-                selected => $selected,
-                branchname => $branches->{$thisbranch}->{'branchname'},
-            );
-    push @branchloop, \%row;
-}
-
-
-=head3 in TEMPLATE  
-            <select name="branch">
-                <option value="">Default</option>
-            <!-- TMPL_LOOP name="branchloop" -->
-                <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="branchname" --></option>
-            <!-- /TMPL_LOOP -->
-            </select>
-
-=cut
-
-sub GetBranches {
-# returns a reference to a hash of references to branches...
-    my ($type) = @_;
-    my %branches;
-    my $branch;
-    my $dbh = C4::Context->dbh;
-    my $sth;
-    if (C4::Context->preference("IndependantBranches") && (C4::Context->userenv->{flags}!=1)){
-        my $strsth ="Select * from branches ";
-        $strsth.= " WHERE branchcode = ".$dbh->quote(C4::Context->userenv->{branch});
-        $strsth.= " order by branchname";
-        $sth=$dbh->prepare($strsth);
-    } else {
-        $sth = $dbh->prepare("Select * from branches order by branchname");
-    }
-    $sth->execute;
-    while ($branch=$sth->fetchrow_hashref) {
-        my $nsth = $dbh->prepare("select categorycode from branchrelations where branchcode = ?");
-            if ($type){
-            $nsth = $dbh->prepare("select categorycode from branchrelations where branchcode = ? and categorycode = ?");
-            $nsth->execute($branch->{'branchcode'},$type);
-      	  } else {
-	            $nsth = $dbh->prepare("select categorycode from branchrelations where branchcode = ? ");
- 
-            $nsth->execute($branch->{'branchcode'});
-      	  }
-        while (my ($cat) = $nsth->fetchrow_array) {
-            # FIXME - This seems wrong. It ought to be
-            # $branch->{categorycodes}{$cat} = 1;
-            # otherwise, there's a namespace collision if there's a
-            # category with the same name as a field in the 'branches'
-            # table (i.e., don't create a category called "issuing").
-            # In addition, the current structure doesn't really allow
-            # you to list the categories that a branch belongs to:
-            # you'd have to list keys %$branch, and remove those keys
-            # that aren't fields in the "branches" table.
-            $branch->{$cat} = 1;
-            }
-	$branches{$branch->{'branchcode'}}=$branch;
-}
-    return (\%branches);
-}
-
-sub getbranchname {
-    my ($branchcode)=@_;
-    my $dbh = C4::Context->dbh;
-    my $sth;
-       $sth = $dbh->prepare("Select branchname from branches where branchcode=?");
-    $sth->execute($branchcode);
-    my $branchname = $sth->fetchrow_array;
-    $sth->finish;
-    
-    return($branchname);
-}
-
-=head2 getallbranches
-
-  @branches = &GetallBranches();
-  returns informations about ALL branches.
-  Create a branch selector with the following code
-  IndependantBranches Insensitive...
-  
-
-=cut
-
-
-sub GetallBranches {
-# returns an array to ALL branches...
-    my @branches;
-    my $dbh = C4::Context->dbh;
-    my $sth;
-       $sth = $dbh->prepare("Select * from branches order by branchname");
-    $sth->execute;
-    while (my $branch=$sth->fetchrow_hashref) {
-        push @branches,$branch;
-    }
-    return (@branches);
-}
-
-=head2 getletters
-
-  $letters = &getletters($category);
-  returns informations about letters.
-  if needed, $category filters for letters given category
-  Create a letter selector with the following code
-  
-=head3 in PERL SCRIPT
-
-my $letters = getletters($cat);
-my @letterloop;
-foreach my $thisletter (keys %$letters) {
-    my $selected = 1 if $thisletter eq $letter;
-    my %row =(value => $thisletter,
-                selected => $selected,
-                lettername => $letters->{$thisletter},
-            );
-    push @letterloop, \%row;
-}
-
-
-=head3 in TEMPLATE  
-            <select name="letter">
-                <option value="">Default</option>
-            <!-- TMPL_LOOP name="letterloop" -->
-                <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="lettername" --></option>
-            <!-- /TMPL_LOOP -->
-            </select>
-
-=cut
-
-sub getletters {
-# returns a reference to a hash of references to ALL letters...
-    my $cat =@_;
-    my %letters;
-    my $dbh = C4::Context->dbh;
-    my $sth;
-       if ($cat ne ""){
-        $sth = $dbh->prepare("Select * from letter where module = \'".$cat."\' order by name");
-    } else {
-        $sth = $dbh->prepare("Select * from letter order by name");
-    }
-    $sth->execute;
-    my $count;
-    while (my $letter=$sth->fetchrow_hashref) {
-            $letters{$letter->{'code'}}=$letter->{'name'};
-            $count++;
-    }
-    return ($count,\%letters);
-}
-
-=head2 GetItemTypes
-
-  $itemtypes = &GetItemTypes();
-
-Returns information about existing itemtypes.
-
-build a HTML select with the following code :
-
-=head3 in PERL SCRIPT
-
-my $itemtypes = GetItemTypes;
-my @itemtypesloop;
-foreach my $thisitemtype (sort keys %$itemtypes) {
-    my $selected = 1 if $thisitemtype eq $itemtype;
-    my %row =(value => $thisitemtype,
-                selected => $selected,
-                description => $itemtypes->{$thisitemtype}->{'description'},
-            );
-    push @itemtypesloop, \%row;
-}
-$template->param(itemtypeloop => \@itemtypesloop);
-
-=head3 in TEMPLATE
-
-<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
-    <select name="itemtype">
-        <option value="">Default</option>
-    <!-- TMPL_LOOP name="itemtypeloop" -->
-        <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="description" --></option>
-    <!-- /TMPL_LOOP -->
-    </select>
-    <input type=text name=searchfield value="<!-- TMPL_VAR name="searchfield" -->">
-    <input type="submit" value="OK" class="button">
-</form>
-
-
-=cut
-
-sub GetItemTypes {
-# returns a reference to a hash of references to branches...
-    my %itemtypes;
-    my $dbh = C4::Context->dbh;
-    my $query = qq|
-        SELECT *
-        FROM   itemtypes
-    |;
-    my $sth=$dbh->prepare($query);
-    $sth->execute;
-    while (my $IT=$sth->fetchrow_hashref) {
-            $itemtypes{$IT->{'itemtype'}}=$IT;
-    }
-    return (\%itemtypes);
-}
-
-# FIXME this function is better and should replace GetItemTypes everywhere
-sub get_itemtypeinfos_of {
-    my @itemtypes = @_;
-
-    my $query = '
-SELECT itemtype,
-       description,
-       notforloan
-  FROM itemtypes
-  WHERE itemtype IN ('.join(',', map({"'".$_."'"} @itemtypes)).')
-';
-
-    return get_infos_of($query, 'itemtype');
-}
-
-sub ItemType {
-  my ($type)=@_;
-  my $dbh = C4::Context->dbh;
-  my $sth=$dbh->prepare("select description from itemtypes where itemtype=?");
-  $sth->execute($type);
-  my $dat=$sth->fetchrow_hashref;
-  $sth->finish;
-  return ($dat->{'description'});
-}
-=head2 getauthtypes
-
-  $authtypes = &getauthtypes();
-
-Returns information about existing authtypes.
-
-build a HTML select with the following code :
-
-=head3 in PERL SCRIPT
-
-my $authtypes = getauthtypes;
-my @authtypesloop;
-foreach my $thisauthtype (keys %$authtypes) {
-    my $selected = 1 if $thisauthtype eq $authtype;
-    my %row =(value => $thisauthtype,
-                selected => $selected,
-                authtypetext => $authtypes->{$thisauthtype}->{'authtypetext'},
-            );
-    push @authtypesloop, \%row;
-}
-$template->param(itemtypeloop => \@itemtypesloop);
-
-=head3 in TEMPLATE
-
-<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
-    <select name="authtype">
-    <!-- TMPL_LOOP name="authtypeloop" -->
-        <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="authtypetext" --></option>
-    <!-- /TMPL_LOOP -->
-    </select>
-    <input type=text name=searchfield value="<!-- TMPL_VAR name="searchfield" -->">
-    <input type="submit" value="OK" class="button">
-</form>
-
-
-=cut
-
-sub getauthtypes {
-# returns a reference to a hash of references to authtypes...
-    my %authtypes;
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("select * from auth_types order by authtypetext");
-    $sth->execute;
-    while (my $IT=$sth->fetchrow_hashref) {
-            $authtypes{$IT->{'authtypecode'}}=$IT;
-    }
-    return (\%authtypes);
-}
-
-sub getauthtype {
-    my ($authtypecode) = @_;
-# returns a reference to a hash of references to authtypes...
-    my %authtypes;
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("select * from auth_types where authtypecode=?");
-    $sth->execute($authtypecode);
-    my $res=$sth->fetchrow_hashref;
-    return $res;
-}
-
-=head2 getframework
-
-  $frameworks = &getframework();
-
-Returns information about existing frameworks
-
-build a HTML select with the following code :
-
-=head3 in PERL SCRIPT
-
-my $frameworks = frameworks();
-my @frameworkloop;
-foreach my $thisframework (keys %$frameworks) {
-    my $selected = 1 if $thisframework eq $frameworkcode;
-    my %row =(value => $thisframework,
-                selected => $selected,
-                description => $frameworks->{$thisframework}->{'frameworktext'},
-            );
-    push @frameworksloop, \%row;
-}
-$template->param(frameworkloop => \@frameworksloop);
-
-=head3 in TEMPLATE
-
-<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
-    <select name="frameworkcode">
-        <option value="">Default</option>
-    <!-- TMPL_LOOP name="frameworkloop" -->
-        <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="frameworktext" --></option>
-    <!-- /TMPL_LOOP -->
-    </select>
-    <input type=text name=searchfield value="<!-- TMPL_VAR name="searchfield" -->">
-    <input type="submit" value="OK" class="button">
-</form>
-
-
-=cut
-
-sub getframeworks {
-# returns a reference to a hash of references to branches...
-    my %itemtypes;
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("select * from biblios_framework");
-    $sth->execute;
-    while (my $IT=$sth->fetchrow_hashref) {
-            $itemtypes{$IT->{'frameworkcode'}}=$IT;
-    }
-    return (\%itemtypes);
-}
-=head2 getframeworkinfo
-
-  $frameworkinfo = &getframeworkinfo($frameworkcode);
-
-Returns information about an frameworkcode.
-
-=cut
-
-sub getframeworkinfo {
-    my ($frameworkcode) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("select * from biblios_framework where frameworkcode=?");
-    $sth->execute($frameworkcode);
-    my $res = $sth->fetchrow_hashref;
-    return $res;
-}
-
-
-=head2 getitemtypeinfo
-
-  $itemtype = &getitemtype($itemtype);
-
-Returns information about an itemtype.
-
-=cut
-
-sub getitemtypeinfo {
-    my ($itemtype) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("select * from itemtypes where itemtype=?");
-    $sth->execute($itemtype);
-    my $res = $sth->fetchrow_hashref;
-
-        $res->{imageurl} = getitemtypeimagesrcfromurl($res->{imageurl});
-
-    return $res;
-}
-
-sub getitemtypeimagesrcfromurl {
-    my ($imageurl) = @_;
-
-    if (defined $imageurl and $imageurl !~ m/^http/) {
-        $imageurl =
-            getitemtypeimagesrc()
-            .'/'.$imageurl
-            ;
-    }
-
-    return $imageurl;
-}
-
-sub getitemtypeimagedir {
-    return
-        C4::Context->intrahtdocs
-        .'/'.C4::Context->preference('template')
-        .'/itemtypeimg'
-        ;
-}
-
-sub getitemtypeimagesrc {
-    return
-        '/intranet-tmpl'
-        .'/'.C4::Context->preference('template')
-        .'/itemtypeimg'
-        ;
-}
-
-=head2 getprinters
-
-  $printers = &getprinters($env);
-  @queues = keys %$printers;
-
-Returns information about existing printer queues.
-
-C<$env> is ignored.
-
-C<$printers> is a reference-to-hash whose keys are the print queues
-defined in the printers table of the Koha database. The values are
-references-to-hash, whose keys are the fields in the printers table.
-
-=cut
-
-sub getprinters {
-    my ($env) = @_;
-    my %printers;
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("select * from printers");
-    $sth->execute;
-    while (my $printer=$sth->fetchrow_hashref) {
-    $printers{$printer->{'printqueue'}}=$printer;
-    }
-    return (\%printers);
-}
-
-sub getbranch ($$) {
-    my($query, $branches) = @_; # get branch for this query from branches
-    my $branch = $query->param('branch');
-    ($branch) || ($branch = $query->cookie('branch'));
-    ($branches->{$branch}) || ($branch=(keys %$branches)[0]);
-    return $branch;
-}
-
-=item getbranchdetail
-
-  $branchname = &getbranchdetail($branchcode);
-
-Given the branch code, the function returns the corresponding
-branch name for a comprehensive information display
-
-=cut
-
-sub getbranchdetail
-{
-    my ($branchcode) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare("SELECT * FROM branches WHERE branchcode = ?");
-    $sth->execute($branchcode);
-    my $branchname = $sth->fetchrow_hashref();
-    $sth->finish();
-    return $branchname;
-} # sub getbranchname
-
-
-sub getprinter ($$) {
-    my($query, $printers) = @_; # get printer for this query from printers
-    my $printer = $query->param('printer');
-    ($printer) || ($printer = $query->cookie('printer')) || ($printer='');
-    ($printers->{$printer}) || ($printer = (keys %$printers)[0]);
-    return $printer;
-}
-
-=item getalllanguages
-
-  (@languages) = &getalllanguages($type);
-  (@languages) = &getalllanguages($type,$theme);
-
-Returns an array of all available languages.
-
-=cut
-
-sub getalllanguages {
-    my $type=shift;
-    my $theme=shift;
-    my $htdocs;
-    my @languages;
-    if ($type eq 'opac') {
-        $htdocs=C4::Context->config('opachtdocs');
-        if ($theme and -d "$htdocs/$theme") {
-            opendir D, "$htdocs/$theme";
-            foreach my $language (readdir D) {
-                next if $language=~/^\./;
-                next if $language eq 'all';
-                next if $language=~ /png$/;
-                next if $language=~ /css$/;
-                next if $language=~ /CVS$/;
-                next if $language=~ /itemtypeimg$/;
-		next if $language=~ /\.txt$/i; #Don't read the readme.txt !
-                push @languages, $language;
-            }
-            return sort @languages;
-        } else {
-            my $lang;
-            foreach my $theme (getallthemes('opac')) {
-                opendir D, "$htdocs/$theme";
-                foreach my $language (readdir D) {
-                    next if $language=~/^\./;
-                    next if $language eq 'all';
-                    next if $language=~ /png$/;
-                    next if $language=~ /css$/;
-                    next if $language=~ /CVS$/;
-                    next if $language=~ /itemtypeimg$/;
-		    next if $language=~ /\.txt$/i; #Don't read the readme.txt !
-                    $lang->{$language}=1;
-                }
-            }
-            @languages=keys %$lang;
-            return sort @languages;
-        }
-    } elsif ($type eq 'intranet') {
-        $htdocs=C4::Context->config('intrahtdocs');
-        if ($theme and -d "$htdocs/$theme") {
-            opendir D, "$htdocs/$theme";
-            foreach my $language (readdir D) {
-                next if $language=~/^\./;
-                next if $language eq 'all';
-                next if $language=~ /png$/;
-                next if $language=~ /css$/;
-                next if $language=~ /CVS$/;
-                next if $language=~ /itemtypeimg$/;
-                next if $language=~ /\.txt$/i; #Don't read the readme.txt !
-                push @languages, $language;
-            }
-            return sort @languages;
-        } else {
-            my $lang;
-            foreach my $theme (getallthemes('opac')) {
-                opendir D, "$htdocs/$theme";
-                foreach my $language (readdir D) {
-                    next if $language=~/^\./;
-                    next if $language eq 'all';
-                    next if $language=~ /png$/;
-                    next if $language=~ /css$/;
-                    next if $language=~ /CVS$/;
-                    next if $language=~ /itemtypeimg$/;
-		    next if $language=~ /\.txt$/i; #Don't read the readme.txt !
-                    $lang->{$language}=1;
-                }
-            }
-            @languages=keys %$lang;
-            return sort @languages;
-        }
-    } else {
-        my $lang;
-        my $htdocs=C4::Context->config('intrahtdocs');
-        foreach my $theme (getallthemes('intranet')) {
-            opendir D, "$htdocs/$theme";
-            foreach my $language (readdir D) {
-                next if $language=~/^\./;
-                next if $language eq 'all';
-                next if $language=~ /png$/;
-                next if $language=~ /css$/;
-                next if $language=~ /CVS$/;
-                next if $language=~ /itemtypeimg$/;
-		next if $language=~ /\.txt$/i; #Don't read the readme.txt !
-                $lang->{$language}=1;
-            }
-        }
-        $htdocs=C4::Context->config('opachtdocs');
-        foreach my $theme (getallthemes('opac')) {
-        opendir D, "$htdocs/$theme";
-        foreach my $language (readdir D) {
-            next if $language=~/^\./;
-            next if $language eq 'all';
-            next if $language=~ /png$/;
-            next if $language=~ /css$/;
-            next if $language=~ /CVS$/;
-            next if $language=~ /itemtypeimg$/;
-	    next if $language=~ /\.txt$/i; #Don't read the readme.txt !
-            $lang->{$language}=1;
-            }
-        }
-        @languages=keys %$lang;
-        return sort @languages;
-    }
-}
-
-=item getallthemes
-
-  (@themes) = &getallthemes('opac');
-  (@themes) = &getallthemes('intranet');
-
-Returns an array of all available themes.
-
-=cut
-
-sub getallthemes {
-    my $type=shift;
-    my $htdocs;
-    my @themes;
-    if ($type eq 'intranet') {
-    $htdocs=C4::Context->config('intrahtdocs');
-    } else {
-    $htdocs=C4::Context->config('opachtdocs');
-    }
-    opendir D, "$htdocs";
-    my @dirlist=readdir D;
-    foreach my $directory (@dirlist) {
-    -d "$htdocs/$directory/en" and push @themes, $directory;
-    }
-    return @themes;
-}
-
-=item getnbpages
-
-Returns the number of pages to display in a pagination bar, given the number
-of items and the number of items per page.
-
-=cut
-
-sub getnbpages {
-    my ($nb_items, $nb_items_per_page) = @_;
-
-    return int(($nb_items - 1) / $nb_items_per_page) + 1;
-}
-
-
-=head2 getcities (OUEST-PROVENCE)
-
-  ($id_cityarrayref, $city_hashref) = &getcities();
-
-Looks up the different city and zip in the database. Returns two
-elements: a reference-to-array, which lists the zip city
-codes, and a reference-to-hash, which maps the name of the city.
-WHERE =>OUEST PROVENCE OR EXTERIEUR
-
-=cut
-sub getcities {
-    #my ($type_city) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("Select cityid,city_name from cities order by cityid  ");
-    #$sth->execute($type_city);
-    $sth->execute();    
-    my %city;
-    my @id;
-#    insert empty value to create a empty choice in cgi popup 
-    
-while (my $data=$sth->fetchrow_hashref){
-      
-    push @id,$data->{'cityid'};
-      $city{$data->{'cityid'}}=$data->{'city_name'};
-    }
-    
-    #test to know if the table contain some records if no the function return nothing
-    my $id=@id;
-    $sth->finish;
-    if ($id eq 0)
-    {
-    return();
-    }
-    else{
-    unshift (@id ,"");
-    return(\@id,\%city);
-    }
-}
-
-
-=head2 getroadtypes (OUEST-PROVENCE)
-
-  ($idroadtypearrayref, $roadttype_hashref) = &getroadtypes();
-
-Looks up the different road type . Returns two
-elements: a reference-to-array, which lists the id_roadtype
-codes, and a reference-to-hash, which maps the road type of the road .
-
-
-=cut
-sub getroadtypes {
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("Select roadtypeid,road_type from roadtype order by road_type  ");
-    $sth->execute();
-    my %roadtype;
-    my @id;
-#    insert empty value to create a empty choice in cgi popup 
-while (my $data=$sth->fetchrow_hashref){
-    push @id,$data->{'roadtypeid'};
-      $roadtype{$data->{'roadtypeid'}}=$data->{'road_type'};
-    }
-    #test to know if the table contain some records if no the function return nothing
-    my $id=@id;
-    $sth->finish;
-    if ($id eq 0)
-    {
-    return();
-    }
-    else{
-        unshift (@id ,"");
-        return(\@id,\%roadtype);
-    }
-}
-
-=head2 get_branchinfos_of
-
-  my $branchinfos_of = get_branchinfos_of(@branchcodes);
-
-Associates a list of branchcodes to the information of the branch, taken in
-branches table.
-
-Returns a href where keys are branchcodes and values are href where keys are
-branch information key.
-
-  print 'branchname is ', $branchinfos_of->{$code}->{branchname};
-
-=cut
-sub get_branchinfos_of {
-    my @branchcodes = @_;
-
-    my $query = '
-SELECT branchcode,
-       branchname
-  FROM branches
-  WHERE branchcode IN ('.join(',', map({"'".$_."'"} @branchcodes)).')
-';
-    return get_infos_of($query, 'branchcode');
-}
-
-=head2 get_notforloan_label_of
-
-  my $notforloan_label_of = get_notforloan_label_of();
-
-Each authorised value of notforloan (information available in items and
-itemtypes) is link to a single label.
-
-Returns a href where keys are authorised values and values are corresponding
-labels.
-
-  foreach my $authorised_value (keys %{$notforloan_label_of}) {
-    printf(
-        "authorised_value: %s => %s\n",
-        $authorised_value,
-        $notforloan_label_of->{$authorised_value}
-    );
-  }
-
-=cut
-sub get_notforloan_label_of {
-    my $dbh = C4::Context->dbh;
-my($tagfield,$tagsubfield)=MARCfind_marc_from_kohafield("notforloan","holdings");
-    my $query = '
-SELECT authorised_value
-  FROM holdings_subfield_structure
-  WHERE tagfield =$tagfield and tagsubfield=$tagsubfield
-  LIMIT 0, 1
-';
-    my $sth = $dbh->prepare($query);
-    $sth->execute();
-    my ($statuscode) = $sth->fetchrow_array();
-
-    $query = '
-SELECT lib,
-       authorised_value
-  FROM authorised_values
-  WHERE category = ?
-';
-    $sth = $dbh->prepare($query);
-    $sth->execute($statuscode);
-    my %notforloan_label_of;
-    while (my $row = $sth->fetchrow_hashref) {
-        $notforloan_label_of{ $row->{authorised_value} } = $row->{lib};
-    }
-    $sth->finish;
-
-    return \%notforloan_label_of;
-}
-
-=head2 get_infos_of
-
-Return a href where a key is associated to a href. You give a query, the
-name of the key among the fields returned by the query. If you also give as
-third argument the name of the value, the function returns a href of scalar.
-
-  my $query = '
-SELECT itemnumber,
-       notforloan,
-       barcode
-  FROM items
-';
-
-  # generic href of any information on the item, href of href.
-  my $iteminfos_of = get_infos_of($query, 'itemnumber');
-  print $iteminfos_of->{$itemnumber}{barcode};
-
-  # specific information, href of scalar
-  my $barcode_of_item = get_infos_of($query, 'itemnumber', 'barcode');
-  print $barcode_of_item->{$itemnumber};
-
-=cut
-sub get_infos_of {
-    my ($query, $key_name, $value_name) = @_;
-
-    my $dbh = C4::Context->dbh;
-
-    my $sth = $dbh->prepare($query);
-    $sth->execute();
-
-    my %infos_of;
-    while (my $row = $sth->fetchrow_hashref) {
-        if (defined $value_name) {
-            $infos_of{ $row->{$key_name} } = $row->{$value_name};
-        }
-        else {
-            $infos_of{ $row->{$key_name} } = $row;
-        }
-    }
-    $sth->finish;
-
-    return \%infos_of;
-}
-sub getFacets {
-###Subfields is an array as well although MARC21 has them all in "a" in case UNIMARC has differing subfields
-my $dbh=C4::Context->dbh;
-my $query=new CGI;
-my $lang=$query->cookie('KohaOpacLanguage');
-$lang="en" unless $lang;
-my @facets;
-my $sth=$dbh->prepare("SELECT  facets_label_$lang,kohafield FROM facets  where (facets_label_$lang<>'' ) group by facets_label_$lang");
-my $sth2=$dbh->prepare("SELECT * FROM facets where facets_label_$lang=?");
-$sth->execute();
-while (my ($label,$kohafield)=$sth->fetchrow){
- $sth2->execute($label);
-my (@tags, at subfield);
-	while (my $data=$sth2->fetchrow_hashref){
-	push @tags,$data->{tagfield} ;
-	push @subfield,$data->{subfield} ;
-	}
-   	 my $facet =  {
-      	 link_value =>"kohafield=$kohafield",
-        	label_value =>$label,
-        	tags => \@tags,
-        	subfield =>\@subfield,
-        	} ;
-	 push @facets,$facet;
-}
-  return \@facets;
-}
-
-
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Team
-
-=cut

Index: C4/Labels.pm
===================================================================
RCS file: C4/Labels.pm
diff -N C4/Labels.pm
--- C4/Labels.pm	10 Jul 2006 23:36:02 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,458 +0,0 @@
-package C4::Labels;
-
-# Copyright 2006 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;
-require Exporter;
-
-use vars qw($VERSION @ISA @EXPORT);
-#use Data::Dumper;
-use PDF::Reuse;
-
-
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Labels - Functions for printing spine labels and barcodes in Koha
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-  	&get_label_options &get_label_items
-  	&build_circ_barcode &draw_boundaries
-	&draw_box
-);
-
-=item get_label_options;
-
-	$options = get_label_options()
-
-
-Return a pointer on a hash list containing info from labels_conf table in Koha DB.
-
-=cut
-#'
-sub get_label_options {
-    my $dbh    = C4::Context->dbh;
-    my $query2 = " SELECT * FROM labels_conf LIMIT 1 ";
-    my $sth    = $dbh->prepare($query2);
-    $sth->execute();
-    my $conf_data = $sth->fetchrow_hashref;
-    $sth->finish;
-    return $conf_data;
-}
-
-=item get_label_items;
-
-        $options = get_label_items()
-
-
-Returns an array of references-to-hash, whos keys are the field from the biblio, biblioitems, items and labels tables in the Koha database.
-
-=cut
-#'
-sub get_label_items {
-    my $dbh = C4::Context->dbh;
-
-    # get the actual items to be printed.
-    my @data;
-    my $query3 = " Select * from labels ";
-    my $sth    = $dbh->prepare($query3);
-    $sth->execute();
-    my @resultsloop;
-    my $cnt = $sth->rows;
-    my $i1  = 1;
-    while ( my $data = $sth->fetchrow_hashref ) {
-
-        # lets get some summary info from each item
-        my $query1 =
-          " select * from biblio, biblioitems, items where itemnumber = ? and
-                                items.biblioitemnumber=biblioitems.biblioitemnumber and
-                                biblioitems.biblionumber=biblio.biblionumber";
-
-        my $sth1 = $dbh->prepare($query1);
-        $sth1->execute( $data->{'itemnumber'} );
-        my $data1 = $sth1->fetchrow_hashref();
-
-        push( @resultsloop, $data1 );
-        $sth1->finish;
-
-        $i1++;
-    }
-    $sth->finish;
-    return @resultsloop;
-}
-
-=item build_circ_barcode;
-
-  build_circ_barcode( $x_pos, $y_pos, $barcode,
-	        $barcodetype, \$item);
-
-$item is the result of a previous call to get_label_items();
-
-=cut
-#'
-sub build_circ_barcode {
-    my ( $x_pos_circ, $y_pos, $value, $barcodetype, $item ) = @_;
-
-#warn Dumper \$item;
-
-    #warn "value = $value\n";
-
-    #$DB::single = 1;
-
-    if ( $barcodetype eq 'EAN13' ) {
-
-        #testing EAN13 barcodes hack
-        $value = $value . '000000000';
-        $value =~ s/-//;
-        $value = substr( $value, 0, 12 );
-
-        #warn $value;
-        eval {
-            PDF::Reuse::Barcode::EAN13(
-                x     => ( $x_pos_circ + 27 ),
-                y     => ( $y_pos + 15 ),
-                value => $value,
-
-                #            prolong => 2.96,
-                #            xSize   => 1.5,
-
-                # ySize   => 1.2,
-
-# added for xpdf compat. doesnt use type3 fonts., but increases filesize from 20k to 200k
-# i think its embedding extra fonts in the pdf file.
-#  mode => 'graphic',
-            );
-        };
-        if ($@) {
-            $item->{'barcodeerror'} = 1;
-            #warn "EAN13BARCODE FAILED:$@";
-        }
-
-        #warn $barcodetype;
-
-    }
-    elsif ( $barcodetype eq 'Code39' ) {
-
-        eval {
-            PDF::Reuse::Barcode::Code39(
-                x     => ( $x_pos_circ + 9 ),
-                y     => ( $y_pos + 15 ),
-                value => $value,
-
-                #           prolong => 2.96,
-                xSize => .85,
-
-                ySize => 1.3,
-            );
-        };
-        if ($@) {
-            $item->{'barcodeerror'} = 1;
-            #warn "CODE39BARCODE $value FAILED:$@";
-        }
-
-        #warn $barcodetype;
-
-    }
-
-    elsif ( $barcodetype eq 'Matrix2of5' ) {
-
-        #warn "MATRIX ELSE:";
-
-        #testing MATRIX25  barcodes hack
-        #    $value = $value.'000000000';
-        $value =~ s/-//;
-
-        #    $value = substr( $value, 0, 12 );
-        #warn $value;
-
-        eval {
-            PDF::Reuse::Barcode::Matrix2of5(
-                x     => ( $x_pos_circ + 27 ),
-                y     => ( $y_pos + 15 ),
-                value => $value,
-
-                #        prolong => 2.96,
-                #       xSize   => 1.5,
-
-                # ySize   => 1.2,
-            );
-        };
-        if ($@) {
-            $item->{'barcodeerror'} = 1;
-            #warn "BARCODE FAILED:$@";
-        }
-
-        #warn $barcodetype;
-
-    }
-
-    elsif ( $barcodetype eq 'EAN8' ) {
-
-        #testing ean8 barcodes hack
-        $value = $value . '000000000';
-        $value =~ s/-//;
-        $value = substr( $value, 0, 8 );
-
-        #warn $value;
-
-        #warn "EAN8 ELSEIF";
-        eval {
-            PDF::Reuse::Barcode::EAN8(
-                x       => ( $x_pos_circ + 42 ),
-                y       => ( $y_pos + 15 ),
-                value   => $value,
-                prolong => 2.96,
-                xSize   => 1.5,
-
-                # ySize   => 1.2,
-            );
-        };
-
-        if ($@) {
-            $item->{'barcodeerror'} = 1;
-            #warn "BARCODE FAILED:$@";
-        }
-
-        #warn $barcodetype;
-
-    }
-
-    elsif ( $barcodetype eq 'UPC-E' ) {
-        eval {
-            PDF::Reuse::Barcode::UPCE(
-                x       => ( $x_pos_circ + 27 ),
-                y       => ( $y_pos + 15 ),
-                value   => $value,
-                prolong => 2.96,
-                xSize   => 1.5,
-
-                # ySize   => 1.2,
-            );
-        };
-
-        if ($@) {
-            $item->{'barcodeerror'} = 1;
-            #warn "BARCODE FAILED:$@";
-        }
-
-        #warn $barcodetype;
-
-    }
-    elsif ( $barcodetype eq 'NW7' ) {
-        eval {
-            PDF::Reuse::Barcode::NW7(
-                x       => ( $x_pos_circ + 27 ),
-                y       => ( $y_pos + 15 ),
-                value   => $value,
-                prolong => 2.96,
-                xSize   => 1.5,
-
-                # ySize   => 1.2,
-            );
-        };
-
-        if ($@) {
-            $item->{'barcodeerror'} = 1;
-            #warn "BARCODE FAILED:$@";
-        }
-
-        #warn $barcodetype;
-
-    }
-    elsif ( $barcodetype eq 'ITF' ) {
-        eval {
-            PDF::Reuse::Barcode::ITF(
-                x       => ( $x_pos_circ + 27 ),
-                y       => ( $y_pos + 15 ),
-                value   => $value,
-                prolong => 2.96,
-                xSize   => 1.5,
-
-                # ySize   => 1.2,
-            );
-        };
-
-        if ($@) {
-            $item->{'barcodeerror'} = 1;
-            #warn "BARCODE FAILED:$@";
-        }
-
-        #warn $barcodetype;
-
-    }
-    elsif ( $barcodetype eq 'Industrial2of5' ) {
-        eval {
-            PDF::Reuse::Barcode::Industrial2of5(
-                x       => ( $x_pos_circ + 27 ),
-                y       => ( $y_pos + 15 ),
-                value   => $value,
-                prolong => 2.96,
-                xSize   => 1.5,
-
-                # ySize   => 1.2,
-            );
-        };
-        if ($@) {
-            $item->{'barcodeerror'} = 1;
-            #warn "BARCODE FAILED:$@";
-        }
-
-        #warn $barcodetype;
-
-    }
-    elsif ( $barcodetype eq 'IATA2of5' ) {
-        eval {
-            PDF::Reuse::Barcode::IATA2of5(
-                x       => ( $x_pos_circ + 27 ),
-                y       => ( $y_pos + 15 ),
-                value   => $value,
-                prolong => 2.96,
-                xSize   => 1.5,
-
-                # ySize   => 1.2,
-            );
-        };
-        if ($@) {
-            $item->{'barcodeerror'} = 1;
-            #warn "BARCODE FAILED:$@";
-        }
-
-        #warn $barcodetype;
-
-    }
-
-    elsif ( $barcodetype eq 'COOP2of5' ) {
-        eval {
-            PDF::Reuse::Barcode::COOP2of5(
-                x       => ( $x_pos_circ + 27 ),
-                y       => ( $y_pos + 15 ),
-                value   => $value,
-                prolong => 2.96,
-                xSize   => 1.5,
-
-                # ySize   => 1.2,
-            );
-        };
-        if ($@) {
-            $item->{'barcodeerror'} = 1;
-            #warn "BARCODE FAILED:$@";
-        }
-
-        #warn $barcodetype;
-
-    }
-    elsif ( $barcodetype eq 'UPC-A' ) {
-
-        eval {
-            PDF::Reuse::Barcode::UPCA(
-                x       => ( $x_pos_circ + 27 ),
-                y       => ( $y_pos + 15 ),
-                value   => $value,
-                prolong => 2.96,
-                xSize   => 1.5,
-
-                # ySize   => 1.2,
-            );
-        };
-        if ($@) {
-            $item->{'barcodeerror'} = 1;
-            #warn "BARCODE FAILED:$@";
-        }
-
-        #warn $barcodetype;
-
-    }
-
-}
-
-=item draw_boundaries
-
- sub draw_boundaries ($x_pos_spine, $x_pos_circ1, $x_pos_circ2,
-                $y_pos, $spine_width, $label_height, $circ_width)  
-
-This sub draws boundary lines where the label outlines are, to aid in printer testing, and debugging.
-
-=cut
-
-#'
-sub draw_boundaries {
-
-	my ($x_pos_spine, $x_pos_circ1, $x_pos_circ2, 
-		$y_pos, $spine_width, $label_height, $circ_width) = @_;
-
-    my $y_pos_initial = ( ( 792 - 36 ) - 90 );
-    my $y_pos         = $y_pos_initial;
-    my $i             = 1;
-
-    for ( $i = 1 ; $i <= 8 ; $i++ ) {
-
-        &drawbox( $x_pos_spine, $y_pos, ($spine_width), ($label_height) );
-
-   #warn "OLD BOXES  x=$x_pos_spine, y=$y_pos, w=$spine_width, h=$label_height";
-        &drawbox( $x_pos_circ1, $y_pos, ($circ_width), ($label_height) );
-        &drawbox( $x_pos_circ2, $y_pos, ($circ_width), ($label_height) );
-
-        $y_pos = ( $y_pos - $label_height );
-
-    }
-}
-
-=item drawbox
-
-	sub drawbox { 	$lower_left_x, $lower_left_y, 
-			$upper_right_x, $upper_right_y )
-
-this is a low level sub, that draws a pdf box, it is called by draw_boxes
-
-=cut
-
-#'
-sub drawbox {
-    my ( $llx, $lly, $urx, $ury ) = @_;
-
-    my $str = "q\n";    # save the graphic state
-    $str .= "1.0 0.0 0.0  RG\n";           # border color red
-    $str .= "1 1 1  rg\n";                 # fill color blue
-    $str .= "$llx $lly $urx $ury re\n";    # a rectangle
-    $str .= "B\n";                         # fill (and a little more)
-    $str .= "Q\n";                         # save the graphic state
-
-    prAdd($str);
-
-}
-
-END { }    # module clean-up code here (global destructor)
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Mason James <mason at katipo.co.nz>
-=cut
-

Index: C4/Letters.pm
===================================================================
RCS file: C4/Letters.pm
diff -N C4/Letters.pm
--- C4/Letters.pm	25 Aug 2006 21:07:08 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,274 +0,0 @@
-package C4::Letters;
-
-
-# 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 Mail::Sendmail;
-use C4::Date;
-use C4::Suggestions;
-use C4::Members;
-require Exporter;
-
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Letters - Give functions for Letters management
-
-=head1 SYNOPSIS
-
-  use C4::Letters;
-
-=head1 DESCRIPTION
-
-  "Letters" is the tool used in Koha to manage informations sent to the patrons and/or the library. This include some cron jobs like
-  late issues, as well as other tasks like sending a mail to users that have subscribed to a "serial issue alert" (= being warned every time a new issue has arrived at the library)
-  
-  Letters are managed through "alerts" sent by Koha on some events. All "alert" related functions are in this module too.
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(&GetLetterList &getletter &addalert &getalert &delalert &findrelatedto &sendalerts);
-
-=head2 GetLetterList
-
-	parameter : $module : the name of the module
-	This sub returns an array of hashes with all letters from a given module
-	Each hash entry contains :
-	- module : the module name
-	- code : the code of the letter, char(20)
-	- name : the complete name of the letter, char(200)
-	- title : the title that will be used as "subject" in mails, char(200)
-	- content : the content of the letter. Each field to be replaced by a value at runtime is enclosed in << and >>. The fields usually have the same name as in the DB 
-
-=cut
-
-sub GetLetterList {
-	my ($module) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("select * from letter where module=?");
-	$sth->execute($module);
-	my @result;
-	while (my $line = $sth->fetchrow_hashref) {
-		push @result,$line;
-	}
-	return @result;
-}
-
-sub getletter {
-	my ($module,$code) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("select * from letter where module=? and code=?");
-	$sth->execute($module,$code);
-	my $line = $sth->fetchrow_hashref;
-	return $line;
-}
-
-=head2 addalert
-
-	parameters : 
-	- $borrowernumber : the number of the borrower subscribing to the alert
-	- $type : the type of alert.
-	- externalid : the primary key of the object to put alert on. For issues, the alert is made on subscriptionid.
-
-	create an alert and return the alertid (primary key)
-	
-=cut
-
-sub addalert {
-	my ($borrowernumber,$type,$externalid) = @_;
-	my $dbh=C4::Context->dbh;
-	my $sth = $dbh->prepare("insert into alert (borrowernumber, type, externalid) values (?,?,?)");
-	$sth->execute($borrowernumber,$type,$externalid);
-	# get the alert number newly created and return it
-	my $alertid = $dbh->{'mysql_insertid'};
-	return $alertid;
-}
-
-=head2 delalert
-	parameters :
-	- alertid : the alert id
-	deletes the alert
-=cut
-
-sub delalert {
-	my ($alertid)=@_;
-# 	warn "ALERTID : $alertid";
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("delete from alert where alertid=?");
-	$sth->execute($alertid);
-}
-
-=head2 getalert
-
-	parameters :
-	- $borrowernumber : the number of the borrower subscribing to the alert
-	- $type : the type of alert.
-	- externalid : the primary key of the object to put alert on. For issues, the alert is made on subscriptionid.
-	all parameters NON mandatory. If a parameter is omitted, the query is done without the corresponding parameter. For example, without $externalid, returns all alerts for a borrower on a topic.
-	
-=cut
-
-sub getalert {
-	my ($borrowernumber,$type,$externalid) = @_;
-	my $dbh=C4::Context->dbh;
-	my $query = "select * from alert where";
-	my @bind;
-	if ($borrowernumber) {
-		$query .= " borrowernumber=? and";
-		push @bind,$borrowernumber;
-	}
-	if ($type) {
-		$query .= " type=? and";
-		push @bind,$type;
-	}
-	if ($externalid) {
-		$query .= " externalid=? and";
-		push @bind,$externalid;
-	}
-	$query =~ s/ and$//;
-	my $sth = $dbh->prepare($query);
-	$sth->execute(@bind);
-	my @result;
-	while (my $line = $sth->fetchrow_hashref) {
-		push @result,$line;
-	}
-	return \@result if $#result >=0; # return only if there is one result.
-	return;
-}
-
-=head2 findrelatedto
-	parameters :
-	- $type : the type of alert
-	- $externalid : the id of the "object" to query
-	
-	In the table alert, a "id" is stored in the externalid field. This "id" is related to another table, depending on the type of the alert.
-	When type=issue, the id is related to a subscriptionid and this sub returns the name of the biblio.
-	When type=virtual, the id is related to a virtual shelf and this sub returns the name of the sub
-=cut
-
-sub findrelatedto {
-	my ($type,$externalid) = @_;
-	my $dbh=C4::Context->dbh;
-	my $sth;
-	if ($type eq 'issue') {
-		$sth=$dbh->prepare("select title as result from subscription left join biblio on subscription.biblionumber=biblio.biblionumber where subscriptionid=?");
-	}
-	if ($type eq 'borrower') {
-		$sth=$dbh->prepare("select concat(firstname,' ',surname) from borrowers where borrowernumber=?");
-	}
-	$sth->execute($externalid);
-	my ($result) = $sth->fetchrow;
-	return $result;
-}
-
-=head2 sendalert
-	parameters :
-	- $type : the type of alert
-	- $externalid : the id of the "object" to query
-	- $letter : the letter to send.
-
-	send an alert to all borrowers having put an alert on a given subject.
-
-=cut
-
-sub sendalerts {
-	my ($type,$externalid,$letter)=@_;
-	my $dbh=C4::Context->dbh;
-	if ($type eq 'issue') {
-# 		warn "sending issues...";
-		my $letter = getletter('serial',$letter);
-		# prepare the letter...
-		# search the biblionumber
-		my $sth=$dbh->prepare("select biblionumber from subscription where subscriptionid=?");
-		$sth->execute($externalid);
-		my ($biblionumber)=$sth->fetchrow;
-		# parsing branch info
-		my $userenv = C4::Context->userenv;
-		parseletter($letter,'branches',$userenv->{branch});
-		# parsing librarian name
-		$letter->{content} =~ s/<<LibrarianFirstname>>/$userenv->{firstname}/g;
-		$letter->{content} =~ s/<<LibrarianSurname>>/$userenv->{surname}/g;
-		$letter->{content} =~ s/<<LibrarianEmailaddress>>/$userenv->{emailaddress}/g;
-		# parsing biblio information
-		parseletter($letter,'biblio',$biblionumber);
-		parseletter($letter,'biblioitems',$biblionumber);
-		# find the list of borrowers to alert
-		my $alerts = getalert('','issue',$externalid);
-		foreach (@$alerts) {
-			# and parse borrower ...
-			my $innerletter = $letter;
-			my $borinfo = getmember('',$_->{'borrowernumber'});
-			parseletter($innerletter,'borrowers',$_->{'borrowernumber'});
-			# ... then send mail
-			if ($borinfo->{emailaddress}) {
-				my %mail = ( To => $borinfo->{emailaddress},
-							From => $userenv->{emailaddress},
-							Subject => "".$innerletter->{title},
-							Message => "".$innerletter->{content},
-							);
-				sendmail(%mail);
-# 				warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}";
-			}
-		}
-	}
-}
-
-=head2
-	parameters :
-	- $letter : a hash to letter fields (title & content useful)
-	- $table : the Koha table to parse.
-	- $pk : the primary key to query on the $table table
-	parse all fields from a table, and replace values in title & content with the appropriate value
-	(not exported sub, used only internally)
-=cut
-sub parseletter {
-	my ($letter,$table,$pk) = @_;
-# 	warn "Parseletter : ($letter,$table,$pk)";
-	my $dbh=C4::Context->dbh;
-	my $sth;
-	if ($table eq 'biblio') {
-		$sth = $dbh->prepare("select * from biblio where biblionumber=?");
-	} elsif ($table eq 'biblioitems') {
-		$sth = $dbh->prepare("select * from biblioitems where biblionumber=?");
-	} elsif ($table eq 'borrowers') {
-		$sth = $dbh->prepare("select * from borrowers where borrowernumber=?");
-	} elsif ($table eq 'branches') {
-		$sth = $dbh->prepare("select * from branches where branchcode=?");
-	}
-	$sth->execute($pk);
-	# store the result in an hash
-	my $values = $sth->fetchrow_hashref;
-	# and get all fields from the table
-	$sth = $dbh->prepare("show columns from $table");
-	$sth->execute;
-	while ((my $field) = $sth->fetchrow_array) {
-		my $replacefield="<<$table.$field>>";
-		my $replacedby = $values->{$field};
-# 		warn "REPLACE $replacefield by $replacedby";
-		$letter->{title} =~ s/$replacefield/$replacedby/g;
-		$letter->{content} =~ s/$replacefield/$replacedby/g;
-	}
-}
-
-END { }       # module clean-up code here (global destructor)

Index: C4/Log.pm
===================================================================
RCS file: C4/Log.pm
diff -N C4/Log.pm
--- C4/Log.pm	14 Apr 2006 09:33:56 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,198 +0,0 @@
-package C4::Log; #assumes C4/Log
-
-#package to deal with Logging Actions in DB
-
-
-# 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 C4::Context;
-use C4::Date;
-
-require Exporter;
-
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Log - Koha Log Facility functions
-
-=head1 SYNOPSIS
-
-  use C4::Log;
-
-=head1 DESCRIPTION
-
-The functions in this module perform various functions in order to log all the operations done on the Database, including deleting and undeleting books, adding/editing members, etc.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(&logaction &logstatus &displaylog);
-
-=item logaction
-
-  &logaction($usernumber, $modulename, $actionname, $infos);
-
-Adds a record into action_logs table to report the different changes upon the database
-
-=cut
-#'
-sub logaction{
-  my ($usernumber,$modulename, $actionname, $objectnumber, $infos)=@_;
-	$usernumber='' unless $usernumber;
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("Insert into action_logs (timestamp,user,module,action,object,info) values (now(),?,?,?,?,?)");
-	$sth->execute($usernumber,$modulename,$actionname,$objectnumber,$infos);
-	$sth->finish;
-}
-
-=item logstatus
-
-  &logstatus;
-
-returns True If Activate_Log variable is equal to On
-Activate_Log is a system preference Variable
-=cut
-#'
-sub logstatus{
-	return C4::Context->preference("Activate_Log");
-}
-
-=item displaylog
-
-  &displaylog($modulename, @filters);
-  $modulename is the name of the module on which the user wants to display logs
-  @filters is an optional table of hash containing :
-  	- name : the name of the variable to filter
-	- value : the value of the filter.... May be with * joker
-
-returns a table of hash containing who did what on which object at what time
-
-=cut
-#'
-sub displaylog{
-  my ($modulename, @filters)=@_;
-	my $dbh = C4::Context->dbh;
-	my $strsth;
-	if ($modulename eq "catalogue"){
-		$strsth="select action_logs.timestamp, action_logs.action, action_logs.info, borrowers.cardnumber, borrowers.surname, borrowers.firstname, borrowers.userid,";
-		$strsth .= "biblio.biblionumber, biblio.title, biblio.author" ;#if ($modulename eq "acqui.simple");
-		$strsth .= " FROM borrowers,action_logs ";
-		$strsth .= ",biblio " ;#if ($modulename eq "acqui.simple");
-	
-		$strsth .=" WHERE borrowers.borrowernumber=action_logs.user";
-		$strsth .=" AND action_logs.module = 'acqui.simple' AND action_logs.object=biblio.biblionumber ";# if ($modulename eq "acqui.simple");
-		if (@filters){
-			foreach my $filter (@filters){
-				if ($filter->{name} =~ /user/){
-					$filter->{value}=~s/\*/%/g;
-					$strsth .= " AND borrowers.surname like ".$filter->{value};
-				}elsif ($filter->{name} =~ /title/){
-					$filter->{value}=~s/\*/%/g;
-					$strsth .= " AND biblio.title like ".$filter->{value};
-				}elsif ($filter->{name} =~ /author/){
-					$filter->{value}=~s/\*/%/g;
-					$strsth .= " AND biblio.author like ".$filter->{value};
-				}
-			}
-		}
-	} elsif ($modulename eq "acqui")  {
-		$strsth="select action_logs.timestamp, action_logs.action, action_logs.info, borrowers.cardnumber, borrowers.surname, borrowers.firstname, borrowers.userid,";
-		$strsth .= "biblio.biblionumber, biblio.title, biblio.author" ;#if ($modulename eq "acqui.simple");
-		$strsth .= "FROM borrowers,action_logs ";
-		$strsth .= ",biblio " ;#if ($modulename eq "acqui.simple");
-	
-		$strsth .=" WHERE borrowers.borrowernumber=action_logs.user";
-		$strsth .= "AND action_logs.module = 'acqui.simple' AND action_logs.object=biblio.biblionumber ";# if ($modulename eq "acqui.simple");
-		if (@filters){
-			foreach my $filter (@filters){
-				if ($filter->{name} =~ /user/){
-					$filter->{value}=~s/\*/%/g;
-					$strsth .= " AND borrowers.surname like ".$filter->{value};
-				}elsif ($filter->{name} =~ /title/){
-					$filter->{value}=~s/\*/%/g;
-					$strsth .= " AND biblio.title like ".$filter->{value};
-				}elsif ($filter->{name} =~ /author/){
-					$filter->{value}=~s/\*/%/g;
-					$strsth .= " AND biblio.author like ".$filter->{value};
-				}
-			}
-		}
-	} elsif ($modulename eq "members"){
-		$strsth="select action_logs.timestamp, action_logs.action, action_logs.info, borrowers.cardnumber, borrowers.surname, borrowers.firstname, borrowers.userid,";
-		$strsth .= "bor2.cardnumber, bor2.surname, bor2.firstname, bor2.userid,";
-		$strsth .= "FROM borrowers,action_logs,borrowers as bor2 ";
-	
-		$strsth .=" WHERE borrowers.borrowernumber=action_logs.user";
-		$strsth .= "AND action_logs.module = 'members' AND action_logs.object=bor2.borrowernumber ";# if ($modulename eq "acqui.simple");
-		if (@filters){
-			foreach my $filter (@filters){
-				if ($filter->{name} =~ /user/){
-					$filter->{value}=~s/\*/%/g;
-					$strsth .= " AND borrowers.surname like ".$filter->{value};
-				}elsif ($filter->{name} =~ /surname/){
-					$filter->{value}=~s/\*/%/g;
-					$strsth .= " AND bor2.surname like ".$filter->{value};
-				}elsif ($filter->{name} =~ /firstname/){
-					$filter->{value}=~s/\*/%/g;
-					$strsth .= " AND bor2.firsntame like ".$filter->{value};
-				}elsif ($filter->{name} =~ /cardnumber/){
-					$filter->{value}=~s/\*/%/g;
-					$strsth .= " AND bor2.cardnumber like ".$filter->{value};
-				}
-			}
-		}
-	}
-# 	warn "displaylog :".$strsth;
-	if ($strsth){
-		my $sth=$dbh->prepare($strsth);
-		$sth->execute;
-		my @results;
-		my $count;
-		my $hilighted=1;
-		while (my $data = $sth->fetchrow_hashref){
-			$data->{hilighted} = ($hilighted>0);
-			$data->{info} =~ s/\n/<br\/>/g;
-			$data->{day} = format_date($data->{timestamp});
-			push @results, $data;
-			$count++;
-			$hilighted = -$hilighted;
-		}
-		return ($count, \@results);
-	} else {return 0;}
-}
-END { }       # module clean-up code here (global destructor)
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: C4/Members.pm
===================================================================
RCS file: C4/Members.pm
diff -N C4/Members.pm
--- C4/Members.pm	6 Nov 2006 21:01:43 -0000	1.39
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,1541 +0,0 @@
-# -*- tab-width: 8 -*-
-
-package C4::Members;
-
-# Copyright 2000-2003 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
-
-# $Id: Members.pm,v 1.39 2006/11/06 21:01:43 tgarip1957 Exp $
-
-use strict;
-require Exporter;
-use C4::Context;
-use C4::Date;
-use Digest::MD5 qw(md5_base64);
-use C4::Biblio;
-use C4::Stats;
-use C4::Reserves2;
-use C4::Koha;
-use C4::Accounts2;
-use C4::Circulation::Circ2;
-
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-
-$VERSION = do { my @v = '$Revision: 1.39 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
-
-=head1 NAME
-
-C4::Members - Perl Module containing convenience functions for member handling
-
-=head1 SYNOPSIS
-
-use C4::Members;
-
-=head1 DESCRIPTION
-
-This module contains routines for adding, modifying and deleting members/patrons/borrowers 
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
-#'
-
- at ISA    = qw(Exporter);
-
- at EXPORT = qw(
-
-&allissues
-&add_member_orgs
-&borrdata 
-&borrdata2 
-&borrdata3
-&BornameSearch 
-&borrissues
-&borrowercard_active
-&borrowercategories
-&change_user_pass
-&checkuniquemember 
-&calcexpirydate 
-&checkuserpassword
-
-&ethnicitycategories 
-&fixEthnicity
-&fixup_cardnumber 
-&findguarantees 
-&findguarantor  
-&fixupneu_cardnumber
-
-&getmember 
-&getMemberPhoto 
-&get_institutions
-&getzipnamecity 
-&getidcity 
-&getguarantordata 
-&getcategorytype
-&getboracctrecord
-&getborrowercategory
-&getborrowercategoryinfo
-&get_age 
-&getpatroninformation
-&GetBorrowersFromSurname 
-&GetBranchCodeFromBorrowers
-&GetFlagsAndBranchFromBorrower
-&GuarantornameSearch
-&NewBorrowerNumber 
-&modmember 
-&newmember 
-&expand_sex_into_predicate
-	);
-
-
-
-=head2 borrowercategories
-
-  ($codes_arrayref, $labels_hashref) = &borrowercategories();
-
-Looks up the different types of borrowers in the database. Returns two
-elements: a reference-to-array, which lists the borrower category
-codes, and a reference-to-hash, which maps the borrower category codes
-to category descriptions.
-
-=cut
-#'
-
-sub borrowercategories {
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("Select categorycode,description from categories order by description");
-    $sth->execute;
-    my %labels;
-    my @codes;
-    while (my $data=$sth->fetchrow_hashref){
-      push @codes,$data->{'categorycode'};
-      $labels{$data->{'categorycode'}}=$data->{'description'};
-    }
-    $sth->finish;
-    return(\@codes,\%labels);
-}
-
-=item BornameSearch
-
-  ($count, $borrowers) = &BornameSearch($env, $searchstring, $type);
-
-Looks up patrons (borrowers) by name.
-
-C<$env> is ignored.
-
-BUGFIX 499: C<$type> is now used to determine type of search.
-if $type is "simple", search is performed on the first letter of the
-surname only.
-
-C<$searchstring> is a space-separated list of search terms. Each term
-must match the beginning a borrower's surname, first name, or other
-name.
-
-C<&BornameSearch> returns a two-element list. C<$borrowers> is a
-reference-to-array; each element is a reference-to-hash, whose keys
-are the fields of the C<borrowers> table in the Koha database.
-C<$count> is the number of elements in C<$borrowers>.
-
-=cut
-#'
-#used by member enquiries from the intranet
-#called by member.pl
-sub BornameSearch  {
-	my ($env,$searchstring,$orderby,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	my $query = ""; my $count; 
-	my @data;
-	my @bind=();
-
-	if($type eq "simple")	# simple search for one letter only
-	{
-		$query="Select * from borrowers where surname like '$searchstring%' order by $orderby";
-#		@bind=("$searchstring%");
-	}
-	else	# advanced search looking in surname, firstname and othernames
-	{
-### Try to determine whether numeric like cardnumber
-	if ($searchstring+1>1) {
-	$query="Select * from borrowers where  cardnumber  like '$searchstring%' ";
-
-	}else{
-	
-	my @words=split / /,$searchstring;
-	foreach my $word(@words){
-	$word="+".$word;
-	
-	}
-	$searchstring=join " ", at words;
-	
-		$query="Select * from borrowers where  MATCH(surname,firstname,othernames) AGAINST('$searchstring'  in boolean mode)";
-
-	}
-		$query=$query." order by $orderby";
-	}
-
-	my $sth=$dbh->prepare($query);
-#	warn "Q $orderby : $query";
-	$sth->execute();
-	my @results;
-	my $cnt=$sth->rows;
-	while (my $data=$sth->fetchrow_hashref){
-	push(@results,$data);
-	}
-	#  $sth->execute;
-	$sth->finish;
-	return ($cnt,\@results);
-}
-=head2 getpatroninformation
-
-  ($borrower, $flags) = &getpatroninformation($env, $borrowernumber, $cardnumber);
-Looks up a patron and returns information about him or her. If
-C<$borrowernumber> is true (nonzero), C<&getpatroninformation> looks
-up the borrower by number; otherwise, it looks up the borrower by card
-number.
-C<$env> is effectively ignored, but should be a reference-to-hash.
-C<$borrower> is a reference-to-hash whose keys are the fields of the
-borrowers table in the Koha database. In addition,
-C<$borrower-E<gt>{flags}> is a hash giving more detailed information
-about the patron. Its keys act as flags :
-
-	if $borrower->{flags}->{LOST} {
-		# Patron's card was reported lost
-	}
-
-Each flag has a C<message> key, giving a human-readable explanation of
-the flag. If the state of a flag means that the patron should not be
-allowed to borrow any more books, then it will have a C<noissues> key
-with a true value.
-
-The possible flags are:
-
-=head3 CHARGES
-
-=over 4
-
-Shows the patron's credit or debt, if any.
-
-=back
-
-=head3 GNA
-
-=over 4
-
-(Gone, no address.) Set if the patron has left without giving a
-forwarding address.
-
-=back
-
-=head3 LOST
-
-=over 4
-
-Set if the patron's card has been reported as lost.
-
-=back
-
-=head3 DBARRED
-
-=over 4
-
-Set if the patron has been debarred.
-
-=back
-
-=head3 NOTES
-
-=over 4
-
-Any additional notes about the patron.
-
-=back
-
-=head3 ODUES
-
-=over 4
-
-Set if the patron has overdue items. This flag has several keys:
-
-C<$flags-E<gt>{ODUES}{itemlist}> is a reference-to-array listing the
-overdue items. Its elements are references-to-hash, each describing an
-overdue item. The keys are selected fields from the issues, biblio,
-biblioitems, and items tables of the Koha database.
-
-C<$flags-E<gt>{ODUES}{itemlist}> is a string giving a text listing of
-the overdue items, one per line.
-
-=back
-
-=head3 WAITING
-
-=over 4
-
-Set if any items that the patron has reserved are available.
-
-C<$flags-E<gt>{WAITING}{itemlist}> is a reference-to-array listing the
-available items. Each element is a reference-to-hash whose keys are
-fields from the reserves table of the Koha database.
-
-=back
-
-=back
-
-=cut
-
-sub getpatroninformation {
-# returns
-	my ($env, $borrowernumber,$cardnumber) = @_;
-	my $dbh = C4::Context->dbh;
-	my $query;
-	my $sth;
-	if ($borrowernumber) {
-		$sth = $dbh->prepare("select * from borrowers where borrowernumber=?");
-		$sth->execute($borrowernumber);
-	} elsif ($cardnumber) {
-		$sth = $dbh->prepare("select * from borrowers where cardnumber=?");
-		$sth->execute($cardnumber);
-	} else {
-		$env->{'apierror'} = "invalid borrower information passed to getpatroninformation subroutine";
-		return();
-	}
-	my $borrower = $sth->fetchrow_hashref;
-	my $amount = C4::Accounts2::checkaccount($env, $borrowernumber, $dbh);
-	$borrower->{'amountoutstanding'} = $amount;
-	my $flags = C4::Circulation::Circ2::patronflags($env, $borrower, $dbh);
-	my $accessflagshash;
- 
-	$sth=$dbh->prepare("select bit,flag from userflags");
-	$sth->execute;
-	while (my ($bit, $flag) = $sth->fetchrow) {
-		if ($borrower->{'flags'} & 2**$bit) {
-		$accessflagshash->{$flag}=1;
-		}
-	}
-	$sth->finish;
-	$borrower->{'flags'}=$flags;
-	$borrower->{'authflags'} = $accessflagshash;
-	return ($borrower); #, $flags, $accessflagshash);
-}
-
-=item getmember
-
-  $borrower = &getmember($cardnumber, $borrowernumber);
-
-Looks up information about a patron (borrower) by either card number
-or borrower number. If $borrowernumber is specified, C<&borrdata>
-searches by borrower number; otherwise, it searches by card number.
-
-C<&getmember> returns a reference-to-hash whose keys are the fields of
-the C<borrowers> table in the Koha database.
-
-=cut
-
-=head3 GetFlagsAndBranchFromBorrower
-
-=over 4
-
-($flags, $homebranch) = GetFlagsAndBranchFromBorrower($loggedinuser);
-
-this function read on the database to get flags and homebranch for a user
-given on input arg.
-
-return : 
-it returns the $flags & the homebranch in scalar context.
-
-=back
-
-=cut
-
-
-
-=item borrissues
-
-  ($count, $issues) = &borrissues($borrowernumber);
-
-Looks up what the patron with the given borrowernumber has borrowed.
-
-C<&borrissues> returns a two-element array. C<$issues> is a
-reference-to-array, where each element is a reference-to-hash; the
-keys are the fields from the C<issues>, C<biblio>, and C<items> tables
-in the Koha database. C<$count> is the number of elements in
-C<$issues>.
-
-=cut
-#'
-sub borrissues {
-  my ($bornum)=@_;
-  my $dbh = C4::Context->dbh;
-  my $sth=$dbh->prepare("Select * from issues,biblio,items where borrowernumber=?
-   and items.itemnumber=issues.itemnumber
-	and items.biblionumber=biblio.biblionumber
-	and issues.returndate is NULL order by date_due");
-    $sth->execute($bornum);
-  my @result;
-  while (my $data = $sth->fetchrow_hashref) {
-    push @result, $data;
-  }
-  $sth->finish;
-  return(scalar(@result), \@result);
-}
-
-=item allissues
-
-  ($count, $issues) = &allissues($borrowernumber, $sortkey, $limit);
-
-Looks up what the patron with the given borrowernumber has borrowed,
-and sorts the results.
-
-C<$sortkey> is the name of a field on which to sort the results. This
-should be the name of a field in the C<issues>, C<biblio>,
-C<biblioitems>, or C<items> table in the Koha database.
-
-C<$limit> is the maximum number of results to return.
-
-C<&allissues> returns a two-element array. C<$issues> is a
-reference-to-array, where each element is a reference-to-hash; the
-keys are the fields from the C<issues>, C<biblio>, C<biblioitems>, and
-C<items> tables of the Koha database. C<$count> is the number of
-elements in C<$issues>
-
-=cut
-#'
-sub allissues {
-  my ($bornum,$order,$limit)=@_;
-  #FIXME: sanity-check order and limit
-  my $dbh = C4::Context->dbh;
-  my $query="Select * from issues,biblio,items
-  where borrowernumber=? and
-  items.itemnumber=issues.itemnumber and
-  items.biblionumber=biblio.biblionumber order by $order";
-  if ($limit !=0){
-    $query.=" limit $limit";
-  }
-  #print $query;
-  my $sth=$dbh->prepare($query);
-  $sth->execute($bornum);
-  my @result;
-  my $i=0;
-  while (my $data=$sth->fetchrow_hashref){
-    $result[$i]=$data;;
-    $i++;
-  }
-  $sth->finish;
-  return($i,\@result);
-}
-
-
-sub borrdata3 {
-## NEU specific. used in Reserve section issues
-  my ($env,$bornum)=@_;
-  my $dbh = C4::Context->dbh;
-  my $query="Select count(*) from  reserveissue as r where r.borrowernumber='$bornum' 
-     and rettime is null";
-    # print $query;
-  my $sth=$dbh->prepare($query);
-  $sth->execute;
-  my $data=$sth->fetchrow_hashref;
-  $sth->finish;
-  $sth=$dbh->prepare("Select count(*),timediff(now(),  duetime  ) as elapsed, hour(timediff(now(),  duetime  )) as hours, MINUTE(timediff(now(),  duetime  )) as min from 
-    reserveissue as r where  r.borrowernumber='$bornum' and rettime is null and duetime< now() group by r.borrowernumber");
-  $sth->execute;
-
-  my $data2=$sth->fetchrow_hashref;
-my $resfine;
-my $rescharge=C4::Context->preference('resmaterialcharge');
-	if (!$rescharge){
-	$rescharge=1;
-	}
-	if ($data2->{'elapsed'}>0){
-	 $resfine=($data2->{'hours'}+$data2->{'min'}/60)*$rescharge;
-	$resfine=sprintf  ("%.1f",$resfine);
-	}
-  $sth->finish;
-  $sth=$dbh->prepare("Select sum(amountoutstanding) from accountlines where
-    borrowernumber='$bornum'");
-  $sth->execute;
-  my $data3=$sth->fetchrow_hashref;
-  $sth->finish;
-
-
-return($data2->{'count(*)'},$data->{'count(*)'},$data3->{'sum(amountoutstanding)'},$resfine);
-}
-=item getboracctrecord
-
-  ($count, $acctlines, $total) = &getboracctrecord($env, $borrowernumber);
-
-Looks up accounting data for the patron with the given borrowernumber.
-
-C<$env> is ignored.
-
-
-C<&getboracctrecord> returns a three-element array. C<$acctlines> is a
-reference-to-array, where each element is a reference-to-hash; the
-keys are the fields of the C<accountlines> table in the Koha database.
-C<$count> is the number of elements in C<$acctlines>. C<$total> is the
-total amount outstanding for all of the account lines.
-
-=cut
-#'
-sub getboracctrecord {
-   my ($env,$params) = @_;
-   my $dbh = C4::Context->dbh;
-   my @acctlines;
-   my $numlines=0;
-   my $sth=$dbh->prepare("Select * from accountlines where
-borrowernumber=? order by date desc,timestamp desc");
-#   print $query;
-   $sth->execute($params->{'borrowernumber'});
-   my $total=0;
-   while (my $data=$sth->fetchrow_hashref){
-      $acctlines[$numlines] = $data;
-      $numlines++;
-      $total += $data->{'amountoutstanding'};
-   }
-   $sth->finish;
-   return ($numlines,\@acctlines,$total);
-}
-
-sub getborrowercategory{
-	my ($catcode) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("SELECT description FROM categories WHERE categorycode = ?");
-	$sth->execute($catcode);
-	my $description = $sth->fetchrow();
-	$sth->finish();
-	return $description;
-} # sub getborrowercategory
-
-sub getborrowercategoryinfo{
-	my ($catcode) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("SELECT * FROM categories WHERE categorycode = ?");
-	$sth->execute($catcode);
-	my $category = $sth->fetchrow_hashref;
-	$sth->finish();
-	return $category;
-} # sub getborrowercategoryinfo
-
-
-sub GetFlagsAndBranchFromBorrower {
-    my $loggedinuser = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = "
-       SELECT flags, branchcode
-       FROM   borrowers
-       WHERE  borrowernumber = ? 
-    ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute($loggedinuser);
-
-    return $sth->fetchrow;
-}
-
-
-sub getmember {
-    my ( $cardnumber, $bornum ) = @_;
-    $cardnumber = uc $cardnumber;
-    my $dbh = C4::Context->dbh;
-    my $sth;
-    if ( $bornum eq '' ) {
-        $sth = $dbh->prepare("Select * from borrowers where cardnumber=?");
-        $sth->execute($cardnumber);
-    } else {
-        $sth = $dbh->prepare("Select * from borrowers where borrowernumber=?");
-        $sth->execute($bornum);
-    }
-    my $data = $sth->fetchrow_hashref;
-    $sth->finish;
-    if ($data) {
-        return ($data);
-    }
-    else {    # try with firstname
-        if ($cardnumber) {
-            my $sth =
-              $dbh->prepare("select * from borrowers where firstname=?");
-            $sth->execute($cardnumber);
-            my $data = $sth->fetchrow_hashref;
-            $sth->finish;
-            return ($data);
-        }
-    }
-    return undef;
-}
-
-=item borrdata
-
-  $borrower = &borrdata($cardnumber, $borrowernumber);
-
-Looks up information about a patron (borrower) by either card number
-or borrower number. If $borrowernumber is specified, C<&borrdata>
-searches by borrower number; otherwise, it searches by card number.
-
-C<&borrdata> returns a reference-to-hash whose keys are the fields of
-the C<borrowers> table in the Koha database.
-
-=cut
-
-#'
-sub borrdata {
-    my ( $cardnumber, $bornum ) = @_;
-    $cardnumber = uc $cardnumber;
-    my $dbh = C4::Context->dbh;
-    my $sth;
-    if ( $bornum eq '' ) {
-        $sth =
-          $dbh->prepare(
-"Select borrowers.*,categories.category_type from borrowers left join categories on borrowers.categorycode=categories.categorycode where cardnumber=?"
-          );
-        $sth->execute($cardnumber);
-    }
-    else {
-        $sth =
-          $dbh->prepare(
-"Select borrowers.*,categories.category_type from borrowers left join categories on borrowers.categorycode=categories.categorycode where borrowernumber=?"
-          );
-        $sth->execute($bornum);
-    }
-    my $data = $sth->fetchrow_hashref;
-#     warn "DATA" . $data->{category_type};
-    $sth->finish;
-    if ($data) {
-        return ($data);
-    }
-    else {    # try with firstname
-        if ($cardnumber) {
-            my $sth =
-              $dbh->prepare(
-"Select borrowers.*,categories.category_type from borrowers left join categories on borrowers.categorycode=categories.categorycode  where firstname=?"
-              );
-            $sth->execute($cardnumber);
-            my $data = $sth->fetchrow_hashref;
-            $sth->finish;
-            return ($data);
-        }
-    }
-    return undef;
-}
-
-=item borrdata2
-
-  ($borrowed, $due, $fine) = &borrdata2($env, $borrowernumber);
-
-Returns aggregate data about items borrowed by the patron with the
-given borrowernumber.
-
-C<$env> is ignored.
-
-C<&borrdata2> returns a three-element array. C<$borrowed> is the
-number of books the patron currently has borrowed. C<$due> is the
-number of overdue items the patron currently has borrowed. C<$fine> is
-the total fine currently due by the borrower.
-
-=cut
-
-#'
-sub borrdata2 {
-    my ( $env, $bornum ) = @_;
-    my $dbh   = C4::Context->dbh;
-    my $query = "Select count(*) from issues where borrowernumber='$bornum' and
-    returndate is NULL";
-
-    # print $query;
-    my $sth = $dbh->prepare($query);
-    $sth->execute;
-    my $data = $sth->fetchrow_hashref;
-    $sth->finish;
-    $sth = $dbh->prepare(
-        "Select count(*) from issues where
-    borrowernumber='$bornum' and date_due < now() and returndate is NULL"
-    );
-    $sth->execute;
-    my $data2 = $sth->fetchrow_hashref;
-    $sth->finish;
-    $sth = $dbh->prepare(
-        "Select sum(amountoutstanding) from accountlines where
-    borrowernumber='$bornum'"
-    );
-    $sth->execute;
-    my $data3 = $sth->fetchrow_hashref;
-    $sth->finish;
-
-    return ( $data2->{'count(*)'}, $data->{'count(*)'},
-        $data3->{'sum(amountoutstanding)'} );
-}
-
-sub modmember {
-	my (%data) = @_;
-	my $dbh = C4::Context->dbh;
-	$data{'dateofbirth'}=format_date_in_iso($data{'dateofbirth'});
-
-
-	$data{'joining'}=format_date_in_iso($data{'joining'});
-	
-	if ($data{'expiry'}) {
-	$data{'expiry'}=format_date_in_iso($data{'expiry'});
-	}else{
-	
-		$data{'expiry'} = calcexpirydate($data{'categorycode'},$data{'joining'} );
-		
-	}
-	
-	my $query= "UPDATE borrowers SET 
-					cardnumber		= '$data{'cardnumber'}'		,
-					surname			= '$data{'surname'}'		,
-					firstname		= '$data{'firstname'}'		,
-					title			= '$data{'title'}'			,
-					initials		= '$data{'initials'}'		,
-					dateofbirth		= '$data{'dateofbirth'}'	,
-					sex				= '$data{'sex'}'			,
-					streetaddress	= '$data{'streetaddress'}'	,
-					streetcity		= '$data{'streetcity'}'		,	
-					zipcode			= '$data{'zipcode'}'		,
-					phoneday		= '$data{'phoneday'}'		,
-					physstreet		= '$data{'physstreet'}'		,	
-					city			= '$data{'city'}'			,
-					homezipcode		= '$data{'homezipcode'}'	,
-					phone			= '$data{'phone'}'			,
-					emailaddress	= '$data{'emailaddress'}'	,
-					preferredcont    = '$data{'preferredcont'}',
-					faxnumber		= '$data{'faxnumber'}'		,
-					textmessaging	= '$data{'textmessaging'}'	,			 
-					categorycode	= '$data{'categorycode'}'	,
-					branchcode		= '$data{'branchcode'}'		,
-					borrowernotes	= '$data{'borrowernotes'}'	,
-					ethnicity		= '$data{'ethnicity'}'		,
-					ethnotes		= '$data{'ethnotes'}'		,
-					expiry			= '$data{'expiry'}'			,
-					dateenrolled	= '$data{'joining'}'		,
-					sort1			= '$data{'sort1'}'			, 
-					sort2			= '$data{'sort2'}'			,	
-					debarred		= '$data{'debarred'}'		,
-					lost			= '$data{'lost'}'			,
-					gonenoaddress   = '$data{'gna'}'			
-			WHERE borrowernumber = $data{'borrowernumber'}";
-	my $sth = $dbh->prepare($query);
-	$sth->execute;
-	$sth->finish;
-	# ok if its an adult (type) it may have borrowers that depend on it as a guarantor
-	# so when we update information for an adult we should check for guarantees and update the relevant part
-	# of their records, ie addresses and phone numbers
-	if ($data{'categorycode'} eq 'A' || $data{'categorycode'} eq 'W'){
-		# is adult check guarantees;
-		updateguarantees(%data);
-	}
-}
-
-sub newmember {
-	my (%data) = @_;
-	my $dbh = C4::Context->dbh;
-	$data{'dateofbirth'}=format_date_in_iso($data{'dateofbirth'});
-	
-	
-	if ($data{'joining'}){
-	$data{'joining'}=format_date_in_iso($data{'joining'});
-	}else{
-	$data{'joining'} = get_today();
-	}
-	# if expirydate is not set, calculate it from borrower category subscription duration
-	if ($data{'expiry'}) {
-	$data{'expiry'}=format_date_in_iso($data{'expiry'});
-	}else{
-		
-		$data{'expiry'} = calcexpirydate($data{'categorycode'},$data{'joining'});
-	}
-	
-	my $query= "INSERT INTO borrowers (
-							cardnumber,
-							surname,
-							firstname,
-							title,
-							initials,
-							dateofbirth,
-							sex,
-							streetaddress,
-							streetcity,
-							zipcode,
-							phoneday,
-							physstreet,
-							city,
-							homezipcode,
-							phone,
-							emailaddress,
-							faxnumber,
-							textmessaging,
-							preferredcont,
-							categorycode,
-							branchcode,
-							borrowernotes,
-							ethnicity,
-							ethnotes,
-							expiry,
-							dateenrolled,
-							sort1,
-							sort2
-								) 
-				VALUES (
-							'$data{'cardnumber'}',
-							'$data{'surname'}',
-							'$data{'firstname'}',
-							'$data{'title'}',
-							'$data{'initials'}',
-							'$data{'dateofbirth'}',
-							'$data{'sex'}',
-							
-							'$data{'streetaddress'}',
-							'$data{'streetcity'}',
-							'$data{'zipcode'}',
-							'$data{'phoneday'}',
-							
-							'$data{'physstreet'}',
-							'$data{'city'}',
-							'$data{'homezipcode'}',
-							'$data{'phone'}',
-
-							'$data{'emailaddress'}',
-							'$data{'faxnumber'}',
-							'$data{'textmessaging'}',
-							'$data{'preferredcont'}',
-							'$data{'categorycode'}',
-							'$data{'branchcode'}',
-							'$data{'borrowernotes'}',
-							'$data{'ethnicity'}',
-							'$data{'ethnotes'}',
-							'$data{'expiry'}',
-							'$data{'joining'}',
-							'$data{'sort1'}',
-							'$data{'sort2'}' 
-							)";
-	my $sth=$dbh->prepare($query);
-	$sth->execute;
-	$sth->finish;
-	$data{'bornum'} =$dbh->{'mysql_insertid'};
-	return $data{'bornum'};
-}
-
-sub calcexpirydate {
-    my ( $categorycode, $dateenrolled ) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth =
-      $dbh->prepare(
-        "select enrolmentperiod from categories where categorycode=?");
-    $sth->execute($categorycode);
-    my ($enrolmentperiod) = $sth->fetchrow;
-$enrolmentperiod = 1 unless ($enrolmentperiod);#enrolmentperiod in years
-		my $duration=get_duration($enrolmentperiod." years");
-	return	DATE_Add_Duration($dateenrolled,$duration);
-    
-}
-
-=head2 checkuserpassword (OUEST-PROVENCE)
-
-check for the password and login are not used
-return the number of record 
-0=> NOT USED 1=> USED
-
-=cut
-
-sub checkuserpassword {
-    my ( $borrowernumber, $userid, $password ) = @_;
-    $password = md5_base64($password);
-    my $dbh = C4::Context->dbh;
-    my $sth =
-      $dbh->prepare(
-"Select count(*) from borrowers where borrowernumber !=? and userid =? and password=? "
-      );
-    $sth->execute( $borrowernumber, $userid, $password );
-    my $number_rows = $sth->fetchrow;
-    return $number_rows;
-
-}
-sub getmemberfromuserid {
-    my ($userid) = @_;
-    my $dbh      = C4::Context->dbh;
-    my $sth      = $dbh->prepare("select * from borrowers where userid=?");
-    $sth->execute($userid);
-    return $sth->fetchrow_hashref;
-}
-sub updateguarantees {
-    my (%data) = @_;
-    my $dbh = C4::Context->dbh;
-    my ( $count, $guarantees ) = findguarantees( $data{'borrowernumber'} );
-    for ( my $i = 0 ; $i < $count ; $i++ ) {
-
-        # FIXME
-        # It looks like the $i is only being returned to handle walking through
-        # the array, which is probably better done as a foreach loop.
-        #
-        my $guaquery =
-"update borrowers set streetaddress='$data{'address'}',faxnumber='$data{'faxnumber'}',
-		streetcity='$data{'streetcity'}',phoneday='$data{'phoneday'}',city='$data{'city'}',area='$data{'area'}',phone='$data{'phone'}'
-		,streetaddress='$data{'address'}'
-		where borrowernumber='$guarantees->[$i]->{'borrowernumber'}'";
-        my $sth3 = $dbh->prepare($guaquery);
-        $sth3->execute;
-        $sth3->finish;
-    }
-}
-################################################################################
-
-=item fixup_cardnumber
-
-Warning: The caller is responsible for locking the members table in write
-mode, to avoid database corruption.
-
-=cut
-
-use vars qw( @weightings );
-my @weightings = ( 8, 4, 6, 3, 5, 2, 1 );
-
-sub fixup_cardnumber ($) {
-    my ($cardnumber) = @_;
-    my $autonumber_members = C4::Context->boolean_preference('autoMemberNum');
-    $autonumber_members = 0 unless defined $autonumber_members;
-my $rem;
-    # Find out whether member numbers should be generated
-    # automatically. Should be either "1" or something else.
-    # Defaults to "0", which is interpreted as "no".
-
-    #     if ($cardnumber !~ /\S/ && $autonumber_members) {
-    if ($autonumber_members) {
-        my $dbh = C4::Context->dbh;
-        if ( C4::Context->preference('checkdigit') eq 'katipo' ) {
-
-            # if checkdigit is selected, calculate katipo-style cardnumber.
-            # otherwise, just use the max()
-            # purpose: generate checksum'd member numbers.
-            # We'll assume we just got the max value of digits 2-8 of member #'s
-            # from the database and our job is to increment that by one,
-            # determine the 1st and 9th digits and return the full string.
-            my $sth =
-              $dbh->prepare(
-                "select max(substring(borrowers.cardnumber,2,7)) from borrowers"
-              );
-            $sth->execute;
-
-            my $data = $sth->fetchrow_hashref;
-            $cardnumber = $data->{'max(substring(borrowers.cardnumber,2,7))'};
-            $sth->finish;
-	
-            	if ( !$cardnumber ) {    # If DB has no values,
-                $cardnumber = 1000000;    # start at 1000000
-            	} else {
-                $cardnumber += 1;
-            	}
-
-            my $sum = 0;
-	            for ( my $i = 0 ; $i < 8 ; $i += 1 ) {
-
-                # read weightings, left to right, 1 char at a time
-                my $temp1 = $weightings[$i];
-
-                # sequence left to right, 1 char at a time
-                my $temp2 = substr( $cardnumber, $i, 1 );
-
-                # mult each char 1-7 by its corresponding weighting
-                $sum += $temp1 * $temp2;
-	            }
-
-             $rem = ( $sum % 11 );
-            $rem = 'X' if $rem == 10;
-
-            $cardnumber = "V$cardnumber$rem";
-        }
-        else {
-
-     # MODIFIED BY JF: mysql4.1 allows casting as an integer, which is probably
-     # better. I'll leave the original in in case it needs to be changed for you
-            my $sth =
-              $dbh->prepare(
-                "select max(cast(cardnumber as signed)) from borrowers");
-
-      #my $sth=$dbh->prepare("select max(borrowers.cardnumber) from borrowers");
-
-            $sth->execute;
-
-	$cardnumber="V$cardnumber$rem";
-    }
-    return $cardnumber;
-}
-}
-sub fixupneu_cardnumber{
-    my($cardnumber,$categorycode) = @_;
-    my $autonumber_members = C4::Context->boolean_preference('autoMemberNum');
-    $autonumber_members = 0 unless defined $autonumber_members;
-    # Find out whether member numbers should be generated
-    # automatically. Should be either "1" or something else.
-    # Defaults to "0", which is interpreted as "no".
-my $dbh = C4::Context->dbh;
-my $sth;
-    if (!$cardnumber  && $autonumber_members && $categorycode) {
-	if ($categorycode eq "A" || $categorycode eq "W" ){
-	 $sth=$dbh->prepare("select max(borrowers.cardnumber) from borrowers where borrowers.cardnumber like '5%' ");
-	}elsif ($categorycode eq "L"){	
-	 $sth=$dbh->prepare("select max(borrowers.cardnumber) from borrowers where borrowers.cardnumber like '10%' ");
-	}elsif ($categorycode eq "F" || $categorycode eq "E")	{
-	 $sth=$dbh->prepare("select max(borrowers.cardnumber) from borrowers where borrowers.cardnumber like '30%' ");
-	}elsif ($categorycode eq "N"){	
-	 $sth=$dbh->prepare("select max(borrowers.cardnumber) from borrowers where borrowers.cardnumber like '40%' ");
-	}elsif ($categorycode eq "C"){	
-	 $sth=$dbh->prepare("select max(borrowers.cardnumber) from borrowers where borrowers.cardnumber like '80%' ");
-
-	}else{
-	 $sth=$dbh->prepare("select max(borrowers.cardnumber) from borrowers where borrowers.cardnumber like '6%' ");
-	}
-	$sth->execute;
-
-	my $data=$sth->fetchrow_hashref;
-	$cardnumber=$data->{'max(borrowers.cardnumber)'};
-	$sth->finish;
-
-	# purpose: generate checksum'd member numbers.
-	# We'll assume we just got the max value of digits 2-8 of member #'s
-	# from the database and our job is to increment that by one,
-	# determine the 1st and 9th digits and return the full string.
-
-	if (! $cardnumber) { 			# If DB has no values,
-	 if ($categorycode eq "A" || $categorycode eq "W" ){   $cardnumber = 5000000;}	
-	 elsif ($categorycode eq "L"){   $cardnumber = 1000000;}
-	 elsif ($categorycode  eq "F"){   $cardnumber = 3000000;}
-	elsif ($categorycode  eq "C"){   $cardnumber = 8000000;}
-	elsif ($categorycode  eq "N"){   $cardnumber = 4000000;}
-	else{$cardnumber = 6000000;}	
-	# start at 1000000 or 3000000 or 5000000
-	} else {
-	    $cardnumber += 1;
-	}
-
-	
-    }
-    return $cardnumber;
-}
-
-=item GuarantornameSearch
-
-  ($count, $borrowers) = &GuarantornameSearch($env, $searchstring, $type);
-
-Looks up guarantor  by name.
-
-C<$env> is ignored.
-
-BUGFIX 499: C<$type> is now used to determine type of search.
-if $type is "simple", search is performed on the first letter of the
-surname only.
-
-C<$searchstring> is a space-separated list of search terms. Each term
-must match the beginning a borrower's surname, first name, or other
-name.
-
-C<&GuarantornameSearch> returns a two-element list. C<$borrowers> is a
-reference-to-array; each element is a reference-to-hash, whose keys
-are the fields of the C<borrowers> table in the Koha database.
-C<$count> is the number of elements in C<$borrowers>.
-
-return all info from guarantor =>only category_type A
-
-=cut
-
-#'
-#used by member enquiries from the intranet
-#called by guarantor_search.pl
-sub GuarantornameSearch {
-    my ( $env, $searchstring, $orderby, $type ) = @_;
-    my $dbh   = C4::Context->dbh;
-    my $query = "";
-    my $count;
-    my @data;
-    my @bind = ();
-
-    if ( $type eq "simple" )    # simple search for one letter only
-    {
-        $query =
-"Select * from borrowers,categories  where borrowers.categorycode=categories.categorycode and category_type='A'  and  surname like ? order by $orderby";
-        @bind = ("$searchstring%");
-    }
-    else    # advanced search looking in surname, firstname and othernames
-    {
-        @data  = split( ' ', $searchstring );
-        $count = @data;
-        $query = "Select * from borrowers,categories
-		where ((surname like ? or surname like ?
-		or firstname  like ? or firstname like ?
-		or othernames like ? or othernames like ?) and borrowers.categorycode=categories.categorycode and category_type='A' 
-		";
-        @bind = (
-            "$data[0]%", "% $data[0]%", "$data[0]%", "% $data[0]%",
-            "$data[0]%", "% $data[0]%"
-        );
-        for ( my $i = 1 ; $i < $count ; $i++ ) {
-            $query = $query . " and (" . " surname like ? or surname like ?
-                        or firstname  like ? or firstname like ?
-		        or othernames like ? or othernames like ?)";
-            push( @bind,
-                "$data[$i]%",   "% $data[$i]%", "$data[$i]%",
-                "% $data[$i]%", "$data[$i]%",   "% $data[$i]%" );
-
-            # FIXME - .= <<EOT;
-        }
-        $query = $query . ") or cardnumber like ?
-		order by $orderby";
-        push( @bind, $searchstring );
-
-        # FIXME - .= <<EOT;
-    }
-
-    my $sth = $dbh->prepare($query);
-    $sth->execute(@bind);
-    my @results;
-    my $cnt = $sth->rows;
-    while ( my $data = $sth->fetchrow_hashref ) {
-        push( @results, $data );
-    }
-
-    #  $sth->execute;
-    $sth->finish;
-    return ( $cnt, \@results );
-}
-
-
-=item findguarantees
-
-  ($num_children, $children_arrayref) = &findguarantees($parent_borrno);
-  $child0_cardno = $children_arrayref->[0]{"cardnumber"};
-  $child0_borrno = $children_arrayref->[0]{"borrowernumber"};
-
-C<&findguarantees> takes a borrower number (e.g., that of a patron
-with children) and looks up the borrowers who are guaranteed by that
-borrower (i.e., the patron's children).
-
-C<&findguarantees> returns two values: an integer giving the number of
-borrowers guaranteed by C<$parent_borrno>, and a reference to an array
-of references to hash, which gives the actual results.
-
-=cut
-#'
-sub findguarantees{
-  my ($bornum)=@_;
-  my $dbh = C4::Context->dbh;
-  my $sth=$dbh->prepare("select cardnumber,borrowernumber, firstname, surname from borrowers where guarantor=?");
-  $sth->execute($bornum);
-
-  my @dat;
-  while (my $data = $sth->fetchrow_hashref)
-  {
-    push @dat, $data;
-  }
-  $sth->finish;
-  return (scalar(@dat), \@dat);
-}
-
-=item findguarantor
-
-  $guarantor = &findguarantor($borrower_no);
-  $guarantor_cardno = $guarantor->{"cardnumber"};
-  $guarantor_surname = $guarantor->{"surname"};
-  ...
-
-C<&findguarantor> takes a borrower number (presumably that of a child
-patron), finds the guarantor for C<$borrower_no> (the child's parent),
-and returns the record for the guarantor.
-
-C<&findguarantor> returns a reference-to-hash. Its keys are the fields
-from the C<borrowers> database table;
-
-=cut
-#'
-sub findguarantor{
-  my ($bornum)=@_;
-  my $dbh = C4::Context->dbh;
-  my $sth=$dbh->prepare("select guarantor from borrowers where borrowernumber=?");
-  $sth->execute($bornum);
-  my $data=$sth->fetchrow_hashref;
-  $sth->finish;
-  $sth=$dbh->prepare("Select * from borrowers where borrowernumber=?");
-  $sth->execute($data->{'guarantor'});
-  $data=$sth->fetchrow_hashref;
-  $sth->finish;
-  return($data);
-}
-
-sub borrowercard_active {
-	my ($bornum) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("SELECT expiry FROM borrowers WHERE (borrowernumber = ?) AND (NOW() <= expiry)");
-	$sth->execute($bornum);
-	if (my $data=$sth->fetchrow_hashref){	
-	return ('1');
-	}else{
-	return ('0');
-	}
-}
-
-# Search the member photo, in case that photo doesn´t exists, return a default photo.for NEU
-sub getMemberPhoto {
-	my $cardnumber = shift @_;
- my $htdocs = C4::Context->config('opacdir');
-my $dirname = $htdocs."/htdocs/uploaded-files/users-photo/";
-#	my $dirname = "$ENV{'DOCUMENT_ROOT'}/uploaded-files/users-photo";
-	opendir(DIR, $dirname) or die "Can't open directory $dirname: $!";
-	while (defined(my $file = readdir(DIR))) {
-	   if ($file =~ /^$cardnumber\..+/){
-		   return "/uploaded-files/users-photo/$file";
-	   }
-	}
-	closedir(DIR);
-	return "http://cc.neu.edu.tr/stdpictures/".$cardnumber.".jpg";
-}
-
-sub change_user_pass {
-	my ($uid,$member,$digest) = @_;
-	my $dbh = C4::Context->dbh;
-	#Make sure the userid chosen is unique and not theirs if non-empty. If it is not,
-	#Then we need to tell the user and have them create a new one.
-	my $sth=$dbh->prepare("select * from borrowers where userid=? and borrowernumber <> ?");
-	$sth->execute($uid,$member);
-	if ( ($uid ne '') && ($sth->fetchrow) ) {
-		
-		return 0;
-   	 } else {
-		#Everything is good so we can update the information.
-		$sth=$dbh->prepare("update borrowers set userid=?, password=? where borrowernumber=?");
-    		$sth->execute($uid, $digest, $member);
-		return 1;
-	}
-
-}
-
-=head2 checkuniquemember (OUEST-PROVENCE)
-
-  $result = &checkuniquemember($collectivity,$surname,$categorycode,$firstname,$dateofbirth);
-
-Checks that a member exists or not in the database.
-
-C<&result> is 1 (=exist) or 0 (=does not exist)
-C<&collectivity> is 1 (= we add a collectivity) or 0 (= we add a physical member)
-C<&surname> is the surname
-C<&categorycode> is from categorycode table
-C<&firstname> is the firstname (only if collectivity=0)
-C<&dateofbirth> is the date of birth (only if collectivity=0)
-
-=cut
-sub checkuniquemember {
-    my ( $collectivity, $surname, $firstname, $dateofbirth ) = @_;
-    my $dbh = C4::Context->dbh;
-    my $request;
-    if ($collectivity) {
-
-# 				$request="select count(*) from borrowers where surname=? and categorycode=?";
-        $request =
-          "select borrowernumber,categorycode from borrowers where surname=? ";
-    }
-    else {
-
-# 				$request="select count(*) from borrowers where surname=? and categorycode=? and firstname=? and dateofbirth=?";
-        $request =
-"select borrowernumber,categorycode from borrowers where surname=?  and firstname=? and dateofbirth=?";
-    }
-    my $sth = $dbh->prepare($request);
-    if ($collectivity) {
-        $sth->execute( uc($surname) );
-    }
-    else {
-        $sth->execute( uc($surname), ucfirst($firstname), $dateofbirth );
-    }
-    my @data = $sth->fetchrow;
-    if ( $data[0] ) {
-        $sth->finish;
-        return $data[0], $data[1];
-
-        #
-    }
-    else {
-        $sth->finish;
-        return 0;
-    }
-}
-=head2 getzipnamecity (OUEST-PROVENCE)
-
-take all info from table city for the fields city and  zip
-check for the name and the zip code of the city selected
-
-=cut
-
-sub getzipnamecity {
-    my ($cityid) = @_;
-    my $dbh      = C4::Context->dbh;
-    my $sth      =
-      $dbh->prepare(
-        "select city_name,city_zipcode from cities where cityid=? ");
-    $sth->execute($cityid);
-    my @data = $sth->fetchrow;
-    return $data[0], $data[1];
-}
-
-=head2 updatechildguarantor (OUEST-PROVENCE)
-
-check for title,firstname,surname,adress,zip code and city  from guarantor to 
-guarantorchild
-
-=cut
-
-#'
-
-sub getguarantordata {
-    my ($borrowerid) = @_;
-    my $dbh          = C4::Context->dbh;
-    my $sth          =
-      $dbh->prepare(
-"Select title,firstname,surname,streetnumber,address,streettype,address2,zipcode,city,phone,phonepro,mobile,email,emailpro,fax  from borrowers where borrowernumber =? "
-      );
-    $sth->execute($borrowerid);
-    my $guarantor_data = $sth->fetchrow_hashref;
-    $sth->finish;
-    return $guarantor_data;
-}
-
-=head2 getdcity (OUEST-PROVENCE)
-recover cityid  with city_name condition
-=cut
-
-sub getidcity {
-    my ($city_name) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare("select cityid from cities where city_name=? ");
-    $sth->execute($city_name);
-    my $data = $sth->fetchrow;
-    return $data;
-}
-
-=head2 getcategorytype (OUEST-PROVENCE)
-
-check for the category_type with categorycode
-and return the category_type 
-
-=cut
-
-sub getcategorytype {
-    my ($categorycode) = @_;
-    my $dbh            = C4::Context->dbh;
-    my $sth            =
-      $dbh->prepare(
-"Select category_type,description from categories where categorycode=?  "
-      );
-    $sth->execute($categorycode);
-    my ( $category_type, $description ) = $sth->fetchrow;
-    return $category_type, $description;
-}
-
-
-
-
-
-
-
-# # A better approach might be to set borrowernumber autoincrement and 
-# 
- sub NewBorrowerNumber {
-   my $dbh = C4::Context->dbh;
-   my $sth=$dbh->prepare("Select max(borrowernumber) from borrowers");
-   $sth->execute;
-   my $data=$sth->fetchrow_hashref;
-   $sth->finish;
-   $data->{'max(borrowernumber)'}++;
-   return($data->{'max(borrowernumber)'});
- }
-
-=head2 ethnicitycategories
-
-  ($codes_arrayref, $labels_hashref) = &ethnicitycategories();
-
-Looks up the different ethnic types in the database. Returns two
-elements: a reference-to-array, which lists the ethnicity codes, and a
-reference-to-hash, which maps the ethnicity codes to ethnicity
-descriptions.
-
-=cut
-
-#'
-
-sub ethnicitycategories {
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare("Select code,name from ethnicity order by name");
-    $sth->execute;
-    my %labels;
-    my @codes;
-    while ( my $data = $sth->fetchrow_hashref ) {
-        push @codes, $data->{'code'};
-        $labels{ $data->{'code'} } = $data->{'name'};
-    }
-    $sth->finish;
-    return ( \@codes, \%labels );
-}
-
-=head2 fixEthnicity
-
-  $ethn_name = &fixEthnicity($ethn_code);
-
-Takes an ethnicity code (e.g., "european" or "pi") and returns the
-corresponding descriptive name from the C<ethnicity> table in the
-Koha database ("European" or "Pacific Islander").
-
-=cut
-
-#'
-
-sub fixEthnicity($) {
-
-    my $ethnicity = shift;
-    my $dbh       = C4::Context->dbh;
-    my $sth       = $dbh->prepare("Select name from ethnicity where code = ?");
-    $sth->execute($ethnicity);
-    my $data = $sth->fetchrow_hashref;
-    $sth->finish;
-    return $data->{'name'};
-}    # sub fixEthnicity
-
-
-
-=head2 get_age
-
-  $dateofbirth,$date = &get_age($date);
-
-this function return the borrowers age with the value of dateofbirth
-
-=cut
-#'
-sub get_age {
-    my ($date, $date_ref) = @_;
-
-    if (not defined $date_ref) {
-        $date_ref = get_today();
-    }
-
-    my ($year1, $month1, $day1) = split /-/, $date;
-    my ($year2, $month2, $day2) = split /-/, $date_ref;
-
-    my $age = $year2 - $year1;
-    if ($month1.$day1 > $month2.$day2) {
-        $age--;
-    }
-
-    return $age;
-}# sub get_age
-
-
-
-=head2 get_institutions
-  $insitutions = get_institutions();
-
-Just returns a list of all the borrowers of type I, borrownumber and name
-=cut
-
-#'
-sub get_institutions {
-    my $dbh = C4::Context->dbh();
-    my $sth =
-      $dbh->prepare(
-"SELECT borrowernumber,surname FROM borrowers WHERE categorycode=? ORDER BY surname"
-      );
-    $sth->execute('I');
-    my %orgs;
-    while ( my $data = $sth->fetchrow_hashref() ) {
-        $orgs{ $data->{'borrowernumber'} } = $data;
-    }
-    $sth->finish();
-    return ( \%orgs );
-
-}    # sub get_institutions
-
-=head2 add_member_orgs
-
-  add_member_orgs($borrowernumber,$borrowernumbers);
-
-Takes a borrowernumber and a list of other borrowernumbers and inserts them into the borrowers_to_borrowers table
-
-=cut
-
-#'
-sub add_member_orgs {
-    my ( $borrowernumber, $otherborrowers ) = @_;
-    my $dbh   = C4::Context->dbh();
-    my $query =
-      "INSERT INTO borrowers_to_borrowers (borrower1,borrower2) VALUES (?,?)";
-    my $sth = $dbh->prepare($query);
-    foreach my $bornum (@$otherborrowers) {
-        $sth->execute( $borrowernumber, $bornum );
-    }
-    $sth->finish();
-
-}    # sub add_member_orgs
-
-=head2 GetBorrowersFromSurname
-
-=over 4
-
-\@resutlts = GetBorrowersFromSurname($surname)
-this function get the list of borrower names like $surname.
-return :
-the table of results in @results
-
-=back
-
-=cut
-sub GetBorrowersFromSurname  {
-    my ($searchstring)=@_;
-    my $dbh = C4::Context->dbh;
-    $searchstring=~ s/\'/\\\'/g;
-    my @data=split(' ',$searchstring);
-    my $count=@data;
-    my $query = qq|
-        SELECT   surname,firstname
-        FROM     borrowers
-        WHERE    (surname like ?)
-        ORDER BY surname
-    |;
-    my $sth=$dbh->prepare($query);
-    $sth->execute("$data[0]%");
-    my @results;
-    my $count = 0;
-    while (my $data=$sth->fetchrow_hashref){
-         push(@results,$data);
-         $count++;
-    }
-     $sth->finish;
-     return ($count,\@results);
-}
-
-=head2 expand_sex_into_predicate
-
-  $data{&expand_sex_into_predicate($data{sex})} = 1;
-
-Converts a single 'M' or 'F' into 'sex_M_p' or 'sex_F_p'
-respectively.
-
-In some languages, 'M' and 'F' are not appropriate. However,
-with HTML::Template, there is no way to localize 'M' or 'F'
-unless these are converted into variables that TMPL_IF can
-understand. This function provides this conversion.
-
-=cut
-
-sub expand_sex_into_predicate ($) {
-   my($sex) = @_;
-   return "sex_${sex}_p";
-} # expand_sex_into_predicate
-1;

Index: C4/NewsChannels.pm
===================================================================
RCS file: C4/NewsChannels.pm
diff -N C4/NewsChannels.pm
--- C4/NewsChannels.pm	20 Oct 2006 01:20:56 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,388 +0,0 @@
-package C4::NewsChannels;
-
-# 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 C4::Context;
-use C4::Date;
-
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::NewsChannels - Functions to manage the news channels and its categories
-
-=head1 DESCRIPTION
-
-This module provides the functions needed to admin the news channels and its categories
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-  &news_channels &get_new_channel &del_channels &add_channel &update_channel
-  &news_channels_categories &get_new_channel_category &del_channels_categories
-  &add_channel_category &update_channel_category &news_channels_by_category
-&add_opac_new &upd_opac_new &del_opac_new &get_opac_new &get_opac_news
-  &add_opac_electronic &upd_opac_electronic &del_opac_electronic &get_opac_electronic &get_opac_electronics
-);
-
-
-=item news_channels
-
-  ($count, @channels) = &news_channels($channel_name, $id_category, $unclassified);
-
-Looks up news channels by name or category.
-
-C<$channel_name> is the channel name to search.
-
-C<$id_category> is the channel category code to search.
-
-C<$$unclassified> if it is set and $channel_name and $id_category search for the news channels without a category
-
-if none of the params are set C<&news_channels> returns all the news channels.
-
-C<&news_channels> returns two values: an integer giving the number of
-news channels found and a reference to an array
-of references to hash, which has the news_channels and news_channels_categories fields.
-
-=cut
-
-sub news_channels {
-	my ($channel_name, $id_category, $unclassified) = @_;
-	my $dbh = C4::Context->dbh;
-	my @channels;
-	my $query = "SELECT * FROM news_channels LEFT JOIN news_channels_categories ON news_channels.id_category = news_channels_categories.id_category";
-	if ( ($channel_name ne '') && ($id_category ne '') ) {
-		$query.= " WHERE channel_name like '" . $channel_name . "%' AND news_channels.id_category = " . $id_category;
-	} elsif ($channel_name ne '')  {
-		$query.= " WHERE channel_name like '" . $channel_name . "%'";
-	} elsif ($id_category ne '') {
-		$query.= " WHERE news_channels.id_category = " . $id_category;
-	} elsif ($unclassified) {
-		$query.= " WHERE news_channels.id_category IS NULL ";
-	}
-	my $sth = $dbh->prepare($query);
-	$sth->execute();
-	while (my $row = $sth->fetchrow_hashref) {
-		push @channels, $row;
-	}
-	$sth->finish;
-	return (scalar(@channels), @channels);
-}
-
-=item news_channels_by_category
-
-  ($count, @results) = &news_channels_by_category();
-
-Looks up news channels grouped by category.
-
-C<&news_channels_by_category> returns two values: an integer giving the number of
-categories found and a reference to an array
-of references to hash, which the following keys: 
-
-=over 4
-
-=item C<channels_count>
-
-The number of news channels in that category
-
-=item C<channels>
-
-A reference to an array of references to hash which keys are the new_channels fields. 
-
-Additionally the last index of results has a reference to all the news channels which don't have a category 
-
-=cut
-
-sub news_channels_by_category {
-	
-	my ($categories_count, @results) = &news_channels_categories();
-	foreach my $row (@results) {
-
-		my ($channels_count, @channels) = &news_channels('', $row->{'id_category'});
-		$row->{'channels_count'} = $channels_count;
-		$row->{'channels'} = \@channels;
-	}
-
-	my ($channels_count, @channels) = &news_channels('', '', 1);
-	my %row;
-	$row{'id_category'} = -1;
-	$row{'unclassified'} = 1;
-	$row{'channels_count'} = $channels_count;
-	$row{'channels'} = \@channels;
-	push @results, \%row;
-
-	return (scalar(@results), @results);
-}
-
-sub get_new_channel {
-	my ($id) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("SELECT * FROM news_channels WHERE id = ?");
-	$sth->execute($id);
-	my $channel = $sth->fetchrow_hashref;
-	$sth->finish;
-	return $channel;
-}
-
-sub del_channels {
-	my ($ids) = @_;
-	if ($ids ne '') {
-		my $dbh = C4::Context->dbh;
-		my $sth = $dbh->prepare("DELETE FROM news_channels WHERE id IN ($ids) ");
-		$sth->execute();
-		$sth->finish;
-		return $ids;
-	}
-	return 0;
-}
-
-sub add_channel {
-	my ($name, $url, $id_category, $notes) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("INSERT INTO news_channels (channel_name, url, id_category, notes) VALUES (?,?,?,?)");
-	$sth->execute($name, $url, $id_category, $notes);
-	$sth->finish;
-	return 1;
-}
-
-sub update_channel {
-	my ($id, $name, $url, $id_category, $notes) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("UPDATE news_channels SET channel_name = ?,  url = ?, id_category = ?, notes = ? WHERE id = ?");
-	$sth->execute($name, $url, $id_category, $notes, $id);
-	$sth->finish;
-	return 1;
-}
-
-sub news_channels_categories {
-	my $dbh = C4::Context->dbh;
-	my @categories;
-	my $query = "SELECT * FROM news_channels_categories";
-	my $sth = $dbh->prepare($query);
-	$sth->execute();
-	while (my $row = $sth->fetchrow_hashref) {
-		push @categories, $row;
-	}
-	$sth->finish;
-	return (scalar(@categories), @categories);
-
-}
-
-sub get_new_channel_category {
-	my ($id) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("SELECT * FROM news_channels_categories WHERE id_category = ?");
-	$sth->execute($id);
-	my $category = $sth->fetchrow_hashref;
-	$sth->finish;
-	return $category;
-}
-
-sub del_channels_categories {
-	my ($ids) = @_;
-	if ($ids ne '') {
-		my $dbh = C4::Context->dbh;
-		my $sth = $dbh->prepare("UPDATE news_channels SET id_category = NULL WHERE id_category IN ($ids) "); 
-		$sth->execute();
-		$sth = $dbh->prepare("DELETE FROM news_channels_categories WHERE id_category IN ($ids) ");
-		$sth->execute();
-		$sth->finish;
-		return $ids;
-	}
-	return 0;
-}
-
-sub add_channel_category {
-	my ($name) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("INSERT INTO news_channels_categories (category_name) VALUES (?)");
-	$sth->execute($name);
-	$sth->finish;
-	return 1;
-}
-
-sub update_channel_category {
-	my ($id, $name) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("UPDATE news_channels_categories SET category_name = ? WHERE id_category = ?");
-	$sth->execute($name, $id);
-	$sth->finish;
-	return 1;
-}
-
-
-sub add_opac_new {
-	my ($title, $new, $lang) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("INSERT INTO opac_news (title, new, lang) VALUES (?,?,?)");
-	$sth->execute($title, $new, $lang);
-	$sth->finish;
-	return 1;
-}
-
-sub upd_opac_new {
-	my ($idnew, $title, $new, $lang) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("UPDATE opac_news SET title = ?, new = ?, lang = ? WHERE idnew = ?");
-	$sth->execute($title, $new, $lang, $idnew);
-	$sth->finish;
-	return 1;
-}
-
-sub del_opac_new {
-	my ($ids) = @_;
-	if ($ids) {
-		my $dbh = C4::Context->dbh;
-		my $sth = $dbh->prepare("DELETE FROM opac_news WHERE idnew IN ($ids)");
-		$sth->execute();
-		$sth->finish;
-		return 1;
-	} else {
-		return 0;
-	}
-}
-
-sub get_opac_new {
-	my ($idnew) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("SELECT * FROM opac_news WHERE idnew = ?");
-	$sth->execute($idnew);
-	my $data = $sth->fetchrow_hashref;
-	$data->{$data->{'lang'}} = 1;
-	$sth->finish;
-	return $data;
-}
-
-sub get_opac_news {
-	my ($limit, $lang) = @_;
-	my $dbh = C4::Context->dbh;
-	my $query = "SELECT *, DATE_FORMAT(timestamp,'%Y-%m-%d') AS newdate FROM opac_news";
-	if ($lang) {
-		$query.= " WHERE lang = '" .$lang ."' ";
-	}
-	$query.= " ORDER BY timestamp DESC ";
-	#if ($limit) {
-	#	$query.= "LIMIT 0, " . $limit;
-	#}
-	my $sth = $dbh->prepare($query);
-	$sth->execute();
-	my @opac_news;
-	my $count = 0;
-	while (my $row = $sth->fetchrow_hashref) {
-		if ((($limit) && ($count < $limit)) || (!$limit)) {
-			$row->{'newdate'} = format_date($row->{'newdate'});
-			push @opac_news, $row;	
-		}
-		$count++;
-	}
-	return ($count, \@opac_news);
-}
-
-### get electronic databases
-
-sub add_opac_electronic {
-	my ($title, $edata, $lang,$image,$href,$section) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("INSERT INTO opac_electronic (title, edata, lang,image,href,section) VALUES (?,?,?,?,?,?)");
-	$sth->execute($title, $edata, $lang,$image,$href,$section);
-	$sth->finish;
-	return 1;
-}
-
-sub upd_opac_electronic {
-	my ($idelectronic, $title, $edata, $lang, $image, $href,$section) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("UPDATE opac_electronic SET title = ?, edata = ?, lang = ? , image=?, href=? ,section=? WHERE idelectronic = ?");
-	$sth->execute($title, $edata, $lang, $image,$href ,$section, $idelectronic);
-	$sth->finish;
-	return 1;
-}
-
-sub del_opac_electronic {
-	my ($ids) = @_;
-	if ($ids) {
-		my $dbh = C4::Context->dbh;
-		my $sth = $dbh->prepare("DELETE FROM opac_electronic WHERE idelectronic IN ($ids)");
-		$sth->execute();
-		$sth->finish;
-		return 1;
-	} else {
-		return 0;
-	}
-}
-
-sub get_opac_electronic {
-	my ($idelectronic) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("SELECT * FROM opac_electronic WHERE idelectronic = ?");
-	$sth->execute($idelectronic);
-	my $data = $sth->fetchrow_hashref;
-	$data->{$data->{'lang'}} = 1;
-	$data->{$data->{'section'}} = 1;
-	$sth->finish;
-	return $data;
-}
-
-sub get_opac_electronics {
-	my ($section, $lang) = @_;
-	my $dbh = C4::Context->dbh;
-	my $query = "SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d') AS newdate FROM opac_electronic";
-	if ($lang) {
-		$query.= " WHERE lang = '" .$lang ."' ";
-	}
-	if ($section) {
-		$query.= " and section= '" . $section."' ";
-	}
-	$query.= " ORDER BY title ";
-	
-	my $sth = $dbh->prepare($query);
-	$sth->execute();
-	my @opac_electronic;
-	my $count = 0;
-	while (my $row = $sth->fetchrow_hashref) {
-		$row->{'newdate'}=format_date($row->{'newdate'});
-			push @opac_electronic, $row;	
-
-		
-		$count++;
-	}
-
-	return ($count,\@opac_electronic);
-}
-END { }    # module clean-up code here (global destructor)
-
-=back
-
-=head1 AUTHOR
-
-TG
-
-=cut
-
-

Index: C4/Output.pm
===================================================================
RCS file: C4/Output.pm
diff -N C4/Output.pm
--- C4/Output.pm	6 Sep 2006 16:21:03 -0000	1.59
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,317 +0,0 @@
-package C4::Output;
-# $Id: Output.pm,v 1.59 2006/09/06 16:21:03 tgarip1957 Exp $
-
-#package to deal with marking up output
-#You will need to edit parts of this pm
-#set the value of path to be where your html lives
-
-
-# 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;
-require Exporter;
-
-use C4::Context;
-use HTML::Template::Pro;
-
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Output - Functions for managing templates
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-		&themelanguage &gettemplate setlanguagecookie pagination_bar
-		);
-
-#FIXME: this is a quick fix to stop rc1 installing broken
-#Still trying to figure out the correct fix.
-my $path = C4::Context->config('intrahtdocs')."/default/en/includes/";
-
-#---------------------------------------------------------------------------------------------------------
-# FIXME - POD
-sub gettemplate {
-	my ($tmplbase, $opac, $query) = @_;
-if (!$query){
-  warn "no query in gettemplate";
-  }
-	my $htdocs;
-	if ($opac ne "intranet") {
-		$htdocs = C4::Context->config('opachtdocs');
-	} else {
-		$htdocs = C4::Context->config('intrahtdocs');
-	}
-    my $path = C4::Context->preference('intranet_includes') || 'includes';
-#    warn "PATH : $path";
-my $filter=sub {
-#my $win=shift;
-$_=~s /\xef\xbb\xbf//g;
-};
-	my ($theme, $lang) = themelanguage($htdocs, $tmplbase, $opac, $query);
-	my $opacstylesheet = C4::Context->preference('opacstylesheet');
-	
-my $template = HTML::Template::Pro->new(filename      => "$htdocs/$theme/$lang/$tmplbase", case_sensitive=>1, 
-				   die_on_bad_params => 0,
-				   global_vars       => 1,
-				   path              => ["$htdocs/$theme/$lang/$path"]);
-
-	$template->param(themelang => ($opac ne 'intranet'? '/opac-tmpl': '/intranet-tmpl') . "/$theme/$lang",
-							interface => ($opac ne 'intranet'? '/opac-tmpl': '/intranet-tmpl'),
-							theme => $theme,
-							opacstylesheet => $opacstylesheet,
-							opaccolorstylesheet => C4::Context->preference('opaccolorstylesheet'),
-							opacsmallimage => C4::Context->preference('opacsmallimage'),
-							lang => $lang);
-
-        
-	return $template;
-}
-
-#---------------------------------------------------------------------------------------------------------
-# FIXME - POD
-sub themelanguage {
-  my ($htdocs, $tmpl, $section, $query) = @_;
-#   if (!$query) {
-#     warn "no query";
-#   }
-  my $dbh = C4::Context->dbh;
-  my @languages;
-  my @themes;
-my ($theme, $lang);
-  if ($section eq "intranet"){
-    $lang=$query->cookie('KohaOpacLanguage');
-
-  if ($lang){
-  
-    push @languages,$lang;
-    @themes = split " ", C4::Context->preference("template");
-  } 
-  else {
-    @languages = split " ", C4::Context->preference("opaclanguages");
-    @themes = split " ", C4::Context->preference("template");
-    }
- }else{
-   $lang=$query->cookie('KohaOpacLanguage');
-
-  if ($lang){
-  
-    push @languages,$lang;
-    @themes = split " ", C4::Context->preference("opacthemes");
-  } 
-  else {
-    @languages = split " ", C4::Context->preference("opaclanguages");
-    @themes = split " ", C4::Context->preference("opacthemes");
-    }
-}
-
-  
-# searches through the themes and languages. First template it find it returns.
-# Priority is for getting the theme right.
-  THEME:
-  foreach my $th (@themes) {
-    foreach my $la (@languages) {
-	for (my $pass = 1; $pass <= 2; $pass += 1) {
-	  $la =~ s/([-_])/ $1 eq '-'? '_': '-' /eg if $pass == 2;
-	  if (-e "$htdocs/$th/$la/$tmpl") {
-	      $theme = $th;
-	      $lang = $la;
-	      last THEME;
-	  }
-	last unless $la =~ /[-_]/;
-	}
-    }
-  }
-  if ($theme and $lang) {
-    return ($theme, $lang);
-  } else {
-    return ('default', 'en');
-  }
-}
-
-
-sub setlanguagecookie {
-   my ($query,$language,$uri)=@_;
-   my $cookie=$query->cookie(-name => 'KohaOpacLanguage',
-                                           -value => $language,
-					   -expires => '');
-   print $query->redirect(-uri=>$uri,
-   -cookie=>$cookie);
-}				   
-
-=item pagination_bar
-
-   pagination_bar($base_url, $nb_pages, $current_page, $startfrom_name)
-
-Build an HTML pagination bar based on the number of page to display, the
-current page and the url to give to each page link.
-
-C<$base_url> is the URL for each page link. The
-C<$startfrom_name>=page_number is added at the end of the each URL.
-
-C<$nb_pages> is the total number of pages available.
-
-C<$current_page> is the current page number. This page number won't become a
-link.
-
-This function returns HTML, without any language dependency.
-
-=cut
-
-sub pagination_bar {
-    my ($base_url, $nb_pages, $current_page, $startfrom_name) = @_;
-
-    # how many pages to show before and after the current page?
-    my $pages_around = 2;
-
-    my $url =
-        $base_url
-        .($base_url =~ m/&/ ? '&amp;' : '?')
-        .$startfrom_name.'='
-        ;
-
-    my $pagination_bar = '';
-
-    # current page detection
-    if (not defined $current_page) {
-        $current_page = 1;
-    }
-
-    # navigation bar useful only if more than one page to display !
-    if ($nb_pages > 1) {
-        # link to first page?
-        if ($current_page > 1) {
-            $pagination_bar.=
-                "\n".'&nbsp;'
-                .'<a href="'.$url.'1" rel="start">'
-                .'&lt;&lt;'
-                .'</a>'
-                ;
-        }
-        else {
-            $pagination_bar.=
-                "\n".'&nbsp;<span class="inactive">&lt;&lt;</span>';
-        }
-
-        # link on previous page ?
-        if ($current_page > 1) {
-            my $previous = $current_page - 1;
-
-            $pagination_bar.=
-                "\n".'&nbsp;'
-                .'<a href="'
-                .$url.$previous
-                .'" rel="prev">'
-                .'&lt;'
-                .'</a>'
-                ;
-        }
-        else {
-            $pagination_bar.=
-                "\n".'&nbsp;<span class="inactive">&lt;</span>';
-        }
-
-        my $min_to_display = $current_page - $pages_around;
-        my $max_to_display = $current_page + $pages_around;
-        my $last_displayed_page = undef;
-
-        for my $page_number (1..$nb_pages) {
-            if ($page_number == 1
-                or $page_number == $nb_pages
-                or ($page_number >= $min_to_display and $page_number <= $max_to_display)
-            ) {
-                if (defined $last_displayed_page
-                    and $last_displayed_page != $page_number - 1
-                ) {
-                    $pagination_bar.=
-                        "\n".'&nbsp;<span class="inactive">...</span>'
-                        ;
-                }
-
-                if ($page_number == $current_page) {
-                    $pagination_bar.=
-                        "\n".'&nbsp;'
-                        .'<span class="currentPage">'.$page_number.'</span>'
-                        ;
-                }
-                else {
-                    $pagination_bar.=
-                        "\n".'&nbsp;'
-                        .'<a href="'.$url.$page_number.'">'.$page_number.'</a>'
-                        ;
-                }
-                $last_displayed_page = $page_number;
-            }
-        }
-
-        # link on next page?
-        if ($current_page < $nb_pages) {
-            my $next = $current_page + 1;
-
-            $pagination_bar.=
-                "\n".'&nbsp;<a href="'.$url.$next.'" rel="next">'
-                .'&gt;'
-                .'</a>'
-                ;
-        }
-        else {
-            $pagination_bar.=
-                "\n".'&nbsp;<span class="inactive">&gt;</span>'
-                ;
-        }
-
-        # link to last page?
-        if ($current_page != $nb_pages) {
-            $pagination_bar.=
-                "\n".'&nbsp;<a href="'.$url.$nb_pages.'" rel="last">'
-                .'&gt;&gt;'
-                .'</a>'
-                ;
-        }
-        else {
-            $pagination_bar.=
-                "\n".'&nbsp;<span class="inactive">&gt;&gt;</span>';
-        }
-    }
-
-    return $pagination_bar;
-}
-
-
-END { }       # module clean-up code here (global destructor)
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: C4/Print.pm
===================================================================
RCS file: C4/Print.pm
diff -N C4/Print.pm
--- C4/Print.pm	20 Oct 2006 01:20:56 -0000	1.18
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,225 +0,0 @@
-package C4::Print; #assumes C4/Print.pm
-
-
-# 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;
-require Exporter;
-
-
-use C4::Context;
-use C4::Circulation::Circ2;
-use C4::Members;
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Print - Koha module dealing with printing
-
-=head1 SYNOPSIS
-
-  use C4::Print;
-
-=head1 DESCRIPTION
-
-The functions in this module handle sending text to a printer.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(&remoteprint &printreserve &printslip);
-
-=item remoteprint
-
-  &remoteprint($env, $items, $borrower);
-
-Prints the list of items in C<$items> to a printer.
-
-C<$env> is a reference-to-hash. C<$env-E<gt>{queue}> specifies the
-queue to print to; if it is empty or has the special value C<nulllp>,
-C<&remoteprint> will print to the file F</tmp/kohaiss>.
-
-C<$borrower> is a reference-to-hash giving information about a patron.
-This may be gotten from C<&getpatroninformation>. The patron's name
-will be printed in the output.
-
-C<$items> is a reference-to-list, where each element is a
-reference-to-hash describing a borrowed item. C<$items> may be gotten
-from C<&currentissues>.
-
-=cut
-#'
-# FIXME - It'd be nifty if this could generate pretty PostScript.
-sub remoteprint {
-  my ($env,$items,$borrower)=@_;
-
-  (return) unless (C4::Context->boolean_preference('printcirculationslips'));
-  my $queue = $env->{'queue'};
-  # FIXME - If 'queue' is undefined or empty, then presumably it should
-  # mean "use the default queue", whatever the default is. Presumably
-  # the default depends on the physical location of the machine.
-  # FIXME - Perhaps "print to file" should be a supported option. Just
-  # set the queue to "file" (or " file", if real queues aren't allowed
-  # to have spaces in them). Or perhaps if $queue eq "" and
-  # $env->{file} ne "", then that should mean "print to $env->{file}".
-  if ($queue eq "" || $queue eq 'nulllp') {
-    open (PRINTER,">/tmp/kohaiss");
-  } else {
-    # FIXME - This assumes that 'lpr' exists, and works as expected.
-    # This is a reasonable assumption, but only because every other
-    # printing package has a wrapper script called 'lpr'. It'd still
-    # be better to be able to customize this.
-    open(PRINTER, "| lpr -P $queue > /dev/null") or die "Couldn't write to queue:$queue!\n";
-  }
-#  print $queue;
-  #open (FILE,">/tmp/$file");
-  my $i=0;
-  my $brdata = $env->{'brdata'};	# FIXME - Not used
-  # FIXME - This is HLT-specific. Put this stuff in a customizable
-  # site-specific file somewhere.
-  print PRINTER "Horowhenua Library Trust\r\n";
-#  print PRINTER "$brdata->{'branchname'}\r\n";
-  print PRINTER "Phone: 368-1953\r\n";
-  print PRINTER "Fax:    367-9218\r\n";
-  print PRINTER "Email:  renewals\@library.org.nz\r\n\r\n\r\n";
-  print PRINTER "$borrower->{'cardnumber'}\r\n";
-  print PRINTER "$borrower->{'title'} $borrower->{'initials'} $borrower->{'surname'}\r\n";
-  # FIXME - Use   for ($i = 0; $items->[$i]; $i++)
-  # Or better yet,   foreach $item (@{$items})
-  while ($items->[$i]){
-#    print $i;
-    my $itemdata = $items->[$i];
-    # FIXME - This is just begging for a Perl format.
-    print PRINTER "$i $itemdata->{'title'}\r\n";
-    print PRINTER "$itemdata->{'barcode'}";
-    print PRINTER " "x15;
-    print PRINTER "$itemdata->{'date_due'}\r\n";
-    $i++;
-  }
-  print PRINTER "\r\n\r\n\r\n\r\n\r\n\r\n\r\n";
-  if ($env->{'printtype'} eq "docket"){
-    #print chr(27).chr(105);
-  }
-  close PRINTER;
-  #system("lpr /tmp/$file");
-}
-
-sub printreserve {
-  my($env, $branchname, $bordata, $itemdata)=@_;
-  my $file=time;
-  my $printer = $env->{'printer'};
-  (return) unless (C4::Context->boolean_preference('printreserveslips'));
-  if ($printer eq "" || $printer eq 'nulllp') {
-    open (PRINTER,">>/tmp/kohares");
-  } else {
-    open (PRINTER, "| lpr -P $printer >/dev/null") or die "Couldn't write to queue:$!\n";
-  }
-  my @da = localtime(time());
-  my $todaysdate = "$da[2]:$da[1]  $da[3]/$da[4]/$da[5]";
-
-#(1900+$datearr[5]).sprintf ("%0.2d", ($datearr[4]+1)).sprintf ("%0.2d", $datearr[3]);
-  my $slip = <<"EOF";
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Date: $todaysdate;
-
-ITEM RESERVED: 
-$itemdata->{'title'} ($itemdata->{'author'})
-barcode: $itemdata->{'barcode'}
-
-COLLECT AT: $branchname
-
-BORROWER:
-$bordata->{'surname'}, $bordata->{'firstname'}
-card number: $bordata->{'cardnumber'}
-Phone: $bordata->{'phone'}
-$bordata->{'streetaddress'}
-$bordata->{'suburb'}
-$bordata->{'town'}
-$bordata->{'emailaddress'}
-
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-EOF
-    print PRINTER $slip;
-  close PRINTER;
-  return $slip;
-}
-
-=item printslip
-
-  &printslip($env, $borrowernumber)
-
-  print a slip for the given $borrowernumber
-  
-=cut
-#'
-sub printslip {
-    my ($env,$borrowernumber)=@_;
-    my ($borrower, $flags) = getpatroninformation($env,$borrowernumber,0);
-    $env->{'todaysissues'}=1;
-    my ($borrowerissues) = currentissues($env, $borrower);
-    $env->{'nottodaysissues'}=1;
-    $env->{'todaysissues'}=0;
-    my ($borroweriss2)=currentissues($env, $borrower);
-    $env->{'nottodaysissues'}=0;
-    my $i=0;
-    my @issues;
-    foreach (sort {$a <=> $b} keys %$borrowerissues) {
-	$issues[$i]=$borrowerissues->{$_};
-	my $dd=$issues[$i]->{'date_due'};
-	#convert to nz style dates
-	#this should be set with some kinda config variable
-	my @tempdate=split(/-/,$dd);
-	$issues[$i]->{'date_due'}="$tempdate[2]/$tempdate[1]/$tempdate[0]";
-	$i++;
-    }
-    foreach (sort {$a <=> $b} keys %$borroweriss2) {
-	$issues[$i]=$borroweriss2->{$_};
-	my $dd=$issues[$i]->{'date_due'};
-	#convert to nz style dates
-	#this should be set with some kinda config variable
-	my @tempdate=split(/-/,$dd);
-	$issues[$i]->{'date_due'}="$tempdate[2]/$tempdate[1]/$tempdate[0]";
-	$i++;
-    }
-    remoteprint($env,\@issues,$borrower);
-}
-
-END { }       # module clean-up code here (global destructor)
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=head1 SEE ALSO
-
-C4::Circulation::Circ2(3)
-
-=cut

Index: C4/Reserves2.pm
===================================================================
RCS file: C4/Reserves2.pm
diff -N C4/Reserves2.pm
--- C4/Reserves2.pm	6 Sep 2006 16:21:03 -0000	1.49
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,762 +0,0 @@
-# -*- tab-width: 8 -*-
-# NOTE: This file uses standard 8-character tabs
-
-package C4::Reserves2;
-
-# $Id: Reserves2.pm,v 1.49 2006/09/06 16:21:03 tgarip1957 Exp $
-
-# Copyright 2000-2002 Katipo Communications
-#
-# This file is hard coded with koha-reserves table to be used only by the OPAC -TG.
-#
-# 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;
-require Exporter;
-
-use C4::Context;
-use C4::Search;
-use C4::Biblio;
-	# FIXME - C4::Reserves2 uses C4::Search, which uses C4::Reserves2.
-	# So Perl complains that all of the functions here get redefined.
-#use C4::Accounts;
-
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Reserves2 - FIXME
-
-=head1 SYNOPSIS
-
-  use C4::Reserves2;
-
-=head1 DESCRIPTION
-
-FIXME
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
-# FIXME Take out CalcReserveFee after it can be removed from opac-reserves.pl
- at EXPORT = qw(&FindReserves
-             &FindAllReserves
-		     &CheckReserves
- 		     &CheckWaiting
-		     &CancelReserve
-		     &CalcReserveFee
-		     &FillReserve
-		     &ReserveWaiting
-		     &CreateReserve
-		     &UpdateReserves
-		     &UpdateReserve
-		     &getreservetitle
-		     &Findgroupreserve
-			 &findActiveReserve
-		
-			);
-
-# make all your functions, whether exported or not;
-
-=item FindReserves
-
-  ($count, $results) = &FindReserves($biblionumber, $borrowernumber);
-
-Looks books up in the reserves. C<$biblionumber> is the biblionumber
-of the book to look up. C<$borrowernumber> is the borrower number of a
-patron whose books to look up.
-
-Either C<$biblionumber> or C<$borrowernumber> may be the empty string,
-but not both. If both are specified, C<&FindReserves> looks up the
-given book for the given patron. If only C<$biblionumber> is
-specified, C<&FindReserves> looks up that book for all patrons. If
-only C<$borrowernumber> is specified, C<&FindReserves> looks up all of
-that patron's reserves. If neither is specified, C<&FindReserves>
-barfs.
-
-C<&FindReserves> returns a two-element array:
-
-C<$count> is the number of elements in C<$results>.
-
-C<$results> is a reference-to-array; each element is a
-reference-to-hash, whose keys are (I think) all of the fields of the
-reserves, borrowers, and biblio tables of the Koha database.
-
-=cut
-#'
-sub FindReserves {
-	my ($bib, $bor) = @_;
-	my @params;
-
-	my $dbh = C4::Context->dbh;
-	# Find the desired items in the reserves
-	my $query="SELECT *, reserves.branchcode,  reserves.timestamp as rtimestamp,  DATE_FORMAT(reserves.timestamp, '%T')	AS time
-			   FROM reserves,borrowers,items ";
-	if ($bib ne ''){
-		#$bib = $dbh->quote($bib);
-		if ($bor ne ''){
-			# Both $bib and $bor specified
-			# Find a particular book for a particular patron
-			#$bor = $dbh->quote($bor);
-			$query .=  "WHERE (reserves.biblionumber = ?) and
-						      (borrowers.borrowernumber = ?) and
-						      (reserves.borrowernumber = borrowers.borrowernumber) and
-						    (reserves.itemnumber=items.itemnumber) and
-						      (cancellationdate IS NULL) and
-							  (found <> 1) ";
-						      
-						push @params, $bib, $bor;
-		} else {
-			# $bib specified, but not $bor
-			# Find a particular book for all patrons
-			$query .= "WHERE (reserves.borrowernumber = borrowers.borrowernumber) and
-					         (reserves.biblionumber = ?) and
-						    (reserves.itemnumber=items.itemnumber) and
-					         (cancellationdate IS NULL) and
-							 (found <> 1) ";
-
-							 push @params, $bib;
-		}
-	} else {
-		$query .= "WHERE (reserves.biblionumber = items.biblionumber) and
-		                 (borrowers.borrowernumber = ?) and
-					     (reserves.borrowernumber  = borrowers.borrowernumber) and
-						    (reserves.itemnumber=items.itemnumber) and
-					     (cancellationdate IS NULL) and
-					     (found <> 1)";
-
-						 push @params, $bor;
-	}
-	$query.=" order by reserves.timestamp";
-	my $sth = $dbh->prepare($query);
-	$sth->execute(@params);
-
-	my $i = 0;
-	my @results;
-	while (my $data = $sth->fetchrow_hashref){
-		my ($bibdata) =XMLgetbibliohash($dbh,$data->{'biblionumber'});
-		my ($itemhash)=XMLgetitemhash($dbh,$data->{'itemnumber'});
-		$data->{'holdingbranch'}=XML_readline_onerecord($itemhash,"holdingbranch","holdings");
-		$data->{'author'} =XML_readline_onerecord($bibdata,"author","biblios");
-		$data->{'publishercode'} = XML_readline_onerecord($bibdata,"publishercode","biblios");
-		$data->{'publicationyear'} = XML_readline_onerecord($bibdata,"publicationyear","biblios");
-		$data->{'title'} = XML_readline_onerecord($bibdata,"title","biblios");
-		push @results, $data;
-		$i++;
-	}
-	$sth->finish;
-
-	return($i,\@results);
-}
-
-=item FindAllReserves
-
-  ($count, $results) = &FindAllReserves($biblionumber, $borrowernumber);
-
-Looks books up in the reserves. C<$biblionumber> is the biblionumber
-of the book to look up. C<$borrowernumber> is the borrower number of a
-patron whose books to look up.
-
-Either C<$biblionumber> or C<$borrowernumber> may be the empty string,
-but not both. If both are specified, C<&FindReserves> looks up the
-given book for the given patron. If only C<$biblionumber> is
-specified, C<&FindReserves> looks up that book for all patrons. If
-only C<$borrowernumber> is specified, C<&FindReserves> looks up all of
-that patron's reserves. If neither is specified, C<&FindReserves>
-barfs.
-
-C<&FindAllReserves> returns a two-element array:
-
-C<$count> is the number of elements in C<$results>.
-
-C<$results> is a reference-to-array; each element is a
-reference-to-hash, whose keys are (I think) all of the fields of the
-reserves, borrowers, and biblio tables of the Koha database.
-
-=cut
-#'
-sub FindAllReserves {
-	my ($bib, $bor) = @_;
-	my @params;
-	
-my $dbh;
-
-	 $dbh = C4::Context->dbh;
-
-	# Find the desired items in the reserves
-	my $query="SELECT *,
-	                  reserves.branchcode,
-					  biblio.title AS btitle, 
-					  reserves.timestamp as rtimestamp,
-					  DATE_FORMAT(reserves.timestamp, '%T')	AS time
-			   FROM reserves,
-				    borrowers,
-                    biblio ";
-	if ($bib ne ''){
-		#$bib = $dbh->quote($bib);
-		if ($bor ne ''){
-			# Both $bib and $bor specified
-			# Find a particular book for a particular patron
-			#$bor = $dbh->quote($bor);
-			$query .=  "WHERE (reserves.biblionumber = ?) and
-						      (borrowers.borrowernumber = ?) and
-						      (reserves.borrowernumber = borrowers.borrowernumber) and
-						      (biblio.biblionumber = ?) and
-						      (cancellationdate IS NULL) and
-							  (found <> 1) and
-						      (reservefrom > NOW())";
-						push @params, $bib, $bor, $bib;
-		} else {
-			# $bib specified, but not $bor
-			# Find a particular book for all patrons
-			$query .= "WHERE (reserves.borrowernumber = borrowers.borrowernumber) and
-					         (biblio.biblionumber = ?) and
-					         (reserves.biblionumber = ?) and
-					         (cancellationdate IS NULL) and
-							 (found <> 1) and
-					         (reservefrom > NOW())";
-							 push @params, $bib, $bib;
-		}
-	} else {
-		$query .= "WHERE (reserves.biblionumber = biblio.biblionumber) and
-		                 (borrowers.borrowernumber = ?) and
-					     (reserves.borrowernumber  = borrowers.borrowernumber) and
-						 (reserves.biblionumber = biblio.biblionumber) and
-					     (cancellationdate IS NULL) and
-					     (found <> 1) and
-					     (reservefrom > NOW())";
-						 push @params, $bor;
-	}
-	$query.=" order by reserves.timestamp";
-	my $sth = $dbh->prepare($query);
-	$sth->execute(@params);
-
-	my $i = 0;
-	my @results;
-	while (my $data = $sth->fetchrow_hashref){
-		my $bibdata = C4::Search::bibdata($data->{'biblionumber'});
-		$data->{'author'} = $bibdata->{'author'};
-		$data->{'publishercode'} = $bibdata->{'publishercode'};
-		$data->{'publicationyear'} = $bibdata->{'publicationyear'};
-		$data->{'title'} = $bibdata->{'title'};
-		push @results, $data;
-		$i++;
-	}
-	$sth->finish;
-
-	return($i,\@results);
-}
-
-=item CheckReserves
-
-  ($status, $reserve) = &CheckReserves($itemnumber, $barcode);
-
-Find a book in the reserves.
-
-C<$itemnumber> is the book's item number. C<$barcode> is its barcode.
-Either one, but not both, may be false. If both are specified,
-C<&CheckReserves> uses C<$itemnumber>.
-
-$itemnubmer can be false, in which case uses the barcode. (Never uses
-both. $itemnumber gets priority).
-
-As I understand it, C<&CheckReserves> looks for the given item in the
-reserves. If it is found, that's a match, and C<$status> is set to
-C<Waiting>.
-
-Otherwise, it finds the most important item in the reserves with the
-same biblio number as this book (I'm not clear on this) and returns it
-with C<$status> set to C<Reserved>.
-
-C<&CheckReserves> returns a two-element list:
-
-C<$status> is either C<Waiting>, C<Reserved> (see above), or 0.
-
-C<$reserve> is the reserve item that matched. It is a
-reference-to-hash whose keys are mostly the fields of the reserves
-table in the Koha database.
-
-=cut
-#'
-sub CheckReserves {
-    my ($item, $barcode) = @_;
-#    warn "In CheckReserves: itemnumber = $item";
-    my $dbh = C4::Context->dbh;
-    my $sth;
-    if ($item) {
-	
-    } else {
-	my $qbc=$dbh->quote($barcode);
-	# Look up the item by barcode
-	$sth=$dbh->prepare("SELECT items.itemnumber
-                             FROM items
-                            WHERE  barcode=$qbc");
-	    $sth->execute;
-	($item) = $sth->fetchrow;
-    $sth->finish;
-    }
-
-    
-# if item is not for loan it cannot be reserved either.....
-#    return (0, 0) if ($notforloan);
-# get the reserves...
-    # Find this item in the reserves
-    my ($count, @reserves) = Findgroupreserve($item);
-    # $priority and $highest are used to find the most important item
-    # in the list returned by &Findgroupreserve. (The lower $priority,
-    # the more important the item.)
-    # $highest is the most important item we've seen so far.
-    my $priority = 10000000;
-    my $highest;
-    if ($count) {
-	foreach my $res (@reserves) {
-	   if ($res->{found} eq "W"){
-	   return ("Waiting", $res);
-		}else{
-		# See if this item is more important than what we've got
-		# so far.
-		if ($res->{'priority'} != 0 && $res->{'priority'} < $priority) {
-		    $priority = $res->{'priority'};
-		    $highest = $res;
-		}
-	   }
-	}
-    }
-
-    # If we get this far, then no exact match was found. Print the
-    # most important item on the list. I think this tells us who's
-    # next in line to get this book.
-    if ($highest) {	# FIXME - $highest might be undefined
-	$highest->{'itemnumber'} = $item;
-	return ("Reserved", $highest);
-    } else {
-	return (0, 0);
-    }
-}
-
-=item CancelReserve
-
-  &CancelReserve($reserveid);
-
-Cancels a reserve.
-
-Use reserveid to cancel the reservation.
-
-C<$reserveid> is the reserve ID to cancel.
-
-=cut
-#'
-sub CancelReserve {
-    my ($biblio, $item, $borr) = @_;
-
-my $dbh;
-
-	 $dbh = C4::Context->dbh;
-
-    #warn "In CancelReserve";
-    if (($item and $borr) and (not $biblio)) {
-		# removing a waiting reserve record....
-		# update the database...
-		my $sth = $dbh->prepare("update reserves set cancellationdate = now(),
-											found            = Null,
-											priority         = 0
-									where itemnumber       = ?
-										and borrowernumber   = ?");
-		$sth->execute($item,$borr);
-		$sth->finish;
-    }
-    if (($biblio and $borr) and (not $item)) {
-		# removing a reserve record....
-		# get the prioritiy on this record....
-		my $priority;
-		my $sth=$dbh->prepare("SELECT priority FROM reserves
-										WHERE biblionumber   = ?
-										AND borrowernumber = ?
-										AND cancellationdate is NULL
-										AND (found <> 1 )");
-		$sth->execute($biblio,$borr);
-		($priority) = $sth->fetchrow_array;
-		$sth->finish;
-
-		# update the database, removing the record...
-		 $sth = $dbh->prepare("update reserves set cancellationdate = now(),
-											found            = 0,
-											priority         = 0
-									where biblionumber     = ?
-										and borrowernumber   = ?
-										and cancellationdate is NULL
-										and (found <> 1 )");
-		$sth->execute($biblio,$borr);
-		$sth->finish;
-		# now fix the priority on the others....
-		fixpriority($priority, $biblio);
-    }
-}
-=item FillReserve
-
-  &FillReserve($reserveid, $itemnumber);
-
-Fill a reserve. If I understand this correctly, this means that the
-reserved book has been found and given to the patron who reserved it.
-
-C<$reserve> specifies the reserve id to fill. 
-
-C<$itemnumber> specifies the borrowed itemnumber for the reserve. 
-
-=cut
-#'
-sub FillReserve {
-    my ($res) = @_;
-my $dbh;
-	 $dbh = C4::Context->dbh;
-    # fill in a reserve record....
-    # FIXME - Remove some of the redundancy here
-    my $biblio = $res->{'biblionumber'}; my $qbiblio =$biblio;
-    my $borr = $res->{'borrowernumber'}; 
-    my $resdate = $res->{'reservedate'}; 
-
-    # get the priority on this record....
-    my $priority;
-    {
-    my $query = "SELECT priority FROM reserves
-                                WHERE biblionumber   = ?
-                                  AND borrowernumber = ?
-                                  AND reservedate    = ?";
-    my $sth=$dbh->prepare($query);
-    $sth->execute($qbiblio,$borr,$resdate);
-    ($priority) = $sth->fetchrow_array;
-    $sth->finish;
-    }
-
-    # update the database...
-    {
-    my $query = "UPDATE reserves SET found            = 1,
-                                     priority         = 0
-                               WHERE biblionumber     = ?
-                                 AND reservedate      = ?
-                                 AND borrowernumber   = ?";
-    my $sth = $dbh->prepare($query);
-    $sth->execute($qbiblio,$resdate,$borr);
-    $sth->finish;
-    }
-
-    # now fix the priority on the others (if the priority wasn't
-    # already sorted!)....
-    unless ($priority == 0) {
-	fixpriority($priority, $biblio);
-    }
-}
-
-# Only used internally
-# Decrements (makes more important) the reserves for all of the
-# entries waiting on the given book, if their priority is > $priority.
-sub fixpriority {
-    my ($priority, $biblio) =  @_;
-my $dbh;
- $dbh = C4::Context->dbh;
-
-    my ($count, $reserves) = FindReserves($biblio);
-    foreach my $rec (@$reserves) {
-	if ($rec->{'priority'} > $priority) {
-	    my $sth = $dbh->prepare("UPDATE reserves SET priority = ?
-                               WHERE biblionumber     = ?
-                                 AND borrowernumber   = ?
-                                 AND reservedate      = ?");
-	    $sth->execute($rec->{'priority'},$rec->{'biblionumber'},$rec->{'borrowernumber'},$rec->{'reservedate'});
-	    $sth->finish;
-	}
-    }
-}
-
-# XXX - POD
-sub ReserveWaiting {
-    my ($item, $borr) = @_;
-	
-my $dbh;
-
-	 $dbh = C4::Context->dbh;
-
-# get priority and biblionumber....
-    my $sth = $dbh->prepare("SELECT reserves.priority     as priority,
-                        reserves.biblionumber as biblionumber,
-                        reserves.branchcode   as branchcode,
-                        reserves.timestamp     as timestamp
-                      FROM reserves
-                     WHERE  reserves.itemnumber        = ?
-                       AND reserves.borrowernumber = ?
-                       AND reserves.cancellationdate is NULL
-                       AND (reserves.found <> '1' or reserves.found is NULL)");
-    $sth->execute($item,$borr);
-    my $data = $sth->fetchrow_hashref;
-    $sth->finish;
-    my $biblio = $data->{'biblionumber'};
-    my $timestamp = $data->{'timestamp'};
-# update reserves record....
-    $sth = $dbh->prepare("UPDATE reserves SET priority = 0, found = 'W'
-                            WHERE borrowernumber = ?
-                              AND itemnumber = ?
-                              AND timestamp = ?");
-    $sth->execute($borr,$item,$timestamp);
-    $sth->finish;
-# now fix up the remaining priorities....
-    fixpriority($data->{'priority'}, $biblio);
-    my $branchcode = $data->{'branchcode'};
-    return $branchcode;
-}
-
-# XXX - POD
-sub CheckWaiting {
-    my ($borr)=@_;
-	
-my $dbh;
-	 $dbh = C4::Context->dbh;
-    my @itemswaiting;
-    my $sth = $dbh->prepare("SELECT * FROM reserves
-                         WHERE borrowernumber = ?
-                           AND reserves.found = 'W'
-                           AND cancellationdate is NULL");
-    $sth->execute($borr);
-    while (my $data=$sth->fetchrow_hashref) {
-	  push(@itemswaiting,$data);
-    }
-    $sth->finish;
-    return (scalar(@itemswaiting),\@itemswaiting);
-}
-
-=item Findgroupreserve
-
-  ($count, @results) = &Findgroupreserve($biblioitemnumber, $biblionumber);
-
-I don't know what this does, because I don't understand how reserve
-constraints work. I think the idea is that you reserve a particular
-biblio, and the constraint allows you to restrict it to a given
-biblioitem (e.g., if you want to borrow the audio book edition of "The
-Prophet", rather than the first available publication).
-
-C<&Findgroupreserve> returns a two-element array:
-
-C<$count> is the number of elements in C<@results>.
-
-C<@results> is an array of references-to-hash whose keys are mostly
-fields from the reserves table of the Koha database, plus
-C<biblioitemnumber>.
-
-=cut
-#'
-sub Findgroupreserve {
-  my ($itemnumber)=@_;
-
-my	 $dbh = C4::Context->dbh;
-
-  my $sth = $dbh->prepare("SELECT *
-                           FROM reserves
-                           WHERE (itemnumber = ?) AND
-							     (cancellationdate IS NULL) AND
-			                     (found <> 1) 
-						   ORDER BY timestamp");
-  $sth->execute($itemnumber);
-  my @results;
-  while (my $data = $sth->fetchrow_hashref) {
-		push(@results,$data);
-  }
-  $sth->finish;
-  return(scalar(@results), at results);
-}
-
-# FIXME - A somewhat different version of this function appears in
-# C4::Reserves. Pick one and stick with it.
-# XXX - POD
-sub CreateReserve {
-	my ($env, $borrnum,$registeredby ,$biblionumber,$reservefrom, $reserveto, $branch, 
-	  $constraint, $priority, $notes, $title,$bibitems,$itemnumber) = @_;
-
-my 	 $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("INSERT INTO reserves
-								(borrowernumber, registeredby, reservedate, biblionumber, reservefrom, 
-								reserveto, branchcode, constrainttype, priority, found, reservenotes,itemnumber)
-  							VALUES (?, ?, NOW(),?,?,?,?,?,?,0,?,?)");
-    $sth->execute($borrnum, $registeredby, $biblionumber, $reservefrom, $reserveto, $branch, $constraint, $priority, $notes,$itemnumber);
-my $fee=CalcReserveFee($env,$borrnum,$biblionumber,$constraint,$bibitems);
- if ($fee > 0) {
-
-    my $nextacctno = &getnextacctno($env,$borrnum,$dbh);
-    my $usth = $dbh->prepare("insert into accountlines
-    (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding)
-						          values
-    (?,?,now(),?,?,'Res',?)");
-    $usth->execute($borrnum,$nextacctno,$fee,'Reserve Charge -'. $title,$fee);
-    $usth->finish;
-  }
-	return 1;
-}
-
-# FIXME - A functionally identical version of this function appears in
-# C4::Reserves. Pick one and stick with it.
-# XXX - Internal use only
-# FIXME - opac-reserves.pl need to use it, temporarily put into @EXPORT
-
-sub CalcReserveFee {
-  my ($env,$borrnum,$biblionumber,$constraint,$bibitems) = @_;
-  #check for issues;
-my	 $dbh = C4::Context->dbh;
-
-
-  my $const = lc substr($constraint,0,1);
-  my $sth = $dbh->prepare("SELECT * FROM borrowers,categories
-                WHERE (borrowernumber = ?)
-                  AND (borrowers.categorycode = categories.categorycode)");
-  $sth->execute($borrnum);
-  my $data = $sth->fetchrow_hashref;
-  $sth->finish();
-  my $fee = $data->{'reservefee'};
-  
-  if ($fee > 0) {
-    # check for items on issue
-   
-   
-    my $issues = 0;
-    my $x = 0;
-    my $allissued = 1;
-  
-      my $sth2 = $dbh->prepare("SELECT * FROM items
-                     WHERE biblionumber = ?");
-      $sth2->execute($biblionumber);
-      while (my $itdata=$sth2->fetchrow_hashref) {
-        my $sth3 = $dbh->prepare("SELECT * FROM issues
-                       WHERE itemnumber = ?
-                         AND returndate IS NULL");
-        $sth3->execute($itdata->{'itemnumber'});
-        if (my $isdata=$sth3->fetchrow_hashref) {
-	} else {
-	  $allissued = 0;
-	}
-      }
-
-    
-    if ($allissued == 0) {
-      my $rsth = $dbh->prepare("SELECT * FROM reserves WHERE biblionumber = ?");
-      $rsth->execute($biblionumber);
-      if (my $rdata = $rsth->fetchrow_hashref) {
-      } else {
-        $fee = 0;
-      }
-    }
-  }
-#  print "fee $fee";
- 
-  return $fee;
-}
-
-# XXX - Internal use
-sub getnextacctno {
-  my ($env,$bornumber,$dbh)=@_;
-  my $nextaccntno = 1;
-  my $sth = $dbh->prepare("select * from accountlines
-  where (borrowernumber = ?)
-  order by accountno desc");
-  $sth->execute($bornumber);
-  if (my $accdata=$sth->fetchrow_hashref){
-    $nextaccntno = $accdata->{'accountno'} + 1;
-  }
-  $sth->finish;
-  return($nextaccntno);
-}
-
-# XXX - POD
-sub UpdateReserves {
-    #subroutine to update a reserve
-    my ($rank,$biblio,$borrower,$branch,$cataloger)=@_;
-    return if $rank eq "W";
-    return if $rank eq "n";
-my $dbh;
-	 $dbh = C4::Context->dbh;
-
-    if ($rank eq "del") {
-	my $sth=$dbh->prepare("UPDATE reserves SET cancellationdate=now(),registeredby=?
-                                   WHERE biblionumber   = ?
-                                     AND borrowernumber = ?
-	                             AND cancellationdate is NULL
-                                     AND (found <> 1 )");
-	$sth->execute($cataloger,$biblio, $borrower);
-	$sth->finish;
-    } else {
-	my $sth=$dbh->prepare("UPDATE reserves SET priority = ? ,branchcode = ?,  found = 0
-                                   WHERE biblionumber   = ?
-                                     AND borrowernumber = ?
-	                             AND cancellationdate is NULL
-                                     AND (found <> 1)");
-	$sth->execute($rank, $branch, $biblio, $borrower);
-	$sth->finish;
-    }
-}
-
-# XXX - POD
-sub UpdateReserve {
-    #subroutine to update a reserve
-    my ($reserveid, $timestamp) = @_;
-
-my $dbh;
-	 $dbh = C4::Context->dbh;
-
-
-	my $sth=$dbh->prepare("UPDATE reserves 
-	                       SET timestamp = $timestamp,
-							   reservedate = DATE_FORMAT($timestamp, '%Y-%m-%d')
-                           WHERE (reserveid = $reserveid)");
-	$sth->execute();
-	$sth->finish;
-}
-
-# XXX - POD
-sub getreservetitle {
- my ($biblio,$bor,$date,$timestamp)=@_;
-my	 $dbh = C4::Context->dbh;
-
-
- my $sth=$dbh->prepare("Select * from reserveconstraints where
- reserveconstraints.biblionumber=? and reserveconstraints.borrowernumber
- = ? and reserveconstraints.reservedate=? and
- reserveconstraints.timestamp=?");
- $sth->execute($biblio,$bor,$date,$timestamp);
- my $data=$sth->fetchrow_hashref;
- $sth->finish;
- return($data);
-}
-
-sub findActiveReserve {
-	my ($borrowernumber, $biblionumber, $from, $days) = @_;
-my	 $dbh = C4::Context->dbh;
-
-	my $sth = $dbh->prepare("SELECT * 
-							FROM reserves 
-							WHERE 
-								borrowernumber = ? 
-								AND biblionumber = ? 
-								AND (cancellationdate IS NULL) 
-								AND (found <> 1) 
-								AND ((? BETWEEN reservefrom AND reserveto) 
-								OR (ADDDATE(?, INTERVAL ? DAY) BETWEEN reservefrom AND reserveto))
-							");
-	$sth->execute($borrowernumber, $biblionumber, $from, $from, $days);
-	return ($sth->rows);
-}
-
-1;
\ No newline at end of file

Index: C4/Review.pm
===================================================================
RCS file: C4/Review.pm
diff -N C4/Review.pm
--- C4/Review.pm	17 Jun 2006 22:28:24 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,196 +0,0 @@
-package C4::Review;
-
-# 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;
-require Exporter;
-use C4::Context;
-
-use vars qw($VERSION @ISA @EXPORT);
-
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Review - Perl Module containing routines for dealing with reviews of items
-
-=head1 SYNOPSIS
-
-  use C4::Review;
-
-
-  my $review=getreview($biblionumber,$borrowernumber);
-  savereview($biblionumber,$borrowernumber,$review);
-  updatereview($biblionumber,$borrowernumber,$review);
-  my $count=numberofreviews($biblionumber);
-  my $reviews=getreviews($biblionumber);
-  my $reviews=getallreviews($status);
-
-=head1 DESCRIPTION
-
-Review.pm provides many routines for manipulating reviews.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA    = qw(Exporter);
- at EXPORT = qw(getreview savereview updatereview numberofreviews
-  getreviews getallreviews approvereview deletereview);
-
-use vars qw();
-
-my $DEBUG = 0;
-
-=head2 getreview
-
-  $review = getreview($biblionumber,$borrowernumber);
-
-Takes a borrowernumber and a biblionumber and returns the review of that biblio
-
-
-=cut
-
-sub getreview {
-    my ( $biblionumber, $borrowernumber ) = @_;
-    my $dbh   = C4::Context->dbh;
-    my $query =
-      "SELECT * FROM reviews WHERE biblionumber=? and borrowernumber=?";
-    my $sth = $dbh->prepare($query);
-    $sth->execute( $biblionumber, $borrowernumber );
-    my $review = $sth->fetchrow_hashref();
-    $sth->finish();
-    return $review;
-}
-
-sub savereview {
-    my ( $biblionumber, $borrowernumber, $review ) = @_;
-    my $dbh   = C4::Context->dbh;
-    my $query = "INSERT INTO reviews (borrowernumber,biblionumber,
-	review,approved,datereviewed) VALUES 
-  (?,?,?,?,now())";
-    my $sth = $dbh->prepare($query);
-    $sth->execute( $borrowernumber, $biblionumber, $review, 0 );
-    $sth->finish();
-}
-
-sub updatereview {
-    my ( $biblionumber, $borrowernumber, $review ) = @_;
-    my $dbh   = C4::Context->dbh;
-    my $query = "UPDATE reviews SET review=?,datereviewed=now(),approved=?
-  WHERE borrowernumber=? and biblionumber=?";
-    my $sth = $dbh->prepare($query);
-    $sth->execute( $review, 0, $borrowernumber, $biblionumber );
-    $sth->finish();
-
-}
-
-sub numberofreviews {
-    my ($biblionumber) = @_;
-    my $dbh            = C4::Context->dbh;
-    my $query          =
-      "SELECT count(*) FROM reviews WHERE biblionumber=? and approved=?";
-    my $sth = $dbh->prepare($query);
-    $sth->execute( $biblionumber, 1 );
-    my $count = $sth->fetchrow_hashref;
-
-    $sth->finish();
-    return ( $count->{'count(*)'} );
-}
-
-sub getreviews {
-    my ( $biblionumber, $approved ) = @_;
-    my $dbh   = C4::Context->dbh;
-    my $query =
-"SELECT * FROM reviews WHERE biblionumber=? and approved=? order by datereviewed desc";
-    my $sth = $dbh->prepare($query) || warn $dbh->err_str;
-    $sth->execute( $biblionumber, $approved );
-    my @results;
-    while ( my $data = $sth->fetchrow_hashref() ) {
-        push @results, $data;
-    }
-    $sth->finish();
-    return ( \@results );
-}
-
-sub getallreviews {
-    my ($status) = @_;
-    my $dbh      = C4::Context->dbh;
-    my $query    =
-      "SELECT * FROM reviews WHERE approved=? order by datereviewed desc";
-    my $sth = $dbh->prepare($query);
-    $sth->execute($status);
-    my @results;
-    while ( my $data = $sth->fetchrow_hashref() ) {
-        push @results, $data;
-    }
-    $sth->finish();
-    return ( \@results );
-}
-
-=head2 approvereview
-
-  approvereview($reviewid);
-
-Takes a reviewid and marks that review approved
-
-
-=cut
-
-sub approvereview {
-    my ($reviewid) = @_;
-    my $dbh        = C4::Context->dbh();
-    my $query      = "UPDATE reviews
-               SET approved=?
-               WHERE reviewid=?";
-    my $sth = $dbh->prepare($query);
-    $sth->execute( 1, $reviewid );
-    $sth->finish();
-}
-
-=head2 deletereview
-
-  deletereview($reviewid);
-
-Takes a reviewid and deletes it
-
-
-=cut
-
-sub deletereview {
-    my ($reviewid) = @_;
-    my $dbh        = C4::Context->dbh();
-    my $query      = "DELETE FROM reviews
-               WHERE reviewid=?";
-    my $sth = $dbh->prepare($query);
-    $sth->execute($reviewid);
-    $sth->finish();
-}
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Team
-
-=cut

Index: C4/Search.pm
===================================================================
RCS file: C4/Search.pm
diff -N C4/Search.pm
--- C4/Search.pm	20 Oct 2006 01:20:56 -0000	1.126
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,1070 +0,0 @@
-package C4::Search;
-
-# 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;
-require Exporter;
-use C4::Context;
-use C4::Reserves2;
-use C4::Biblio;
-use ZOOM;
-use Encode;
-use C4::Date;
-
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.126 $' =~ /\d+/g;
-          shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
-
-=head1 NAME
-
-C4::Search - Functions for searching the Koha catalog and other databases
-
-=head1 SYNOPSIS
-
-  use C4::Search;
-
-  my ($count, @results) = catalogsearch4($env, $type, $search, $num, $offset);
-
-=head1 DESCRIPTION
-
-This module provides the searching facilities for the Koha catalog and
-ZEBRA databases.
-
-
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
- &barcodes   &ItemInfo &itemcount
- &getcoverPhoto &add_query_line
- &FindDuplicate   &ZEBRAsearch_kohafields &convertPQF &sqlsearch &cataloguing_search
-&getMARCnotes &getMARCsubjects &getMARCurls &getMARCadditional_authors &parsefields &spellSuggest);
-# make all your functions, whether exported or not;
-
-=head1
-ZEBRAsearchkohafields is the underlying API for searching zebra for KOHA internal use
-its kept similar to earlier version Koha Marc searches. instead of passing marc tags to the routine
-you pass named kohafields
-So you give an array of @kohafieldnames, at values, what relation they have @relations (equal, truncation etc) @and_or and
-you receive an array of XML records.
-The routine also has a flag $fordisplay and if it is set to 1 it will return the @results as an array of Perl hashes so that your previous
-search results templates do actually work.
-This routine will also take CCL,CQL or PQF queries and pass them straight to the server
-See sub FindDuplicates for an example;
-=cut
-
-
-
-
-sub ZEBRAsearch_kohafields{
-my ($kohafield,$value, $relation,$sort, $and_or, $fordisplay,$reorder,$startfrom,$number_of_results,$searchfrom,$searchtype)=@_;
-return (0,undef) unless (@$value[0]);
-
-my $server="biblioserver";
-my @results;
-my $attr;
-my $query;
-
-my $i;
-     unless($searchtype){
-	for ( $i=0; $i<=$#{$value}; $i++){
-	next if (@$value[$i] eq "");
-	my $keyattr=MARCfind_attr_from_kohafield(@$kohafield[$i]) if (@$kohafield[$i]);
-	if (!$keyattr){$keyattr=" \@attr 1=any";}
-	@$value[$i]=~ s/(\.|\?|\;|\=|\/|\\|\||\:|\*|\!|\,|\(|\)|\[|\]|\{|\}|\/|\")/ /g;
-	my $weighted=weightRank(@$kohafield[$i],@$value[$i],$i) unless($sort || $reorder);
-	$query.=$weighted.@$relation[$i]." ".$keyattr." \"".@$value[$i]."\" " if @$value[$i];
-	}
-	for (my $z= 0;$z<=$#{$and_or};$z++){
-	$query=@$and_or[$z]." ".$query if (@$value[$z+1] ne "");
-	}
-     }
-
-##warn $query;
-
-my @oConnection;
-($oConnection[0])=C4::Context->Zconn($server);
-my @sortpart;
-if ($reorder ){
- (@sortpart)=split /,/,$reorder;
-}elsif ($sort){
- (@sortpart)=split /,/,$sort;
-}
-if (@sortpart){
-##sortpart is expected to contain the form "title i<" notation or "title,1" both mean the same thing
-	if (@sortpart<2){
-	push @sortpart," "; ##In case multisort variable is coming as a single query
-	}
-	if ($sortpart[1]==2){
-	$sortpart[1]=">i"; ##Descending
-	}elsif ($sortpart[1]==1){
-	$sortpart[1]="<i"; ##Ascending
-	}
-}
-
-if ($searchtype){
-$query=convertPQF($searchtype,$oConnection[0],$value);
-}else{
-$query=new ZOOM::Query::PQF($query);
-}
-goto EXITING unless $query;## erronous query coming in
-$query->sortby($sortpart[0]." ".$sortpart[1]) if @sortpart;
-my $oResult;
-
-my $tried=0;
-
-my $numresults;
-
-retry:
-$oResult= $oConnection[0]->search($query);
-my $i;
-my $event;
-   while (($i = ZOOM::event(\@oConnection)) != 0) {
-	$event = $oConnection[$i-1]->last_event();
-	last if $event == ZOOM::Event::ZEND;
-   }# while
-	
-	 my($error, $errmsg, $addinfo, $diagset) = $oConnection[0]->error_x();
-	if ($error==10007 && $tried<3) {## timeout --another 30 looonng seconds for this update
-		$tried=$tried+1;
-		goto "retry";
-	}elsif ($error==2 && $tried<2) {## timeout --temporary zebra error !whatever that means
-		$tried=$tried+1;
-		goto "retry";
-	}elsif ($error){
-		warn "Error-$server    /errcode:, $error, /MSG:,$errmsg,$addinfo \n";	
-		$oResult->destroy();
-		$oConnection[0]->destroy();
-		return (undef,undef);
-	}
-my $dbh=C4::Context->dbh;
- $numresults=$oResult->size() ;
-
-   if ($numresults>0){
-	my $ri=0;
-	my $z=0;
-
-	$ri=$startfrom if $startfrom;
-		for ( $ri; $ri<$numresults ; $ri++){
-
-		my $xmlrecord=$oResult->record($ri)->raw();
-		$xmlrecord=Encode::decode("utf8",$xmlrecord);
-			 $xmlrecord=XML_xml2hash($xmlrecord);
-			$z++;
-
-			push @results,$xmlrecord;
-			last if ($number_of_results &&  $z>=$number_of_results);
-			
-	
-		}## for #numresults	
-			if ($fordisplay){
-			my ($facets, at parsed)=parsefields($dbh,$searchfrom, at results);
-			return ($numresults,$facets, at parsed)  ;
-			}
-    }# if numresults
-
-$oResult->destroy();
-$oConnection[0]->destroy();
-EXITING:
-return ($numresults, at results)  ;
-}
-
-sub weightRank {
-my ($kohafield,$value,$i)=@_;
-### If a multi query is received weighting is reduced from 1st query being highest rank to last query being lowest;
-my $weighted;
-my $weight=1000 -($i*100);
-$weight=100 if $weight==0;
-	return "" if $value eq "";
-	my $keyattr=MARCfind_attr_from_kohafield($kohafield) if ($kohafield);
-	return "" if($keyattr=~/4=109/ || $keyattr=~/4=4/ || $keyattr=~/4=5/); ###ranked sort not valid for numeric fields
-	my $fullfield; ### not all indexes are Complete-field. Use only for title||author
-	if ($kohafield eq "title" || $kohafield eq "" || $kohafield eq "any"){
-	$keyattr=" \@attr 1=title-cover";
- 	$fullfield="\@attr 6=3 ";
-	}elsif ($kohafield eq "author"){
-	$fullfield="\@attr 6=3 ";
-	}
-	$weighted.="\@attr 2=102 ".$keyattr." \@attr 3=1 $fullfield  \@attr 9=$weight \"".$value."\" " ;
-      $weighted=" \@or ".$weighted;
-  return $weighted;
-}
-sub convertPQF{
-# Convert CCL, CQF or PQF to ZEBRA RPN queries,trap errors
-my ($search_type,$zconn,$query)=@_;
-my $pqf_query;
-if ($search_type eq "pqf"){
-eval{
-$pqf_query=new ZOOM::Query::PQF(@$query[0]);
-};
-}elsif ($search_type eq "ccl"){
-
-my $cclfile=C4::Context->config("ccl2rpn");
-$zconn->option(cclfile=>$cclfile);## CCL conversion file path
-eval{
-$pqf_query=new ZOOM::Query::CCL2RPN(@$query[0],$zconn);
-};
-}elsif ($search_type eq "cql"){
-eval{
-$pqf_query=new ZOOM::Query::CQL(@$query[0]);
-};
-}
-if ($@){
-$pqf_query=0;
-}
-
-return $pqf_query;
-}
-
-
-=item add_bold_fields
-After a search the searched keyword is <b>boldened</b> in the displayed search results if it exists in the title or author
-It is now depreceated 
-=cut
-sub add_html_bold_fields {
-	my ($type, $data, $search) = @_;
-	foreach my $key ('title', 'author') {
-		my $new_key; 
-		
-			$new_key = 'bold_' . $key;
-			$data->{$new_key} = $data->{$key};	
-		my $key1;
-	
-			$key1 = $key;
-		
-
-		my @keys;
-		my $i = 1;
-		if ($type eq 'keyword') {
-		my $newkey=$search->{'keyword'};
-		$newkey=~s /\++//g;
-		@keys = split " ", $newkey;
-		} 
-		my $count = @keys;
-		for ($i = 0; $i < $count ; $i++) {
-			
-				if (($data->{$new_key} =~ /($keys[$i])/i) && (lc($keys[$i]) ne 'b') ) {
-					my $word = $1;
-					$data->{$new_key} =~ s/$word/<b>$word<\/b>/;
-				}
-			
-		}
-	}
-
-
-}
- sub sqlsearch{
-## This searches the SQL database only for biblionumber,itemnumber,barcode
-### Not very useful on production but as a debug tool useful during system maturing for ZEBRA operations
-
-my ($dbh,$search)=@_;
-my $sth;
-if ($search->{'barcode'} ne '') {
-	$sth=$dbh->prepare("SELECT biblionumber from items  where  barcode=?");
-	$sth->execute($search->{'barcode'});
-}elsif ($search->{'itemnumber'} ne '') {
-	$sth=$dbh->prepare("SELECT biblionumber from items  where itemnumber=?");
-	$sth->execute($search->{'itemnumber'});
-}elsif ($search->{'biblionumber'} ne '') {
-	$sth=$dbh->prepare("SELECT biblionumber from biblio where biblionumber=?");
-	$sth->execute($search->{'biblionumber'});
-}else{
-return (undef,undef);
-}
-
- my $result=$sth->fetchrow_hashref;
-return (1,$result) if $result;
-}
-
-sub cataloguing_search{
-## This is an SQL based search designed to be used when adding a new biblio incase library sets
-## preference zebraorsql to sql when adding a new biblio
-my ($search,$num,$offset) = @_;
-	my ($count, at results);
-my $dbh=C4::Context->dbh;
-#Prepare search
-my $query;
-my $condition="select SQL_CALC_FOUND_ROWS marcxml from biblio where ";
-if ($search->{'isbn'} ne''){
-$search->{'isbn'}=$search->{'isbn'}."%";
-$query=$search->{'isbn'};
-$condition.= "  isbn like ?  ";
-}else{
-return (0,undef) unless $search->{title};
-$query=$search->{'title'};
-$condition.= "  MATCH (title) AGAINST(? in BOOLEAN MODE )  ";
-}
-my $sth=$dbh->prepare($condition);
-$sth->execute($query);
- my $nbresult=$dbh->prepare("SELECT FOUND_ROWS()");
- $nbresult->execute;
- my $count=$nbresult->fetchrow;
-my $limit = $num + $offset;
-my $startfrom = $offset;
-my $i=0;
-my @results;
-while (my $marc=$sth->fetchrow){
-	if (($i >= $startfrom) && ($i < $limit)) {
-	my $record=XML_xml2hash_onerecord($marc);
-	my $data=XMLmarc2koha_onerecord($dbh,$record,"biblios");
-	push @results,$data;
-	}
-$i++;
-last if $i==$limit;
-}
-return ($count, at results);
-}
-
-
-
-sub FindDuplicate {
-	my ($xml)=@_;
-my $dbh=C4::Context->dbh;
-	my ($result) = XMLmarc2koha_onerecord($dbh,$xml,"biblios");
-	my @kohafield;
-	my @value;
-	my @relation;
-	my  @and_or;
-	
-	# search duplicate on ISBN, easy and fast..
-
-	if ($result->{isbn}) {
-	push @kohafield,"isbn";
-###Temporary fix for ISBN
-my $isbn=$result->{isbn};
-$isbn=~ s/(\.|\?|\;|\=|\/|\\|\||\:|\!|\'|,|\-|\"|\*|\(|\)|\[|\]|\{|\}|\/)//g;
-		push @value,$isbn;
-			}else{
-$result->{title}=~s /\\//g;
-$result->{title}=~s /\"//g;
-$result->{title}=~ s/(\.|\?|\;|\=|\/|\\|\||\:|\*|\!|\,|\-|\(|\)|\[|\]|\{|\}|\/)/ /g;
-	
-	push @kohafield,"title";
-	push @value,$result->{title};
-	push @relation,"\@attr 6=3 \@attr 4=1 \@attr 5=1"; ## right truncated,phrase,whole field
-
-	}
-	my ($total, at result)=ZEBRAsearch_kohafields(\@kohafield,\@value,\@relation,"",\@and_or,0,"",0,1);
-if ($total){
-my $title=XML_readline($result[0],"title","biblios") ;
-my $biblionumber=XML_readline($result[0],"biblionumber","biblios") ;
-		return $biblionumber,$title ;
-}
-
-}
-
-
-sub add_query_line {
-
-	my ($type,$search,$results)=@_;
-	my $dbh = C4::Context->dbh;
-	my $searchdesc = '';
-	my $from;
-	my $borrowernumber = $search->{'borrowernumber'};
-	my $remote_IP =	$search->{'remote_IP'};
-	my $remote_URL=	$search->{'remote_URL'};
-	my $searchdesc = $search->{'searchdesc'};
-	
-my $sth = $dbh->prepare("INSERT INTO phrase_log(phr_phrase,phr_resultcount,phr_ip,user,actual) VALUES(?,?,?,?,?)");
-	
-
-$sth->execute($searchdesc,$results,$remote_IP,$borrowernumber,$remote_URL);
-$sth->finish;
-
-}
-
-
-=item ItemInfo
-
-  @results = &ItemInfo($env, $biblionumber, $type);
-
-Returns information about books with the given biblionumber.
-
-C<$type> may be either C<intra> or anything else. If it is not set to
-C<intra>, then the search will exclude lost, very overdue, and
-withdrawn items.
-
-C<$env> is ignored.
-
-C<&ItemInfo> returns a list of references-to-hash. Each element
-contains a number of keys. Most of them are table items from the
-C<biblio>, C<biblioitems>, C<items>, and C<itemtypes> tables in the
-Koha database. Other keys include:
-
-=over 4
-
-=item C<$data-E<gt>{branchname}>
-
-The name (not the code) of the branch to which the book belongs.
-
-=item C<$data-E<gt>{datelastseen}>
-
-This is simply C<items.datelastseen>, except that while the date is
-stored in YYYY-MM-DD format in the database, here it is converted to
-DD/MM/YYYY format. A NULL date is returned as C<//>.
-
-=item C<$data-E<gt>{datedue}>
-
-=item C<$data-E<gt>{class}>
-
-This is the concatenation of C<biblioitems.classification>, the book's
-Dewey code, and C<biblioitems.subclass>.
-
-=item C<$data-E<gt>{ocount}>
-
-I think this is the number of copies of the book available.
-
-=item C<$data-E<gt>{order}>
-
-If this is set, it is set to C<One Order>.
-
-=back
-
-=cut
-#'
-sub ItemInfo {
-	my ($dbh,$data) = @_;
-	my $i=0;
-	my @results;
-my ($date_due, $count_reserves);
-		my $datedue = '';
-		my $isth=$dbh->prepare("Select issues.*,borrowers.cardnumber from issues,borrowers where itemnumber = ? and returndate is null and issues.borrowernumber=borrowers.borrowernumber");
-		$isth->execute($data->{'itemnumber'});
-		if (my $idata=$isth->fetchrow_hashref){
-		$data->{borrowernumber} = $idata->{borrowernumber};
-		$data->{cardnumber} = $idata->{cardnumber};
-		$datedue = format_date($idata->{'date_due'});
-		}
-		if ($datedue eq '' || $datedue eq "0000-00-00"){
-		$datedue="";
-			my ($restype,$reserves)=C4::Reserves2::CheckReserves($data->{'itemnumber'});
-			if ($restype) {
-				$count_reserves = $restype;
-			}
-		}
-		$isth->finish;
-	#get branch information.....
-		my $bsth=$dbh->prepare("SELECT * FROM branches WHERE branchcode = ?");
-		$bsth->execute($data->{'holdingbranch'});
-		if (my $bdata=$bsth->fetchrow_hashref){
-			$data->{'branchname'} = $bdata->{'branchname'};
-		}
-		
-		$data->{'datelastseen'}=format_date($data->{'datelastseen'});
-		$data->{'datedue'}=$datedue;
-		$data->{'count_reserves'} = $count_reserves;
-	# get notforloan complete status if applicable
-		my ($tagfield,$tagsub)=MARCfind_marc_from_kohafield("notforloan","holdings");
-		my $sthnflstatus = $dbh->prepare("select authorised_value from holdings_subfield_structure where tagfield='$tagfield' and tagsubfield='$tagsub'");
-		$sthnflstatus->execute;
-		my ($authorised_valuecode) = $sthnflstatus->fetchrow;
-		if ($authorised_valuecode) {
-			$sthnflstatus = $dbh->prepare("select lib from authorised_values where category=? and authorised_value=?");
-			$sthnflstatus->execute($authorised_valuecode,$data->{itemnotforloan});
-			my ($lib) = $sthnflstatus->fetchrow;
-			$data->{notforloan} = $lib;
-		}
-
-# my shelf procedures
-		my ($tagfield,$tagsubfield)=MARCfind_marc_from_kohafield("shelf","holdings");
-		
-		my $shelfstatus = $dbh->prepare("select authorised_value from holdings_subfield_structure where tagfield='$tagfield' and tagsubfield='$tagsubfield'");
-$shelfstatus->execute;
-		$authorised_valuecode = $shelfstatus->fetchrow;
-		if ($authorised_valuecode) {
-			$shelfstatus = $dbh->prepare("select lib from authorised_values where category=? and authorised_value=?");
-			$shelfstatus->execute($authorised_valuecode,$data->{shelf});
-			
-			my ($lib) = $shelfstatus->fetchrow;
-			$data->{shelf} = $lib;
-		}
-		
-	
-
-	return($data);
-}
-
-
-
-
-
-=item barcodes
-
-  @barcodes = &barcodes($biblioitemnumber);
-
-Given a biblioitemnumber, looks up the corresponding items.
-
-Returns an array of references-to-hash; the keys are C<barcode> and
-C<itemlost>.
-
-The returned items include very overdue items, but not lost ones.
-
-=cut
-#'
-sub barcodes{
-    #called from request.pl 
-    my ($biblionumber)=@_;
-#warn $biblionumber;
-    my $dbh = C4::Context->dbh;
-	my @kohafields;
-	my @values;
-	my @relations;
-	my $sort;
-	my @and_or;
-	my @fields;
-	push @kohafields, "biblionumber";
-	push @values,$biblionumber;
-	push @relations, " "," \@attr 2=1"; ## selecting wthdrawn less then 1
-	push @and_or, "\@and";
-		$sort="";
-	my ($count, at results)=ZEBRAsearch_kohafields(\@kohafields,\@values,\@relations,$sort,\@and_or,"","");
-push  @fields,"barcode","itemlost","itemnumber","date_due","wthdrawn","notforloan";
-	my ($biblio, at items)=XMLmarc2koha($dbh,$results[0],"holdings", @fields); 
-return(@items);
-}
-
-
-
-
-
-sub getMARCnotes {
-##Requires a MARCXML as $record
-        my ($dbh, $record, $marcflavour) = @_;
-
-	my ($mintag, $maxtag);
-	if (uc($marcflavour) eq uc"MARC21" || uc($marcflavour) eq "USMARC") {
-	        $mintag = "500";
-		$maxtag = "599";
-	} else {           # assume unimarc if not marc21
-		$mintag = "300";
-		$maxtag = "399";
-	}
-	my @marcnotes=();
-	
-	foreach my $field ($mintag..$maxtag) {
-	my %line;
-	my @values=XML_readline_asarray($record,"","",$field,"");
-	foreach my $value (@values){
-	$line{MARCNOTE}=$value if $value;
-	push @marcnotes,\%line if $line{MARCNOTE};	
-	}
-	}
-
-	my $marcnotesarray=\@marcnotes;
-        return $marcnotesarray;
-	
-}  # end getMARCnotes
-
-
-sub getMARCsubjects {
-
-    my ($dbh, $record, $marcflavour) = @_;
-	my ($mintag, $maxtag);
-	if (uc($marcflavour) eq uc"MARC21" || uc($marcflavour) eq "USMARC") {
-	        $mintag = "600";
-		$maxtag = "699";
-	} else {           # assume unimarc if not marc21
-		$mintag = "600";
-		$maxtag = "619";
-	}
-	my @marcsubjcts;
-	my $subjct = "";
-	my $subfield = "";
-	my $marcsubjct;
-
-	foreach my $field ($mintag..$maxtag) {
-		my @value =XML_readline_asarray($record,"","",$field,"a");
-			foreach my $subject (@value){
-		        $marcsubjct = {MARCSUBJCT => $subject,};
-			push @marcsubjcts, $marcsubjct;
-			}
-		
-	}
-	my $marcsubjctsarray=\@marcsubjcts;
-        return $marcsubjctsarray;
-}  #end getMARCsubjects
-
-
-sub getMARCurls {
-    my ($dbh, $record, $marcflavour) = @_;
-	my ($mintag, $maxtag);
-	if (uc($marcflavour) eq uc"MARC21" || uc($marcflavour) eq "USMARC") {
-	        $mintag = "856";
-		$maxtag = "856";
-	} else {           # assume unimarc if not marc21
-		$mintag = "600";
-		$maxtag = "619";
-	}
-
-	my @marcurls;
-	my $url = "";
-	my $subfil = "";
-	my $marcurl;
-	my $value;
-	foreach my $field ($mintag..$maxtag) {
-		my @value =XML_readline_asarray($record,"","",$field,"u");
-			foreach my $url (@value){
-				if ( $value ne $url) {
-		    	   	 $marcurl = {MARCURL => $url,};
-				push @marcurls, $marcurl;
-				 $value=$url;
-				}
-			}
-	}
-
-
-	my $marcurlsarray=\@marcurls;
-        return $marcurlsarray;
-}  #end getMARCurls
-
-sub getMARCadditional_authors {
-    my ($dbh, $record, $marcflavour) = @_;
-	my ($mintag, $maxtag);
-	if (uc($marcflavour) eq uc"MARC21" || uc($marcflavour) eq "USMARC") {
-	        $mintag = "700";
-		$maxtag = "700";
-	} else {           # assume unimarc if not marc21
-###FIX ME Correct tag to UNIMARC additional authors
-		$mintag = "200";
-		$maxtag = "200";
-	}
-
-	my @marcauthors;
-	
-	my $subfil = "";
-	my $marcauth;
-	my $value;
-	foreach my $field ($mintag..$maxtag) {
-		my @value =XML_readline_asarray($record,"","",$field,"a");
-			foreach my $author (@value){
-				if ( $value ne $author) {
-		    	   	 $marcauth = {MARCAUTHOR => $author,};
-				push @marcauthors, $marcauth;
-				 $value=$author;
-				}
-			}
-	}
-
-
-	my $marcauthsarray=\@marcauthors;
-        return $marcauthsarray;
-}  #end getMARCurls
-
-sub parsefields{
-#pass this a  MARC record and it will parse it for display purposes
-my ($dbh,$intranet, at marcrecords)=@_;
-my @results;
-my @items;
-my $retrieve_from=C4::Context->preference('retrieve_from');
-#Build brancnames hash  for displaying in OPAC - more user friendly
-#find branchname
-#get branch information.....
-my %branches;
-		my $bsth=$dbh->prepare("SELECT branchcode,branchname FROM branches");
-		$bsth->execute();
-		while (my $bdata=$bsth->fetchrow_hashref){
-			$branches{$bdata->{'branchcode'}}= $bdata->{'branchname'};
-		}
-
-#Building shelving hash if library has shelves defined like junior section, non-fiction, audio-visual room etc
-my %shelves;
-#find shelvingname
-my ($tagfield,$tagsubfield)=MARCfind_marc_from_kohafield("shelf","holdings");
-my $shelfstatus = $dbh->prepare("select authorised_value from holdings_subfield_structure where tagfield='$tagfield' and tagsubfield='$tagsubfield'");
-		$shelfstatus->execute;		
-		my ($authorised_valuecode) = $shelfstatus->fetchrow;
-		if ($authorised_valuecode) {
-			$shelfstatus = $dbh->prepare("select lib,authorised_value from authorised_values where category=? ");
-			$shelfstatus->execute($authorised_valuecode);			
-			while (my $lib = $shelfstatus->fetchrow_hashref){
-			$shelves{$lib->{'authorised_value'}} = $lib->{'lib'};
-			}
-		}
-my $even=1;
-### FACETED RESULTS
-    my $facets_counter = ();
-    my $facets_info = ();
-   my @facets_loop; # stores the ref to array of hashes for template
-
-foreach my $xml(@marcrecords){
-
-	if (C4::Context->preference('useFacets')){
-	($facets_counter,$facets_info)=FillFacets($xml,$facets_counter,$facets_info);
-	}
-my @kohafields; ## just name those necessary for the result page
-push @kohafields, "biblionumber","title","author","publishercode","classification","subclass","itemtype","copyrightdate", "holdingbranch","date_due","location","shelf","itemcallnumber","notforloan","itemlost","wthdrawn";
-my ($oldbiblio, at itemrecords) = XMLmarc2koha($dbh,$xml,"", at kohafields);
-my $bibliorecord;
-
-my %counts;
-
-$counts{'total'}=0;
-my $noitems    = 1;
-my $norequests = 1;
-		##Loop for each item field
-				
-			foreach my $item (@itemrecords) {
- 				$norequests = 0 unless $item->{'itemnotforloan'};
-				$noitems = 0;
-				my $status;
-				#renaming some fields according to templates
-				$item->{'branchname'}=$branches{$item->{'holdingbranch'}};
-				$item->{'shelves'}=$shelves{$item->{'shelf'}};
-				$status="Lost" if ($item->{'itemlost'}>0);
-				$status="Withdrawn" if ($item->{'wthdrawn'}>0);
-				if ($intranet eq "intranet"){ ## we give full itemcallnumber detail in intranet
-				$status="Due:".format_date($item->{'date_due'}) if ($item->{'date_due'} gt "0000-00-00");
- 				$status = $item->{'holdingbranch'}."-".$item->{'shelf'}."[".$item->{'itemcallnumber'}."]" unless defined $status;
- 				}else{
-				$status="On Loan" if ($item->{'date_due'} gt "0000-00-00");
-				  $status = $item->{'branchname'}."[".$item->{'shelves'}."]" unless defined $status;
-				}
-				
-				$counts{$status}++;
-				$counts{'total'}++;
-			}	
-		$oldbiblio->{'noitems'} = $noitems;
-		$oldbiblio->{'norequests'} = $norequests;
-		$oldbiblio->{'even'} = $even;
-		$even= not $even;
-			if ($even){
-			$oldbiblio->{'toggle'}="#ffffcc";
-			} else {
-			$oldbiblio->{'toggle'}="white";
-			} ; ## some forms seems to use toggle
-			
-		$oldbiblio->{'itemcount'} = $counts{'total'};
-		my $totalitemcounts = 0;
-		foreach my $key (keys %counts){
-			if ($key ne 'total'){	
-				$totalitemcounts+= $counts{$key};
-				$oldbiblio->{'locationhash'}->{$key}=$counts{$key};
-				
-			}
-		}
-		my ($locationtext, $locationtextonly, $notavailabletext) = ('','','');
-		foreach (sort keys %{$oldbiblio->{'locationhash'}}) {
-
-			if ($_ eq 'notavailable') {
-				$notavailabletext="Not available";
-				my $c=$oldbiblio->{'locationhash'}->{$_};
-				$oldbiblio->{'not-available-p'}=$c;
-			} else {
-				$locationtext.="$_";
-				my $c=$oldbiblio->{'locationhash'}->{$_};
-				if ($_ eq 'Lost') {
-					$oldbiblio->{'lost-p'} = $c;
-				} elsif ($_ eq 'Withdrawn') {
-					$oldbiblio->{'withdrawn-p'} = $c;
-				} elsif ($_  =~/\^Due:/) {
-
-					$oldbiblio->{'on-loan-p'} = $c;
-				} else {
-					$locationtextonly.= $_;
-					$locationtextonly.= " ($c)<br> " if $totalitemcounts > 1;
-				}
-				if ($totalitemcounts>1) {
-					$locationtext.=" ($c)<br> ";
-				}
-			}
-		}
-		if ($notavailabletext) {
-			$locationtext.= $notavailabletext;
-		} else {
-			$locationtext=~s/, $//;
-		}
-		$oldbiblio->{'location'} = $locationtext;
-		$oldbiblio->{'location-only'} = $locationtextonly;
-		$oldbiblio->{'use-location-flags-p'} = 1;
-	push @results,$oldbiblio;
-   
-}## For each record received
- at facets_loop=BuildFacets($facets_counter,$facets_info,%branches);
-
-	return(@facets_loop, at results);
-}
-
-sub FillFacets{
-my ($facet_record,$facets_counter,$facets_info)=@_;
-  my $facets = C4::Koha::getFacets(); 
-	for (my $k=0; $k<@$facets;$k++) {
-		my $tags=@$facets->[$k]->{tags};
-		my $subfields=@$facets->[$k]->{subfield};
-                        	my @fields;
-                        	      for (my $i=0; $i<@$tags;$i++) {
-			my $type="biblios";
-			$type="holdings" if @$facets->[$k]->{'link_value'} =~/branch/; ## if using other facets from items add them here
-			if ($type eq "holdings"){
-			###Read each item record
-			my $holdings=$facet_record->{holdings}->[0]->{record};
-			       foreach my $holding(@$holdings){
-				 for (my $z=0; $z<@$subfields;$z++) {
-				my $data=XML_readline_onerecord($holding,"","holdings",@$tags[$i],@$subfields[$z]);
-				$facets_counter->{ @$facets->[$k]->{'link_value'} }->{ $data }++ if $data;    
-				}
-			      }
-			}else{
-			       for (my $z=0; $z<@$subfields;$z++) {
-			      my $data=XML_readline($facet_record,"","biblios",@$tags[$i],@$subfields[$z]);
-			       $facets_counter->{ @$facets->[$k]->{'link_value'} }->{ $data }++ if $data;   
-			      }                         	
-                        		}  
-		     }    
-                        	$facets_info->{ @$facets->[$k]->{'link_value'} }->{ 'label_value' } = @$facets->[$k]->{'label_value'};
-                        	$facets_info->{ @$facets->[$k]->{'link_value'} }->{ 'expanded' } = @$facets->[$k]->{'expanded'};
-            	}
-return ($facets_counter,$facets_info);
-}
-
-sub BuildFacets {
-my ($facets_counter, $facets_info,%branches) = @_;
-
-    my @facets_loop; # stores the ref to array of hashes for template
-# BUILD FACETS
-    foreach my $link_value ( sort { $facets_counter->{$b} <=> $facets_counter->{$a} } keys %$facets_counter) {
-        my $expandable;
-        my $number_of_facets;
-        my @this_facets_array;
-        foreach my $one_facet ( sort { $facets_counter->{ $link_value }->{$b} <=> $facets_counter->{ $link_value }->{$a} }  keys %{$facets_counter->{$link_value}} ) {
-            $number_of_facets++;
-            if (($number_of_facets < 11) ||  ($facets_info->{ $link_value }->{ 'expanded'})) {
-
-                # sanitize the link value ), ( will cause errors with CCL
-                my $facet_link_value = $one_facet;
-                $facet_link_value =~ s/(\(|\))/ /g;
-
-                # fix the length that will display in the label
-                my $facet_label_value = $one_facet;
-                $facet_label_value = substr($one_facet,0,20)."..." unless length($facet_label_value)<=20;
-                # well, if it's a branch, label by the name, not the code
-                if ($link_value =~/branch/) {
-                    $facet_label_value = $branches{$one_facet};
-                }
-
-                # but we're down with the whole label being in the link's title
-                my $facet_title_value = $one_facet;
-
-                push @this_facets_array ,
-                ( { facet_count => $facets_counter->{ $link_value }->{ $one_facet },
-                    facet_label_value => $facet_label_value,
-                    facet_title_value => $facet_title_value,
-                    facet_link_value => $facet_link_value,
-                    type_link_value => $link_value,
-                    },
-                );
-             }## if $number_of_facets
-        }##for $one_facet
-        unless ($facets_info->{ $link_value }->{ 'expanded'}) {
-            $expandable=1 if ($number_of_facets > 10);
-        }
-        push @facets_loop,(
-         { type_link_value => $link_value,
-            type_id => $link_value."_id",
-            type_label  => $facets_info->{ $link_value }->{ 'label_value' },
-            facets => \@this_facets_array,
-            expandable => $expandable,
-            expand => $link_value,
-            },
-        );	
-       
- }
-return \@facets_loop;
-}
-
-
-sub getcoverPhoto {
-## return the address of a cover image if defined otherwise the amazon cover images
-	my $record =shift  ;
-
-	my $image=XML_readline_onerecord($record,"coverphoto","biblios");
-	if ($image){
-	return $image;
-	}
-# if there is no image put the amazon cover image adress
-
-my $isbn=XML_readline_onerecord($record,"isbn","biblios");
-return "http://images.amazon.com/images/P/".$isbn.".01.MZZZZZZZ.jpg";	
-}
-
-=item itemcount
-
-  ($count, $lcount, $nacount, $fcount, $scount, $lostcount,
-  $mending, $transit,$ocount) =
-    &itemcount($env, $biblionumber, $type);
-
-Counts the number of items with the given biblionumber, broken down by
-category.
-
-C<$env> is ignored.
-
-If C<$type> is not set to C<intra>, lost, very overdue, and withdrawn
-items will not be counted.
-
-C<&itemcount> returns a nine-element list:
-
-C<$count> is the total number of items with the given biblionumber.
-
-C<$lcount> is the number of items at the Levin branch.
-
-C<$nacount> is the number of items that are neither borrowed, lost,
-nor withdrawn (and are therefore presumably on a shelf somewhere).
-
-C<$fcount> is the number of items at the Foxton branch.
-
-C<$scount> is the number of items at the Shannon branch.
-
-C<$lostcount> is the number of lost and very overdue items.
-
-C<$mending> is the number of items at the Mending branch (being
-mended?).
-
-C<$transit> is the number of items at the Transit branch (in transit
-between branches?).
-
-C<$ocount> is the number of items that haven't arrived yet
-(aqorders.quantity - aqorders.quantityreceived).
-
-=cut
-#'
-
-
-
-sub itemcount {
-  my ($env,$bibnum,$type)=@_;
-  my $dbh = C4::Context->dbh;
-my @kohafield;
-my @value;
-my @relation;
-my @and_or;
-my $sort;
-  my $query="Select * from items where
-  biblionumber=? ";
-push @kohafield,"biblionumber";
-push @value,$bibnum;
- 
-my ($total, at result)=ZEBRAsearch_kohafields(\@kohafield,\@value, \@relation,"", \@and_or, 0);## there is only one record no need for $num or $offset
-my @fields;## extract only the fields required
-push @fields,"itemnumber","itemlost","wthdrawn","holdingbranch","date_due";
-my ($biblio, at items)=XMLmarc2koha ($dbh,$result[0],"holdings",\@fields);
-  my $count=0;
-  my $lcount=0;
-  my $nacount=0;
-  my $fcount=0;
-  my $scount=0;
-  my $lostcount=0;
-  my $mending=0;
-  my $transit=0;
-  my $ocount=0;
- foreach my $data(@items){
-    if ($type ne "intra"){
-  next if ($data->{itemlost} || $data->{wthdrawn});
-    }  ## Probably trying to hide lost item from opac ?
-    $count++;
-   
-## Now it seems we want to find those which are onloan 
-    
-
-    if ( $data->{date_due} gt "0000-00-00"){
-       $nacount++;
-	next;
-    } 
-### The rest of this code is hardcoded for Foxtrot Shanon etc. We urgently need a global understanding of these terms--TG
-      if ($data->{'holdingbranch'} eq 'C' || $data->{'holdingbranch'} eq 'LT'){
-        $lcount++;
-      }
-      if ($data->{'holdingbranch'} eq 'F' || $data->{'holdingbranch'} eq 'FP'){
-        $fcount++;
-      }
-      if ($data->{'holdingbranch'} eq 'S' || $data->{'holdingbranch'} eq 'SP'){
-        $scount++;
-      }
-      if ($data->{'itemlost'} eq '1'){
-        $lostcount++;
-      }
-      if ($data->{'itemlost'} eq '2'){
-        $lostcount++;
-      }
-      if ($data->{'holdingbranch'} eq 'FM'){
-        $mending++;
-      }
-      if ($data->{'holdingbranch'} eq 'TR'){
-        $transit++;
-      }
-  
-  }
-#  if ($count == 0){
-    my $sth2=$dbh->prepare("Select * from aqorders where biblionumber=?");
-    $sth2->execute($bibnum);
-    if (my $data=$sth2->fetchrow_hashref){
-      $ocount=$data->{'quantity'} - $data->{'quantityreceived'};
-    }
-#    $count+=$ocount;
-
-  return ($count,$lcount,$nacount,$fcount,$scount,$lostcount,$mending,$transit,$ocount);
-}
-
-sub spellSuggest {
-my ($kohafield,$value)=@_;
- if (@$kohafield[0] eq "title" || @$kohafield[0] eq "author" || @$kohafield eq  "subject"){
-## pass them through
-}else{
-  @$kohafield[0]="any";
-}
-my $kohaattr=MARCfind_attr_from_kohafield(@$kohafield[0]);
-@$value[0]=~ s/(\.|\?|\;|\=|\/|\\|\||\:|\*|\!|\,|\(|\)|\[|\]|\{|\}|\/)/ /g;
-my $query= $kohaattr." \@attr 6=3 \"".@$value[0]."\"";
-my @zconn;
- $zconn[0]=C4::Context->Zconn("biblioserver");
-$zconn[0]->option(number=>5);
-my $result=$zconn[0]->scan_pqf($query);
-my $i;
-my $event;
-   while (($i = ZOOM::event(\@zconn)) != 0) {
-	$event = $zconn[$i-1]->last_event();
-	last if $event == ZOOM::Event::ZEND;
-   }# whilemy $i;
-
-my $n=$result->size();
-
-my @suggestion;
-for (my $i=0; $i<$n; $i++){
-my ($term,$occ)=$result->term($i);
-push @suggestion, {kohafield=>@$kohafield[0], value=>$term,occ=>$occ} unless $term=~/\@/;
-}
-$zconn[0]->destroy();
-return @suggestion;
-}
-END { }       # module clean-up code here (global destructor)
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-# New functions to comply with ZEBRA search and new KOHA 3 XML API added 2006 Tumer Garip tgarip at neu.edu.tr
-
-=cut

Index: C4/Serials.pm
===================================================================
RCS file: C4/Serials.pm
diff -N C4/Serials.pm
--- C4/Serials.pm	15 Nov 2006 01:36:00 -0000	1.11
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,1819 +0,0 @@
-package C4::Serials; #assumes C4/Serials.pm
-
-# 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
-
-# $Id: Serials.pm,v 1.11 2006/11/15 01:36:00 tgarip1957 Exp $
-
-use strict;
-use C4::Date;
-use C4::Suggestions;
-use C4::Biblio;
-use C4::Search;
-use C4::Letters;
-require Exporter;
-
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.11 $' =~ /\d+/g;
-        shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
-
-
-=head1 NAME
-
-C4::Serials - Give functions for serializing.
-
-=head1 SYNOPSIS
-
-  use C4::Serials;
-
-=head1 DESCRIPTION
-
-Give all XYZ functions
-
-=head1 FUNCTIONS
-
-=cut
- at ISA = qw(Exporter);
- at EXPORT = qw(
-    &NewSubscription &ModSubscription &DelSubscription &GetSubscriptions &GetSubscription
-    &CountSubscriptionFromBiblionumber &GetSubscriptionsFromBiblionumber 
-    &GetFullSubscriptionsFromBiblionumber &GetNextSeq
-    &ModSubscriptionHistory &NewIssue 
-    &GetSerials &GetLatestSerials &ModSerialStatus
-    &HasSubscriptionExpired &GetSubscriptionExpirationDate &ReNewSubscription
-    &GetSuppliersWithLateIssues &GetLateIssues &GetMissingIssues
-    &GetDistributedTo &SetDistributedto 
-    &getroutinglist &delroutingmember &addroutingmember &reorder_members
-    &check_routing &getsupplierbyserialid &updateClaim &removeMissingIssue &abouttoexpire
-    &Get_Next_Date
-);
-
-=head2 GetSuppliersWithLateIssues
-
-=over 4
-
-%supplierlist = &GetSuppliersWithLateIssues
-
-this function get all suppliers with late issues.
-
-return :
-the supplierlist into a hash. this hash containts id & name of the supplier
-
-=back
-
-=cut
-sub GetSuppliersWithLateIssues {
-    my $dbh = C4::Context->dbh;
-    my $query = qq|
-        SELECT DISTINCT id, name
-        FROM            subscription, serial
-        LEFT JOIN       aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id
-        WHERE           subscription.subscriptionid = serial.subscriptionid
-        AND             (planneddate < now() OR serial.STATUS = 3 OR serial.STATUS = 4)
-    |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute;
-    my %supplierlist;
-    while (my ($id,$name) = $sth->fetchrow) {
-        $supplierlist{$id} = $name;
-    }
-    if(C4::Context->preference("RoutingSerials")){
-	$supplierlist{''} = "All Suppliers";
-    }
-    return %supplierlist;
-}
-
-=head2 GetLateIssues
-
-=over 4
-
- at issuelist = &GetLateIssues($supplierid)
-
-this function select late issues on database
-
-return :
-the issuelist into an table. Each line of this table containts a ref to a hash which it containts
-name,title,planneddate,serialseq,serial.subscriptionid from tables : subscription, serial & biblio
-
-=back
-
-=cut
-sub GetLateIssues {
-    my ($supplierid) = shift;
-    my $dbh = C4::Context->dbh;
-    my $sth;
-    if ($supplierid) {
-        my $query = qq |
-            SELECT     name,title,planneddate,serialseq,serial.subscriptionid
-            FROM       subscription, serial, biblio
-            LEFT JOIN  aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id
-            WHERE      subscription.subscriptionid = serial.subscriptionid
-            AND        ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3)
-            AND        subscription.aqbooksellerid=$supplierid
-            AND        biblio.biblionumber = subscription.biblionumber
-            ORDER BY   title
-        |;
-        $sth = $dbh->prepare($query);
-    } else {
-        my $query = qq|
-            SELECT     name,title,planneddate,serialseq,serial.subscriptionid
-            FROM       subscription, serial, biblio
-            LEFT JOIN  aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id
-            WHERE      subscription.subscriptionid = serial.subscriptionid
-            AND        ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3)
-            AND        biblio.biblionumber = subscription.biblionumber
-            ORDER BY   title
-        |;
-        $sth = $dbh->prepare($query);
-    }
-    $sth->execute;
-    my @issuelist;
-    my $last_title;
-    my $odd=0;
-    my $count=0;
-    while (my $line = $sth->fetchrow_hashref) {
-        $odd++ unless $line->{title} eq $last_title;
-        $line->{title} = "" if $line->{title} eq $last_title;
-        $last_title = $line->{title} if ($line->{title});
-        $line->{planneddate} = format_date($line->{planneddate});
-        $line->{'odd'} = 1 if $odd %2 ;
-	$count++;
-        push @issuelist,$line;
-    }
-    return $count, at issuelist;
-}
-
-=head2 GetSubscriptionHistoryFromSubscriptionId
-
-=over 4
-
-$sth = GetSubscriptionHistoryFromSubscriptionId()
-this function just prepare the SQL request.
-After this function, don't forget to execute it by using $sth->execute($subscriptionid)
-return :
-$sth = $dbh->prepare($query).
-
-=back
-
-=cut
-sub GetSubscriptionHistoryFromSubscriptionId() {
-    my $dbh = C4::Context->dbh;
-    my $query = qq|
-        SELECT *
-        FROM   subscriptionhistory
-        WHERE  subscriptionid = ?
-    |;
-    return $dbh->prepare($query);
-}
-
-=head2 GetSerialStatusFromSerialId
-
-=over 4
-
-$sth = GetSerialStatusFromSerialId();
-this function just prepare the SQL request.
-After this function, don't forget to execute it by using $sth->execute($serialid)
-return :
-$sth = $dbh->prepare($query).
-
-=back
-
-=cut
-sub GetSerialStatusFromSerialId(){
-    my $dbh = C4::Context->dbh;
-    my $query = qq|
-        SELECT status
-        FROM   serial
-        WHERE  serialid = ?
-    |;
-    return $dbh->prepare($query);
-}
-
-
-=head2 GetSubscription
-
-=over 4
-
-$subs = GetSubscription($subscriptionid)
-this function get the subscription which has $subscriptionid as id.
-return :
-a hashref. This hash containts
-subscription, subscriptionhistory, aqbudget.bookfundid, biblio.title
-
-=back
-
-=cut
-sub GetSubscription {
-    my ($subscriptionid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query =qq(
-        SELECT  subscription.*,
-                subscriptionhistory.*,
-                aqbudget.bookfundid,
-                aqbooksellers.name AS aqbooksellername,
-                biblio.title AS bibliotitle
-       FROM subscription
-       LEFT JOIN subscriptionhistory ON subscription.subscriptionid=subscriptionhistory.subscriptionid
-       LEFT JOIN aqbudget ON subscription.aqbudgetid=aqbudget.aqbudgetid
-       LEFT JOIN aqbooksellers ON subscription.aqbooksellerid=aqbooksellers.id
-       LEFT JOIN biblio ON biblio.biblionumber=subscription.biblionumber
-       WHERE subscription.subscriptionid = ?
-    );
-    my $sth = $dbh->prepare($query);
-    $sth->execute($subscriptionid);
-    my $subs = $sth->fetchrow_hashref;
-    return $subs;
-}
-
-=head2 GetSubscriptionsFromBiblionumber
-
-=over 4
-
-\@res = GetSubscriptionsFromBiblionumber($biblionumber)
-this function get the subscription list. it reads on subscription table.
-return :
-table of subscription which has the biblionumber given on input arg.
-each line of this table is a hashref. All hashes containt
-planned, histstartdate,opacnote,missinglist,receivedlist,periodicity,status & enddate
-
-=back
-
-=cut
-sub GetSubscriptionsFromBiblionumber {
-    my ($biblionumber) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = qq(
-        SELECT subscription.*,
-               subscriptionhistory.*,
-               aqbudget.bookfundid,
-               aqbooksellers.name AS aqbooksellername,
-               biblio.title AS bibliotitle
-       FROM subscription
-       LEFT JOIN subscriptionhistory ON subscription.subscriptionid=subscriptionhistory.subscriptionid
-       LEFT JOIN aqbudget ON subscription.aqbudgetid=aqbudget.aqbudgetid
-       LEFT JOIN aqbooksellers ON subscription.aqbooksellerid=aqbooksellers.id
-       LEFT JOIN biblio ON biblio.biblionumber=subscription.biblionumber
-       WHERE subscription.biblionumber = ?
-    );
-    my $sth = $dbh->prepare($query);
-    $sth->execute($biblionumber);
-    my @res;
-    while (my $subs = $sth->fetchrow_hashref) {
-        $subs->{planneddate} = format_date($subs->{planneddate});
-          $subs->{publisheddate} = format_date($subs->{publisheddate});
-        $subs->{histstartdate} = format_date($subs->{histstartdate});
-        $subs->{opacnote} =~ s/\n/\<br\/\>/g;
-        $subs->{missinglist} =~ s/\n/\<br\/\>/g;
-        $subs->{receivedlist} =~ s/\n/\<br\/\>/g;
-        $subs->{"periodicity".$subs->{periodicity}} = 1;
-        $subs->{"status".$subs->{'status'}} = 1;
-        if ($subs->{enddate} eq '0000-00-00') {
-            $subs->{enddate}='';
-        } else {
-            $subs->{enddate} = format_date($subs->{enddate});
-        }
-        push @res,$subs;
-    }
-    return \@res;
-}
-=head2 GetFullSubscriptionsFromBiblionumber
-
-=over 4
-
-   \@res = GetFullSubscriptionsFromBiblionumber($biblionumber)
-   this function read on serial table.
-
-=back
-
-=cut
-sub GetFullSubscriptionsFromBiblionumber {
-    my ($biblionumber) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query=qq|
-                SELECT  serial.serialseq,
-                        serial.planneddate,
-                        serial.publisheddate,
-                        serial.status,
-                        serial.notes,
-                        year(serial.publisheddate) AS year,
-                        aqbudget.bookfundid,aqbooksellers.name AS aqbooksellername,
-                        biblio.title AS bibliotitle
-                FROM serial
-                LEFT JOIN subscription ON
-                    (serial.subscriptionid=subscription.subscriptionid AND subscription.biblionumber=serial.biblionumber)
-                LEFT JOIN aqbudget ON subscription.aqbudgetid=aqbudget.aqbudgetid 
-                LEFT JOIN aqbooksellers on subscription.aqbooksellerid=aqbooksellers.id
-                LEFT JOIN biblio on biblio.biblionumber=subscription.biblionumber
-                WHERE subscription.biblionumber = ?
-                ORDER BY year,serial.publisheddate,serial.subscriptionid,serial.planneddate
-    |;
-
-    my $sth = $dbh->prepare($query);
-    $sth->execute($biblionumber);
-    my @res;
-    my $year;
-    my $startdate;
-    my $aqbooksellername;
-    my $bibliotitle;
-    my @loopissues;
-    my $first;
-    my $previousnote="";
-    while (my $subs = $sth->fetchrow_hashref) {
-        ### BUG To FIX: When there is no published date, will create many null ids!!!
-
-        if ($year and ($year==$subs->{year})){
-            if ($first eq 1){$first=0;}
-            my $temp=$res[scalar(@res)-1]->{'serials'};
-            push @$temp,
-                {'publisheddate' =>format_date($subs->{'publisheddate'}),
-                'planneddate' => format_date($subs->{'planneddate'}), 
-                'serialseq' => $subs->{'serialseq'},
-                "status".$subs->{'status'} => 1,
-                'notes' => $subs->{'notes'} eq $previousnote?"":$subs->{notes},
-                };
-        } else {
-            $first=1 if (not $year);
-            $year= $subs->{'year'};
-            $startdate= format_date($subs->{'startdate'});
-            $aqbooksellername= $subs->{'aqbooksellername'};
-            $bibliotitle= $subs->{'bibliotitle'};
-            my @temp;
-            push @temp,
-                {'publisheddate' =>format_date($subs->{'publisheddate'}),
-                            'planneddate' => format_date($subs->{'planneddate'}), 
-                'serialseq' => $subs->{'serialseq'},
-                "status".$subs->{'status'} => 1,
-                'notes' => $subs->{'notes'} eq $previousnote?"":$subs->{notes},
-                };
-
-            push @res,{
-                'year'=>$year,
-                'startdate'=>$startdate,
-                'aqbooksellername'=>$aqbooksellername,
-                'bibliotitle'=>$bibliotitle,
-                'serials'=>\@temp,
-                'first'=>$first 
-            };
-        }
-        $previousnote=$subs->{notes};
-    }
-    return \@res;
-}
-
-
-=head2 GetSubscriptions
-
-=over 4
-
- at results = GetSubscriptions($title,$ISSN,$biblionumber);
-this function get all subscriptions which has title like $title,ISSN like $ISSN and biblionumber like $biblionumber.
-return:
-a table of hashref. Each hash containt the subscription.
-
-=back
-
-=cut
-sub GetSubscriptions {
-    my ($title,$ISSN,$biblionumber,$supplierid) = @_;
-    return unless $title or $ISSN or $biblionumber or $supplierid;
-    my $dbh = C4::Context->dbh;
-    my $sth;
-    if ($biblionumber) {
-        my $query = qq(
-            SELECT subscription.subscriptionid,biblio.title,biblio.issn,subscription.notes,biblio.biblionumber
-            FROM   subscription,biblio
-            WHERE  biblio.biblionumber = subscription.biblionumber
-                AND biblio.biblionumber=?
-            ORDER BY title
-        );
-    $sth = $dbh->prepare($query);
-    $sth->execute($biblionumber);
-    } elsif ($ISSN and $title){
-            my $query = qq|
-                SELECT subscription.subscriptionid,biblio.title,biblio.issn,subscription.notes,biblio.biblionumber,aqbooksellerid
-                FROM   subscription,biblio
-                WHERE biblio.biblionumber= subscription.biblionumber
-                    AND (biblio.title LIKE ? or biblio.issn = ?)
-                ORDER BY title
-            |;
-            $sth = $dbh->prepare($query);
-            $sth->execute("%$title%",$ISSN);
-        } elsif ($ISSN){
-                my $query = qq(
-                    SELECT subscription.subscriptionid,biblio.title,biblio.issn,subscription.notes,biblio.biblionumber,aqbooksellerid
-                    FROM   subscription,biblio
-                       WHERE biblio.biblionumber=subscription.biblionumber
-                        AND biblio.issn = ?
-                    ORDER BY title
-                );
-                $sth = $dbh->prepare($query);
-                $sth->execute($ISSN);
-       }elsif ($supplierid){
-                my $query = qq(
-                    SELECT subscription.subscriptionid,biblio.title,biblio.issn,subscription.notes,biblio.biblionumber,aqbooksellerid
-                    FROM   subscription,biblio
-                   WHERE biblio.biblionumber=subscription.biblionumber
-                        AND subscription.aqbooksellerid = ?
-                    ORDER BY title
-                );
-                $sth = $dbh->prepare($query);
-                $sth->execute($supplierid);
-            } else {
-                my $query = qq(
-                    SELECT subscription.subscriptionid,biblio.title,biblio.issn,subscription.notes,biblio.biblionumber,aqbooksellerid
-                    FROM   subscription,biblio
-                    WHERE biblio.biblionumber=subscription.biblionumber
-                        AND biblio.title LIKE ?
-                    ORDER BY title
-                );
-                $sth = $dbh->prepare($query);
-                $sth->execute("%$title%");
-        }
-        
-   
-    my @results;
-    my $previoustitle="";
-    my $odd=1;
-    while (my $line = $sth->fetchrow_hashref) {
-        if ($previoustitle eq $line->{title}) {
-            $line->{title}="";
-            $line->{issn}="";
-            $line->{toggle} = 1 if $odd==1;
-        } else {
-            $previoustitle=$line->{title};
-            $odd=-$odd;
-            $line->{toggle} = 1 if $odd==1;
-        }
-        push @results, $line;
-    }
-    return @results;
-}
-
-=head2 GetSerials
-
-=over 4
-
-($totalissues, at serials) = GetSerials($subscriptionid);
-this function get every serial not arrived for a given subscription
-as well as the number of issues registered in the database (all types)
-this number is used to see if a subscription can be deleted (=it must have only 1 issue)
-
-=back
-
-=cut
-sub GetSerials {
-    my ($subscriptionid) = @_;
-    my $dbh = C4::Context->dbh;
-   
-    my $counter=0;
-    my @serials;
-   
-    # status = 2 is "arrived"
-    my $query = qq|
-        SELECT *
-        FROM   serial
-        WHERE  subscriptionid = ? AND status NOT IN (2,4,5)
-    |;
-    my $sth=$dbh->prepare($query);
-    $sth->execute($subscriptionid);
-    while(my $line = $sth->fetchrow_hashref) {
-        $line->{"status".$line->{status}} = 1; # fills a "statusX" value, used for template status select list
-        $line->{"publisheddate"} = format_date($line->{"publisheddate"});
-        $line->{"planneddate"} = format_date($line->{"planneddate"});
-        push @serials,$line;
-    }
- # OK, now add the last 5 issues arrived/missing
-    my $query = qq|
-        SELECT   *
-        FROM     serial
-        WHERE    subscriptionid = ?
-        AND      (status in (2,4,5))
-        ORDER BY serialid DESC
-    |;
-    my $sth=$dbh->prepare($query);
-    $sth->execute($subscriptionid);
- while((my $line = $sth->fetchrow_hashref) && $counter <5) {
-        $counter++;
-        $line->{"status".$line->{status}} = 1; # fills a "statusX" value, used for template status select list
-        $line->{"planneddate"} = format_date($line->{"planneddate"});
-        $line->{"publisheddate"} = format_date($line->{"publisheddate"});
-        push @serials,$line;
-    }
-    my $query = qq|
-        SELECT count(*)
-        FROM   serial
-        WHERE  subscriptionid=?
-    |;
-    $sth=$dbh->prepare($query);
-    $sth->execute($subscriptionid);
-    my ($totalissues) = $sth->fetchrow;
-    return ($totalissues, at serials);
-}
-
-=head2 GetLatestSerials
-
-=over 4
-
-\@serials = GetLatestSerials($subscriptionid,$limit)
-get the $limit's latest serials arrived or missing for a given subscription
-return :
-a ref to a table which it containts all of the latest serials stored into a hash.
-
-=back
-
-=cut
-sub GetLatestSerials {
-    my ($subscriptionid,$limit) = @_;
-    my $dbh = C4::Context->dbh;
-    # status = 2 is "arrived"
-    my $strsth=qq(
-        SELECT   serialid,serialseq, status, planneddate
-        FROM     serial
-        WHERE    subscriptionid = ?
-        AND      (status =2 or status=4)
-        ORDER BY planneddate DESC LIMIT 0,$limit
-    );
-    my $sth=$dbh->prepare($strsth);
-    $sth->execute($subscriptionid);
-    my @serials;
-    while(my $line = $sth->fetchrow_hashref) {
-        $line->{"status".$line->{status}} = 1; # fills a "statusX" value, used for template status select list
-        $line->{"planneddate"} = format_date($line->{"planneddate"});
-        push @serials,$line;
-    }
-#     my $query = qq|
-#         SELECT count(*)
-#         FROM   serial
-#         WHERE  subscriptionid=?
-#     |;
-#     $sth=$dbh->prepare($query);
-#     $sth->execute($subscriptionid);
-#     my ($totalissues) = $sth->fetchrow;
-    return \@serials;
-}
-
-=head2 GetDistributedTo
-
-=over 4
-
-$distributedto=GetDistributedTo($subscriptionid)
-This function select the old previous value of distributedto in the database.
-
-=back
-
-=cut
-sub GetDistributedTo {
-    my $dbh = C4::Context->dbh;
-    my $distributedto;
-    my $subscriptionid = @_;
-    my $query = qq|
-        SELECT distributedto
-        FROM   subscription
-        WHERE  subscriptionid=?
-    |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute($subscriptionid);
-    return ($distributedto) = $sth->fetchrow;
-}
-
-=head2 GetNextSeq
-
-=over 4
-
-GetNextSeq($val)
-$val is a hashref containing all the attributes of the table 'subscription'
-This function get the next issue for the subscription given on input arg
-return:
-all the input params updated.
-
-=back
-
-=cut
-sub Get_Next_Seq {
-    my ($val) =@_;
-    my ($calculated,$newlastvalue1,$newlastvalue2,$newlastvalue3,$newinnerloop1,$newinnerloop2,$newinnerloop3);
-    $calculated = $val->{numberingmethod};
-# calculate the (expected) value of the next issue received.
-    $newlastvalue1 = $val->{lastvalue1};
-# check if we have to increase the new value.
-    $newinnerloop1 = $val->{innerloop1}+1;
-    $newinnerloop1=0 if ($newinnerloop1 >= $val->{every1});
-    $newlastvalue1 += $val->{add1} if ($newinnerloop1<1); # <1 to be true when 0 or empty.
-    $newlastvalue1=$val->{setto1} if ($newlastvalue1>$val->{whenmorethan1}); # reset counter if needed.
-    $calculated =~ s/\{X\}/$newlastvalue1/g;
-
-    $newlastvalue2 = $val->{lastvalue2};
-# check if we have to increase the new value.
-    $newinnerloop2 = $val->{innerloop2}+1;
-    $newinnerloop2=0 if ($newinnerloop2 >= $val->{every2});
-    $newlastvalue2 += $val->{add2} if ($newinnerloop2<1); # <1 to be true when 0 or empty.
-    $newlastvalue2=$val->{setto2} if ($newlastvalue2>$val->{whenmorethan2}); # reset counter if needed.
-    $calculated =~ s/\{Y\}/$newlastvalue2/g;
-
-    $newlastvalue3 = $val->{lastvalue3};
-# check if we have to increase the new value.
-    $newinnerloop3 = $val->{innerloop3}+1;
-    $newinnerloop3=0 if ($newinnerloop3 >= $val->{every3});
-    $newlastvalue3 += $val->{add3} if ($newinnerloop3<1); # <1 to be true when 0 or empty.
-    $newlastvalue3=$val->{setto3} if ($newlastvalue3>$val->{whenmorethan3}); # reset counter if needed.
-    $calculated =~ s/\{Z\}/$newlastvalue3/g;
-    return ($calculated,$newlastvalue1,$newlastvalue2,$newlastvalue3,$newinnerloop1,$newinnerloop2,$newinnerloop3);
-}
-
-
-sub GetNextSeq {
-    my ($val) =@_;
-    my ($calculated,$newlastvalue1,$newlastvalue2,$newlastvalue3,$newinnerloop1,$newinnerloop2,$newinnerloop3);
-    my $pattern = $val->{numberpattern};
-    my @seasons = ('nothing','Winter','Spring','Summer','Autumn');
-    my @southern_seasons = ('','Summer','Autumn','Winter','Spring');
-    $calculated = $val->{numberingmethod};
-    $newlastvalue1 = $val->{lastvalue1};
-    $newlastvalue2 = $val->{lastvalue2};
-    $newlastvalue3 = $val->{lastvalue3};
-    if($newlastvalue3 > 0){ # if x y and z columns are used
-	$newlastvalue3 = $newlastvalue3+1;
-	if($newlastvalue3 > $val->{whenmorethan3}){
-	    $newlastvalue3 = $val->{setto3};
-	    $newlastvalue2++;
-	    if($newlastvalue2 > $val->{whenmorethan2}){
-		$newlastvalue1++;
-		$newlastvalue2 = $val->{setto2};
-	    }
-	}
-	$calculated =~ s/\{X\}/$newlastvalue1/g;
-	if($pattern == 6){
-	    if($val->{hemisphere} == 2){
-		my $newlastvalue2seq = $southern_seasons[$newlastvalue2];
-		$calculated =~ s/\{Y\}/$newlastvalue2seq/g;
-	    } else {
-		my $newlastvalue2seq = $seasons[$newlastvalue2];
-		$calculated =~ s/\{Y\}/$newlastvalue2seq/g;
-	    }
-	} else {
-	    $calculated =~ s/\{Y\}/$newlastvalue2/g;
-	}
-	$calculated =~ s/\{Z\}/$newlastvalue3/g;
-    }
-    if($newlastvalue2 > 0 && $newlastvalue3 < 1){ # if x and y columns are used
-	$newlastvalue2 = $newlastvalue2+1;
-	if($newlastvalue2 > $val->{whenmorethan2}){
-	    $newlastvalue2 = $val->{setto2};
-	    $newlastvalue1++;
-	}
-	$calculated =~ s/\{X\}/$newlastvalue1/g;
-	if($pattern == 6){
-	    if($val->{hemisphere} == 2){
-		my $newlastvalue2seq = $southern_seasons[$newlastvalue2];
-		$calculated =~ s/\{Y\}/$newlastvalue2seq/g;
-	    } else {
-		my $newlastvalue2seq = $seasons[$newlastvalue2];
-		$calculated =~ s/\{Y\}/$newlastvalue2seq/g;
-	    }
-	} else {
-	    $calculated =~ s/\{Y\}/$newlastvalue2/g;
-	}
-    }
-    if($newlastvalue1 > 0 && $newlastvalue2 < 1 && $newlastvalue3 < 1){ # if column x only
-	$newlastvalue1 = $newlastvalue1+1;
-	if($newlastvalue1 > $val->{whenmorethan1}){
-	    $newlastvalue1 = $val->{setto2};
-	}
-	$calculated =~ s/\{X\}/$newlastvalue1/g;
-    }
-    return ($calculated,$newlastvalue1,$newlastvalue2,$newlastvalue3);
-}
-
-
-=head2 GetNextDate
-
-=over 4
-
-$resultdate = GetNextDate($planneddate,$subscription)
-
-this function get the date after $planneddate.
-return:
-the date on ISO format.
-
-=back
-
-=cut
-
-=head2 GetSeq
-
-=over 4
-
-$calculated = GetSeq($val)
-$val is a hashref containing all the attributes of the table 'subscription'
-this function transforms {X},{Y},{Z} to 150,0,0 for example.
-return:
-the sequence in integer format
-
-=back
-
-=cut
-sub GetSeq {
-    my ($val) =@_;
-    my $calculated = $val->{numberingmethod};
-    my $x=$val->{'lastvalue1'};
-    $calculated =~ s/\{X\}/$x/g;
-    my $y=$val->{'lastvalue2'};
-    $calculated =~ s/\{Y\}/$y/g;
-    my $z=$val->{'lastvalue3'};
-    $calculated =~ s/\{Z\}/$z/g;
-    return $calculated;
-}
-
-=head2 GetSubscriptionExpirationDate
-
-=over 4
-
-$sensddate = GetSubscriptionExpirationDate($subscriptionid)
-
-this function return the expiration date for a subscription given on input args.
-
-return
-the enddate
-
-=back
-
-=cut
-sub GetSubscriptionExpirationDate {
-    my ($subscriptionid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $subscription = GetSubscription($subscriptionid);
-    my $enddate=$subscription->{startdate};
-    # we don't do the same test if the subscription is based on X numbers or on X weeks/months
-    if ($subscription->{numberlength}) {
-        #calculate the date of the last issue.
-        for (my $i=1;$i<=$subscription->{numberlength};$i++) {
-            $enddate = GetNextDate($enddate,$subscription);
-        }
-    }
-    else {
-	my $duration;
-	 $duration=get_duration($subscription->{monthlength}." months") if ($subscription->{monthlength});
-	 $duration=get_duration($subscription->{weeklength}." weeks") if ($subscription->{weeklength});
-        $enddate = DATE_Add_Duration($subscription->{startdate},$duration) ;
-    }
-    return $enddate;
-}
-
-=head2 CountSubscriptionFromBiblionumber
-
-=over 4
-
-$subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber)
-this count the number of subscription for a biblionumber given.
-return :
-the number of subscriptions with biblionumber given on input arg.
-
-=back
-
-=cut
-sub CountSubscriptionFromBiblionumber {
-    my ($biblionumber) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = qq|
-        SELECT count(*)
-        FROM   subscription
-        WHERE  biblionumber=?
-    |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute($biblionumber);
-    my $subscriptionsnumber = $sth->fetchrow;
-    return $subscriptionsnumber;
-}
-
-
-=head2 ModSubscriptionHistory
-
-=over 4
-
-ModSubscriptionHistory($subscriptionid,$histstartdate,$enddate,$receivedlist,$missinglist,$opacnote,$librariannote);
-
-this function modify the history of a subscription. Put your new values on input arg.
-
-=back
-
-=cut
-sub ModSubscriptionHistory {
-    my ($subscriptionid,$histstartdate,$enddate,$receivedlist,$missinglist,$opacnote,$librariannote)=@_;
-    my $dbh=C4::Context->dbh;
-    my $query = qq(
-        UPDATE subscriptionhistory 
-        SET histstartdate=?,enddate=?,receivedlist=?,missinglist=?,opacnote=?,librariannote=?
-        WHERE subscriptionid=?
-    );
-    my $sth = $dbh->prepare($query);
-    $receivedlist =~ s/^,//g;
-    $missinglist =~ s/^,//g;
-    $opacnote =~ s/^,//g;
-    $sth->execute($histstartdate,$enddate,$receivedlist,$missinglist,$opacnote,$librariannote,$subscriptionid);
-}
-
-=head2 ModSerialStatus
-
-=over 4
-
-ModSerialStatus($serialid,$serialseq, $publisheddate,$planneddate,$status,$notes)
-
-This function modify the serial status. Serial status is a number.(eg 2 is "arrived")
-Note : if we change from "waited" to something else,then we will have to create a new "waited" entry
-
-=back
-
-=cut
-sub ModSerialStatus {
-    my ($serialid,$serialseq, $publisheddate,$planneddate,$status,$notes,$itemnumber)=@_;
-
-    # 1st, get previous status :
-    my $dbh = C4::Context->dbh;
-    my $query = qq|
-        SELECT subscriptionid,status
-        FROM   serial
-        WHERE  serialid=?
-    |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute($serialid);
-    my ($subscriptionid,$oldstatus) = $sth->fetchrow;
-    # change status & update subscriptionhistory
-    if ($status eq 6){
-        DelIssue($serialseq, $subscriptionid)
-    } else {
-        my $query = qq(
-            UPDATE serial
-            SET    serialseq=?,publisheddate=?,planneddate=?,status=?,notes=?,itemnumber=?
-            WHERE  serialid = ?
-        );
-        $sth = $dbh->prepare($query);
-        $sth->execute($serialseq,format_date_in_iso($publisheddate),format_date_in_iso($planneddate),$status,$notes,$itemnumber,$serialid);
-        my $query = qq(
-            SELECT missinglist,receivedlist
-            FROM   subscriptionhistory
-            WHERE  subscriptionid=?
-        );
-        $sth = $dbh->prepare($query);
-        $sth->execute($subscriptionid);
-        my ($missinglist,$receivedlist) = $sth->fetchrow;
-        if ($status == 2 && $oldstatus != 2) {
-            $receivedlist .= ",$serialseq";
-        }
-        $missinglist .= ",$serialseq" if ($status eq 4) ;
-        $missinglist .= ",not issued $serialseq" if ($status eq 5);
-        my $query = qq(
-            UPDATE subscriptionhistory
-            SET    receivedlist=?, missinglist=?
-            WHERE  subscriptionid=?
-        );
-        $sth=$dbh->prepare($query);
-        $sth->execute($receivedlist,$missinglist,$subscriptionid);
-    }
-    # create new waited entry if needed (ie : was a "waited" and has changed)
-    if ($oldstatus eq 1 && $status ne 1) {
-        my $query = qq(
-            SELECT *
-            FROM   subscription
-            WHERE  subscriptionid = ?
-        );
-        $sth = $dbh->prepare($query);
-        $sth->execute($subscriptionid);
-        my $val = $sth->fetchrow_hashref;
-        # next issue number
-        my ($newserialseq,$newlastvalue1,$newlastvalue2,$newlastvalue3,$newinnerloop1,$newinnerloop2,$newinnerloop3) = GetNextSeq($val);
-        # next date (calculated from actual date & frequency parameters)
-          my $nextplanneddate = GetNextDate($planneddate,$val);
-          my $nextpublisheddate = GetNextDate($publisheddate,$val);
-        NewIssue($newserialseq, $subscriptionid, $val->{'biblionumber'}, 1, $nextpublisheddate,$nextplanneddate,0);
-        my $query = qq|
-            UPDATE subscription
-            SET    lastvalue1=?, lastvalue2=?, lastvalue3=?,
-                   innerloop1=?, innerloop2=?, innerloop3=?
-            WHERE  subscriptionid = ?
-        |;
-        $sth = $dbh->prepare($query);
-        $sth->execute($newlastvalue1,$newlastvalue2,$newlastvalue3,$newinnerloop1,$newinnerloop2,$newinnerloop3,$subscriptionid);
-    }
-}
-
-=head2 ModSubscription
-
-=over 4
-
-this function modify a subscription. Put all new values on input args.
-
-=back
-
-=cut
-sub ModSubscription {
-    my ($auser,$aqbooksellerid,$cost,$aqbudgetid,$startdate,
-        $periodicity,$dow,$numberlength,$weeklength,$monthlength,
-        $add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
-        $add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
-        $add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
-        $numberingmethod, $status, $biblionumber, $notes, $letter, $subscriptionid,$irregularity,$hemisphere,$callnumber,$numberpattern,$publisheddate)= @_;
-    my $dbh = C4::Context->dbh;
-    my $query = qq|
-        UPDATE subscription
-        SET     librarian=?, aqbooksellerid=?,cost=?,aqbudgetid=?,startdate=?,
-                periodicity=?,dow=?,numberlength=?,weeklength=?,monthlength=?,
-                add1=?,every1=?,whenmorethan1=?,setto1=?,lastvalue1=?,innerloop1=?,
-                add2=?,every2=?,whenmorethan2=?,setto2=?,lastvalue2=?,innerloop2=?,
-                add3=?,every3=?,whenmorethan3=?,setto3=?,lastvalue3=?,innerloop3=?,
-                numberingmethod=?, status=?, biblionumber=?, notes=?, letter=?,irregularity=?,hemisphere=?,callnumber=?,numberpattern=? ,publisheddate=?
-        WHERE subscriptionid = ?
-    |;
-    my $sth=$dbh->prepare($query);
-    $sth->execute($auser,$aqbooksellerid,$cost,$aqbudgetid,$startdate,
-        $periodicity,$dow,$numberlength,$weeklength,$monthlength,
-        $add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
-        $add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
-        $add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
-        $numberingmethod, $status, $biblionumber, $notes, $letter, $irregularity,$hemisphere,$callnumber,$numberpattern,$publisheddate,$subscriptionid);
-    $sth->finish;
-}
-
-
-=head2 NewSubscription
-
-=over 4
-
-$subscriptionid = &NewSubscription($auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,
-    $startdate,$periodicity,$dow,$numberlength,$weeklength,$monthlength,
-    $add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
-    $add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
-    $add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
-    $numberingmethod, $status, $notes)
-
-Create a new subscription with value given on input args.
-
-return :
-the id of this new subscription
-
-=back
-
-=cut
-sub NewSubscription {
-    my ($auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,
-        $startdate,$periodicity,$dow,$numberlength,$weeklength,$monthlength,
-        $add1,$every1,$whenmorethan1,$setto1,$lastvalue1,
-        $add2,$every2,$whenmorethan2,$setto2,$lastvalue2,
-        $add3,$every3,$whenmorethan3,$setto3,$lastvalue3,
-        $numberingmethod, $status, $notes, $letter,$irregularity,$hemisphere,$callnumber,$numberpattern,$publisheddate) = @_;
-
-    my $dbh = C4::Context->dbh;
-#save subscription (insert into database)
-    my $query = qq|
-        INSERT INTO subscription
-            (librarian,aqbooksellerid,cost,aqbudgetid,biblionumber,
-            startdate,periodicity,dow,numberlength,weeklength,monthlength,
-            add1,every1,whenmorethan1,setto1,lastvalue1,
-            add2,every2,whenmorethan2,setto2,lastvalue2,
-            add3,every3,whenmorethan3,setto3,lastvalue3,
-            numberingmethod, status, notes, letter,irregularity,hemisphere,callnumber,numberpattern,publisheddate)
-        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
-	|;
-    my $sth=$dbh->prepare($query);
-    $sth->execute(
-        $auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,
-        format_date_in_iso($startdate),$periodicity,$dow,$numberlength,$weeklength,$monthlength,
-        $add1,$every1,$whenmorethan1,$setto1,$lastvalue1,
-        $add2,$every2,$whenmorethan2,$setto2,$lastvalue2,
-        $add3,$every3,$whenmorethan3,$setto3,$lastvalue3,
-        $numberingmethod, $status, $notes, $letter,$irregularity,$hemisphere,$callnumber,$numberpattern,format_date_in_iso($publisheddate));
-
-
-#then create the 1st waited number
-    my $subscriptionid = $dbh->{'mysql_insertid'};
-        my $enddate = GetSubscriptionExpirationDate($subscriptionid);
-    my $query = qq(
-        INSERT INTO subscriptionhistory
-            (biblionumber, subscriptionid, histstartdate, enddate, missinglist, receivedlist, opacnote, librariannote)
-        VALUES (?,?,?,?,?,?,?,?)
-        );
-    $sth = $dbh->prepare($query);
-    $sth->execute($biblionumber, $subscriptionid, format_date_in_iso($startdate), format_date_in_iso($enddate), "", "", "", $notes);
-## User may have subscriptionid stored in MARC so check and fill it
-my $record=XMLgetbiblio($dbh,$biblionumber);
-$record=XML_xml2hash_onerecord($record);
-XML_writeline( $record, "subscriptionid", $subscriptionid,"biblios" );
-my $frameworkcode=MARCfind_frameworkcode($dbh,$biblionumber);
-NEWmodbiblio($dbh,$biblionumber,$record,$frameworkcode);
-# reread subscription to get a hash (for calculation of the 1st issue number)
-    my $query = qq(
-        SELECT *
-        FROM   subscription
-        WHERE  subscriptionid = ?
-    );
-    $sth = $dbh->prepare($query);
-    $sth->execute($subscriptionid);
-    my $val = $sth->fetchrow_hashref;
-
-# calculate issue number
-    my $serialseq = GetSeq($val);
-    my $query = qq|
-        INSERT INTO serial
-            (serialseq,subscriptionid,biblionumber,status, planneddate,publisheddate)
-        VALUES (?,?,?,?,?,?)
-    |;
-
-    $sth = $dbh->prepare($query);
-    $sth->execute($serialseq, $subscriptionid, $val->{'biblionumber'}, 1, format_date_in_iso($startdate),format_date_in_iso($publisheddate));
-    return $subscriptionid;
-}
-
-
-=head2 ReNewSubscription
-
-=over 4
-
-ReNewSubscription($subscriptionid,$user,$startdate,$numberlength,$weeklength,$monthlength,$note)
-
-this function renew a subscription with values given on input args.
-
-=back
-
-=cut
-sub ReNewSubscription {
-    my ($subscriptionid,$user,$startdate,$numberlength,$weeklength,$monthlength,$note) = @_;
-    my $dbh = C4::Context->dbh;
-    my $subscription = GetSubscription($subscriptionid);
-    my $record=XMLgetbiblio($dbh,$subscription->{biblionumber});
-    $record=XML_xml2hash_onerecord($record);
-    my $biblio = XMLmarc2koha_onerecord($dbh,$record,"biblios");
-    NewSuggestion($user,$subscription->{bibliotitle},$biblio->{author},$biblio->{publishercode},$biblio->{note},'','','','','',$subscription->{biblionumber});
-    # renew subscription
-    my $query = qq|
-        UPDATE subscription
-        SET    startdate=?,numberlength=?,weeklength=?,monthlength=?
-        WHERE  subscriptionid=?
-    |;
-my    $sth=$dbh->prepare($query);
-    $sth->execute(format_date_in_iso($startdate),$numberlength,$weeklength,$monthlength, $subscriptionid);
-}
-
-
-=head2 NewIssue
-
-=over 4
-
-NewIssue($serialseq,$subscriptionid,$biblionumber,$status, $publisheddate, $planneddate)
-
-Create a new issue stored on the database.
-Note : we have to update the receivedlist and missinglist on subscriptionhistory for this subscription.
-
-=back
-
-=cut
-sub NewIssue {
-    my ($serialseq,$subscriptionid,$biblionumber,$status, $publisheddate, $planneddate,$itemnumber) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = qq|
-        INSERT INTO serial
-            (serialseq,subscriptionid,biblionumber,status,publisheddate,planneddate,itemnumber)
-        VALUES (?,?,?,?,?,?,?)
-    |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute($serialseq,$subscriptionid,$biblionumber,$status,format_date_in_iso($publisheddate), format_date_in_iso($planneddate),$itemnumber);
-
-    my $query = qq|
-        SELECT missinglist,receivedlist
-        FROM   subscriptionhistory
-        WHERE  subscriptionid=?
-    |;
-    $sth = $dbh->prepare($query);
-    $sth->execute($subscriptionid);
-    my ($missinglist,$receivedlist) = $sth->fetchrow;
-    if ($status eq 2) {
-        $receivedlist .= ",$serialseq";
-    }
-    if ($status eq 4) {
-        $missinglist .= ",$serialseq";
-    }
-    my $query = qq|
-        UPDATE subscriptionhistory
-        SET    receivedlist=?, missinglist=?
-        WHERE  subscriptionid=?
-    |;
-    $sth=$dbh->prepare($query);
-    $sth->execute($receivedlist,$missinglist,$subscriptionid);
-}
-
-=head2 serialchangestatus
-
-=over 4
-
-serialchangestatus($serialid,$serialseq,$planneddate,$status,$notes)
-
-Change the status of a serial issue.
-Note: this was the older subroutine
-
-=back
-
-=cut
-sub serialchangestatus {
-    my ($serialid,$serialseq,$planneddate,$status,$notes)=@_;
-    # 1st, get previous status : if we change from "waited" to something else, then we will have to create a new "waited" entry
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare("select subscriptionid,status from serial where serialid=?");
-    $sth->execute($serialid);
-    my ($subscriptionid,$oldstatus) = $sth->fetchrow;
-    # change status & update subscriptionhistory
-    if ($status eq 6){
-        delissue($serialseq, $subscriptionid)
-    }else{
-        $sth = $dbh->prepare("update serial set serialseq=?,planneddate=?,status=?,notes=? where serialid = ?");
-        $sth->execute($serialseq,format_date_in_iso($planneddate),$status,$notes,$serialid);
-
-        $sth = $dbh->prepare("select missinglist,receivedlist from subscriptionhistory where subscriptionid=?");
-        $sth->execute($subscriptionid);
-        my ($missinglist,$receivedlist) = $sth->fetchrow;
-        if ($status eq 2) {
-            $receivedlist .= "| $serialseq";
-            $receivedlist =~ s/^\| //g;
-        }
-        $missinglist .= "| $serialseq" if ($status eq 4) ;
-        $missinglist .= "| not issued $serialseq" if ($status eq 5);
-        $missinglist =~ s/^\| //g;
-        $sth=$dbh->prepare("update subscriptionhistory set receivedlist=?, missinglist=? where subscriptionid=?");
-        $sth->execute($receivedlist,$missinglist,$subscriptionid);
-    }
-    # create new waited entry if needed (ie : was a "waited" and has changed)
-    if ($oldstatus eq 1 && $status ne 1) {
-        $sth = $dbh->prepare("select * from subscription where subscriptionid = ? ");
-        $sth->execute($subscriptionid);
-        my $val = $sth->fetchrow_hashref;
-        # next issue number
-        my ($newserialseq,$newlastvalue1,$newlastvalue2,$newlastvalue3) = New_Get_Next_Seq($val);
-        my $nextplanneddate = GetNextDate($planneddate,$val);
-        NewIssue($newserialseq, $subscriptionid, $val->{'biblionumber'}, 1, $nextplanneddate);
-        $sth = $dbh->prepare("update subscription set lastvalue1=?, lastvalue2=?,lastvalue3=? where subscriptionid = ?");
-        $sth->execute($newlastvalue1,$newlastvalue2,$newlastvalue3,$subscriptionid);
-    }
-    # check if an alert must be sent... (= a letter is defined & status became "arrived"
-   	$sth = $dbh->prepare("select * from subscription where subscriptionid = ? ");
-	$sth->execute($subscriptionid);
-	my $subscription = $sth->fetchrow_hashref; 
-    if ($subscription->{letter} && $status eq 2) {
-        sendalerts('issue',$subscription->{subscriptionid},$subscription->{letter});
-    }
-}
-
-
-
-
-=head2 HasSubscriptionExpired
-
-=over 4
-
-1 or 0 = HasSubscriptionExpired($subscriptionid)
-
-the subscription has expired when the next issue to arrive is out of subscription limit.
-
-return :
-1 if true, 0 if false.
-
-=back
-
-=cut
-sub HasSubscriptionExpired {
-    my ($subscriptionid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $subscription = GetSubscription($subscriptionid);
-    # we don't do the same test if the subscription is based on X numbers or on X weeks/months
-    if ($subscription->{numberlength} ) {
-        my $query = qq|
-            SELECT count(*)
-            FROM   serial
-            WHERE  subscriptionid=? AND planneddate>=?
-        |;
-        my $sth = $dbh->prepare($query);
-        $sth->execute($subscriptionid,$subscription->{startdate});
-        my $res = $sth->fetchrow;
-        if ($subscription->{numberlength}>=$res) {
-            return 0;
-        } else {
-            return 1;
-        }
-    } else {
-        #a little bit more tricky if based on X weeks/months : search if the latest issue waited is not after subscription startdate + duration
-        my $query = qq|
-            SELECT max(planneddate)
-            FROM   serial
-            WHERE  subscriptionid=?
-        |;
-        my $sth = $dbh->prepare($query);
-        $sth->execute($subscriptionid);
-        my $res = $sth->fetchrow;
-        my $endofsubscriptiondate;
-	my $duration;
-	 $duration=get_duration($subscription->{monthlength}." months") if ($subscription->{monthlength});
-	$duration=get_duration($subscription->{weeklength}." weeks") if ($subscription->{weeklength});
-
-        $endofsubscriptiondate = DATE_Add_Duration($subscription->{startdate},$duration) ;
-        return 1 if ($res ge $endofsubscriptiondate);
-        return 0;
-    }
-}
-
-=head2 SetDistributedto
-
-=over 4
-
-SetDistributedto($distributedto,$subscriptionid);
-This function update the value of distributedto for a subscription given on input arg.
-
-=back
-
-=cut
-sub SetDistributedto {
-    my ($distributedto,$subscriptionid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = qq|
-        UPDATE subscription
-        SET    distributedto=?
-        WHERE  subscriptionid=?
-    |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute($distributedto,$subscriptionid);
-}
-
-=head2 DelSubscription
-
-=over 4
-
-DelSubscription($subscriptionid)
-this function delete the subscription which has $subscriptionid as id.
-
-=back
-
-=cut
-sub DelSubscription {
-    my ($subscriptionid,$biblionumber) = @_;
-    my $dbh = C4::Context->dbh;
-## User may have subscriptionid stored in MARC so check and remove it
-my $record=XMLgetbibliohash($dbh,$biblionumber);
-XML_writeline( $record, "subscriptionid", "","biblios" );
-my $frameworkcode=MARCfind_frameworkcode($dbh,$biblionumber);
-NEWmodbiblio($dbh,$biblionumber,$record,$frameworkcode);
-    $subscriptionid=$dbh->quote($subscriptionid);
-    $dbh->do("DELETE FROM subscription WHERE subscriptionid=$subscriptionid");
-    $dbh->do("DELETE FROM subscriptionhistory WHERE subscriptionid=$subscriptionid");
-    $dbh->do("DELETE FROM serial WHERE subscriptionid=$subscriptionid");
-
-}
-
-=head2 DelIssue
-
-=over 4
-
-DelIssue($serialseq,$subscriptionid)
-this function delete an issue which has $serialseq and $subscriptionid given on input arg.
-
-=back
-
-=cut
-sub DelIssue {
-    my ($serialseq,$subscriptionid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = qq|
-        DELETE FROM serial
-        WHERE       serialseq= ?
-        AND         subscriptionid= ?
-    |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute($serialseq,$subscriptionid);
-}
-
-=head2 GetMissingIssues
-
-=over 4
-
-($count, at issuelist) = &GetMissingIssues($supplierid,$serialid)
-
-this function select missing issues on database - where serial.status = 4
-
-return :
-a count of the number of missing issues
-the issuelist into a table. Each line of this table containts a ref to a hash which it containts
-name,title,planneddate,serialseq,serial.subscriptionid from tables : subscription, serial & biblio
-
-=back
-
-=cut
-sub GetMissingIssues {
-    my ($supplierid,$serialid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth;
-    my $byserial='';
-    if($serialid) {
-	$byserial = "and serialid = ".$serialid;
-    }
-    if ($supplierid) {
-	$sth = $dbh->prepare("SELECT serialid,aqbooksellerid,name,title,planneddate,serialseq,serial.subscriptionid,claimdate
-                                  FROM subscription, serial, biblio
-                                  LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id
-                                  WHERE subscription.subscriptionid = serial.subscriptionid AND
-                                  serial.STATUS = 4 and
-                                  subscription.aqbooksellerid=$supplierid and
-                                  biblio.biblionumber = subscription.biblionumber ".$byserial." order by title
-                                  ");
-    } else {
-	$sth = $dbh->prepare("SELECT serialid,aqbooksellerid,name,title,planneddate,serialseq,serial.subscriptionid,claimdate
-                                  FROM subscription, serial, biblio
-                                  LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id
-                                  WHERE subscription.subscriptionid = serial.subscriptionid AND
-                                  serial.STATUS =4 and
-                                  biblio.biblionumber = subscription.biblionumber ".$byserial." order by title
-                                  ");
-    }
-    $sth->execute;
-    my @issuelist;
-    my $last_title;
-    my $odd=0;
-    my $count=0;
-    while (my $line = $sth->fetchrow_hashref) {
-	$odd++ unless $line->{title} eq $last_title;
-	$last_title = $line->{title} if ($line->{title});
-	$line->{planneddate} = format_date($line->{planneddate});
-	$line->{claimdate} = format_date($line->{claimdate});
-	$line->{'odd'} = 1 if $odd %2 ;
-	$count++;
-	push @issuelist,$line;
-    }
-    return $count, at issuelist;
-}
-
-=head2 removeMissingIssue
-
-=over 4
-
-removeMissingIssue($subscriptionid)
-
-this function removes an issue from being part of the missing string in 
-subscriptionlist.missinglist column
-
-called when a missing issue is found from the statecollection.pl file
-
-=back
-
-=cut
-sub removeMissingIssue {
-    my ($sequence,$subscriptionid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare("SELECT * FROM subscriptionhistory WHERE subscriptionid = ?");
-    $sth->execute($subscriptionid);
-    my $data = $sth->fetchrow_hashref;
-    my $missinglist = $data->{'missinglist'};
-    my $missinglistbefore = $missinglist;
-    # warn $missinglist." before";
-    $missinglist =~ s/($sequence)//;
-    # warn $missinglist." after";
-    if($missinglist ne $missinglistbefore){
-	$missinglist =~ s/\|\s\|/\|/g;
-	$missinglist =~ s/^\| //g;
-	$missinglist =~ s/\|$//g;
-	my $sth2= $dbh->prepare("UPDATE subscriptionhistory
-                                       SET missinglist = ?
-                                       WHERE subscriptionid = ?");
-        $sth2->execute($missinglist,$subscriptionid);
-    }
-}
-
-=head2 updateClaim
-
-=over 4
-
-&updateClaim($serialid)
-
-this function updates the time when a claim is issued for late/missing items
-
-called from claims.pl file
-
-=back
-
-=cut
-sub updateClaim {
-    my ($serialid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare("UPDATE serial SET claimdate = now()
-                                   WHERE serialid = ?
-                                   ");
-    $sth->execute($serialid);
-}
-
-=head2 getsupplierbyserialid
-
-=over 4
-
-($result) = &getsupplierbyserialid($serialid)
-
-this function is used to find the supplier id given a serial id
-
-return :
-hashref containing serialid, subscriptionid, and aqbooksellerid
-
-=back
-
-=cut
-sub getsupplierbyserialid {
-    my ($serialid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare("SELECT serialid, serial.subscriptionid, aqbooksellerid
-                                   FROM serial, subscription
-                                   WHERE serial.subscriptionid = subscription.subscriptionid
-                                   AND serialid = ?
-                                   ");
-    $sth->execute($serialid);
-    my $line = $sth->fetchrow_hashref;
-    my $result = $line->{'aqbooksellerid'};
-    return $result;
-}
-
-=head2 check_routing
-
-=over 4
-
-($result) = &check_routing($subscriptionid)
-
-this function checks to see if a serial has a routing list and returns the count of routingid
-used to show either an 'add' or 'edit' link
-=back
-
-=cut
-sub check_routing {
-    my ($subscriptionid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare("SELECT count(routingid) routingids FROM subscriptionroutinglist, subscription
-                              WHERE subscription.subscriptionid = subscriptionroutinglist.subscriptionid
-                              AND subscription.subscriptionid = ? ORDER BY ranking ASC
-                              ");
-    $sth->execute($subscriptionid);
-    my $line = $sth->fetchrow_hashref;
-    my $result = $line->{'routingids'};
-    return $result;
-}
-
-=head2 addroutingmember
-
-=over 4
-
-&addroutingmember($bornum,$subscriptionid)
-
-this function takes a borrowernumber and subscriptionid and add the member to the
-routing list for that serial subscription and gives them a rank on the list
-of either 1 or highest current rank + 1
-
-=back
-
-=cut
-sub addroutingmember {
-    my ($bornum,$subscriptionid) = @_;
-    my $rank;
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare("SELECT max(ranking) rank FROM subscriptionroutinglist WHERE subscriptionid = ?");
-    $sth->execute($subscriptionid);
-    while(my $line = $sth->fetchrow_hashref){
-	if($line->{'rank'}>0){
-	    $rank = $line->{'rank'}+1;
-	} else {
-	    $rank = 1;
-	}
-    }
-    $sth = $dbh->prepare("INSERT INTO subscriptionroutinglist VALUES (null,?,?,?,null)");
-    $sth->execute($subscriptionid,$bornum,$rank);
-}
-
-=head2 reorder_members
-
-=over 4
-
-&reorder_members($subscriptionid,$routingid,$rank)
-
-this function is used to reorder the routing list
-
-it takes the routingid of the member one wants to re-rank and the rank it is to move to
-- it gets all members on list puts their routingid's into an array
-- removes the one in the array that is $routingid
-- then reinjects $routingid at point indicated by $rank
-- then update the database with the routingids in the new order
-
-=back
-
-=cut
-sub reorder_members {
-    my ($subscriptionid,$routingid,$rank) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare("SELECT * FROM subscriptionroutinglist WHERE subscriptionid = ? ORDER BY ranking ASC");
-    $sth->execute($subscriptionid);
-    my @result;
-    while(my $line = $sth->fetchrow_hashref){
-	push(@result,$line->{'routingid'});
-    }
-    # To find the matching index
-    my $i;
-    my $key = -1; # to allow for 0 being a valid response
-    for ($i = 0; $i < @result; $i++) {
-	if ($routingid == $result[$i]) {
-	    $key = $i; # save the index
-	    last;
-	}
-    }
-    # if index exists in array then move it to new position
-    if($key > -1 && $rank > 0){
-	my $new_rank = $rank-1; # $new_rank is what you want the new index to be in the array
-	my $moving_item = splice(@result, $key, 1);
-	splice(@result, $new_rank, 0, $moving_item);
-    }
-    for(my $j = 0; $j < @result; $j++){
-	my $sth = $dbh->prepare("UPDATE subscriptionroutinglist SET ranking = '" . ($j+1) . "' WHERE routingid = '". $result[$j]."'");
-	$sth->execute;
-    }
-}
-
-=head2 delroutingmember
-
-=over 4
-
-&delroutingmember($routingid,$subscriptionid)
-
-this function either deletes one member from routing list if $routingid exists otherwise
-deletes all members from the routing list
-
-=back
-
-=cut
-sub delroutingmember {
-    # if $routingid exists then deletes that row otherwise deletes all with $subscriptionid
-    my ($routingid,$subscriptionid) = @_;
-    my $dbh = C4::Context->dbh;
-    if($routingid){
-	my $sth = $dbh->prepare("DELETE FROM subscriptionroutinglist WHERE routingid = ?");
-	$sth->execute($routingid);
-	reorder_members($subscriptionid,$routingid);
-    } else {
-	my $sth = $dbh->prepare("DELETE FROM subscriptionroutinglist WHERE subscriptionid = ?");
-	$sth->execute($subscriptionid);
-    }
-}
-
-=head2 getroutinglist
-
-=over 4
-
-($count, at routinglist) = &getroutinglist($subscriptionid)
-
-this gets the info from the subscriptionroutinglist for $subscriptionid
-
-return :
-a count of the number of members on routinglist
-the routinglist into a table. Each line of this table containts a ref to a hash which containts
-routingid - a unique id, borrowernumber, ranking, and biblionumber of subscription
-
-=back
-
-=cut
-sub getroutinglist {
-    my ($subscriptionid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare("SELECT routingid, borrowernumber,
-                              ranking, biblionumber FROM subscriptionroutinglist, subscription
-                              WHERE subscription.subscriptionid = subscriptionroutinglist.subscriptionid
-                              AND subscription.subscriptionid = ? ORDER BY ranking ASC
-                              ");
-    $sth->execute($subscriptionid);
-    my @routinglist;
-    my $count=0;
-    while (my $line = $sth->fetchrow_hashref) {
-	$count++;
-	push(@routinglist,$line);
-    }
-    return ($count, at routinglist);
-}
-
-=head2 abouttoexpire
-
-=over 4
-
-$result = &abouttoexpire($subscriptionid)
-
-this function alerts you to the penultimate issue for a serial subscription
-
-returns 1 - if this is the penultimate issue
-returns 0 - if not
-
-=back
-
-=cut
-
-sub abouttoexpire { 
-    my ($subscriptionid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $subscription = GetSubscription($subscriptionid);
-    # we don't do the same test if the subscription is based on X numbers or on X weeks/months
-    if ($subscription->{numberlength}) {
-	my $sth = $dbh->prepare("select count(*) from serial where subscriptionid=?  and planneddate>=?");
-	$sth->execute($subscriptionid,$subscription->{startdate});
-	my $res = $sth->fetchrow;
-	# warn "length: ".$subscription->{numberlength}." vs count: ".$res;
-	if ($subscription->{numberlength}==$res) {
-	    return 1;
-	} else {
-	    return 0;
-	}
-    } else {
-	# a little bit more tricky if based on X weeks/months : search if the latest issue waited is not after subscription startdate + duration
-	my $sth = $dbh->prepare("select max(planneddate) from serial where subscriptionid=?");
-	$sth->execute($subscriptionid);
-	my $res = $sth->fetchrow;
-	my $endofsubscriptiondate;
-my $duration;
-	 $duration=get_duration($subscription->{monthlength}." months") if ($subscription->{monthlength});
-	 $duration=get_duration($subscription->{weeklength}." weeks") if ($subscription->{weeklength});
-
-        $endofsubscriptiondate = DATE_Add_Duration($subscription->{startdate},$duration) ;
-	my $per = $subscription->{'periodicity'};
-	my $x = 0;
-	if ($per == 1) { $x = '1 days'; }
-	if ($per == 2) { $x = '1 weeks'; }
-	if ($per == 3) { $x = '2 weeks'; }
-	if ($per == 4) { $x = '3 weeks'; }
-	if ($per == 5) { $x = '1 months'; }
-	if ($per == 6) { $x = '2 months'; }
-	if ($per == 7 || $per == 8) { $x = '3 months'; }
-	if ($per == 9) { $x = '6 months'; }
-	if ($per == 10) { $x = '1 years'; }
-	if ($per == 11) { $x = '2 years'; }
-	my $duration=get_duration("-".$x) ;
- 	my $datebeforeend = DATE_Add_Duration($endofsubscriptiondate,$duration); # if ($subscription->{weeklength});
-	# warn "DATE BEFORE END: $datebeforeend";
-	return 1 if ($res >= $datebeforeend && $res < $endofsubscriptiondate);
-	return 0;
-    }
-}
-
-
-
-=head2 GetNextDate
-
-=over 4
-
-($resultdate) = &GetNextDate($planneddate,$subscription)
-
-this function  takes the planneddate and will return the next issue's date and will skip dates if there
-exists an irregularity
-- eg if periodicity is monthly and $planneddate is 2007-02-10 but if March and April is to be 
-skipped then the returned date will be 2007-05-10
-
-return :
-$resultdate - then next date in the sequence
-
-=back
-
-=cut
-sub GetNextDate {
-    my ($planneddate,$subscription) = @_;
-    my @irreg = split(/\|/,$subscription->{irregularity});
- my $dateobj=DATE_obj($planneddate);
-    my $dayofweek = $dateobj->day_of_week;
-  my $month=$dateobj->month;
-    my $resultdate;
-
-    if ($subscription->{periodicity} == 1) {
-	my %irreghash;
-	for(my $i=0;$i<@irreg;$i++){
-	$irreghash{$irreg[$i]}=1;
-	}
-my $duration=get_duration("1 days");
-	for(my $i=0;$i<@irreg;$i++){
-	    if($dayofweek == 7){ $dayofweek = 0; }
-
-	    if($irreghash{$dayofweek+1}){
-		$planneddate = DATE_Add_Duration($planneddate,$duration);
-		$dayofweek++;
-	    }
-	}
-	$resultdate=DATE_Add_Duration($planneddate,$duration);
-    }
-    if ($subscription->{periodicity} == 2) {
-	my $wkno = $dateobj->week_number;
-my $duration=get_duration("1 weeks");
-	for(my $i = 0;$i < @irreg; $i++){
-	    if($wkno > 52) { $wkno = 0; } # need to rollover at January
-	    if($irreg[$i] == ($wkno+1)){
-		$planneddate = DATE_Add_Duration($planneddate,$duration);
-		$wkno++;
-	    }
-	}
-	$resultdate=DATE_Add_Duration($planneddate,$duration);
-    }
-    if ($subscription->{periodicity} == 3) {
-	my $wkno = $dateobj->week_number;
-my $duration=get_duration("2 weeks");
-	for(my $i = 0;$i < @irreg; $i++){
-	    if($wkno > 52) { $wkno = 0; } # need to rollover at January
-	    if($irreg[$i] == ($wkno+1)){
-		$planneddate = DATE_Add_Duration($planneddate,$duration);
-		$wkno++;
-	    }
-	}
-	$resultdate=DATE_Add_Duration($planneddate,$duration);
-    }
-    if ($subscription->{periodicity} == 4) {
-	my $wkno = $dateobj->week_number;
-my $duration=get_duration("3 weeks");
-	for(my $i = 0;$i < @irreg; $i++){
-	    if($wkno > 52) { $wkno = 0; } # need to rollover at January
-	    if($irreg[$i] == ($wkno+1)){
-		$planneddate = DATE_Add_Duration($planneddate,$duration);
-		$wkno++;
-	    }
-	}
-	$resultdate=DATE_Add_Duration($planneddate,$duration);
-    }
-    if ($subscription->{periodicity} == 5) {
-my $duration=get_duration("1 months");
-	for(my $i = 0;$i < @irreg; $i++){
-	    # warn $irreg[$i];
-	    # warn $month;
-	    if($month == 12) { $month = 0; } # need to rollover to check January
-	    if($irreg[$i] == ($month+1)){ # check next one to see if is to be skipped
-		$planneddate = DATE_Add_Duration($planneddate,$duration);
-		$month++; # to check if following ones are to be skipped too
-	    }
-	}
-	$resultdate=DATE_Add_Duration($planneddate,$duration);
-    }
-    if ($subscription->{periodicity} == 6) {
-my $duration=get_duration("2 months");
-	for(my $i = 0;$i < @irreg; $i++){
-	    # warn $irreg[$i];
-	    # warn $month;
-	    if($month == 12) { $month = 0; } # need to rollover to check January
-	    if($irreg[$i] == ($month+1)){ # check next one to see if is to be skipped
-		$planneddate = DATE_Add_Duration($planneddate,$duration);
-		$month++; # to check if following ones are to be skipped too
-	    }
-	}
-	$resultdate=DATE_Add_Duration($planneddate,$duration);
-    }
-    if ($subscription->{periodicity} == 7 || $subscription->{periodicity} == 8 ) {
-my $duration=get_duration("3 months");
-	for(my $i = 0;$i < @irreg; $i++){
-	    # warn $irreg[$i];
-	    # warn $month;
-	    if($month == 12) { $month = 0; } # need to rollover to check January
-	    if($irreg[$i] == ($month+1)){ # check next one to see if is to be skipped
-		$planneddate = DATE_Add_Duration($planneddate,$duration);
-		$month++; # to check if following ones are to be skipped too
-	    }
-	}
-	$resultdate=DATE_Add_Duration($planneddate,$duration);
-    }
-
-    if ($subscription->{periodicity} == 9) {
-my $duration=get_duration("6 months");
-	for(my $i = 0;$i < @irreg; $i++){
-	    # warn $irreg[$i];
-	    # warn $month;
-	    if($month == 12) { $month = 0; } # need to rollover to check January
-	    if($irreg[$i] == ($month+1)){ # check next one to see if is to be skipped
-		$planneddate = DATE_Add_Duration($planneddate,$duration);
-		$month++; # to check if following ones are to be skipped too
-	    }
-	}
-	$resultdate=DATE_Add_Duration($planneddate,$duration);
-    }
-    if ($subscription->{periodicity} == 10) {
-my $duration=get_duration("1 years");
-	$resultdate=DATE_Add_Duration($planneddate,$duration);
-    }
-    if ($subscription->{periodicity} == 11) {
-	my $duration=get_duration("2 years");
-	$resultdate=DATE_Add_Duration($planneddate,$duration);
-    }
-    #    warn "date: ".$resultdate;
-    return $resultdate;
-}
-
-
-	
-END { }       # module clean-up code here (global destructor)
-
-1;

Index: C4/Stats.pm
===================================================================
RCS file: C4/Stats.pm
diff -N C4/Stats.pm
--- C4/Stats.pm	15 Nov 2006 01:36:00 -0000	1.28
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,245 +0,0 @@
-package C4::Stats;
-
-# $Id: Stats.pm,v 1.28 2006/11/15 01:36:00 tgarip1957 Exp $
-# Modified by TG
-# 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;
-require Exporter;
-
-use C4::Context;
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Stats - Update Koha statistics (log)
-
-=head1 SYNOPSIS
-
-  use C4::Stats;
-
-=head1 DESCRIPTION
-
-The C<&UpdateStats> function adds an entry to the statistics table in
-the Koha database, which acts as an activity log.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(&UpdateStats &statsreport &TotalOwing
-&TotalPaid &getcharges &Getpaidbranch &unfilledreserves &getcredits &getinvoices);
-
-=item UpdateStats
-
-  &UpdateStats($env, $branch, $type, $value, $other, $itemnumber,
-               $itemtype, $borrowernumber);
-
-Adds a line to the statistics table of the Koha database. In effect,
-it logs an event.
-
-C<$branch>, C<$type>, C<$value>, C<$other>, C<$itemnumber>,
-C<$itemtype>, and C<$borrowernumber> correspond to the fields of the
-statistics table in the Koha database.
-
-If C<$branch> is the empty string, the branch code will be taken from
-C<$env-E<gt>{branchcode}>.
-
-C<$env-E<gt>{usercode}> specifies the value of the C<usercode> field.
-
-=cut
-#'
-sub UpdateStats {
-        #module to insert stats data into stats table
-        my ($env,$branch,$type,$amount,$other,$itemnum,$itemtype,$borrowernumber,$accountno)=@_;
-        my $dbh = C4::Context->dbh;
-	$env=C4::Context->userenv unless $env;
-        if ($branch eq ''){
-                $branch=$env->{'branchcode'};
-        }
-        my $user = C4::Context->userenv;
-#        print $borrowernumber;
-	my $userid=$user->{'cardnumber'} if $user;
-        # FIXME - Use $dbh->do() instead
-        my $sth=$dbh->prepare("Insert into statistics (datetime,branch,type,usercode,value,
-                                        other,itemnumber,itemtype,borrowernumber,proccode) values (now(),?,?,?,?,?,?,?,?,?)");
-        $sth->execute($branch,$type,$userid,$amount,$other,$itemnum,$itemtype,$borrowernumber,$accountno);
-        $sth->finish;
-}
-
-# Otherwise, it'd need a POD.
-sub TotalPaid {
-        my ($time,$time2)=@_;
-        $time2=$time unless $time2;
-        my $dbh = C4::Context->dbh;
-
-
-        my $query="Select * from accountlines,borrowers where (accounttype = 'Pay' or accounttype='W')
-                                        and accountlines.borrowernumber = borrowers.borrowernumber";
-        my @bind = ();
-        if ($time eq 'today'){
-                $query .= " and date = now()";
-        } else {
-                $query.=" and date>=? and date<=?";
-                @bind = ($time,$time2);
-        }
-
-      
-
-
-           $query.=" order by timestamp";
-
-          # print $query;
-
-        my $sth=$dbh->prepare($query);
-
-       # $sth->execute();
-         $sth->execute(@bind);
-        my @results;
-        my $i=0;
-        while (my $data=$sth->fetchrow_hashref){
-                $results[$i]=$data;
-                $i++;
-        }
-        $sth->finish;
-        #  print $query;
-        return(@results);
-}
-
-# Otherwise, it needs a POD.
-sub getcharges{
-        my($borrowerno,$offset,$accountno)=@_;
-        my $dbh = C4::Context->dbh;
-        my $query="";
-        my $sth;
-
-        # getcharges is now taking accountno. as an argument
-        if ($offset){
-              $sth=$dbh->prepare("Select * from accountlines where borrowernumber=?
-              and accountno = ? and amount>0");
-              $sth->execute($borrowerno,$offset);
-
-        # this bit left in for old 2 arg usage of getcharges
-        } else {
-                 $sth=$dbh->prepare("Select * from accountlines where borrowernumber=?
-              and accountno = ?");
-              $sth->execute($borrowerno,$accountno);
-        }
-
-        #  print $query,"<br>";
-        my $i=0;
-        my @results;
-        while (my $data=$sth->fetchrow_hashref){
-        #    if ($data->{'timestamp'} == $timestamp){
-                $results[$i]=$data;
-                $i++;
-        #    }
-        }
-        return(@results);
-}
-
-# Otherwise, it needs a POD.
-sub getcredits{
-        my ($date,$date2)=@_;
-        my $dbh = C4::Context->dbh;
-
-
-
-        my $sth=$dbh->prepare("Select * from accountlines,borrowers where (( (accounttype <> 'Pay'))
-                                   and amount < 0  and accountlines.borrowernumber = borrowers.borrowernumber
-                                   and date >=?  and date <=?)");
-        $sth->execute($date, $date2);
-
-        my $i=0;
-        my @results;
-        while (my $data=$sth->fetchrow_hashref){
-                $results[$i]=$data;
-                $i++;
-        }
-        return(@results);
-}
-
-sub getinvoices{
-        my ($date,$date2)=@_;
-        my $dbh = C4::Context->dbh;
-        my $sth=$dbh->prepare("Select * from accountlines,borrowers where amount>0 and amountoutstanding > 0  and accountlines.borrowernumber = borrowers.borrowernumber
-                                   and (date >=?  and date <=?)");
-        $sth->execute($date, $date2);
-
-        my $i=0;
-        my @results;
-        while (my $data=$sth->fetchrow_hashref){
-                $results[$i]=$data;
-                $i++;
-        }
-        return(@results);
-}
-
-
-# Otherwise, this needs a POD.
-sub Getpaidbranch{
-        my($date,$borrno)=@_;
-        my $dbh = C4::Context->dbh;
-        my $sth=$dbh->prepare("select * from statistics where type='payment' and datetime >? and  borrowernumber=?");
-        $sth->execute($date,$borrno);
-        #  print $query;
-        my $data=$sth->fetchrow_hashref;
-        $sth->finish;
-        return($data->{'branch'});
-}
-
-# FIXME - This is only used in reservereport.pl and reservereport.xls,
-# neither of which is used.
-# Otherwise, it needs a POD.
-sub unfilledreserves {
-        my $dbh = C4::Context->dbh;
-      
-        my $i=0;
-        my @results;
-       
-   my     $sth=$dbh->prepare("select *,biblio.title from reserves,biblio,borrowers where (found <> '1' or found is NULL) and cancellationdate
-                is NULL and biblio.biblionumber=reserves.biblionumber  and
-                reserves.borrowernumber=borrowers.borrowernumber
-                order by
-                reserves.reservedate,biblio.title");
-        $sth->execute;
-        while (my $data=$sth->fetchrow_hashref){
-                $results[$i]=$data;
-                $i++;
-        }
-        $sth->finish;
-        return($i,\@results);
-}
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut
-

Index: C4/Suggestions.pm
===================================================================
RCS file: C4/Suggestions.pm
diff -N C4/Suggestions.pm
--- C4/Suggestions.pm	20 Sep 2006 21:48:44 -0000	1.16
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,463 +0,0 @@
-package C4::Suggestions;
-
-# 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
-
-# $Id: Suggestions.pm,v 1.16 2006/09/20 21:48:44 tgarip1957 Exp $
-
-use strict;
-require Exporter;
-use C4::Context;
-use C4::Output;
-use Mail::Sendmail;
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.16 $' =~ /\d+/g;
-  shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
-
-=head1 NAME
-
-C4::Suggestions - Some useful functions for dealings with suggestions.
-
-=head1 SYNOPSIS
-
-use C4::Suggestions;
-
-=head1 DESCRIPTION
-
-=over 4
-
-The functions in this module deal with the suggestions in OPAC and in librarian interface
-
-A suggestion is done in the OPAC. It has the status "ASKED"
-
-When a librarian manages the suggestion, he can set the status to "REJECTED" or "ACCEPTED".
-
-When the book is ordered, the suggestion status becomes "ORDERED"
-
-When a book is ordered and arrived in the library, the status becomes "AVAILABLE"
-
-All suggestions of a borrower can be seen by the borrower itself.
-Suggestions done by other borrowers can be seen when not "AVAILABLE"
-
-=back
-
-=head1 FUNCTIONS
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-    &NewSuggestion
-    &SearchSuggestion
-    &GetSuggestion
-    &DelSuggestion
-    &CountSuggestion
-    &ModStatus
-    &ConnectSuggestionAndBiblio
-    &GetSuggestionFromBiblionumber
- );
-
-=head2 SearchSuggestion
-
-=over 4
-
-(\@array) = &SearchSuggestion($user,$author,$title,$publishercode,$status,$suggestedbyme)
-
-searches for a suggestion
-
-return :
-C<\@array> : the suggestions found. Array of hash.
-Note the status is stored twice :
-* in the status field
-* as parameter ( for example ASKED => 1, or REJECTED => 1) . This is for template & translation purposes.
-
-=back
-
-=cut
-
-sub SearchSuggestion  {
-    my ($user,$author,$title,$publishercode,$status,$suggestedbyme)=@_;
-    my $dbh = C4::Context->dbh;
-    my $query = qq|
-    SELECT suggestions.*,
-        U1.surname   AS surnamesuggestedby,
-        U1.firstname AS firstnamesuggestedby,
-        U2.surname   AS surnamemanagedby,
-        U2.firstname AS firstnamemanagedby
-    FROM suggestions
-    LEFT JOIN borrowers AS U1 ON suggestedby=U1.borrowernumber
-    LEFT JOIN borrowers AS U2 ON managedby=U2.borrowernumber
-    WHERE 1=1 |;
-
-    my @sql_params;
-    if ($author) {
-       push @sql_params,"%".$author."%";
-       $query .= " and author like ?";
-    }
-    if ($title) {
-        push @sql_params,"%".$title."%";
-        $query .= " and suggestions.title like ?";
-    }
-    if ($publishercode) {
-        push @sql_params,"%".$publishercode."%";
-        $query .= " and publishercode like ?";
-    }
-    if ($status) {
-        push @sql_params,$status;
-        $query .= " and status=?";
-    }
-
-    if (C4::Context->preference("IndependantBranches")) {
-        my $userenv = C4::Context->userenv;
-        if ($userenv) {
-            unless ($userenv->{flags} == 1){
-                push @sql_params,$userenv->{branch};
-                $query .= " and (U1.branchcode = ? or U1.branchcode ='')";
-            }
-        }
-    }
-    if ($suggestedbyme) {
-        unless ($suggestedbyme eq -1) {
-            push @sql_params,$user;
-            $query .= " and suggestedby=?";
-        }
-    } else {
-        $query .= " and managedby is NULL";
-    }
-    my $sth=$dbh->prepare($query);
-    $sth->execute(@sql_params);
-    my @results;
-    my $even=1; # the even variable is used to set even / odd lines, for highlighting
-    while (my $data=$sth->fetchrow_hashref){
-        $data->{$data->{STATUS}} = 1;
-        if ($even) {
-            $even=0;
-            $data->{even}=1;
-        } else {
-            $even=1;
-        }
-        push(@results,$data);
-    }
-    return (\@results);
-}
-
-=head2 GetSuggestion
-
-=over 4
-
-\%sth = &GetSuggestion($suggestionid)
-
-this function get the detail of the suggestion $suggestionid (input arg)
-
-return :
-    the result of the SQL query as a hash : $sth->fetchrow_hashref.
-
-=back
-
-=cut
-sub GetSuggestion {
-    my ($suggestionid) = @_;
-    my $dbh = C4::Context->dbh;
-    my $query = qq|
-        SELECT *
-        FROM   suggestions
-        WHERE  suggestionid=?
-    |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute($suggestionid);
-    return($sth->fetchrow_hashref);
-}
-
-=head2 GetSuggestionFromBiblionumber
-
-=over 4
-
-$suggestionid = &GetSuggestionFromBiblionumber($dbh,$biblionumber)
-
-Get a suggestion from it's biblionumber.
-
-return :
-the id of the suggestion which is related to the biblionumber given on input args.
-
-=back
-
-=cut
-sub GetSuggestionFromBiblionumber {
-    my ($dbh,$biblionumber) = @_;
-    my $query = qq|
-        SELECT suggestionid
-        FROM   suggestions
-        WHERE  biblionumber=?
-    |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute($biblionumber);
-    my ($suggestionid) = $sth->fetchrow;
-    return $suggestionid;
-}
-
-
-=head2 CountSuggestion
-
-=over 4
-
-&CountSuggestion($status)
-
-Count the number of suggestions with the status given on input argument.
-the arg status can be :
-
-=over
-
-=over
-
-=item * ASKED : asked by the user, not dealed by the librarian
-
-=item * ACCEPTED : accepted by the librarian, but not yet ordered
-
-=item * REJECTED : rejected by the librarian (definitive status)
-
-=item * ORDERED : ordered by the librarian (acquisition module)
-
-=back
-
-=back
-
-return :
-the number of suggestion with this status.
-
-=back
-
-=cut
-sub CountSuggestion {
-    my ($status) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth;
-    if (C4::Context->preference("IndependantBranches")){
-        my $userenv = C4::Context->userenv;
-        if ($userenv->{flags} == 1){
-            my $query = qq |
-                SELECT count(*)
-                FROM   suggestions
-                WHERE  status=?
-            |;
-            $sth = $dbh->prepare($query);
-            $sth->execute($status);
-        }
-        else {
-            my $query = qq |
-                SELECT count(*)
-                FROM suggestions,borrowers
-                WHERE status=?
-                AND borrowers.borrowernumber=suggestions.suggestedby
-                AND (borrowers.branchcode='' OR borrowers.branchcode =?)
-            |;
-            $sth = $dbh->prepare($query);
-            $sth->execute($status,$userenv->{branch});
-        }
-    }
-    else {
-        my $query = qq |
-            SELECT count(*)
-            FROM suggestions
-            WHERE status=?
-        |;
-         $sth = $dbh->prepare($query);
-        $sth->execute($status);
-    }
-    my ($result) = $sth->fetchrow;
-    return $result;
-}
-
-=head2 NewSuggestion
-
-
-=over 4
-
-&NewSuggestion($borrowernumber,$title,$author,$publishercode,$note,$copyrightdate,$volumedesc,$publicationyear,$place,$isbn,$biblionumber)
-
-Insert a new suggestion on database with value given on input arg.
-
-=back
-
-=cut
-sub NewSuggestion {
-    my ($borrowernumber,$title,$author,$publishercode,$note,$copyrightdate,$volumedesc,$publicationyear,$place,$isbn,$biblionumber) = @_;
-    my $dbh = C4::Context->dbh;
-
-    my $query = qq |
-        INSERT INTO suggestions
-            (status,suggestedby,title,author,publishercode,note,copyrightdate,
-            volumedesc,publicationyear,place,isbn,biblionumber)
-        VALUES ('ASKED',?,?,?,?,?,?,?,?,?,?,?)
-    |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute($borrowernumber,$title,$author,$publishercode,$note,$copyrightdate,$volumedesc,$publicationyear,$place,$isbn,$biblionumber);
-}
-
-=head2 ModStatus
-
-=over 4
-
-&ModStatus($suggestionid,$status,$managedby,$biblionumber)
-
-Modify the status (status can be 'ASKED', 'ACCEPTED', 'REJECTED', 'ORDERED')
-and send a mail to notify the user that did the suggestion.
-
-Note that there is no function to modify a suggestion : only the status can be modified, thus the name of the function.
-
-=back
-
-=cut
-sub ModStatus {
-    my ($suggestionid,$status,$managedby,$biblionumber,$input) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth;
-    if ($managedby>0) {
-        if ($biblionumber) {
-        my $query = qq|
-            UPDATE suggestions
-            SET    status=?,managedby=?,biblionumber=?
-            WHERE  suggestionid=?
-        |;
-        $sth = $dbh->prepare($query);
-        $sth->execute($status,$managedby,$biblionumber,$suggestionid);
-        } else {
-            my $query = qq|
-                UPDATE suggestions
-                SET    status=?,managedby=?
-                WHERE  suggestionid=?
-            |;
-            $sth = $dbh->prepare($query);
-            $sth->execute($status,$managedby,$suggestionid);
-        }
-   } else {
-        if ($biblionumber) {
-            my $query = qq|
-                UPDATE suggestions
-                SET    status=?,biblionumber=?
-                WHERE  suggestionid=?
-            |;
-            $sth = $dbh->prepare($query);
-            $sth->execute($status,$biblionumber,$suggestionid);
-        }
-        else {
-            my $query = qq|
-                UPDATE suggestions
-                SET    status=?
-                WHERE  suggestionid=?
-            |;
-            $sth = $dbh->prepare($query);
-            $sth->execute($status,$suggestionid);
-        }
-    }
-    # check mail sending.
-    my $queryMail = qq|
-        SELECT suggestions.*,
-            boby.surname AS bysurname,
-            boby.firstname AS byfirstname,
-            boby.emailaddress AS byemail,
-            lib.surname AS libsurname,
-            lib.firstname AS libfirstname,
-            lib.emailaddress AS libemail
-        FROM suggestions
-            LEFT JOIN borrowers AS boby ON boby.borrowernumber=suggestedby
-            LEFT JOIN borrowers AS lib ON lib.borrowernumber=managedby
-        WHERE suggestionid=?
-    |;
-    $sth = $dbh->prepare($queryMail);
-    $sth->execute($suggestionid);
-    my $emailinfo = $sth->fetchrow_hashref;
-if ($emailinfo->{byemail}){
-    my $template = gettemplate("suggestion/mail_suggestion_$status.tmpl","intranet",$input);
-
-    $template->param(
-        byemail => $emailinfo->{byemail},
-        libemail => $emailinfo->{libemail},
-        status => $emailinfo->{status},
-        title => $emailinfo->{title},
-        author =>$emailinfo->{author},
-        libsurname => $emailinfo->{libsurname},
-        libfirstname => $emailinfo->{libfirstname},
-        byfirstname => $emailinfo->{byfirstname},
-        bysurname => $emailinfo->{bysurname},
-    );
-    my %mail = (
-        To => $emailinfo->{byemail},
-        From => $emailinfo->{libemail},
-        Subject => 'Koha suggestion',
-        Message => "".$template->output
-    );
-    sendmail(%mail);
-}
-}
-
-=head2 ConnectSuggestionAndBiblio
-
-=over 4
-&ConnectSuggestionAndBiblio($suggestionid,$biblionumber)
-
-connect a suggestion to an existing biblio
-
-=back
-
-=cut
-sub ConnectSuggestionAndBiblio {
-    my ($suggestionid,$biblionumber) = @_;
-    my $dbh=C4::Context->dbh;
-    my $query = qq |
-        UPDATE suggestions
-        SET    biblionumber=?
-        WHERE  suggestionid=?
-    |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute($biblionumber,$suggestionid);
-}
-
-=head2 DelSuggestion
-
-=over 4
-
-&DelSuggestion($borrowernumber,$suggestionid)
-
-Delete a suggestion. A borrower can delete a suggestion only if he is its owner.
-
-=back
-
-=cut
-
-sub DelSuggestion {
-    my ($borrowernumber,$suggestionid) = @_;
-    my $dbh = C4::Context->dbh;
-    # check that the suggestion comes from the suggestor
-    my $query = qq |
-        SELECT suggestedby
-        FROM   suggestions
-        WHERE  suggestionid=?
-    |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute($suggestionid);
-    my ($suggestedby) = $sth->fetchrow;
-    if ($suggestedby eq $borrowernumber) {
-        my $queryDelete = qq|
-            DELETE FROM suggestions
-            WHERE suggestionid=?
-        |;
-        $sth = $dbh->prepare($queryDelete);
-        $sth->execute($suggestionid);
-    }
-}
\ No newline at end of file

Index: C4/Z3950.pm
===================================================================
RCS file: C4/Z3950.pm
diff -N C4/Z3950.pm
--- C4/Z3950.pm	6 Sep 2006 16:21:03 -0000	1.13
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,377 +0,0 @@
-package C4::Z3950;
-
-# $Id: Z3950.pm,v 1.13 2006/09/06 16:21:03 tgarip1957 Exp $
-
-# Routines for handling Z39.50 lookups
-
-# Koha library project  www.koha.org
-
-# Licensed under the GPL
-
-
-# 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;
-
-# standard or CPAN modules used
-
-# Koha modules used
-use C4::Context;
-use C4::Input;
-use C4::Biblio;
-
-#------------------
-
-require Exporter;
-
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Z3950 - Functions dealing with Z39.50 queries
-
-=head1 SYNOPSIS
-
-  use C4::Z3950;
-
-=head1 DESCRIPTION
-
-This module contains functions for looking up Z39.50 servers, and for
-entering Z39.50 lookup requests.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-	&getz3950servers
-	&z3950servername
-	&addz3950queue
-	&checkz3950searchdone
-);
-
-#------------------------------------------------
-=item getz3950servers
-
-  @servers= &getz3950servers(checked);
-
-Returns the list of declared z3950 servers
-
-C<$checked> should always be true (1) => returns only active servers.
-If 0 => returns all servers
-
-=cut
-sub getz3950servers {
-	my ($checked) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth;
-	if ($checked) {
-		$sth = $dbh->prepare("select * from z3950servers where checked=1");
-	} else {
-		$sth = $dbh->prepare("select * from z3950servers");
-	}
-	my @result;
-	while ( my ($host, $port, $db, $userid, $password,$servername) = $sth->fetchrow ) {
-		push @result, "$servername/$host\:$port/$db/$userid/$password";
-	} # while
-	return @result;
-}
-
-=item z3950servername
-
-  $name = &z3950servername($dbh, $server_id, $default_name);
-
-Looks up a Z39.50 server by ID number, and returns its full name. If
-the server is not found, returns C<$default_name>.
-
-C<$server_id> is the Z39.50 server ID to look up.
-
-C<$dbh> is ignored.
-
-=cut
-#'
-
-sub z3950servername {
-	# inputs
-	my ($srvid,		# server id number
-		$default,)=@_;
-	# return
-	my $longname;
-	#----
-
-	my $dbh = C4::Context->dbh;
-
-	my $sti=$dbh->prepare("select name from z3950servers where id=?");
-
-	$sti->execute($srvid);
-	if ( ! $sti->err ) {
-		($longname)=$sti->fetchrow;
-	}
-	if (! $longname) {
-		$longname="$default";
-	}
-		return $longname;
-} # sub z3950servername
-
-#---------------------------------------
-
-=item addz3950queue
-
-  $errmsg = &addz3950queue($query, $type, $request_id, @servers);
-
-Adds a Z39.50 search query for the Z39.50 server to look up.
-
-C<$query> is the term to search for.
-
-C<$type> is the query type, e.g. C<isbn>, C<lccn>, etc.
-
-C<$request_id> is a unique string that will identify this query.
-
-C<@servers> is a list of servers to query (obviously, this can be
-given either as an array, or as a list of scalars). Each element may
-be either a Z39.50 server ID from the z3950server table of the Koha
-database, the string C<DEFAULT> or C<CHECKED>, or a complete server
-specification containing a colon.
-
-C<DEFAULT> and C<CHECKED> are synonymous, and refer to those servers
-in the z3950servers table whose 'checked' field is set and non-NULL.
-
-Once the query has been submitted to the Z39.50 daemon,
-C<&addz3950queue> sends a SIGHUP to the daemon to tell it to process
-this new request.
-
-C<&addz3950queue> returns an error message. If it was successful, the
-error message is the empty string.
-
-=cut
-#'
-sub addz3950queue {
-	use strict;
-	# input
-	my (
-		$query,		# value to look up
-		$type,			# type of value ("isbn", "lccn", "title", "author", "keyword")
-		$requestid,	# Unique value to prevent duplicate searches from multiple HTML form submits
-		@z3950list,	# list of z3950 servers to query
-	)=@_;
-	# Returns:
-	my $error;
-
-	my (
-		$sth,
-		@serverlist,
-		$server,
-		$failed,
-		$servername,
-	);
-
-	# FIXME - Should be configurable, probably in /etc/koha.conf.
-	my $pidfile='/var/log/koha/processz3950queue.pid';
-
-	$error="";
-
-	my $dbh = C4::Context->dbh;
-	# list of servers: entry can be a fully qualified URL-type entry
-	#   or simply just a server ID number.
-	foreach $server (@z3950list) {
-		if ($server =~ /:/ ) {
-			push @serverlist, $server;
-		} elsif ($server eq 'DEFAULT' || $server eq 'CHECKED' ) {
-			$sth=$dbh->prepare("select host,port,db,userid,password ,name,syntax from z3950servers where checked <> 0 ");
-			$sth->execute;
-			while ( my ($host, $port, $db, $userid, $password,$servername,$syntax) = $sth->fetchrow ) {
-				push @serverlist, "$servername/$host\:$port/$db/$userid/$password/$syntax";
-			} # while
-		} else {
-			$sth=$dbh->prepare("select host,port,db,userid,password,syntax from z3950servers where id=? ");
-			$sth->execute($server);
-			my ($host, $port, $db, $userid, $password,$syntax) = $sth->fetchrow;
-			push @serverlist, "$server/$host\:$port/$db/$userid/$password/$syntax";
-		}
-	}
-
-	my $serverlist='';
-
-	$serverlist = join("|", @serverlist);
-# 	chop $serverlist;
-
-	# FIXME - Is this test supposed to test whether @serverlist is
-	# empty? If so, then a) there are better ways to do that in
-	# Perl (e.g., "if (@serverlist eq ())"), and b) it doesn't
-	# work anyway, since it checks whether $serverlist is composed
-	# of one or more spaces, which is never the case, not even
-	# when there are 0 or 1 elements in @serverlist.
-	if ( $serverlist !~ /^ +$/ ) {
-		# Don't allow reinsertion of the same request identifier.
-		$sth=$dbh->prepare("select identifier from z3950queue
-			where identifier=?");
-		$sth->execute($requestid);
-		if ( ! $sth->rows) {
-			$sth=$dbh->prepare("insert into z3950queue (term,type,servers, identifier) values (?, ?, ?, ?)");
-			$sth->execute($query, $type, $serverlist, $requestid);
-			if ( -r $pidfile ) {
-				# FIXME - Perl is good at opening files. No need to
-				# spawn a separate 'cat' process.
-				my $pid=`cat $pidfile`;
-				chomp $pid;
-				warn "PID : $pid";
-				# Kill -HUP the Z39.50 daemon to tell it to process
-				# this query.
-				my $processcount=kill 1, $pid;
-				if ($processcount==0) {
-					$error.="Z39.50 search daemon error: no process signalled. ";
-				}
-			} else {
-				# FIXME - Error-checking like this should go close
-				# to the test.
-				$error.="No Z39.50 search daemon running: no file $pidfile. ";
-			} # if $pidfile
-		} else {
-			# FIXME - Error-checking like this should go close
-			# to the test.
-			$error.="Duplicate request ID $requestid. ";
-		} # if rows
-	} else {
-		# FIXME - Error-checking like this should go close to the
-		# test. I.e.,
-		#	return "No Z39.50 search servers specified. "
-		#		if @serverlist eq ();
-
-		# server list is empty
-		$error.="No Z39.50 search servers specified. ";
-	} # if serverlist empty
-
-	return $error;
-
-} # sub addz3950queue
-
-=item &checkz3950searchdone
-
-  $numberpending= &	&checkz3950searchdone($random);
-
-Returns the number of pending z3950 requests
-
-C<$random> is the random z3950 query number.
-
-=cut
-sub checkz3950searchdone {
-	my ($z3950random) = @_;
-	my $dbh = C4::Context->dbh;
-	# first, check that the deamon already created the requests...
-	my $sth = $dbh->prepare("select count(*) from z3950queue,z3950results where z3950queue.id = z3950results.queryid and z3950queue.identifier=?");
-	$sth->execute($z3950random);
-	my ($result) = $sth->fetchrow;
-	if ($result eq 0) { # search not yet begun => should be searches to do !
-		return "??";
-	}
-	# second, count pending requests
-	$sth = $dbh->prepare("select count(*) from z3950queue,z3950results where z3950queue.id = z3950results.queryid and z3950results.enddate is null and z3950queue.identifier=?");
-	$sth->execute($z3950random);
-	($result) = $sth->fetchrow;
-	return $result;
-}
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut
-
-#--------------------------------------
-# $Log: Z3950.pm,v $
-# Revision 1.13  2006/09/06 16:21:03  tgarip1957
-# Clean up before final commits
-#
-# Revision 1.10  2003/10/01 15:08:14  tipaul
-# fix fog bug #622 : processz3950queue fails
-#
-# Revision 1.9  2003/04/29 16:50:51  tipaul
-# really proud of this commit :-)
-# z3950 search and import seems to works fine.
-# Let me explain how :
-# * a "search z3950" button is added in the addbiblio template.
-# * when clicked, a popup appears and z3950/search.pl is called
-# * z3950/search.pl calls addz3950search in the DB
-# * the z3950 daemon retrieve the records and stores them in z3950results AND in marc_breeding table.
-# * as long as there as searches pending, the popup auto refresh every 2 seconds, and says how many searches are pending.
-# * when the user clicks on a z3950 result => the parent popup is called with the requested biblio, and auto-filled
-#
-# Note :
-# * character encoding support : (It's a nightmare...) In the z3950servers table, a "encoding" column has been added. You can put "UNIMARC" or "USMARC" in this column. Depending on this, the char_decode in C4::Biblio.pm replaces marc-char-encode by an iso 8859-1 encoding. Note that in the breeding import this value has been added too, for a better support.
-# * the marc_breeding and z3950* tables have been modified : they have an encoding column and the random z3950 number is stored too for convenience => it's the key I use to list only requested biblios in the popup.
-#
-# Revision 1.8  2003/04/29 08:09:45  tipaul
-# z3950 support is coming...
-# * adding a syntax column in z3950 table = this column will say wether the z3950 must be called with PerferedRecordsyntax => USMARC or PerferedRecordsyntax => UNIMARC. I tried some french UNIMARC z3950 servers, and some only send USMARC, some only UNIMARC, some can answer with both.
-# Note this is a 1st draft. More to follow (today ? I hope).
-#
-# Revision 1.7  2003/02/19 01:01:06  wolfpac444
-# Removed the unecessary $dbh argument from being passed.
-# Resolved a few minor FIXMEs.
-#
-# Revision 1.6  2002/10/13 08:30:53  arensb
-# Deleted unused variables.
-# Removed trailing whitespace.
-#
-# Revision 1.5  2002/10/13 06:13:23  arensb
-# Removed bogus #! line (this isn't a script!)
-# Removed unused global variables.
-# Added POD.
-# Added some explanatory comments.
-# Added some FIXME comments.
-#
-# Revision 1.4  2002/10/11 12:35:35  arensb
-# Replaced &requireDBI with C4::Context->dbh
-#
-# Revision 1.3  2002/08/14 18:12:52  tonnesen
-# Added copyright statement to all .pl and .pm files
-#
-# Revision 1.2  2002/07/02 20:31:33  tonnesen
-# module added from rel-1-2 branch
-#
-# Revision 1.1.2.5  2002/06/29 17:33:47  amillar
-# Allow DEFAULT as input to addz3950search.
-# Check for existence of pid file (cat crashed otherwise).
-# Return error messages in addz3950search.
-#
-# Revision 1.1.2.4  2002/06/28 18:07:27  tonnesen
-# marcimport.pl will print an error message if it can not signal the
-# processz3950queue program.  The message contains instructions for starting the
-# daemon.
-#
-# Revision 1.1.2.3  2002/06/28 17:45:39  tonnesen
-# z3950queue now listens for a -HUP signal before processing the queue.  Z3950.pm
-# sends the -HUP signal when queries are added to the queue.
-#
-# Revision 1.1.2.2  2002/06/26 20:54:31  tonnesen
-# use warnings breaks on perl 5.005...
-#
-# Revision 1.1.2.1  2002/06/26 07:26:41  amillar
-# New module for Z39.50 searching
-#

Index: C4/Calendar/Calendar.pm
===================================================================
RCS file: C4/Calendar/Calendar.pm
diff -N C4/Calendar/Calendar.pm
--- C4/Calendar/Calendar.pm	6 Nov 2006 21:01:43 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,578 +0,0 @@
-package C4::Calendar::Calendar;
-
-# 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;
-require Exporter;
-use vars qw($VERSION @EXPORT);
-
-use C4::Context;
-
-use C4::Date;
-
-# set the version for version checking
-$VERSION = 1.01;
-
-=head1 NAME
-
-C4::Calendar::Calendar - Koha module dealing with holidays.
-
-=head1 SYNOPSIS
-
-	use C4::Calendar::Calendar;
-
-=head1 DESCRIPTION
-
-This package is used to deal with holidays. Through this package, you can set all kind of holidays for the library.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at EXPORT = qw(&new 
-             &change_branchcode 
-			 &get_week_days_holidays 
-			 &get_day_month_holidays 
-             &get_exception_holidays 
-			 &get_single_holidays 
-			 &insert_week_day_holiday 
-			 &insert_day_month_holiday 
-			 &insert_single_holiday 
-			 &insert_exception_holiday
-			 &delete_holiday 
-			 &isHoliday 
-			 &addDate
-			 &daysBetween);
-
-=item new
-
-	$calendar = C4::Calendar::Calendar->new(branchcode => $branchcode);
-
-C<$branchcode> Is the branch code wich you want to use calendar.
-
-=cut
-
-sub new {
-	my $classname = shift @_;
-	my %options = @_;
-
-	my %hash;
-	my $self = bless(\%hash, $classname);
-
-	foreach my $optionName (keys %options) {
-		$self->{lc($optionName)} = $options{$optionName};
-	}
-
-	$self->_init;
-
-	return $self;
-}
-
-sub _init {
-	my $self = shift @_;
-
-	my $dbh = C4::Context->dbh();
-	my $week_days_sql = $dbh->prepare("select weekday, title, description from repeatable_holidays where ('$self->{branchcode}' = branchcode) and (NOT(ISNULL(weekday)))");
-	$week_days_sql->execute;
-	my %week_days_holidays;
-	while (my ($weekday, $title, $description) = $week_days_sql->fetchrow) {
-		$week_days_holidays{$weekday}{title} = $title;
-		$week_days_holidays{$weekday}{description} = $description;
-	}
-	$week_days_sql->finish;
-	$self->{'week_days_holidays'} = \%week_days_holidays;
-
-	my $day_month_sql = $dbh->prepare("select day, month, title, description from repeatable_holidays where ('$self->{branchcode}' = branchcode) and ISNULL(weekday)");
-	$day_month_sql->execute;
-	my %day_month_holidays;
-	while (my ($day, $month, $title, $description) = $day_month_sql->fetchrow) {
-		$day_month_holidays{"$month/$day"}{title} = $title;
-		$day_month_holidays{"$month/$day"}{description} = $description;
-	}
-	$day_month_sql->finish;
-	$self->{'day_month_holidays'} = \%day_month_holidays;
-
-	my $exception_holidays_sql = $dbh->prepare("select day, month, year, title, description from special_holidays where ('$self->{branchcode}' = branchcode) and (isexception = 1)");
-	$exception_holidays_sql->execute;
-	my %exception_holidays;
-	while (my ($day, $month, $year, $title, $description) = $exception_holidays_sql->fetchrow) {
-		$exception_holidays{"$year/$month/$day"}{title} = $title;
-		$exception_holidays{"$year/$month/$day"}{description} = $description;
-	}
-	$exception_holidays_sql->finish;
-	$self->{'exception_holidays'} = \%exception_holidays;
-
-	my $holidays_sql = $dbh->prepare("select day, month, year, title, description from special_holidays where ('$self->{branchcode}' = branchcode) and (isexception = 0)");
-	$holidays_sql->execute;
-	my %single_holidays;
-	while (my ($day, $month, $year, $title, $description) = $holidays_sql->fetchrow) {
-		$single_holidays{"$year/$month/$day"}{title} = $title;
-		$single_holidays{"$year/$month/$day"}{description} = $description;
-	}
-	$holidays_sql->finish;
-	$self->{'single_holidays'} = \%single_holidays;
-}
-
-=item change_branchcode
-
-	$calendar->change_branchcode(branchcode => $branchcode)
-
-Change the calendar branch code. This means to change the holidays structure.
-
-C<$branchcode> Is the branch code wich you want to use calendar.
-
-=cut
-
-sub change_branchcode {
-	my ($self, $branchcode) = @_;
-	my %options = @_;
-
-	foreach my $optionName (keys %options) {
-		$self->{lc($optionName)} = $options{$optionName};
-	}
-	$self->_init;
-
-	return $self;
-}
-
-=item get_week_days_holidays
-
-	$week_days_holidays = $calendar->get_week_days_holidays();
-
-Returns a hash reference to week days holidays.
-
-=cut
-
-sub get_week_days_holidays {
-	my $self = shift @_;
-	my $week_days_holidays = $self->{'week_days_holidays'};
-	return $week_days_holidays;
-}
-
-=item get_day_month_holidays
-	
-	$day_month_holidays = $calendar->get_day_month_holidays();
-
-Returns a hash reference to day month holidays.
-
-=cut
-
-sub get_day_month_holidays {
-	my $self = shift @_;
-	my $day_month_holidays = $self->{'day_month_holidays'};
-	return $day_month_holidays;
-}
-
-=item get_exception_holidays
-	
-	$exception_holidays = $calendar->exception_holidays();
-
-Returns a hash reference to exception holidays. This kind of days are those
-which stands for a holiday, but you wanted to make an exception for this particular
-date.
-
-=cut
-
-sub get_exception_holidays {
-	my $self = shift @_;
-	my $exception_holidays = $self->{'exception_holidays'};
-	return $exception_holidays;
-}
-
-=item get_single_holidays
-	
-	$single_holidays = $calendar->get_single_holidays();
-
-Returns a hash reference to single holidays. This kind of holidays are those which
-happend just one time.
-
-=cut
-
-sub get_single_holidays {
-	my $self = shift @_;
-	my $single_holidays = $self->{'single_holidays'};
-	return $single_holidays;
-}
-
-=item insert_week_day_holiday
-
-	insert_week_day_holiday(weekday => $weekday,
-							title => $title,
-							description => $description);
-
-Inserts a new week day for $self->{branchcode}.
-
-C<$day> Is the week day to make holiday.
-
-C<$title> Is the title to store for the holiday formed by $year/$month/$day.
-
-C<$description> Is the description to store for the holiday formed by $year/$month/$day.
-
-=cut
-
-sub insert_week_day_holiday {
-	my $self = shift @_;
-	my %options = @_;
-
-	my $dbh = C4::Context->dbh();
-	my $insertHoliday = $dbh->prepare("insert into repeatable_holidays (id,branchcode,weekday,day,month,title,description) values ('', '$self->{branchcode}', $options{weekday}, NULL, NULL, '$options{title}', '$options{description}')");
-	$insertHoliday->execute;
-	$insertHoliday->finish;
-
-	$self->{'week_days_holidays'}->{$options{weekday}}{title} = $options{title};
-	$self->{'week_days_holidays'}->{$options{weekday}}{description} = $options{description};
-	return $self;
-}
-
-=item insert_day_month_holiday
-
-	insert_day_month_holiday(day => $day,
-	                         month => $month,
-							 title => $title,
-							 description => $description);
-
-Inserts a new day month holiday for $self->{branchcode}.
-
-C<$day> Is the day month to make the date to insert.
-
-C<$month> Is month to make the date to insert.
-
-C<$title> Is the title to store for the holiday formed by $year/$month/$day.
-
-C<$description> Is the description to store for the holiday formed by $year/$month/$day.
-
-=cut
-
-sub insert_day_month_holiday {
-	my $self = shift @_;
-	my %options = @_;
-
-	my $dbh = C4::Context->dbh();
-	my $insertHoliday = $dbh->prepare("insert into repeatable_holidays (id,branchcode,weekday,day,month,title,description) values ('', '$self->{branchcode}', NULL, $options{day}, $options{month}, '$options{title}', '$options{description}')");
-	$insertHoliday->execute;
-	$insertHoliday->finish;
-
-	$self->{'day_month_holidays'}->{"$options{month}/$options{day}"}{title} = $options{title};
-	$self->{'day_month_holidays'}->{"$options{month}/$options{day}"}{description} = $options{description};
-	return $self;
-}
-
-=item insert_single_holiday
-
-	insert_single_holiday(day => $day,
-	                      month => $month,
-						  year => $year,
-						  title => $title,
-						  description => $description);
-
-Inserts a new single holiday for $self->{branchcode}.
-
-C<$day> Is the day month to make the date to insert.
-
-C<$month> Is month to make the date to insert.
-
-C<$year> Is year to make the date to insert.
-
-C<$title> Is the title to store for the holiday formed by $year/$month/$day.
-
-C<$description> Is the description to store for the holiday formed by $year/$month/$day.
-
-=cut
-
-sub insert_single_holiday {
-	my $self = shift @_;
-	my %options = @_;
-
-	my $dbh = C4::Context->dbh();
-	my $isexception = 0;
-	my $insertHoliday = $dbh->prepare("insert into special_holidays (id,branchcode,day,month,year,isexception,title,description) values ('', '$self->{branchcode}', $options{day}, $options{month}, $options{year}, $isexception, '$options{title}', '$options{description}')");
-	$insertHoliday->execute;
-	$insertHoliday->finish;
-
-	$self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"}{title} = $options{title};
-	$self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"}{description} = $options{description};
-	return $self;
-}
-
-=item insert_exception_holiday
-
-	insert_exception_holiday(day => $day,
-	                         month => $month,
-						     year => $year,
-						     title => $title,
-						     description => $description);
-
-Inserts a new exception holiday for $self->{branchcode}.
-
-C<$day> Is the day month to make the date to insert.
-
-C<$month> Is month to make the date to insert.
-
-C<$year> Is year to make the date to insert.
-
-C<$title> Is the title to store for the holiday formed by $year/$month/$day.
-
-C<$description> Is the description to store for the holiday formed by $year/$month/$day.
-
-=cut
-
-sub insert_exception_holiday {
-	my $self = shift @_;
-	my %options = @_;
-
-	my $dbh = C4::Context->dbh();
-	my $isexception = 1;
-	my $insertException = $dbh->prepare("insert into special_holidays (id,branchcode,day,month,year,isexception,title,description) values ('', '$self->{branchcode}', $options{day}, $options{month}, $options{year}, $isexception, '$options{title}', '$options{description}')");
-	$insertException->execute;
-	$insertException->finish;
-
-	$self->{'exceptions_holidays'}->{"$options{year}/$options{month}/$options{day}"}{title} = $options{title};
-	$self->{'exceptions_holidays'}->{"$options{year}/$options{month}/$options{day}"}{description} = $options{description};
-	return $self;
-}
-
-=item delete_holiday
-
-	delete_holiday(weekday => $weekday
-	               day => $day,
-	               month => $month,
-				   year => $year);
-
-Delete a holiday for $self->{branchcode}.
-
-C<$weekday> Is the week day to delete.
-
-C<$day> Is the day month to make the date to delete.
-
-C<$month> Is month to make the date to delete.
-
-C<$year> Is year to make the date to delete.
-
-=cut
-
-sub delete_holiday {
-	my $self = shift @_;
-	my %options = @_;
-
-	# Verify what kind of holiday that day is. For example, if it is
-	# a repeatable holiday, this should check if there are some exception
-	# for that holiday rule. Otherwise, if it is a regular holiday, it´s 
-	# ok just deleting it.
-
-	my $dbh = C4::Context->dbh();
-	my $isSingleHoliday = $dbh->prepare("select id from special_holidays where (branchcode = '$self->{branchcode}') and (day = $options{day}) and (month = $options{month}) and (year = $options{year})");
-	$isSingleHoliday->execute;
-	if ($isSingleHoliday->rows) {
-		my $id = $isSingleHoliday->fetchrow;
-		$isSingleHoliday->finish; # Close the last query
-
-		my $deleteHoliday = $dbh->prepare("delete from special_holidays where (id = $id)");
-		$deleteHoliday->execute;
-		$deleteHoliday->finish; # Close the last query
-		delete($self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"});
-	} else {	
-		$isSingleHoliday->finish; # Close the last query
-
-		my $isWeekdayHoliday = $dbh->prepare("select id from repeatable_holidays where (branchcode = '$self->{branchcode}') and (weekday = $options{weekday})");
-		$isWeekdayHoliday->execute;
-		if ($isWeekdayHoliday->rows) {
-			my $id = $isWeekdayHoliday->fetchrow;
-			$isWeekdayHoliday->finish; # Close the last query
-
-			my $updateExceptions = $dbh->prepare("update special_holidays set isexception = 0 where (WEEKDAY(CONCAT(special_holidays.year,'-',special_holidays.month,'-',special_holidays.day)) = $options{weekday}) and (branchcode = '$self->{branchcode}')");
-			$updateExceptions->execute;
-			$updateExceptions->finish; # Close the last query
-
-			my $deleteHoliday = $dbh->prepare("delete from repeatable_holidays where (id = $id)");
-			$deleteHoliday->execute;
-			$deleteHoliday->finish;
-			delete($self->{'week_days_holidays'}->{$options{weekday}});
-		} else {
-			$isWeekdayHoliday->finish; # Close the last query
-
-			my $isDayMonthHoliday = $dbh->prepare("select id from repeatable_holidays where (branchcode = '$self->{branchcode}') (day = $options{day}) and (month = $options{month})");
-			$isDayMonthHoliday->execute;
-			if ($isDayMonthHoliday->rows) {
-				my $id = $isDayMonthHoliday->fetchrow;
-				$isDayMonthHoliday->finish;
-				my $updateExceptions = $dbh->prepare("update special_holidays set isexception = 0 where (special_holidays.branchcode = '$self->{branchcode}') and (special_holidays.day = $options{day}) and (special_holidays.month = $options{month})");
-				$updateExceptions->execute;
-				$updateExceptions->finish; # Close the last query
-
-				my $deleteHoliday = $dbh->prepare("delete from repeatable_holidays where (id = $id)");
-				$deleteHoliday->execute;
-				$deleteHoliday->finish; # Close the last query
-				$isDayMonthHoliday->finish; # Close the last query
-				delete($self->{'day_month_holidays'}->{"$options{month}/$options{day}"});
-			}
-		}
-	}	
-	return $self;
-}
-
-=item isHoliday
-	
-	$isHoliday = isHoliday($day, $month $year);
-
-
-C<$day> Is the day to check wether if is a holiday or not.
-
-C<$month> Is the month to check wether its a holiday or not.
-
-C<$year> Is the year to check wether if its a holiday or not.
-
-=cut
-
-sub isHoliday {
-	my ($self, $day, $month, $year) = @_;
-
-	my $weekday = Date_DayOfWeek($month, $day, $year) % 7;	
-	my $weekDays = $self->get_week_days_holidays();
-	my $dayMonths = $self->get_day_month_holidays();
-	my $exceptions = $self->get_exception_holidays();
-	my $singles = $self->get_single_holidays();
-
-	if (defined($exceptions->{"$year/$month/$day"})) {
-		return 0;
-	} else {		
-		if ((exists($weekDays->{$weekday})) || 
-			(exists($dayMonths->{"$month/$day"})) || 
-			(exists($singles->{"$year/$month/$day"}))) {			
-			return 1;
-		} else {
-			return 0;
-		}
-	}
-
-}
-
-=item addDate
-
-	my ($day, $month, $year) = $calendar->addDate($day, $month, $year, $offset)
-
-C<$day> Is the starting day of the interval.
-
-C<$month> Is the starting month of the interval.
-
-C<$year> Is the starting year of the interval.
-
-C<$offset> Is the number of days that this function has to count from $date.
-
-=cut
-
-sub addDate {
-	my ($self, $day, $month, $year, $offset) = @_;
-	if ($offset < 0) { # In case $offset is negative
-		$offset = $offset*(-1);
-	}
-
-	my $daysMode = C4::Context->preference('useDaysMode');
-	if ($daysMode eq 'normal') {
-		($year, $month, $day) = Add_Delta_Days($year, $month, $day, ($offset - 1));
-	} else {
-		while ($offset > 0) {								
-			if (!($self->isHoliday($day, $month, $year))) {
-				$offset = $offset - 1;					
-			}				
-			if ($offset > 0) {
-				($year, $month, $day) = Add_Delta_Days($year, $month, $day, 1);
-			}				
-		}
-	}
-	return($day, $month, $year);	
-}
-
-=item daysBetween
-
-	my $daysBetween = $calendar->daysBetween($dayFrom, $monthFrom, $yearFrom,
-	                                         $dayTo, $monthTo, $yearTo)
-
-C<$dayFrom> Is the starting day of the interval.
-
-C<$monthFrom> Is the starting month of the interval.
-
-C<$yearFrom> Is the starting year of the interval.
-
-C<$dayTo> Is the ending day of the interval.
-
-C<$monthTo> Is the ending month of the interval.
-
-C<$yearTo> Is the ending year of the interval.
-
-=cut
-
-sub daysBetween {
-	my ($self, $dayFrom, $monthFrom, $yearFrom, $dayTo, $monthTo, $yearTo) = @_;
-	 
-	my $daysMode = C4::Context->preference('useDaysMode');
-	my $count = 1;
-	my $continue = 1;
-	if ($daysMode eq 'normal') {
-		while ($continue) {
-			if (($yearFrom != $yearTo) || ($monthFrom != $monthTo) || ($dayFrom != $dayTo)) {
-				($yearFrom, $monthFrom, $dayFrom) = Add_Delta_Days($yearFrom, $monthFrom, $dayFrom, 1);
-				$count++;
-			} else {
-				$continue = 0;	
-			}
-		}		
-	} else {
-		while ($continue) {
-			if (($yearFrom != $yearTo) || ($monthFrom != $monthTo) || ($dayFrom != $dayTo)) {
-				if (!($self->isHoliday($dayFrom, $monthFrom, $yearFrom))) {
-					$count++;
-				}	
-				($yearFrom, $monthFrom, $dayFrom) = Add_Delta_Days($yearFrom, $monthFrom, $dayFrom, 1);				
-			} else {
-				$continue = 0;	
-			}
-		}		
-	}
-	return($count);	
-}
-
-sub Date_DayOfWeek{
-my ($month, $day, $year)=@_;
-my $date=DATE_obj($year."-".$month."-".$day);
-
-return $date->day_of_week;
-}
-
-sub Add_Delta_Days{
-my ($year, $month, $day, $offset)=@_;
-my $date=DATE_obj($year."-".$month."-".$day);
-my $duration=get_duration($offset." days");
-
- $date->add_duration($duration);
-
-return ($date->year, $date->month, $date->day);
-}
-
-
-
-1;
-
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Physics Library UNLP <matias_veleda at hotmail.com>
-Modified by Tumer Garip NUE Grand Library --No more Date::Manip
-=cut
\ No newline at end of file

Index: C4/Circulation/Circ2.pm
===================================================================
RCS file: C4/Circulation/Circ2.pm
diff -N C4/Circulation/Circ2.pm
--- C4/Circulation/Circ2.pm	15 Nov 2006 01:36:00 -0000	1.123
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,2182 +0,0 @@
-# -*- tab-width: 8 -*-
-# Please use 8-character tabs for this file (indents are every 4 characters)
-
-package C4::Circulation::Circ2;
-
-# $Id: Circ2.pm,v 1.123 2006/11/15 01:36:00 tgarip1957 Exp $
-
-#package to deal with circulation
-#written 3/11/99 by olwen at katipo.co.nz
-
-
-# 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 warnings;
-require Exporter;
-
-use C4::Context;
-use C4::Stats;
-use C4::Reserves2;
-use C4::Koha;
-use C4::Accounts2;
-use C4::Biblio;
-use C4::Calendar::Calendar;
-use C4::Search;
-use C4::Members;
-use C4::Date;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Circulation::Circ2 - Koha circulation module
-
-=head1 SYNOPSIS
-
-  use C4::Circulation::Circ2;
-
-=head1 DESCRIPTION
-
-The functions in this module deal with circulation, issues, and
-returns, as well as general information about the library.
-Also deals with stocktaking.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-	&currentissues 
-	&getissues 
-	&getiteminformation 
-	&renewstatus 
-	&renewbook
-	&canbookbeissued 
-	&issuebook 
-	&returnbook 
-	&find_reserves 
-	&transferbook 
-	&decode
-	&calc_charges 
-	&listitemsforinventory 
-	&itemseen 
-	&itemseenbarcode
-	&fixdate 
-	&itemissues 
-	&patronflags
-	 &get_current_return_date_of
-                &get_transfert_infos
-		&checktransferts
-		&GetReservesForBranch
-		&GetReservesToBranch
-		&GetTransfersFromBib
-		&getBranchIp);
-
-# &getbranches &getprinters &getbranch &getprinter => moved to C4::Koha.pm
-=item itemissues
-
-  @issues = &itemissues($biblionumber, $biblio);
-
-Looks up information about who has borrowed the bookZ<>(s) with the
-given biblionumber.
-
-C<$biblio> is ignored.
-
-C<&itemissues> returns an array of references-to-hash. The keys
-include the fields from the C<items> table in the Koha database.
-Additional keys include:
-
-=over 4
-
-=item C<date_due>
-
-If the item is currently on loan, this gives the due date.
-
-If the item is not on loan, then this is either "Available" or
-"Cancelled", if the item has been withdrawn.
-
-=item C<card>
-
-If the item is currently on loan, this gives the card number of the
-patron who currently has the item.
-
-=item C<timestamp0>, C<timestamp1>, C<timestamp2>
-
-These give the timestamp for the last three times the item was
-borrowed.
-
-=item C<card0>, C<card1>, C<card2>
-
-The card number of the last three patrons who borrowed this item.
-
-=item C<borrower0>, C<borrower1>, C<borrower2>
-
-The borrower number of the last three patrons who borrowed this item.
-
-=back
-
-=cut
-#'
-sub itemissues {
-    my ($dbh,$data, $itemnumber)=@_;
-    
-      
-    my $i     = 0;
-    my @results;
-
-
-        # Find out who currently has this item.
-        # FIXME - Wouldn't it be better to do this as a left join of
-        # some sort? Currently, this code assumes that if
-        # fetchrow_hashref() fails, then the book is on the shelf.
-        # fetchrow_hashref() can fail for any number of reasons (e.g.,
-        # database server crash), not just because no items match the
-        # search criteria.
-        my $sth2   = $dbh->prepare("select * from issues,borrowers
-where itemnumber = ?
-and returndate is NULL
-and issues.borrowernumber = borrowers.borrowernumber");
-
-        $sth2->execute($itemnumber);
-        if (my $data2 = $sth2->fetchrow_hashref) {
-
-  	$data->{'date_due'}=$data2->{'date_due'};
-	$data->{'datelastborrowed'} = $data2->{'issue_date'};
-            $data->{'card'}     = $data2->{'cardnumber'};
-	    $data->{'borrower'}     = $data2->{'borrowernumber'};
-	$data->{issues}++;
-        } 
-
-        $sth2->finish;
-	 my $sth2   = $dbh->prepare("select * from reserveissue,borrowers
-where itemnumber = ?
-and rettime is NULL
-and reserveissue.borrowernumber = borrowers.borrowernumber");
-
-        $sth2->execute($itemnumber);
-        if (my $data2 = $sth2->fetchrow_hashref) {
-
-  	$data->{'date_due'}=$data2->{'duetime'};
-	$data->{'datelastborrowed'} = $data2->{'restime'};
-            $data->{'card'}     = $data2->{'cardnumber'};
-	    $data->{'borrower'}     = $data2->{'borrowernumber'};
-	$data->{issues}++;
-        } 
-
-        $sth2->finish;
-        # Find the last 2 people who borrowed this item.
-        $sth2 = $dbh->prepare("select * from issues, borrowers
-						where itemnumber = ?
-									and issues.borrowernumber = borrowers.borrowernumber
-									and returndate is not NULL
-									order by returndate desc,timestamp desc limit 2") ;
-        $sth2->execute($itemnumber) ;
-my $i2=0;
-          while (my $data2  = $sth2->fetchrow_hashref) {
-                $data->{"timestamp$i2"} = $data2->{'timestamp'};
-                $data->{"card$i2"}      = $data2->{'cardnumber'};
-                $data->{"borrower$i2"}  = $data2->{'borrowernumber'};
-$data->{'datelastborrowed'} = $data2->{'issue_date'} unless $data->{'datelastborrowed'};
-	$i2++;
-            } # while
-
-        $sth2->finish;
-    return($data);
-}
-
-
-
-=head2 itemseen
-
-&itemseen($dbh,$itemnum)
-Mark item as seen. Is called when an item is issued, returned or manually marked during inventory/stocktaking
-C<$itemnum> is the item number
-
-=cut
-
-sub itemseen {
-	my ($dbh,$itemnumber) = @_;
-my $sth=$dbh->prepare("select biblionumber from items where itemnumber=?");
-	$sth->execute($itemnumber);
-my ($biblionumber)=$sth->fetchrow; 
-XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'itemlost',"0",1);
-# find today's date
-my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
-	$year += 1900;
-	$mon += 1;
-	my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",
-		$year,$mon,$mday,$hour,$min,$sec);
-XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'datelastseen', $timestamp);	
-}
-sub itemseenbarcode {
-	my ($dbh,$barcode) = @_;
-my $sth=$dbh->prepare("select biblionumber,itemnumber from items where barcode=$barcode");
-	$sth->execute();
-my ($biblionumber,$itemnumber)=$sth->fetchrow; 
-XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'itemlost',"0",1);
-my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
-	$year += 1900;
-	$mon += 1;
-my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",$year,$mon,$mday,$hour,$min,$sec);
-XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'datelastseen', $timestamp);	
-}
-
-sub listitemsforinventory {
-	my ($minlocation,$datelastseen,$offset,$size) = @_;
-	my $count=0;
-	my @results;
-	my @kohafields;
-	my @values;
-	my @relations;
-	my $sort;
-	my @and_or;
-	my $facets;
-	if ($datelastseen){
-		push @kohafields, "classification","datelastseen";
-		push @values,$minlocation,$datelastseen;
-		push @relations,"\@attr 5=1  \@attr 6=3 \@attr 4=1 ","\@attr 2=1 ";
-		push @and_or,"\@and";
-		$sort="lcsort";
-		($count,$facets, at results)=ZEBRAsearch_kohafields(\@kohafields,\@values,\@relations,$sort,\@and_or,0,"",$offset,$size);
-	}else{
-	push @kohafields, "classification";
-		push @values,$minlocation;
-		push @relations,"\@attr 5=1  \@attr 6=3 \@attr 4=1 ";
-		push @and_or,"";
-		$sort="lcsort";
-		($count,$facets, at results)=ZEBRAsearch_kohafields(\@kohafields,\@values,\@relations,$sort,\@and_or,0,"",$offset,$size);
-	}
-	
-	return @results;
-}
-
-
-
-
-=head2 decode
-
-=over 4
-
-=head3 $str = &decode($chunk);
-
-=over 4
-
-Decodes a segment of a string emitted by a CueCat barcode scanner and
-returns it.
-
-=back
-
-=back
-
-=cut
-
-# FIXME - At least, I'm pretty sure this is for decoding CueCat stuff.
-sub decode {
-	my ($encoded) = @_;
-	my $seq = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-';
-	my @s = map { index($seq,$_); } split(//,$encoded);
-	my $l = ($#s+1) % 4;
-	if ($l)
-	{
-		if ($l == 1)
-		{
-			print "Error!";
-			return;
-		}
-		$l = 4-$l;
-		$#s += $l;
-	}
-	my $r = '';
-	while ($#s >= 0)
-	{
-		my $n = (($s[0] << 6 | $s[1]) << 6 | $s[2]) << 6 | $s[3];
-		$r .=chr(($n >> 16) ^ 67) .
-		chr(($n >> 8 & 255) ^ 67) .
-		chr(($n & 255) ^ 67);
-		@s = @s[4..$#s];
-	}
-	$r = substr($r,0,length($r)-$l);
-	return $r;
-}
-
-=head2 getiteminformation
-
-=over 4
-
-$item = &getiteminformation($env, $itemnumber, $barcode);
-
-Looks up information about an item, given either its item number or
-its barcode. If C<$itemnumber> is a nonzero value, it is used;
-otherwise, C<$barcode> is used.
-
-C<$env> is effectively ignored, but should be a reference-to-hash.
-
-C<$item> is a reference-to-hash whose keys are fields from the biblio,
-items, and biblioitems tables of the Koha database. It may also
-contain the following keys:
-
-=head3 date_due
-
-=over 4
-
-The due date on this item, if it has been borrowed and not returned
-yet. The date is in YYYY-MM-DD format.
-
-=back
-
-=head3 notforloan
-
-=over 4
-
-True if the item may not be borrowed.
-
-=back
-
-=back
-
-=cut
-
-
-sub getiteminformation {
-# returns a hash of item information together with biblio given either the itemnumber or the barcode
-	my ($env, $itemnumber, $barcode) = @_;
-	my $dbh=C4::Context->dbh;
-	my ($itemrecord)=XMLgetitem($dbh,$itemnumber,$barcode);
-	return undef unless $itemrecord; ## This is to prevent a system crash if barcode does not exist	
-	 my $itemhash=XML_xml2hash_onerecord($itemrecord);	
-	my $iteminformation=XMLmarc2koha_onerecord($dbh,$itemhash,"holdings");
-##Now get full biblio details from MARC
-	if ($iteminformation) {
-my ($record)=XMLgetbiblio($dbh,$iteminformation->{'biblionumber'});
-	my $recordhash=XML_xml2hash_onerecord($record);
-my $biblio=XMLmarc2koha_onerecord($dbh,$recordhash,"biblios");
-		foreach my $field (keys %$biblio){
-		$iteminformation->{$field}=$biblio->{$field};
-		} 
-	$iteminformation->{'date_due'}="" if $iteminformation->{'date_due'} eq "0000-00-00";
-	($iteminformation->{'dewey'} == 0) && ($iteminformation->{'dewey'}='');	
-	}
-	return($iteminformation);
-}
-
-=head2 transferbook
-
-=over 4
-
-($dotransfer, $messages, $iteminformation) = &transferbook($newbranch, $barcode, $ignore_reserves);
-
-Transfers an item to a new branch. If the item is currently on loan, it is automatically returned before the actual transfer.
-
-C<$newbranch> is the code for the branch to which the item should be transferred.
-
-C<$barcode> is the barcode of the item to be transferred.
-
-If C<$ignore_reserves> is true, C<&transferbook> ignores reserves.
-Otherwise, if an item is reserved, the transfer fails.
-
-Returns three values:
-
-=head3 $dotransfer 
-
-is true if the transfer was successful.
-
-=head3 $messages
- 
-is a reference-to-hash which may have any of the following keys:
-
-=over 4
-
-C<BadBarcode>
-
-There is no item in the catalog with the given barcode. The value is C<$barcode>.
-
-C<IsPermanent>
-
-The item's home branch is permanent. This doesn't prevent the item from being transferred, though. The value is the code of the item's home branch.
-
-C<DestinationEqualsHolding>
-
-The item is already at the branch to which it is being transferred. The transfer is nonetheless considered to have failed. The value should be ignored.
-
-C<WasReturned>
-
-The item was on loan, and C<&transferbook> automatically returned it before transferring it. The value is the borrower number of the patron who had the item.
-
-C<ResFound>
-
-The item was reserved. The value is a reference-to-hash whose keys are fields from the reserves table of the Koha database, and C<biblioitemnumber>. It also has the key C<ResFound>, whose value is either C<Waiting> or C<Reserved>.
-
-C<WasTransferred>
-
-The item was eligible to be transferred. Barring problems communicating with the database, the transfer should indeed have succeeded. The value should be ignored.
-
-=back
-
-=back
-
-=back
-
-=cut
-
-##This routine is reverted to origional state
-##This routine is used when a book physically arrives at a branch due to user returning it there
-## so record the fact that holdingbranch is changed.
-sub transferbook {
-# transfer book code....
-	my ($tbr, $barcode, $ignoreRs,$user) = @_;
-	my $messages;
-	my %env;
-	my $dbh=C4::Context->dbh;
-	my $dotransfer = 1;
-	my $branches = GetBranches();
-
-	my $iteminformation = getiteminformation(\%env, 0, $barcode);
-	# bad barcode..
-	if (not $iteminformation) {
-		$messages->{'BadBarcode'} = $barcode;
-		$dotransfer = 0;
-	}
-	# get branches of book...
-	my $hbr = $iteminformation->{'homebranch'};
-	my $fbr = $iteminformation->{'holdingbranch'};
-	# if is permanent...
-	if ($hbr && $branches->{$hbr}->{'PE'}) {
-		$messages->{'IsPermanent'} = $hbr;
-	}
-	# can't transfer book if is already there....
-	# FIXME - Why not? Shouldn't it trivially succeed?
-	if ($fbr eq $tbr) {
-		$messages->{'DestinationEqualsHolding'} = 1;
-		$dotransfer = 0;
-	}
-	# check if it is still issued to someone, return it...
-	my ($currentborrower) = currentborrower($iteminformation->{'itemnumber'});
-	if ($currentborrower) {
-		returnbook($barcode, $fbr);
-		$messages->{'WasReturned'} = $currentborrower;
-	}
-	# find reserves.....
-	# FIXME - Don't call &CheckReserves unless $ignoreRs is true.
-	# That'll save a database query.
-	my ($resfound, $resrec) = CheckReserves($iteminformation->{'itemnumber'});
-	if ($resfound and not $ignoreRs) {
-		$resrec->{'ResFound'} = $resfound;
-		$messages->{'ResFound'} = $resrec;
-		$dotransfer = 0;
-	}
-	#actually do the transfer....
-	if ($dotransfer) {
-		dotransfer($iteminformation->{'itemnumber'}, $fbr, $tbr,$user);
-		$messages->{'WasTransfered'} = 1;
-	}
-	return ($dotransfer, $messages, $iteminformation);
-}
-
-# Not exported
-
-sub dotransfer {
-## The book has arrived at this branch because it has been returned there
-## So we update the fact the book is in that branch not that we want to send the book to that branch
-
-	my ($itm, $fbr, $tbr,$user) = @_;
-	my $dbh = C4::Context->dbh;
-	
-	#new entry in branchtransfers....
-	my $sth=$dbh->prepare("INSERT INTO branchtransfers (itemnumber, frombranch, datearrived, tobranch,comments) VALUES (?, ?, now(), ?,?)");
-	$sth->execute($itm, $fbr,  $tbr,$user);
-	#update holdingbranch in items .....
-	&domarctransfer($dbh,$itm,$tbr);
-## Item seen taken out of this loop to optimize ZEBRA updates
-#	&itemseen($dbh,$itm);	
-	return;
-}
-
-sub domarctransfer{
-my ($dbh,$itemnumber,$holdingbranch) = @_; 
-$itemnumber=~s /\'//g;
-my $sth=$dbh->prepare("select biblionumber from items where itemnumber=$itemnumber");
-	$sth->execute();
-my ($biblionumber)=$sth->fetchrow; 
-XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'holdingbranch',$holdingbranch,1);
-	$sth->finish;
-}
-
-=head2 canbookbeissued
-
-Check if a book can be issued.
-
-my ($issuingimpossible,$needsconfirmation) = canbookbeissued($env,$borrower,$barcode,$year,$month,$day);
-
-=over 4
-
-C<$env> Environment variable. Should be empty usually, but used by other subs. Next code cleaning could drop it.
-
-C<$borrower> hash with borrower informations (from getpatroninformation)
-
-C<$barcode> is the bar code of the book being issued.
-
-C<$year> C<$month> C<$day> contains the date of the return (in case it's forced by "stickyduedate".
-
-=back
-
-Returns :
-
-=over 4
-
-C<$issuingimpossible> a reference to a hash. It contains reasons why issuing is impossible.
-Possible values are :
-
-=head3 INVALID_DATE 
-
-sticky due date is invalid
-
-=head3 GNA
-
-borrower gone with no address
-
-=head3 CARD_LOST
- 
-borrower declared it's card lost
-
-=head3 DEBARRED
-
-borrower debarred
-
-=head3 UNKNOWN_BARCODE
-
-barcode unknown
-
-=head3 NOT_FOR_LOAN
-
-item is not for loan
-
-=head3 WTHDRAWN
-
-item withdrawn.
-
-=head3 RESTRICTED
-
-item is restricted (set by ??)
-
-=back
-
-C<$issuingimpossible> a reference to a hash. It contains reasons why issuing is impossible.
-Possible values are :
-
-=head3 DEBT
-
-borrower has debts.
-
-=head3 RENEW_ISSUE
-
-renewing, not issuing
-
-=head3 ISSUED_TO_ANOTHER
-
-issued to someone else.
-
-=head3 RESERVED
-
-reserved for someone else.
-
-=head3 INVALID_DATE
-
-sticky due date is invalid
-
-=head3 TOO_MANY
-
-if the borrower borrows to much things
-
-=cut
-
-# check if a book can be issued.
-# returns an array with errors if any
-
-
-
-
-
-
-
-
-
-
-
-sub TooMany ($$){
-	my $borrower = shift;
-	my $iteminformation = shift;
-	my $cat_borrower = $borrower->{'categorycode'};
-	my $branch_borrower = $borrower->{'branchcode'};
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare('select itemtype from biblio where biblionumber = ?');
-	$sth->execute($iteminformation->{'biblionumber'});
-	my $type = $sth->fetchrow;
-	$sth = $dbh->prepare('select * from issuingrules where categorycode = ? and itemtype = ? and branchcode = ?');
-	my $sth2 = $dbh->prepare("select COUNT(*) from issues i,  items it, biblio b where i.borrowernumber = ? and i.returndate is null and i.itemnumber = it.itemnumber  and b.biblionumber=it.biblionumber and b.itemtype  like ?");
-	my $sth3 = $dbh->prepare('select COUNT(*) from issues where borrowernumber = ? and returndate is null');
-	my $alreadyissued;
-
-	# check the 3 parameters
-	#print "content-type: text/plain \n\n";
-	#print "$cat_borrower, $type, $branch_borrower";
-	$sth->execute($cat_borrower, $type, $branch_borrower);
-	my $result = $sth->fetchrow_hashref;
-	if (defined($result->{maxissueqty})) {
-	#	print "content-type: text/plain \n\n";
-	#print "$cat_borrower, $type, $branch_borrower";
-		$sth2->execute($borrower->{'borrowernumber'}, $type);
-		my $alreadyissued = $sth2->fetchrow;	
-	#	print "***" . $alreadyissued;
-	#print "----". $result->{'maxissueqty'};
-	  if ($result->{'maxissueqty'} <= $alreadyissued) {
-			return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	  }else {
-	        return;
-	  }
-	}
-
-	# check for branch=*
-	$sth->execute($cat_borrower, $type, "");
-	 $result = $sth->fetchrow_hashref;
-	if (defined($result->{maxissueqty})) {
-		$sth2->execute($borrower->{'borrowernumber'}, $type);
-		my $alreadyissued = $sth2->fetchrow;
-	  if ($result->{'maxissueqty'} <= $alreadyissued){
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	     } else {
-	        return;
-	     }
-	}
-
-	# check for itemtype=*
-	$sth->execute($cat_borrower, "*", $branch_borrower);
-	$result = $sth->fetchrow_hashref;
-        if (defined($result->{maxissueqty})) {
-		$sth3->execute($borrower->{'borrowernumber'});
-		my ($alreadyissued) = $sth3->fetchrow;
-	     if ($result->{'maxissueqty'} <= $alreadyissued){
-#		warn "HERE : $alreadyissued / ($result->{maxissueqty} for $borrower->{'borrowernumber'}";
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	     } else {
-		return;
-	     }
-	}
-
-	#check for borrowertype=*
-	$sth->execute("*", $type, $branch_borrower);
-	$result = $sth->fetchrow_hashref;
-        if (defined($result->{maxissueqty})) {    
-		$sth2->execute($borrower->{'borrowernumber'}, "%$type%");
-		my $alreadyissued = $sth2->fetchrow;
-	    if ($result->{'maxissueqty'} <= $alreadyissued){	    
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	    } else {
-		return;
-	    }
-	}
-
-	#check for borrowertype=*;itemtype=*
-	$sth->execute("*", "*", $branch_borrower);
-	$result = $sth->fetchrow_hashref;
-        if (defined($result->{maxissueqty})) {    
-		$sth3->execute($borrower->{'borrowernumber'});
-		my $alreadyissued = $sth3->fetchrow;
-	    if ($result->{'maxissueqty'} <= $alreadyissued){
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	    } else {
-		return;
-	    }
-	}
-
-	$sth->execute("*", $type, "");
-	$result = $sth->fetchrow_hashref;
-	if (defined($result->{maxissueqty}) && $result->{maxissueqty}>=0) {
-		$sth2->execute($borrower->{'borrowernumber'}, "%$type%");
-		my $alreadyissued = $sth2->fetchrow;
-	     if ($result->{'maxissueqty'} <= $alreadyissued){
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	     } else {
-		return;
-	     }
-	}
-
-	$sth->execute($cat_borrower, "*", "");
-	$result = $sth->fetchrow_hashref;
-        if (defined($result->{maxissueqty})) {    
-		$sth2->execute($borrower->{'borrowernumber'}, "%$type%");
-		my $alreadyissued = $sth2->fetchrow;
-	     if ($result->{'maxissueqty'} <= $alreadyissued){
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	     } else {
-		return;
-	     }
-	}
-
-	$sth->execute("*", "*", "");
-	$result = $sth->fetchrow_hashref;
-        if (defined($result->{maxissueqty})) {    
-		$sth3->execute($borrower->{'borrowernumber'});
-		my $alreadyissued = $sth3->fetchrow;
-	     if ($result->{'maxissueqty'} <= $alreadyissued){
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	     } else {
-		return;
-	     }
-	}
-	return;
-}
-
-
-
-
-sub canbookbeissued {
-	my ($env,$borrower,$barcode,$year,$month,$day,$inprocess) = @_;
-	my %needsconfirmation; # filled with problems that needs confirmations
-	my %issuingimpossible; # filled with problems that causes the issue to be IMPOSSIBLE
-	my $iteminformation = getiteminformation($env, 0, $barcode);
-	my $dbh = C4::Context->dbh;
-#
-# DUE DATE is OK ?
-#
-	my ($duedate, $invalidduedate) = fixdate($year, $month, $day);
-	$issuingimpossible{INVALID_DATE} = 1 if ($invalidduedate);
-
-#
-# BORROWER STATUS
-#
-	if ($borrower->{flags}->{GNA}) {
-		$issuingimpossible{GNA} = 1;
-	}
-	if ($borrower->{flags}->{'LOST'}) {
-		$issuingimpossible{CARD_LOST} = 1;
-	}
-	if ($borrower->{flags}->{'DBARRED'}) {
-		$issuingimpossible{DEBARRED} = 1;
-	}
-	my $today=get_today();
-	if (DATE_diff($borrower->{expiry},$today)<0) {
-		$issuingimpossible{EXPIRED} = 1;
-	}
-#
-# BORROWER STATUS
-#
-
-# DEBTS
-	my $amount = checkaccount($env,$borrower->{'borrowernumber'}, $dbh,$duedate);
-        if(C4::Context->preference("IssuingInProcess")){
-	    my $amountlimit = C4::Context->preference("noissuescharge");
-	    	if ($amount > $amountlimit && !$inprocess) {
-			$issuingimpossible{DEBT} = sprintf("%.2f",$amount);
-	    	} elsif ($amount <= $amountlimit && !$inprocess) {
-			$needsconfirmation{DEBT} = sprintf("%.2f",$amount);
-	    	}
-        } else {
-	   		 if ($amount >0) {
-			$needsconfirmation{DEBT} = $amount;
-	    	}
-		}
-
-
-#
-# JB34 CHECKS IF BORROWERS DONT HAVE ISSUE TOO MANY BOOKS
-#
-	my $toomany = TooMany($borrower, $iteminformation);
-	$needsconfirmation{TOO_MANY} =  $toomany if $toomany;
-	$issuingimpossible{TOO_MANY} = $toomany if $toomany;
-#
-# ITEM CHECKING
-#
-	unless ($iteminformation->{barcode}) {
-		$issuingimpossible{UNKNOWN_BARCODE} = 1;
-	}
-	if ($iteminformation->{'notforloan'} > 0) {
-		$issuingimpossible{NOT_FOR_LOAN} = 1;
-	}
-	if ($iteminformation->{'itemtype'} eq 'REF') {
-		$issuingimpossible{NOT_FOR_LOAN} = 1;
-	}
-	if ($iteminformation->{'wthdrawn'} == 1) {
-		$issuingimpossible{WTHDRAWN} = 1;
-	}
-	if ($iteminformation->{'restricted'} == 1) {
-		$issuingimpossible{RESTRICTED} = 1;
-	}
-	if ($iteminformation->{'shelf'} eq 'Res') {
-		$issuingimpossible{IN_RESERVE} = 1;
-	}
-if (C4::Context->preference("IndependantBranches")){
-		my $userenv = C4::Context->userenv;
-		if (($userenv)&&($userenv->{flags} != 1)){
-			$issuingimpossible{NOTSAMEBRANCH} = 1 if ($iteminformation->{'holdingbranch'} ne $userenv->{branch} ) ;
-		}
-	}
-
-#
-# CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER
-#
-	my ($currentborrower) = currentborrower($iteminformation->{'itemnumber'});
-	if ($currentborrower eq $borrower->{'borrowernumber'}) {
-# Already issued to current borrower. Ask whether the loan should
-# be renewed.
-		my ($renewstatus) = renewstatus($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
-		if ($renewstatus == 0) { # no more renewals allowed
-			$issuingimpossible{NO_MORE_RENEWALS} = 1;
-		} else {
-			if (C4::Context->preference("strictrenewals")){
-			###if this is set do not allow automatic renewals
-			##the new renew script will do same strict checks as issues and return error codes
-			$needsconfirmation{RENEW_ISSUE} = 1;
-			}	
-			
-		}
-	} elsif ($currentborrower) {
-# issued to someone else
-		my $currborinfo = getpatroninformation(0,$currentborrower);
-#		warn "=>.$currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
-		$needsconfirmation{ISSUED_TO_ANOTHER} = "$currborinfo->{'reservedate'} : $currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
-	}
-# See if the item is on RESERVE
-	my ($restype, $res) = CheckReserves($iteminformation->{'itemnumber'});
-	if ($restype) {
-		my $resbor = $res->{'borrowernumber'};
-		if ($resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting") {
-			# The item is on reserve and waiting, but has been
-			# reserved by some other patron.
-			my ($resborrower, $flags)=getpatroninformation($env, $resbor,0);
-			my $branches = GetBranches();
-			my $branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
-			$needsconfirmation{RESERVE_WAITING} = "$resborrower->{'firstname'} $resborrower->{'surname'} ($resborrower->{'cardnumber'}, $branchname)";
-		#	CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
-		} elsif ($restype eq "Reserved") {
-			# The item is on reserve for someone else.
-			my ($resborrower, $flags)=getpatroninformation($env, $resbor,0);
-			my $branches = GetBranches();
-			my $branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
-			$needsconfirmation{RESERVED} = "$res->{'reservedate'} : $resborrower->{'firstname'} $resborrower->{'surname'} ($resborrower->{'cardnumber'})";
-		}
-	}
-        	if(C4::Context->preference("LibraryName") eq "Horowhenua Library Trust"){
-	   			 if ($borrower->{'categorycode'} eq 'W'){
-		        my %issuingimpossible;
-		        	return(\%issuingimpossible,\%needsconfirmation);
-	    		}
-	    	}
-	      
-	return(\%issuingimpossible,\%needsconfirmation);
-}
-
-=head2 issuebook
-
-Issue a book. Does no check, they are done in canbookbeissued. If we reach this sub, it means the user confirmed if needed.
-
-&issuebook($env,$borrower,$barcode,$date)
-
-=over 4
-
-C<$env> Environment variable. Should be empty usually, but used by other subs. Next code cleaning could drop it.
-
-C<$borrower> hash with borrower informations (from getpatroninformation)
-
-C<$barcode> is the bar code of the book being issued.
-
-C<$date> contains the max date of return. calculated if empty.
-
-=cut
-
-#
-# issuing book. We already have checked it can be issued, so, just issue it !
-#
-sub issuebook {
-### fix me STOP using koha hashes, change so that XML hash is used
-	my ($env,$borrower,$barcode,$date,$cancelreserve) = @_;
-	my $dbh = C4::Context->dbh;
-	my $itemrecord=XMLgetitemhash($dbh,"",$barcode);
-	my $iteminformation=XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
-              $iteminformation->{'itemtype'}=MARCfind_itemtype($dbh,$iteminformation->{biblionumber});
-	my $error;
-#
-# check if we just renew the issue.
-#
-	my ($currentborrower) = currentborrower($iteminformation->{'itemnumber'});
-	if ($currentborrower eq $borrower->{'borrowernumber'}) {
-		my ($charge,$itemtype) = calc_charges($env, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'});
-		if ($charge > 0) {
-			createcharge($env, $dbh, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'}, $charge);
-			$iteminformation->{'charge'} = $charge;
-		}
-		&UpdateStats($env,$env->{'branchcode'},'renew',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'itemtype'},$borrower->{'borrowernumber'});
-			if (C4::Context->preference("strictrenewals")){
-		 	$error=renewstatus($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
-		 	renewbook($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'}) if ($error>1);
-		 	}else{
-		 renewbook($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
-			}
-	} else {
-#
-# NOT a renewal
-#
-		if ($currentborrower ne '') {
-			# This book is currently on loan, but not to the person
-			# who wants to borrow it now. mark it returned before issuing to the new borrower
-			returnbook($iteminformation->{'barcode'}, $env->{'branchcode'});
-#warn "return : ".$borrower->{borrowernumber}." / I : ".$iteminformation->{'itemnumber'};
-
-		}
-		# See if the item is on reserve.
-		my ($restype, $res) = CheckReserves($iteminformation->{'itemnumber'});
-#warn "$restype,$res";
-		if ($restype) {
-			my $resbor = $res->{'borrowernumber'};
-			if ($resbor eq $borrower->{'borrowernumber'}) {
-				# The item is on reserve to the current patron
-				FillReserve($res);
-#				warn "FillReserve";
-			} elsif ($restype eq "Waiting") {
-#				warn "Waiting";
-				# The item is on reserve and waiting, but has been
-				# reserved by some other patron.
-				my ($resborrower, $flags)=getpatroninformation($env, $resbor,0);
-				my $branches = GetBranches();
-				my $branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
-                 if ($cancelreserve){
-    				    CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
-                  } else {
-				    # set waiting reserve to first in reserve queue as book isn't waiting now
-				    UpdateReserve(1, $res->{'biblionumber'}, $res->{'borrowernumber'}, $res->{'branchcode'});
-				}
-			} elsif ($restype eq "Reserved") {
-#warn "Reserved";
-				# The item is on reserve for someone else.
-				my ($resborrower, $flags)=getpatroninformation($env, $resbor,0);
-				my $branches = GetBranches();
-				my $branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
-				if ($cancelreserve) {
-					# cancel reserves on this item
-					CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
-					# also cancel reserve on biblio related to this item
-				#	my $st_Fbiblio = $dbh->prepare("select biblionumber from items where itemnumber=?");
-				#	$st_Fbiblio->execute($res->{'itemnumber'});
-				#	my $biblionumber = $st_Fbiblio->fetchrow;
-#					CancelReserve($iteminformation->{'biblionumber'},0,$res->{'borrowernumber'});
-#					warn "CancelReserve $res->{'itemnumber'}, $res->{'borrowernumber'}";
-				} else {
-					my $tobrcd = ReserveWaiting($res->{'itemnumber'}, $res->{'borrowernumber'});
-					transferbook($tobrcd,$barcode, 1);
-#					warn "transferbook";
-				}
-			}
-		}
-		
-		my $sth=$dbh->prepare("insert into issues (borrowernumber, itemnumber, date_due, branchcode,issue_date) values (?,?,?,?,NOW())");
-		my $loanlength = getLoanLength($borrower->{'categorycode'},$iteminformation->{'itemtype'},$borrower->{'branchcode'});
-
-		my $dateduef;
-		 my @datearr = localtime();
-		$dateduef = (1900+$datearr[5])."-".($datearr[4]+1)."-". $datearr[3];
-
-		my $calendar = C4::Calendar::Calendar->new(branchcode => $borrower->{'branchcode'});
-		my ($yeardue, $monthdue, $daydue) = split /-/, $dateduef;
-		($daydue, $monthdue, $yeardue) = $calendar->addDate($daydue, $monthdue, $yeardue, $loanlength);
-		$dateduef = "$yeardue-".sprintf ("%0.2d", $monthdue)."-". sprintf("%0.2d",$daydue);
-	
-#warn $dateduef;
-		if ($date) {
-			$dateduef=$date;
-		}
-		# if ReturnBeforeExpiry ON the datedue can't be after borrower expirydate
-		if (C4::Context->preference('ReturnBeforeExpiry') && $dateduef gt $borrower->{expiry}) {
-			$dateduef=$borrower->{expiry};
-		}
-		$sth->execute($borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'}, $dateduef, $env->{'branchcode'});
-		$sth->finish;
-		$iteminformation->{'issues'}++;
-##Record in MARC the new data ,date_due as due date,issue count and the borrowernumber
-		$itemrecord=XML_writeline($itemrecord, "issues", $iteminformation->{'issues'},"holdings");
-		$itemrecord=XML_writeline($itemrecord, "date_due", $dateduef,"holdings");
-		$itemrecord=XML_writeline($itemrecord, "borrowernumber", $borrower->{'borrowernumber'},"holdings");
-		$itemrecord=XML_writeline($itemrecord, "itemlost", "0","holdings");
-		$itemrecord=XML_writeline($itemrecord, "onloan", "1","holdings");
-		# find today's date as timestamp
-		my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
-		$year += 1900;
-		$mon += 1;
-		my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",
-		$year,$mon,$mday,$hour,$min,$sec);
-		$itemrecord=XML_writeline($itemrecord, "datelastseen", $timestamp,"holdings");
-		##Now update the zebradb
-		NEWmoditem($dbh,$itemrecord,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'});
-		# If it costs to borrow this book, charge it to the patron's account.
-		my ($charge,$itemtype)=calc_charges($env, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'});
-		if ($charge > 0) {
-			createcharge($env, $dbh, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'}, $charge);
-			$iteminformation->{'charge'}=$charge;
-		}
-		# Record the fact that this book was issued in SQL
-		&UpdateStats($env,$env->{'branchcode'},'issue',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'itemtype'},$borrower->{'borrowernumber'});
-	}
-return($error);
-}
-
-=head2 getLoanLength
-
-Get loan length for an itemtype, a borrower type and a branch
-
-my $loanlength = &getLoanLength($borrowertype,$itemtype,branchcode)
-
-=cut
-
-sub getLoanLength {
-	my ($borrowertype,$itemtype,$branchcode) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("select issuelength from issuingrules where categorycode=? and itemtype=? and branchcode=?");
-	# try to find issuelength & return the 1st available.
-	# check with borrowertype, itemtype and branchcode, then without one of those parameters
-	$sth->execute($borrowertype,$itemtype,$branchcode);
-	my $loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength);
-	
-	$sth->execute($borrowertype,$itemtype,"");
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	$sth->execute($borrowertype,"*",$branchcode);
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	$sth->execute("*",$itemtype,$branchcode);
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	$sth->execute($borrowertype,"*","");
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	$sth->execute("*","*",$branchcode);
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	$sth->execute("*",$itemtype,"");
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	$sth->execute("*","*","");
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	# if no rule is set => 21 days (hardcoded)
-	return 21;
-}
-=head2 returnbook
-
-  ($doreturn, $messages, $iteminformation, $borrower) =
-	  &returnbook($barcode, $branch);
-
-Returns a book.
-
-C<$barcode> is the bar code of the book being returned. C<$branch> is
-the code of the branch where the book is being returned.
-
-C<&returnbook> returns a list of four items:
-
-C<$doreturn> is true iff the return succeeded.
-
-C<$messages> is a reference-to-hash giving the reason for failure:
-
-=over 4
-
-=item C<BadBarcode>
-
-No item with this barcode exists. The value is C<$barcode>.
-
-=item C<NotIssued>
-
-The book is not currently on loan. The value is C<$barcode>.
-
-=item C<IsPermanent>
-
-The book's home branch is a permanent collection. If you have borrowed
-this book, you are not allowed to return it. The value is the code for
-the book's home branch.
-
-=item C<wthdrawn>
-
-This book has been withdrawn/cancelled. The value should be ignored.
-
-=item C<ResFound>
-
-The item was reserved. The value is a reference-to-hash whose keys are
-fields from the reserves table of the Koha database, and
-C<biblioitemnumber>. It also has the key C<ResFound>, whose value is
-either C<Waiting>, C<Reserved>, or 0.
-
-=back
-
-C<$borrower> is a reference-to-hash, giving information about the
-patron who last borrowed the book.
-
-=cut
-
-# FIXME - This API is bogus. There's no need to return $borrower and
-# $iteminformation; the caller can ask about those separately, if it
-# cares (it'd be inefficient to make two database calls instead of
-# one, but &getpatroninformation and &getiteminformation can be
-# memoized if this is an issue).
-#
-# The ($doreturn, $messages) tuple is redundant: if the return
-# succeeded, that's all the caller needs to know. So &returnbook can
-# return 1 and 0 on success and failure, and set
-# $C4::Circulation::Circ2::errmsg to indicate the error. Or it can
-# return undef for success, and an error message on error (though this
-# is more C-ish than Perl-ish).
-
-sub returnbook {
-	my ($barcode, $branch) = @_;
-	my %env;
-	my $messages;
-	my $dbh = C4::Context->dbh;
-	my $doreturn = 1;
-	die '$branch not defined' unless defined $branch; # just in case (bug 170)
-	# get information on item
-	my $itemrecord=XMLgetitemhash($dbh,"",$barcode);
-	if (not $itemrecord) {
-		$messages->{'BadBarcode'} = $barcode;
-		$doreturn = 0;
-	return ($doreturn, $messages, undef, undef);
-	}
-	my $iteminformation=XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
-              $iteminformation->{'itemtype'}=MARCfind_itemtype($dbh,$iteminformation->{biblionumber});
-	
-	# find the borrower
-	my ($currentborrower) = currentborrower($iteminformation->{'itemnumber'});
-	if ((not $currentborrower) && $doreturn) {
-		$messages->{'NotIssued'} = $barcode;
-		$doreturn = 0;
-	}
-	# check if the book is in a permanent collection....
-	my $hbr = $iteminformation->{'homebranch'};
-	my $branches = GetBranches();
-	if ($branches->{$hbr}->{'PE'}) {
-		$messages->{'IsPermanent'} = $hbr;
-	}
-	# check that the book has been cancelled
-	if ($iteminformation->{'wthdrawn'}) {
-		$messages->{'wthdrawn'} = 1;
-	#	$doreturn = 0;
-	}
-	# update issues, thereby returning book (should push this out into another subroutine
-	my ($borrower) = getpatroninformation(\%env, $currentborrower, 0);
-	if ($doreturn) {
-		my $sth = $dbh->prepare("update issues set returndate = now() where (itemnumber = ?) and (returndate is null)");
-		$sth->execute( $iteminformation->{'itemnumber'});
-		$messages->{'WasReturned'} = 1; # FIXME is the "= 1" right?
-	
-		$sth->finish;
-	}
-	$itemrecord=XML_writeline($itemrecord, "date_due", "","holdings");
-	$itemrecord=XML_writeline($itemrecord, "onloan", "0","holdings");
-	$itemrecord=XML_writeline($itemrecord, "borrowernumber", "","holdings");
-	
-	my ($transfered, $mess, $item) = transferbook($branch, $barcode, 1);
-	my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
-		$year += 1900;
-		$mon += 1;
-		my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",
-		$year,$mon,$mday,$hour,$min,$sec);
-		$itemrecord=XML_writeline($itemrecord, "datelastseen", $timestamp,"holdings");
-		
-		
-	($borrower) = getpatroninformation(\%env, $currentborrower, 0);
-	# transfer book to the current branch
-	
-	if ($transfered) {
-		$messages->{'WasTransfered'} = 1; # FIXME is the "= 1" right?
-	}
-	# fix up the accounts.....
-	if ($iteminformation->{'itemlost'}) {
-		fixaccountforlostandreturned($iteminformation, $borrower);
-		$messages->{'WasLost'} = 1; # FIXME is the "= 1" right?
-		$itemrecord=XML_writeline($itemrecord, "itemlost", "","holdings");
-	}
-####WARNING-- FIXME#########	
-### The following new script is commented out
-## 	I did not understand what it is supposed to do.
-## If a book is returned at one branch it is automatically recorded being in that branch by
-## transferbook script. This scrip tries to find out whether it was sent thre
-## Well whether sent or not it is physically there and transferbook records this fact in MARCrecord as well
-## If this script is trying to do something else it should be uncommented and also add support for updating MARC record --TG
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# 	check if we have a transfer for this document
-#	my $checktransfer = checktransferts($iteminformation->{'itemnumber'});
-# 	if we have a return, we update the line of transfers with the datearrived
-#	if ($checktransfer){
-#		my $sth = $dbh->prepare("update branchtransfers set datearrived = now() where itemnumber= ? AND datearrived IS NULL");
-#		$sth->execute($iteminformation->{'itemnumber'});
-#		$sth->finish;
-# 		now we check if there is a reservation with the validate of transfer if we have one, we can 		set it with the status 'W'
-#		my $updateWaiting = SetWaitingStatus($iteminformation->{'itemnumber'});
-#	}
-#	if we don't have a transfer on run, we check if the document is not in his homebranch and there is not a reservation, we transfer this one to his home branch directly if system preference Automaticreturn is turn on .
-#	else {
-#		my $checkreserves = CheckReserves($iteminformation->{'itemnumber'});
-#		if (($iteminformation->{'homebranch'} ne $iteminformation->{'holdingbranch'}) and (not $checkreserves) and (C4::Context->preference("AutomaticItemReturn") == 1)){
-#				my $automatictransfer = dotransfer($iteminformation->{'itemnumber'},$iteminformation->{'holdingbranch'},$iteminformation->{'homebranch'});
-#				$messages->{'WasTransfered'} = 1;
-#		}
-#	}
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
-	# fix up the overdues in accounts...
-	fixoverduesonreturn($borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
-	$itemrecord=XML_writeline($itemrecord, "itemoverdue", "","holdings");
-	# find reserves.....
-	my ($resfound, $resrec) = CheckReserves($iteminformation->{'itemnumber'});
-	if ($resfound) {
-	#	my $tobrcd = ReserveWaiting($resrec->{'itemnumber'}, $resrec->{'borrowernumber'});
-		$resrec->{'ResFound'} = $resfound;
-		$messages->{'ResFound'} = $resrec;
-	}
-	##Now update the zebradb
-		NEWmoditem($dbh,$itemrecord,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'});
-	# update stats?
-	# Record the fact that this book was returned.
-	UpdateStats(\%env, $branch ,'return','0','',$iteminformation->{'itemnumber'},$iteminformation->{'itemtype'},$borrower->{'borrowernumber'});
-	return ($doreturn, $messages, $iteminformation, $borrower);
-}
-
-=head2 fixaccountforlostandreturned
-
-	&fixaccountforlostandreturned($iteminfo,$borrower);
-
-Calculates the charge for a book lost and returned (Not exported & used only once)
-
-C<$iteminfo> is a hashref to iteminfo. Only {itemnumber} is used.
-
-C<$borrower> is a hashref to borrower. Only {borrowernumber is used.
-
-=cut
-
-sub fixaccountforlostandreturned {
-	my ($iteminfo, $borrower) = @_;
-	my %env;
-	my $dbh = C4::Context->dbh;
-	my $itm = $iteminfo->{'itemnumber'};
-	# check for charge made for lost book
-	my $sth = $dbh->prepare("select * from accountlines where (itemnumber = ?) and (accounttype='L' or accounttype='Rep') order by date desc");
-	$sth->execute($itm);
-	if (my $data = $sth->fetchrow_hashref) {
-	# writeoff this amount
-		my $offset;
-		my $amount = $data->{'amount'};
-		my $acctno = $data->{'accountno'};
-		my $amountleft;
-		if ($data->{'amountoutstanding'} == $amount) {
-		$offset = $data->{'amount'};
-		$amountleft = 0;
-		} else {
-		$offset = $amount - $data->{'amountoutstanding'};
-		$amountleft = $data->{'amountoutstanding'} - $amount;
-		}
-		my $usth = $dbh->prepare("update accountlines set accounttype = 'LR',amountoutstanding='0'
-			where (borrowernumber = ?)
-			and (itemnumber = ?) and (accountno = ?) ");
-		$usth->execute($data->{'borrowernumber'},$itm,$acctno);
-		$usth->finish;
-	#check if any credit is left if so writeoff other accounts
-		my $nextaccntno = getnextacctno(\%env,$data->{'borrowernumber'},$dbh);
-		if ($amountleft < 0){
-		$amountleft*=-1;
-		}
-		if ($amountleft > 0){
-		my $msth = $dbh->prepare("select * from accountlines where (borrowernumber = ?)
-							and (amountoutstanding >0) order by date");
-		$msth->execute($data->{'borrowernumber'});
-	# offset transactions
-		my $newamtos;
-		my $accdata;
-		while (($accdata=$msth->fetchrow_hashref) and ($amountleft>0)){
-			if ($accdata->{'amountoutstanding'} < $amountleft) {
-			$newamtos = 0;
-			$amountleft -= $accdata->{'amountoutstanding'};
-			}  else {
-			$newamtos = $accdata->{'amountoutstanding'} - $amountleft;
-			$amountleft = 0;
-			}
-			my $thisacct = $accdata->{'accountno'};
-			my $usth = $dbh->prepare("update accountlines set amountoutstanding= ?
-					where (borrowernumber = ?)
-					and (accountno=?)");
-			$usth->execute($newamtos,$data->{'borrowernumber'},'$thisacct');
-			$usth->finish;
-			$usth = $dbh->prepare("insert into accountoffsets
-				(borrowernumber, accountno, offsetaccount,  offsetamount)
-				values
-				(?,?,?,?)");
-			$usth->execute($data->{'borrowernumber'},$accdata->{'accountno'},$nextaccntno,$newamtos);
-			$usth->finish;
-		}
-		$msth->finish;
-		}
-		if ($amountleft > 0){
-			$amountleft*=-1;
-		}
-		my $desc="Book Returned ".$iteminfo->{'barcode'};
-		$usth = $dbh->prepare("insert into accountlines
-			(borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding)
-			values (?,?,now(),?,?,'CR',?)");
-		$usth->execute($data->{'borrowernumber'},$nextaccntno,0-$amount,$desc,$amountleft);
-		$usth->finish;
-		$usth = $dbh->prepare("insert into accountoffsets
-			(borrowernumber, accountno, offsetaccount,  offsetamount)
-			values (?,?,?,?)");
-		$usth->execute($borrower->{'borrowernumber'},$data->{'accountno'},$nextaccntno,$offset);
-		$usth->finish;
-#		$usth = $dbh->prepare("update items set paidfor='' where itemnumber=?");
-#		$usth->execute($itm);
-#		$usth->finish;
-	}
-	$sth->finish;
-	return;
-}
-
-=head2 fixoverdueonreturn
-
-	&fixoverdueonreturn($brn,$itm);
-
-??
-
-C<$brn> borrowernumber
-
-C<$itm> itemnumber
-
-=cut
-
-sub fixoverduesonreturn {
-	my ($brn, $itm) = @_;
-	my $dbh = C4::Context->dbh;
-	# check for overdue fine
-	my $sth = $dbh->prepare("select * from accountlines where (borrowernumber = ?) and (itemnumber = ?) and (accounttype='FU' or accounttype='O')");
-	$sth->execute($brn,$itm);
-	# alter fine to show that the book has been returned
-	if (my $data = $sth->fetchrow_hashref) {
-		my $usth=$dbh->prepare("update accountlines set accounttype='F' where (borrowernumber = ?) and (itemnumber = ?) and (accountno = ?)");
-		$usth->execute($brn,$itm,$data->{'accountno'});
-		$usth->finish();
-	}
-	$sth->finish();
-	return;
-}
-
-
-#
-# NOTE!: If you change this function, be sure to update the POD for
-# &getpatroninformation.
-#
-# $flags = &patronflags($env, $patron, $dbh);
-#
-# $flags->{CHARGES}
-#		{message}	Message showing patron's credit or debt
-#		{noissues}	Set if patron owes >$5.00
-#         {GNA}			Set if patron gone w/o address
-#		{message}	"Borrower has no valid address"
-#		{noissues}	Set.
-#         {LOST}		Set if patron's card reported lost
-#		{message}	Message to this effect
-#		{noissues}	Set.
-#         {DBARRED}		Set is patron is debarred
-#		{message}	Message to this effect
-#		{noissues}	Set.
-#         {NOTES}		Set if patron has notes
-#		{message}	Notes about patron
-#         {ODUES}		Set if patron has overdue books
-#		{message}	"Yes"
-#		{itemlist}	ref-to-array: list of overdue books
-#		{itemlisttext}	Text list of overdue items
-#         {WAITING}		Set if there are items available that the
-#				patron reserved
-#		{message}	Message to this effect
-#		{itemlist}	ref-to-array: list of available items
-sub patronflags {
-# Original subroutine for Circ2.pm
-	my %flags;
-	my ($env, $patroninformation, $dbh) = @_;
-	my $amount = C4::Accounts2::checkaccount($env, $patroninformation->{'borrowernumber'}, $dbh);
-	if ($amount > 0) {
-		my %flaginfo;
-		my $noissuescharge = C4::Context->preference("noissuescharge");
-		$flaginfo{'message'}= sprintf "Patron owes \$%.02f", $amount;
-		if ($amount > $noissuescharge) {
-		$flaginfo{'noissues'} = 1;
-		}
-		$flags{'CHARGES'} = \%flaginfo;
-	} elsif ($amount < 0){
-	my %flaginfo;
-	$flaginfo{'message'} = sprintf "Patron has credit of \$%.02f", -$amount;
-		$flags{'CHARGES'} = \%flaginfo;
-	}
-	if ($patroninformation->{'gonenoaddress'} == 1) {
-		my %flaginfo;
-		$flaginfo{'message'} = 'Borrower has no valid address.';
-		$flaginfo{'noissues'} = 1;
-		$flags{'GNA'} = \%flaginfo;
-	}
-	if ($patroninformation->{'lost'} == 1) {
-		my %flaginfo;
-		$flaginfo{'message'} = 'Borrower\'s card reported lost.';
-		$flaginfo{'noissues'} = 1;
-		$flags{'LOST'} = \%flaginfo;
-	}
-	if ($patroninformation->{'debarred'} == 1) {
-		my %flaginfo;
-		$flaginfo{'message'} = 'Borrower is Debarred.';
-		$flaginfo{'noissues'} = 1;
-		$flags{'DBARRED'} = \%flaginfo;
-	}
-	if ($patroninformation->{'borrowernotes'}) {
-		my %flaginfo;
-		$flaginfo{'message'} = "$patroninformation->{'borrowernotes'}";
-		$flags{'NOTES'} = \%flaginfo;
-	}
-	my ($odues, $itemsoverdue)
-			= checkoverdues($env, $patroninformation->{'borrowernumber'}, $dbh);
-	if ($odues > 0) {
-		my %flaginfo;
-		$flaginfo{'message'} = "Yes";
-		$flaginfo{'itemlist'} = $itemsoverdue;
-		foreach (sort {$a->{'date_due'} cmp $b->{'date_due'}} @$itemsoverdue) {
-		$flaginfo{'itemlisttext'}.="$_->{'date_due'} $_->{'barcode'} $_->{'title'} \n";
-		}
-		$flags{'ODUES'} = \%flaginfo;
-	}
-	my ($nowaiting, $itemswaiting)
-			= CheckWaiting($patroninformation->{'borrowernumber'});
-	if ($nowaiting > 0) {
-		my %flaginfo;
-		$flaginfo{'message'} = "Reserved items available";
-		$flaginfo{'itemlist'} = $itemswaiting;
-		$flags{'WAITING'} = \%flaginfo;
-	}
-	return(\%flags);
-}
-
-
-# Not exported
-sub checkoverdues {
-# From Main.pm, modified to return a list of overdueitems, in addition to a count
-  #checks whether a borrower has overdue items
-	my ($env, $bornum, $dbh)=@_;
-	my $today=get_today();
-	my @overdueitems;
-	my $count = 0;
-	my $sth = $dbh->prepare("SELECT issues.* , i.biblionumber as biblionumber,b.* FROM issues, items i,biblio b
-			WHERE  i.itemnumber=issues.itemnumber
-				AND i.biblionumber=b.biblionumber
-				AND issues.borrowernumber  = ?
-				AND issues.returndate is NULL
-				AND issues.date_due < ?");
-	$sth->execute($bornum,$today);
-	while (my $data = $sth->fetchrow_hashref) {
-	
-	push (@overdueitems, $data);
-	$count++;
-	}
-	$sth->finish;
-	return ($count, \@overdueitems);
-}
-
-# Not exported
-sub currentborrower {
-# Original subroutine for Circ2.pm
-	my ($itemnumber) = @_;
-	my $dbh = C4::Context->dbh;
-	
-	my $sth=$dbh->prepare("select borrowers.borrowernumber from
-	issues,borrowers where issues.itemnumber=? and
-	issues.borrowernumber=borrowers.borrowernumber and issues.returndate is
-	NULL");
-	$sth->execute($itemnumber);
-	my ($borrower) = $sth->fetchrow;
-	return($borrower);
-}
-
-# FIXME - Not exported, but used in 'updateitem.pl' anyway.
-sub checkreserve_to_delete {
-# Check for reserves for biblio
-	my ($env,$dbh,$itemnum)=@_;
-	my $resbor = "";
-	my $sth = $dbh->prepare("select * from reserves,items
-	where (items.itemnumber = ?)
-	and (reserves.cancellationdate is NULL)
-	and (items.biblionumber = reserves.biblionumber)
-	and ((reserves.found = 'W')
-	or (reserves.found is null))
-	order by priority");
-	$sth->execute($itemnum);
-	my $resrec;
-	my $data=$sth->fetchrow_hashref;
-	while ($data && $resbor eq '') {
-	$resrec=$data;
-	my $const = $data->{'constrainttype'};
-	if ($const eq "a") {
-	$resbor = $data->{'borrowernumber'};
-	} else {
-	my $found = 0;
-	my $csth = $dbh->prepare("select * from reserveconstraints,items
-		where (borrowernumber=?)
-		and reservedate=?
-		and reserveconstraints.biblionumber=?
-		and (items.itemnumber=? )");
-	$csth->execute($data->{'borrowernumber'},$data->{'biblionumber'},$data->{'reservedate'},$itemnum);
-	if (my $cdata=$csth->fetchrow_hashref) {$found = 1;}
-	if ($const eq 'o') {
-		if ($found eq 1) {$resbor = $data->{'borrowernumber'};}
-	} else {
-		if ($found eq 0) {$resbor = $data->{'borrowernumber'};}
-	}
-	$csth->finish();
-	}
-	$data=$sth->fetchrow_hashref;
-	}
-	$sth->finish;
-	return ($resbor,$resrec);
-}
-
-=head2 currentissues
-
-  $issues = &currentissues($env, $borrower);
-
-Returns a list of books currently on loan to a patron.
-
-If C<$env-E<gt>{todaysissues}> is set and true, C<&currentissues> only
-returns information about books issued today. If
-C<$env-E<gt>{nottodaysissues}> is set and true, C<&currentissues> only
-returns information about books issued before today. If both are
-specified, C<$env-E<gt>{todaysissues}> is ignored. If neither is
-specified, C<&currentissues> returns all of the patron's issues.
-
-C<$borrower->{borrowernumber}> is the borrower number of the patron
-whose issues we want to list.
-
-C<&currentissues> returns a PHP-style array: C<$issues> is a
-reference-to-hash whose keys are integers in the range 1...I<n>, where
-I<n> is the number of items on issue (either today or before today).
-C<$issues-E<gt>{I<n>}> is a reference-to-hash whose keys are all of
-the fields of the biblio, biblioitems, items, and issues fields of the
-Koha database for that particular item.
-
-=cut
-
-#'
-sub currentissues {
-# New subroutine for Circ2.pm
-	my ($env, $borrower) = @_;
-	my $dbh = C4::Context->dbh;
-	my %currentissues;
-	my $counter=1;
-	my $borrowernumber = $borrower->{'borrowernumber'};
-	my $crit='';
-
-	# Figure out whether to get the books issued today, or earlier.
-	# FIXME - $env->{todaysissues} and $env->{nottodaysissues} can
-	# both be specified, but are mutually-exclusive. This is bogus.
-	# Make this a flag. Or better yet, return everything in (reverse)
-	# chronological order and let the caller figure out which books
-	# were issued today.
-	my $today=get_today();
-	if ($env->{'todaysissues'}) {
-		
-		$crit=" and issues.timestamp like '$today%' ";
-	}
-	if ($env->{'nottodaysissues'}) {
-		
-		$crit=" and !(issues.timestamp like '$today%') ";
-	}
-
-	# FIXME - Does the caller really need every single field from all
-	# four tables?
-	my $sth=$dbh->prepare("select * from issues,items where
-	borrowernumber=? and issues.itemnumber=items.itemnumber and
-	 returndate is null
-	$crit order by issues.date_due");
-	$sth->execute($borrowernumber);
-	while (my $data = $sth->fetchrow_hashref) {
-
-		
-		if ($data->{'date_due'} lt $today) {
-			$data->{'overdue'}=1;
-		}
-		my $itemnumber=$data->{'itemnumber'};
-		# FIXME - Consecutive integers as hash keys? You have GOT to
-		# be kidding me! Use an array, fercrissakes!
-		$currentissues{$counter}=$data;
-		$counter++;
-	}
-	$sth->finish;
-	return(\%currentissues);
-}
-
-=head2 getissues
-
-  $issues = &getissues($borrowernumber);
-
-Returns the set of books currently on loan to a patron.
-
-C<$borrowernumber> is the patron's borrower number.
-
-C<&getissues> returns a PHP-style array: C<$issues> is a
-reference-to-hash whose keys are integers in the range 0..I<n>-1,
-where I<n> is the number of books the patron currently has on loan.
-
-The values of C<$issues> are references-to-hash whose keys are
-selected fields from the issues, items, biblio, and biblioitems tables
-of the Koha database.
-
-=cut
-#'
-sub getissues {
-	my ($borrower) = @_;
-	my $dbh = C4::Context->dbh;
-	my $borrowernumber = $borrower->{'borrowernumber'};
-	my %currentissues;
-	my $bibliodata;
-	my @results;
-	my $todaysdate=get_today();
-	my $counter = 0;
-	my $select = "SELECT *
-			FROM issues,items,biblio
-			WHERE issues.borrowernumber  = ?
-			AND issues.itemnumber      = items.itemnumber
-			AND items.biblionumber      = biblio.biblionumber
-			AND issues.returndate      IS NULL
-			ORDER BY issues.date_due";
-	#    print $select;
-	my $sth=$dbh->prepare($select);
-	$sth->execute($borrowernumber);
-	while (my $data = $sth->fetchrow_hashref) { 	
-		if ($data->{'date_due'}  lt $todaysdate) {
-			$data->{'overdue'} = 1;
-		}
-		$currentissues{$counter} = $data;
-		$counter++;
-	}
-	$sth->finish;
-	
-	return(\%currentissues);
-}
-
-# Not exported
-sub checkwaiting {
-# check for reserves waiting
-	my ($env,$dbh,$bornum)=@_;
-	my @itemswaiting;
-	my $sth = $dbh->prepare("select * from reserves where (borrowernumber = ?) and (reserves.found='W') and cancellationdate is NULL");
-	$sth->execute($bornum);
-	my $cnt=0;
-	if (my $data=$sth->fetchrow_hashref) {
-		$itemswaiting[$cnt] =$data;
-		$cnt ++
-	}
-	$sth->finish;
-	return ($cnt,\@itemswaiting);
-}
-
-=head2 renewstatus
-
-  $ok = &renewstatus($env, $dbh, $borrowernumber, $itemnumber);
-
-Find out whether a borrowed item may be renewed.
-
-C<$env> is ignored.
-
-C<$dbh> is a DBI handle to the Koha database.
-
-C<$borrowernumber> is the borrower number of the patron who currently
-has the item on loan.
-
-C<$itemnumber> is the number of the item to renew.
-
-C<$renewstatus> returns a true value iff the item may be renewed. The
-item must currently be on loan to the specified borrower; renewals
-must be allowed for the item's type; and the borrower must not have
-already renewed the loan.
-
-=cut
-
-sub renewstatus {
-	# check renewal status
-	##If system preference "strictrenewals" is used This script will try to return $renewok=2 or $renewok=3 as error messages
-	## 
-	my ($env,$bornum,$itemnumber)=@_;
-	my $dbh=C4::Context->dbh;
-	my $renews = 1;
-	my $resfound;
-	my $resrec;
-	my $renewokay=0; ##
-	# Look in the issues table for this item, lent to this borrower,
-	# and not yet returned.
-my $borrower=C4::Members::getpatroninformation($dbh,$bornum,undef);
-	
-	# FIXME - I think this function could be redone to use only one SQL call.
-	my $sth1 = $dbh->prepare("select * from issues,items,biblio
-								where (borrowernumber = ?)
-								and (issues.itemnumber = ?)
-								and items.biblionumber=biblio.biblionumber
-								and returndate is null
-								and items.itemnumber=issues.itemnumber");
-	$sth1->execute($bornum,$itemnumber);
-my $data1 = $sth1->fetchrow_hashref;
-	if ($data1 ) {
-		# Found a matching item
-		if (C4::Context->preference("LibraryName") eq "NEU Grand Library"){
-			##privileged get renewal whatever the case may be
-			if ($borrower->{'categorycode'} eq 'P'){
-			$renewokay = 1;
-			return $renewokay;
-			}
-		}
-		# See if this item may be renewed. 
-		my $sth2 = $dbh->prepare("select renewalsallowed from itemtypes	where itemtypes.itemtype=?");
-		$sth2->execute($data1->{itemtype});
-		if (my $data2=$sth2->fetchrow_hashref) {
-		$renews = $data2->{'renewalsallowed'};
-		}
-		if ($renews > $data1->{'renewals'}) {
-			$renewokay= 1;
-		}else{
-			if (C4::Context->preference("strictrenewals")){
-			$renewokay=3 ;
-			}
-		}
-		$sth2->finish;
-		 ($resfound, $resrec) = CheckReserves($itemnumber);
-		if ($resfound) {
-			if (C4::Context->preference("strictrenewals")){
-			$renewokay=4;
-			}else{
-			       $renewokay = 0;
-         			 }
-		}
-		 ($resfound, $resrec) = CheckReserves($itemnumber);
-               		 if ($resfound) {
-              		 	 if (C4::Context->preference("strictrenewals")){
-						$renewokay=4;
-				}else{
-			   	   		 $renewokay = 0;
-          				  }
-			}
-     if (C4::Context->preference("strictrenewals")){
-	### A new system pref "allowRenewalsBefore" prevents the renewal before a set amount of days left before expiry
-	## Try to find whether book can be renewed at this date
-	my $loanlength;
-
-	my $allowRenewalsBefore = C4::Context->preference("allowRenewalsBefore");
-	my $today=get_today();
-
-	# Find the issues record for this book### 
-	my $sth=$dbh->prepare("select SUBDATE(date_due, $allowRenewalsBefore)  from issues where itemnumber=? and returndate is null");
-	$sth->execute($itemnumber);
-	my $startdate=$sth->fetchrow;
-	$sth->finish;
-	
-	my $difference = DATE_diff($today,$startdate);
-	if  ($difference < 0) {
-	$renewokay=2 ;
-	}
-     }##strictrenewals	
-	}##item found
-	$sth1->finish;
-
-	return($renewokay);
-}
-
-=head2 renewbook
-
-  &renewbook($env, $borrowernumber, $itemnumber, $datedue);
-
-Renews a loan.
-
-C<$env-E<gt>{branchcode}> is the code of the branch where the
-renewal is taking place.
-
-C<$env-E<gt>{usercode}> is the value to log in C<statistics.usercode>
-in the Koha database.
-
-C<$borrowernumber> is the borrower number of the patron who currently
-has the item.
-
-C<$itemnumber> is the number of the item to renew.
-
-C<$datedue> can be used to set the due date. If C<$datedue> is the
-empty string, C<&renewbook> will calculate the due date automatically
-from the book's item type. If you wish to set the due date manually,
-C<$datedue> should be in the form YYYY-MM-DD.
-
-=cut
-
-sub renewbook {
-	my ($env,$bornum,$itemnumber,$datedue)=@_;
-	# mark book as renewed
-
-	my $loanlength;
-my $dbh=C4::Context->dbh;
-my $sth;
-my  $iteminformation = getiteminformation($env, $itemnumber,0);
-		
-
-
-if ($datedue eq "" ) {
-
-		my  $borrower = C4::Members::getpatroninformation($env,$bornum,0);
-		 $loanlength = getLoanLength($borrower->{'categorycode'},$iteminformation->{'itemtype'},$borrower->{'branchcode'});
-	
-		my $datedue=get_today();
-		my $calendar = C4::Calendar::Calendar->new(branchcode => $borrower->{'branchcode'});
-		my ($yeardue, $monthdue, $daydue) = split /-/, $datedue;
-		($daydue, $monthdue, $yeardue) = $calendar->addDate($daydue, $monthdue, $yeardue, $loanlength);
-		$datedue = "$yeardue-".sprintf ("%0.2d", $monthdue)."-". sprintf("%0.2d",$daydue);
-		
-	# Update the issues record to have the new due date, and a new count
-	# of how many times it has been renewed.
-	
-	$sth=$dbh->prepare("update issues set date_due = ?, renewals = renewals+1
-		where borrowernumber=? and itemnumber=? and returndate is null");
-	$sth->execute($datedue,$bornum,$itemnumber);
-	$sth->finish;
-
-	## Update items and marc record with new date -T.G
-	&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'date_due',$datedue);
-		
-	# Log the renewal
-	UpdateStats($env,$env->{'branchcode'},'renew','','',$itemnumber,$iteminformation->{'itemtype'},$bornum);
-
-	# Charge a new rental fee, if applicable?
-	my ($charge,$type)=calc_charges($env, $itemnumber, $bornum);
-	if ($charge > 0){
-		my $accountno=getnextacctno($env,$bornum,$dbh);
-		$sth=$dbh->prepare("Insert into accountlines (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber)
-							values (?,?,now(),?,?,?,?,?)");
-		$sth->execute($bornum,$accountno,$charge,"Renewal of Rental Item $iteminformation->{'title'} $iteminformation->{'barcode'}",'Rent',$charge,$itemnumber);
-		$sth->finish;
-	#     print $account;
-	}# end of rental charge
-		
-	return format_date($datedue);
-	}
-
- 
-	
-}
-
-
-
-=item calc_charges
-
-  ($charge, $item_type) = &calc_charges($env, $itemnumber, $borrowernumber);
-
-Calculate how much it would cost for a given patron to borrow a given
-item, including any applicable discounts.
-
-C<$env> is ignored.
-
-C<$itemnumber> is the item number of item the patron wishes to borrow.
-
-C<$borrowernumber> is the patron's borrower number.
-
-C<&calc_charges> returns two values: C<$charge> is the rental charge,
-and C<$item_type> is the code for the item's item type (e.g., C<VID>
-if it's a video).
-
-=cut
-
-sub calc_charges {
-	# calculate charges due
-	my ($env, $itemnumber, $bornum)=@_;
-	my $charge=0;
-	my $dbh = C4::Context->dbh;
-	my $item_type;
-	my $sth= $dbh->prepare("select itemtype from biblio,items where items.biblionumber=biblio.biblionumber and itemnumber=?");
-	$sth->execute($itemnumber);
-	my $itemtype=$sth->fetchrow;
-	$sth->finish;
-	
-	my $sth1= $dbh->prepare("select rentalcharge from itemtypes where  itemtypes.itemtype=?");
-	$sth1->execute($itemtype);
-	
-	$charge = $sth1->fetchrow;
-	my $q2 = "select rentaldiscount from issuingrules,borrowers
-              where (borrowers.borrowernumber = ?)
-              and (borrowers.categorycode = issuingrules.categorycode)
-              and (issuingrules.itemtype = ?)";
-            my $sth2=$dbh->prepare($q2);
-            $sth2->execute($bornum,$itemtype);
-    if (my $data2=$sth2->fetchrow_hashref) {
-		my $discount = $data2->{'rentaldiscount'};
-		if ($discount eq 'NULL') {
-		    $discount=0;
-		}
-		$charge = ($charge *(100 - $discount)) / 100;
-		#               warn "discount is $discount";
-	 }
-        $sth2->finish;
-        
-	$sth1->finish;
-	return ($charge,$itemtype);
-}
-
-
-
-sub createcharge {
-
-    my ($env,$dbh,$itemnumber,$bornum,$charge) = @_;
-    my $nextaccntno = getnextacctno($env,$bornum,$dbh);
-    my $sth = $dbh->prepare(<<EOT);
-	INSERT INTO	accountlines
-			(borrowernumber, itemnumber, accountno,
-			 date, amount, description, accounttype,
-			 amountoutstanding)
-	VALUES		(?, ?, ?,
-			 now(), ?, 'Rental', 'Rent',
-			 ?)
-EOT
-    $sth->execute($bornum, $itemnumber, $nextaccntno, $charge, $charge);
-    $sth->finish;
-}
-
-
-
-
-=item find_reserves
-
-  ($status, $record) = &find_reserves($itemnumber);
-
-Looks up an item in the reserves.
-
-C<$itemnumber> is the itemnumber to look up.
-
-C<$status> is true iff the search was successful.
-
-C<$record> is a reference-to-hash describing the reserve. Its keys are
-the fields from the reserves table of the Koha database.
-
-=cut
-#'
-# FIXME - This API is bogus: just return the record, or undef if none
-# was found.
-
-sub find_reserves {
-    my ($itemnumber) = @_;
-    my $dbh = C4::Context->dbh;
-    my ($itemdata) = getiteminformation("", $itemnumber,0);
-    my $sth = $dbh->prepare("select * from reserves where ((found = 'W') or (found is null)) and biblionumber = ? and cancellationdate is NULL order by priority, reservedate");
-    $sth->execute($itemdata->{'biblionumber'});
-    my $resfound = 0;
-    my $resrec;
-    my $lastrec;
-
-    # FIXME - I'm not really sure what's going on here, but since we
-    # only want one result, wouldn't it be possible (and far more
-    # efficient) to do something clever in SQL that only returns one
-    # set of values?
-while ($resrec = $sth->fetchrow_hashref) {
-	$lastrec = $resrec;
-      if ($resrec->{'found'} eq "W") {
-	    if ($resrec->{'itemnumber'} eq $itemnumber) {
-		$resfound = 1;
-	    }
-        } else {
-	    # FIXME - Use 'elsif' to avoid unnecessary indentation.
-	    if ($resrec->{'constrainttype'} eq "a") {
-		$resfound = 1;	
-	    } else {
-			my $consth = $dbh->prepare("select * from reserveconstraints where borrowernumber = ? and reservedate = ? and biblionumber = ? ");
-			$consth->execute($resrec->{'borrowernumber'},$resrec->{'reservedate'},$resrec->{'biblionumber'});
-			if (my $conrec = $consth->fetchrow_hashref) {
-				if ($resrec->{'constrainttype'} eq "o") {
-				$resfound = 1;
-				
-				}
-			}
-		$consth->finish;
-		}
-	}
-	if ($resfound) {
-	    my $updsth = $dbh->prepare("update reserves set found = 'W', itemnumber = ? where borrowernumber = ? and reservedate = ? and biblionumber = ?");
-	    $updsth->execute($itemnumber,$resrec->{'borrowernumber'},$resrec->{'reservedate'},$resrec->{'biblionumber'});
-	    $updsth->finish;
-	    last;
-	}
-    }
-    $sth->finish;
-    return ($resfound,$lastrec);
-}
-
-sub fixdate {
-    my ($year, $month, $day) = @_;
-    my $invalidduedate;
-    my $date;
-    if (($year eq 0) && ($month eq 0) && ($year eq 0)) {
-#	$env{'datedue'}='';
-    } else {
-	if (($year eq 0) || ($month eq 0) || ($year eq 0)) {
-	    $invalidduedate=1;
-	} else {
-	    if (($day>30) && (($month==4) || ($month==6) || ($month==9) || ($month==11))) {
-		$invalidduedate = 1;
-	    } elsif (($day > 29) && ($month == 2)) {
-		$invalidduedate=1;
-	    } elsif (($month == 2) && ($day > 28) && (($year%4) && ((!($year%100) || ($year%400))))) {
-		$invalidduedate=1;
-	    } else {
-		$date="$year-$month-$day";
-	    }
-	}
-    }
-    return ($date, $invalidduedate);
-}
-
-sub get_current_return_date_of {
-    my (@itemnumbers) = @_;
-
-    my $query = '
-SELECT date_due,
-       itemnumber
-  FROM issues
-  WHERE itemnumber IN ('.join(',', @itemnumbers).') AND returndate IS NULL
-';
-    return get_infos_of($query, 'itemnumber', 'date_due');
-}
-
-sub get_transfert_infos {
-    my ($itemnumber) = @_;
-
-    my $dbh = C4::Context->dbh;
-
-    my $query = '
-SELECT datesent,
-       frombranch,
-       tobranch
-  FROM branchtransfers
-  WHERE itemnumber = ?
-    AND datearrived IS NULL
-';
-    my $sth = $dbh->prepare($query);
-    $sth->execute($itemnumber);
-
-    my @row = $sth->fetchrow_array();
-
-    $sth->finish;
-
-    return @row;
-}
-
-
-sub DeleteTransfer {
-	my($itemnumber) = @_;
-	my $dbh = C4::Context->dbh;
-    	my $sth=$dbh->prepare("DELETE FROM branchtransfers
-	where itemnumber=?
-	AND datearrived is null ");
-	$sth->execute($itemnumber);
-	$sth->finish;
-}
-
-sub GetTransfersFromBib {
-	my($frombranch,$tobranch) = @_;
-	my $dbh = C4::Context->dbh;
-    	my $sth=$dbh->prepare("SELECT itemnumber,datesent,frombranch FROM
-	 branchtransfers 
-	where frombranch=?
-	AND tobranch=? 
-	AND datearrived is null ");
-	$sth->execute($frombranch,$tobranch);
-	my @gettransfers;
-	my $i=0;
-	while (my $data=$sth->fetchrow_hashref){
-		$gettransfers[$i]=$data;
-		$i++;
-    	}
-    	$sth->finish;
-    	return(@gettransfers);	
-}
-
-sub GetReservesToBranch {
-	my($frombranch,$default) = @_;
-	my $dbh = C4::Context->dbh;
-    	my $sth=$dbh->prepare("SELECT borrowernumber,reservedate,itemnumber,timestamp FROM
-	 reserves 
-	where priority='0' AND cancellationdate is null  
-	AND branchcode=?
-	AND branchcode!=?
-	AND found is null ");
-	$sth->execute($frombranch,$default);
-	my @transreserv;
-	my $i=0;
-	while (my $data=$sth->fetchrow_hashref){
-		$transreserv[$i]=$data;
-		$i++;
-    	}
-    	$sth->finish;
-    	return(@transreserv);	
-}
-
-sub GetReservesForBranch {
-	my($frombranch) = @_;
-	my $dbh = C4::Context->dbh;
-    	my $sth=$dbh->prepare("SELECT borrowernumber,reservedate,itemnumber,waitingdate FROM
-	 reserves 
-	where priority='0' AND cancellationdate is null 
-	AND found='W' 
-	AND branchcode=? order by reservedate");
-	$sth->execute($frombranch);
-	my @transreserv;
-	my $i=0;
-	while (my $data=$sth->fetchrow_hashref){
-		$transreserv[$i]=$data;
-		$i++;
-    	}
-    	$sth->finish;
-    	return(@transreserv);	
-}
-
-sub checktransferts{
-	my($itemnumber) = @_;
-	my $dbh = C4::Context->dbh;
-    	my $sth=$dbh->prepare("SELECT datesent,frombranch,tobranch FROM branchtransfers
-        WHERE itemnumber = ? AND datearrived IS NULL");
-	$sth->execute($itemnumber);
-	my @tranferts = $sth->fetchrow_array;
-	$sth->finish;
-
-	return (@tranferts);
-}
-
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: C4/Circulation/Fines.pm
===================================================================
RCS file: C4/Circulation/Fines.pm
diff -N C4/Circulation/Fines.pm
--- C4/Circulation/Fines.pm	15 Nov 2006 01:36:00 -0000	1.20
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,305 +0,0 @@
-package C4::Circulation::Fines;
-
-# $Id: Fines.pm,v 1.20 2006/11/15 01:36:00 tgarip1957 Exp $
-
-# 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;
-require Exporter;
-
-use C4::Context;
-use C4::Biblio;
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Circulation::Fines - Koha module dealing with fines
-
-=head1 SYNOPSIS
-
-  use C4::Circulation::Fines;
-
-=head1 DESCRIPTION
-
-This module contains several functions for dealing with fines for
-overdue items. It is primarily used by the 'misc/fines2.pl' script.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(&Getoverdues &CalcFine &BorType &UpdateFine &ReplacementCost);
-
-=item Getoverdues
-
-  ($count, $overdues) = &Getoverdues();
-
-Returns the list of all overdue books.
-
-C<$count> is the number of elements in C<@{$overdues}>.
-
-C<$overdues> is a reference-to-array. Each element is a
-reference-to-hash whose keys are the fields of the issues table in the
-Koha database.
-
-=cut
-#'
-sub Getoverdues{
-  my $dbh = C4::Context->dbh;
-  my $sth=$dbh->prepare("Select * from issues where date_due < now() and returndate is  NULL order by borrowernumber");
-  $sth->execute;
-  # FIXME - Use push @results
-  my $i=0;
-  my @results;
-  while (my $data=$sth->fetchrow_hashref){
-  push  @results,$data;
-    $i++;
-  }
-  $sth->finish;
-  return($i,\@results);
-}
-
-=item CalcFine
-
-  ($amount, $chargename, $message) =
-	&CalcFine($itemnumber, $borrowercode, $days_overdue);
-
-Calculates the fine for a book.
-
-The issuingrules table in the Koha database is a fine matrix, listing
-the penalties for each type of patron for each type of item and each branch (e.g., the
-standard fine for books might be $0.50, but $1.50 for DVDs, or staff
-members might get a longer grace period between the first and second
-reminders that a book is overdue).
-
-
-
-C<$itemnumber> is the book's item number.
-
-C<$borrowercode> is the borrower code of the patron who currently has
-the book.
-
-C<$days_overdue> is the number of days elapsed since the book's due
-date.
-
-C<&CalcFine> returns a list of three values:
-
-C<$amount> is the fine owed by the patron (see above).
-
-C<$chargename> is the chargename field from the applicable record in
-the issuingrules table, whatever that is.
-
-C<$message> is a text message, either "First Notice", "Second Notice",
-or "Final Notice".
-
-=cut
-#'
-sub CalcFine {
-  my ($itemnumber,$bortype,$difference)=@_;
-  my $dbh = C4::Context->dbh;
-  # Look up the issuingrules record for this book's item type and the
-  # given borrwer type.
- 
-
-  my $sth=$dbh->prepare("Select * from items,biblio,itemtypes,issuingrules where items.itemnumber=?
-  and items.biblionumber=biblio.biblionumber and
-  biblio.itemtype=itemtypes.itemtype and
-  issuingrules.itemtype=itemtypes.itemtype and
-  issuingrules.categorycode=? ");
-#  print $query;
-  $sth->execute($itemnumber,$bortype);
-  my $data=$sth->fetchrow_hashref;
-	# FIXME - Error-checking: the item might be lost, or there
-	# might not be an entry in 'issuingrules' for this item type
-	# or borrower type.
-  $sth->finish;
-  my $amount=0;
-  my $printout;
-
-  if ($difference > $data->{'firstremind'}){
-    # Yes. Set the fine as listed.
-$amount=$data->{'fine'}* $difference;
-
-    $printout="First Notice";
-  }
-
-  # Is it time to send out a second reminder?
-  my $second=$data->{'firstremind'}+$data->{chargeperiod};
-  if ($difference == $second){
-$amount=$data->{'fine'}* $difference;
-
-    $printout="Second Notice";
-  }
-
-  # Is it time to send the account to a collection agency?
-  # FIXME -This $data->{'accountsent'} is not seemed to be set in the DB
-  if ($difference == $data->{'accountsent'}){
-     $amount=$data->{'fine'}* $difference;
-
-    $printout="Final Notice";
-  }
-  return($amount,$data->{'chargename'},$printout);
-}
-
-=item UpdateFine
-
-  &UpdateFine($itemnumber, $borrowernumber, $amount, $type, $description);
-
-(Note: the following is mostly conjecture and guesswork.)
-
-Updates the fine owed on an overdue book.
-
-C<$itemnumber> is the book's item number.
-
-C<$borrowernumber> is the borrower number of the patron who currently
-has the book on loan.
-
-C<$amount> is the current amount owed by the patron.
-
-C<$type> will be used in the description of the fine.
-
-C<$description> is a string that must be present in the description of
-the fine. I think this is expected to be a date in DD/MM/YYYY format.
-
-C<&UpdateFine> looks up the amount currently owed on the given item
-and sets it to C<$amount>, creating, if necessary, a new entry in the
-accountlines table of the Koha database.
-
-=cut
-#'
-# FIXME - This API doesn't look right: why should the caller have to
-# specify both the item number and the borrower number? A book can't
-# be on loan to two different people, so the item number should be
-# sufficient.
-sub UpdateFine {
-  my ($itemnum,$bornum,$amount,$type,$due)=@_;
-  my $dbh = C4::Context->dbh;
-  # FIXME - What exactly is this query supposed to do? It looks up an
-  # entry in accountlines that matches the given item and borrower
-  # numbers, where the description contains $due, and where the
-  # account type has one of several values, but what does this _mean_?
-  # Does it look up existing fines for this item?
-  # FIXME - What are these various account types? ("FU", "O", "F", "M")
-
-  my $sth=$dbh->prepare("Select * from accountlines where itemnumber=? and
-  borrowernumber=? and (accounttype='FU' or accounttype='O' or
-  accounttype='F' or accounttype='M') ");
-  $sth->execute($itemnum,$bornum);
-
-  if (my $data=$sth->fetchrow_hashref){
-    # I think this if-clause deals with the case where we're updating
-    # an existing fine.
-#    print "in accounts ...";
-    if ($data->{'amount'} != $amount){
-
-#     print "updating";
-      my $diff=$amount - $data->{'amount'};
-      my $out=$data->{'amountoutstanding'}+$diff;
-      my $sth2=$dbh->prepare("update accountlines set date=now(), amount=?,
-      amountoutstanding=?,accounttype='FU' where
-      accountid=?");
-      $sth2->execute($amount,$out,$data->{'accountid'});
-      $sth2->finish;
-   } else {
-      print "no update needed $data->{'amount'} \n";
-    }
-  } else {
-    # I think this else-clause deals with the case where we're adding
-    # a new fine.
-    my $sth4=$dbh->prepare("select title from biblio ,items where items.itemnumber=?
-    and biblio.biblionumber=items.biblionumber");
-    $sth4->execute($itemnum);
-    my $title=$sth4->fetchrow;
-    $sth4->finish;
- #   print "not in account";
-    my $sth3=$dbh->prepare("Select max(accountno) from accountlines");
-    $sth3->execute;
-    # FIXME - Make $accountno a scalar.
-    my $accountno=$sth3->fetchrow;
-    $sth3->finish;
-    $accountno++;
-    my $sth2=$dbh->prepare("Insert into accountlines
-    (borrowernumber,itemnumber,date,amount,
-    description,accounttype,amountoutstanding,accountno) values
-    (?,?,now(),?,?,'FU',?,?)");
-    $sth2->execute($bornum,$itemnum,$amount,"$type $title $due",$amount,$accountno);
-    $sth2->finish;
-  }
-  $sth->finish;
-}
-
-
-
-=item BorType
-
-  $borrower = &BorType($borrowernumber);
-
-Looks up a patron by borrower number.
-
-C<$borrower> is a reference-to-hash whose keys are all of the fields
-from the borrowers and categories tables of the Koha database. Thus,
-C<$borrower> contains all information about both the borrower and
-category he or she belongs to.
-
-=cut
-#'
-sub BorType {
-  my ($borrowernumber)=@_;
-  my $dbh = C4::Context->dbh;
-  my $sth=$dbh->prepare("Select * from borrowers,categories where
-  borrowernumber=? and
-borrowers.categorycode=categories.categorycode");
-  $sth->execute($borrowernumber);
-  my $data=$sth->fetchrow_hashref;
-  $sth->finish;
-  return($data);
-}
-
-=item ReplacementCost
-
-  $cost = &ReplacementCost($itemnumber);
-
-Returns the replacement cost of the item with the given item number.
-
-=cut
-#'
-sub ReplacementCost{
-  my ($itemnumber)=@_;
-  my $dbh = C4::Context->dbh;
-  my ($itemrecord)=XMLgetitem($dbh,$itemnumber);
-$itemrecord=XML_xml2hash_onerecord($itemrecord);
- my $replacementprice=XML_readline_onerecord($itemrecord,"replacementprice","holdings"); 
-  return($replacementprice);
-}
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: C4/Interface/CGI/Output.pm
===================================================================
RCS file: C4/Interface/CGI/Output.pm
diff -N C4/Interface/CGI/Output.pm
--- C4/Interface/CGI/Output.pm	6 Sep 2006 16:21:04 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,95 +0,0 @@
-package C4::Interface::CGI::Output;
-
-# $Id: Output.pm,v 1.7 2006/09/06 16:21:04 tgarip1957 Exp $
-
-#package to work around problems in HTTP headers
-# Note: This is just a utility module; it should not be instantiated.
-
-
-# Copyright 2003 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;
-require Exporter;
-use open ':utf8';
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::CGI::Output - Convenience functions for handling outputting HTML pages
-
-=head1 SYNOPSIS
-
-  use C4::Interface::CGI::Output;
-
-  print $query->header(-type => "text/html"), $output;
-
-=head1 DESCRIPTION
-
-The functions in this module peek into a piece of HTML and return strings
-related to the (guessed) charset.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(	&output_html_with_http_headers
-		);
-
-
-
-
-
-=item output_html_with_http_headers
-
-   &output_html_with_http_headers($query, $cookie, $html)
-
-Outputs the HTML page $html with the appropriate HTTP headers,
-with the authentication cookie $cookie and a Content-Type that
-corresponds to the HTML page $html.
-
-=cut
-
-sub output_html_with_http_headers ($$$) {
-
-    my($query, $cookie, $html) = @_;
-    print $query->header(
-	-type   => "text/html",
-	-charset=>"UTF-8",
-	-cookie => $cookie,
-  ), $html;
-}
-
-#---------------------------------
-
-END { }       # module clean-up code here (global destructor)
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: C4/Interface/CGI/Template.pm
===================================================================
RCS file: C4/Interface/CGI/Template.pm
diff -N C4/Interface/CGI/Template.pm
--- C4/Interface/CGI/Template.pm	2 Feb 2003 07:18:37 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,90 +0,0 @@
-package C4::Interface::CGI::Template;
-
-# $Id: Template.pm,v 1.1 2003/02/02 07:18:37 acli Exp $
-
-# convenience package for HTML templating
-# Note: This is just a utility module; it should not be instantiated.
-
-
-# Copyright 2003 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;
-require Exporter;
-
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Members - Convenience functions for using HTML::Template
-
-=head1 SYNOPSIS
-
-  use C4::Interface::HTML::Template;
-
-=head1 DESCRIPTION
-
-The functions in this module peek into a piece of HTML and return strings
-related to the (guessed) charset.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-		&expand_sex_into_predicate
-	     );
-
-=item expand_sex_into_predicate
-
-  $data{&expand_sex_into_predicate($data{sex})} = 1;
-
-Converts a single 'M' or 'F' into 'sex_M_p' or 'sex_F_p'
-respectively.
-
-In some languages, 'M' and 'F' are not appropriate. However,
-with HTML::Template, there is no way to localize 'M' or 'F'
-unless these are converted into variables that TMPL_IF can
-understand. This function provides this conversion.
-
-=cut
-
-sub expand_sex_into_predicate ($) {
-   my($sex) = @_;
-   return "sex_${sex}_p";
-} # expand_sex_into_predicate
-
-#---------------------------------
-
-END { }       # module clean-up code here (global destructor)
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: acqui/acqui-home.pl
===================================================================
RCS file: acqui/acqui-home.pl
diff -N acqui/acqui-home.pl
--- acqui/acqui-home.pl	20 Sep 2006 21:44:36 -0000	1.16
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,124 +0,0 @@
-#!/usr/bin/perl
-
-# 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
-
-# $Id: acqui-home.pl,v 1.16 2006/09/20 21:44:36 tgarip1957 Exp $
-
-
-=head1 NAME
-
-acqui-home.pl
-
-=head1 DESCRIPTION
-
-this script is the main page for acqui/
-It presents the budget's dashboard, another table about differents currency with 
-their rates and the pending suggestions.
-
-=head1 CGI PARAMETERS
-
-=over 4
-
-=item $status
-C<$status> is the status a suggestion could has. Default value is 'ASKED'.
-thus, it can be REJECTED, ACCEPTED, ORDERED, ASKED, AVAIBLE
-
-=back
-
-=cut
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Suggestions;
-use C4::Acquisition;
-use C4::Bookfund;
-use C4::Members;
-
-my $query = new CGI;
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => "acqui/acqui-home.tmpl",
-        query           => $query,
-        type            => "intranet",
-        authnotrequired => 0,
-        flagsrequired   => { acquisition => 1 },
-        debug           => 1,
-    }
-);
-
-# budget
-my $me= C4::Context->userenv;
-my $homebranch=$me->{'branch'} ;
-my @results = GetBookFunds($homebranch);
-my $count = scalar @results;
-my $classlist   = '';
-my $total       = 0;
-my $totspent    = 0;
-my $totcomtd    = 0;
-my $totavail    = 0;
-my @loop_budget = ();
-
-for (my $i=0; $i<$count; $i++){
-	my ($spent,$comtd)=GetBookFundBreakdown($results[$i]->{'bookfundid'});
-	my $avail=$results[$i]->{'budgetamount'}-($spent+$comtd);
-	my %line;
-	$line{bookfundname} = $results[$i]->{'bookfundname'};
-	$line{budgetamount} = $results[$i]->{'budgetamount'};
-	$line{spent} = sprintf  ("%.2f", $spent);
-	$line{comtd} = sprintf  ("%.2f",$comtd);
-	$line{avail}  = sprintf  ("%.2f",$avail);
-	push @loop_budget, \%line;
-	$total+=$results[$i]->{'budgetamount'};
-	$totspent+=$spent;
-	$totcomtd+=$comtd;
-	$totavail+=$avail;
-}
-
-# currencies
-my @rates = GetCurrencies();
-my $count = scalar @rates;
-
-my @loop_currency = ();
-for ( my $i = 0 ; $i < $count ; $i++ ) {
-    my %line;
-    $line{currency} = $rates[$i]->{'currency'};
-    $line{rate}     = $rates[$i]->{'rate'};
-    push @loop_currency, \%line;
-}
-
-# suggestions
-my $status           = $query->param('status') || "ASKED";
-my $suggestion       = CountSuggestion($status);
-my $suggestions_loop = &SearchSuggestion( '', '', '', '', $status, '' );
-
-$template->param(
-    classlist        => $classlist,
-    type             => 'intranet',
-    loop_budget      => \@loop_budget,
-    loop_currency    => \@loop_currency,
-    total            => sprintf( "%.2f", $total ),
-    suggestion       => $suggestion,
-    suggestions_loop => $suggestions_loop,
-    totspent         => sprintf( "%.2f", $totspent ),
-    totcomtd         => sprintf( "%.2f", $totcomtd ),
-    totavail         => sprintf( "%.2f", $totavail ),
-    nobudget         => $#results == -1 ? 1 : 0
-);
-
-output_html_with_http_headers $query, $cookie, $template->output;

Index: acqui/addorder.pl
===================================================================
RCS file: acqui/addorder.pl
diff -N acqui/addorder.pl
--- acqui/addorder.pl	28 Sep 2006 14:13:37 -0000	1.35
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,225 +0,0 @@
-#!/usr/bin/perl
-
-#script to add an order into the system
-#written 29/2/00 by chris at katipo.co.nz
-
-# 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
-
-
-=head1 NAME
-
-addorder.pl
-
-=head1 DESCRIPTION
-
-this script allows to add an order.
-It is called by :
-
-=item neworderbiblio.pl to add an order from nothing.
-
-=item neworderempty.pl to add an order from an existing biblio.
-
-=item newordersuggestion.pl to add an order from an existing suggestion.
-
-=head1 CGI PARAMETERS
-
-All of the cgi parameters below are related to the new order.
-
-=over 4
-
-=item C<ordnum>
-the number of this new order.
-
-=item C<basketno>
-the number of this new basket
-
-=item C<booksellerid>
-the bookseller the librarian has to pay.
-
-=item C<existing>
-
-=item C<title>
-the title of the record ordered.
-
-=item C<author>
-the author of the record ordered.
-
-=item C<copyrightdate>
-the copyrightdate of the record ordered.
-
-=item C<ISBN>
-the ISBN of the record ordered.
-
-=item C<format>
-
-=item C<quantity>
-the quantity to order.
-
-=item C<list_price>
-the price of this order.
-
-=item C<branch>
-the branch where this order will be received.
-
-=item C<series>
-
-=item C<notes>
-Notes on this basket.
-
-=item C<bookfund>
-bookfund use to pay this order.
-
-=item C<sort1> & C<sort2>
-
-=item C<rrp>
-
-=item C<ecost>
-
-=item C<gst>
-
-=item C<budget>
-
-=item C<cost>
-
-=item C<sub>
-
-=item C<invoice>
-the number of the invoice for this order.
-
-=item C<publishercode>
-
-=item C<suggestionid>
-if it is an order from an existing suggestion : the id of this suggestion.
-
-=item C<donation>
-
-=back
-
-=cut
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Acquisition;
-use C4::Suggestions;
-use C4::Biblio;
-use C4::Interface::CGI::Output;
-
-my $input = new CGI;
-# get_template_and_user used only to check auth & get user id
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => "acqui/booksellers.tmpl",
-        query           => $input,
-        type            => "intranet",
-        authnotrequired => 0,
-        flagsrequired   => { acquisition => 1 },
-        debug           => 1,
-    }
-);
-
-
-# get CGI parameters
-my $ordnum       = $input->param('ordnum');
-my $basketno     = $input->param('basketno');
-my $booksellerid = $input->param('booksellerid');
-my $existing     = $input->param('existing');    # existing biblio, (not basket or order)
-my $title         = $input->param('title');
-my $author        = $input->param('author');
-my $copyrightdate = $input->param('copyrightdate');
-my $isbn          = $input->param('ISBN');
-my $itemtype      = $input->param('format');
-my $quantity      = $input->param('quantity');
-my $listprice     = $input->param('list_price');
-my $branch        = $input->param('branch');
-my $discount=$input->param('discount');
-if ( $listprice eq '' ) {
-    $listprice = 0;
-}
-my $series = $input->param('series');
-my $notes         = $input->param('notes');
-my $bookfundid      = $input->param('bookfundid');
-my $sort1         = $input->param('sort1');
-my $sort2         = $input->param('sort2');
-my $rrp           = $input->param('rrp');
-my $ecost         = $input->param('ecost');
-my $gst           = $input->param('gstrate');
-my $budget        = $input->param('budget');
-my $unitprice         = $input->param('unitprice');
-my $sub           = $input->param('sub');
-my $purchaseordernumber       = $input->param('purchaseordernumber');
-my $publishercode = $input->param('publishercode');
-my $suggestionid  = $input->param('suggestionid');
-my $donation      = $input->param('donation');
-my $user          = $input->remote_user;
-my $biblionumber=$input->param('biblionumber');
-my $createbibitem = $input->param('createbibitem');
-
-# create, modify or delete biblio
-# create if $quantity>=0 and $existing='no'
-# modify if $quantity>=0 and $existing='yes'
-# delete if $quantity has been se to 0 by the librarian
-my $dbh=C4::Context->dbh;
-
-if ($quantity ne '0'){
-    #check to see if biblio exists
-    if ( $existing eq 'no' ) {
-        #if it doesnt its created on template
-        # change suggestion status if applicable
-        if ($suggestionid) {
-my $data=GetSuggestion($suggestionid);
-
- my $biblio={title=>$data->{title},author=>$data->{author},publishercode=>$data->{publishercode},copyrightdate=>$data->{copyrightdate},isbn=>$data->{isbn},place=>$data->{place},};
-my $xmlhash=XMLkoha2marc($dbh,$biblio,"biblios");
-$biblionumber = NEWnewbiblio($dbh,$xmlhash,"");
-
-            ModStatus( $suggestionid, 'ORDERED', '', $biblionumber,$input );
-        }
-    }## biblio didnot exist now created
-
-    
-
-   
-    if ($ordnum) {
-
-        # 		warn "MODORDER $title / $ordnum / $quantity / $bookfund";
-        ModOrder(
-            $title,   $ordnum,   $quantity,     $listprice,
-            $biblionumber,  $basketno, $booksellerid, $loggedinuser,
-            $notes,   $bookfundid,    $rrp,
-            $ecost,   $gst,      $budget,       $unitprice,
-            $purchaseordernumber, $sort1,    $sort2,$discount,$branch
-        );
-    }
-    else {
-        ( $basketno, $ordnum ) = NewOrder(
-            $basketno,  $biblionumber,       $title,        $quantity,
-            $listprice, $booksellerid, $loggedinuser, $notes,
-            $bookfundid,    $rrp,          $ecost,
-            $gst,       $budget,       $unitprice,         $sub,
-            $purchaseordernumber,   $sort1,        $sort2, $discount,$branch
-        );
-    }
-
-}
-else {
-#    $biblionumber = $input->param('biblionumber');
-    DelOrder( $biblionumber, $ordnum,$loggedinuser );
-}
-
-print $input->redirect("basket.pl?basketno=$basketno");

Index: acqui/basket.pl
===================================================================
RCS file: acqui/basket.pl
diff -N acqui/basket.pl
--- acqui/basket.pl	20 Sep 2006 21:44:36 -0000	1.35
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,189 +0,0 @@
-#!/usr/bin/perl
-
-#script to show display basket of orders
-#written by chris at katipo.co.nz 24/2/2000
-
-# 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
-
-# $Id: basket.pl,v 1.35 2006/09/20 21:44:36 tgarip1957 Exp $
-
-use strict;
-use C4::Auth;
-use C4::Koha;
-use CGI;
-use C4::Interface::CGI::Output;
-use C4::Acquisition;
-use C4::Bookfund;
-use C4::Bookseller;
-use C4::Date;
-
-=head1 NAME
-
-basket.pl
-
-=head1 DESCRIPTION
-
- This script display all informations about basket for the supplier given
- on input arg. Moreover, it allow to add a new order for this supplier from
- an existing record, a suggestion or from a new record.
-
-=head1 CGI PARAMETERS
-
-=over 4
-
-=item $basketno
-
-this parameter seems to be unused.
-
-=item supplierid
-
-the supplier this script have to display the basket.
-
-=item order
-
-
-
-=back
-
-=cut
-
-my $query        = new CGI;
-my $basketno     = $query->param('basketno');
-my $booksellerid = $query->param('supplierid');
-my $order        = $query->param('order');
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => "acqui/basket.tmpl",
-        query           => $query,
-        type            => "intranet",
-        authnotrequired => 0,
-        flagsrequired   => { acquisition => 1 },
-        debug           => 1,
-    }
-);
-
-my $basket = GetBasket($basketno);
-$basket->{authorisedbyname};
-# FIXME : the query->param('supplierid') below is probably useless. The bookseller is always known from the basket
-# if no booksellerid in parameter, get it from basket
-$booksellerid = $basket->{booksellerid} unless $booksellerid;
-my @booksellers = GetBookSeller($booksellerid);
-my $count2 = scalar @booksellers;
-
-# get librarian branch...
-if ( C4::Context->preference("IndependantBranches") ) {
-    my $userenv = C4::Context->userenv;
-    unless ( $userenv->{flags} == 1 ) {
-        my $validtest = ( $basket->{creationdate} eq '' )
-          || ( $basket->{branch}  eq '' )
-          || ( $userenv->{branch} eq $basket->{branch} )
-          || ( $userenv->{branch} eq '' )
-          || ( $basket->{branch}  eq '' );
-        unless ($validtest) {
-            print $query->redirect("../mainpage.pl");
-            exit 1;
-        }
-    }
-}
-
-# if new basket, pre-fill infos
-$basket->{creationdate} = ""            unless ( $basket->{creationdate} );
-$basket->{authorisedby} = $loggedinuser unless ( $basket->{authorisedby} );
-
-my ( $count, @results );
- at results  = GetOrders( $basketno, $order );
-$count = scalar @results;
-my $line_total;     # total of each line
-my $gist =C4::Context->preference('gist');           # GST 
-my $toggle = 0;
-
-# my $line_total_est; # total of each line
-my $sub_total_est;      # total of line totals
-my $gist_est;           # GST
-my $grand_total_est;    # $subttotal + $gist_est - $disc_est
-my $disc_est;
-my $qty_total;
-
-my @books_loop;
-for ( my $i = 0 ; $i < $count ; $i++ ) {
-     $line_total = $results[$i]->{'quantity'} * $results[$i]->{'rrp'};
-    $sub_total_est += $line_total ;
-   $disc_est +=$line_total *$results[$i]->{'discount'}/100;
-   $gist_est +=($line_total  - ($line_total *$results[$i]->{'discount'}/100))*$results[$i]->{'gst'}/100;
-   
-   
-    $qty_total += $results[$i]->{'quantity'};
-    my %line;
-   if ( $toggle == 0 ) {
-        $line{color} = '#EEEEEE';
-        $toggle = 1;
-    }
-    else {
-        $line{color} = 'white';
-        $toggle = 0;
-    }
-    $line{ordernumber}      = $results[$i]->{'ordernumber'};
-    $line{publishercode}    = $results[$i]->{'publishercode'};
-    $line{isbn}             = $results[$i]->{'isbn'};
-    $line{booksellerid}     = $booksellers[0]->{'id'};
-    $line{basketno}         = $basketno;
-    $line{title}            = $results[$i]->{'title'};
-    $line{notes}            = $results[$i]->{'notes'};
-    $line{author}           = $results[$i]->{'author'};
-    $line{i}                = $i;
-    $line{rrp}              = sprintf( "%.2f", $results[$i]->{'rrp'} );
-    $line{ecost}            = sprintf( "%.2f", $results[$i]->{'ecost'} );
-      $line{discount}            = sprintf( "%.2f", $results[$i]->{'discount'} );
-    $line{quantity}         = $results[$i]->{'quantity'};
-    $line{quantityrecieved} = $results[$i]->{'quantityreceived'};
-    $line{line_total}       = sprintf( "%.2f", $line_total );
-    $line{biblionumber}     = $results[$i]->{'biblionumber'};
-    $line{bookfundid}       = $results[$i]->{'bookfundid'};
-    $line{odd}              = $i % 2;
-if  ($line{quantityrecieved}>0){$line{donotdelete}=1;}
-    push @books_loop, \%line;
-$template->param(purchaseordernumber    => $results[0]->{'purchaseordernumber'},
-		booksellerinvoicenumber=>$results[0]->{booksellerinvoicenumber},);
-}
-$grand_total_est =  sprintf( "%.2f", $sub_total_est - $disc_est+$gist_est );
-
-$template->param(
-    basketno         => $basketno,
-    creationdate     => format_date( $basket->{creationdate} ),
-    authorisedby     => $basket->{authorisedby},
-    authorisedbyname => $basket->{authorisedbyname},
-    closedate        => format_date( $basket->{closedate} ),
-    active           => $booksellers[0]->{'active'},
-    booksellerid     => $booksellers[0]->{'id'},
-    name             => $booksellers[0]->{'name'},
-    address1         => $booksellers[0]->{'address1'},
-    address2         => $booksellers[0]->{'address2'},
-    address3         => $booksellers[0]->{'address3'},
-    address4         => $booksellers[0]->{'address4'},
-    entrydate        => format_date( $results[0]->{'entrydate'} ),
-    books_loop       => \@books_loop,
-    count            => $count,
-    gist             => $gist,
-    sub_total_est    =>  sprintf( "%.2f",$sub_total_est),
-    gist_est         =>  sprintf( "%.2f",$gist_est),
-    disc_est	=> sprintf( "%.2f",$disc_est),
-    grand_total_est  => $grand_total_est,
-    currency         => $booksellers[0]->{'listprice'},
-    qty_total        => $qty_total,
-);
-output_html_with_http_headers $query, $cookie, $template->output;

Index: acqui/bookfund.pl
===================================================================
RCS file: acqui/bookfund.pl
diff -N acqui/bookfund.pl
--- acqui/bookfund.pl	20 Sep 2006 21:44:36 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,102 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright 2006 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 C4::Context;
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-my $dbh      = C4::Context->dbh;
-my $input    = new CGI;
-my $bookfund = $input->param('bookfund');
-my $start    = $input->param('start');
-my $end      = $input->param('end');
-
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => "acqui/bookfund.tmpl",
-        query           => $input,
-        type            => "intranet",
-        authnotrequired => 0,
-        flagsrequired   => { acquisition => 1 },
-        debug           => 1,
-    }
-);
-
-my $query = '
-SELECT quantity,
-       datereceived,
-       freight,
-       unitprice,
-       listprice,
-       ecost,
-       quantityreceived AS qrev,
-       subscription,
-       title,
-       itemtype,
-       aqorders.biblionumber,
-       aqorders.booksellerinvoicenumber,
-       quantity-quantityreceived AS tleft,
-       aqorders.ordernumber AS ordnum,
-       entrydate,
-       budgetdate,
-       booksellerid,
-       aqbasket.basketno
-  FROM aqorders
-    INNER JOIN aqorderbreakdown
-      ON aqorderbreakdown.ordernumber = aqorders.ordernumber
-    INNER JOIN aqbasket
-      ON aqbasket.basketno = aqorders.basketno
-    LEFT JOIN biblio
-      ON biblio.biblionumber = aqorders.biblionumber
-  WHERE bookfundid = ?
-    AND budgetdate >= ?
-    AND budgetdate < ?
-    AND (datecancellationprinted IS NULL
-         OR datecancellationprinted = \'0000-00-00\')
-';
-##warn $query;
-my $sth = $dbh->prepare($query);
-$sth->execute( $bookfund, $start, $end );
-my @commited_loop;
-
-my $total = 0;
-while ( my $data = $sth->fetchrow_hashref ) {
-    my $left = $data->{'tleft'};
-    if ( !$left || $left eq '' ) {
-        $left = $data->{'quantity'};
-    }
-    if ( $left && $left > 0 ) {
-        my $subtotal = $left * $data->{'ecost'};
-        $data->{subtotal} = $subtotal;
-        $data->{'left'} = $left;
-        push @commited_loop, $data;
-        $total += $subtotal;
-    }
-}
-
-$template->param(
-    COMMITEDLOOP => \@commited_loop,
-    total        => $total
-);
-$sth->finish;
-#$dbh->disconnect;
-
-output_html_with_http_headers $input, $cookie, $template->output;

Index: acqui/booksellers.pl
===================================================================
RCS file: acqui/booksellers.pl
diff -N acqui/booksellers.pl
--- acqui/booksellers.pl	20 Sep 2006 21:44:36 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,127 +0,0 @@
-#!/usr/bin/perl
-
-#script to show suppliers and orders
-#written by chris at katipo.co.nz 23/2/2000
-
-# 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
-
-# $Id: booksellers.pl,v 1.3 2006/09/20 21:44:36 tgarip1957 Exp $
-
-=head1 NAME
-
-booksellers.pl
-
-=head1 DESCRIPTION
-
-this script displays the list of suppliers & orders like C<$supplier> given on input arg.
-thus, this page brings differents features like to display supplier's details,
-to add an order for a specific supplier or to just add a new supplier.
-
-=head1 CGI PARAMETERS
-
-=over 4
-
-=item supplier
-
-C<$supplier> is the suplier we have to search order.
-=back
-
-=item op
-
-C<OP> can be equals to 'close' if we have to close a basket before building the page.
-
-=item basket
-
-the C<basket> we have to close if op is equal to 'close'.
-
-=back
-
-=cut
-
-use strict;
-use C4::Auth;
-use CGI;
-use C4::Interface::CGI::Output;
-use C4::Acquisition;
-use C4::Date;
-use C4::Bookseller;
-
-my $query = new CGI;
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => "acqui/booksellers.tmpl",
-        query           => $query,
-        type            => "intranet",
-        authnotrequired => 0,
-        flagsrequired   => { acquisition => 1 },
-        debug           => 1,
-    }
-);
-
-#parameters
-my $supplier = $query->param('supplier');
-
-my @suppliers = GetBookSeller($supplier);
-my $count = scalar @suppliers;
-
-# check if we have to "close" a basket before building page
-my $op     = $query->param('op');
-my $basketno = $query->param('basketno');
-if ( $op eq 'close' ) {
-    CloseBasket($basketno);
-}
-
-#build result page
-my $toggle = 0;
- my $ordcount;
-my @loop_suppliers;
-for ( my $i = 0 ; $i < $count ; $i++ ) {
-   my $orders  = GetPendingOrders( $suppliers[$i]->{'id'} );
- my    $ordercount = scalar @$orders;
-$ordcount+=$ordercount;
-    my %line;
-    if ( $toggle == 0 ) {
-        $line{even} = 1;
-        $toggle = 1;
-    }
-    else {
-        $line{even} = 0;
-        $toggle = 0;
-    }
-    $line{supplierid} = $suppliers[$i]->{'id'};
-    $line{name}       = $suppliers[$i]->{'name'};
-    $line{active}     = $suppliers[$i]->{'active'};
-    $line{ordcount}=$ordercount;	
-    my @loop_basket;
-     foreach my $order(@$orders){
-        push @loop_basket, $order;
-    }
-    $line{loop_basket} = \@loop_basket;
-    push @loop_suppliers, \%line;
-}
-$template->param(
-    loop_suppliers          => \@loop_suppliers,
-    supplier                => $supplier,
-    count                   => $ordcount,
-    intranetcolorstylesheet =>
-    C4::Context->preference("intranetcolorstylesheet"),
-    intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-    IntranetNav        => C4::Context->preference("IntranetNav"),
-);
-
-output_html_with_http_headers $query, $cookie, $template->output;

Index: acqui/currency.pl
===================================================================
RCS file: acqui/currency.pl
diff -N acqui/currency.pl
--- acqui/currency.pl	20 Sep 2006 21:44:36 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,42 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: currency.pl,v 1.2 2006/09/20 21:44:36 tgarip1957 Exp $
-
-#written by chris at katipo.co.nz
-#9/10/2000
-#script to display and update currency rates
-
-
-# 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 CGI;
-use C4::Acquisition;
-use C4::Biblio;
-use C4::Bookfund;
-
-my $input=new CGI;
-
-my @params=$input->param;
-foreach my $param (@params){
-	if ($param ne 'type' && $param !~ /submit/){
-		my $data=$input->param($param);
-#		warn "$data / $param";
-		ModCurrencies($param,$data);
-}
-}
-print $input->redirect('/cgi-bin/koha/acqui/acqui-home.pl');

Index: acqui/finishreceive.pl
===================================================================
RCS file: acqui/finishreceive.pl
diff -N acqui/finishreceive.pl
--- acqui/finishreceive.pl	20 Sep 2006 21:44:36 -0000	1.21
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,108 +0,0 @@
-#!/usr/bin/perl
-
-#script to add a new item and to mark orders as received
-#written 1/3/00 by chris at katipo.co.nz
-
-# 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
-
-# this script makes the items, addorder.pl has already made the biblio and biblioitem records: MASON
-
-
-=head1 NAME
-
-finishreceive.pl
-
-=head1 DESCRIPTION
-TODO
-
-=head1 CGI PARAMETERS
-
-=over 4
-
-TODO
-
-=back
-
-=cut
-
-use strict;
-use C4::Acquisition;
-use CGI;
-use C4::Interface::CGI::Output;
-use C4::Auth;
-use C4::Bookseller;
-
-my $input = new CGI;
-
-my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
-    {
-        template_name   => "acqui/finishreceive.tmpl",
-        query           => $input,
-        type            => "intranet",
-        authnotrequired => 0,
-        flagsrequired   => { editcatalogue => 1 },
-        debug           => 1,
-    }
-);
-
-my @biblionumber     = $input->param('biblionumber');
-my @ordnum           = $input->param('ordernumber');
-my $cost             = $input->param('invoicetotal');
-my $locacost             = $input->param('localtotal');
-my $invoiceno        = $input->param('invoice');
-my @replacement    = $input->param('actual');
-my @gst            = $input->param('gstrate');
-my $freight        = $input->param('actualfreight');
-my @freightperitem = $input->param('freight');
-my $supplierid     = $input->param('supplierid');
-my @title         = $input->param('title');
-my $currencyrate=$input->param('currencyrate');
-my @bookfund      = $input->param('bookfund');
-my @discount     = $input->param('discount');
-my @quantrec      = $input->param('received');
-my $totalreceived=$input->param('totalreceived');
-my $incgst=$input->param('incgst');
-my $ecost;
-my $unitprice;
-my $listprice;
-
-my @supplier=GetBookSeller($supplierid);
-my $count=scalar @quantrec;
-my @additems;
-
- for (my $i=0; $i<$count;$i++){
- $freightperitem[$i]=$freight/$totalreceived unless  $freightperitem[$i];
-$listprice=$replacement[$i];
-  $replacement[$i]= $replacement[$i]*$currencyrate;
-	if ($incgst){
-	$ecost= ($replacement[$i]*100/($gst[$i]+100))*(100 - $discount[$i])/100;
-	}else{
-	$ecost= $replacement[$i]*(100 - $discount[$i])/100;
-	}
-$unitprice=$ecost + $ecost*$gst[$i]/100;
-    	if ( $quantrec[$i] != 0 ) {
-       	 # save the quantity recieved.
-        	ModReceiveOrder( $biblionumber[$i], $ordnum[$i], $quantrec[$i], $unitprice,
-            $invoiceno, $freightperitem[$i], $replacement[$i] ,$listprice,$input );   
-  	push @additems,{biblionumber=>$biblionumber[$i],itemcount=>$quantrec[$i], title=>$title[$i],supplier=>$supplier[0]->{name},rrp=>$replacement[$i],};
-
-	}
-}
-$template->param(loopbiblios => \@additems,);
-                      
- output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file

Index: acqui/histsearch.pl
===================================================================
RCS file: acqui/histsearch.pl
diff -N acqui/histsearch.pl
--- acqui/histsearch.pl	20 Sep 2006 21:44:36 -0000	1.9
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,90 +0,0 @@
-#!/usr/bin/perl
-
-# 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
-
-# $Id: histsearch.pl,v 1.9 2006/09/20 21:44:36 tgarip1957 Exp $
-
-
-=head1 NAME
-
-histsearch.pl
-
-=head1 DESCRIPTION
-this script offer a interface to search among order.
-
-
-=head1 CGI PARAMETERS
-
-=over 4
-
-=item title
-if the script has to filter the results on title.
-
-=item author
-if the script has to filter the results on author.
-
-=item name
-if the script has to filter the results on supplier.
-
-=item fromplacedon
-to filter on started date.
-
-=item toplacedon
-to filter on ended date.
-
-=back
-
-=cut
-
-use strict;
-require Exporter;
-use CGI;
-use C4::Auth;       # get_template_and_user
-use C4::Interface::CGI::Output;
-use C4::Acquisition;
-
-my $input = new CGI;
-my $title = $input->param('title');
-my $author = $input->param('author');
-my $name = $input->param('name');
-my $from_placed_on = $input->param('fromplacedon');
-my $to_placed_on = $input->param('toplacedon');
-
-my $dbh = C4::Context->dbh;
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "acqui/histsearch.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {acquisition => 1},
-			     debug => 1,
-			     });
-my ($order_loop,$total_qty,$total_price,$total_qtyreceived)= &GetHistory($title,$author,$name,$from_placed_on,$to_placed_on);
-$template->param(suggestions_loop => $order_loop,
-				total_qty => $total_qty,
-				total_qtyreceived => $total_qtyreceived,
-				total_price => sprintf  ("%.2f",$total_price),
-				numresults => scalar(@$order_loop),
-				title => $title,
-				author => $author,
-				name => $name,
-				from_placed_on =>$from_placed_on,
-				to_placed_on =>$to_placed_on,
-				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-);
-output_html_with_http_headers $input, $cookie, $template->output;

Index: acqui/lateorders.pl
===================================================================
RCS file: acqui/lateorders.pl
diff -N acqui/lateorders.pl
--- acqui/lateorders.pl	20 Sep 2006 21:44:36 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,122 +0,0 @@
-#!/usr/bin/perl
-
-# 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
-
-# $Id: lateorders.pl,v 1.7 2006/09/20 21:44:36 tgarip1957 Exp $
-
-=head1 NAME
-
-lateorders.pl
-
-=head1 DESCRIPTION
-
-this script shows late orders for a specific supplier, branch and delay
-given on input arg.
-
-=head1 CGI PARAMETERS
-
-=over 4
-
-=item supplierid
-To know on which supplier this script have to display late order.
-
-=item delay
-To know the time boundary. Default value is 30 days.
-
-=item branch
-To know on which branch this script have to display late order.
-
-=back
-
-=cut
-
-use strict;
-use CGI;
-use C4::Bookseller;
-use C4::Auth;
-use C4::Koha;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use C4::Acquisition;
-
-my $query = new CGI;
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user(
-                {template_name => "acqui/lateorders.tmpl",
-				query => $query,
-				type => "intranet",
-				authnotrequired => 0,
-				flagsrequired => {acquisition => 1},
-				debug => 1,
-				});
-
-my $supplierid = $query->param('supplierid');
-my $delay = $query->param('delay');
-my $branch = $query->param('branch');
-
-#default value for delay
-$delay = 30 unless $delay;
-
-my %supplierlist = GetBooksellersWithLateOrders($delay,$branch);
-my @select_supplier;
-push @select_supplier,"";
-foreach my $supplierid (keys %supplierlist){
-	push @select_supplier, $supplierid;
-}
-
-my $CGIsupplier=CGI::scrolling_list( -name     => 'supplierid',
-			-values   => \@select_supplier,
-			-default  => $supplierid,
-			-labels   => \%supplierlist,
-			-size     => 1,
-			-tabindex=>'',
-			-multiple => 0 );
-
-$template->param(Supplier=>$supplierlist{$supplierid}) if ($supplierid);
-
-my $branches = GetBranches;
-
-my @branchloop;
-foreach my $thisbranch (sort keys %$branches) {
-	my %row =(value => $thisbranch,
-				branchname => $branches->{$thisbranch}->{'branchname'},
-			);
-	push @branchloop, \%row;
-}
-my $CGIbranch=CGI::scrolling_list( -name     => 'branch',
-				-values   => \@branchloop,
-				-labels   => $branches,
-				-size     => 1,
- 				-tabindex=>'',
-				-multiple => 0 );
-
-my @lateorders = GetLateOrders($delay,$supplierid,$branch);
-my $count = scalar @lateorders;
-
-my $total;
-foreach my $lateorder (@lateorders){
-	$total+=$lateorder->{subtotal};
-}
-$template->param(delay=>$delay) if ($delay);
-$template->param(
-	branchloop => \@branchloop,
-	CGIsupplier => $CGIsupplier,
-	lateorders => \@lateorders,
-	total=>$total,
-	intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-	);
-output_html_with_http_headers $query, $cookie, $template->output;

Index: acqui/neworderempty.pl
===================================================================
RCS file: acqui/neworderempty.pl
diff -N acqui/neworderempty.pl
--- acqui/neworderempty.pl	15 Nov 2006 01:41:51 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,315 +0,0 @@
-#!/usr/bin/perl
-
-#script to show display basket of orders
-#written by chris at katipo.co.nz 24/2/2000
-
-# 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
-
-
-=head1 NAME
-
-neworderempty.pl
-
-=head1 DESCRIPTION
-this script allows to create a new record to order it. This record shouldn't exist
-on database.
-
-=head1 CGI PARAMETERS
-
-=over 4
-
-=item booksellerid
-the bookseller the librarian has to buy a new book.
-
-=item title
-the title of this new record.
-
-=item author
-the author of this new record.
-
-=item copyright
-the copyright of this new record.
-
-=item ordnum
-the number of this order.
-
-=item biblio
-
-=item basketno
-the basket number for this new order.
-
-=item suggestionid
-if this order comes from a suggestion.
-
-=item close
-
-=back
-
-=cut
-
-use strict;
-use CGI;
-use C4::Context;
-use C4::Auth;
-use C4::Bookfund;
-use C4::Bookseller;
-use C4::Acquisition;
-use C4::Suggestions;
-use C4::Biblio;
-use C4::Search;
-use C4::Koha;
-use C4::Interface::CGI::Output;
-use C4::Members;
-use C4::Input;
-use C4::Date;
-
-my $input        = new CGI;
-my $booksellerid = $input->param('booksellerid');
-my $title        = $input->param('title');
-my $author       = $input->param('author');
-my $copyright    = $input->param('copyright');
-my @booksellers  = GetBookSeller($booksellerid);
-my $count        = scalar @booksellers;
-my $ordnum       = $input->param('ordnum');
-my $biblionumber       = $input->param('biblionumber');
-my $basketno     = $input->param('basketno');
-my $suggestionid = $input->param('suggestionid');
-my $close        = $input->param('close');
-my $data;
-my $new;
-
-my $dbh = C4::Context->dbh;
-
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => "acqui/neworderempty.tmpl",
-        query           => $input,
-        type            => "intranet",
-        authnotrequired => 0,
-        flagsrequired   => { acquisition => 1 },
-        debug           => 1,
-    }
-);
-my $me= C4::Context->userenv;
-my $homebranch=$me->{'branch'} ;
-my $branch;
-my $bookfundid;
-my $discount= $booksellers[0]->{'discount'};
-my $gstrate=C4::Context->preference('gist')*100;
-if ( $ordnum eq '' ) {    # create order
-    $new = 'yes';
-    if ( $biblionumber  ) {
-	my $record=XMLgetbibliohash($dbh,$biblionumber);
-          ###Error checking if a non existent biblionumber given manually
-	if (!$record){
-	print $input->redirect("/cgi-bin/koha/acqui/basket.pl?supplierid=$booksellerid");
-	}
-	 $data = XMLmarc2koha_onerecord($dbh,$record,"biblios");
-    }elsif($suggestionid){
-	$data = GetSuggestion($suggestionid);
-    
-   	 if ( $data->{'title'} eq '' ) {
-        	$data->{'title'}         = $title;
-       	 $data->{'author'}        = $author;
-       	 $data->{'copyrightdate'} = $copyright;
-    	}
-   }### if biblionumber
- if ($basketno){
-	 my $basket = GetBasket( $basketno);
-	my @orders=GetOrders($basketno);
-		if (@orders){
-		$template->param(
-    		purchaseordernumber     =>  $orders[0]->{purchaseordernumber}, );
-		}
-	$template->param(
-    	creationdate     => format_date( $basket->{creationdate} ),
-    	authorisedbyname => $basket->{authorisedbyname},);
-  }else{
-	
-	my $date = get_today();
-	$template->param(
-    	creationdate     => format_date($date),
-    	authorisedbyname => $loggedinuser,);
-  }
-}else {    #modify order
-    $data   = GetSingleOrder($ordnum);
-    $biblionumber = $data->{'biblionumber'};
-    #get basketno and suppleirno. too!
-    my $data2 = GetBasket( $data->{'basketno'} );
-    $basketno     = $data->{'basketno'};
-    $booksellerid = $data2->{'booksellerid'};
-    $discount=$data->{'discount'};
-       $gstrate=$data->{'gst'} ;
-    $bookfundid =$data->{'bookfundid'};
- my $aqbookfund=GetBookFund($data->{'bookfundid'});
-$branch=$aqbookfund->{branchcode};
-$template->param(	
-	purchaseordernumber     =>  $data->{purchaseordernumber},
-    	creationdate     => format_date( $data2->{creationdate} ),
-    	authorisedbyname => $data2->{authorisedbyname},);
-	
-}
-
-
-
-# get currencies (for exchange rates calcs if needed)
-my @rates = GetCurrencies();
-my $count = scalar @rates;
-
-my @loop_currency = ();
-for ( my $i = 0 ; $i < $count ; $i++ ) {
-    my %line;
-    $line{currency} = $rates[$i]->{'currency'};
-    $line{rate}     = $rates[$i]->{'rate'};
-    push @loop_currency, \%line;
-}
-
-
-
-
-
-# build branches list
-my $branches = GetBranches;
-my @branchloop;
-foreach my $thisbranch ( sort keys %$branches ) {
-my $selected=1 if $thisbranch eq $branch;
-     my %row = ( 
-        value      => $thisbranch,
-        branchname => $branches->{$thisbranch}->{'branchname'},
-	selected=>$selected ,
-    );
-    push @branchloop, \%row;
-}
-$template->param( branchloop => \@branchloop );
-
-# build bookfund list
-
-my $count2;
-my @bookfund;
-my @select_bookfund;
-my %select_bookfunds;
-my $selbookfund;
- at bookfund = GetBookFunds($homebranch);
-$count2 = scalar @bookfund;
-
-for ( my $i = 0 ; $i < $count2 ; $i++ ) {
-    push @select_bookfund, $bookfund[$i]->{'bookfundid'};
-    $select_bookfunds{ $bookfund[$i]->{'bookfundid'} } =
-      $bookfund[$i]->{'bookfundname'};
-	if ($bookfund[$i]->{'bookfundid'} eq $bookfundid){
-	$selbookfund=1;
-	}
-}
-my $CGIbookfund = CGI::scrolling_list(
-    -name     => 'bookfundid',
-    -values   => \@select_bookfund,
-    -default  => $data->{'bookfundid'},
-    -labels   => \%select_bookfunds,
-    -size     => 1,
-    -selected =>$selbookfund,
-    -multiple => 0
-);
-
-my $bookfundname;
-
-if ($close) {
-    $bookfundid   = $data->{'bookfundid'};
-    $bookfundname = $select_bookfunds{$bookfundid};
-}
-
-#Build sort lists
-my $CGIsort1 = buildCGIsort( "Asort1", "sort1", $data->{'sort1'} );
-if ($CGIsort1) {
-    $template->param( CGIsort1 => $CGIsort1 );
-}
-else {
-    $template->param( sort1 => $data->{'sort1'} );
-}
-
-my $CGIsort2 = buildCGIsort( "Asort2", "sort2", $data->{'sort2'} );
-if ($CGIsort2) {
-    $template->param( CGIsort2 => $CGIsort2 );
-}
-else {
-    $template->param( sort2 => $data->{'sort2'} );
-}
-
-my $bibitemsexists;
-
-#
-
-    $template->param( bibitemexists => "1" ) if $biblionumber;
-	 my @bibitemloop;
-          my %line;
-        $line{isbn}             = $data->{'isbn'};
-        $line{itemtype}         = $data->{'itemtype'};
-        $line{volumeddesc}      = $data->{'volumeddesc'};
-        push( @bibitemloop, \%line );
-
-        $template->param( bibitemloop => \@bibitemloop );
-    
-
-
-# fill template
-$template->param(
-    close        => $close,
-    bookfundid   => $bookfundid,
-    bookfundname => $bookfundname
-  )
-  if ($close);
-
-$template->param(
-    existing         => $biblionumber,
-    ordnum           => $ordnum,
-    basketno         => $basketno,
-    booksellerid     => $booksellerid,
-    suggestionid     => $suggestionid,
-    biblionumber           => $biblionumber,
-    itemtype         => $data->{'itemtype'},
-    discount         => $discount,
-    listincgst       => $booksellers[0]->{'listincgst'},
-    listprice        => $booksellers[0]->{'listprice'},
-    gstreg           => $booksellers[0]->{'gstreg'},
-    invoiceinc       => $booksellers[0]->{'invoiceincgst'},
-    invoicedisc      => $booksellers[0]->{'invoicedisc'},
-    nocalc           => $booksellers[0]->{'nocalc'},
-    name             => $booksellers[0]->{'name'},
-    currency         => $booksellers[0]->{'listprice'},
-    gstrate          =>$gstrate,
-    loop_currencies  => \@loop_currency,
-    orderexists      => ( $new eq 'yes' ) ? 0 : 1,
-    title            => $data->{'title'},
-    author           => $data->{'author'},
-    copyrightdate    => $data->{'copyrightdate'},
-    CGIbookfund      => $CGIbookfund,
-    isbn             => $data->{'isbn'},
-    seriestitle      => $data->{'seriestitle'},
-    quantity         => $data->{'quantity'},
-    listprice        => $data->{'listprice'},
-    rrp              => $data->{'rrp'},
-    invoice          => $data->{'booksellerinvoicenumber'},
-    ecost            => $data->{'ecost'},
-    total		=>$data->{'unitprice'}* $data->{'quantity'},
-  unitprice            => $data->{'unitprice'},
- gst        => $data->{'ecost'}*$gstrate/100,
-    notes            => $data->{'notes'},
-    publishercode    => $data->{'publishercode'},
-#     donation         => $donation
-);
-
-output_html_with_http_headers $input, $cookie, $template->output;

Index: acqui/newordersuggestion.pl
===================================================================
RCS file: acqui/newordersuggestion.pl
diff -N acqui/newordersuggestion.pl
--- acqui/newordersuggestion.pl	28 Sep 2006 14:13:37 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,172 +0,0 @@
-#!/usr/bin/perl
-
-# 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
-
-# $Id: newordersuggestion.pl,v 1.5 2006/09/28 14:13:37 tgarip1957 Exp $
-
-=head1 NAME
-newordersuggestion.pl
-
-=head1 DESCRIPTION
-this script allow to add an order from a existing suggestion.
-
-=head1 CGI PARAMETERS
-
-=over 4
-
-=item basketno
-the number of this basket.
-
-=item booksellerid
-the bookseller who sells this record.
-
-=item title
-the title of this record suggested.
-
-=item author
-the author of this suggestion.
-
-=item note
-this param allow to enter a note with this suggestion.
-
-=item copyrightdate
-the copyright date for this suggestion.
-
-=item publishercode
-
-=item volumedesc
-
-=item publicationyear
-the publication year of this record.
-
-=item place
-
-=item isbn
-the isbn of this suggestion.
-
-=item duplicateNumber
-is the biblionumber to put to the new suggestion.
-
-=item suggestionid
-the id of the suggestion to select.
-
-=item op
-can be equal to
-    * connectDuplicate :
-        then call to the function : ConnectSuggestionAndBiblio.
-        i.e set the biblionumber of this suggestion.
-    * else :
-        is the default value.
-=back
-
-=cut
-
-use strict;
-require Exporter;
-use CGI;
-use C4::Auth;       # get_template_and_user
-use C4::Interface::CGI::Output;
-use C4::Suggestions;
-use C4::Biblio;
-use C4::Search;
-
-my $input = new CGI;
-
-my $basketno = $input->param('basketno');
-my $supplierid = $input->param('booksellerid');
-my $title = $input->param('title');
-my $author = $input->param('author');
-my $note = $input->param('note');
-my $copyrightdate =$input->param('copyrightdate');
-my $publishercode = $input->param('publishercode');
-my $volumedesc = $input->param('volumedesc');
-my $publicationyear = $input->param('publicationyear');
-my $place = $input->param('place');
-my $isbn = $input->param('isbn');
-my $duplicateNumber = $input->param('duplicateNumber');
-my $suggestionid = $input->param('suggestionid');
-
-my $status = 'ACCEPTED'; # the suggestion had to be accepeted before to order it.
-my $suggestedbyme = -1; # search ALL suggestors
-my $op = $input->param('op');
-$op = 'else' unless $op;
-
-my $dbh = C4::Context->dbh;
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "acqui/newordersuggestion.tmpl",
-			     type => "intranet",
-			     query => $input,
-			     authnotrequired => 1,
-			     flagsrequired => {acquisition => 1},
-			 });
-
-if ($op eq 'connectDuplicate') {
-	ConnectSuggestionAndBiblio($suggestionid,$duplicateNumber);
-}
-my $suggestions_loop= &SearchSuggestion($borrowernumber,$author,$title,$publishercode,$status,$suggestedbyme);
-foreach (@$suggestions_loop) {
-	unless ($_->{biblionumber}) {
-		my (@kohafields, @and_or, @value, @relation,  $offset,$length);
-		# search on biblio.title
-		if ($_->{title}) {
-			push @kohafields, "title";
-			push @and_or, "\@and";
-			push @relation, "\@attr 5=1";
-			push @value, $_->{title};
-		}
-		if ($_->{author}) {
-			push @kohafields, "author";
-			push @and_or, "\@and";
-			push @relation, "";
-			push @value, $_->{author};
-		}
-		# ... and on publicationyear.
-		if ($_->{publicationyear}) {
-			push @kohafields, "copyrightdate";
-			push @and_or, "\@and";
-			push @relation, "";
-			push @value, $_->{publicationyear};
-		}
-		# ... and on publisher.
-		if ($_->{publishercode}) {
-			push @kohafields, "publishercode";
-			push @and_or, "\@and";
-			push @relation, "";
-			push @value, $_->{publishercode};
-		}
-	
-		my ($nbresult,$facets, at finalresult) = ZEBRAsearch_kohafields(\@kohafields,\@value,\@relation,"",\@and_or,0,"",0,1);
-
-		# there is at least 1 result => return the 1st one
-		if ($nbresult) {
-			$_->{duplicateBiblionumber} = $finalresult[0]->{biblionumber};
-		}
-	}
-}
-$template->param(suggestions_loop => $suggestions_loop,
-				title => $title,
-				author => $author,
-				publishercode => $publishercode,
-				status => $status,
-				suggestedbyme => $suggestedbyme,
-				basketno => $basketno,
-				supplierid => $supplierid,
-				"op_$op" => 1,
-				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-);
-output_html_with_http_headers $input, $cookie, $template->output;

Index: acqui/parcel.pl
===================================================================
RCS file: acqui/parcel.pl
diff -N acqui/parcel.pl
--- acqui/parcel.pl	20 Sep 2006 21:44:36 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,187 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: parcel.pl,v 1.4 2006/09/20 21:44:36 tgarip1957 Exp $
-
-#script to recieve orders
-#written by chris at katipo.co.nz 24/2/2000
-
-
-# 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
-
-
-=head1 NAME
-
-parcel.pl
-
-=head1 DESCRIPTION
-This script shows all orders receipt or pending for a given supplier.
-It allows to write an order as 'received' when he arrives.
-
-=head1 CGI PARAMETERS
-
-=over 4
-
-=item supplierid
-To know the supplier this script has to show orders.
-
-=item code
-is the bookseller invoice number.
-
-=item freight
-
-
-=item gst
-
-
-=item datereceived
-To filter the results list on this given date.
-
-=back
-
-=cut
-use strict;
-use C4::Auth;
-use C4::Acquisition;
-use C4::Bookseller;
-use C4::Bookfund;
-use C4::Biblio;
-use CGI;
-use C4::Interface::CGI::Output;
-use C4::Date;
-use Time::localtime;
-
-
-my $input=new CGI;
-my $supplierid=$input->param('supplierid');
-my $basketno=$input->param('basketno');
-my @booksellers=GetBookSeller($supplierid);
-my $count = scalar @booksellers;
-
-my @datetoday = localtime();
-my $date = (1900+$datetoday[5])."-".($datetoday[4]+1)."-". $datetoday[3];
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "acqui/parcel.tmpl",
-                 query => $input,
-                 type => "intranet",
-                 authnotrequired => 0,
-                 flagsrequired => {acquisition => 1},
-                 debug => 1,
-});
-
-my @booksellers=GetBookSeller($supplierid);
-
-my $gstreg=$booksellers[0]->{gstreg};
-my $incgst=$booksellers[0]->{'invoiceincgst'};
-my $invcurrency=$booksellers[0]->{'invoiceprice'};
-my $discount=$booksellers[0]->{'discount'};
-my $currencyrate;
-# get currencies (for exchange rates calcs if needed)
-my @rates = GetCurrencies();
-my $count = scalar @rates;
-
-for ( my $i = 0 ; $i < $count ; $i++ ) {
- if ($rates[$i]->{'currency'} eq $invcurrency){
-    $currencyrate     = $rates[$i]->{'rate'};
-   }
-}
-my $me=C4::Context->userenv;
-my $user=$me->{'cardnumber'};
-my $totalprice=0;
-my $totalfreight=0;
-my $totalquantity=0;
-my $totaldiscount=0;
-my $total;
-my $tototal;
-my $toggle;
-my $totalgst;
-my $totaltoreceive;
-my $totaltoprice;
-my $totaltogst;
-my $totaltodiscount;
-my @loop_orders;
-my $countpendings;
-my $invoice;
-##Receiving a single basket or all baskets of a supplier
-unless($basketno){
-my $pendingorders = GetPendingOrders($supplierid);
-$countpendings = scalar @$pendingorders;
-foreach my $pendingorder (@$pendingorders){
- my @orders=GetOrders($pendingorder->{basketno});
-  foreach my $order(@orders){
-  $order->{toreceive}=$order->{quantity} - $order->{quantityreceived};
-  $totalquantity+=$order->{quantity};
-  $totaltoreceive+=$order->{toreceive};
-  $totalprice+=$order->{rrp}*$order->{quantity};
-  $totaltoprice+=$order->{rrp}*$order->{toreceive};
-  $totalgst+=(($order->{rrp}*$order->{quantity}) -($order->{rrp}*$order->{quantity}*$order->{discount}/100))* $order->{gst}/100;
-  $totaltogst+=(($order->{rrp}*$order->{toreceive}) -($order->{rrp}*$order->{toreceive}*$order->{discount}/100))* $order->{gst}/100;
-  $totaldiscount +=$order->{rrp}*$order->{quantity}*$order->{discount}/100;
-  $totaltodiscount +=$order->{rrp}*$order->{toreceive}*$order->{discount}/100;
-  $order->{actualrrp}=sprintf( "%.2f",$order->{rrp}/$currencyrate);
-	push @loop_orders, $order;
-  }	
-}
-  
-}else{
-## one basket
-$countpendings=1;
-
-my @orders=GetOrders($basketno);
-  foreach my $order(@orders){
-$invoice=$order->{booksellerinvoicenumber} unless $invoice;
-  $order->{toreceive}=$order->{quantity} - $order->{quantityreceived};
-  $totalquantity+=$order->{quantity};
-  $totaltoreceive+=$order->{toreceive};
-  $totalprice+=$order->{rrp}*$order->{quantity};
-  $totaltoprice+=$order->{rrp}*$order->{toreceive};
-  $totalgst+=(($order->{rrp}*$order->{quantity}) -($order->{rrp}*$order->{quantity}*$order->{discount}/100))* $order->{gst}/100;
-  $totaltogst+=(($order->{rrp}*$order->{toreceive}) -($order->{rrp}*$order->{toreceive}*$order->{discount}/100))* $order->{gst}/100;
-  $totaldiscount +=$order->{rrp}*$order->{quantity}*$order->{discount}/100;
-  $totaltodiscount +=$order->{rrp}*$order->{toreceive}*$order->{discount}/100;
-  $order->{actualrrp}=sprintf( "%.2f",$order->{rrp}/$currencyrate);
-	push @loop_orders, $order;
-  }	
-}
-undef $invcurrency if ($currencyrate ==1);
-
-$template->param( invoice=>$invoice,
-                        date => format_date($date),
-                        name => $booksellers[0]->{'name'},
-                        supplierid => $supplierid,
-                        countpending => $countpendings,
-                        loop_orders => \@loop_orders,
- 	          user=>$user,
-	         totalquantity=>$totalquantity,
-	         totaltoreceive=>$totaltoreceive,
-	          totalprice=>sprintf( "%.2f",$totalprice),
-	         totalactual =>sprintf( "%.2f",$totaltoprice/$currencyrate),
-                        totalgst=>sprintf( "%.2f",$totalgst),
-                        actualgst=>sprintf( "%.2f",$totaltogst/$currencyrate),
-		totaldiscount=>sprintf( "%.2f",$totaldiscount),
-		actualdiscount=>sprintf( "%.2f",$totaltodiscount/$currencyrate),	
-		total=>sprintf( "%.2f",$totalprice+$totalgst-$totaldiscount),
-		gstreg=>$gstreg,
-                            gstrate=>C4::Context->preference('gist')*100,
-		currencyrate=>$currencyrate,
-		incgst =>$incgst,
-		invcurrency=>$invcurrency ,
-                        intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-        intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-        IntranetNav => C4::Context->preference("IntranetNav"),
-                        );
-output_html_with_http_headers $input, $cookie, $template->output;

Index: acqui/select-late.pl
===================================================================
RCS file: acqui/select-late.pl
diff -N acqui/select-late.pl
--- acqui/select-late.pl	20 Sep 2006 21:44:36 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,102 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: select-late.pl,v 1.4 2006/09/20 21:44:36 tgarip1957 Exp $
-
-#script to show suppliers and orders
-#written by chris at katipo.co.nz 23/2/2000
-
-
-# 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 C4::Auth;
-use C4::Biblio;
-use CGI;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use C4::Date;
-use C4::Acquisition;
-
-my $query=new CGI;
-my $dbh = C4::Context->dbh;
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "acqui/select-late.tmpl",
-			     query => $query,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {acquisition => 1},
-			     debug => 1,
-			     });
-
-my $supplier=$query->param('id');
-my @suppliers=GetBookSeller($supplier);
-my $count = scalar @suppliers;
-
-my $sth = $dbh->prepare("select s.serialseq from serial s, subscription u where s.subscriptionid = u.subscriptionid and u.aqbooksellerid = ? and s.status = 2");
-
-$sth->execute($supplier);
-my  @final;
-while (my $sol = $sth->fetchrow_hashref)
-{
-    push @final, $sol;
-}
-
-$template->param(@loop_sol => \@final);
-
-my $colour='#EEEEEE';
-my $toggle=0;
-my @loop_suppliers;
-for (my $i=0; $i<$count; $i++) {
-	my $orders = GetPendingOrders($suppliers[$i]->{'id'});
-    my $ordcount = scalar @$orders;
-    
-	my %line;
-	if ($toggle==0){
-		$line{color}='#EEEEEE';
-		$toggle=1;
-	} else {
-		$line{color}='white';
-		$toggle=0;
-	}
-	$line{id} =$suppliers[$i]->{'id'};
-	$line{name} = $suppliers[$i]->{'name'};
-	$line{active} = $suppliers[$i]->{'active'};
-	$line{total} = $orders->[0]->{'count(*)'};
-	$line{authorisedby} = $orders->[0]->{'authorisedby'};
-	$line{entrydate} = $orders->[0]->{'entrydate'};
-	my @loop_basket;
-	for (my $i2=0;$i2<$ordcount;$i2++){
-		my %inner_line;
-		$inner_line{basketno} =$orders->[$i2]->{'basketno'};
-		$inner_line{total} =$orders->[$i2]->{'count(*)'};
-		$inner_line{authorisedby} = $orders->[$i2]->{'authorisedby'};
-		$inner_line{entrydate} = format_date($orders->[$i2]->{'entrydate'});
-		push @loop_basket, \%inner_line;
-	}
-	$line{loop_basket} = \@loop_basket;
-	push @loop_suppliers, \%line;
-}
-$template->param(loop_suppliers => \@loop_suppliers,
-						supplier => $supplier,
-						count => $count,
-						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-						);
-
-output_html_with_http_headers $query, $cookie, $template->output;

Index: acqui/supplier.pl
===================================================================
RCS file: acqui/supplier.pl
diff -N acqui/supplier.pl
--- acqui/supplier.pl	20 Sep 2006 21:44:36 -0000	1.14
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,112 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: supplier.pl,v 1.14 2006/09/20 21:44:36 tgarip1957 Exp $
-
-#script to show display basket of orders
-#written by chris at katipo.co.nz 24/2/2000
-
-# 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
-
-=head1 NAME
-
-supplier.pl
-
-=head1 DESCRIPTION
-this script shows the details for a bookseller given on input arg.
-It allows to edit & save information about this bookseller.
-
-=head1 CGI PARAMETERS
-
-=over 4
-
-=item supplierid
-To know the bookseller this script has to display details.
-
-=back
-
-=cut
-
-use strict;
-use C4::Auth;
-use C4::Acquisition;
-use C4::Biblio;
-use CGI;
-use C4::Interface::CGI::Output;
-use C4::Bookseller;
-use C4::Bookfund;
-
-my $query=new CGI;
-my $id=$query->param('supplierid');
-my @booksellers = GetBookSeller($id);
-my $count = scalar @booksellers;
-
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "acqui/supplier.tmpl",
-			     query => $query,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {acquisition => 1},
-			     debug => 1,
-			     });
-
-#build array for currencies
-my @currencies = GetCurrencies();
-my $count = scalar @currencies;
-
-my @loop_pricescurrency;
-my @loop_invoicecurrency;
-for (my $i=0;$i<$count;$i++) {
-	if ($booksellers[0]->{'listprice'} eq $currencies[$i]->{'currency'}) {
-		push @loop_pricescurrency, { currency => "<option selected=\"selected\" value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>" };
-	} else {
-		push @loop_pricescurrency, { currency => "<option value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>"};
-	}
-	if ($booksellers[0]->{'invoiceprice'} eq $currencies[$i]->{'currency'}) {
-		push @loop_invoicecurrency, { currency => "<option selected=\"selected\" value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>"};
-	} else {
-		push @loop_invoicecurrency, { currency => "<option value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>"};
-	}
-}
-$template->param(id => $id,
-					name => $booksellers[0]->{'name'},
-					postal =>$booksellers[0]->{'postal'},
-					address1 => $booksellers[0]->{'address1'},
-					address2 => $booksellers[0]->{'address2'},
-					address3 => $booksellers[0]->{'address3'},
-					address4 => $booksellers[0]->{'address4'},
-					phone =>$booksellers[0]->{'phone'},
-					fax => $booksellers[0]->{'fax'},
-					url => $booksellers[0]->{'url'},
-					contact => $booksellers[0]->{'contact'},
-					contpos => $booksellers[0]->{'contpos'},
-					contphone => $booksellers[0]->{'contphone'},
-					contaltphone => $booksellers[0]->{'contaltphone'},
-					contfax => $booksellers[0]->{'contfax'},
-					contemail => $booksellers[0]->{'contemail'},
-					contnotes => $booksellers[0]->{'contnotes'},
-					notes => $booksellers[0]->{'notes'},
-					active => $booksellers[0]->{'active'},
-					specialty => $booksellers[0]->{'specialty'},
-					gstreg => $booksellers[0]->{'gstreg'},
-					listincgst => $booksellers[0]->{'listincgst'},
-					invoiceincgst => $booksellers[0]->{'invoiceincgst'},
-					discount => $booksellers[0]->{'discount'},
-					loop_pricescurrency => \@loop_pricescurrency,
-					loop_invoicecurrency => \@loop_invoicecurrency,);
-
-output_html_with_http_headers $query, $cookie, $template->output;

Index: acqui/updatesupplier.pl
===================================================================
RCS file: acqui/updatesupplier.pl
diff -N acqui/updatesupplier.pl
--- acqui/updatesupplier.pl	20 Sep 2006 21:44:36 -0000	1.10
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,96 +0,0 @@
-#!/usr/bin/perl
-
-#script to show suppliers and orders
-#written by chris at katipo.co.nz 23/2/2000
-
-
-# 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
-
-=head1 NAME
-updatesupplier.pl
-
-=head1 DESCRIPTION
-this script allow to update or create (if id == 0)
-a supplier. This script is called from acqui/supplier.pl.
-
-=head1 CGI PARAMETERS
-
-=over 4
-
-All informations regarding this supplier are listed on input parameter.
-Here is the list :
-supplier, id, company, company_postal, physical, company_phone,
-physical, company_phone, company_fax, website, company_contact_name,
-company_contact_position, contact_phone, contact_phone_2, contact_fax,
-company_email, contact_notes, notes, status, publishers_imprints,
-list_currency, gst, list_gst, invoice_gst, discount.
-
-=back
-
-=cut
-
-use C4::Bookseller;
-use C4::Biblio;
-use C4::Output;
-use CGI;
-use strict;
-
-my $input=new CGI;
-#print $input->header();
-my $supplier=$input->param('supplier');
-#print startpage;
-my %data;
-$data{'id'}=$input->param('id');
-
-$data{'name'}=$input->param('company');
-$data{'postal'}=$input->param('company_postal');
-my $address=$input->param('physical');
-my @addresses=split('\n',$address);
-$data{'address1'}=$addresses[0];
-$data{'address2'}=$addresses[1];
-$data{'address3'}=$addresses[2];
-$data{'address4'}=$addresses[3];
-$data{'phone'}=$input->param('company_phone');
-$data{'fax'}=$input->param('company_fax');
-$data{'url'}=$input->param('website');
-$data{'contact'}=$input->param('company_contact_name');
-$data{'contpos'}=$input->param('company_contact_position');
-$data{'contphone'}=$input->param('contact_phone');
-$data{'contaltphone'}=$input->param('contact_phone_2');
-$data{'contfax'}=$input->param('contact_fax');
-$data{'contemail'}=$input->param('company_email');
-$data{'contnotes'}=$input->param('contact_notes');
-# warn "".$data{'contnotes'};
-$data{'notes'}=$input->param('notes');
-$data{'active'}=$input->param('status');
-$data{'specialty'}=$input->param('publishers_imprints');
-$data{'listprice'}=$input->param('list_currency');
-$data{'invoiceprice'}=$input->param('invoice_currency');
-$data{'gstreg'}=$input->param('gst');
-$data{'listincgst'}=$input->param('list_gst');
-$data{'invoiceincgst'}=$input->param('invoiceincgst');
-$data{'discount'}=$input->param('discount');
-my $id=$input->param('id');
-if ($data{'id'} != 0){
-  ModBookseller(\%data);
-} else {
-  $id=AddBookseller(\%data);
-}
-
-#redirect to booksellers.pl
-print $input->redirect("booksellers.pl?supplier=$id");

Index: admin/admin-home.pl
===================================================================
RCS file: admin/admin-home.pl
diff -N admin/admin-home.pl
--- admin/admin-home.pl	15 Nov 2006 01:41:51 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-
-my $query = new CGI;
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "admin/admin-home.tmpl",
-			     query => $query,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1, management => 1, tools => 1},
-			     debug => 1,
-			     });
-
-output_html_with_http_headers $query, $cookie, $template->output;

Index: admin/aqbookfund.pl
===================================================================
RCS file: admin/aqbookfund.pl
diff -N admin/aqbookfund.pl
--- admin/aqbookfund.pl	27 Sep 2006 21:19:21 -0000	1.32
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,286 +0,0 @@
-#!/usr/bin/perl
-
-#written 20/02/2002 by paul.poulain at free.fr
-
-# 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
-
-
-=head1 NAME
-
-aqbookfund.pl
-
-=head1 DESCRIPTION
-
-script to administer the aqbudget table.
-
-=head1 CGI PARAMETERS
-
-=over 4
-
-=item op
-this script use an C<$op> to know what to do.
-C<op> can be equal to:
-* empty or none of the above values, then
-    - the default screen is build (with all records, or filtered datas).
-	- the   user can clic on add, modify or delete record.
-* add_form, then
-	- if primkey exists, this is a modification,so we read the $primkey record
-	- builds the add/modify form
-* add_validate, then
-	- the user has just send datas, so we create/modify the record
-* delete_form, then
-	- we show the record having primkey=$primkey and ask for deletion validation form
-* delete_confirm, then
-    - we delete the record having primkey=$primkey
-
-=cut
-
-use strict;
-use CGI;
-use C4::Output;
-use List::Util qw/min/;
-use C4::Auth;
-use C4::Koha;
-use C4::Context;
-use C4::Bookfund;
-use C4::Interface::CGI::Output;
-use C4::Search;
-use C4::Date;
-
-my $dbh = C4::Context->dbh;
-my $input = new CGI;
-my $script_name="/cgi-bin/koha/admin/aqbookfund.pl";
-my $bookfundid=$input->param('bookfundid');
-my $pagesize = 10;
-my $op = $input->param('op') || '';
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user(
-        {template_name => "admin/aqbookfund.tmpl",
-         query => $input,
-         type => "intranet",
-         authnotrequired => 0,
-         flagsrequired => {parameters => 1, management => 1},
-         debug => 1,
-        }
-    );
-
-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
-}
-$template->param(action => $script_name);
-
-my $branches = GetBranches;
-
-################## ADD_FORM ##################################
-# called by default. Used to create form to add or  modify a record
-if ($op eq 'add_form') {
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $dataaqbookfund;
-	my $header;
-	if ($bookfundid) {
-    	$dataaqbookfund = GetBookFund($bookfundid);
-	}
-	if ($bookfundid) {
-	    $header = "Modify book fund";
-	    $template->param('header-is-modify-p' => 1);
-	} else {
-	    $header = "Add book fund";
-	    $template->param('header-is-add-p' => 1);
-	}
-	$template->param('use-header-flags-p' => 1);
-	$template->param(header => $header); 
-	my $add_or_modify=0;
-	if ($bookfundid) {
-	    $add_or_modify=1;
-	}
-	$template->param(add_or_modify => $add_or_modify);
-	$template->param(bookfundid =>$bookfundid);
-	$template->param(bookfundname =>$dataaqbookfund->{'bookfundname'});
-warn $dataaqbookfund->{'bookfundname'};
-        my @branchloop;
-        foreach my $branchcode (sort keys %{$branches}) {
-            my $row = {
-                branchcode => $branchcode,
-                branchname => $branches->{$branchcode}->{branchname},
-            };
-
-            if ( $bookfundid    && $dataaqbookfund->{branchcode} eq $branchcode) {
-                $row->{selected} = 1;
-            }
-
-            push @branchloop, $row;
-        }
-
-        $template->param(branches => \@branchloop);
-
-} # END $OP eq ADD_FORM
-
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-elsif ($op eq 'add_validate') {
-	my $bookfundid = uc $input->param('bookfundid');
-
-    my $number = Countbookfund($bookfundid);
-
-    my $bookfund_already_exists = $number > 0 ? 1 : 0;
-
-    if ($bookfund_already_exists) {
-        my $bookfundname = $input->param('bookfundname');
-        my $branchcode = $input->param('branchcode') || undef;
-
-        ModBookFund($bookfundname,$branchcode,$bookfundid);
-    }
-    else {
-        NewBookFund(
-            $bookfundid,
-            $input->param('bookfundname'),
-            $input->param('branchcode')
-        );
-    }
-    $input->redirect('aqbookfund.pl');
-# END $OP eq ADD_VALIDATE
-}
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-
-elsif ($op eq 'delete_confirm') {
-    my $data = GetBookFund($bookfundid);
-	$template->param(bookfundid => $bookfundid);
-	$template->param(bookfundname => $data->{'bookfundname'});
-} # 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') {
-    DelBookFund(uc($input->param('bookfundid')));
-
-}# END $OP eq DELETE_CONFIRMED
-
-
-################## DEFAULT ##################################
-else { # DEFAULT
-    my ($query, $sth);
-
-    $template->param(scriptname => $script_name);
-
-    # filters
-    my @branchloop;
-    foreach my $branchcode (sort keys %{$branches}) {
-        my $row = {
-            code => $branchcode,
-            name => $branches->{$branchcode}->{branchname},
-        };
-
-        if (defined $input->param('filter_branchcode')
-            and $input->param('filter_branchcode') eq $branchcode) {
-            $row->{selected} = 1;
-        }
-
-        push @branchloop, $row;
-    }
-
-    my @bookfundids_loop;
-    my $sth = GetBookFundsId();
-
-    while (my $row = $sth->fetchrow_hashref) {
-        if (defined $input->param('filter_bookfundid') and $input->param('filter_bookfundid') eq $row->{bookfundid}){
-            $row->{selected} = 1;
-        }
-         push @bookfundids_loop, $row;
-     }
-
-    $template->param(
-        filter_bookfundids => \@bookfundids_loop,
-        filter_branches => \@branchloop,
-        filter_bookfundname => $input->param('filter_bookfundname') || undef,
-    );
-
-    # searching the bookfunds corresponding to our filtering rules
-    my @results = SearchBookFund(
-        $input->param('filter'),
-        $input->param('filter_bookfundid'),
-        $input->param('filter_bookfundname'),
-        $input->param('filter_branchcode'),
-    );
-
-    # does the book funds have budgets?
-    my @loop_id;
-    my $sth = GetBookFundsId();
-    while (my $row = $sth->fetchrow){
-        push @loop_id, $row;
-    }
-
-    my ($id,%nb_budgets_of);
-    foreach $id (@loop_id){
-        my $number = Countbookfund($id);
-        $nb_budgets_of{$id} = $number;
-    }
-
-    # pagination informations
-    my $page = $input->param('page') || 1;
-    my @loop;
-
-    my $first = ($page - 1) * $pagesize;
-
-    # if we are on the last page, the number of the last word to display
-    # must not exceed the length of the results array
-    my $last = min(
-        $first + $pagesize - 1,
-        scalar(@results) - 1,
-    );
-
-    my $toggle = 0;
-    foreach my $result (@results[$first .. $last]) {
-        push(
-            @loop,
-            {
-                %{$result},
-                toggle => $toggle++%2,
-                branchname =>
-                    $branches->{ $result->{branchcode} }->{branchname},
-                has_budgets => defined $nb_budgets_of{ $result->{bookfundid} },
-            }
-        );
-    }
-
-    $template->param(
-            bookfund => \@loop,
-            pagination_bar => pagination_bar(
-                        $script_name,
-                        getnbpages(scalar @results, $pagesize),
-                        $page,
-                        'page'
-            )
-        );
-} #---- 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;

Index: admin/aqbudget.pl
===================================================================
RCS file: admin/aqbudget.pl
diff -N admin/aqbudget.pl
--- admin/aqbudget.pl	27 Sep 2006 21:19:21 -0000	1.24
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,431 +0,0 @@
-#!/usr/bin/perl
-
-#script to administer the aqbudget table
-#written 20/02/2002 by paul.poulain at 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 List::Util qw/min/;
-use C4::Date;
-use C4::Auth;
-use C4::Acquisition;
-use C4::Context;
-use C4::Interface::CGI::Output;
-use C4::Search;
-use C4::Koha;
-use C4::Output;
-
-my $input = new CGI;
-my $script_name="/cgi-bin/koha/admin/aqbudget.pl";
-my $bookfundid=$input->param('bookfundid');
-my $aqbudgetid=$input->param('aqbudgetid');
-my $pagesize = 20;
-my $op = $input->param('op');
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user(
-        {template_name => "admin/aqbudget.tmpl",
-         query => $input,
-         type => "intranet",
-         authnotrequired => 0,
-         flagsrequired => {parameters => 1},
-         debug => 1,
-     }
-    );
-
-$template->param(
-    action => $script_name,
-    DHTMLcalendar_dateformat => get_date_format_string_for_DHTMLcalendar(),
-    script_name => $script_name,
-    $op || 'else' => 1,
-);
-
-my $dbh = C4::Context->dbh;
-my $sthtemp = $dbh->prepare("Select flags, branchcode from borrowers where borrowernumber = ?");
-$sthtemp->execute($borrowernumber);
-my ($flags, $homebranch)=$sthtemp->fetchrow;
-
-################## ADD_FORM ##################################
-# called by default. Used to create form to add or  modify a record
-if ($op eq 'add_form') {
-    my ($query, $dataaqbudget, $dataaqbookfund, $sth);
-    my $dbh = C4::Context->dbh;
-
-    #---- if primkey exists, it's a modify action, so read values to modify...
-    if ($aqbudgetid) {
-        $query = '
-SELECT aqbudgetid,
-       bookfundname,
-       aqbookfund.bookfundid,
-       startdate,
-       enddate,
-       budgetamount,
-       aqbudget.branchcode
-  FROM aqbudget
-    INNER JOIN aqbookfund ON aqbudget.bookfundid = aqbookfund.bookfundid
-  WHERE aqbudgetid = ?
-';
-        $sth=$dbh->prepare($query);
-        $sth->execute($aqbudgetid);
-        $dataaqbudget=$sth->fetchrow_hashref;
-        $sth->finish;
-    }
-
-    $query = '
-SELECT aqbookfund.branchcode,
-       branches.branchname,
-       aqbookfund.bookfundname
-  FROM aqbookfund
-    LEFT JOIN branches ON aqbookfund.branchcode = branches.branchcode
-  WHERE bookfundid = ?
-';
-    $sth=$dbh->prepare($query);
-    $sth->execute(
-        defined $aqbudgetid ? $dataaqbudget->{bookfundid} : $bookfundid,
-    );
-    $dataaqbookfund=$sth->fetchrow_hashref;
-    $sth->finish;
-
-    if (defined $aqbudgetid) {
-        $template->param(
-            bookfundid => $dataaqbudget->{'bookfundid'},
-            bookfundname => $dataaqbudget->{'bookfundname'}
-        );
-    }
-    else {
-        $template->param(
-            bookfundid => $bookfundid,
-            bookfundname => $dataaqbookfund->{bookfundname},
-        );
-    }
-
-    # Available branches
-    my @branches = ();
-
-    $query = '
-SELECT branchcode,
-       branchname
-  FROM branches
-  ORDER BY branchname
-';
-    $sth=$dbh->prepare($query);
-    $sth->execute();
-    while (my $row = $sth->fetchrow_hashref) {
-        my $branch = $row;
-
-        if (defined $dataaqbookfund->{branchcode}) {
-            $branch->{selected} =
-                $dataaqbookfund->{branchcode} eq $row->{branchcode} ? 1 : 0;
-        }
-        elsif (defined $aqbudgetid) {
-            $branch->{selected} =
-                $dataaqbudget->{branchcode} eq $row->{branchcode} ? 1 : 0;
-        }
-
-        push @branches, $branch;
-    }
-    $sth->finish;
-
-    $template->param(
-        dateformat => display_date_format(),
-        aqbudgetid => $dataaqbudget->{'aqbudgetid'},
-        startdate => format_date($dataaqbudget->{'startdate'}),
-        enddate => format_date($dataaqbudget->{'enddate'}),
-        budgetamount => $dataaqbudget->{'budgetamount'},
-        branches => \@branches,
-    );
-
-    if (defined $dataaqbookfund->{branchcode}) {
-        $template->param(
-            disable_branchselection => 1,
-            branch => $dataaqbookfund->{branchcode},
-        );
-    }
-													# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-    my ($query, $sth);
-
-    if (defined $aqbudgetid) {
-        $query = '
-UPDATE aqbudget
-  SET bookfundid = ?,
-      startdate = ?,
-      enddate = ?,
-      budgetamount = ?,
-      branchcode = ?
-  WHERE aqbudgetid = ?
-';
-        $sth=$dbh->prepare($query);
-        $sth->execute(
-            $input->param('bookfundid'),
-            format_date_in_iso($input->param('startdate')),
-            format_date_in_iso($input->param('enddate')),
-            $input->param('budgetamount'),
-            $input->param('branch') || undef,
-            $aqbudgetid,
-        );
-        $sth->finish;
-    }
-    else {
-        $query = '
-INSERT
-  INTO aqbudget
-  (bookfundid, startdate, enddate, budgetamount, branchcode)
-  VALUES
-  (?, ?, ?, ?, ?)
-';
-        $sth=$dbh->prepare($query);
-        $sth->execute(
-            $input->param('bookfundid'),
-            format_date_in_iso($input->param('startdate')),
-            format_date_in_iso($input->param('enddate')),
-            $input->param('budgetamount'),
-            $input->param('branch') || undef,
-        );
-        $sth->finish;
-    }
-
-    $input->redirect("aqbudget.pl");
-
-# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select aqbudgetid,bookfundid,startdate,enddate,budgetamount,branchcode from aqbudget where aqbudgetid=?");
-	$sth->execute($aqbudgetid);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(bookfundid => $bookfundid);
-	$template->param(aqbudgetid => $data->{'aqbudgetid'});
-	$template->param(startdate => format_date($data->{'startdate'}));
-	$template->param(enddate => format_date($data->{'enddate'}));
-	$template->param(budgetamount => $data->{'budgetamount'});
-													# 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') {
-	my $dbh = C4::Context->dbh;
-	my $aqbudgetid=uc($input->param('aqbudgetid'));
-	my $sth=$dbh->prepare("delete from aqbudget where aqbudgetid=?");
-	$sth->execute($aqbudgetid);
-	$sth->finish;
-	 print $input->redirect("aqbookfund.pl");
-	 return;
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-    my ($query, $sth);
-
-    # create a look-up table for bookfund names from bookfund ids,
-    # instead of having on query per budget
-    my %bookfundname_of = ();
-    $query = '
-SELECT bookfundid, bookfundname
-  FROM aqbookfund
-';
-    $sth=$dbh->prepare($query);
-    $sth->execute;
-    while (my $row = $sth->fetchrow_hashref) {
-        $bookfundname_of{ $row->{bookfundid} } = $row->{bookfundname};
-    }
-    $sth->finish;
-
-    # filters
-    my $branches = GetBranches();
-    my @branchloop;
-    foreach my $branchcode (sort keys %{$branches}) {
-        my $row = {
-            code => $branchcode,
-            name => $branches->{$branchcode}->{branchname},
-        };
-
-        if (defined $input->param('filter_branchcode')
-            and $input->param('filter_branchcode') eq $branchcode) {
-            $row->{selected} = 1;
-        }
-
-        push @branchloop, $row;
-    }
-
-    my @bookfundids_loop;
-    $query = '
-SELECT bookfundid
-  FROM aqbookfund
-';
-    $sth = $dbh->prepare($query);
-    $sth->execute();
-    while (my $row = $sth->fetchrow_hashref) {
-        if (defined $input->param('filter_bookfundid')
-            and $input->param('filter_bookfundid') eq $row->{bookfundid}) {
-            $row->{selected} = 1;
-        }
-
-        push @bookfundids_loop, $row;
-    }
-    $sth->finish;
-
-    $template->param(
-        filter_bookfundids => \@bookfundids_loop,
-        filter_branches => \@branchloop,
-        filter_amount => $input->param('filter_amount') || undef,
-        filter_startdate => $input->param('filter_startdate') || undef,
-        filter_enddate => $input->param('filter_enddate') || undef,
-    );
-
-    my %sign_label_of = (
-        '=' => 'equal',
-        '>=' => 'superior',
-        '<=' => 'inferior',
-    );
-
-    foreach my $field (qw/startdate enddate amount/) {
-        my $param = 'filter_'.$field.'_sign';
-
-        foreach my $sign (keys %sign_label_of) {
-            if ($input->param($param) eq $sign) {
-                $template->param(
-                    $param.'_'.$sign_label_of{$sign}.'_selected' => 1,
-                );
-            }
-        }
-    }
-
-    # Search all available budgets
-    $query = '
-SELECT aqbudgetid,
-       bookfundid,
-       startdate,
-       enddate,
-       budgetamount,
-       branchcode
-  FROM aqbudget
-  WHERE 1 = 1';
-
-    my @bindings;
-
-    if ($input->param('filter_bookfundid')) {
-        $query.= '
-    AND bookfundid = ?
-';
-        push @bindings, $input->param('filter_bookfundid');
-    }
-    if ($input->param('filter_branchcode')) {
-        $query.= '
-    AND branchcode = ?
-';
-        push @bindings, $input->param('filter_branchcode');
-    }
-    if ($input->param('filter_startdate')) {
-        $query.= '
-    AND startdate '.$input->param('filter_startdate_sign').' ?
-';
-        push @bindings, format_date_in_iso($input->param('filter_startdate'));
-    }
-    if ($input->param('filter_enddate')) {
-        $query.= '
-    AND enddate '.$input->param('filter_enddate_sign').' ?
-';
-        push @bindings, format_date_in_iso($input->param('filter_enddate'));
-    }
-    if ($input->param('filter_amount')) {
-        $query.= '
-    AND budgetamount '.$input->param('filter_amount_sign').' ?
-';
-        # the amount must be a quantity, with 2 digits after the decimal
-        # separator
-        $input->param('filter_amount') =~ m{(\d* (?:\.\d{,2})? )}xms;
-        my ($amount) = $1;
-        push @bindings, $amount;
-    }
-
-    $query.= '
-  ORDER BY bookfundid, aqbudgetid
-';
-    $sth = $dbh->prepare($query);
-    $sth->execute(@bindings);
-    my @results;
-    while (my $row = $sth->fetchrow_hashref){
-        push @results, $row;
-    }
-    $sth->finish;
-
-    # filter budgets depending on the pagination
-    my $page = $input->param('page') || 1;
-    my $first = ($page - 1) * $pagesize;
-
-    # if we are on the last page, the number of the last word to display
-    # must not exceed the length of the results array
-    my $last = min(
-        $first + $pagesize - 1,
-        scalar @results - 1,
-    );
-
-    my $toggle = 0;
-    my @loop;
-    foreach my $result (@results[$first .. $last]) {
-        push(
-            @loop,
-            {
-                %{$result},
-                toggle => $toggle++%2,
-                bookfundname => $bookfundname_of{ $result->{'bookfundid'} },
-                branchname => $branches->{ $result->{branchcode} }->{branchname},
-                startdate => format_date($result->{startdate}),
-                enddate => format_date($result->{enddate}),
-            }
-        );
-    }
-
-    $template->param(
-        budget => \@loop,
-        pagination_bar => pagination_bar(
-            $script_name,
-            getnbpages(scalar @results, $pagesize),
-            $page,
-            'page'
-        )
-    );
-} #---- 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;
-

Index: admin/auth_subfields_structure.pl
===================================================================
RCS file: admin/auth_subfields_structure.pl
diff -N admin/auth_subfields_structure.pl
--- admin/auth_subfields_structure.pl	6 Sep 2006 16:21:04 -0000	1.9
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,451 +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 C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Auth;
-use CGI;
-use C4::Search;
-use C4::Context;
-
-
-sub StringSearch  {
-	my ($env,$searchstring,$authtypecode)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from auth_subfield_structure where (tagfield like ? and authtypecode=?) order by tagfield");
-	$sth->execute("$searchstring%",$authtypecode);
-	my @results;
-	my $cnt=0;
-	my $u=1;
-	while (my $data=$sth->fetchrow_hashref){
-		push(@results,$data);
-		$cnt ++;
-		$u++;
-	}
-	$sth->finish;
-	$dbh->disconnect;
-	return ($cnt,\@results);
-}
-
-my $input = new CGI;
-my $tagfield=$input->param('tagfield');
-my $tagsubfield=$input->param('tagsubfield');
-my $authtypecode=$input->param('authtypecode');
-my $pkfield="tagfield";
-my $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/auth_subfields_structure.pl";
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/auth_subfields_structure.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     debug => 1,
-			     });
-my $pagesize=30;
-my $op = $input->param('op');
-$tagfield=~ s/\,//g;
-
-if ($op) {
-$template->param(script_name => $script_name,
-						tagfield =>$tagfield,
-						authtypecode => $authtypecode,
-						$op              => 1); # we show only the TMPL_VAR names $op
-} else {
-$template->param(script_name => $script_name,
-						tagfield =>$tagfield,
-						authtypecode => $authtypecode,
-						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;
-	my $dbh = C4::Context->dbh;
-	my $more_subfields = $input->param("more_subfields")+1;
-	
-	# build authorised value list
-
-my	$sth2 = $dbh->prepare("select distinct category from authorised_values");
-	$sth2->execute;
-	my @authorised_values;
-	push @authorised_values,"";
-	while ((my $category) = $sth2->fetchrow_array) {
-		push @authorised_values, $category;
-	}
-	push (@authorised_values,"branches");
-	push (@authorised_values,"itemtypes");
-
-	# build value_builder list
-	my @value_builder=('');
-
-	# read value_builder directory.
-	# 2 cases here : on CVS install, $cgidir does not need a /cgi-bin
-	# on a standard install, /cgi-bin need to be added. 
-	# test one, then the other
-	my $cgidir = C4::Context->intranetdir ."/cgi-bin";
-	unless (opendir(DIR, "$cgidir/value_builder")) {
-		$cgidir = C4::Context->intranetdir;
-		opendir(DIR, "$cgidir/value_builder") || die "can't opendir $cgidir/value_builder: $!";
-	} 
-	while (my $line = readdir(DIR)) {
-		if ($line =~ /\.pl$/) {
-			push (@value_builder,$line);
-		}
-	}
-	closedir DIR;
-
-	# build values list
-	my $sth=$dbh->prepare("select * from auth_subfield_structure where tagfield=? and authtypecode=?"); # and tagsubfield='$tagsubfield'");
-	$sth->execute($tagfield,$authtypecode);
-	my @loop_data = ();
-	my $toggle=1;
-	my $i=0;
-	while ($data =$sth->fetchrow_hashref) {
-
-		my %row_data;  # get a fresh hash for the row data
-		if ($toggle eq 1){
-			$toggle=0;
-	  	} else {
-			$toggle=1;
-	  	}
-		$row_data{tab} = CGI::scrolling_list(-name=>'tab',
-					-id=>"tab$i",
-					-values=>['-1','0','1','2','3','4','5','6','7','8','9'],
-					-labels => {'-1' =>'ignore','0'=>'0','1'=>'1','2' =>'2','3'=>'3','4'=>'4',
-									'5' =>'5','6'=>'6','7'=>'7',
-									'8' =>'8','9'=>'9',},
-					-default=>$data->{'tab'},
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ohidden} = CGI::scrolling_list(-name=>'ohidden',
-					-id=>"ohidden$i",
-					-values=>['0','2'],
-					-labels => {'0'=>'Show','2' =>'Hide',},
-					-default=>substr($data->{'hidden'},0,1),
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden',
-					-id=>"ihidden$i",
-					-values=>['0','2'],
-					-labels => {'0'=>'Show',
-									'2' =>'Hide',
-									},
-					-default=>substr($data->{'hidden'},1,1),
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ehidden} = CGI::scrolling_list(-name=>'ehidden',
-					-id=>"ehidden$i",
-					-values=>['0','1','2'],
-					-labels => {'0'=>'Show','1'=>'Show Collapsed',
-									'2' =>'Hide',
-									},
-					-default=>substr($data->{'hidden'},2,1),
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{tagsubfield} =$data->{'tagsubfield'}."<input type=\"hidden\" name=\"tagsubfield\" value=\"".$data->{'tagsubfield'}."\" id=\"tagsubfield\">";
-		$row_data{liblibrarian} = CGI::escapeHTML($data->{'liblibrarian'});
-		$row_data{libopac} = CGI::escapeHTML($data->{'libopac'});
-		$row_data{seealso} = CGI::escapeHTML($data->{'seealso'});
-		$row_data{authorised_value}  = CGI::scrolling_list(-name=>'authorised_value',
-					-id=>'authorised_value',
-					-values=> \@authorised_values,
-					-default=>$data->{'authorised_value'},
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{value_builder}  = CGI::scrolling_list(-name=>'value_builder',
-					-id=>'value_builder',
-					-values=> \@value_builder,
-					-default=>$data->{'value_builder'},
-					-size=>1,
-					-multiple=>0,
-					);
-		
-		$row_data{repeatable} = CGI::checkbox(-name=>"repeatable$i",
-	-checked => $data->{'repeatable'}?'checked':'',
-	-value => 1,
-	-label => '',
-	-id => "repeatable$i");
-		$row_data{mandatory} = CGI::checkbox(-name => "mandatory$i",
-	-checked => $data->{'mandatory'}?'checked':'',
-	-value => 1,
-	-label => '',
-	-id => "mandatory$i");
-		$row_data{hidden} = CGI::escapeHTML($data->{hidden}) ;
-		$row_data{isurl} = CGI::checkbox( -name => "isurl$i",
-			-id => "isurl$i",
-			-checked => $data->{'isurl'}?'checked':'',
-			-value => 1,
-			-label => '');
-		$row_data{link} = CGI::checkbox( -name => "link$i",
-			-id => "link$i",
-			-checked => $data->{'link'}?'checked':'',
-			-value => 1,
-			-label => '');
-		$row_data{row} = $i;
-		$row_data{toggle} = $toggle;
-		# $row_data{link} = CGI::escapeHTML($data->{'link'});
-		push(@loop_data, \%row_data);
-		$i++;
-	}
-	# add more_subfields empty lines for add if needed
-	for (my $i=1;$i<=$more_subfields;$i++) {
-		my %row_data;  # get a fresh hash for the row data
-		$row_data{tab} = CGI::scrolling_list(-name=>'tab',
-					-id=>"tab$i",
-					-values=>['-1','0','1','2','3','4','5','6','7','8','9'],
-					-labels => {'-1' =>'ignore','0'=>'0','1'=>'1','2' =>'2','3'=>'3','4'=>'4',
-									'5' =>'5','6'=>'6','7'=>'7',
-									'8' =>'8','9'=>'9',},
-					-default=>"",
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ohidden} = CGI::scrolling_list(-name=>'ohidden',
-					-id=>"ohidden$i",
-					-values=>['0','2'],
-					-labels => {'0'=>'Show','2' =>'Hide',},
-					-default=>"0",
-					-size=>1,
-					-multiple=>0,
-					);
-
-		$row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden',
-					-id=>"ihidden$i",
-					-values=>['0','2'],
-					-labels => {'0'=>'Show','2' =>'Hide',},
-					-default=>"0",
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ehidden} = CGI::scrolling_list(-name=>'ehidden',
-					-id=>"ehidden$i",
-					-values=>['0','1','2'],
-					-labels => {'0'=>'Show','1'=>'Show Collapsed',
-									'2' =>'Hide',
-									},
-					-default=>"0",
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{tagsubfield} = "<input type=\"text\" name=\"tagsubfield\" value=\"".$data->{'tagsubfield'}."\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\">";
-		$row_data{liblibrarian} = "";
-		$row_data{libopac} = "";
-		$row_data{seealso} = "";
-		$row_data{hidden} = "000";
-		$row_data{repeatable} = CGI::checkbox( -name=> 'repeatable',
-				-id => "repeatable$i",
-				-checked => '',
-				-value => 1,
-				-label => '');
-		$row_data{mandatory} = CGI::checkbox( -name=> 'mandatory',
-			-id => "mandatory$i",
-			-checked => '',
-			-value => 1,
-			-label => '');
-		$row_data{isurl} = CGI::checkbox(-name => 'isurl',
-			-id => "isurl$i",
-			-checked => '',
-			-value => 1,
-			-label => '');
-		
-		$row_data{authorised_value}  = CGI::scrolling_list(-name=>'authorised_value',
-					-id => 'authorised_value',
-					-values=> \@authorised_values,
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{link} = CGI::checkbox( -name => "link",
-			-id => "link$i",
-			-checked => '',
-			-value => 1,
-			-label => '');
-		# $row_data{link} = CGI::escapeHTML($data->{'link'});
-		$row_data{toggle} = $toggle;
-		$row_data{row} = $i;
-		push(@loop_data, \%row_data);
-	}
-	$template->param('use-heading-flags-p' => 1);
-	$template->param('heading-edit-subfields-p' => 1);
-	$template->param(action => "Edit subfields",
-							tagfield => "<input type=\"hidden\" name=\"tagfield\" value=\"$tagfield\">$tagfield",
-							loop => \@loop_data,
-							more_subfields => $more_subfields,
-							more_tag => $tagfield);
-
-												# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
-	$template->param(tagfield => "$input->param('tagfield')");
-	my $sth=$dbh->prepare("replace auth_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,tab,seealso,authorised_value,authtypecode,value_builder,hidden,isurl, link)
-									values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
-	my @tagsubfield	= $input->param('tagsubfield');
-	my @liblibrarian	= $input->param('liblibrarian');
-	my @libopac		= $input->param('libopac');
-	my @tab				= $input->param('tab');
-	my @seealso		= $input->param('seealso');
-	#my @hidden		= $input->param('hidden');
-	my @hidden;
-	my @ohidden		= $input->param('ohidden');
-	my @ihidden		= $input->param('ihidden');
-	my @ehidden		= $input->param('ehidden');
-	my @authorised_values	= $input->param('authorised_value');
-#	my $authtypecodes	= $input->param('authtypecode');
-	my @value_builder	=$input->param('value_builder');
-	my @link		=$input->param('link');
-	for (my $i=0; $i<= $#tagsubfield ; $i++) {
-		my $tagfield			=$input->param('tagfield');
-		my $tagsubfield		=$tagsubfield[$i];
-		$tagsubfield="@" unless $tagsubfield ne '';
-		my $liblibrarian		=$liblibrarian[$i];
-		my $libopac			=$libopac[$i];
-		my $repeatable		=$input->param("repeatable$i")?1:0;
-		my $mandatory		=$input->param("mandatory$i")?1:0;
-
-		my $tab				=$tab[$i];
-		my $seealso				=$seealso[$i];
-		my $authorised_value		=$authorised_values[$i];
-#		my $authtypecode		=$authtypecodes;
-		my $value_builder=$value_builder[$i];
-		my $hidden = $ohidden[$i].$ihidden[$i].$ehidden[$i]; #collate from 3 hiddens;
-		my $isurl = $input->param("isurl$i")?1:0;
-		my $link = $input->param("link$i")?1:0;
-		if ($liblibrarian) {
-			unless (C4::Context->config('demo') eq 1) {
-				$sth->execute ($tagfield,
-									$tagsubfield,
-									$liblibrarian,
-									$libopac,
-									$repeatable,
-									$mandatory,
-									$tab,
-									$seealso,
-									$authorised_value,
-									$authtypecode,
-									$value_builder,
-									$hidden,
-									$isurl,
-									
-
-	 $link,
-					      );
-			}
-		}
-	}
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=auth_subfields_structure.pl?tagfield=$tagfield&authtypecode=$authtypecode\"></html>";
-	exit;
-
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select * from auth_subfield_structure where tagfield=? and tagsubfield=? and authtypecode=?");
-	#FIXME : called with 2 bind variables when 3 are needed
-	$sth->execute($tagfield,$tagsubfield);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(liblibrarian => $data->{'liblibrarian'},
-							tagsubfield => $data->{'tagsubfield'},
-							delete_link => $script_name,
-							tagfield      =>$tagfield,
-							tagsubfield => $tagsubfield,
-							authtypecode => $authtypecode,
-							);
-													# 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') {
-	my $dbh = C4::Context->dbh;
-	unless (C4::Context->config('demo') eq 1) {
-		my $sth=$dbh->prepare("delete from auth_subfield_structure where tagfield=? and tagsubfield=? and authtypecode=?");
-		$sth->execute($tagfield,$tagsubfield,$authtypecode);
-		$sth->finish;
-	}
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=auth_subfields_structure.pl?tagfield=$tagfield&authtypecode=$authtypecode\"></html>";
-	exit;
-	$template->param(tagfield => $tagfield);
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	my $env;
-	my ($count,$results)=StringSearch($env,$tagfield,$authtypecode);
-	my $toggle=1;
-	my @loop_data = ();
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-	  	if ($toggle eq 1){
-			$toggle=0;
-	  	} else {
-			$toggle=1;
-	  	}
-		my %row_data;  # get a fresh hash for the row data
-		$row_data{tagfield} = $results->[$i]{'tagfield'};
-		$row_data{tagsubfield} = $results->[$i]{'tagsubfield'};
-		$row_data{liblibrarian} = $results->[$i]{'liblibrarian'};
-		$row_data{repeatable} = $results->[$i]{'repeatable'};
-		$row_data{mandatory} = $results->[$i]{'mandatory'};
-		$row_data{tab} = $results->[$i]{'tab'};
-		$row_data{seealso} = $results->[$i]{'seealso'};
-		$row_data{authorised_value} = $results->[$i]{'authorised_value'};
-		$row_data{authtypecode}	= $results->[$i]{'authtypecode'};
-		$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{link}	= $results->[$i]{'link'};
-		$row_data{delete} = "$script_name?op=delete_confirm&amp;tagfield=$tagfield&amp;tagsubfield=".$results->[$i]{'tagsubfield'}."&authtypecode=$authtypecode";
-		$row_data{toggle} = $toggle;
-		if ($row_data{tab} eq -1) {
-			$row_data{subfield_ignored} = 1;
-		}
-
-		push(@loop_data, \%row_data);
-	}
-	$template->param(loop => \@loop_data);
-	$template->param(edit_tagfield => $tagfield,
-		edit_authtypecode => $authtypecode);
-	
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(prev =>"<a href=\"$script_name?offset=$prevpage\">");
-	}
-	if ($offset+$pagesize<$count) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(next => "<a href=\"$script_name?offset=$nextpage\">");
-	}
-} #---- 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;

Index: admin/auth_tag_structure.pl
===================================================================
RCS file: admin/auth_tag_structure.pl
diff -N admin/auth_tag_structure.pl
--- admin/auth_tag_structure.pl	1 Sep 2006 22:03:00 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,297 +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::Auth;
-use C4::Koha;
-use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Search;
-use C4::Context;
-
-
-# retrieve parameters
-my $input = new CGI;
-my $authtypecode = $input->param('authtypecode'); # set to select framework
-$authtypecode="" unless $authtypecode;
-my $existingauthtypecode = $input->param('existingauthtypecode'); # set when we have to create a new framework (in authtype) by copying an old one (in existingauthtype)
-$existingauthtypecode = "" unless $existingauthtypecode;
-# my $authtypeinfo = getauthtypeinfo($authtype);
-my $searchfield=$input->param('searchfield');
-$searchfield=0 unless $searchfield;
-$searchfield=~ s/\,//g;
-
-my $offset=$input->param('offset');
-my $op = $input->param('op');
-my $pagesize=20;
-
-my $script_name="/cgi-bin/koha/admin/auth_tag_structure.pl";
-
-my $dbh = C4::Context->dbh;
-
-# open template
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "admin/auth_tag_structure.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     debug => 1,
-			     });
-
-# get authtype list
-my $authtypes = getauthtypes;
-my @authtypesloop;
-foreach my $thisauthtype (keys %$authtypes) {
-	my $selected = 1 if $thisauthtype eq $authtypecode;
-	my %row =(value => $thisauthtype,
-				selected => $selected,
-				authtypetext => $authtypes->{$thisauthtype}->{'authtypetext'},
-			);
-	push @authtypesloop, \%row;
-}
-
-my $sth;
-# check that authtype framework is defined in auth_tag_structure if we are on a default action
-if (!$op or $op eq 'authtype_create_confirm') {
-#warn "IN";
-	$sth=$dbh->prepare("select count(*) from auth_tag_structure where authtypecode=?");
-	$sth->execute($authtypecode);
-	my ($authtypeexist) = $sth->fetchrow;
-	if ($authtypeexist) {
-	} else {
-		# if authtype does not exists, then OP must be changed to "create authtype" if we are not on the way to create it
-		# (op = authtyp_create_confirm)
-		if ($op eq "authtype_create_confirm") {
-			duplicate_auth_framework($authtypecode, $existingauthtypecode);
-		} else {
-			$op = "authtype_create";
-		}
-	}
-}
-$template->param(authtypeloop => \@authtypesloop);
-if ($op && $op ne 'authtype_create_confirm') {
-$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') {
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $data;
-	if ($searchfield) {
-		$sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from auth_tag_structure where tagfield=? and authtypecode=?");
-		$sth->execute($searchfield,$authtypecode);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-	my $sth = $dbh->prepare("select distinct category from authorised_values");
-	$sth->execute;
-	my @authorised_values;
-	push @authorised_values,"";
-	while ((my $category) = $sth->fetchrow_array) {
-		push @authorised_values, $category;
-	}
-	my $authorised_value  = CGI::scrolling_list(-name=>'authorised_value',
-			-values=> \@authorised_values,
-			-size=>1,
-			-multiple=>0,
-			-default => $data->{'authorised_value'},
-			);
-
-	if ($searchfield) {
-		$template->param(action => "Modify tag",
-								searchfield => "<input type=\"hidden\" name=\"tagfield\" value=\"$searchfield\" />$searchfield");
-		$template->param('heading-modify-tag-p' => 1);
-	} else {
-		$template->param(action => "Add tag",
-								searchfield => "<input type=\"text\" name=\"tagfield\" size=\"5\" maxlength=\"3\" />");
-		$template->param('heading-add-tag-p' => 1);
-	}
-	$template->param('use-heading-flags-p' => 1);
-	$template->param(liblibrarian => $data->{'liblibrarian'},
-							libopac => $data->{'libopac'},
-							repeatable => CGI::checkbox('repeatable',$data->{'repeatable'}?'checked':'',1,''),
-							mandatory => CGI::checkbox('mandatory',$data->{'mandatory'}?'checked':'',1,''),
-							authorised_value => $authorised_value,
-							authtypecode => $authtypecode,
-							);
-													# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	$sth=$dbh->prepare("replace auth_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,authtypecode) values (?,?,?,?,?,?,?)");
-	my $tagfield       =$input->param('tagfield');
-	my $liblibrarian  = $input->param('liblibrarian');
-	my $libopac       =$input->param('libopac');
-	my $repeatable =$input->param('repeatable');
-	my $mandatory =$input->param('mandatory');
-	my $authorised_value =$input->param('authorised_value');
-	unless (C4::Context->config('demo') eq 1) {
-		$sth->execute($tagfield,
-						$liblibrarian,
-						$libopac,
-						$repeatable?1:0,
-						$mandatory?1:0,
-						$authorised_value,
-						$authtypecode
-						);
-	}
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=auth_tag_structure.pl?tagfield=$tagfield&authtypecode=$authtypecode\"></html>";
-	exit;
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	$sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from auth_tag_structure where tagfield=?");
-	$sth->execute($searchfield);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(liblibrarian => $data->{'liblibrarian'},
-							searchfield => $searchfield,
-							authtypecode => $authtypecode,
-							);
-													# 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') {
-	unless (C4::Context->config('demo') eq 1) {
-		$dbh->do("delete from auth_tag_structure where tagfield='$searchfield' and authtypecode='$authtypecode'");
-		$dbh->do("delete from auth_subfield_structure where tagfield='$searchfield' and authtypecode='$authtypecode'");
-	}
-													# END $OP eq DELETE_CONFIRMED
-################## ITEMTYPE_CREATE ##################################
-# called automatically if an unexisting authtypecode is selected
-} elsif ($op eq 'authtype_create') {
-	$sth = $dbh->prepare("select count(*),auth_tag_structure.authtypecode,authtypetext from auth_tag_structure,auth_types where auth_types.authtypecode=auth_tag_structure.authtypecode group by auth_tag_structure.authtypecode");
-	$sth->execute;
-	my @existingauthtypeloop;
-	while (my ($tot,$thisauthtype,$authtypetext) = $sth->fetchrow) {
-		if ($tot>0) {
-			my %line = ( value => $thisauthtype,
-						authtypetext => $authtypetext,
-					);
-			push @existingauthtypeloop,\%line;
-		}
-	}
-	$template->param(existingauthtypeloop => \@existingauthtypeloop,
-					authtypecode => $authtypecode,
-					);
-################## DEFAULT ##################################
-} else { # DEFAULT
-	# here, $op can be unset or set to "authtype_create_confirm".
-#	warn "authtype : $authtypecode";
-	if  ($searchfield ne '') {
-		 $template->param(searchfield => $searchfield);
-	}
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,$authtypecode);
-	my $toggle="white";
-	my @loop_data = ();
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-	  	if ($toggle eq 'white'){
-			$toggle="#ffffcc";
-	  	} else {
-			$toggle="white";
-	  	}
-		my %row_data;  # get a fresh hash for the row data
-		$row_data{tagfield} = $results->[$i]{'tagfield'};
-		$row_data{liblibrarian} = $results->[$i]{'liblibrarian'};
-		$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&amp;searchfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode;
-		$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode;
-		$row_data{bgcolor} = $toggle;
-		push(@loop_data, \%row_data);
-	}
-	$template->param(loop => \@loop_data,
-					authtypecode => $authtypecode,
-	);
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(isprevpage => $offset,
-						prevpage=> $prevpage,
-						searchfield => $searchfield,
-						script_name => $script_name,
-		 );
-	}
-	if ($offset+$pagesize<$count) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(nextpage =>$nextpage,
-						searchfield => $searchfield,
-						script_name => $script_name,
-		);
-	}
-} #---- END $OP eq DEFAULT
-
-$template->param(loggeninuser => $loggedinuser);
-output_html_with_http_headers $input, $cookie, $template->output;
-
-
-#
-# the sub used for searches
-#
-sub StringSearch  {
-	my ($env,$searchstring,$authtypecode)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from auth_tag_structure where (tagfield >= ? and authtypecode=?) order by tagfield");
-	$sth->execute($data[0], $authtypecode);
-	my @results;
-	while (my $data=$sth->fetchrow_hashref){
-	push(@results,$data);
-	}
-	#  $sth->execute;
-	$sth->finish;
-	return (scalar(@results),\@results);
-}
-
-#
-# the sub used to duplicate a framework from an existing one in MARC parameters tables.
-#
-sub duplicate_auth_framework {
-	my ($newauthtype,$oldauthtype) = @_;
-#	warn "TO $newauthtype FROM $oldauthtype";
-	my $sth = $dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from auth_tag_structure where authtypecode=?");
-	$sth->execute($oldauthtype);
-	my $sth_insert = $dbh->prepare("insert into auth_tag_structure  (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, authtypecode) values (?,?,?,?,?,?,?)");
-	while ( my ($tagfield,$liblibrarian,$libopac,$repeatable,$mandatory,$authorised_value) = $sth->fetchrow) {
-		$sth_insert->execute($tagfield,$liblibrarian,$libopac,$repeatable,$mandatory,$authorised_value,$newauthtype);
-	}
-
-	$sth = $dbh->prepare("select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,value_builder,seealso,hidden,link from auth_subfield_structure where authtypecode=?");
-	$sth->execute($oldauthtype);
-	$sth_insert = $dbh->prepare("insert into auth_subfield_structure (authtypecode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,value_builder,seealso,hidden,link) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
-	while ( my ( $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield,$tab, $authorised_value, $thesaurus_category, $seealso,$hidden,$link) = $sth->fetchrow) {
-		$sth_insert->execute($newauthtype, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory,$kohafield, $tab, $authorised_value, $thesaurus_category, $seealso,$hidden,$link);
-	}
-}
-

Index: admin/authorised_values.pl
===================================================================
RCS file: admin/authorised_values.pl
diff -N admin/authorised_values.pl
--- admin/authorised_values.pl	1 Sep 2006 22:03:00 -0000	1.18
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,207 +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::Auth;
-use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Search;
-use C4::Context;
-
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select id,category,authorised_value,lib from authorised_values where (category like ?) order by category,authorised_value");
-	$sth->execute("$data[0]%");
-	my @results;
-	my $cnt=0;
-	while (my $data=$sth->fetchrow_hashref){
-	push(@results,$data);
-	$cnt ++;
-	}
-	$sth->finish;
-	return ($cnt,\@results);
-}
-
-my $input = new CGI;
-my $searchfield=$input->param('searchfield');
-$searchfield=~ s/\,//g;
-my $id = $input->param('id');
-my $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/authorised_values.pl";
-my $dbh = C4::Context->dbh;
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/authorised_values.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1, management => 1},
-			     debug => 1,
-			     });
-my $pagesize=20;
-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,authorised_value,lib from authorised_values where id=?");
-		$sth->execute($id);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	} else {
-		$data->{'category'} = $input->param('category');
-	}
-	if ($searchfield) {
-		$template->param(action => "Modify authorised value");
-		$template->param('heading-modify-authorized-value-p' => 1);
-	} elsif ( ! $data->{'category'} ) {
-		$template->param(action => "Add new category");
-		$template->param('heading-add-new-category-p' => 1);
-	} else {
-		$template->param(action => "Add authorised value");
-		$template->param('heading-add-authorized-value-p' => 1);
-	}
-	$template->param('use-heading-flags-p' => 1);
-	$template->param(category => $data->{'category'},
-							authorised_value => $data->{'authorised_value'},
-							lib => $data->{'lib'},
-							id => $data->{'id'}
-							);
-	if ($data->{'category'}) {
-		$template->param(category => "<input type=\"hidden\" name=\"category\" value='$data->{'category'}'>$data->{'category'}");
-	} else {
-		$template->param(category => "<input type=text name=\"category\" size=8 maxlength=8>");
-	}
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("replace authorised_values (id,category,authorised_value,lib) values (?,?,?,?)");
-	my $lib = $input->param('lib');
-	undef $lib if ($lib eq ""); # to insert NULL instead of a blank string
-	
-	$sth->execute($input->param('id'), $input->param('category'), $input->param('authorised_value'), $lib);
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=authorised_values.pl?searchfield=".$input->param('category')."\"></html>";
-	exit;
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select category,authorised_value,lib from authorised_values where id=?");
-	$sth->execute($id);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	
-	$template->param(searchfield => $searchfield,
-							Tvalue => $data->{'authorised_value'},
-							id =>$id,
-							);
-
-													# 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') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("delete from authorised_values where id=?");
-	$sth->execute($id);
-	$sth->finish;
-	
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=authorised_values.pl?searchfield=$searchfield\"></html>";
-	exit;
-
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	# build categories list
-	my $sth = $dbh->prepare("select distinct category from authorised_values");
-	$sth->execute;
-	my @category_list;
-	while ( my ($category) = $sth->fetchrow_array) {
-		push(@category_list,$category);
-	}
-	# push koha system categories
-	my $tab_list = CGI::scrolling_list(-name=>'searchfield',
-			-values=> \@category_list,
-			-default=>"",
-			-size=>1,
-			-multiple=>0,
-			);
-	if (!$searchfield) {
-		$searchfield=$category_list[0];
-	}
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my $toggle="white";
-	my @loop_data = ();
-	# builds value list
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-	  	if ($toggle eq 'white'){
-			$toggle="#ffffcc";
-	  	} else {
-			$toggle="white";
-	  	}
-		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'};
-		push(@loop_data, \%row_data);
-	}
-
-	$template->param(loop => \@loop_data,
-							tab_list => $tab_list,
-							category => $searchfield);
-
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(isprevpage => $offset,
-						prevpage=> $prevpage,
-						searchfield => $searchfield,
-						script_name => $script_name,
-		 );
-	}
-	if ($offset+$pagesize<$count) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(nextpage =>$nextpage,
-						searchfield => $searchfield,
-						script_name => $script_name,
-		);
-	}
-} #---- END $OP eq DEFAULT
-
-output_html_with_http_headers $input, $cookie, $template->output;

Index: admin/authtypes.pl
===================================================================
RCS file: admin/authtypes.pl
diff -N admin/authtypes.pl
--- admin/authtypes.pl	1 Sep 2006 22:03:00 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,177 +0,0 @@
-#!/usr/bin/perl
-# NOTE: 4-character tabs
-
-#written 20/02/2002 by paul.poulain at free.fr
-# This software is placed under the gnu General Public License, v2 (http://www.gnu.org/licenses/gpl.html)
-
-# 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::Search;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from auth_types where (authtypecode like ?) order by authtypecode");
-	$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('authtypecode');
-my $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/authtypes.pl";
-my $authtypecode=$input->param('authtypecode');
-my $pagesize=20;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/authtypes.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     debug => 1,
-			     });
-
-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') {
-	#start the page and read in includes
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $data;
-	if ($authtypecode) {
-		my $dbh = C4::Context->dbh;
-		my $sth=$dbh->prepare("select * from auth_types where authtypecode=?");
-		$sth->execute($authtypecode);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-#	warn "=> $data->{'authtypetext'} : ".$data->{'summary'};
-	$template->param(authtypecode => $authtypecode,
-							authtypetext => $data->{'authtypetext'},
-							auth_tag_to_report => $data->{'auth_tag_to_report'},
-							summary => $data->{'summary'},
-							);
-;
-													# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("replace auth_types (authtypecode,authtypetext,auth_tag_to_report,summary) values (?,?,?,?)");
-	$sth->execute($input->param('authtypecode'),$input->param('authtypetext'),$input->param('auth_tag_to_report'),$input->param('summary'));
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=authtypes.pl\"></html>";
-	exit;
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	#start the page and read in includes
-	my $dbh = C4::Context->dbh;
-
-	my $total = 0;
-	for my $table ('auth_tag_structure') {
-	   my $sth=$dbh->prepare("select count(*) as total from $table where authtypecode=?");
-	   $sth->execute($authtypecode);
-	   $total += $sth->fetchrow_hashref->{total};
-	   $sth->finish;
-	}
-
-	my $sth=$dbh->prepare("select * from auth_types where authtypecode=?");
-	$sth->execute($authtypecode);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-
-	$template->param(authtypecode => $authtypecode,
-							authtypetext => $data->{'authtypetext'},
-							summary => $data->{'summary'},
-							total => $total);
-													# 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') {
-	#start the page and read in includes
-	my $dbh = C4::Context->dbh;
-	my $authtypecode=uc($input->param('authtypecode'));
-	my $sth=$dbh->prepare("delete from auth_tag_structure where authtypecode=?");
-	$sth->execute($authtypecode);
-	$sth=$dbh->prepare("delete from auth_subfield_structure where authtypecode=?");
-	$sth->execute($authtypecode);
-	$sth=$dbh->prepare("delete from auth_types where authtypecode=?");
-	$sth->execute($authtypecode);
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=authtypes.pl\"></html>";
-	exit;
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my $toggle="white";
-	my @loop_data;
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-		my %row_data;
-		if ($toggle eq 'white'){
-			$row_data{toggle}="#ffffcc";
-		} else {
-			$row_data{toggle}="white";
-		}
-		$row_data{authtypecode} = $results->[$i]{'authtypecode'};
-		$row_data{authtypetext} = $results->[$i]{'authtypetext'};
-		$row_data{auth_tag_to_report} = $results->[$i]{'auth_tag_to_report'};
-		$row_data{summary} = $results->[$i]{'summary'};
-		push(@loop_data, \%row_data);
-	}
-	$template->param(loop => \@loop_data);
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(previous => "$script_name?offset=".$prevpage);
-	}
-	if ($offset+$pagesize<$count) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(next => "$script_name?offset=".$nextpage);
-	}
-} #---- END $OP eq DEFAULT
-output_html_with_http_headers $input, $cookie, $template->output;
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: admin/biblios_framework.pl
===================================================================
RCS file: admin/biblios_framework.pl
diff -N admin/biblios_framework.pl
--- admin/biblios_framework.pl	1 Sep 2006 22:03:00 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,177 +0,0 @@
-#!/usr/bin/perl
-# NOTE: 4-character tabs
-
-#written 20/02/2002 by paul.poulain at free.fr
-# This software is placed under the gnu General Public License, v2 (http://www.gnu.org/licenses/gpl.html)
-
-# 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::Search;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from biblios_framework where (frameworkcode like ?) order by frameworktext");
-	$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('frameworkcode');
-my $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/biblios_framework.pl";
-my $frameworkcode=$input->param('frameworkcode');
-my $pagesize=20;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/biblios_framework.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     debug => 1,
-			     });
-
-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') {
-	#start the page and read in includes
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $data;
-	if ($frameworkcode) {
-		my $dbh = C4::Context->dbh;
-		my $sth=$dbh->prepare("select * from biblios_framework where frameworkcode=?");
-		$sth->execute($frameworkcode);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-	$template->param(frameworkcode => $frameworkcode,
-							frameworktext => $data->{'frameworktext'},
-							);
-;
-													# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("replace biblios_framework (frameworkcode,frameworktext) values (?,?)");
-	$sth->execute($input->param('frameworkcode'),$input->param('frameworktext'));
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=biblios_framework.pl\"></html>";
-	exit;
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	#start the page and read in includes
-	my $dbh = C4::Context->dbh;
-
-	# Check both categoryitem and biblioitems, see Bug 199
-	my $total = 0;
-	for my $table ('biblios_tag_structure') {
-	   my $sth=$dbh->prepare("select count(*) as total from $table where frameworkcode=?");
-	   $sth->execute($frameworkcode);
-	   $total += $sth->fetchrow_hashref->{total};
-	   $sth->finish;
-	}
-
-	my $sth=$dbh->prepare("select * from biblios_framework where frameworkcode=?");
-	$sth->execute($frameworkcode);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-
-	$template->param(frameworkcode => $frameworkcode,
-							frameworktext => $data->{'frameworktext'},
-							total => $total);
-													# 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') {
-	#start the page and read in includes
-	my $dbh = C4::Context->dbh;
-	my $frameworkcode=uc($input->param('frameworkcode'));
-	my $sth=$dbh->prepare("delete from biblios_tag_structure where frameworkcode=?");
-	$sth->execute($frameworkcode);
-	$sth=$dbh->prepare("delete from biblios_subfield_structure where frameworkcode=?");
-	$sth->execute($frameworkcode);
-	$sth=$dbh->prepare("delete from biblios_framework where frameworkcode=?");
-	$sth->execute($frameworkcode);
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=biblios_framework.pl\"></html>";
-	exit;
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my $toggle="white";
-	my @loop_data;
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-		my %row_data;
-		if ($toggle eq 'white'){
-			$row_data{toggle}="#ffffcc";
-		} else {
-			$row_data{toggle}="white";
-		}
-		$row_data{frameworkcode} = $results->[$i]{'frameworkcode'};
-		$row_data{frameworktext} = $results->[$i]{'frameworktext'};
-		push(@loop_data, \%row_data);
-	}
-	$template->param(loop => \@loop_data);
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(previous => "$script_name?offset=".$prevpage);
-	}
-	if ($offset+$pagesize<$count) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(next => "$script_name?offset=".$nextpage);
-	}
-} #---- END $OP eq DEFAULT
-output_html_with_http_headers $input, $cookie, $template->output;
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: admin/biblios_subfields_structure.pl
===================================================================
RCS file: admin/biblios_subfields_structure.pl
diff -N admin/biblios_subfields_structure.pl
--- admin/biblios_subfields_structure.pl	1 Sep 2006 22:03:00 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,467 +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 C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Auth;
-use CGI;
-use C4::Search;
-use C4::Context;
-
-sub StringSearch  {
-	my ($env,$searchstring,$frameworkcode)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from biblios_subfield_structure where (tagfield like ? and frameworkcode=?) order by tagfield");
-	$sth->execute("$searchstring%",$frameworkcode);
-	my @results;
-	my $cnt=0;
-	my $u=1;
-	while (my $data=$sth->fetchrow_hashref){
-		push(@results,$data);
-		$cnt ++;
-		$u++;
-	}
-	$sth->finish;
-	$dbh->disconnect;
-	return ($cnt,\@results);
-}
-
-my $input = new CGI;
-my $tagfield=$input->param('tagfield');
-my $tagsubfield=$input->param('tagsubfield');
-my $frameworkcode=$input->param('frameworkcode');
-my $pkfield="tagfield";
-my $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/biblios_subfields_structure.pl";
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/biblios_subfields_structure.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     debug => 1,
-			     });
-my $pagesize=30;
-my $op = $input->param('op');
-$tagfield=~ s/\,//g;
-
-if ($op) {
-$template->param(script_name => $script_name,
-						tagfield =>$tagfield,
-						frameworkcode => $frameworkcode,
-						$op              => 1); # we show only the TMPL_VAR names $op
-} else {
-$template->param(script_name => $script_name,
-						tagfield =>$tagfield,
-						frameworkcode => $frameworkcode,
-						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;
-	my $dbh = C4::Context->dbh;
-	my $more_subfields = $input->param("more_subfields")+1;
-	
-	
-	# build authorised value list
-	
-my	$sth2 = $dbh->prepare("select distinct category from authorised_values");
-	$sth2->execute;
-	my @authorised_values;
-	push @authorised_values,"";
-	while ((my $category) = $sth2->fetchrow_array) {
-		push @authorised_values, $category;
-	}
-	push (@authorised_values,"branches");
-	push (@authorised_values,"itemtypes");
-	# build thesaurus categories list
-	$sth2->finish;
-	$sth2 = $dbh->prepare("select authtypecode from auth_types");
-	$sth2->execute;
-	my @authtypes;
-	push @authtypes,"";
-	while ((my $authtypecode) = $sth2->fetchrow_array) {
-		push @authtypes, $authtypecode;
-	}
-	# build value_builder list
-	my @value_builder=('');
-
-	# read value_builder directory.
-	# 2 cases here : on CVS install, $cgidir does not need a /cgi-bin
-	# on a standard install, /cgi-bin need to be added. 
-	# test one, then the other
-	my $cgidir = C4::Context->intranetdir ."/cgi-bin";
-	unless (opendir(DIR, "$cgidir/value_builder")) {
-		$cgidir = C4::Context->intranetdir;
-		opendir(DIR, "$cgidir/value_builder") || die "can't opendir $cgidir/value_builder: $!";
-	} 
-	while (my $line = readdir(DIR)) {
-		if ($line =~ /\.pl$/) {
-			push (@value_builder,$line);
-		}
-	}
-	closedir DIR;
-
-	# build values list
-	my $sth=$dbh->prepare("select * from biblios_subfield_structure where tagfield=? and frameworkcode=?"); # and tagsubfield='$tagsubfield'");
-	$sth->execute($tagfield,$frameworkcode);
-	my @loop_data = ();
-	my $toggle=1;
-	my $i=0;
-	while ($data =$sth->fetchrow_hashref) {
-		my %row_data;  # get a fresh hash for the row data
-		if ($toggle eq 1){
-			$toggle=0;
-	  	} else {
-			$toggle=1;
-	  	}
-		$row_data{tab} = CGI::scrolling_list(-name=>'tab',
-					-id=>"tab$i",
-					-values=>['-1','0','1','2','3','4','5','6','7','8','9'],
-					-labels => {'-1' =>'ignore','0'=>'0','1'=>'1','2' =>'2','3'=>'3','4'=>'4',
-									'5' =>'5','6'=>'6','7'=>'7',
-									'8' =>'8','9'=>'9',},
-					-default=>$data->{'tab'},
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ohidden} = CGI::scrolling_list(-name=>'ohidden',
-					-id=>"ohidden$i",
-					-values=>['0','2'],
-					-labels => {'0'=>'Show',
-									'2' =>'Hide',
-									},
-					-default=>substr($data->{'hidden'},0,1),
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden',
-					-id=>"ihidden$i",
-					-values=>['0','2'],
-					-labels => {'0'=>'Show',
-									'2' =>'Hide',
-									},
-					-default=>substr($data->{'hidden'},1,1),
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ehidden} = CGI::scrolling_list(-name=>'ehidden',
-					-id=>"ehidden$i",
-					-values=>['0','1','2'],
-					-labels => {'0'=>'Show','1'=>'Show Collapsed',
-									'2' =>'Hide',
-									},
-					-default=>substr($data->{'hidden'},2,1),
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{tagsubfield} =$data->{'tagsubfield'}."<input type=\"hidden\" name=\"tagsubfield\" value=\"".$data->{'tagsubfield'}."\" id=\"tagsubfield\">";
-		$row_data{liblibrarian} = CGI::escapeHTML($data->{'liblibrarian'});
-		$row_data{libopac} = CGI::escapeHTML($data->{'libopac'});
-		$row_data{seealso} = CGI::escapeHTML($data->{'seealso'});
-		
-		$row_data{authorised_value}  = CGI::scrolling_list(-name=>'authorised_value',
-					-id=>'authorised_value',
-					-values=> \@authorised_values,
-					-default=>$data->{'authorised_value'},
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{value_builder}  = CGI::scrolling_list(-name=>'value_builder',
-					-id=>'value_builder',
-					-values=> \@value_builder,
-					-default=>$data->{'value_builder'},
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{authtypes}  = CGI::scrolling_list(-name=>'authtypecode',
-					-id=>'authtypecode',
-					-values=> \@authtypes,
-					-default=>$data->{'authtypecode'},
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{repeatable} = CGI::checkbox(-name=>"repeatable$i",
-	-checked => $data->{'repeatable'}?'checked':'',
-	-value => 1,
-	-label => '',
-	-id => "repeatable$i");
-		$row_data{mandatory} = CGI::checkbox(-name => "mandatory$i",
-	-checked => $data->{'mandatory'}?'checked':'',
-	-value => 1,
-	-label => '',
-	-id => "mandatory$i");
-		$row_data{hidden} = CGI::escapeHTML($data->{hidden});
-		$row_data{isurl} = CGI::checkbox( -name => "isurl$i",
-			-id => "isurl$i",
-			-checked => $data->{'isurl'}?'checked':'',
-			-value => 1,
-			-label => '');
-		$row_data{row} = $i;
-		$row_data{toggle} = $toggle;
-		$row_data{link} = CGI::escapeHTML($data->{'link'});
-		push(@loop_data, \%row_data);
-		$i++;
-	}
-	# add more_subfields empty lines for add if needed
-	for (my $i=1;$i<=$more_subfields;$i++) {
-		my %row_data;  # get a fresh hash for the row data
-		$row_data{tab} = CGI::scrolling_list(-name=>'tab',
-					-id => "tab$i",
-					-values=>['-1','0','1','2','3','4','5','6','7','8','9'],
-					-labels => {'-1' =>'ignore','0'=>'0','1'=>'1',
-									'2' =>'2','3'=>'3','4'=>'4',
-									'5' =>'5','6'=>'6','7'=>'7',
-									'8' =>'8','9'=>'9',
-									},
-					-default=>"",
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ohidden} = CGI::scrolling_list(-name=>'ohidden',
-					-id=>"ohidden$i",
-					-values=>['0','2'],
-					-labels => {'0'=>'Show','2' =>'Hide',},
-					-default=>"0",
-					-size=>1,
-					-multiple=>0,
-					);
-
-		$row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden',
-					-id=>"ihidden$i",
-					-values=>['0','2'],
-					-labels => {'0'=>'Show','2' =>'Hide',},
-					-default=>"0",
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ehidden} = CGI::scrolling_list(-name=>'ehidden',
-					-id=>"ehidden$i",
-					-values=>['0','1','2'],
-					-labels => {'0'=>'Show','1'=>'Show Collapsed',
-									'2' =>'Hide',
-									},
-					-default=>"0",
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{tagsubfield} = "<input type=\"text\" name=\"tagsubfield\" value=\"".$data->{'tagsubfield'}."\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\">";
-		$row_data{liblibrarian} = "";
-		$row_data{libopac} = "";
-		$row_data{seealso} = "";
-		$row_data{hidden} = "000";
-		$row_data{repeatable} = CGI::checkbox( -name=> 'repeatable',
-				-id => "repeatable$i",
-				-checked => '',
-				-value => 1,
-				-label => '');
-		$row_data{mandatory} = CGI::checkbox( -name=> 'mandatory',
-			-id => "mandatory$i",
-			-checked => '',
-			-value => 1,
-			-label => '');
-		$row_data{isurl} = CGI::checkbox(-name => 'isurl',
-			-id => "isurl$i",
-			-checked => '',
-			-value => 1,
-			-label => '');
-		
-		$row_data{authorised_value}  = CGI::scrolling_list(-name=>'authorised_value',
-					-id => 'authorised_value',
-					-values=> \@authorised_values,
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{authtypes}  = CGI::scrolling_list(-name=>'authtypecode',
-					-id => 'authtypecode',
-					-values=> \@authtypes,
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{link} = CGI::escapeHTML($data->{'link'});
-		$row_data{toggle} = $toggle;
-		$row_data{row} = $i;
-		push(@loop_data, \%row_data);
-	}
-	$template->param('use-heading-flags-p' => 1);
-	$template->param('heading-edit-subfields-p' => 1);
-	$template->param(action => "Edit subfields",
-							tagfield => "<input type=\"hidden\" name=\"tagfield\" value=\"$tagfield\">$tagfield",
-							loop => \@loop_data,
-							more_subfields => $more_subfields,
-							more_tag => $tagfield);
-
-												# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
-	$template->param(tagfield => "$input->param('tagfield')");
-	my $sth=$dbh->prepare("replace biblios_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,tab,seealso,authorised_value,authtypecode,value_builder,hidden,isurl,frameworkcode, link)
-									values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
-	my @tagsubfield	= $input->param('tagsubfield');
-	my @liblibrarian	= $input->param('liblibrarian');
-	my @libopac		= $input->param('libopac');
-
-	my @tab				= $input->param('tab');
-	my @seealso		= $input->param('seealso');
-#	my @hidden		= $input->param('hidden');
-	my @hidden;
-	my @ohidden		= $input->param('ohidden');
-	my @ihidden		= $input->param('ihidden');
-	my @ehidden		= $input->param('ehidden');
-	my @authorised_values	= $input->param('authorised_value');
-	my @authtypecodes	= $input->param('authtypecode');
-	my @value_builder	=$input->param('value_builder');
-	my @link		=$input->param('link');
-	for (my $i=0; $i<= $#tagsubfield ; $i++) {
-		my $tagfield			=$input->param('tagfield');
-		my $tagsubfield		=$tagsubfield[$i];
-		$tagsubfield="@" unless $tagsubfield ne '';
-		my $liblibrarian		=$liblibrarian[$i];
-		my $libopac			=$libopac[$i];
-		my $repeatable		=$input->param("repeatable$i")?1:0;
-		my $mandatory		=$input->param("mandatory$i")?1:0;
-	
-		my $tab				=$tab[$i];
-		my $seealso				=$seealso[$i];
-		my $authorised_value		=$authorised_values[$i];
-		my $authtypecode		=$authtypecodes[$i];
-		my $value_builder=$value_builder[$i];
-		my $hidden = $ohidden[$i].$ihidden[$i].$ehidden[$i]; #collate from 3 hiddens;
-		my $isurl = $input->param("isurl$i")?1:0;
-		my $link = $link[$i];
-		if ($liblibrarian) {
-			unless (C4::Context->config('demo') eq 1) {
-				$sth->execute ($tagfield,
-									$tagsubfield,
-									$liblibrarian,
-									$libopac,
-									$repeatable,
-									$mandatory,
-									
-									$tab,
-									$seealso,
-									$authorised_value,
-									$authtypecode,
-									$value_builder,
-									$hidden,
-									$isurl,
-									$frameworkcode,
-
-	 $link,
-					      );
-			}
-		}
-	}
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=biblios_subfields_structure.pl?tagfield=$tagfield&frameworkcode=$frameworkcode\"></html>";
-	exit;
-
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select * from biblios_subfield_structure where tagfield=? and tagsubfield=? and frameworkcode=?");
-	#FIXME : called with 2 bind variables when 3 are needed
-	$sth->execute($tagfield,$tagsubfield);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(liblibrarian => $data->{'liblibrarian'},
-							tagsubfield => $data->{'tagsubfield'},
-							delete_link => $script_name,
-							tagfield      =>$tagfield,
-							tagsubfield => $tagsubfield,
-							frameworkcode => $frameworkcode,
-							);
-													# 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') {
-	my $dbh = C4::Context->dbh;
-	unless (C4::Context->config('demo') eq 1) {
-		my $sth=$dbh->prepare("delete from biblios_subfield_structure where tagfield=? and tagsubfield=? and frameworkcode=?");
-		$sth->execute($tagfield,$tagsubfield,$frameworkcode);
-		$sth->finish;
-	}
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=biblios_subfields_structure.pl?tagfield=$tagfield&frameworkcode=$frameworkcode\"></html>";
-	exit;
-	$template->param(tagfield => $tagfield);
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	my $env;
-	my ($count,$results)=StringSearch($env,$tagfield,$frameworkcode);
-	my $toggle=1;
-	my @loop_data = ();
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-	  	if ($toggle eq 1){
-			$toggle=0;
-	  	} else {
-			$toggle=1;
-	  	}
-		my %row_data;  # get a fresh hash for the row data
-		$row_data{tagfield} = $results->[$i]{'tagfield'};
-		$row_data{tagsubfield} = $results->[$i]{'tagsubfield'};
-		$row_data{liblibrarian} = $results->[$i]{'liblibrarian'};
-		$row_data{repeatable} = $results->[$i]{'repeatable'};
-		$row_data{mandatory} = $results->[$i]{'mandatory'};
-		$row_data{tab} = $results->[$i]{'tab'};
-		$row_data{seealso} = $results->[$i]{'seealso'};
-		$row_data{authorised_value} = $results->[$i]{'authorised_value'};
-		$row_data{authtypecode}	= $results->[$i]{'authtypecode'};
-		$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{link}	= $results->[$i]{'link'};
-		$row_data{delete} = "$script_name?op=delete_confirm&amp;tagfield=$tagfield&amp;tagsubfield=".$results->[$i]{'tagsubfield'}."&frameworkcode=$frameworkcode";
-		$row_data{toggle} = $toggle;
-		if ($row_data{tab} eq -1) {
-			$row_data{subfield_ignored} = 1;
-		}
-
-		push(@loop_data, \%row_data);
-	}
-	$template->param(loop => \@loop_data);
-	$template->param(edit_tagfield => $tagfield,
-		edit_frameworkcode => $frameworkcode);
-	
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(prev =>"<a href=\"$script_name?offset=$prevpage\">");
-	}
-	if ($offset+$pagesize<$count) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(next => "<a href=\"$script_name?offset=$nextpage\">");
-	}
-} #---- 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;

Index: admin/bibliostagstructure.pl
===================================================================
RCS file: admin/bibliostagstructure.pl
diff -N admin/bibliostagstructure.pl
--- admin/bibliostagstructure.pl	1 Sep 2006 22:03:00 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,397 +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::Auth;
-use C4::Koha;
-use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Search;
-
-
-# retrieve parameters
-my $input = new CGI;
-my $frameworkcode = $input->param('frameworkcode'); # set to select framework
-$frameworkcode="" unless $frameworkcode;
-my $existingframeworkcode = $input->param('existingframeworkcode'); # set when we have to create a new framework (in frameworkcode) by copying an old one (in existingframeworkcode)
-$existingframeworkcode = "" unless $existingframeworkcode;
-my $frameworkinfo = getframeworkinfo($frameworkcode);
-my $searchfield=$input->param('searchfield');
-$searchfield=0 unless $searchfield;
-$searchfield=~ s/\,//g;
-
-my $offset=$input->param('offset');
-my $op = $input->param('op');
-my $dspchoice = $input->param('select_display');
-my $pagesize=20;
-
-my $script_name="/cgi-bin/koha/admin/bibliostagstructure.pl";
-
-my $dbh = C4::Context->dbh;
-
-# open template
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "admin/bibliostagstructure.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     debug => 1,
-			     });
-
-# get framework list
-my $frameworks = getframeworks();
-my @frameworkloop;
-foreach my $thisframeworkcode (keys %$frameworks) {
-	my $selected = 1 if $thisframeworkcode eq $frameworkcode;
-	my %row =(value => $thisframeworkcode,
-				selected => $selected,
-				frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
-			);
-	push @frameworkloop, \%row;
-}
-
-# check that framework is defined in biblios_tag_structure
-my $sth=$dbh->prepare("select count(*) from biblios_tag_structure where frameworkcode=?");
-$sth->execute($frameworkcode);
-my ($frameworkexist) = $sth->fetchrow;
-if ($frameworkexist) {
-} else {
-	# if frameworkcode does not exists, then OP must be changed to "create framework" if we are not on the way to create it
-	# (op = itemtyp_create_confirm)
-	if ($op eq "framework_create_confirm") {
-		duplicate_framework($frameworkcode, $existingframeworkcode);
-		$op=""; # unset $op to go back to framework list
-	} else {
-		$op = "framework_create";
-	}
-}
-$template->param(frameworkloop => \@frameworkloop,
-				frameworkcode => $frameworkcode,
-				frameworktext => $frameworkinfo->{frameworktext});
-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') {
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $data;
-	if ($searchfield) {
-		$sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from biblios_tag_structure where tagfield=? and frameworkcode=?");
-		$sth->execute($searchfield,$frameworkcode);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-	my $sth = $dbh->prepare("select distinct category from authorised_values");
-	$sth->execute;
-	my @authorised_values;
-	push @authorised_values,"";
-	while ((my $category) = $sth->fetchrow_array) {
-		push @authorised_values, $category;
-	}
-	my $authorised_value  = CGI::scrolling_list(-name=>'authorised_value',
-			-values=> \@authorised_values,
-			-size=>1,
-			-id=>"authorised_value",
-			-multiple=>0,
-			-default => $data->{'authorised_value'},
-			);
-
-	if ($searchfield) {
-		$template->param(action => "Modify tag",
-								searchfield => "<input type=\"hidden\" name=\"tagfield\" value=\"$searchfield\" />$searchfield");
-		$template->param('heading-modify-tag-p' => 1);
-	} else {
-		$template->param(action => "Add tag",
-								searchfield => "<input type=\"text\" name=\"tagfield\" size=\"5\" maxlength=\"3\" />");
-		$template->param('heading-add-tag-p' => 1);
-	}
-	$template->param('use-heading-flags-p' => 1);
-	$template->param(liblibrarian => $data->{'liblibrarian'},
-			libopac => $data->{'libopac'},
-			repeatable => CGI::checkbox(-name=>'repeatable',
-						-checked=> $data->{'repeatable'}?'checked':'',
-						-value=> 1,
-						-label => '',
-						-id=> 'repeatable'),
-			mandatory => CGI::checkbox(-name => 'mandatory',
-						-checked => $data->{'mandatory'}?'checked':'',
-						-value => 1,
-						-label => '',
-						-id => 'mandatory'),
-			authorised_value => $authorised_value,
-			frameworkcode => $frameworkcode,
-			);
-													# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	$sth=$dbh->prepare("replace biblios_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) values (?,?,?,?,?,?,?)");
-	my $tagfield       =$input->param('tagfield');
-	my $liblibrarian  = $input->param('liblibrarian');
-	my $libopac       =$input->param('libopac');
-	my $repeatable =$input->param('repeatable');
-	my $mandatory =$input->param('mandatory');
-	my $authorised_value =$input->param('authorised_value');
-	unless (C4::Context->config('demo') eq 1) {
-		$sth->execute($tagfield,
-							$liblibrarian,
-							$libopac,
-							$repeatable?1:0,
-							$mandatory?1:0,
-							$authorised_value,
-							$frameworkcode
-							);
-	}
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=bibliostagstructure.pl?searchfield=$tagfield&frameworkcode=$frameworkcode\"></html>";
-	exit;
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	$sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from biblios_tag_structure where tagfield=? and frameworkcode=?");
-	$sth->execute($searchfield,$frameworkcode);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(liblibrarian => $data->{'liblibrarian'},
-							searchfield => $searchfield,
-							frameworkcode => $frameworkcode,
-							);
-													# 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') {
-	unless (C4::Context->config('demo') eq 1) {
-		$dbh->do("delete from biblios_tag_structure where tagfield='$searchfield' and frameworkcode='$frameworkcode'");
-		$dbh->do("delete from biblios_subfield_structure where tagfield='$searchfield' and frameworkcode='$frameworkcode'");
-		
-	}
-													# END $OP eq DELETE_CONFIRMED
-################## ITEMTYPE_CREATE ##################################
-# called automatically if an unexisting  frameworkis selected
-} elsif ($op eq 'framework_create') {
-	$sth = $dbh->prepare("select count(*),biblios_tag_structure.frameworkcode,frameworktext from biblios_tag_structure,biblios_framework where biblios_framework.frameworkcode=biblios_tag_structure.frameworkcode group by biblios_tag_structure.frameworkcode");
-	$sth->execute;
-	my @existingframeworkloop;
-	while (my ($tot,$thisframeworkcode,$frameworktext) = $sth->fetchrow) {
-		if ($tot>0) {
-			my %line = ( value => $thisframeworkcode,
-						frameworktext => $frameworktext,
-					);
-			push @existingframeworkloop,\%line;
-		}
-	}
-	$template->param(existingframeworkloop => \@existingframeworkloop,
-					frameworkcode => $frameworkcode,
-# 					FRtext => $frameworkinfo->{frameworktext},
-					);
-################## DEFAULT ##################################
-} else { # DEFAULT
-	# here, $op can be unset or set to "framework_create_confirm".
-	if  ($searchfield ne '') {
-		 $template->param(searchfield => $searchfield);
-	}
-	my $cnt=0;
-	if ($dspchoice) {
-		#here, user only wants used tags/subfields displayed
-		my $env;
-		$searchfield=~ s/\'/\\\'/g;
-		my @data=split(' ',$searchfield);
-		my $sth=$dbh->prepare("Select biblios_tag_structure.tagfield as mts_tagfield,biblios_tag_structure.liblibrarian as mts_liblibrarian,biblios_tag_structure.libopac as mts_libopac,biblios_tag_structure.repeatable as mts_repeatable,biblios_tag_structure.mandatory as mts_mandatory,biblios_tag_structure.authorised_value as mts_authorized_value,biblios_subfield_structure.* from biblios_tag_structure LEFT JOIN biblios_subfield_structure ON (biblios_tag_structure.tagfield=biblios_subfield_structure.tagfield AND biblios_tag_structure.frameworkcode=biblios_subfield_structure.frameworkcode) where (biblios_tag_structure.tagfield >= ? and biblios_tag_structure.frameworkcode=?) AND biblios_subfield_structure.tab>=0 order by biblios_tag_structure.tagfield,biblios_subfield_structure.tagsubfield");
-		#could be ordoned by tab
-		$sth->execute($data[0], $frameworkcode);
-		my @results = ();
-		while (my $data=$sth->fetchrow_hashref){
-			push(@results,$data);
-			$cnt++;
-		}
-		$sth->finish;
-		
-		my $toggle=0;
-		my @loop_data = ();
-		my $j=1;
-		my $i=$offset;
-		while ($i < ($offset+$pagesize<$cnt?$offset+$pagesize:$cnt)) {
-			if ($toggle eq 0){
-				$toggle=1;
-			} else {
-				$toggle=0;
-			}
-			my %row_data;  # get a fresh hash for the row data
-			$row_data{tagfield} = $results[$i]->{'mts_tagfield'};
-			$row_data{liblibrarian} = $results[$i]->{'mts_liblibrarian'};
-			$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} ="biblios_subfields_structure.pl?op=add_form&tagfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
-			$row_data{edit} = "$script_name?op=add_form&amp;searchfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
-			$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
-			$row_data{toggle} = $toggle;
-			$j=$i;
-			my @internal_loop = ();
-			while (($results[$i]->{'tagfield'}==$results[$j]->{'tagfield'}) and ($j< ($offset+$pagesize<$cnt?$offset+$pagesize:$cnt))) {
-				if ($toggle eq 0) {
-					$toggle=1;
-				} else {
-					$toggle=0;
-				}
-				my %subfield_data;
-				$subfield_data{tagsubfield} = $results[$j]->{'tagsubfield'};
-				$subfield_data{liblibrarian} = $results[$j]->{'liblibrarian'};
-				$subfield_data{repeatable} = $results[$j]->{'repeatable'};
-				$subfield_data{mandatory} = $results[$j]->{'mandatory'};
-				$subfield_data{tab} = $results[$j]->{'tab'};
-				$subfield_data{seealso} = $results[$j]->{'seealso'};
-				$subfield_data{authorised_value} = $results[$j]->{'authorised_value'};
-				$subfield_data{authtypecode}= $results[$j]->{'authtypecode'};
-				$subfield_data{value_builder}= $results[$j]->{'value_builder'};
-				$subfield_data{toggle}	= $toggle;
-# 				warn "tagfield :  ".$results[$j]->{'tagfield'}." tagsubfield :".$results[$j]->{'tagsubfield'};
-				push @internal_loop,\%subfield_data;
-				$j++;
-			}
-			$row_data{'subfields'}=\@internal_loop;
-			push(@loop_data, \%row_data);
-#			undef @internal_loop;
-			$i=$j;
-		}
-		$template->param(select_display => "True",
-						loop => \@loop_data);
-		#  $sth->execute;
-		$sth->finish;
-	} else {
-		#here, normal old style : display every tags
-		my $env;
-		my ($count,$results)=StringSearch($env,$searchfield,$frameworkcode);
-		$cnt = $count;
-		my $toggle=0;
-		my @loop_data = ();
-		for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-			if ($toggle eq 0){
-				$toggle=1;
-			} else {
-				$toggle=0;
-			}
-			my %row_data;  # get a fresh hash for the row data
-			$row_data{tagfield} = $results->[$i]{'tagfield'};
-			$row_data{liblibrarian} = $results->[$i]{'liblibrarian'};
-			$row_data{repeatable} = $results->[$i]{'repeatable'};
-			$row_data{mandatory} = $results->[$i]{'mandatory'};
-			$row_data{authorised_value} = $results->[$i]{'authorised_value'};
-			$row_data{subfield_link} ="biblios_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
-			$row_data{edit} = "$script_name?op=add_form&amp;searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
-			$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
-			$row_data{toggle} = $toggle;
-			push(@loop_data, \%row_data);
-		}
-		$template->param(loop => \@loop_data);
-	}
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(isprevpage => $offset,
-						prevpage=> $prevpage,
-						searchfield => $searchfield,
-						script_name => $script_name,
-						frameworkcode => $frameworkcode,
-		);
-	}
-	if ($offset+$pagesize<$cnt) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(nextpage =>$nextpage,
-						searchfield => $searchfield,
-						script_name => $script_name,
-						frameworkcode => $frameworkcode,
-		);
-	}
-} #---- END $OP eq DEFAULT
-
-$template->param(loggeninuser => $loggedinuser,
-		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-		);
-output_html_with_http_headers $input, $cookie, $template->output;
-
-
-#
-# the sub used for searches
-#
-sub StringSearch  {
-	my ($env,$searchstring,$frameworkcode)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from biblios_tag_structure where (tagfield >= ? and frameworkcode=?) order by tagfield");
-	$sth->execute($data[0], $frameworkcode);
-	my @results;
-	while (my $data=$sth->fetchrow_hashref){
-	push(@results,$data);
-	}
-	#  $sth->execute;
-	$sth->finish;
-	return (scalar(@results),\@results);
-}
-
-#
-# the sub used to duplicate a framework from an existing one in MARC parameters tables.
-#
-sub duplicate_framework {
-	my ($newframeworkcode,$oldframeworkcode) = @_;
-	my $sth = $dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from biblios_tag_structure where frameworkcode=?");
-	$sth->execute($oldframeworkcode);
-	my $sth_insert = $dbh->prepare("insert into biblios_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode) values (?,?,?,?,?,?,?)");
-	while ( my ($tagfield,$liblibrarian,$libopac,$repeatable,$mandatory,$authorised_value) = $sth->fetchrow) {
-		$sth_insert->execute($tagfield,$liblibrarian,$libopac,$repeatable,$mandatory,$authorised_value,$newframeworkcode);
-	}
-
-	$sth = $dbh->prepare("select frameworkcode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,tab,authorised_value,authtypecode,value_builder,seealso from biblios_subfield_structure where frameworkcode=?");
-	$sth->execute($oldframeworkcode);
-	$sth_insert = $dbh->prepare("insert into biblios_subfield_structure (frameworkcode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,tab,authorised_value,authtypecode,value_builder,seealso) values (?,?,?,?,?,?,?,?,?,?,?,?)");
-	while ( my ($frameworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory,  $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso) = $sth->fetchrow) {
-	    $sth_insert->execute($newframeworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso);
-	}
-	
-## now the same for holdings
-	$sth = $dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from holdings_tag_structure where frameworkcode=?");
-	$sth->execute($oldframeworkcode);
-	my $sth_insert = $dbh->prepare("insert into holdings_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode) values (?,?,?,?,?,?,?)");
-	while ( my ($tagfield,$liblibrarian,$libopac,$repeatable,$mandatory,$authorised_value) = $sth->fetchrow) {
-		$sth_insert->execute($tagfield,$liblibrarian,$libopac,$repeatable,$mandatory,$authorised_value,$newframeworkcode);
-	}
-
-	$sth = $dbh->prepare("select frameworkcode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,tab,authorised_value,authtypecode,value_builder,seealso from holdings_subfield_structure where frameworkcode=?");
-	$sth->execute($oldframeworkcode);
-	$sth_insert = $dbh->prepare("insert into holdings_subfield_structure (frameworkcode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,tab,authorised_value,authtypecode,value_builder,seealso) values (?,?,?,?,?,?,?,?,?,?,?,?)");
-	while ( my ($frameworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory,  $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso) = $sth->fetchrow) {
-	    $sth_insert->execute($newframeworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso);
-	}
-}
-

Index: admin/branches.pl
===================================================================
RCS file: admin/branches.pl
diff -N admin/branches.pl
--- admin/branches.pl	11 Sep 2006 17:41:54 -0000	1.37
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,509 +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::Auth;
-use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Search;
-# Fixed variables
-my $linecolor1='#ffffcc';
-my $linecolor2='white';
-
-my $script_name="/cgi-bin/koha/admin/branches.pl";
-my $pagesize=20;
-
-
-#######################################################################################
-# Main loop....
-my $input = new CGI;
-my $branchcode=$input->param('branchcode');
-my $branchname=$input->param('branchname');
-my $categorycode = $input->param('categorycode');
-my $op = $input->param('op');
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/branches.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1, management => 1},
-			     debug => 1,
-			     });
-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
-}
-$template->param(action => $script_name);
-if ($op eq 'add') {
-	# If the user has pressed the "add new branch" button.
-	heading("Branches: Add Branch");
-	$template->param('heading-branches-add-branch-p' => 1);
-	$template->param('use-heading-flags-p' => 1);
-	editbranchform();
-
-} elsif ($op eq 'edit') {
-	# if the user has pressed the "edit branch settings" button.
-	heading("Branches: Edit Branch");
-	$template->param('heading-branches-edit-branch-p' => 1);
-	$template->param('use-heading-flags-p' => 1);
-	$template->param(add => 1);
-	editbranchform($branchcode);
-} elsif ($op eq 'add_validate') {
-	# confirm settings change...
-	my $params = $input->Vars;
-	unless ($params->{'branchcode'} && $params->{'branchname'}) {
-		default ("Cannot change branch record: You must specify a Branchname and a Branchcode");
-	} else {
-		setbranchinfo($params);
-		$template->param(else => 1);
-		default ("Branch record changed for branch: $params->{'branchname'}");
-	}
-} elsif ($op eq 'delete') {
-	# if the user has pressed the "delete branch" button.
-	my $message = checkdatabasefor($branchcode);
-	if ($message) {
-		$template->param(else => 1);
-		default($message);
-	} else {
-		$template->param(branchname => $branchname);
-		$template->param(delete_confirm => 1);
-		$template->param(branchcode => $branchcode);
-	}
-} elsif ($op eq 'delete_confirmed') {
-	# actually delete branch and return to the main screen....
-	deletebranch($branchcode);
-	$template->param(else => 1);
-	default("The branch \"$branchname\" ($branchcode) has been deleted.");
-} elsif ($op eq 'editcategory') {
-	# If the user has pressed the "add new category" or "modify" buttons.
-	heading("Branches: Edit Category");
-	$template->param('heading-branches-edit-category-p' => 1);
-	$template->param('use-heading-flags-p' => 1);
-	editcatform($categorycode);
-} elsif ($op eq 'addcategory_validate') {
-	# confirm settings change...
-	my $params = $input->Vars;
-	unless ($params->{'categorycode'} && $params->{'categoryname'}) {
-		default ("Cannot change branch record: You must specify a Branchname and a Branchcode");
-	} else {
-		setcategoryinfo($params);
-		$template->param(else => 1);
-		default ("Category record changed for category $params->{'categoryname'}");
-	}
-} elsif ($op eq 'delete_category') {
-	# if the user has pressed the "delete branch" button.
-	my $message = checkcategorycode($categorycode);
-	if ($message) {
-		$template->param(else => 1);
-		default($message);
-	} else {
-		$template->param(delete_category => 1);
-		$template->param(categorycode => $categorycode);
-	}
-} elsif ($op eq 'categorydelete_confirmed') {
-	# actually delete branch and return to the main screen....
-	deletecategory($categorycode);
-	$template->param(else => 1);
-	default("The category with code $categorycode has been deleted.");
-
-} else {
-	# if no operation has been set...
-	default();
-}
-
-
-
-######################################################################################################
-#
-# html output functions....
-
-sub default {
-	my ($message) = @_;
-	heading("Branches");
-	$template->param('heading-branches-p' => 1);
-	$template->param('use-heading-flags-p' => 1);
-	$template->param(message => $message);
-	$template->param(action => $script_name);
-	branchinfotable();
-}
-
-# FIXME: this function should not exist; otherwise headings are untranslatable
-sub heading {
-	my ($head) = @_;
-	$template->param(head => $head);
-}
-
-sub editbranchform {
-	# prepares the edit form...
-	my ($branchcode) = @_;
-	my $data;
-	if ($branchcode) {
-		$data = getbranchinfo($branchcode);
-		$data = $data->[0];
-		$template->param(branchcode => $data->{'branchcode'});
-		$template->param(branchname => $data->{'branchname'});
-		$template->param(branchaddress1 => $data->{'branchaddress1'});
-		$template->param(branchaddress2 => $data->{'branchaddress2'});
-		$template->param(branchaddress3 => $data->{'branchaddress3'});
-		$template->param(branchphone => $data->{'branchphone'});
-		$template->param(branchfax => $data->{'branchfax'});
-		$template->param(branchemail => $data->{'branchemail'});
-    }
-
-    # make the checkboxs.....
-    #
-    # We export a "categoryloop" array to the template, each element of which
-    # contains separate 'categoryname', 'categorycode', 'codedescription', and
-    # 'checked' fields. The $checked field is either '' or 'checked'
-    # (see bug 130)
-    #
-    my $catinfo = getcategoryinfo();
-    my $catcheckbox;
-#    print DEBUG "catinfo=".cvs($catinfo)."\n";
-    my @categoryloop = ();
-    foreach my $cat (@$catinfo) {
-	my $checked = "";
-	my $tmp = quotemeta($cat->{'categorycode'});
-	if (grep {/^$tmp$/} @{$data->{'categories'}}) {
-		$checked = "checked=\"checked\"";
-	}
-	push @categoryloop, {
-		categoryname    => $cat->{'categoryname'},
-		categorycode    => $cat->{'categorycode'},
-		codedescription => $cat->{'codedescription'},
-		checked         => $checked,
-	    };
-	}
-	$template->param(categoryloop => \@categoryloop);
-
-    # {{{ Leave this here until bug 130 is completely resolved in the templates
-	for my $obsolete ('categoryname', 'categorycode', 'codedescription') {
-		$template->param($obsolete => 'Your template is out of date (bug 130)');
-	}
-    # }}}
-}
-
-sub editcatform {
-	# prepares the edit form...
-	my ($categorycode) = @_;
-	warn "cat : $categorycode";
-	my $data;
-	if ($categorycode) {
-		$data = getcategoryinfo($categorycode);
-		$data = $data->[0];
-		$template->param(categorycode => $data->{'categorycode'});
-		$template->param(categoryname => $data->{'categoryname'});
-		$template->param(codedescription => $data->{'codedescription'});
-    }
-}
-
-sub deleteconfirm {
-# message to print if the
-    my ($branchcode) = @_;
-}
-
-
-sub branchinfotable {
-# makes the html for a table of branch info from reference to an array of hashs.
-
-	my ($branchcode) = @_;
-	my $branchinfo;
-	if ($branchcode) {
-		$branchinfo = getbranchinfo($branchcode);
-	} else {
-		$branchinfo = getbranchinfo();
-	}
-	my $color;
-	my @loop_data =();
-	foreach my $branch (@$branchinfo) {
-		($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
-		#
-		# We export the following fields to the template. These are not
-		# pre-composed as a single "address" field because the template
-		# might (and should) escape what is exported here. (See bug 180)
-		#
-		# - color
-		# - branch_name     (Note: not "branchname")
-		# - branch_code     (Note: not "branchcode")
-		# - address         (containing a static error message)
-		# - branchaddress1 \
-		# - branchaddress2  |
-		# - branchaddress3  | comprising the old "address" field
-		# - branchphone     |
-		# - branchfax       |
-		# - branchemail    /
-		# - address-empty-p (1 if no address information, 0 otherwise)
-		# - categories      (containing a static error message)
-		# - category_list   (loop containing "categoryname")
-		# - no-categories-p (1 if no categories set, 0 otherwise)
-		# - value
-		# - action
-		#
-		my %row = ();
-
-		# Handle address fields separately
-		my $address_empty_p = 1;
-		for my $field ('branchaddress1', 'branchaddress2', 'branchaddress3',
-			'branchphone', 'branchfax', 'branchemail') {
-			$row{$field} = $branch->{$field};
-			if ( $branch->{$field} ) {
-				$address_empty_p = 0;
-			}
-		}
-		$row{'address-empty-p'} = $address_empty_p;
-		# {{{ Leave this here until bug 180 is completely resolved in templates
-		$row{'address'} = 'Your template is out of date (see bug 180)';
-		# }}}
-
-		# Handle categories
-		my $no_categories_p = 1;
-		my @categories = '';
-		foreach my $cat (@{$branch->{'categories'}}) {
-			my ($catinfo) = @{getcategoryinfo($cat)};
-			push @categories, {'categoryname' => $catinfo->{'categoryname'}};
-			$no_categories_p = 0;
-		}
-		# {{{ Leave this here until bug 180 is completely resolved in templates
-		$row{'categories'} = 'Your template is out of date (see bug 180)';
-		# }}}
-		$row{'category_list'} = \@categories;
-		$row{'no-categories-p'} = $no_categories_p;
-
-		# Handle all other fields
-		$row{'branch_name'} = $branch->{'branchname'};
-		$row{'branch_code'} = $branch->{'branchcode'};
-		$row{'color'} = $color;
-		$row{'value'} = $branch->{'branchcode'};
-		$row{'action'} = '/cgi-bin/koha/admin/branches.pl';
-
-		push @loop_data, { %row };
-	}
-	my @branchcategories =();
-	my $catinfo = getcategoryinfo();
-	foreach my $cat (@$catinfo) {
-		push @branchcategories, {
-			categoryname    => $cat->{'categoryname'},
-			categorycode    => $cat->{'categorycode'},
-			codedescription => $cat->{'codedescription'},
-		};
-	}
-
-	$template->param(branches => \@loop_data,
-							branchcategories => \@branchcategories);
-
-}
-
-# FIXME logic seems wrong
-sub branchcategoriestable {
-#Needs to be implemented...
-
-    my $categoryinfo = getcategoryinfo();
-    my $color;
-    foreach my $cat (@$categoryinfo) {
-	($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
-	$template->param(color => $color);
-	$template->param(categoryname => $cat->{'categoryname'});
-	$template->param(categorycode => $cat->{'categorycode'});
-	$template->param(codedescription => $cat->{'codedescription'});
-    }
-}
-
-######################################################################################################
-#
-# Database functions....
-
-sub getbranchinfo {
-# returns a reference to an array of hashes containing branches,
-
-    my ($branchcode) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth;
-    if ($branchcode) {
-		$sth = $dbh->prepare("Select * from branches where branchcode = ? order by branchcode");
-		$sth->execute($branchcode);
-    } else {
-		$sth = $dbh->prepare("Select * from branches order by branchcode");
-		$sth->execute();
-    }
-    my @results;
-    while (my $data = $sth->fetchrow_hashref) {
-	my $nsth = $dbh->prepare("select categorycode from branchrelations where branchcode = ?");
-	$nsth->execute($data->{'branchcode'});;
-	my @cats = ();
-	while (my ($cat) = $nsth->fetchrow_array) {
-	    push(@cats, $cat);
-	}
-	$nsth->finish;
-	$data->{'categories'} = \@cats;
-	push(@results, $data);
-    }
-    $sth->finish;
-    return \@results;
-}
-
-# FIXME This doesn't belong here; it should be moved into a module
-sub getcategoryinfo {
-# returns a reference to an array of hashes containing branches,
-	my ($catcode) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth;
-	#    print DEBUG "getcategoryinfo: entry: catcode=".cvs($catcode)."\n";
-	if ($catcode) {
-		$sth = $dbh->prepare("select * from branchcategories where categorycode = ?");
-		$sth->execute($catcode);
-	} else {
-		$sth = $dbh->prepare("Select * from branchcategories");
-		$sth->execute();
-	}
-	my @results;
-	while (my $data = $sth->fetchrow_hashref) {
-		push(@results, $data);
-	}
-	$sth->finish;
-	#    print DEBUG "getcategoryinfo: exit: returning ".cvs(\@results)."\n";
-	return \@results;
-}
-
-# FIXME This doesn't belong here; it should be moved into a module
-sub setbranchinfo {
-# sets the data from the editbranch form, and writes to the database...
-	my ($data) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("replace branches (branchcode,branchname,branchaddress1,branchaddress2,branchaddress3,branchphone,branchfax,branchemail) values (?,?,?,?,?,?,?,?)");
-	$sth->execute(uc($data->{'branchcode'}), $data->{'branchname'},
-		$data->{'branchaddress1'}, $data->{'branchaddress2'},
-		$data->{'branchaddress3'}, $data->{'branchphone'},
-		$data->{'branchfax'}, $data->{'branchemail'});
-
-	$sth->finish;
-	# sort out the categories....
-	my @checkedcats;
-	my $cats = getcategoryinfo();
-	foreach my $cat (@$cats) {
-		my $code = $cat->{'categorycode'};
-		if ($data->{$code}) {
-			push(@checkedcats, $code);
-		}
-	}
-	my $branchcode =uc($data->{'branchcode'});
-	my $branch = getbranchinfo($branchcode);
-	$branch = $branch->[0];
-	my $branchcats = $branch->{'categories'};
-	my @addcats;
-	my @removecats;
-	foreach my $bcat (@$branchcats) {
-		unless (grep {/^$bcat$/} @checkedcats) {
-			push(@removecats, $bcat);
-		}
-	}
-	foreach my $ccat (@checkedcats){
-		unless (grep {/^$ccat$/} @$branchcats) {
-			push(@addcats, $ccat);
-		}
-	}
-	foreach my $cat (@addcats) {
-		my $sth = $dbh->prepare("insert into branchrelations (branchcode, categorycode) values(?, ?)");
-		$sth->execute($branchcode, $cat);
-		$sth->finish;
-	}
-	foreach my $cat (@removecats) {
-		my $sth = $dbh->prepare("delete from branchrelations where branchcode=? and categorycode=?");
-		$sth->execute($branchcode, $cat);
-		$sth->finish;
-	}
-}
-
-sub deletebranch {
-# delete branch...
-    my ($branchcode) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("delete from branches where branchcode = ?");
-    $sth->execute($branchcode);
-    $sth->finish;
-}
-
-sub setcategoryinfo {
-# sets the data from the editbranch form, and writes to the database...
-	my ($data) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("replace branchcategories (categorycode,categoryname,codedescription) values (?,?,?)");
-	$sth->execute(uc($data->{'categorycode'}), $data->{'categoryname'},$data->{'codedescription'});
-
-	$sth->finish;
-}
-sub deletecategory {
-# delete branch...
-    my ($categorycode) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("delete from branchcategories where categorycode = ?");
-    $sth->execute($categorycode);
-    $sth->finish;
-}
-
-sub checkdatabasefor {
-# check to see if the branchcode is being used in the database somewhere....
-    my ($branchcode) = @_;
-my @kohafield;
-my @value;
-my @relation;
-my @and_or;
- push @kohafield, "holdingbranch","homebranch";
-push @value, $branchcode,$branchcode;
-push @and_or, "\@or";
-push @relation ,"\@attr 5=100","\@attr 5=100"; ##do not truncate
-    my ($total, at results) =ZEBRAsearch_kohafields(\@kohafield,\@value, \@relation,"", \@and_or);
-   
-    my $message;
-    if ($total) {
-	# We do not return verbal messages but a flag. fix templates to accept $error=1 as a message
-	$message = "Branch cannot be deleted because there are $total items using that branch.";
-	
-    }
-    return $message;
-}
-
-sub checkcategorycode {
-# check to see if the branchcode is being used in the database somewhere....
-    my ($categorycode) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth=$dbh->prepare("select count(*) from branchrelations where categorycode=?");
-    $sth->execute($categorycode);
-    my ($total) = $sth->fetchrow_array;
-    $sth->finish;
-    my $message;
-    if ($total) {
-	# FIXME: need to be replaced by an exported boolean parameter
-	$message = "Category cannot be deleted because there are $total branches using that category.";
-    }
-    return $message;
-}
-
-output_html_with_http_headers $input, $cookie, $template->output;
-
-# Local Variables:
-# tab-width: 8
-# End:

Index: admin/categorie.pl
===================================================================
RCS file: admin/categorie.pl
diff -N admin/categorie.pl
--- admin/categorie.pl	1 Sep 2006 22:03:00 -0000	1.24
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,212 +0,0 @@
-#!/usr/bin/perl
-
-#script to administer the categories table
-#written 20/02/2002 by paul.poulain at free.fr
-
-# 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::Output;
-use C4::Search;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-sub StringSearch  {
-	my ($env,$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');
-
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "admin/categorie.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     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,enrolmentfee,issuelimit,reservefee,overduenoticerequired, canmakepublicshelves, addRequestToShelves, allowrenewsfromopac 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'},
-				enrolmentfee            => $data->{'enrolmentfee'},
-				overduenoticerequired   => $data->{'overduenoticerequired'},
-				issuelimit              => $data->{'issuelimit'},
-				reservefee              => $data->{'reservefee'},
-				canmakepublicshelves	=> $data->{'canmakepublicshelves'},
-				addRequestToShelves		=> $data->{'addRequestToShelves'},
-				allowrenewsfromopac		=> $data->{'allowrenewsfromopac'}
-	);
-													# 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,enrolmentfee,reservefee,overduenoticerequired, issuelimit, canmakepublicshelves, addRequestToShelves , allowrenewsfromopac) values (?,?,?,?,?,?,?,?,?,?,?,?)");
-	$sth->execute(map { $input->param($_) } ('categorycode','description','enrolmentperiod','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','overduenoticerequired', 'issuelimit', 'canmakepublicshelves', 'addRequestToShelves', 'allowrenewsfromopac'));
-	$sth->finish;
-	
-													# 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 borrowers where categorycode=?");
-	$sth->execute($categorycode);
-	my $total = $sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(total => $total->{'total'});
-	
-	my $sth2=$dbh->prepare("select categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,enrolmentfee,issuelimit,reservefee,overduenoticerequired, canmakepublicshelves, addRequestToShelves,allowrenewsfromopac  from categories where categorycode=?");
-	$sth2->execute($categorycode);
-	my $data=$sth2->fetchrow_hashref;
-	$sth2->finish;
-	if ($total->{'total'} >0) {
-		$template->param(totalgtzero => 1);
-	}
-
-        $template->param(description             => $data->{'description'},
-                                enrolmentperiod         => $data->{'enrolmentperiod'},
-                                upperagelimit           => $data->{'upperagelimit'},
-                                dateofbirthrequired     => $data->{'dateofbirthrequired'},
-                                enrolmentfee            => $data->{'enrolmentfee'},
-                                overduenoticerequired   => $data->{'overduenoticerequired'},
-                                issuelimit              => $data->{'issuelimit'},
-                                reservefee              => $data->{'reservefee'},
-								canmakepublicshelves    => $data->{'canmakepublicshelves'},
-								addRequestToShelves		=> $data->{'addRequestToShelves'},
-								allowrenewsfromopac     => $data->{'allowrenewsfromopac'},
-		
-		);
-
-
-													# 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 $env;
-	my @loop;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my $toggle = 0;
-	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'},
-				enrolmentfee => $results->[$i]{'enrolmentfee'},
-				overduenoticerequired => $results->[$i]{'overduenoticerequired'},
-				issuelimit => $results->[$i]{'issuelimit'},
-				reservefee => $results->[$i]{'reservefee'},
-				canmakepublicshelves => $results->[$i]{'canmakepublicshelves'},
-				addRequestToShelves		=> $results->[$i]{'addRequestToShelves'},
-				allowrenewsfromopac => $results->[$i]{'allowrenewsfromopac'},
-				toggle => $toggle );	
-		push @loop, \%row;
-		$toggle = not $toggle;
-	}
-	$template->param(loop => \@loop);
-	# check that I (institution) and C (child) exists. otherwise => warning to the user
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select categorycode from categories where categorycode='C'");
-	$sth->execute;
-	my ($categoryChild) = $sth->fetchrow;
-	$template->param(categoryChild => $categoryChild);
-	$sth=$dbh->prepare("select categorycode from categories where categorycode='I'");
-	$sth->execute;
-	my ($categoryInstitution) = $sth->fetchrow;
-	$template->param(categoryInstitution => $categoryInstitution);
-	$sth->finish;
-
-
-} #---- END $OP eq DEFAULT
-
-
-
-output_html_with_http_headers $input, $cookie, $template->output;
-

Index: admin/categoryitem.pl
===================================================================
RCS file: admin/categoryitem.pl
diff -N admin/categoryitem.pl
--- admin/categoryitem.pl	1 Sep 2006 22:03:00 -0000	1.12
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,200 +0,0 @@
-#!/usr/bin/perl
-
-#script to administer the categories table
-#written 20/02/2002 by paul.poulain at 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::Output;
-use C4::Search;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-sub StringSearch  {
-	my ($env,$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 "<form action='$script_name' method=post>";
-	print "<input type=submit value=OK>";
-	print "</form>";
-													# 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'}<br>";
-	$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 $env;
-        my @loop;
-        my ($count,$results)=StringSearch($env,$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
-
-output_html_with_http_headers $input, $cookie, $template->output;
-
-
-

Index: admin/checkmarc.pl
===================================================================
RCS file: admin/checkmarc.pl
diff -N admin/checkmarc.pl
--- admin/checkmarc.pl	1 Sep 2006 22:03:00 -0000	1.10
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,136 +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 C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Auth;
-use CGI;
-use C4::Search;
-use C4::Context;
-use C4::Biblio;
-
-my $input = new CGI;
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/checkmarc.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     debug => 1,
-			     });
-
-my $dbh = C4::Context->dbh;
-my $total;
-# checks itemnumber field
-my $sth = $dbh->prepare("select tagfield from koha_attr where marctokoha=\"itemnumber\"");
-$sth->execute;
-my ($res) = $sth->fetchrow;
-unless ($res) {
-	$template->param(itemnumber => 1);
-	$total++;
-}
-#check biblionumber
-my $sth = $dbh->prepare("select tagfield from koha_attr where marctokoha=\"biblionumber\"");
-$sth->execute;
-my ($res) = $sth->fetchrow;
-if ($res ){
-	($res) = $sth->fetchrow;
-	unless ($res){
-	$template->param(biblionumber => 1);
-	$total++;
-	}
-}
-#check barcode
-my $sth = $dbh->prepare("select tagfield from koha_attr where marctokoha=\"barcode\"");
-$sth->execute;
-my ($res) = $sth->fetchrow;
-unless ($res){
-	$template->param(barcode=> 1);
-	$total++;
-}
-#check isbn
-my $sth = $dbh->prepare("select tagfield from koha_attr where marctokoha=\"isbn\"");
-$sth->execute;
-my ($res) = $sth->fetchrow;
-unless ($res){
-	$template->param(isbn => 1);
-	$total++;
-}
-## Check for itemtype
-my $sth = $dbh->prepare("select tagfield,tagsubfield from koha_attr where marctokoha=\"itemtype\"");
-$sth->execute;
-my ($res,$res2) = $sth->fetchrow;
-if ($res) {
-$sth = $dbh->prepare("select authorised_value from biblios_subfield_structure where tagfield=? and tagsubfield=?");
-$sth->execute($res,$res2);
- my ($item)=$sth->fetchrow;
-    unless ($item eq "itemtypes"){
-	$template->param(itemtype => 1);
-	$total++;
-    }
-}
-
-## Check for homebranch
-my $sth = $dbh->prepare("select tagfield from koha_attr where marctokoha=\"homebranch\"");
-$sth->execute;
-my ($res) = $sth->fetchrow;
-unless  ($res) {
-	$template->param(branch => 1);
-	$total++;
-    
-}
-
-## Check for holdingbranch
-my $sth = $dbh->prepare("select tagfield,tagsubfield from koha_attr where marctokoha=\"holdingbranch\"");
-$sth->execute;
-my ($res,$res2) = $sth->fetchrow;
-if ($res) {
-$sth = $dbh->prepare("select authorised_value from biblios_subfield_structure where tagfield=? and tagsubfield=?");
-$sth->execute($res,$res2);
- my ($item)=$sth->fetchrow;
-    unless ($item eq "branches"){
-	$template->param(holdingbranch => 1);
-	$total++;
-    }
-}
-
-
-
-# checks that itemtypes & branches tables are not empty
-$sth = $dbh->prepare("select count(*) from itemtypes");
-$sth->execute;
-($res) = $sth->fetchrow;
-unless ($res) {
-	$template->param(itemtypes_empty =>1);
-	$total++;
-}
-
-$sth = $dbh->prepare("select count(*) from branches");
-$sth->execute;
-($res) = $sth->fetchrow;
-unless ($res) {
-	$template->param(branches_empty =>1);
-	$total++;
-}
-
-$template->param(total => $total);
-output_html_with_http_headers $input, $cookie, $template->output;

Index: admin/cities.pl
===================================================================
RCS file: admin/cities.pl
diff -N admin/cities.pl
--- admin/cities.pl	23 May 2006 11:44:23 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,167 +0,0 @@
-#! /usr/bin/perl
-
-# Copyright 2006 SAN OUEST-PROVENCE et Paul POULAIN
-#
-# 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::Search;
-use HTML::Template;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from cities where (city_name 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('city_name');
-my $script_name="/cgi-bin/koha/admin/cities.pl";
-my $cityid=$input->param('cityid');
-my $op = $input->param('op');
-
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "admin/cities.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1, management => 1},
-			     debug => 1,
-			     });
-
-
-$template->param(	script_name => $script_name,
-		 	cityid     => $cityid ,
-		 	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 ($cityid) {
-		my $dbh = C4::Context->dbh;
-		my $sth=$dbh->prepare("select cityid,city_name,city_zipcode from cities where  cityid=?");
-		$sth->execute($cityid);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-
-	$template->param(	
-				city_name       => $data->{'city_name'},
-				city_zipcode    => $data->{'city_zipcode'});
-##############ICI#####################
-# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
- 	my $sth;
-	
-	if ($input->param('cityid') ){
-		$sth=$dbh->prepare("replace cities (cityid,city_name,city_zipcode) values (?,?,?) ");
-		$sth->execute(map { $input->param($_) } ('cityid','city_name','city_zipcode'));
-	
-	}
-	else{	
-		$sth=$dbh->prepare("replace cities (city_name,city_zipcode) values (?,?)");
-		$sth->execute(map { $input->param($_) } ('city_name','city_zipcode'));
-	}
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=cities.pl\"></html>";
-	exit;
-# 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 borrowers,cities where borrowers.select_city=cities.cityid and cityid=?");
-	$sth->execute($cityid);
-	my $total = $sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(total => $total->{'total'});	
-	my $sth2=$dbh->prepare("select cityid,city_name,city_zipcode from cities where  cityid=?");
-	$sth2->execute($cityid);
-	my $data=$sth2->fetchrow_hashref;
-	$sth2->finish;
-	if ($total->{'total'} >0) {
-		$template->param(totalgtzero => 1);
-	}
-
-        $template->param(	
-				city_name       =>	( $data->{'city_name'}),
-				city_zipcode    =>       $data->{'city_zipcode'});
-
-
-													# 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') {
-	my $dbh = C4::Context->dbh;
-	my $categorycode=uc($input->param('cityid'));
-	my $sth=$dbh->prepare("delete from cities where cityid=?");
-	$sth->execute($cityid);
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=cities.pl\"></html>";
-	exit;
-													# END $OP eq DELETE_CONFIRMED
-} else { # DEFAULT
-	$template->param(else => 1);
-	my $env;
-	my @loop;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my $toggle = 0;
-	for (my $i=0; $i < $count; $i++){
-		my %row = (cityid => $results->[$i]{'cityid'},
-				city_name => $results->[$i]{'city_name'},
-				city_zipcode => $results->[$i]{'city_zipcode'},
-				toggle => $toggle );	
-		push @loop, \%row;
-		if ( $toggle eq 0 )
-		{
-			$toggle = 1;
-		}
-		else
-		{
-			$toggle = 0;
-		}
-	}
-	$template->param(loop => \@loop);
-
-
-} #---- END $OP eq DEFAULT
-output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file

Index: admin/currency.pl
===================================================================
RCS file: admin/currency.pl
diff -N admin/currency.pl
--- admin/currency.pl	1 Sep 2006 22:03:00 -0000	1.14
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,198 +0,0 @@
-#!/usr/bin/perl
-
-#script to administer the aqbudget table
-#written 20/02/2002 by paul.poulain at 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::Output;
-use C4::Search;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $query="Select currency,rate from currency where (currency like \"$data[0]%\") order by currency";
-	my $sth=$dbh->prepare($query);
-	$sth->execute;
-	my @results;
-	my $cnt=0;
-	while (my $data=$sth->fetchrow_hashref){
-	push(@results,$data);
-	$cnt ++;
-	}
-	#  $sth->execute;
-	$sth->finish;
-	return ($cnt,\@results);
-}
-
-my $input = new CGI;
-my $searchfield=$input->param('searchfield');
-#my $branchcode=$input->param('branchcode');
-my $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/currency.pl";
-
-my $pagesize=20;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-
-my ($template, $loggedinuser, $cookie) 
-    = get_template_and_user({template_name => "admin/currency.tmpl",
-                             query => $input,
-                             type => "intranet",
-			     flagsrequired => {parameters => 1, management => 1},
-			     authnotrequired => 0,
-                             debug => 1,
-                             });
-
-$template->param(searchfield => $searchfield,
-		 script_name => $script_name);
-
-
-################## 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 ($searchfield) {
-		my $dbh = C4::Context->dbh;
-		my $sth=$dbh->prepare("select currency,rate from currency where currency=?");
-		$sth->execute($searchfield);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-
-	$template->param(currency => $data->{'currency'},
-			 rate => $data->{'rate'});
-													# 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 $check = $dbh->prepare("select * from currency where currency = ?");
-	$check->execute($input->param('currency'));
-	if ( $check->fetchrow )
-	{
-		my $sth = $dbh->prepare("UPDATE currency SET rate = ? WHERE currency = ?");
-		$sth->execute($input->param('rate'),$input->param('currency'));
-		$sth->finish;
-	}
-	else
-	{
-		my $sth = $dbh->prepare("INSERT INTO currency (currency, rate) VALUES (?,?)");
-		$sth->execute($input->param('currency'),$input->param('rate'));
-		$sth->finish;
-	}	 
-
-	$check->finish;
-													# 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 aqbooksellers where currency=?");
-	$sth->execute($searchfield);
-	my $total = $sth->fetchrow_hashref;
-	$sth->finish;
-	my $sth2=$dbh->prepare("select currency,rate from currency where currency=?");
-	$sth2->execute($searchfield);
-	my $data=$sth2->fetchrow_hashref;
-	$sth2->finish;
-
-	if ($total->{'total'} >0) {
-		$template->param(totalgtzero => 1);
-	}
-
-	$template->param(rate => $data->{'rate'},
-			 total => $total);
-													# 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 $sth=$dbh->prepare("delete from currency where currency=?");
-	$sth->execute($searchfield);
-	$sth->finish;
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	$template->param(else => 1);
-
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my @loop;
-	my $toggle = 'white';
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-		my %row = ( currency => $results->[$i]{'currency'},
-			    rate => $results->[$i]{'rate'},
-			    toggle => $toggle);
-		push @loop, \%row;
-
-                if ( $toggle eq 'white' )
-                {
-                        $toggle = '#ffffcc';
-                }
-                else
-                {
-                        $toggle = 'white';
-                }
-	}
-	$template->param(loop => \@loop);
-
-	if ($offset>0) {
-		$template->param(offsetgtzero => 1,
-				 prevpage => $offset-$pagesize);
-	}
-
-	if ($offset+$pagesize<$count) {
-		$template->param(ltcount => 1,
-				 nextpage => $offset+$pagesize);
-	}
-} #---- END $OP eq DEFAULT
-
-output_html_with_http_headers $input, $cookie, $template->output;
-

Index: admin/holdings_subfields_structure.pl
===================================================================
RCS file: admin/holdings_subfields_structure.pl
diff -N admin/holdings_subfields_structure.pl
--- admin/holdings_subfields_structure.pl	1 Sep 2006 22:03:00 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,458 +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 C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Auth;
-use CGI;
-use C4::Search;
-use C4::Context;
-
-
-sub StringSearch  {
-	my ($env,$searchstring,$frameworkcode)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from holdings_subfield_structure where (tagfield like ? and frameworkcode=?) order by tagfield");
-	$sth->execute("$searchstring%",$frameworkcode);
-	my @results;
-	my $cnt=0;
-	my $u=1;
-	while (my $data=$sth->fetchrow_hashref){
-		push(@results,$data);
-		$cnt ++;
-		$u++;
-	}
-	$sth->finish;
-	$dbh->disconnect;
-	return ($cnt,\@results);
-}
-
-my $input = new CGI;
-my $tagfield=$input->param('tagfield');
-my $tagsubfield=$input->param('tagsubfield');
-my $frameworkcode=$input->param('frameworkcode');
-my $pkfield="tagfield";
-my $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/holdings_subfields_structure.pl";
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/holdings_subfields_structure.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     debug => 1,
-			     });
-my $pagesize=30;
-my $op = $input->param('op');
-$tagfield=~ s/\,//g;
-
-if ($op) {
-$template->param(script_name => $script_name,
-						tagfield =>$tagfield,
-						frameworkcode => $frameworkcode,
-						$op              => 1); # we show only the TMPL_VAR names $op
-} else {
-$template->param(script_name => $script_name,
-						tagfield =>$tagfield,
-						frameworkcode => $frameworkcode,
-						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;
-	my $dbh = C4::Context->dbh;
-	my $more_subfields = $input->param("more_subfields")+1;
-	
-	
-	# build authorised value list
-	
-my	$sth2 = $dbh->prepare("select distinct category from authorised_values");
-	$sth2->execute;
-	my @authorised_values;
-	push @authorised_values,"";
-	while ((my $category) = $sth2->fetchrow_array) {
-		push @authorised_values, $category;
-	}
-	push (@authorised_values,"branches");
-	push (@authorised_values,"itemtypes");
-	# build thesaurus categories list
-	$sth2->finish;
-	$sth2 = $dbh->prepare("select authtypecode from auth_types");
-	$sth2->execute;
-	my @authtypes;
-	push @authtypes,"";
-	while ((my $authtypecode) = $sth2->fetchrow_array) {
-		push @authtypes, $authtypecode;
-	}
-	# build value_builder list
-	my @value_builder=('');
-
-	# read value_builder directory.
-	# 2 cases here : on CVS install, $cgidir does not need a /cgi-bin
-	# on a standard install, /cgi-bin need to be added. 
-	# test one, then the other
-	my $cgidir = C4::Context->intranetdir ."/cgi-bin";
-	unless (opendir(DIR, "$cgidir/value_builder")) {
-		$cgidir = C4::Context->intranetdir;
-		opendir(DIR, "$cgidir/value_builder") || die "can't opendir $cgidir/value_builder: $!";
-	} 
-	while (my $line = readdir(DIR)) {
-		if ($line =~ /\.pl$/) {
-			push (@value_builder,$line);
-		}
-	}
-	closedir DIR;
-
-	# build values list
-	my $sth=$dbh->prepare("select * from holdings_subfield_structure where tagfield=? and frameworkcode=?"); # and tagsubfield='$tagsubfield'");
-	$sth->execute($tagfield,$frameworkcode);
-	my @loop_data = ();
-	my $toggle=1;
-	my $i=0;
-	while ($data =$sth->fetchrow_hashref) {
-		my %row_data;  # get a fresh hash for the row data
-		if ($toggle eq 1){
-			$toggle=0;
-	  	} else {
-			$toggle=1;
-	  	}
-		$row_data{tab} = CGI::scrolling_list(-name=>'tab',
-					-id=>"tab$i",
-					-values=>['-1','10'],
-					-labels => {'-1' =>'ignore','10'=>'items (10)',	},
-					-default=>$data->{'tab'},
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ohidden} = CGI::scrolling_list(-name=>'ohidden',
-					-id=>"ohidden$i",
-					-values=>['0','2'],
-					-labels => {'0'=>'Show','2' =>'Hide',},
-					-default=>substr($data->{'hidden'},0,1),
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden',
-					-id=>"ihidden$i",
-					-values=>['0','2'],
-					-labels => {'0'=>'Show','2' =>'Hide',},
-					-default=>substr($data->{'hidden'},1,1),
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ehidden} = CGI::scrolling_list(-name=>'ehidden',
-					-id=>"ehidden$i",
-					-values=>['0','1','2'],
-					-labels => {'0'=>'Show','1'=>'Show Collapsed',
-									'2' =>'Hide',
-									},
-					-default=>substr($data->{'hidden'},2,1),
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{tagsubfield} =$data->{'tagsubfield'}."<input type=\"hidden\" name=\"tagsubfield\" value=\"".$data->{'tagsubfield'}."\" id=\"tagsubfield\">";
-		$row_data{liblibrarian} = CGI::escapeHTML($data->{'liblibrarian'});
-		$row_data{libopac} = CGI::escapeHTML($data->{'libopac'});
-		$row_data{seealso} = CGI::escapeHTML($data->{'seealso'});
-		
-		$row_data{authorised_value}  = CGI::scrolling_list(-name=>'authorised_value',
-					-id=>'authorised_value',
-					-values=> \@authorised_values,
-					-default=>$data->{'authorised_value'},
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{value_builder}  = CGI::scrolling_list(-name=>'value_builder',
-					-id=>'value_builder',
-					-values=> \@value_builder,
-					-default=>$data->{'value_builder'},
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{authtypes}  = CGI::scrolling_list(-name=>'authtypecode',
-					-id=>'authtypecode',
-					-values=> \@authtypes,
-					-default=>$data->{'authtypecode'},
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{repeatable} = CGI::checkbox(-name=>"repeatable$i",
-	-checked => $data->{'repeatable'}?'checked':'',
-	-value => 1,
-	-label => '',
-	-id => "repeatable$i");
-		$row_data{mandatory} = CGI::checkbox(-name => "mandatory$i",
-	-checked => $data->{'mandatory'}?'checked':'',
-	-value => 1,
-	-label => '',
-	-id => "mandatory$i");
-		$row_data{hidden} = CGI::escapeHTML($data->{hidden});
-		$row_data{isurl} = CGI::checkbox( -name => "isurl$i",
-			-id => "isurl$i",
-			-checked => $data->{'isurl'}?'checked':'',
-			-value => 1,
-			-label => '');
-		$row_data{row} = $i;
-		$row_data{toggle} = $toggle;
-		$row_data{link} = CGI::escapeHTML($data->{'link'});
-		push(@loop_data, \%row_data);
-		$i++;
-	}
-	# add more_subfields empty lines for add if needed
-	for (my $i=1;$i<=$more_subfields;$i++) {
-		my %row_data;  # get a fresh hash for the row data
-		$row_data{tab} = CGI::scrolling_list(-name=>'tab',
-					-id => "tab$i",
-					-values=>['-1','10'],
-					-labels => {'-1' =>'ignore','10'=>'items (10)',},
-					-default=>"",
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ohidden} = CGI::scrolling_list(-name=>'ohidden',
-					-id=>"ohidden$i",
-					-values=>['0','2'],
-					-labels => {'0'=>'Show','2' =>'Hide',},
-					-default=>"0",
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden',
-					-id=>"ihidden$i",
-					-values=>['0','2'],
-					-labels => {'0'=>'Show','2' =>'Hide',},
-					-default=>"0",
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{ehidden} = CGI::scrolling_list(-name=>'ehidden',
-					-id=>"ehidden$i",
-					-values=>['0','1','2'],
-					-labels => {'0'=>'Show','1'=>'Show Collapsed',
-									'2' =>'Hide',
-									},
-					-default=>"0",
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{tagsubfield} = "<input type=\"text\" name=\"tagsubfield\" value=\"".$data->{'tagsubfield'}."\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\">";
-		$row_data{liblibrarian} = "";
-		$row_data{libopac} = "";
-		$row_data{seealso} = "";
-		$row_data{hidden} = "000";
-		$row_data{repeatable} = CGI::checkbox( -name=> 'repeatable',
-				-id => "repeatable$i",
-				-checked => '',
-				-value => 1,
-				-label => '');
-		$row_data{mandatory} = CGI::checkbox( -name=> 'mandatory',
-			-id => "mandatory$i",
-			-checked => '',
-			-value => 1,
-			-label => '');
-		$row_data{isurl} = CGI::checkbox(-name => 'isurl',
-			-id => "isurl$i",
-			-checked => '',
-			-value => 1,
-			-label => '');
-		
-		$row_data{authorised_value}  = CGI::scrolling_list(-name=>'authorised_value',
-					-id => 'authorised_value',
-					-values=> \@authorised_values,
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{authtypes}  = CGI::scrolling_list(-name=>'authtypecode',
-					-id => 'authtypecode',
-					-values=> \@authtypes,
-					-size=>1,
-					-multiple=>0,
-					);
-		$row_data{link} = CGI::escapeHTML($data->{'link'});
-		$row_data{toggle} = $toggle;
-		$row_data{row} = $i;
-		push(@loop_data, \%row_data);
-	}
-	$template->param('use-heading-flags-p' => 1);
-	$template->param('heading-edit-subfields-p' => 1);
-	$template->param(action => "Edit subfields",
-							tagfield => "<input type=\"hidden\" name=\"tagfield\" value=\"$tagfield\">$tagfield",
-							loop => \@loop_data,
-							more_subfields => $more_subfields,
-							more_tag => $tagfield);
-
-												# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
-	$template->param(tagfield => "$input->param('tagfield')");
-	my $sth=$dbh->prepare("replace holdings_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,tab,seealso,authorised_value,authtypecode,value_builder,hidden,isurl,frameworkcode, link)
-									values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
-	my @tagsubfield	= $input->param('tagsubfield');
-	my @liblibrarian	= $input->param('liblibrarian');
-	my @libopac		= $input->param('libopac');
-	
-	my @tab				= $input->param('tab');
-	my @seealso		= $input->param('seealso');
-#	my @hidden		= $input->param('hidden');
-	my @hidden;
-	my @ohidden		= $input->param('ohidden');
-	my @ihidden		= $input->param('ihidden');
-	my @ehidden		= $input->param('ehidden');
-	my @authorised_values	= $input->param('authorised_value');
-	my @authtypecodes	= $input->param('authtypecode');
-	my @value_builder	=$input->param('value_builder');
-	my @link		=$input->param('link');
-	for (my $i=0; $i<= $#tagsubfield ; $i++) {
-		my $tagfield			=$input->param('tagfield');
-		my $tagsubfield		=$tagsubfield[$i];
-		$tagsubfield="@" unless $tagsubfield ne '';
-		my $liblibrarian		=$liblibrarian[$i];
-		my $libopac			=$libopac[$i];
-		my $repeatable		=$input->param("repeatable$i")?1:0;
-		my $mandatory		=$input->param("mandatory$i")?1:0;
-		
-		my $tab				=$tab[$i];
-		my $seealso				=$seealso[$i];
-		my $authorised_value		=$authorised_values[$i];
-		my $authtypecode		=$authtypecodes[$i];
-		my $value_builder=$value_builder[$i];
-		my $hidden = $ohidden[$i].$ihidden[$i].$ehidden[$i]; #collate from 3 hiddens;
-		my $isurl = $input->param("isurl$i")?1:0;
-		my $link = $link[$i];
-		if ($liblibrarian) {
-			unless (C4::Context->config('demo') eq 1) {
-				$sth->execute ($tagfield,
-									$tagsubfield,
-									$liblibrarian,
-									$libopac,
-									$repeatable,
-									$mandatory,
-									
-									$tab,
-									$seealso,
-									$authorised_value,
-									$authtypecode,
-									$value_builder,
-									$hidden,
-									$isurl,
-									$frameworkcode,
-
-	 $link,
-					      );
-			}
-		}
-	}
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=holdings_subfields_structure.pl?tagfield=$tagfield&frameworkcode=$frameworkcode\"></html>";
-	exit;
-
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select * from holdings_subfield_structure where tagfield=? and tagsubfield=? and frameworkcode=?");
-	#FIXME : called with 2 bind variables when 3 are needed
-	$sth->execute($tagfield,$tagsubfield);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(liblibrarian => $data->{'liblibrarian'},
-							tagsubfield => $data->{'tagsubfield'},
-							delete_link => $script_name,
-							tagfield      =>$tagfield,
-							tagsubfield => $tagsubfield,
-							frameworkcode => $frameworkcode,
-							);
-													# 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') {
-	my $dbh = C4::Context->dbh;
-	unless (C4::Context->config('demo') eq 1) {
-		my $sth=$dbh->prepare("delete from holdings_subfield_structure where tagfield=? and tagsubfield=? and frameworkcode=?");
-		$sth->execute($tagfield,$tagsubfield,$frameworkcode);
-		$sth->finish;
-	}
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=holdings_subfields_structure.pl?tagfield=$tagfield&frameworkcode=$frameworkcode\"></html>";
-	exit;
-	$template->param(tagfield => $tagfield);
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	my $env;
-	my ($count,$results)=StringSearch($env,$tagfield,$frameworkcode);
-	my $toggle=1;
-	my @loop_data = ();
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-	  	if ($toggle eq 1){
-			$toggle=0;
-	  	} else {
-			$toggle=1;
-	  	}
-		my %row_data;  # get a fresh hash for the row data
-		$row_data{tagfield} = $results->[$i]{'tagfield'};
-		$row_data{tagsubfield} = $results->[$i]{'tagsubfield'};
-		$row_data{liblibrarian} = $results->[$i]{'liblibrarian'};
-		
-		$row_data{repeatable} = $results->[$i]{'repeatable'};
-		$row_data{mandatory} = $results->[$i]{'mandatory'};
-		$row_data{tab} = $results->[$i]{'tab'};
-		$row_data{seealso} = $results->[$i]{'seealso'};
-		$row_data{authorised_value} = $results->[$i]{'authorised_value'};
-		$row_data{authtypecode}	= $results->[$i]{'authtypecode'};
-		$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{link}	= $results->[$i]{'link'};
-		$row_data{delete} = "$script_name?op=delete_confirm&amp;tagfield=$tagfield&amp;tagsubfield=".$results->[$i]{'tagsubfield'}."&frameworkcode=$frameworkcode";
-		$row_data{toggle} = $toggle;
-		if ($row_data{tab} eq -1) {
-			$row_data{subfield_ignored} = 1;
-		}
-
-		push(@loop_data, \%row_data);
-	}
-	$template->param(loop => \@loop_data);
-	$template->param(edit_tagfield => $tagfield,
-		edit_frameworkcode => $frameworkcode);
-	
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(prev =>"<a href=\"$script_name?offset=$prevpage\">");
-	}
-	if ($offset+$pagesize<$count) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(next => "<a href=\"$script_name?offset=$nextpage\">");
-	}
-} #---- 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;

Index: admin/holdingstagstructure.pl
===================================================================
RCS file: admin/holdingstagstructure.pl
diff -N admin/holdingstagstructure.pl
--- admin/holdingstagstructure.pl	1 Sep 2006 22:03:00 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,366 +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::Auth;
-use C4::Koha;
-use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Search;
-
-
-# retrieve parameters
-my $input = new CGI;
-my $frameworkcode = $input->param('frameworkcode'); # set to select framework
-$frameworkcode="" unless $frameworkcode;
-my $existingframeworkcode = $input->param('existingframeworkcode'); # set when we have to create a new framework (in frameworkcode) by copying an old one (in existingframeworkcode)
-$existingframeworkcode = "" unless $existingframeworkcode;
-my $frameworkinfo = getframeworkinfo($frameworkcode);
-my $searchfield=$input->param('searchfield');
-$searchfield=0 unless $searchfield;
-$searchfield=~ s/\,//g;
-
-my $offset=$input->param('offset');
-my $op = $input->param('op');
-my $dspchoice = $input->param('select_display');
-my $pagesize=20;
-
-my $script_name="/cgi-bin/koha/admin/holdingstagstructure.pl";
-
-my $dbh = C4::Context->dbh;
-
-# open template
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "admin/holdingstagstructure.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     debug => 1,
-			     });
-
-# get framework list
-my $frameworks = getframeworks();
-my @frameworkloop;
-foreach my $thisframeworkcode (keys %$frameworks) {
-	my $selected = 1 if $thisframeworkcode eq $frameworkcode;
-	my %row =(value => $thisframeworkcode,
-				selected => $selected,
-				frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
-			);
-	push @frameworkloop, \%row;
-}
-
-# check that framework is defined in holdings_tag_structure
-my $sth=$dbh->prepare("select count(*) from holdings_tag_structure where frameworkcode=?");
-$sth->execute($frameworkcode);
-my ($frameworkexist) = $sth->fetchrow;
-if ($frameworkexist) {
-} else {
-	# if frameworkcode does not exists, then OP must be changed to "create framework" if we are not on the way to create it
-	# (op = itemtyp_create_confirm)
-	if ($op eq "framework_create_confirm") {
-		duplicate_framework($frameworkcode, $existingframeworkcode);
-		$op=""; # unset $op to go back to framework list
-	} else {
-		$op = "framework_create";
-	}
-}
-$template->param(frameworkloop => \@frameworkloop,
-				frameworkcode => $frameworkcode,
-				frameworktext => $frameworkinfo->{frameworktext});
-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') {
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $data;
-	if ($searchfield) {
-		$sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from holdings_tag_structure where tagfield=? and frameworkcode=?");
-		$sth->execute($searchfield,$frameworkcode);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-	my $sth = $dbh->prepare("select distinct category from authorised_values");
-	$sth->execute;
-	my @authorised_values;
-	push @authorised_values,"";
-	while ((my $category) = $sth->fetchrow_array) {
-		push @authorised_values, $category;
-	}
-	my $authorised_value  = CGI::scrolling_list(-name=>'authorised_value',
-			-values=> \@authorised_values,
-			-size=>1,
-			-id=>"authorised_value",
-			-multiple=>0,
-			-default => $data->{'authorised_value'},
-			);
-
-	if ($searchfield) {
-		$template->param(action => "Modify tag",
-								searchfield => "<input type=\"hidden\" name=\"tagfield\" value=\"$searchfield\" />$searchfield");
-		$template->param('heading-modify-tag-p' => 1);
-	} else {
-		$template->param(action => "Add tag",
-								searchfield => "<input type=\"text\" name=\"tagfield\" size=\"5\" maxlength=\"3\" />");
-		$template->param('heading-add-tag-p' => 1);
-	}
-	$template->param('use-heading-flags-p' => 1);
-	$template->param(liblibrarian => $data->{'liblibrarian'},
-			libopac => $data->{'libopac'},
-			repeatable => CGI::checkbox(-name=>'repeatable',
-						-checked=> $data->{'repeatable'}?'checked':'',
-						-value=> 1,
-						-label => '',
-						-id=> 'repeatable'),
-			mandatory => CGI::checkbox(-name => 'mandatory',
-						-checked => $data->{'mandatory'}?'checked':'',
-						-value => 1,
-						-label => '',
-						-id => 'mandatory'),
-			authorised_value => $authorised_value,
-			frameworkcode => $frameworkcode,
-			);
-													# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	$sth=$dbh->prepare("replace holdings_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) values (?,?,?,?,?,?,?)");
-	my $tagfield       =$input->param('tagfield');
-	my $liblibrarian  = $input->param('liblibrarian');
-	my $libopac       =$input->param('libopac');
-	my $repeatable =$input->param('repeatable');
-	my $mandatory =$input->param('mandatory');
-	my $authorised_value =$input->param('authorised_value');
-	unless (C4::Context->config('demo') eq 1) {
-		$sth->execute($tagfield,
-							$liblibrarian,
-							$libopac,
-							$repeatable?1:0,
-							$mandatory?1:0,
-							$authorised_value,
-							$frameworkcode
-							);
-	}
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=holdingstagstructure.pl?searchfield=$tagfield&frameworkcode=$frameworkcode\"></html>";
-	exit;
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	$sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from holdings_tag_structure where tagfield=? and frameworkcode=?");
-	$sth->execute($searchfield,$frameworkcode);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(liblibrarian => $data->{'liblibrarian'},
-							searchfield => $searchfield,
-							frameworkcode => $frameworkcode,
-							);
-													# 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') {
-	unless (C4::Context->config('demo') eq 1) {
-		$dbh->do("delete from holdings_tag_structure where tagfield='$searchfield' and frameworkcode='$frameworkcode'");
-		$dbh->do("delete from holdings_subfield_structure where tagfield='$searchfield' and frameworkcode='$frameworkcode'");
-
-	}
-													# END $OP eq DELETE_CONFIRMED
-################## ITEMTYPE_CREATE ##################################
-# called automatically if an unexisting  frameworkis selected
-} elsif ($op eq 'framework_create') {
-	$sth = $dbh->prepare("select count(*),holdings_tag_structure.frameworkcode,frameworktext from holdings_tag_structure,biblio_framework where biblio_framework.frameworkcode=holdings_tag_structure.frameworkcode group by holdings_tag_structure.frameworkcode");
-	$sth->execute;
-	my @existingframeworkloop;
-	while (my ($tot,$thisframeworkcode,$frameworktext) = $sth->fetchrow) {
-		if ($tot>0) {
-			my %line = ( value => $thisframeworkcode,
-						frameworktext => $frameworktext,
-					);
-			push @existingframeworkloop,\%line;
-		}
-	}
-	$template->param(existingframeworkloop => \@existingframeworkloop,
-					frameworkcode => $frameworkcode,
-# 					FRtext => $frameworkinfo->{frameworktext},
-					);
-################## DEFAULT ##################################
-} else { # DEFAULT
-	# here, $op can be unset or set to "framework_create_confirm".
-	if  ($searchfield ne '') {
-		 $template->param(searchfield => $searchfield);
-	}
-	my $cnt=0;
-	if ($dspchoice) {
-		#here, user only wants used tags/subfields displayed
-		my $env;
-		$searchfield=~ s/\'/\\\'/g;
-		my @data=split(' ',$searchfield);
-		my $sth=$dbh->prepare("Select holdings_tag_structure.tagfield as mts_tagfield,holdings_tag_structure.liblibrarian as mts_liblibrarian,holdings_tag_structure.libopac as mts_libopac,holdings_tag_structure.repeatable as mts_repeatable,holdings_tag_structure.mandatory as mts_mandatory,holdings_tag_structure.authorised_value as mts_authorized_value,holdings_subfield_structure.* from holdings_tag_structure LEFT JOIN holdings_subfield_structure ON (holdings_tag_structure.tagfield=holdings_subfield_structure.tagfield AND holdings_tag_structure.frameworkcode=holdings_subfield_structure.frameworkcode) where (holdings_tag_structure.tagfield >= ? and holdings_tag_structure.frameworkcode=?) AND holdings_subfield_structure.tab>=0 order by holdings_tag_structure.tagfield,holdings_subfield_structure.tagsubfield");
-		#could be ordoned by tab
-		$sth->execute($data[0], $frameworkcode);
-		my @results = ();
-		while (my $data=$sth->fetchrow_hashref){
-			push(@results,$data);
-			$cnt++;
-		}
-		$sth->finish;
-		
-		my $toggle=0;
-		my @loop_data = ();
-		my $j=1;
-		my $i=$offset;
-		while ($i < ($offset+$pagesize<$cnt?$offset+$pagesize:$cnt)) {
-			if ($toggle eq 0){
-				$toggle=1;
-			} else {
-				$toggle=0;
-			}
-			my %row_data;  # get a fresh hash for the row data
-			$row_data{tagfield} = $results[$i]->{'mts_tagfield'};
-			$row_data{liblibrarian} = $results[$i]->{'mts_liblibrarian'};
-			$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} ="holdings_subfields_structure.pl?op=add_form&tagfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
-			$row_data{edit} = "$script_name?op=add_form&amp;searchfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
-			$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
-			$row_data{toggle} = $toggle;
-			$j=$i;
-			my @internal_loop = ();
-			while (($results[$i]->{'tagfield'}==$results[$j]->{'tagfield'}) and ($j< ($offset+$pagesize<$cnt?$offset+$pagesize:$cnt))) {
-				if ($toggle eq 0) {
-					$toggle=1;
-				} else {
-					$toggle=0;
-				}
-				my %subfield_data;
-				$subfield_data{tagsubfield} = $results[$j]->{'tagsubfield'};
-				$subfield_data{liblibrarian} = $results[$j]->{'liblibrarian'};
-				
-				$subfield_data{repeatable} = $results[$j]->{'repeatable'};
-				$subfield_data{mandatory} = $results[$j]->{'mandatory'};
-				$subfield_data{tab} = $results[$j]->{'tab'};
-				$subfield_data{seealso} = $results[$j]->{'seealso'};
-				$subfield_data{authorised_value} = $results[$j]->{'authorised_value'};
-				$subfield_data{authtypecode}= $results[$j]->{'authtypecode'};
-				$subfield_data{value_builder}= $results[$j]->{'value_builder'};
-				$subfield_data{toggle}	= $toggle;
-# 				warn "tagfield :  ".$results[$j]->{'tagfield'}." tagsubfield :".$results[$j]->{'tagsubfield'};
-				push @internal_loop,\%subfield_data;
-				$j++;
-			}
-			$row_data{'subfields'}=\@internal_loop;
-			push(@loop_data, \%row_data);
-#			undef @internal_loop;
-			$i=$j;
-		}
-		$template->param(select_display => "True",
-						loop => \@loop_data);
-		#  $sth->execute;
-		$sth->finish;
-	} else {
-		#here, normal old style : display every tags
-		my $env;
-		my ($count,$results)=StringSearch($env,$searchfield,$frameworkcode);
-		$cnt = $count;
-		my $toggle=0;
-		my @loop_data = ();
-		for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-			if ($toggle eq 0){
-				$toggle=1;
-			} else {
-				$toggle=0;
-			}
-			my %row_data;  # get a fresh hash for the row data
-			$row_data{tagfield} = $results->[$i]{'tagfield'};
-			$row_data{liblibrarian} = $results->[$i]{'liblibrarian'};
-			$row_data{repeatable} = $results->[$i]{'repeatable'};
-			$row_data{mandatory} = $results->[$i]{'mandatory'};
-			$row_data{authorised_value} = $results->[$i]{'authorised_value'};
-			$row_data{subfield_link} ="holdings_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
-			$row_data{edit} = "$script_name?op=add_form&amp;searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
-			$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode;
-			$row_data{toggle} = $toggle;
-			push(@loop_data, \%row_data);
-		}
-		$template->param(loop => \@loop_data);
-	}
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(isprevpage => $offset,
-						prevpage=> $prevpage,
-						searchfield => $searchfield,
-						script_name => $script_name,
-						frameworkcode => $frameworkcode,
-		);
-	}
-	if ($offset+$pagesize<$cnt) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(nextpage =>$nextpage,
-						searchfield => $searchfield,
-						script_name => $script_name,
-						frameworkcode => $frameworkcode,
-		);
-	}
-} #---- END $OP eq DEFAULT
-
-$template->param(loggeninuser => $loggedinuser,
-		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-		);
-output_html_with_http_headers $input, $cookie, $template->output;
-
-
-#
-# the sub used for searches
-#
-sub StringSearch  {
-	my ($env,$searchstring,$frameworkcode)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from holdings_tag_structure where (tagfield >= ? and frameworkcode=?) order by tagfield");
-	$sth->execute($data[0], $frameworkcode);
-	my @results;
-	while (my $data=$sth->fetchrow_hashref){
-	push(@results,$data);
-	}
-	#  $sth->execute;
-	$sth->finish;
-	return (scalar(@results),\@results);
-}
-
-#
-
-

Index: admin/institutions-careers.pl
===================================================================
RCS file: admin/institutions-careers.pl
diff -N admin/institutions-careers.pl
--- admin/institutions-careers.pl	1 Sep 2006 22:03:00 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,74 +0,0 @@
-#!/usr/bin/perl
-
-# Script to manage the educational institutions and its careers.
-# written 12/04
-# Castañeda, Carlos Sebastian - seba3c at yahoo.com.ar - Physics Library UNLP Argentina
-
-# 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::Auth;
-use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::AcademicInfo;
-
-my $cgi = new CGI;
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/institutions-careers.tmpl",
-			     query => $cgi,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {editcatalogue => 1},
-			     debug => 1,
-			     });
-
-my $op = $cgi->param('op'); 
-my $id_institution = $cgi->param('id_institution'); 
-my $institution_name = $cgi->param('institution_name'); 
-
-if ($op eq 'add_form') {
-	$template->param(add_form => 1);
-	
-	if ($id_institution) {
-		my $info = get_educational_institution($id_institution);
-		$template->param(op => 'edit');
-		$template->param(institution_name => $info->{'institution_name'});
-		$template->param(id_institution => $id_institution);
-	} else {
-		$template->param(op => 'add');
-	}
-
-} elsif ($op eq 'add') {
-	add_educational_institution($institution_name);
-	print $cgi->redirect('/cgi-bin/koha/admin/institutions-careers.pl');
-} elsif ($op eq 'edit') {
-	update_educational_institution($id_institution, $institution_name);
-	print $cgi->redirect('/cgi-bin/koha/admin/institutions-careers.pl');
-} elsif ($op eq 'del') {
-	del_educational_institution($id_institution);
-	print $cgi->redirect('/cgi-bin/koha/admin/institutions-careers.pl');
-} else {
-	my @educ_institutions = &get_careers_by_institution();
-	$template->param(institutions => \@educ_institutions);
-}
-
-output_html_with_http_headers $cgi, $cookie, $template->output;

Index: admin/issuingrules.pl
===================================================================
RCS file: admin/issuingrules.pl
diff -N admin/issuingrules.pl
--- admin/issuingrules.pl	27 Sep 2006 21:19:21 -0000	1.11
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,186 +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::Koha;
-use C4::Interface::CGI::Output;
-
-my $input = new CGI;
-my $dbh = C4::Context->dbh;
-
-my $type=$input->param('type');
-my $branch = $input->param('branch');
-$branch="" unless $branch;
-my $op = $input->param('op');
-
-# my $flagsrequired;
-# $flagsrequired->{circulation}=1;
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "admin/issuingrules.tmpl",
-                             query => $input,
-                             type => "intranet",
-                             authnotrequired => 0,
- 			     flagsrequired => {parameters => 1, management => 1},
-			      debug => 1,
-                             });
-# save the values entered
-if ($op eq 'save') {
-	my @names=$input->param();
-	my $sth_search = $dbh->prepare("select count(*) as total from issuingrules where branchcode=? and categorycode=? and itemtype=?");
-
-	my $sth_Finsert = $dbh->prepare("insert into issuingrules (branchcode,categorycode,itemtype,fine,firstremind,chargeperiod) values (?,?,?,?,?,?)");
-	my $sth_Fupdate=$dbh->prepare("Update issuingrules set fine=?,firstremind=?,chargeperiod=? where branchcode=? and categorycode=? and itemtype=?");
-	my $sth_Fdelete=$dbh->prepare("delete from issuingrules where branchcode=? and categorycode=? and itemtype=? and issuelength=0");
-
-	my $sth_Iinsert = $dbh->prepare("insert into issuingrules (branchcode,categorycode,itemtype,maxissueqty,issuelength) values (?,?,?,?,?)");
-	my $sth_Iupdate=$dbh->prepare("Update issuingrules set maxissueqty=?, issuelength=? where branchcode=? and categorycode=? and itemtype=?");
-	my $sth_Idelete=$dbh->prepare("delete from issuingrules where branchcode=? and categorycode=? and itemtype=? and fine=0");
-	foreach my $key (@names){
-		# ISSUES
-		if ($key =~ /I-(.*)-(.*)\.(.*)/) {
-			my $br = $1; # branch
-			my $bor = $2; # borrower category
-			my $cat = $3; # item type
-			my $data=$input->param($key);
-			my ($issuelength,$maxissueqty)=split(',',$data);
-# 			if ($maxissueqty >0) {
-				$sth_search->execute($br,$bor,$cat);
-				my $res = $sth_search->fetchrow_hashref();
-				if ($res->{total}) {
-					$sth_Iupdate->execute($maxissueqty,$issuelength,$br,$bor,$cat);
-				} else {
-					$sth_Iinsert->execute($br,$bor,$cat,$maxissueqty,$issuelength);
-				}
-# 			} else {
-# 				$sth_Idelete->execute($br,$bor,$cat);
-# 			}
-		}
-		# FINES
-		if ($key =~ /F-(.*)-(.*)\.(.*)/) {
-			my $br = $1; # branch
-			my $bor = $2; # borrower category
-			my $cat = $3; # item type
-			my $data=$input->param($key);
-			my ($fine,$firstremind,$chargeperiod)=split(',',$data);
-# 			if ($fine >0) {
-				$sth_search->execute($br,$bor,$cat);
-				my $res = $sth_search->fetchrow_hashref();
-				if ($res->{total}) {
-					$sth_Fupdate->execute($fine,$firstremind,$chargeperiod,$br,$bor,$cat);
-				} else {
-					$sth_Finsert->execute($br,$bor,$cat,$fine,$firstremind,$chargeperiod);
-				}
-# 			} else {
-# 				$sth_Fdelete->execute($br,$bor,$cat);
-# 			}
-		}
-	}
-
-}
-my $branches = GetBranches;
-my @branchloop;
-foreach my $thisbranch (keys %$branches) {
-	my $selected = 1 if $thisbranch eq $branch;
-	my %row =(value => $thisbranch,
-				selected => $selected,
-				branchname => $branches->{$thisbranch}->{'branchname'},
-			);
-	push @branchloop, \%row;
-}
-
-my $sth=$dbh->prepare("Select description,categorycode from categories order by description");
-$sth->execute;
- my @trow3;
-my @title_loop;
-# my $i=0;
-while (my $data=$sth->fetchrow_hashref){
-	my %row = (in_title => $data->{'description'});
-	push @title_loop,\%row;
- 	push @trow3,$data->{'categorycode'};
-# 	$i++;
-}
-
-my %row = (in_title => "*");
-push @title_loop, \%row;
-push @trow3,'*';
-
-$sth->finish;
-$sth=$dbh->prepare("Select description,itemtype from itemtypes order by description");
-$sth->execute;
-# $i=0;
-my $toggle= 1;
-my @row_loop;
-my @itemtypes;
-while (my $row=$sth->fetchrow_hashref){
-	push @itemtypes,\$row;
-}
-my $line;
-$line->{itemtype} = "*";
-$line->{description} = "*";
-push @itemtypes,\$line;
-
-foreach my $data (@itemtypes) {
-	my @trow2;
-	my @cell_loop;
-	if ( $toggle eq 1 ) {
-		$toggle = 0;
-	} else {
-		$toggle = 1;
-	}
-	for (my $i=0;$i<=$#trow3;$i++){
-		my $sth2=$dbh->prepare("select * from issuingrules where branchcode=? and categorycode=? and itemtype=?");
-		$sth2->execute($branch,$trow3[$i],$$data->{'itemtype'});
-		my $dat=$sth2->fetchrow_hashref;
-		$sth2->finish;
-		my $fine=$dat->{'fine'}+0;
-		my $maxissueqty = $dat->{'maxissueqty'}+0;
-		my $issuelength = $dat->{'issuelength'}+0;
-		my $finesvalue;
-		$finesvalue= "$fine,$dat->{'firstremind'},$dat->{'chargeperiod'}" if $fine+$dat->{'firstremind'}+$dat->{'chargeperiod'}>0;
-		my $issuingvalue;
-# 		if ($maxissueqty>0) {
-		    $issuingvalue = "$issuelength,$maxissueqty" if $issuelength+$maxissueqty>0;
-# 		}
-# 		else {		
-# 		    $issuingvalue = "$issuelength, 5";
-# 		    $maxissueqty = 5;
-# 		}
-		my %row = (finesname=> "F-$branch-$trow3[$i].$$data->{'itemtype'}",
-					finesvalue => $finesvalue,
-					issuingname => "I-$branch-$trow3[$i].$$data->{itemtype}",
-					issuingvalue => $issuingvalue,
-					toggle => $toggle,
-					);
-		push @cell_loop,\%row;
-	}
-	my %row = (categorycode => $$data->{description},
-  					cell =>\@cell_loop);
-	push @row_loop, \%row;
-}
-
-$sth->finish;
-$template->param(title => \@title_loop,
-						row => \@row_loop,
-						branchloop => \@branchloop,
-						branch => $branch);
-output_html_with_http_headers $input, $cookie, $template->output;

Index: admin/itemtypecategory.pl
===================================================================
RCS file: admin/itemtypecategory.pl
diff -N admin/itemtypecategory.pl
--- admin/itemtypecategory.pl	24 Feb 2006 11:15:01 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,199 +0,0 @@
-#!/usr/bin/perl
-# NOTE: 4-character tabs
-
-#script to administer the itemtype categories table
-#modified from the itemtype script written 20/02/2002 by paul.poulain at free.fr
-#This script written by waylon at robertson.net.nz at 2nd June, 2005
-# 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::Output;
-use C4::Search;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-use HTML::Template;
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from categorytable where (description like ?) order by categorycode");
-	$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 $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/itemtypecategory.pl";
-my $categorycode=$input->param('categorycode');
-my $pagesize=20;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/itemtypecategory.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1, management => 1},
-			     debug => 1,
-			     });
-
-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') {
-	#start the page and read in includes
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $data;
-    my $itemtypes;
-    my $dbh = C4::Context->dbh;
-    my @itemtypesselected;
-	if ($categorycode) {
-    	my $sth=$dbh->prepare("select categorycode,description,itemtypecodes from categorytable where categorycode=?");
-		$sth->execute($categorycode);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-        @itemtypesselected = split ( /\|/, $data->{'itemtypecodes'} );
-	}
-
-    my $sth=$dbh->prepare("select description,itemtype from itemtypes order by description");
-    $sth->execute;
-    while (my ($description,$itemtype) = $sth->fetchrow) {
-        $itemtypes .='<td><input type="checkbox" name="itemtypecodes" value="'.$itemtype.'"';
-        if(grep /$itemtype/, at itemtypesselected){
-            $itemtypes .=' checked';
-        }
-        $itemtypes .='>'.$description.'</td>';
-    }
-
-	$template->param(categorycode => $categorycode,
-							description => $data->{'description'},
-                            itemtypes => $itemtypes
-							);
-;
-													# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
-    my @itemtypecodesarray = $input->param('itemtypecodes');
-    my $itemtypecodes=join('|', at itemtypecodesarray);
-	my $sth=$dbh->prepare("replace categorytable (categorycode,description,itemtypecodes) values (?,?,?)");
-	$sth->execute(
-		$input->param('categorycode'),$input->param('description'),
-		$itemtypecodes
-        );
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=itemtypecategory.pl\"></html>";
-	exit;
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	#start the page and read in includes
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select categorycode,description,itemtypecodes from categorytable where categorycode=?");
-	$sth->execute($categorycode);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-
-	$template->param(categorycode => $categorycode,
-							description => $data->{'description'},
-							itemtypecodes => $data->{'itemtypecodes'});
-													# 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') {
-	#start the page and read in includes
-	my $dbh = C4::Context->dbh;
-	my $itemtype=uc($input->param('categorycode'));
-	my $sth=$dbh->prepare("delete from categorytable where categorycode=?");
-	$sth->execute($itemtype);
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=itemtypecategory.pl\"></html>";
-	exit;
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my $toggle=0;
-	my @loop_data;
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-		my %row_data;
-		if ($toggle eq 0){
-			$toggle=1;
-		} else {
-			$toggle=0;
-		}
-		$row_data{toggle} = $toggle;
-		$row_data{categorycode} = $results->[$i]{categorycode};
-		$row_data{description} = $results->[$i]{description};
-		$row_data{itemtypecodes} = $results->[$i]{itemtypecodes};
-		push(@loop_data, \%row_data);
-	}
-	$template->param(loop => \@loop_data);
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(previous => "$script_name?offset=".$prevpage);
-	}
-	if ($offset+$pagesize<$count) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(next => "$script_name?offset=".$nextpage);
-	}
-} #---- END $OP eq DEFAULT
-output_html_with_http_headers $input, $cookie, $template->output;
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: admin/itemtypes.pl
===================================================================
RCS file: admin/itemtypes.pl
diff -N admin/itemtypes.pl
--- admin/itemtypes.pl	1 Sep 2006 22:03:00 -0000	1.25
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,200 +0,0 @@
-#!/usr/bin/perl
-# NOTE: 4-character tabs
-
-#script to administer the categories table
-#written 20/02/2002 by paul.poulain at 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::Output;
-use C4::Search;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from itemtypes where (description like ?) order by itemtype");
-	$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 $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/itemtypes.pl";
-my $itemtype=$input->param('itemtype');
-my $pagesize=20;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/itemtypes.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1, management => 1},
-			     debug => 1,
-			     });
-
-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') {
-	#start the page and read in includes
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $data;
-	if ($itemtype) {
-		my $dbh = C4::Context->dbh;
-		my $sth=$dbh->prepare("select itemtype,description,renewalsallowed,rentalcharge,notforloan from itemtypes where itemtype=?");
-		$sth->execute($itemtype);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-	$template->param(itemtype => $itemtype,
-							description => $data->{'description'},
-							renewalsallowed => $data->{'renewalsallowed'},
-							rentalcharge => sprintf("%.2f",$data->{'rentalcharge'}),
-							notforloan => $data->{'notforloan'}
-							);
-;
-													# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("replace itemtypes (itemtype,description,renewalsallowed,rentalcharge,notforloan) values (?,?,?,?,?)");
-	$sth->execute(
-		$input->param('itemtype'),$input->param('description'),
-		$input->param('renewalsallowed'),$input->param('rentalcharge'),
-		$input->param('notforloan')?1:0);
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=itemtypes.pl\"></html>";
-	exit;
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	#start the page and read in includes
-	my $dbh = C4::Context->dbh;
-
-	# Check both categoryitem and biblioitems, see Bug 199
-	my $total = 0;
-	for my $table ('biblioitems') {
-	   my $sth=$dbh->prepare("select count(*) as total from $table where itemtype=?");
-	   $sth->execute($itemtype);
-	   $total += $sth->fetchrow_hashref->{total};
-	   $sth->finish;
-	}
-
-	my $sth=$dbh->prepare("select itemtype,description,renewalsallowed,rentalcharge from itemtypes where itemtype=?");
-	$sth->execute($itemtype);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-
-	$template->param(itemtype => $itemtype,
-							description => $data->{'description'},
-							renewalsallowed => $data->{'renewalsallowed'},
-							rentalcharge => sprintf("%.2f",$data->{'rentalcharge'}),
-							total => $total);
-													# 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') {
-	#start the page and read in includes
-	my $dbh = C4::Context->dbh;
-	my $itemtype=uc($input->param('itemtype'));
-	my $sth=$dbh->prepare("delete from itemtypes where itemtype=?");
-	$sth->execute($itemtype);
-	$sth = $dbh->prepare("delete from issuingrules where itemtype=?");
-	$sth->execute($itemtype);
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=itemtypes.pl\"></html>";
-	exit;
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my $toggle=0;
-	my @loop_data;
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-		my %row_data;
-		if ($toggle eq 0){
-			$toggle=1;
-		} else {
-			$toggle=0;
-		}
-		$row_data{toggle} = $toggle;
-		$row_data{itemtype} = $results->[$i]{itemtype};
-		$row_data{description} = $results->[$i]{description};
-		$row_data{renewalsallowed} = $results->[$i]{renewalsallowed};
-		$row_data{notforloan} = $results->[$i]{notforloan};
-		$row_data{rentalcharge} = sprintf("%.2f",$results->[$i]{rentalcharge});
-		push(@loop_data, \%row_data);
-	}
-	$template->param(loop => \@loop_data);
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(previous => "$script_name?offset=".$prevpage);
-	}
-	if ($offset+$pagesize<$count) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(next => "$script_name?offset=".$nextpage);
-	}
-} #---- END $OP eq DEFAULT
-output_html_with_http_headers $input, $cookie, $template->output;
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: admin/itemtypesubcategory.pl
===================================================================
RCS file: admin/itemtypesubcategory.pl
diff -N admin/itemtypesubcategory.pl
--- admin/itemtypesubcategory.pl	24 Feb 2006 11:15:01 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,199 +0,0 @@
-#!/usr/bin/perl
-# NOTE: 4-character tabs
-
-#script to administer the itemtype subcategories table
-#modified from the itemtype script written 20/02/2002 by paul.poulain at free.fr
-#This script written by waylon at robertson.net.nz at 2nd June, 2005
-# 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::Output;
-use C4::Search;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-use HTML::Template;
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from subcategorytable where (description like ?) order by subcategorycode");
-	$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 $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/itemtypesubcategory.pl";
-my $subcategorycode=$input->param('subcategorycode');
-my $pagesize=20;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/itemtypesubcategory.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1, management => 1},
-			     debug => 1,
-			     });
-
-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') {
-	#start the page and read in includes
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $data;
-    my $itemtypes;
-    my $dbh = C4::Context->dbh;
-    my @itemtypesselected;
-	if ($subcategorycode) {
-    	my $sth=$dbh->prepare("select subcategorycode,description,itemtypecodes from subcategorytable where subcategorycode=?");
-		$sth->execute($subcategorycode);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-        @itemtypesselected = split ( /\|/, $data->{'itemtypecodes'} );
-	}
-
-    my $sth=$dbh->prepare("select description,itemtype from itemtypes order by description");
-    $sth->execute;
-    while (my ($description,$itemtype) = $sth->fetchrow) {
-        $itemtypes .='<td><input type="checkbox" name="itemtypecodes" value="'.$itemtype.'"';
-        if(grep /$itemtype/, at itemtypesselected){
-            $itemtypes .=' checked';
-        }
-        $itemtypes .='>'.$description.'</td>';
-    }
-
-	$template->param(subcategorycode => $subcategorycode,
-							description => $data->{'description'},
-                            itemtypes => $itemtypes
-							);
-;
-													# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
-    my @itemtypecodesarray = $input->param('itemtypecodes');
-    my $itemtypecodes=join('|', at itemtypecodesarray);
-	my $sth=$dbh->prepare("replace subcategorytable (subcategorycode,description,itemtypecodes) values (?,?,?)");
-	$sth->execute(
-		$input->param('subcategorycode'),$input->param('description'),
-		$itemtypecodes
-        );
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=itemtypesubcategory.pl\"></html>";
-	exit;
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	#start the page and read in includes
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select subcategorycode,description,itemtypecodes from subcategorytable where subcategorycode=?");
-	$sth->execute($subcategorycode);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-
-	$template->param(subcategorycode => $subcategorycode,
-							description => $data->{'description'},
-							itemtypecodes => $data->{'itemtypecodes'});
-													# 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') {
-	#start the page and read in includes
-	my $dbh = C4::Context->dbh;
-	my $subcategorycode=uc($input->param('subcategorycode'));
-	my $sth=$dbh->prepare("delete from subcategorytable where subcategorycode=?");
-	$sth->execute($subcategorycode);
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=itemtypesubcategory.pl\"></html>";
-	exit;
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my $toggle=0;
-	my @loop_data;
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-		my %row_data;
-		if ($toggle eq 0){
-			$toggle=1;
-		} else {
-			$toggle=0;
-		}
-		$row_data{toggle} = $toggle;
-		$row_data{subcategorycode} = $results->[$i]{subcategorycode};
-		$row_data{description} = $results->[$i]{description};
-		$row_data{itemtypecodes} = $results->[$i]{itemtypecodes};
-		push(@loop_data, \%row_data);
-	}
-	$template->param(loop => \@loop_data);
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(previous => "$script_name?offset=".$prevpage);
-	}
-	if ($offset+$pagesize<$count) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(next => "$script_name?offset=".$nextpage);
-	}
-} #---- END $OP eq DEFAULT
-output_html_with_http_headers $input, $cookie, $template->output;
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: admin/koha-electronic.pl
===================================================================
RCS file: admin/koha-electronic.pl
diff -N admin/koha-electronic.pl
--- admin/koha-electronic.pl	27 Sep 2006 21:19:21 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,102 +0,0 @@
-#!/usr/bin/perl
-
-# Script to manage the opac news.
-# written 11/04
-# Castañeda, Carlos Sebastian - seba3c at yahoo.com.ar - Physics Library UNLP Argentina
-
-# 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::Auth;
-use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::NewsChannels;
-
-
-my $cgi = new CGI;
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/koha-electronic.tmpl",
-			     query => $cgi,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     debug => 1,
-			     });
-
-my $op = $cgi->param('op');
-
-if ($op eq 'add_form') {
-	$template->param(add_form => 1);
-	my $id = $cgi->param("id");
-	my $edata;
-# warn "add_form";	
-	if ($id) {
-		$template->param(op => 'edit');
-		$edata = get_opac_electronic($id);
-		$template->param($edata);
-		$template->param(id => $edata->{'idelectronic'});
-	} else {
-		$template->param(op => 'add');
-	}
-	
-} elsif ($op eq 'add') {
-# warn "add";
-	my $title	= $cgi->param('title');
-	my $edata	= $cgi->param('edata');
-	my $lang	= $cgi->param('lang');
-	my $image	= $cgi->param('image');
-	my $href	= $cgi->param('href');
-	my $section	= $cgi->param('section');
-	add_opac_electronic($title, $edata, $lang,$image, $href,$section);
-	print $cgi->redirect('/cgi-bin/koha/admin/koha-electronic.pl');
-
-} elsif ($op eq 'edit') {
-# warn "edit";
-	my $id		= $cgi->param('id');
-	my $title	= $cgi->param('title');
-	my $edata	= $cgi->param('edata');
-	my $lang	= $cgi->param('lang');
-	my $image	= $cgi->param('image');
-	my $href	= $cgi->param('href');
-	my $section	= $cgi->param('section');
-	upd_opac_electronic($id, $title, $edata, $lang,$image,$href,$section);
-	print $cgi->redirect('/cgi-bin/koha/admin/koha-electronic.pl');
-
-} elsif ($op eq 'del') {
-# warn "del";
-	my @ids = $cgi->param('ids');
-	del_opac_electronic(join ",", @ids);
-	print $cgi->redirect('/cgi-bin/koha/admin/koha-electronic.pl');
-
-} else { 
-# warn "else";
-
-	my $lang = $cgi->param('lang');
-
-	my ($opac_electronic_count, $opac_electronic) = &get_opac_electronics(undef, $lang);
-	$template->param($lang => 1);
-	$template->param(opac_electronic => $opac_electronic);
-	$template->param(opac_electronic_count => $opac_electronic_count);
-
-}
-
-output_html_with_http_headers $cgi, $cookie, $template->output;

Index: admin/koha-news.pl
===================================================================
RCS file: admin/koha-news.pl
diff -N admin/koha-news.pl
--- admin/koha-news.pl	1 Sep 2006 22:03:00 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,95 +0,0 @@
-#!/usr/bin/perl
-
-# Script to manage the opac news.
-# written 11/04
-# Castañeda, Carlos Sebastian - seba3c at yahoo.com.ar - Physics Library UNLP Argentina
-
-# 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::Auth;
-use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::NewsChannels;
-
-
-my $cgi = new CGI;
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/koha-news.tmpl",
-			     query => $cgi,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {management => 1},
-			     debug => 1,
-			     });
-
-my $op = $cgi->param('op');
-
-if ($op eq 'add_form') {
-	$template->param(add_form => 1);
-	my $id = $cgi->param("id");
-	my $new;
-	
-	if ($id) {
-		$template->param(op => 'edit');
-		$new = get_opac_new($id);
-		$template->param($new);
-		$template->param(id => $new->{'idnew'});
-	} else {
-		$template->param(op => 'add');
-	}
-	
-} elsif ($op eq 'add') {
-
-	my $title	= $cgi->param('title');
-	my $new		= $cgi->param('new');
-	my $lang	= $cgi->param('lang');
-
-	add_opac_new($title, $new, $lang);
-	print $cgi->redirect('/cgi-bin/koha/admin/koha-news.pl');
-
-} elsif ($op eq 'edit') {
-
-	my $id		= $cgi->param('id');
-	my $title	= $cgi->param('title');
-	my $new		= $cgi->param('new');
-	my $lang	= $cgi->param('lang');
-
-	upd_opac_new($id, $title, $new, $lang);
-	print $cgi->redirect('/cgi-bin/koha/admin/koha-news.pl');
-
-} elsif ($op eq 'del') {
-	my @ids = $cgi->param('ids');
-	del_opac_new(join ",", @ids);
-	print $cgi->redirect('/cgi-bin/koha/admin/koha-news.pl');
-
-} else { 
-
-	my $lang = $cgi->param('lang');
-	my ($opac_news_count, $opac_news) = &get_opac_news(undef, $lang);
-	$template->param($lang => 1);
-	$template->param(opac_news => $opac_news);
-	$template->param(opac_news_count => $opac_news_count);
-
-}
-
-output_html_with_http_headers $cgi, $cookie, $template->output;

Index: admin/koha_attr.pl
===================================================================
RCS file: admin/koha_attr.pl
diff -N admin/koha_attr.pl
--- admin/koha_attr.pl	15 Nov 2006 01:41:51 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,321 +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::Auth;
-use C4::Koha;
-use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Search;
-
-
-# retrieve parameters
-my $input = new CGI;
-
-my $searchfield=$input->param('searchfield');
-$searchfield="" unless $searchfield;
-my $id=$input->param('id');
-my $offset=$input->param('offset');
-$offset=0 unless $offset;
-my $op = $input->param('op');
-my $dspchoice = $input->param('select_display');
-my $pagesize=20;
-my @results = ();
-my $script_name="/cgi-bin/koha/admin/koha_attr.pl";
-
-my $dbh = C4::Context->dbh;
-my $sth;
-# open template
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "admin/koha_attr.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     debug => 1,
-			     });
-
-
-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') {
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $data;
-	if ($id) {
-		$sth=$dbh->prepare("select id,kohafield,attr,label,sorts,recordtype,tagfield,tagsubfield,opacshow,intrashow from koha_attr where id=? ");
-		$sth->execute($id);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-	my $sth = $dbh->prepare("select authorised_value from authorised_values where category='recordtype'");
-	$sth->execute;
-	my @authorised_values;
-	#push @authorised_values,"";
-	while ((my $category) = $sth->fetchrow_array) {
-		push @authorised_values, $category;
-	}
-	my $recordlist  = CGI::scrolling_list(-name=>'recordtype',
-			-values=> \@authorised_values,
-			-size=>1,
-			-multiple=>0,
-			-default => $data->{'recordtype'},
-			);
-	my $sth = $dbh->prepare("select authorised_value from authorised_values where category='mfield' order by lib");
-	$sth->execute;
-	my @authorised_values;
-	#push @authorised_values,"";
-	while ((my $category) = $sth->fetchrow_array) {
-		push @authorised_values, $category;
-	}
-	my $taglist  = CGI::scrolling_list(-name=>'tagfield',
-			-values=> \@authorised_values,
-			-size=>1,
-			-multiple=>0,
-			-default => $data->{'tagfield'},
-			);
-	my $sth = $dbh->prepare("select authorised_value from authorised_values where category='subfield' order by lib ");
-	$sth->execute;
-	my @authorised_values;
-	#push @authorised_values,"";
-	while ((my $category) = $sth->fetchrow_array) {
-		push @authorised_values, $category;
-	}
-	my $tagsublist  = CGI::scrolling_list(-name=>'tagsubfield',
-			-values=> \@authorised_values,
-			-size=>1,
-			-multiple=>0,
-			-default => $data->{'tagsubfield'},
-			);
-	
-	if ($searchfield) {
-		$template->param(action => "Modify tag",id=>$id ,searchfield => "<input type=\"hidden\" name=\"kohafield\" value=\"$searchfield\" />$searchfield");
-		$template->param('heading-modify-tag-p' => 1);
-	} else {
-		$template->param(action => "Add tag",
-								searchfield => "<input type=\"text\" name=\"kohafield\" size=\"40\" maxlength=\"80\" />");
-		$template->param('heading-add-tag-p' => 1);
-	}
-	$template->param('use-heading-flags-p' => 1);
-	$template->param(label => $data->{'label'},
-			attr=> $data->{'attr'},
-			recordtype=>$recordlist,
-			tagfield=>$taglist,
-			tagsubfield=>$tagsublist,
-			sorts => CGI::checkbox(-name=>'sorts',
-					-checked=> $data->{'sorts'}?'checked':'',
-						-value=> 1,
-						-label => '',
-						-id=> 'sorts'),
-			opacshow => CGI::checkbox(-name=>'opacshow',
-						-checked=> $data->{'opacshow'}?'checked':'',
-						-value=> 1,
-						-label => '',
-						-id=> 'opacshow'),
-			intrashow => CGI::checkbox(-name=>'intrashow',
-						-checked=> $data->{'intrashow'}?'checked':'',
-						-value=> 1,
-						-label => '',
-						-id=> 'intrashow'),
-
-
-			);
-													# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-my $id       =$input->param('id');
-
-	$sth=$dbh->prepare("replace koha_attr  set id=?,kohafield=?,attr=?,label=?,sorts=?,recordtype=?,tagfield=?,tagsubfield=? ,opacshow=?,intrashow=? ");
-
-	
-	my $kohafield       =$input->param('kohafield');
-	my $attr       =$input->param('attr');
-	my $label  = $input->param('label');
-	my $sorts =$input->param('sorts');
-	my $opacshow =$input->param('opacshow');
-	my $intrashow =$input->param('intrashow');
-	my $recordtype =$input->param('recordtype');
-	my $tagfield =$input->param('tagfield');
-	my $tagsubfield =$input->param('tagsubfield');
-	unless (C4::Context->config('demo') eq 1) {
-		$sth->execute( $id,$kohafield,$attr,$label,$sorts?1:0,$recordtype,$tagfield,$tagsubfield,$opacshow?1:0,$intrashow?1:0);
-	}
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=koha_attr.pl?searchfield=$kohafield\"></html>";
-
-	exit;
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	$sth=$dbh->prepare("select id,kohafield,label,recordtype from koha_attr where id=? ");
-		$sth->execute($id);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(label => $data->{'label'}."/". $data->{'recordtype'},id=>$data->{'id'},
-							searchfield => $searchfield,
-							);
-													# 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') {
-
-	unless (C4::Context->config('demo') eq 1) {
-		$dbh->do("delete from koha_attr where id=$id ");
-	}
-													# END $OP eq DELETE_CONFIRMED
-
-################## DEFAULT ##################################
-} else { # DEFAULT
-	# here, $op can be unset or set 
-	if  ($searchfield ne '') {
-		 $template->param(searchfield => $searchfield);
-	}
-	my $cnt=0;
-	if ($dspchoice) {
-		#here, user only wants used tags/subfields displayed
-		my $sth=$dbh->prepare("Select * from koha_attr where tagfield <>'' and kohafield >= ? ");
-		#could be ordoned by tab
-		$sth->execute($searchfield);
-
-		while (my $data=$sth->fetchrow_hashref){
-			push(@results,$data);
-			$cnt++;
-		}
-
-		$sth->finish;
-		
-		my $toggle=0;
-		my @loop_data = ();
-		my $j=1;
-		my $i=$offset;
-		while ($i < ($offset+$pagesize<$cnt?$offset+$pagesize:$cnt)) {
-			if ($toggle eq 0){
-				$toggle=1;
-			} else {
-				$toggle=0;
-			}
-			my %row_data;  # get a fresh hash for the row data
-			$row_data{id} = $results[$i]->{'id'};
-			$row_data{kohafield} = $results[$i]->{'kohafield'};
-			$row_data{label} = $results[$i]->{'label'};
-			$row_data{sorts} = $results[$i]->{'sorts'};
-			$row_data{attr} = $results[$i]->{'attr'};
-			$row_data{recordtype} = $results[$i]->{'recordtype'};
-			$row_data{tagfield} = $results[$i]->{'tagfield'};
-			$row_data{tagsubfield} = $results[$i]->{'tagsubfield'};
-			$row_data{opacshow} = $results[$i]->{'opacshow'};
-			$row_data{intrashow} = $results[$i]->{'intrashow'};
-			$row_data{edit} = "$script_name?op=add_form&amp;searchfield=".$results[$i]->{'kohafield'}."&amp;id=".$results[$i]->{'id'};
-			$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results[$i]->{'kohafield'}."&amp;id=".$results[$i]->{'id'};
-			$row_data{toggle} = $toggle;
-			push(@loop_data, \%row_data);
-			$i++;
-		}
-		$template->param(select_display => "True",
-						loop => \@loop_data);
-		$sth->finish;
-	} else {
-		#here, normal old style : display every tags
-		my ($count, at results)=StringSearch($dbh,$searchfield);
-		$cnt = $count;
-		my $toggle=0;
-		my @loop_data = ();
-		for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-			if ($toggle eq 0){
-				$toggle=1;
-			} else {
-				$toggle=0;
-			}
-			my %row_data;  # get a fresh hash for the row data
-			$row_data{id} = $results[$i]->{'id'};
-			$row_data{kohafield} = $results[$i]->{'kohafield'};
-			$row_data{label} = $results[$i]->{'label'};
-			$row_data{sorts} = $results[$i]->{'sorts'};
-			$row_data{attr} = $results[$i]->{'attr'};
-			$row_data{recordtype} = $results[$i]->{'recordtype'};
-			$row_data{tagfield} = $results[$i]->{'tagfield'};
-			$row_data{tagsubfield} = $results[$i]->{'tagsubfield'};
-			$row_data{opacshow} = $results[$i]->{'opacshow'};
-			$row_data{intrashow} = $results[$i]->{'intrashow'};
-			$row_data{edit} = "$script_name?op=add_form&amp;searchfield=".$results[$i]->{'kohafield'}."&amp;id=".$results[$i]->{'id'};
-			$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results[$i]->{'kohafield'}."&amp;id=".$results[$i]->{'id'};
-			$row_data{toggle} = $toggle;
-			push(@loop_data, \%row_data);
-		}
-		$template->param(loop => \@loop_data);
-	}
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(isprevpage => $offset,
-						prevpage=> $prevpage,
-						searchfield => $searchfield,
-						script_name => $script_name,
-						
-		);
-	}
-	if ($offset+$pagesize<$cnt) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(nextpage =>$nextpage,
-						searchfield => $searchfield,
-						script_name => $script_name,
-						
-		);
-	}
-} #---- END $OP eq DEFAULT
-
-$template->param(loggeninuser => $loggedinuser,
-		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-		);
-output_html_with_http_headers $input, $cookie, $template->output;
-
-
-#
-# the sub used for searches
-#
-sub StringSearch  {
-	my ($dbh,$searchstring)=@_;
-	my $sth=$dbh->prepare("Select * from koha_attr  where kohafield >=?  order by kohafield");
-	$sth->execute($searchstring);
-	my @dataresults;
-	while (my $data=$sth->fetchrow_hashref){
-	push(@dataresults,$data);
-
-	}
-
-	$sth->finish;
-	return (scalar(@dataresults), at dataresults);
-}
-
-
-

Index: admin/letter.pl
===================================================================
RCS file: admin/letter.pl
diff -N admin/letter.pl
--- admin/letter.pl	5 Aug 2005 15:51:43 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,229 +0,0 @@
-#!/usr/bin/perl
-
-#script to administer the aqbudget table
-#written 20/02/2002 by paul.poulain at 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::Date;
-use C4::Auth;
-use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Search;
-use HTML::Template;
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from letter where (code like ?) order by module,code");
-	$sth->execute("$data[0]%");
-	my @results;
-	my $cnt=0;
-	while (my $data=$sth->fetchrow_hashref){
-	push(@results,$data);
-	$cnt ++;
-	}
-	#  $sth->execute;
-	$sth->finish;
-	return ($cnt,\@results);
-}
-
-my $input = new CGI;
-my $searchfield=$input->param('searchfield');
-my $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/letter.pl";
-my $code=$input->param('code');
-my $module = $input->param('module');
-my $pagesize=20;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-my $dbh = C4::Context->dbh;
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "parameters/letter.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {tools => 1},
-			     debug => 1,
-			     });
-
-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
-}
-
-$template->param(action => $script_name);
-################## ADD_FORM ##################################
-# called by default. Used to create form to add or  modify a record
-if ($op eq 'add_form') {
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $letter;
-	if ($code) {
-		my $sth=$dbh->prepare("select * from letter where module=? and code=?");
-		$sth->execute($module,$code);
-		$letter=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-	# build field list
-	my @SQLfieldname;
-	my %line = ('value' => "LibrarianFirstname", 'text' => 'LibrarianFirstname');
-	push @SQLfieldname, \%line;
-	my %line = ('value' => "LibrarianSurname", 'text' => 'LibrarianSurname');
-	push @SQLfieldname, \%line;
-	my %line = ('value' => "LibrarianEmailaddress", 'text' => 'LibrarianEmailaddress');
-	push @SQLfieldname, \%line;
-	my $sth2=$dbh->prepare("SHOW COLUMNS from branches");
-	$sth2->execute;
-	my %line = ('value' => "", 'text' => '---BRANCHES---');
-	push @SQLfieldname, \%line;
-	while ((my $field) = $sth2->fetchrow_array) {
-		my %line = ('value' => "branches.".$field, 'text' => "branches.".$field);
-		push @SQLfieldname, \%line;
-	}
-	my $sth2=$dbh->prepare("SHOW COLUMNS from biblio");
-	$sth2->execute;
-	my %line = ('value' => "", 'text' => '---BIBLIO---');
-
-	push @SQLfieldname, \%line;
-	while ((my $field) = $sth2->fetchrow_array) {
-		# note : %line is redefined, otherwise \%line contains the same value for every entry of the list
-		my %line = ('value' => "biblio.".$field, 'text' => "biblio.".$field);
-		push @SQLfieldname, \%line;
-	}
-	my $sth2=$dbh->prepare("SHOW COLUMNS from biblioitems");
-	$sth2->execute;
-	my %line = ('value' => "", 'text' => '---BIBLIOITEMS---');
-	push @SQLfieldname, \%line;
-	while ((my $field) = $sth2->fetchrow_array) {
-		my %line = ('value' => "biblioitems.".$field, 'text' => "biblioitems.".$field);
-		push @SQLfieldname, \%line;
-	}
-	my %line = ('value' => "", 'text' => '---ITEMS---');
-	push @SQLfieldname, \%line;
-	my %line = ('value' => "items.content", 'text' => 'items.content');
-	push @SQLfieldname, \%line;
-	
-	my $sth2=$dbh->prepare("SHOW COLUMNS from borrowers");
-	$sth2->execute;
-	my %line = ('value' => "", 'text' => '---BORROWERS---');
-	push @SQLfieldname, \%line;
-	while ((my $field) = $sth2->fetchrow_array) {
-		my %line = ('value' => "borrowers.".$field, 'text' => "borrowers.".$field);
-		push @SQLfieldname, \%line;
-	}
-	if ($code) {
-	    $template->param(modify => 1);
-	    $template->param(code => $letter->{code});
-	} else {
-	    $template->param(adding => 1);
-	}
-	$template->param(name => $letter->{name},title => $letter->{title},
-					content => $letter->{content},
-					$letter->{module} => 1,
-					SQLfieldname => \@SQLfieldname,);
-													# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("replace letter (module,code,name,title,content) values (?,?,?,?,?)");
-	$sth->execute($input->param('module'),$input->param('code'),$input->param('name'),$input->param('title'),$input->param('content'));
-	$sth->finish;
-	 print $input->redirect("letter.pl");
-	 exit;
-# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select * from letter where code=?");
-	$sth->execute($code);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(module => $data->{module});
-	$template->param(code => $code);
-	$template->param(name => $data->{'name'});
-	$template->param(content => $data->{'content'});
-													# 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') {
-	my $dbh = C4::Context->dbh;
-	my $code=uc($input->param('code'));
-	my $module=$input->param('module');
-	my $sth=$dbh->prepare("delete from letter where module=? and code=?");
-	$sth->execute($module,$code);
-	$sth->finish;
-	 print $input->redirect("letter.pl");
-	 return;
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	if  ($searchfield ne '') {
-	        $template->param(search => 1);
-		$template->param(searchfield => $searchfield);
-	}
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my $toggle="white";
-	my @loop_data =();
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-	  	if ($toggle eq 'white'){
-	    		$toggle="#ffffcc";
-	  	} else {
-	    		$toggle="white";
-	  	}
-	   my %row_data;
-	   $row_data{toggle} = $toggle;
-	   $row_data{module} = $results->[$i]{'module'};
-	   $row_data{code} = $results->[$i]{'code'};
-	   $row_data{name} = $results->[$i]{'name'};
-	   push(@loop_data, \%row_data);
-	}
-	$template->param(letter => \@loop_data);
-} #---- END $OP eq DEFAULT
-
-output_html_with_http_headers $input, $cookie, $template->output;
-

Index: admin/mediatype.pl
===================================================================
RCS file: admin/mediatype.pl
diff -N admin/mediatype.pl
--- admin/mediatype.pl	24 Feb 2006 11:15:01 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,200 +0,0 @@
-#!/usr/bin/perl
-# NOTE: 4-character tabs
-
-#script to administer the mediatype table
-#modified from the itemtype script written 20/02/2002 by paul.poulain at free.fr
-#This script written by waylon at robertson.net.nz at 2nd June, 2005
-
-# 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::Output;
-use C4::Search;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-use HTML::Template;
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from mediatypetable where (description like ?) order by mediatypecode");
-	$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 $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/mediatype.pl";
-my $mediatypecode=$input->param('mediatypecode');
-my $pagesize=20;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/mediatype.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1, management => 1},
-			     debug => 1,
-			     });
-
-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') {
-	#start the page and read in includes
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $data;
-    my $itemtypes;
-    my $dbh = C4::Context->dbh;
-    my @itemtypesselected;
-	if ($mediatypecode) {
-    	my $sth=$dbh->prepare("select mediatypecode,description,itemtypecodes from mediatypetable where mediatypecode=?");
-		$sth->execute($mediatypecode);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-        @itemtypesselected = split ( /\|/, $data->{'itemtypecodes'} );
-	}
-
-    my $sth=$dbh->prepare("select description,itemtype from itemtypes order by description");
-    $sth->execute;
-    while (my ($description,$itemtype) = $sth->fetchrow) {
-        $itemtypes .='<td><input type="checkbox" name="itemtypecodes" value="'.$itemtype.'"';
-        if(grep /$itemtype/, at itemtypesselected){
-            $itemtypes .=' checked';
-        }
-        $itemtypes .='>'.$description.'</td>';
-    }
-
-	$template->param(mediatypecode => $mediatypecode,
-							description => $data->{'description'},
-                            itemtypes => $itemtypes
-							);
-;
-													# END $OP eq ADD_FORM
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
-    my @itemtypecodesarray = $input->param('itemtypecodes');
-    my $itemtypecodes=join('|', at itemtypecodesarray);
-	my $sth=$dbh->prepare("replace mediatypetable (mediatypecode,description,itemtypecodes) values (?,?,?)");
-	$sth->execute(
-		$input->param('mediatypecode'),$input->param('description'),
-		$itemtypecodes
-        );
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=mediatype.pl\"></html>";
-	exit;
-													# END $OP eq ADD_VALIDATE
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	#start the page and read in includes
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select mediatypecode,description,itemtypecodes from mediatypetable where mediatypecode=?");
-	$sth->execute($mediatypecode);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-
-	$template->param(mediatypecode => $mediatypecode,
-							description => $data->{'description'},
-							itemtypecodes => $data->{'itemtypecodes'});
-													# 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') {
-	#start the page and read in includes
-	my $dbh = C4::Context->dbh;
-	my $mediatypecode=uc($input->param('mediatypecode'));
-	my $sth=$dbh->prepare("delete from mediatypetable where mediatypecode=?");
-	$sth->execute($mediatypecode);
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=mediatype.pl\"></html>";
-	exit;
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my $toggle=0;
-	my @loop_data;
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-		my %row_data;
-		if ($toggle eq 0){
-			$toggle=1;
-		} else {
-			$toggle=0;
-		}
-		$row_data{toggle} = $toggle;
-		$row_data{mediatypecode} = $results->[$i]{mediatypecode};
-		$row_data{description} = $results->[$i]{description};
-		$row_data{itemtypecodes} = $results->[$i]{itemtypecodes};
-		push(@loop_data, \%row_data);
-	}
-	$template->param(loop => \@loop_data);
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param(previous => "$script_name?offset=".$prevpage);
-	}
-	if ($offset+$pagesize<$count) {
-		my $nextpage =$offset+$pagesize;
-		$template->param(next => "$script_name?offset=".$nextpage);
-	}
-} #---- END $OP eq DEFAULT
-output_html_with_http_headers $input, $cookie, $template->output;
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: admin/printers.pl
===================================================================
RCS file: admin/printers.pl
diff -N admin/printers.pl
--- admin/printers.pl	1 Sep 2006 22:03:00 -0000	1.14
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,185 +0,0 @@
-#!/usr/bin/perl
-
-#script to administer the aqbudget table
-#written 20/02/2002 by paul.poulain at 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::Output;
-use C4::Search;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $query="";
-	my $sth=$dbh->prepare("Select printername,printqueue,printtype from printers where (printername like ?) order by printername");
-	$sth->execute("$data[0]%");
-	my @results;
-	my $cnt=0;
-	while (my $data=$sth->fetchrow_hashref){
-	push(@results,$data);
-	$cnt ++;
-	}
-	#  $sth->execute;
-	$sth->finish;
-	return ($cnt,\@results);
-}
-
-my $input = new CGI;
-my $searchfield=$input->param('searchfield');
-my $pkfield="";
-my $reqsel="";
-my $reqdel="";
-#my $branchcode=$input->param('branchcode');
-my $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/printers.pl";
-
-my $pagesize=20;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "admin/printers.tmpl",
-                             query => $input,
-                             type => "intranet",
-                             authnotrequired => 0,
- 			     flagsrequired => {parameters => 1},
-			      debug => 1,
-                             });
-
-
-$template->param(searchfield => $searchfield,
-		 script_name => $script_name);
-
-#start the page and read in includes
-
-################## 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 ($searchfield) {
-		my $dbh = C4::Context->dbh;
-		my $sth=$dbh->prepare("select printername,printqueue,printtype from printers where printername=?");
-		$sth->execute($searchfield);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-
-	$template->param(printqueue => $data->{'printqueue'},
-			 printtype => $data->{'printtype'});
-													# 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 printers (printername,printqueue,printtype) values (?,?,?)");
-	$sth->execute($input->param('printername'),$input->param('printqueue'),$input->param('printtype'));
-	$sth->finish;
-													# 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 printername,printqueue,printtype from printers where printername=?");
-	$sth->execute($searchfield);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(printqueue => $data->{'printqueue'},
-			 printtype  => $data->{'printtype'});
-	
-													# 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 $sth=$dbh->prepare("delete from printers where printername=?");
-	$sth->execute($searchfield);
-	$sth->finish;
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	$template->param(else => 1);
-
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my $toggle="white";
-	my @loop;
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-		my %row = ( printername => $results->[$i]{'printername'},
-			    printqueue  => $results->[$i]{'printqueue'},
-			    printtype   => $results->[$i]{'printtype'},
-			    toggle      => $toggle);
-		push @loop, \%row;
-
-                if ( $toggle eq 'white' )
-                {
-                        $toggle = '#ffffcc';
-                }
-                else
-                {
-                        $toggle = 'white';
-                }
-	}
-	
-	$template->param(loop => \@loop);
-	
-	if ($offset>0) {
-		$template->param(offsetgtzero => 1,
-				 prevpage => $offset-$pagesize);
-	}
-	print "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
-	if ($offset+$pagesize<$count) {
-		$template->param(ltcount => 1,
-				 nextpage => $offset+$pagesize);
-	}
-
-} #---- END $OP eq DEFAULT
-
-output_html_with_http_headers $input, $cookie, $template->output;
-

Index: admin/roadtype.pl
===================================================================
RCS file: admin/roadtype.pl
diff -N admin/roadtype.pl
--- admin/roadtype.pl	23 May 2006 11:44:23 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,166 +0,0 @@
-#! /usr/bin/perl
-
-# Copyright 2006 SAN OUEST-PROVENCE et Paul POULAIN
-#
-# 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::Search;
-use HTML::Template;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from roadtype where (road_type 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('road_type');
-my $script_name="/cgi-bin/koha/admin/roadtype.pl";
-my $roadtypeid=$input->param('roadtypeid');
-my $op = $input->param('op');
-
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "admin/roadtype.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1, management => 1},
-			     debug => 1,
-			     });
-
-
-$template->param(	script_name => $script_name,
-		 	roadtypeid => $roadtypeid ,
-		 	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 ($roadtypeid) {
-		my $dbh = C4::Context->dbh;
-		my $sth=$dbh->prepare("select roadtypeid,road_type from roadtype where roadtypeid=?");
-		$sth->execute($roadtypeid);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-
-	$template->param(	
-				road_type       => $data->{'road_type'},
-			);
-##############ICI#####################
-# END $OP eq ADD_FORM
-################## ADD_VALIDATE #################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
- 	my $sth;
-	
-	if ($input->param('roadtypeid') ){
-		$sth=$dbh->prepare("replace roadtype (roadtypeid,road_type) values (?,?) ");
-		$sth->execute(map { $input->param($_) } ('roadtypeid','road_type'));
-	
-	}
-	else{	
-		$sth=$dbh->prepare("replace roadtype (road_type) values (?)");
-		$sth->execute(map { $input->param($_) } ('road_type'));
-	}
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=roadtype.pl\"></html>";
-	exit;
-
-# 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 borrowers,roadtype where borrowers.streettype=roadtype.road_type and roadtypeid=?");
-	$sth->execute($roadtypeid);
-	my $total = $sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(total => $total->{'total'});	
-	my $sth2=$dbh->prepare("select roadtypeid,road_type from roadtype where  roadtypeid=?");
-	$sth2->execute($roadtypeid);
-	my $data=$sth2->fetchrow_hashref;
-	$sth2->finish;
-	if ($total->{'total'} >0) {
-		$template->param(totalgtzero => 1);
-	}
-
-        $template->param(	
-				city_name       =>	( $data->{'road_type'}),
-				);
-
-
-													# 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') {
-	my $dbh = C4::Context->dbh;
-	my $categorycode=uc($input->param('roadtypeid'));
-	my $sth=$dbh->prepare("delete from roadtype where roadtypeid=?");
-	$sth->execute($roadtypeid);
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=roadtype.pl\"></html>";
-	exit;
-													# END $OP eq DELETE_CONFIRMED
-} else { # DEFAULT
-	$template->param(else => 1);
-	my $env;
-	my @loop;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my $toggle = 0;
-	for (my $i=0; $i < $count; $i++){
-		my %row = (roadtypeid => $results->[$i]{'roadtypeid'},
-				road_type => $results->[$i]{'road_type'},
-				toggle => $toggle );	
-		push @loop, \%row;
-		if ( $toggle eq 0 )
-		{
-			$toggle = 1;
-		}
-		else
-		{
-			$toggle = 0;
-		}
-	}
-	$template->param(loop => \@loop);
-
-
-} #---- END $OP eq DEFAULT
-output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file

Index: admin/stopwords.pl
===================================================================
RCS file: admin/stopwords.pl
diff -N admin/stopwords.pl
--- admin/stopwords.pl	7 Apr 2006 08:24:36 -0000	1.16
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,171 +0,0 @@
-#!/usr/bin/perl
-
-# 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
-#
-###
-#
-# script to administer the stopwords table
-#
-# - written on 2002/02/20 by paul.poulain at free.fr
-#
-# - experimentaly rewrittten on 2006/04/06 by Pierrick LE GALL (INEO media
-#   system)
-#
-
-use strict;
-use CGI;
-use List::Util qw/min/;
-
-use C4::Koha;
-use C4::Context;
-use C4::Output;
-use C4::Search;
-use HTML::Template;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-sub StringSearch  {
-    my ($searchstring) = @_;
-
-    my $dbh = C4::Context->dbh;
-    $searchstring =~ s/\'/\\\'/g;
-    my @tokens = split(' ',$searchstring);
-
-    my $query = '
-SELECT word
-  FROM stopwords
-  WHERE (word like ?)
-  ORDER BY word
-';
-    my $sth = $dbh->prepare($query);
-    $sth->execute($tokens[0].'%');
-    my @results;
-    while (my $row = $sth->fetchrow_hashref) {
-        push(@results, $row->{word});
-    }
-    $sth->finish;
-
-    return @results;
-}
-
-my $dbh = C4::Context->dbh;
-my $sth;
-my $query;
-my $input = new CGI;
-my $searchfield = $input->param('searchfield');
-my $script_name="/cgi-bin/koha/admin/stopwords.pl";
-
-my $pagesize = 40;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-
-my ($template, $loggedinuser, $cookie) 
-    = get_template_and_user({template_name => "admin/stopwords.tmpl",
-                            query => $input,
-                            type => "intranet",
- 			    flagsrequired => {parameters => 1, management => 1},
-			    authnotrequired => 0,
-                            debug => 1,
-                            });
-
-$template->param(script_name => $script_name,
-		 searchfield => $searchfield);
-
-if ($input->param('add')) {
-    if ($input->param('word')) {
-        my @words = split / |,/, $input->param('word');
-
-        $query = '
-DELETE
-  FROM stopwords
-  WHERE word IN (?'.(',?' x scalar @words - 1).')
-';
-        $sth = $dbh->prepare($query);
-        $sth->execute(@words);
-        $sth->finish;
-
-        $query = '
-INSERT
-  INTO stopwords
-  (word)
-  VALUES
-  (?)'.(',(?)' x scalar @words - 1).'
-';
-        $sth = $dbh->prepare($query);
-        $sth->execute(@words);
-        $sth->finish;
-
-        $template->param(stopword_added => 1);
-    }
-}
-elsif ($input->param('deleteSelected')) {
-    if ($input->param('stopwords[]')) {
-        my @stopwords_loop = ();
-
-        foreach my $word ($input->param('stopwords[]')) {
-            push @stopwords_loop,  {word => $word};
-        }
-
-        $template->param(
-            delete_confirm => 1,
-            stopwords_to_delete => \@stopwords_loop,
-        );
-    }
-}
-elsif ($input->param('confirmDeletion')) {
-    my @words = $input->param('confirmed_stopwords[]');
-
-    $query = '
-DELETE
-  FROM stopwords
-  WHERE word IN (?'.(',?' x scalar @words - 1).')
-';
-    $sth = $dbh->prepare($query);
-    $sth->execute(@words);
-    $sth->finish;
-
-    $template->param(delete_confirmed => 1);
-}
-
-my $page = $input->param('page') || 1;
-
-my @results = StringSearch($searchfield);
-my @loop;
-
-my $first = ($page - 1) * $pagesize;
-
-# if we are on the last page, the number of the last word to display must
-# not exceed the length of the results array
-my $last = min(
-    $first + $pagesize - 1,
-    scalar(@results) - 1,
-);
-
-foreach my $word (@results[$first .. $last]) {
-    push @loop, {word => $word};
-}
-
-$template->param(
-    loop => \@loop,
-    pagination_bar => pagination_bar(
-        $script_name,
-        getnbpages(scalar @results, $pagesize),
-        $page,
-        'page'
-    )
-);
-
-output_html_with_http_headers $input, $cookie, $template->output;

Index: admin/systempreferences.pl
===================================================================
RCS file: admin/systempreferences.pl
diff -N admin/systempreferences.pl
--- admin/systempreferences.pl	15 Nov 2006 01:41:51 -0000	1.36
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,424 +0,0 @@
-#!/usr/bin/perl
-
-#script to administer the systempref table
-#written 20/02/2002 by paul.poulain at 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::Auth;
-use C4::Context;
-use C4::Koha;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Search;
-use C4::Context;
-
-my %tabsysprefs;
-# Acquisitions
-	$tabsysprefs{acquisitions}="Acquisitions";
-	$tabsysprefs{gist}="Acquisitions";
-# Admin
-	$tabsysprefs{dateformat}="Admin";
-	$tabsysprefs{insecure}="Admin";
-	$tabsysprefs{KohaAdmin}="Admin";
-# Authorities
-	$tabsysprefs{authoritysep}="Authorities";
-# Catalogue
-	$tabsysprefs{advancedMARCEditor}="Catalogue";
-	$tabsysprefs{autoBarcode}="Catalogue";
-	$tabsysprefs{hide_marc}="Catalogue";
-	$tabsysprefs{IntranetBiblioDefaultView} = "Catalogue";
-	$tabsysprefs{ISBD}="Catalogue";
-	$tabsysprefs{itemcallnumber}="Catalogue";
-	$tabsysprefs{LabelMARCView}="Catalogue";
-	$tabsysprefs{marc}="Catalogue";
-	$tabsysprefs{marcflavour}="Catalogue";
-	$tabsysprefs{serialsadditems}="Catalogue";
-	$tabsysprefs{sortbynonfiling}="Catalogue";
-	$tabsysprefs{MARCOrgCode}="Catalogue";
-	$tabsysprefs{z3950AuthorAuthFields}="Catalogue";
-	$tabsysprefs{z3950NormalizeAuthor}="Catalogue";
-	$tabsysprefs{SQLorZEBRA}="Catalogue";
-	
-# Circulation
-	$tabsysprefs{maxoutstanding}="Circulation";
-	$tabsysprefs{maxreserves}="Circulation";
-	$tabsysprefs{noissuescharge}="Circulation";
-	$tabsysprefs{patronimages}="Circulation";
-	$tabsysprefs{printcirculationslips}="Circulation";
-	$tabsysprefs{ReturnBeforeExpiry}="Circulation";
-	$tabsysprefs{allowrenewalsbefore}="Circulation";
-	$tabsysprefs{defaultBranch}="Circulation";
-	$tabsysprefs{strictrenewals}="Circulation";
-# Intranet
-	$tabsysprefs{TemplateEncoding}="Intranet";
-	$tabsysprefs{template}="Intranet";
-	$tabsysprefs{intranetstylesheet}="Intranet";
-	$tabsysprefs{IntranetNav}="Intranet";
-	$tabsysprefs{intranetcolorstylesheet}="Intranet";
-	$tabsysprefs{Activate_Log}="Intranet";
-	$tabsysprefs{allowrenewalsbefore}="Intranet";
-	
-	$tabsysprefs{zebrawait}="Intranet";
-	$tabsysprefs{retrieve_from}="Intranet";
-	$tabsysprefs{batchMode}="Intranet";
-	
-# Members
-	$tabsysprefs{automembernum}="Members";
-	$tabsysprefs{checkdigit}="Members";
-	$tabsysprefs{NotifyBorrowerDeparture}="Members";
-# OPAC
-	$tabsysprefs{AmazonAssocTag}="OPAC";
-	$tabsysprefs{AmazonContent}="OPAC";
-	$tabsysprefs{AmazonDevKey}="OPAC";
-	$tabsysprefs{AnonSuggestions}="OPAC";
-	$tabsysprefs{BiblioDefaultView}="OPAC";
-	$tabsysprefs{Disable_Dictionary}="OPAC";
-	$tabsysprefs{hidelostitems}="OPAC";
-	$tabsysprefs{LibraryName}="OPAC";
-	$tabsysprefs{opacbookbag}="OPAC";
-	$tabsysprefs{opaccolorstylesheet}="OPAC";
-	$tabsysprefs{opaccredits}="OPAC";
-	$tabsysprefs{opaclanguages}="OPAC";
-	$tabsysprefs{opaclanguagesdisplay}="OPAC";
-	$tabsysprefs{opaclargeimage}="OPAC";
-	$tabsysprefs{opaclayoutstylesheet}="OPAC";
-	$tabsysprefs{OpacNav}="OPAC";
-	$tabsysprefs{OpacPasswordChange}="OPAC";
-	$tabsysprefs{opacreadinghistory}="OPAC";
-	$tabsysprefs{opacsmallimage}="OPAC";
-	$tabsysprefs{opacstylesheet}="OPAC";
-	$tabsysprefs{opacthemes}="OPAC";
-	$tabsysprefs{opacuserlogin}="OPAC";
-	$tabsysprefs{SubscriptionHistory}="OPAC";
-	$tabsysprefs{suggestion}="OPAC";
-	$tabsysprefs{virtualshelves}="OPAC";
-	$tabsysprefs{opacheader}="OPAC";
-	$tabsysprefs{allowrenewsfromopac}="OPAC";
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my @results;
-	my $cnt=0;
-	if ($type){
-		foreach my $syspref (sort keys %tabsysprefs){
-			if ($tabsysprefs{$syspref} eq $type){
-				my $sth=$dbh->prepare("Select variable,value,explanation,type,options from systempreferences where (variable like ?) order by variable");
-				$sth->execute($syspref);
-				while (my $data=$sth->fetchrow_hashref){
-					$data->{value} =~ s/</&lt;/g;
-					$data->{value} =~ s/>/&lt;/g;
-					$data->{value}=substr($data->{value},0,100)."..." if length($data->{value}) >100;
-					push(@results,$data);
-					$cnt++;
-				}
-				$sth->finish;
-			}
-		}
-	} else {
-		my $strsth ="Select variable,value,explanation,type,options from systempreferences where variable not in (";  
-		foreach my $syspref (keys %tabsysprefs){
-			$strsth .= $dbh->quote($syspref).",";
-		}
-		$strsth =~ s/,$/) /;
-		$strsth .= " order by variable";
-		#warn $strsth;
-		my $sth=$dbh->prepare($strsth);
-		$sth->execute();
-		while (my $data=$sth->fetchrow_hashref){
-			$data->{value}=substr($data->{value},0,100);
-			push(@results,$data);
-			$cnt++;
-		}
-		$sth->finish;
-	}
-	return ($cnt,\@results);
-}
-
-my $input = new CGI;
-my $searchfield=$input->param('searchfield');
-my $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/systempreferences.pl";
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "admin/systempreferences.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {parameters => 1},
-			     debug => 1,
-			     });
-my $pagesize=100;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-
-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
-}
-
-if ($op eq 'update_and_reedit') {
-	foreach ($input->param) {
-	}
-	my $value='';
-	if (my $currentorder=$input->param('currentorder')) {
-		my @currentorder=split /\|/, $currentorder;
-		my $orderchanged=0;
-		foreach my $param ($input->param) {
-			if ($param=~m#up-(\d+).x#) {
-				my $temp=$currentorder[$1];
-				$currentorder[$1]=$currentorder[$1-1];
-				$currentorder[$1-1]=$temp;
-				$orderchanged=1;
-				last;
-			} elsif ($param=~m#down-(\d+).x#) {
-				my $temp=$currentorder[$1];
-				$currentorder[$1]=$currentorder[$1+1];
-				$currentorder[$1+1]=$temp;
-				$orderchanged=1;
-				last;
-			}
-		}
-		$value=join ' ', @currentorder;
-		if ($orderchanged) {
-			$op='add_form';
-			$template->param(script_name => $script_name,
-							$op              => 1); # we show only the TMPL_VAR names $op
-		} else {
-			$op='';
-			$searchfield='';
-			$template->param(script_name => $script_name,
-							else              => 1); # we show only the TMPL_VAR names $op
-		}
-	}
-	my $dbh = C4::Context->dbh;
-	my $query="select * from systempreferences where variable=?";
-	my $sth=$dbh->prepare($query);
-	$sth->execute($input->param('variable'));
-	if ($sth->rows) {
-		unless (C4::Context->config('demo') eq 1) {
-			my $sth=$dbh->prepare("update systempreferences set value=?,explanation=?,type=?,options=? where variable=?");
-			$sth->execute($value, $input->param('explanation'), $input->param('variable'), $input->param('preftype'), $input->param('prefoptions'));
-			$sth->finish;
-		}
-    } else {
-		unless (C4::Context->config('demo') eq 1) {
-			my $sth=$dbh->prepare("insert into systempreferences (variable,value,explanation) values (?,?,?,?,?)");
-			$sth->execute($input->param('variable'), $input->param('value'), $input->param('explanation'), $input->param('preftype'), $input->param('prefoptions'));
-			$sth->finish;
-		}
-	}
-	$sth->finish;
-
-}
-
-################## ADD_FORM ##################################
-# called by default. Used to create form to add or  modify a record
-
-if ($op eq 'add_form') {
-	#---- if primkey exists, it's a modify action, so read values to modify...
-	my $data;
-	if ($searchfield) {
-		my $dbh = C4::Context->dbh;
-		my $sth=$dbh->prepare("select variable,value,explanation,type,options from systempreferences where variable=?");
-		$sth->execute($searchfield);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-		$template->param(modify => 1);
-	}
-
-	my @options;
-	foreach my $option (split(/\|/, $data->{'options'})) {
-		my $selected='0';
-		$option eq $data->{'value'} and $selected=1;
-		push @options, { option => $option, selected => $selected };
-	}
-	if ($data->{'type'} eq 'Choice') {
-		$template->param('type-choice' => 1);
-	} elsif ($data->{'type'} eq 'YesNo') {
-		$template->param('type-yesno' => 1);
-		$data->{'value'}=C4::Context->boolean_preference($data->{'variable'});
-		($data->{'value'} eq '1') ? ($template->param('value-yes'=>1)) : ($template->param('value-no'=>1));
-	} elsif ($data->{'type'} eq 'Integer') {
-		$template->param('type-free' => 1);
-		$template->param('fieldlength' => $data->{'options'});
-	} elsif ($data->{'type'} eq 'Textarea') {
-		$template->param('type-textarea' => 1);
-		$data->{options} =~ /(.*)\|(.*)/;
-		$template->param('cols' => $1, 'rows' => $2);;
-	} elsif ($data->{'type'} eq 'Float') {
-		$template->param('type-free' => 1);
-		$template->param('fieldlength' => $data->{'options'});
-	} elsif ($data->{'type'} eq 'Themes') {
-		$template->param('type-choice' => 1);
-		my $type='';
-		($data->{'variable'}=~m#opac#i) ? ($type='opac') : ($type='intranet');
-		@options=();
-		my $currently_selected_themes;
-		my $counter=0;
-		foreach my $theme (split /\s+/, $data->{'value'}) {
-		    push @options, { option => $theme, counter => $counter };
-		    $currently_selected_themes->{$theme}=1;
-		    $counter++;
-		}
-		foreach my $theme (getallthemes($type)) {
-			my $selected='0';
-			next if $currently_selected_themes->{$theme};
-			push @options, { option => $theme, counter => $counter };
-			$counter++;
-		}
-	} elsif ($data->{'type'} eq 'Languages') {
-		$template->param('type-choice' => 1);
-		my $type='';
-		@options=();
-		my $currently_selected_languages;
-		my $counter=0;
-		foreach my $language (split /\s+/, $data->{'value'}) {
-		    next if $language eq 'images';
-		    push @options, { option => $language, counter => $counter };
-		    $currently_selected_languages->{$language}=1;
-		    $counter++;
-		}
-		foreach my $language (getalllanguages()) {
-			next if $language eq 'images';
-			my $selected='0';
-			next if $currently_selected_languages->{$language};
-			push @options, { option => $language, counter => $counter };
-			$counter++;
-		}
-	} else {
-		$template->param('type-free' => 1);
-		$template->param('fieldlength' => $data->{'options'}>0?$data->{'options'}:60);
-	}
-	$template->param(explanation => $data->{'explanation'},
-			 value => $data->{'value'},
-			 type => $data->{'type'},
-			 options => \@options,
-			 preftype => $data->{'type'},
-			 prefoptions => $data->{'options'},
-			 searchfield => $searchfield);
-
-################## ADD_VALIDATE ##################################
-# called by add_form, used to insert/modify data in DB
-} elsif ($op eq 'add_validate') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select * from systempreferences where variable=?");
-	$sth->execute($input->param('variable'));
-	if ($sth->rows) {
-		unless (C4::Context->config('demo') eq 1) {
-			my $sth=$dbh->prepare("update systempreferences set value=?,explanation=?,type=?,options=? where variable=?");
-			$sth->execute($input->param('value'), $input->param('explanation'), $input->param('preftype'), $input->param('prefoptions'), $input->param('variable'));
-			$sth->finish;
-		}
-	} else {
-		unless (C4::Context->config('demo') eq 1) {
-			my $sth=$dbh->prepare("insert into systempreferences (variable,value,explanation,type,options) values (?,?,?,?,?)");
-			$sth->execute($input->param('variable'), $input->param('value'), $input->param('explanation'), $input->param('preftype'), $input->param('prefoptions'));
-			$sth->finish;
-		}
-	}
-	$sth->finish;
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=systempreferences.pl?tab=".$tabsysprefs{$input->param('variable')}."\"></html>";
-	exit;
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select variable,value,explanation,type,options from systempreferences where variable=?");
-	$sth->execute($searchfield);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(searchfield => $searchfield,
-							Tvalue => $data->{'value'},
-							);
-
-													# 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') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("delete from systempreferences where variable=?");
-	$sth->execute($searchfield);
-	$sth->finish;
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	#Adding tab management for system preferences
-	my $tab=$input->param('tab');
-	
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,$tab);
-	my $toggle=0;
-	my @loop_data = ();
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-	  	if ($toggle eq 0){
-			$toggle=1;
-	  	} else {
-			$toggle=0;
-	  	}
-		my %row_data;  # get a fresh hash for the row data
-		$row_data{variable} = $results->[$i]{'variable'};
-		$row_data{value} = $results->[$i]{'value'};
-		$row_data{explanation} = $results->[$i]{'explanation'};
-		$row_data{toggle} = $toggle;
-		$row_data{edit} = "$script_name?op=add_form&amp;searchfield=".$results->[$i]{'variable'};
-		$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results->[$i]{'variable'};
-		push(@loop_data, \%row_data);
-	}
-	$tab=($tab?$tab:"Others");
-	$template->param(loop => \@loop_data, $tab => 1);
-	if ($offset>0) {
-		my $prevpage = $offset-$pagesize;
-		$template->param("<a href=$script_name?offset=".$prevpage.'&lt;&lt; Prev</a>');
-	}
-	if ($offset+$pagesize<$count) {
-		my $nextpage =$offset+$pagesize;
-		$template->param("a href=$script_name?offset=".$nextpage.'Next &gt;&gt;</a>');
-	}
-} #---- 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;

Index: admin/thesaurus.pl
===================================================================
RCS file: admin/thesaurus.pl
diff -N admin/thesaurus.pl
--- admin/thesaurus.pl	1 Sep 2006 22:03:00 -0000	1.14
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,266 +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::Auth;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use C4::Output;
-use C4::Search;
-use C4::Authorities;
-
-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 => "<input type=\"hidden\" name=\"category\" value='$data->{'category'}'>$data->{'category'}");
-	} else {
-		$template->param(category => "<input type=text name=\"category\" size=8 maxlength=8>");
-	}
-################## 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<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=thesaurus.pl?branch=$branch&search_category=$search_category&searchstring=$searchstring&offset=$offset\"></html>";
-	exit;
-################## MOD_VALIDATE ##################################
-# called by add_form, used to modify data in DB
-} elsif ($op eq 'mod_validate') {
-	my $dbh = C4::Context->dbh;
-	my $freelib = $input->param('freelib');
-	modauthority($dbh,$id,$freelib);
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=thesaurus.pl?branch=$branch&search_category=$search_category&offset=$offset&searchstring=".CGI::escapeHTML($searchstring)."\"></html>";
-	exit;
-################## DELETE_CONFIRM ##################################
-# called by default form, used to confirm deletion of data in DB
-} elsif ($op eq 'delete_confirm') {
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select category,stdlib,freelib from bibliothesaurus where id=?");
-	$sth->execute($id);
-	my $data=$sth->fetchrow_hashref;
-	$sth->finish;
-	$template->param(search_category => $search_category,
-							Tvalue => $data->{'stdlib'},
-							id =>$id,
-							);
-
-													# 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') {
-	&delauthority($id);
-	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=thesaurus.pl?search_category=$search_category&searchstring=$searchstring\"></html>";
-	exit;
-													# END $OP eq DELETE_CONFIRMED
-################## DETAIL_FORM ##################################
-} elsif ($op eq 'detail_form') {
-	# build categories list
-	my $sth = $dbh->prepare("select distinct category from bibliothesaurus");
-	$sth->execute;
-	my @category_list;
-	while ( my ($category) = $sth->fetchrow_array) {
-		push(@category_list,$category);
-	}
-	my $tab_list = CGI::scrolling_list(-name=>'search_category',
-			-values=> \@category_list,
-			-default=>"$search_category",
-			-size=>1,
-			-multiple=>0,
-			);
-	if (!$search_category) {
-		$search_category=$category_list[0];
-	}
-	my $env;
-	my $sth = $dbh->prepare("select father,stdlib,category,hierarchy from bibliothesaurus where id=?");
-	$sth->execute($id);
-	my ($father,$stdlib,$category,$suphierarchy) = $sth->fetchrow_array;
-	$sth->finish;
-	$sth= $dbh->prepare("select id,freelib from bibliothesaurus where father=? and stdlib=?");
-	$sth->execute($father,$stdlib);
-	my $toggle="white";
-	# builds value list
-	my @loop_data;
-	while ( my ($id,$freelib) = $sth->fetchrow_array) {
-	  	if ($toggle eq 'white'){
-			$toggle="#ffffcc";
-	  	} else {
-			$toggle="white";
-	  	}
-		my %row_data;  # get a fresh hash for the row data
-		$row_data{freelib} = $freelib;
-		$row_data{edit} = "$script_name?op=add_form&id=$id";
-		$row_data{delete} = "$script_name?op=delete_confirm&search_category=$search_category&id=$id";
-		push(@loop_data, \%row_data);
-	}
-
-	$template->param(loop => \@loop_data,
-							tab_list => $tab_list,
-							category => $search_category,
-#							toponly => $toponly,
-							searchstring => $searchstring,
-							stdlib => $stdlib,
-							category => $category);
-################## DEFAULT ##################################
-} else { # DEFAULT
-	# build categories list
-	my $sth = $dbh->prepare("select distinct category from bibliothesaurus");
-	$sth->execute;
-	my @category_list;
-	while ( my ($category) = $sth->fetchrow_array) {
-		push(@category_list,$category);
-	}
-	my $tab_list = CGI::scrolling_list(-name=>'search_category',
-			-values=> \@category_list,
-			-default=>"$search_category",
-			-size=>1,
-			-multiple=>0,
-			);
-	if (!$search_category) {
-		$search_category=$category_list[0];
-	}
-	my $env;
-	my ($count,$results)=searchauthority($env,$search_category,$branch,$searchstring,$offset,$pagesize);
-	my $toggle="white";
-	my @loop_data = ();
-	# builds value list
-	for (my $i=0; $i < $pagesize; $i++){
-		if ($results->[$i]{'stdlib'}) {
-			if ($toggle eq 'white'){
-				$toggle="#ffffcc";
-			} else {
-				$toggle="white";
-			}
-			my %row_data;  # get a fresh hash for the row data
-			$row_data{category} = $results->[$i]{'category'};
-#			$row_data{stdlib} = ("&nbsp;&nbsp;&nbsp;&nbsp;" x $results->[$i]{'level'}).$results->[$i]{'stdlib'};
-			$row_data{stdlib} = $results->[$i]{'stdlib'};
-			$row_data{freelib} = $results->[$i]{'freelib'};
-			$row_data{freelib} =~ s/($searchstring)/<b>$1<\/b>/gi;
-			$row_data{father} = $results->[$i]{'father'};
-			$row_data{dig} ="<a href=thesaurus.pl?branch=$results->[$i]{'hierarchy'}$results->[$i]{'id'}|&search_category=$search_category>";
-			$row_data{related} ="<a href=thesaurus.pl?id=$results->[$i]{'id'}&search_category=$search_category&op=detail_form>";
-			$row_data{edit} = "$script_name?op=add_form&branch=$branch&search_category=$search_category&searchstring=$searchstring&offset=$offset&id=".$results->[$i]{'id'};
-			$row_data{delete} = "$script_name?op=delete_confirm&search_category=$search_category&id=".$results->[$i]{'id'};
-			push(@loop_data, \%row_data);
-		}
-	}
-	# rebuild complete hierarchy
-	my  $sth = $dbh->prepare("select stdlib from bibliothesaurus where id=?");
-	my @hierarchy = split(/\|/,$branch);
-	my @hierarchy_loop;
-	my $x;
-	my $father;
-	for (my $xi=0;$xi<=$#hierarchy;$xi++) {
-		my %link;
-		$sth->execute($hierarchy[$xi]);
-		my ($t) = $sth->fetchrow_array;
-		$x.=$hierarchy[$xi]."|";
-		$link{'string'}=$t;
-		$link{'branch'}=$x;
-		push (@hierarchy_loop, \%link);
-		$father .= $t." $authoritysep ";
-	}
-	$template->param(loop => \@loop_data,
-							tab_list => $tab_list,
-							category => $search_category,
-#							toponly => $toponly,
-							searchstring => $searchstring,
-							hierarchy_loop => \@hierarchy_loop,
-							branch => $branch,
-							father => $father);
-	if ($offset>0) {
-		$template->param(previous => "$script_name?branch=$branch&search_category=$search_category&searchstring=$searchstring&offset=$prevpage");
-	}
-	if ($pagesize<$count) {
-		$template->param(next => "$script_name?branch=$branch&search_category=$search_category&searchstring=$searchstring&offset=$nextpage");
-	}
-} #---- END $OP eq DEFAULT
-
-output_html_with_http_headers $input, $cookie, $template->output;

Index: admin/viewlog.pl
===================================================================
RCS file: admin/viewlog.pl
diff -N admin/viewlog.pl
--- admin/viewlog.pl	11 Sep 2006 17:41:54 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,148 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: viewlog.pl,v 1.4 2006/09/11 17:41:54 tgarip1957 Exp $
-
-# 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 C4::Auth;
-use CGI;
-use C4::Context;
-use C4::Koha;
-use C4::Interface::CGI::Output;
-use C4::Log;
-use Date::Manip;
-
-=head1 NAME
-
-plugin that shows a stats on catalogers
-
-=head1 DESCRIPTION
-
-
-=over2
-
-=cut
-
-my $input = new CGI;
-my $do_it=$input->param('do_it');
-my $fullreportname = "parameters/viewlog.tmpl";
-my $modulename = $input->param("module");
-my $userfilter = $input->param("user");
-my $actionfilter = $input->param("action");
-my $fromfilter = $input->param("from");
-my $tofilter = $input->param("to");
-my $basename = $input->param("basename");
-my $mime = $input->param("MIME");
-my $del = $input->param("sep");
-my $output = $input->param("output");
-
-
-my ($template, $borrowernumber, $cookie)
-	= get_template_and_user({template_name => $fullreportname,
-				query => $input,
-				type => "intranet",
-				authnotrequired => 0,
-				flagsrequired => {editcatalogue => 1},
-				debug => 1,
-				});
-$template->param(do_it => $do_it);
-if ($do_it) {
-# Displaying results
-	#building filters
-	my @filters;
-	push @filters, {name=> 'user', value=> $userfilter} if ($userfilter);
-	push @filters, {name=> 'action', value=> $actionfilter} if ($actionfilter);
-	push @filters, {name=> 'from', value=> $fromfilter} if ($fromfilter);
-	push @filters, {name=> 'to', value=> $tofilter} if ($tofilter);
-	if ($modulename eq "catalogue"){
-		my $titlefilter = $input->param("title");
-		my $authorfilter = $input->param("author");
-		my $publisherfilter = $input->param("publisher");
-		my $callnumberfilter = $input->param("itemcallnumber");
-		
-		push @filters, {name=> 'title', value=> $titlefilter} if ($titlefilter);
-		push @filters, {name=> 'author', value=> $authorfilter} if ($authorfilter);
-		push @filters, {name=> 'publisher', value=> $publisherfilter} if ($publisherfilter);
-		push @filters, {name=> 'callnumber', value=> $callnumberfilter} if ($callnumberfilter);
-	}
-	
-	my ($count, $results) = displaylog( $modulename, @filters);
-	if ($output eq "screen"){
-# Printing results to screen
-		$template->param(modulename =>$modulename, $modulename => 1, looprow => $results,counter=>$count);
-		output_html_with_http_headers $input, $cookie, $template->output;
-		exit(1);
-	} else {
-# Printing to a csv file
-		print $input->header(-type => 'application/vnd.sun.xml.calc',
-			-attachment=>"$basename.csv",
-			-filename=>"$basename.csv" );
-		my $sep;
-		$sep =C4::Context->preference("delimiter");
-# header top-right
-# Other header
-# Table
-		foreach my $line ( @$results ) {
-			if ($modulename eq "catalogue"){
-				print $line->{timestamp}.$sep;
-				print $line->{firstname}.$sep;
-				print $line->{surname}.$sep;
-				print $line->{action}.$sep;
-				print $line->{info}.$sep;
-				print $line->{title}.$sep;
-				print $line->{author}.$sep;
-			}
- 			print "\n";
-	 	}
-# footer
-		exit(1);
-	}
-} else {
-	my $dbh = C4::Context->dbh;
-	my @values;
-	my %labels;
-	my %select;
-	my $req;
-	
-	my @mime = ( C4::Context->preference("MIME") );
-#	foreach my $mime (@mime){
-#		warn "".$mime;
-#	}
-	
-	my $CGIextChoice=CGI::scrolling_list(
-				-name     => 'MIME',
-				-id       => 'MIME',
-				-values   => \@mime,
-				-size     => 1,
-				-multiple => 0 );
-	
-	my @dels = ( C4::Context->preference("delimiter") );
-	my $CGIsepChoice=CGI::scrolling_list(
-				-name     => 'sep',
-				-id       => 'sep',
-				-values   => \@dels,
-				-size     => 1,
-				-multiple => 0 );
-	
-	$template->param(
-					CGIextChoice => $CGIextChoice,
-					CGIsepChoice => $CGIsepChoice
-					);
-output_html_with_http_headers $input, $cookie, $template->output;
-}

Index: admin/z3950servers.pl
===================================================================
RCS file: admin/z3950servers.pl
diff -N admin/z3950servers.pl
--- admin/z3950servers.pl	15 Nov 2006 01:41:51 -0000	1.14
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,216 +0,0 @@
-#!/usr/bin/perl
-
-#script to administer the branches table
-#written 20/02/2002 by paul.poulain at 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
-
-use strict;
-use C4::Output;
-use CGI;
-use C4::Search;
-use C4::Context;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-sub StringSearch  {
-	my ($env,$searchstring,$type)=@_;
-	my $dbh = C4::Context->dbh;
-	$searchstring=~ s/\'/\\\'/g;
-	my @data=split(' ',$searchstring);
-	my $count=@data;
-	my $sth=$dbh->prepare("Select * from z3950servers where (name like ?) order by rank,name");
-	$sth->execute("$data[0]\%");
-	my @results;
-	while (my $data=$sth->fetchrow_hashref) {
-	    push(@results,$data);
-	}
-	#  $sth->execute;
-	$sth->finish;
-	$dbh->disconnect;
-	return (scalar(@results),\@results);
-}
-
-my $input = new CGI;
-my $searchfield=$input->param('searchfield');
-my $offset=$input->param('offset');
-my $script_name="/cgi-bin/koha/admin/z3950servers.pl";
-
-my $pagesize=20;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
-
-my ($template, $loggedinuser, $cookie) 
-    = get_template_and_user({template_name => "admin/z3950servers.tmpl",
-				query => $input,
-				type => "intranet",
-				authnotrequired => 0,
-				flagsrequired => {parameters => 1},
-				debug => 1,
-				});
-
-
-$template->param(script_name => $script_name,
-                 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 ($searchfield) {
-		my $dbh = C4::Context->dbh;
-		my $sth=$dbh->prepare("select * from z3950servers where (name = ?) order by rank,name");
-		$sth->execute($searchfield);
-		$data=$sth->fetchrow_hashref;
-		$sth->finish;
-	}
-	
-	$template->param(host => $data->{'host'},
-			 port => $data->{'port'},
-			 db   => $data->{'db'},
-			 userid => $data->{'userid'},
-			 password => $data->{'password'},
-		
-			opacshow => CGI::checkbox(-name=>'opacshow',
-						-checked=> $data->{'opacshow'}?'checked':'',
-						-value=> 1,
-						-label => '',
-						-id=> 'opacshow'),
-			checked => CGI::checkbox(-name=>'checked',
-						-checked=> $data->{'checked'}?'checked':'',
-						-value=> 1,
-						-label => '',
-						-id=> 'checked'),
-			 rank => $data->{'rank'});
-													# 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("select * from z3950servers where name=?");
-	$sth->execute($input->param('searchfield'));
-	if ($sth->rows) {
-		$sth=$dbh->prepare("update z3950servers set host=?, port=?, db=?, userid=?, password=?, name=?, checked=?, rank=?,opacshow=?,syntax=? where name=?");
-		$sth->execute($input->param('host'),
-		      $input->param('port'),
-		      $input->param('db'),
-		      $input->param('userid'),
-		      $input->param('password'),
-		      $input->param('searchfield'),
-		      $input->param('checked')?1:0,
-		      $input->param('rank'),
-		   $input->param('opacshow')?1:0,
-			 $input->param('syntax'),
-		      $input->param('searchfield'),
-		      );
-	} else {
-		$sth=$dbh->prepare("insert into z3950servers (host,port,db,userid,password,name,checked,rank,opacshow,syntax) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ? )");
-		$sth->execute($input->param('host'), $input->param('port'), $input->param('db'), $input->param('userid'),
-		      $input->param('password'), $input->param('searchfield'),$input->param('checked')?1:0, $input->param('rank'),
-		      $input->param('opacshow')?1:0,$input->param('syntax') );
-	}
-	$sth->finish;
-													# 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 $sth2=$dbh->prepare("select * from z3950servers where (name = ?) order by rank,name");
-	$sth2->execute($searchfield);
-	my $data=$sth2->fetchrow_hashref;
-	$sth2->finish;
-
-        $template->param(host => $data->{'host'},
-                         port => $data->{'port'},
-                         db   => $data->{'db'},
-                         userid => $data->{'userid'},
-                         password => $data->{'password'},
-                      checked => CGI::checkbox(-name=>'checked',
-						-checked=> $data->{'checked'}?'checked':'',
-						-value=> 1,
-						-label => '',
-						-id=> 'checked'),
-		opacshow => CGI::checkbox(-name=>'opacshow',
-						-checked=> $data->{'opacshow'}?'checked':'',
-						-value=> 1,
-						-label => '',
-						-id=> 'opacshow'),
-                         rank => $data->{'rank'});
-
-													# 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 $sth=$dbh->prepare("delete from z3950servers where name=?");
-	$sth->execute($searchfield);
-	$sth->finish;
-													# END $OP eq DELETE_CONFIRMED
-################## DEFAULT ##################################
-} else { # DEFAULT
-	$template->param(else => 1);
-
-	my $env;
-	my ($count,$results)=StringSearch($env,$searchfield,'web');
-	my @loop;
-	my $toggle = 0;
-	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
-			
-		my $urlsearchfield=$results->[$i]{name};
-		$urlsearchfield=~s/ /%20/g;
-		my %row	= ( name => $results->[$i]{'name'},
-			host => $results->[$i]{'host'},
-			port => $results->[$i]{'port'},
-			db => $results->[$i]{'db'},
-			userid =>$results->[$i]{'userid'},
-			password => ($results->[$i]{'password'}) ? ('#######') : ('&nbsp;'),
-			checked => $results->[$i]{'checked'},
-			opacshow => $results->[$i]{'opacshow'},
-			rank => $results->[$i]{'rank'},
-			syntax => $results->[$i]{'syntax'},
-			toggle => $toggle);
-		push @loop, \%row;
-
-                if ( $toggle eq 0 )
-                {
-                        $toggle = 1;
-                }
-                else
-                {
-                        $toggle = 0;
-                }
-
-	}
-	$template->param(loop => \@loop);
-	if ($offset>0) {
-		$template->param(offsetgtzero => 1,
-				prevpage => $offset-$pagesize);
-	}
-	if ($offset+$pagesize<$count) {
-		$template->param(ltcount => 1,
-				 nextpage => $offset+$pagesize);
-	}
-} #---- END $OP eq DEFAULT
-
-output_html_with_http_headers $input, $cookie, $template->output;

Index: authorities/auth_finder.pl
===================================================================
RCS file: authorities/auth_finder.pl
diff -N authorities/auth_finder.pl
--- authorities/auth_finder.pl	6 Sep 2006 16:21:04 -0000	1.12
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,157 +0,0 @@
-#!/usr/bin/perl
-# WARNING: 4-character tab stops here
-
-# 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::Auth;
-use C4::Context;
-use C4::Search;
-use C4::Interface::CGI::Output;
-use C4::AuthoritiesMarc;
-use C4::Koha; # XXX subfield_is_koha_internal_p
-
-my $query=new CGI;
-my $op = $query->param('op');
-my $authtypecode = $query->param('authtypecode');
-my $index = $query->param('index');
-my $resultstring = $query->param('result');
-my $dbh = C4::Context->dbh;
-
-my $startfrom=$query->param('startfrom');
-$startfrom=0 if(!defined $startfrom);
-my ($template, $loggedinuser, $cookie);
-my $resultsperpage;
-
-my $authtypes = getauthtypes;
-my @authtypesloop;
-foreach my $thisauthtype (keys %$authtypes) {
-	my $selected = 1 if $thisauthtype eq $authtypecode;
-	my %row =(value => $thisauthtype,
-				selected => $selected,
-				authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
-			  index => $index,
-			);
-	push @authtypesloop, \%row;
-}
-
-if ($op eq "do_search") {
-	my @marclist = $query->param('marclist');
-	
-	my @operator = $query->param('operator');
-	my @value = $query->param('value');
-
-	$resultsperpage= $query->param('resultsperpage');
-	$resultsperpage = 10 ;
-
-	my ($results,$total) = authoritysearch($dbh, \@marclist, \@operator, \@value,$startfrom*$resultsperpage, $resultsperpage,$authtypecode);# $orderby);
-
-	($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "authorities/searchresultlist-auth.tmpl",
-				query => $query,
-				type => 'intranet',
-				authnotrequired => 0,
-				flagsrequired => {borrowers => 1},
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-
-	# multi page display gestion
-	my $displaynext=0;
-	my $displayprev=$startfrom;
-	if(($total - (($startfrom+1)*($resultsperpage))) > 0 ) {
-		$displaynext = 1;
-	}
-
-	my @field_data = ();
-
-
-	my @marclist_ini = $query->param('marclist'); # get marclist again, as the previous one has been modified by catalogsearch (mainentry replaced by field name
-	for(my $i = 0 ; $i <= $#marclist ; $i++) {
-		push @field_data, { term => "marclist", val=>$marclist_ini[$i] };
-		push @field_data, { term => "operator", val=>$operator[$i] };
-		push @field_data, { term => "value", val=>$value[$i] };
-	}
-
-	my @numbers = ();
-
-	if ($total>$resultsperpage) {
-		for (my $i=1; $i<$total/$resultsperpage+1; $i++) {
-			if ($i<16) {
-	    		my $highlight=0;
-	    		($startfrom==($i-1)) && ($highlight=1);
-	    		push @numbers, { number => $i,
-					highlight => $highlight ,
-					searchdata=> \@field_data,
-					startfrom => ($i-1)};
-			}
-    	}
-	}
-
-	my $from = $startfrom*$resultsperpage+1;
-	my $to;
-
- 	if($total < (($startfrom+1)*$resultsperpage)) {
-		$to = $total;
-	} else {
-		$to = (($startfrom+1)*$resultsperpage);
-	}
-	$template->param(result => $results) if $results;
-	$template->param(index => $query->param('index')."");
-	$template->param(startfrom=> $startfrom,
-							displaynext=> $displaynext,
-							displayprev=> $displayprev,
-							resultsperpage => $resultsperpage,
-							startfromnext => $startfrom+1,
-							startfromprev => $startfrom-1,
-					      		  index => $index,
-							searchdata=>\@field_data,
-							total=>$total,
-							from=>$from,
-							to=>$to,
-							numbers=>\@numbers,
-							authtypecode =>$authtypecode,
-							resultstring =>$value[0],
-							);
-} else {
-	($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "authorities/auth_finder.tmpl",
-				query => $query,
-				type => 'intranet',
-				authnotrequired => 0,
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-
-	$template->param(index=>$query->param('index')."",
-					resultstring => $resultstring,
-					);
-}
-
-$template->param(authtypesloop => \@authtypesloop,
-				authtypecode => $authtypecode,
-				nonav=>"1",);
-
-# Print the page
-output_html_with_http_headers $query, $cookie, $template->output;
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: authorities/auth_linker.pl
===================================================================
RCS file: authorities/auth_linker.pl
diff -N authorities/auth_linker.pl
--- authorities/auth_linker.pl	6 Sep 2006 16:21:04 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,161 +0,0 @@
-#!/usr/bin/perl
-# WARNING: 4-character tab stops here
-
-# 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::Auth;
-use C4::Context;
-use C4::Search;
-
-use C4::Interface::CGI::Output;
-use C4::AuthoritiesMarc;
-use C4::Koha; # XXX subfield_is_koha_internal_p
-
-my $query=new CGI;
-my $op = $query->param('op');
-my $authtypecode = $query->param('authtypecode');
-my $index = $query->param('index');
-# my $category = $query->param('category');
-my $resultstring = $query->param('result');
-my $dbh = C4::Context->dbh;
-
-my $startfrom=$query->param('startfrom');
-$startfrom=0 if(!defined $startfrom);
-my ($template, $loggedinuser, $cookie);
-my $resultsperpage;
-
-my $authtypes = getauthtypes;
-my @authtypesloop;
-foreach my $thisauthtype (keys %$authtypes) {
-	my $selected = 1 if $thisauthtype eq $authtypecode;
-	my %row =(value => $thisauthtype,
-				selected => $selected,
-				authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
-			  index => $index,
-			);
-	push @authtypesloop, \%row;
-}
-
-if ($op eq "do_search") {
-	my @marclist = $query->param('marclist');
-	
-	my @operator = $query->param('operator');
-	my @value = $query->param('value');
-
-	$resultsperpage= $query->param('resultsperpage');
-	$resultsperpage = 10 if(!defined $resultsperpage);
-
-	my ($results,$total) = authoritysearch($dbh, \@marclist, \@operator, \@value,$startfrom*$resultsperpage, $resultsperpage,$authtypecode) ;
-
-
-	($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "authorities/linkresultlist-auth.tmpl",
-				query => $query,
-				type => 'intranet',
-				authnotrequired => 0,
-				flagsrequired => {borrowers => 1},
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-
-	# multi page display gestion
-	my $displaynext=0;
-	my $displayprev=$startfrom;
-	if(($total - (($startfrom+1)*($resultsperpage))) > 0 ) {
-		$displaynext = 1;
-	}
-
-	my @field_data = ();
-
-
-	my @marclist_ini = $query->param('marclist'); # get marclist again, as the previous one has been modified by authoritysearch (mainentry replaced by field name
-	for(my $i = 0 ; $i <= $#marclist ; $i++) {
-		push @field_data, { term => "marclist", val=>$marclist_ini[$i] };
-		push @field_data, { term => "operator", val=>$operator[$i] };
-		push @field_data, { term => "value", val=>$value[$i] };
-	}
-
-	my @numbers = ();
-
-	if ($total>$resultsperpage) {
-		for (my $i=1; $i<$total/$resultsperpage+1; $i++) {
-			if ($i<16) {
-	    		my $highlight=0;
-	    		($startfrom==($i-1)) && ($highlight=1);
-	    		push @numbers, { number => $i,
-					highlight => $highlight ,
-					searchdata=> \@field_data,
-					startfrom => ($i-1)};
-			}
-    	}
-	}
-
-	my $from = $startfrom*$resultsperpage+1;
-	my $to;
-
- 	if($total < (($startfrom+1)*$resultsperpage)) {
-		$to = $total;
-	} else {
-		$to = (($startfrom+1)*$resultsperpage);
-	}
-	$template->param(result => $results) if $results;
-	$template->param(index => $query->param('index')."");
-	$template->param(startfrom=> $startfrom,
-							displaynext=> $displaynext,
-							displayprev=> $displayprev,
-							resultsperpage => $resultsperpage,
-							startfromnext => $startfrom+1,
-							startfromprev => $startfrom-1,
-					        		index => $index,
-							searchdata=>\@field_data,
-							total=>$total,
-							from=>$from,
-							to=>$to,
-							numbers=>\@numbers,
-							authtypecode =>$authtypecode,
-							resultstring =>$value[0],
-							);
-} else {
-	($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "authorities/auth_linker.tmpl",
-				query => $query,
-				type => 'intranet',
-				authnotrequired => 0,
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-
-	$template->param(index=>$query->param('index')."",
-					resultstring => $resultstring,
-				
-					);
-}
-
-$template->param(authtypesloop => \@authtypesloop,
-				authtypecode => $authtypecode,
-				nonav=>"1",);
-
-# Print the page
-output_html_with_http_headers $query, $cookie, $template->output;
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: authorities/authorities-home.pl
===================================================================
RCS file: authorities/authorities-home.pl
diff -N authorities/authorities-home.pl
--- authorities/authorities-home.pl	6 Sep 2006 16:21:04 -0000	1.15
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,186 +0,0 @@
-#!/usr/bin/perl
-# WARNING: 4-character tab stops here
-
-# 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::Auth;
-use C4::Context;
-use C4::Interface::CGI::Output;
-use C4::AuthoritiesMarc;
-use C4::Koha; # XXX subfield_is_koha_internal_p
-use C4::Biblio;
-
-
-my $query=new CGI;
-my $op = $query->param('op');
-my $authtypecode = $query->param('authtypecode');
-my $dbh = C4::Context->dbh;
-my $mergefrom=$query->param('mergefrom');
-my $mergeto=$query->param('mergeto');
-my $startfrom=$query->param('startfrom');
-my $authid=$query->param('authid');
-$startfrom=0 if(!defined $startfrom);
-my ($template, $loggedinuser, $cookie);
-my $resultsperpage;
-
-my $authtypes = getauthtypes;
-my @authtypesloop;
-foreach my $thisauthtype (sort { $authtypes->{$a} <=> $authtypes->{$b} } keys %$authtypes) {
-	my $selected = 1 if $thisauthtype eq $authtypecode;
-	my %row =(value => $thisauthtype,
-				selected => $selected, 
-				authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
-			);
-	push @authtypesloop, \%row;
-}
-
-
-if ($op eq "do_search") {
-	my @marclist = $query->param('marclist');
-	
-	my @operator = $query->param('operator');
-	my @value = $query->param('value');
-
-	$resultsperpage= $query->param('resultsperpage');
-	$resultsperpage = 10 unless $resultsperpage;
-	my @tags;
-	my ($results,$total) = authoritysearch($dbh, \@marclist, \@operator, \@value,$startfrom*$resultsperpage, $resultsperpage,$authtypecode) ;
-	($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "authorities/searchresultlist.tmpl",
-				query => $query,
-				type => 'intranet',
-				authnotrequired => 0,
-				authtypecode=> $authtypecode,
-				flagsrequired => {borrowers => 1},
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-
-	# multi page display gestion
-	my $displaynext=0;
-	my $displayprev=$startfrom;
-	if(($total - (($startfrom+1)*($resultsperpage))) > 0 ){
-		$displaynext = 1;
-	}
-
-	my @field_data = ();
-
-	# we must get parameters once again. Because if there is a mainentry, it has been replaced by something else during the search, thus the links next/previous would not work anymore 
-	my @marclist_ini = $query->param('marclist');
-	for(my $i = 0 ; $i <= $#marclist ; $i++)
-	{
-		push @field_data, { term => "marclist", val=>$marclist_ini[$i] };
-		push @field_data, { term => "operator", val=>$operator[$i] };
-		push @field_data, { term => "value", val=>$value[$i] };
-	}
-
-	my @numbers = ();
-
-	if ($total>$resultsperpage)
-	{
-		for (my $i=1; $i<$total/$resultsperpage+1; $i++)
-		{
-			if ($i<31)
-			{
-	    		my $highlight=0;
-	    		($startfrom==($i-1)) && ($highlight=1);
-	    		push @numbers, { number => $i,
-					highlight => $highlight ,
-					searchdata=> \@field_data,
-					startfrom => ($i-1)};
-			}
-    	}
-	}
-
-	my $from = $startfrom*$resultsperpage+1;
-	my $to;
-
- 	if($total < (($startfrom+1)*$resultsperpage))
-	{
-		$to = $total;
-	} else {
-		$to = (($startfrom+1)*$resultsperpage);
-	}
-	$template->param(result => $results) if $results;
-	$template->param(
-							startfrom=> $startfrom,
-							displaynext=> $displaynext,
-							displayprev=> $displayprev,
-							resultsperpage => $resultsperpage,
-							startfromnext => $startfrom+1,
-							startfromprev => $startfrom-1,
-							searchdata=>\@field_data,
-							total=>$total,
-							from=>$from,
-							to=>$to,
-							numbers=>\@numbers,
-							authtypecode=>$authtypecode,
-							);
-
-} elsif ($op eq "delete") {
-
-	&AUTHdelauthority($dbh,$authid);
-
-	($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "authorities/authorities-home.tmpl",
-				query => $query,
-				type => 'intranet',
-				authnotrequired => 0,
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-
-
-}elsif ($op eq "merge") {
-
-
-	my $MARCfrom = XMLgetauthorityhash($dbh,$mergefrom);
-	my $MARCto = XMLgetauthorityhash($dbh,$mergeto);
-	merge($dbh,$mergefrom,$MARCfrom,$mergeto,$MARCto);
-	($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "authorities/authorities-home.tmpl",
-				query => $query,
-				type => 'intranet',
-				authnotrequired => 0,
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-}else {
-	($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "authorities/authorities-home.tmpl",
-				query => $query,
-				type => 'intranet',
-				authnotrequired => 0,
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-
-}
-
-
-
-$template->param(authtypesloop => \@authtypesloop);
-
-# Print the page
-output_html_with_http_headers $query, $cookie, $template->output;
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: authorities/authorities.pl
===================================================================
RCS file: authorities/authorities.pl
diff -N authorities/authorities.pl
--- authorities/authorities.pl	27 Sep 2006 21:19:21 -0000	1.18
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,594 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: authorities.pl,v 1.18 2006/09/27 21:19:21 tgarip1957 Exp $
-
-# 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::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::AuthoritiesMarc;
-use C4::Biblio;
-use C4::Context;
-use C4::Koha; # XXX subfield_is_koha_internal_p
-use Encode;
-
-use vars qw( $tagslib);
-use vars qw( $authorised_values_sth);
-use vars qw( $is_a_modif );
-my $input = new CGI;
-my $z3950 = $input->param('z3950');
-my $logstatus=C4::Context->preference('Activate_log');
-my $xml;
-my $itemtype; # created here because it can be used in build_authorized_values_list sub
-
-
-
-
-
-=item build_authorized_values_list
-
-=cut
-
-sub build_authorized_values_list ($$$$$) {
-	my($tag, $subfield, $value, $dbh,$authorised_values_sth) = @_;
-
-	my @authorised_values;
-	my %authorised_lib;
-
-	# builds list, depending on authorised value...
-
-	#---- branch
-	if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
-	my $sth=$dbh->prepare("select branchcode,branchname from branches order by branchname");
-	$sth->execute;
-	push @authorised_values, ""
-		unless ($tagslib->{$tag}->{$subfield}->{mandatory});
-
-	while (my ($branchcode,$branchname) = $sth->fetchrow_array) {
-		push @authorised_values, $branchcode;
-		$authorised_lib{$branchcode}=$branchname;
-	}
-
-	#----- itemtypes
-	} elsif ($tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes") {
-		my $sth=$dbh->prepare("select itemtype,description from itemtypes order by description");
-		$sth->execute;
-		push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
-	
-		while (my ($itemtype,$description) = $sth->fetchrow_array) {
-			push @authorised_values, $itemtype;
-			$authorised_lib{$itemtype}=$description;
-		}
-		$value=$itemtype unless ($value);
-
-	#---- "true" authorised value
-	} else {
-		$authorised_values_sth->execute($tagslib->{$tag}->{$subfield}->{authorised_value});
-
-		push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
-	
-		while (my ($value,$lib) = $authorised_values_sth->fetchrow_array) {
-			push @authorised_values, $value;
-			$authorised_lib{$value}=$lib;
-		}
-    }
-    return CGI::scrolling_list( -name     => 'field_value',
-				-values   => \@authorised_values,
-				-default  => $value,
-				-labels   => \%authorised_lib,
-				-override => 1,
-				-size     => 1,
-				-multiple => 0 );
-}
-
-
-=item create_input
- builds the <input ...> entry for a subfield.
-=cut
-sub create_input () {
-	my ($tag,$subfield,$value,$i,$tabloop,$rec,$authorised_values_sth,$id) = @_;	
-	my $dbh=C4::Context->dbh;
-	$value =~ s/"/&quot;/g;
-	my %subfield_data;
-	$subfield_data{id}=$id;
-	$subfield_data{tag}=$tag;
-	$subfield_data{subfield}=$subfield;
-	$subfield_data{marc_lib}="<span id=\"error$i\">".$tagslib->{$tag}->{$subfield}->{lib}."</span>";
-	$subfield_data{marc_lib_plain}=$tagslib->{$tag}->{$subfield}->{lib};
-	$subfield_data{tag_mandatory}=$tagslib->{$tag}->{mandatory};
-	$subfield_data{mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
-	$subfield_data{repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
-	$subfield_data{index} = $i;
-	$subfield_data{visibility} = "display:none" if (substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) gt "0") ; #check parity
-	# it's an authorised field
-	if ($tagslib->{$tag}->{$subfield}->{authorised_value}) {
-		$subfield_data{marc_value}= build_authorized_values_list($tag, $subfield, $value, $dbh,$authorised_values_sth);
-	# it's linking authority field to another authority
-	} elsif ($tagslib->{$tag}->{$subfield}->{link}) {
-		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff;'\" tabindex=\"1\" type=\"text\" name=\"field_value\" id=\"field_value$id\" value=\"$value\" size=\"40\" maxlength=\"255\" DISABLE READONLY> <a  style=\"cursor: help;\" href=\"javascript:Dopop('../authorities/auth_linker.pl?index=$id',$id);\">...</a>";
-	
-		# it's a plugin field
-	} elsif ($tagslib->{$tag}->{$subfield}->{'value_builder'}) {
-		# opening plugin. Just check wether we are on a developper computer on a production one
-		# (the cgidir differs)
-		my $cgidir = C4::Context->intranetdir ."/cgi-bin/value_builder";
-		unless (opendir(DIR, "$cgidir")) {
-			$cgidir = C4::Context->intranetdir."/value_builder";
-		} 
-		my $plugin=$cgidir."/".$tagslib->{$tag}->{$subfield}->{'value_builder'}; 
-		require $plugin;
-		my $extended_param = plugin_parameters($dbh,$rec,$tagslib,$i,$tabloop);
-		my ($function_name,$javascript) = plugin_javascript($dbh,$rec,$tagslib,$i,$tabloop);
-		$subfield_data{marc_value}="<input tabindex=\"1\" type=\"text\"  name=\"field_value\" id=\"field_value$id\"  value=\"$value\" size=\"40\" maxlength=\"255\" DISABLE READONLY OnFocus=\"javascript:Focus$function_name($i)\" OnBlur=\"javascript:Blur$function_name($i); \"> <a  style=\"cursor: help;\" href=\"javascript:Clic$function_name($i)\">...</a> $javascript";
-	# it's an hidden field
-	} elsif  ($tag eq '') {
-		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff'; \" tabindex=\"1\" type=\"hidden\" name=\"field_value\" id=\"field_value$id\"  value=\"$value\">";
-	} elsif  (substr($tagslib->{$tag}->{$subfield}->{'hidden'},2,1) gt "1") {
-
-		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff'; \" tabindex=\"1\" type=\"text\" name=\"field_value\" id=\"field_value$id\"   value=\"$value\" size=\"40\" maxlength=\"255\" >";
-	# it's a standard field
-	} else {
-		if (length($value) >100) {
-			$subfield_data{marc_value}="<textarea tabindex=\"1\" name=\"field_value\" id=\"field_value$id\"  cols=\"40\" rows=\"5\" >$value</textarea>";
-		} else {
-			$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff'; \" tabindex=\"1\" type=\"text\" name=\"field_value\" id=\"field_value$id\"  value=\"$value\" size=\"50\">"; #"
-		}
-	}
-	return \%subfield_data;
-}
-
-sub build_tabs  ($$$;$){
-    my($template, $xmlhash, $dbh,$addedfield) = @_;
-    # fill arrays
-    my @loop_data =();
-    my $tag;
-    my $i=0;
-my $id=100;
-my ($authidtagfield,$authidtagsubfield)=MARCfind_marc_from_kohafield("authid","authorities");
-	my $authorised_values_sth = $dbh->prepare("select authorised_value,lib
-		from authorised_values
-		where category=? order by lib");
-my $author;
-my $controlfields;
-my $leader;
-if ($xmlhash){
- $author=$xmlhash->{'datafield'};
- $controlfields=$xmlhash->{'controlfield'};
- $leader=$xmlhash->{'leader'};
-}
-    my @BIG_LOOP;
-my %built;
-# loop through each tab 0 through 9
-	for (my $tabloop = 0; $tabloop <= 9; $tabloop++) {
-		my @loop_data = ();
-		foreach my $tag (sort(keys (%{$tagslib}))) {
-			my $indicator;
-				# if MARC::Record is not empty => use it as master loop, then add missing subfields that should be in the tab.
-				# if MARC::Record is empty => use tab as master loop.
-	if ($xmlhash) {
-			####
-		
-			my %tagdefined;
-			my %definedsubfields;
-			my $hiddenrequired;
-			my ($ind1,$ind2);
-			
-		 if ($tag>9){
-			next if ($tag eq $authidtagfield); #we do not want authid to duplicate
-
-			foreach my $data (@$author){							
-					$hiddenrequired=0;
-					my @subfields_data;
-					undef %definedsubfields;
-   	 			 if ($data->{'tag'} eq $tag){
-					$tagdefined{$tag}=1 ;
-					   if ($built{$tag}==1){
-						$hiddenrequired=1;
-					    }
-					    $ind1="  ";
-					      $ind2="  ";		
-					      foreach my $subfieldcode ( $data->{'subfield'}){
-		   				 foreach my $code ( @$subfieldcode){	
-							next if ($tagslib->{$tag}->{$code->{'code'}}->{tab} ne $tabloop);						
-							my $subfield=$code->{'code'}  ;
-							my $value=$code->{'content'};
-							$definedsubfields{$tag.$subfield}=1 ;
-							 $built{$tag}=1;
-							push(@subfields_data, &create_input($tag,$subfield,$value,$i,$tabloop,$xmlhash,$authorised_values_sth,$id)) ;
-							$i++ ;
-		   				}
-					      } ##each subfield
-					    $ind1=$data->{'ind1'};
-					    $ind2=	$data->{'ind2'};
-					  
-					if ($hiddenrequired && $#loop_data >=0 && $loop_data[$#loop_data]->{'tag'} eq $tag) {
-						my @hiddensubfields_data;
-						my %tag_data;
-						push(@hiddensubfields_data, &create_input('','','',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
-						$tag_data{tag} = '';
-						$tag_data{tag_lib} = '';
-						$tag_data{indicator} = '';
-						$tag_data{subfield_loop} = \@hiddensubfields_data;
-						push (@loop_data, \%tag_data);
-						$i++;
-					}
-					# now, loop again to add parameter subfield that are not in the MARC::Record
-					
-					foreach my $subfield (sort( keys %{$tagslib->{$tag}})) {
-						next if (length $subfield !=1);
-						next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
-						next if ((substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) >1)  ); #check for visibility flag
-						next if ($definedsubfields{$tag.$subfield} );
-						push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
-						$definedsubfields{$tag.$subfield}=1;
-						$i++;
-					}
-					if ($#subfields_data >= 0) {
-						my %tag_data;
-						$tag_data{tag} = $tag;
-						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
-						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
-						$tag_data{indicator} = $ind1.$ind2 if ($tag>=10);
-						$tag_data{subfield_loop} = \@subfields_data;
-						push (@loop_data, \%tag_data);
-						
-					}
-					$id++;
-  	  			     }## if tag matches
-			
-			}#eachdata
- 		}else{ ## tag <10
-			next if ($tag eq $authidtagfield); #we do not want authid to duplicate
-
-			        if ($tag eq "000" || $tag eq "LDR"){
-					my $subfield="@";
-					next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
-					my @subfields_data;
-					my $value=$leader->[0] if $leader->[0];
-					$tagdefined{$tag}=1 ;
-					push(@subfields_data, &create_input($tag,$subfield,$value,$i,$tabloop,$xmlhash,$authorised_values_sth,$id));					
-					$i++;
-					if ($#subfields_data >= 0) {
-						my %tag_data;
-						$tag_data{tag} = $tag;
-						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
-						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
-						$tag_data{subfield_loop} = \@subfields_data;
-                                                			$tag_data{fixedfield} = 1;
-						push (@loop_data, \%tag_data);
-					}
-			         }else{
-	   			 foreach my $control (@$controlfields){
-					my $subfield="@";
-					next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
-					next if ($tagslib->{$tag} eq $authidtagfield);
-					my @subfields_data;
-					if ($control->{'tag'} eq $tag){
-						$hiddenrequired=0;
-						$tagdefined{$tag}=1;
-						 if ($built{$tag}==1){$hiddenrequired=1;}
-						my $value=$control->{'content'} ;
-						$definedsubfields{$tag.'@'}=1;
-						push(@subfields_data, &create_input($tag,$subfield,$value,$i,$tabloop,$xmlhash,$authorised_values_sth,$id));					
-						$i++;
-					
-					   	$built{$tag}=1;
-					###hiddenrequired
-					if ($#subfields_data >= 0) {
-						my %tag_data;
-						$tag_data{tag} = $tag;
-						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
-						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
-						$tag_data{subfield_loop} = \@subfields_data;
-						$tag_data{fixedfield} = 1;
-						push (@loop_data, \%tag_data);
-					}
-					$id++;
-					}## tag matches
-	  			 }# each control
-			       }
-   			}##tag >9
-
-
-			##### Any remaining tag
-				my @subfields_data;
-				# now, loop again to add parameter subfield that are not in the MARC::Record
-					foreach my $subfield (sort( keys %{$tagslib->{$tag}})) {
-						next if ($tagdefined{$tag} );
-						next if (length $subfield !=1);
-						next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
-						next if ((substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) > 1) ); #check for visibility flag
-						push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
-						$tagdefined{$tag.$subfield}=1;
-						$i++;
-					}
-					if ($#subfields_data >= 0) {
-						my %tag_data;
-						$tag_data{tag} = $tag;
-						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
-						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
-						$tag_data{indicator} = $ind1.$ind2 if ($tag>=10);
-						$tag_data{subfield_loop} = \@subfields_data;
-						if ($tag<10) {
-                                                			$tag_data{fixedfield} = 1;
-                                        				}
-
-						push (@loop_data, \%tag_data);
-					}
-
-					
-					if ($addedfield eq $tag) {
-						my %tag_data;
-						my @subfields_data;
-						$id++;
-						$tagdefined{$tag}=1 ;
-						foreach my $subfield (sort( keys %{$tagslib->{$tag}})) {
-						next if (length $subfield !=1);
-						next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
-						next if ((substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) >1)  ); #check for visibility flag
-						$addedfield="";	
-						push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
-						$i++;
-							}
-						if ($#subfields_data >= 0) {
-						$tag_data{tag} = $tag;
-						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
-						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
-						$tag_data{indicator} = ' ' if ($tag>=10);
-						$tag_data{subfield_loop} = \@subfields_data;
-							if ($tag<10) {
-                                                				$tag_data{fixedfield} = 1;
-                                        					}
-						push (@loop_data, \%tag_data);
-											
-						}
-				
-					}
-				
-	# if breeding is empty
-			} else {
-				my @subfields_data;
-				foreach my $subfield (sort(keys %{$tagslib->{$tag}})) {
-					next if (length $subfield !=1);
-					next if ((substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) >1)  ); #check for visibility flag
-					next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
-					push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
-					$i++;
-				}
-				if ($#subfields_data >= 0) {
-					my %tag_data;
-					$tag_data{tag} = $tag;
-					$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
-					$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
-					$tag_data{indicator} = $indicator;
-					$tag_data{subfield_loop} = \@subfields_data;
-					$tag_data{tagfirstsubfield} = $tag_data{subfield_loop}[0];
-					if ($tag<10) {
-						$tag_data{fixedfield} = 1;
-					}
-					push (@loop_data, \%tag_data);
-				}
-			}
-		$id++;
-	}
-	if ($#loop_data >=0) {
-            my %big_loop_line;
-            $big_loop_line{number}=$tabloop;
-            $big_loop_line{innerloop}=\@loop_data;
-            push @BIG_LOOP,\%big_loop_line;
-            }	
-#		$template->param($tabloop."XX" =>\@loop_data);
-		$template->param(BIG_LOOP => \@BIG_LOOP);
-}## tab loop
-}
-
-
-sub build_hidden_data () {
-    # build hidden data =>
-    # we store everything, even if we show only requested subfields.
-
-    my @loop_data =();
-    my $i=0;
-    foreach my $tag (keys %{$tagslib}) {
-	my $previous_tag = '';
-
-	# loop through each subfield
-	foreach my $subfield (keys %{$tagslib->{$tag}}) {
-	    next if ($subfield eq 'lib');
-	    next if ($subfield eq 'tab');
-	    next if ($subfield eq 'mandatory');
-		next if ($subfield eq 'repeatable');
-	    next if ($tagslib->{$tag}->{$subfield}->{'tab'}  ne "-1");
-	    my %subfield_data;
-	    $subfield_data{marc_lib}=$tagslib->{$tag}->{$subfield}->{lib};
-	    $subfield_data{marc_mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
-	    $subfield_data{marc_repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
-	    $subfield_data{marc_value}="<input type=\"hidden\"  name=\"field_value[]\">";
-	    push(@loop_data, \%subfield_data);
-	    $i++
-	}
-    }
-}
-
-# ======================== 
-#          MAIN 
-#=========================
-my $input = new CGI;
-my $error = $input->param('error');
-my $authid=$input->param('authid'); # if authid exists, it's a modif, not a new authority.
-my $z3950 = $input->param('z3950');
-my $op = $input->param('op');
-my $nonav = $input->param('nonav');
-my $myindex = $input->param('index');
-my $linkid=$input->param('linkid');
-my $authtypecode = $input->param('authtypecode');
-
-my $dbh = C4::Context->dbh;
-$authtypecode = &AUTHfind_authtypecode($dbh,$authid) if !$authtypecode;
-
-
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "authorities/authorities.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {editcatalogue => 1},
-			     debug => 1,
-			     });
-$template->param(nonav   => $nonav,index=>$myindex,authtypecode=>$authtypecode,);
-$tagslib = AUTHgettagslib($dbh,1,$authtypecode);
-
-my $xmlhash;
-my $xml;
-$xmlhash = XMLgetauthorityhash($dbh,$authid) if ($authid);
-
-
-my ($oldauthnumtagfield,$oldauthnumtagsubfield);
-my ($oldauthtypetagfield,$oldauthtypetagsubfield);
-$is_a_modif=0;
-if ($authid) {
-	$is_a_modif=1;
-	($oldauthnumtagfield,$oldauthnumtagsubfield) = MARCfind_marc_from_kohafield("authid","authorities");
-	($oldauthtypetagfield,$oldauthtypetagsubfield) = MARCfind_marc_from_kohafield("authtypecode","authorities");
-}
-
-#------------------------------------------------------------------------------------------------------------------------------
-if ($op eq "add") {
-#------------------------------------------------------------------------------------------------------------------------------
-
-	# rebuild
-	my @tags = $input->param('tag');
-	my @subfields = $input->param('subfield');
-	my @values = $input->param('field_value');
-	# build indicator hash.
-	my @ind_tag = $input->param('ind_tag');
-	my @indicator = $input->param('indicator');
-## check for malformed xml -- non UTF-8 like (MARC8) will break xml without warning
-### This usually happens with data coming from other Z3950 servers
-## Slows the saving process so comment out at your own risk
-eval{
- $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag);	
-};
-
- if ($@){
-warn $@;
- $template->param(error             =>1,xmlerror=>1,);
-goto FINAL;
-  };	# check for a duplicate
-###Authorities need the XML header unlike biblios
-$xml='<?xml version="1.0" encoding="UTF-8"?>'.$xml;
-  my $xmlhash=XML_xml2hash_onerecord($xml);
-	my ($duplicateauthid,$duplicateauthvalue) = C4::AuthoritiesMarc::FindDuplicateauth($xmlhash,$authtypecode) if ($op eq "add") && (!$is_a_modif);
-#warn "duplicate:$duplicateauthid,$duplicateauthvalue";	
-	my $confirm_not_duplicate = $input->param('confirm_not_duplicate');
-	# it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate)
-	if (!$duplicateauthid or $confirm_not_duplicate) {
-# warn "noduplicate";
-		if ($is_a_modif ) {	
-			$authid=AUTHmodauthority($dbh,$authid,$xmlhash,$authtypecode);
-		} else {
-		$authid = AUTHaddauthority($dbh,$xmlhash,'',$authtypecode);
-
-		}
-	# now, redirect to detail page
-		if ($nonav){
-#warn ($myindex,$nonav);
-		print $input->redirect("auth_finder.pl?index=$myindex&nonav=$nonav&authtypecode=$authtypecode");
-		}else{
-		print $input->redirect("detail.pl?nonav=$nonav&authid=$authid");
-		}
-		exit;
-	} else {
-FINAL:
-#warn "duplicate";
-	# it may be a duplicate, warn the user and do nothing
-		build_tabs ($template, $xmlhash, $dbh);
-		build_hidden_data;
-		$template->param(authid =>$authid,
-			duplicateauthid				=> $duplicateauthid,
-			duplicateauthvalue				=> $duplicateauthvalue,
-			 );
-	}
-#------------------------------------------------------------------------------------------------------------------------------
-} elsif ($op eq "addfield") {
-#------------------------------------------------------------------------------------------------------------------------------
-	my $addedfield = $input->param('addfield_field');
-	my @tags = $input->param('tag');
-	my @subfields = $input->param('subfield');
-	my @values = $input->param('field_value');
-	# build indicator hash.
-	my @ind_tag = $input->param('ind_tag');
-	my @indicator = $input->param('indicator');
-	my $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag);
-	$xml='<?xml version="1.0" encoding="UTF-8"?>'.$xml;
-	my $xmlhash=XML_xml2hash_onerecord($xml);
-	# adding an empty field
-	build_tabs ($template, $xmlhash, $dbh,$addedfield);
-	build_hidden_data;
-	$template->param(
-		authid                       => $authid,);
-
-} elsif ($op eq "delete") {
-#------------------------------------------------------------------------------------------------------------------------------
-	&AUTHdelauthority($dbh,$authid);
-	if ($nonav){
-	print $input->redirect("auth_finder.pl");
-	}else{
-	print $input->redirect("authorities-home.pl?authid=0");
-	}
-		exit;
-} else {
-if ($op eq "duplicate")
-	{
-		$authid = "";
-	}
-	build_tabs ($template, $xmlhash, $dbh);
-	build_hidden_data;
-	$template->param(oldauthtypetagfield=>$oldauthtypetagfield, oldauthtypetagsubfield=>$oldauthtypetagsubfield,
-		oldauthnumtagfield=>$oldauthnumtagfield, oldauthnumtagsubfield=>$oldauthnumtagsubfield,
-		authid                      => $authid , authtypecode=>$authtypecode,	);
-}
-
-$template->param(
-	authid                       => $authid,
-	authtypecode => $authtypecode,
-	linkid=>$linkid,
-			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-		advancedMARCEditor => C4::Context->preference("advancedMARCEditor"),
-		);
-
-my $authtypes = getauthtypes;
-my @authtypesloop;
-foreach my $thisauthtype (keys %$authtypes) {
-	my $selected = 1 if $thisauthtype eq $authtypecode;
-	my %row =(value => $thisauthtype,
-				selected => $selected,
-				authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
-			);
-	push @authtypesloop, \%row;
-}
-
-$template->param(authtypesloop => \@authtypesloop,
-				authtypetext => $authtypes->{$authtypecode}{'authtypetext'},
-				nonav=>$nonav,);
-output_html_with_http_headers $input, $cookie, $template->output;

Index: authorities/blinddetail-biblio-search.pl
===================================================================
RCS file: authorities/blinddetail-biblio-search.pl
diff -N authorities/blinddetail-biblio-search.pl
--- authorities/blinddetail-biblio-search.pl	6 Sep 2006 16:21:04 -0000	1.8
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,125 +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
-
-=head1 NAME
-
-
-=head1 SYNOPSIS
-
-
-=head1 DESCRIPTION
-
-This script needs an authid
-
-
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
-
-use strict;
-use C4::AuthoritiesMarc;
-use C4::Auth;
-use C4::Context;
-use C4::Interface::CGI::Output;
-use CGI;
-use C4::Search;
-use C4::Koha;
-use C4::Biblio;
-my $query=new CGI;
-
-my $dbh=C4::Context->dbh;
-
-my $authid = $query->param('authid');
-my $index=$query->param('index');
-my $authtypecode = &AUTHfind_authtypecode($dbh,$authid);
-my $tagslib = &AUTHgettagslib($dbh,1,$authtypecode);
-my ($dummyfield,$linkidsubfield)=MARCfind_marc_from_kohafield("auth_biblio_link_subf","biblios");
-my $auth_type = AUTHgetauth_type($authtypecode);
-#warn "$authid =$authtypecode ".$auth_type->{auth_tag_to_report};
-
-my $record =XMLgetauthorityhash($dbh,$authid) if $authid;
-# open template
-my ($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "authorities/blinddetail-biblio-search.tmpl",
-			     query => $query,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {catalogue => 1},
-			     debug => 1,
-			     });
-
-# fill arrays
-my @loop_data =();
-my $tag;
-my @loop_data =();
-if ($authid) {
-	my @record_subs=XML_readline_withtags($record,"","",$auth_type->{auth_tag_to_report});
-	##Put the result in a hash
-	my %filled_subfield;
-	foreach my $subfield (@record_subs) {
-	$filled_subfield{$subfield->[0]}=$subfield->[1];
-	}
-			my @subfields_data;
-			
-		# loop through each subfield
-		foreach my $subfield ('a'..'z') {			
-			my %subfield_data;
-			$subfield_data{marc_value}=$filled_subfield{$subfield} ;
-			$subfield_data{marc_subfield}=$subfield;
-			$subfield_data{marc_tag}=$auth_type->{auth_tag_to_report};
-			push(@subfields_data, \%subfield_data);
-		}
-		if ($#subfields_data>=0) {
-			my %tag_data;
-			$tag_data{tag}=$auth_type->{auth_tag_to_report}.' -'. $tagslib->{$auth_type->{auth_tag_to_report}}->{lib};
-			$tag_data{subfield} = \@subfields_data;
-			push (@loop_data, \%tag_data);
-		}
-	
-} else {
-# authid is empty => the user want to empty the entry.
-	my @subfields_data;
-	foreach my $subfield ('a'..'z') {
-			my %subfield_data;
-			$subfield_data{marc_value}='';
-			$subfield_data{marc_subfield}=$subfield;
-			push(@subfields_data, \%subfield_data);
-		}
-	foreach my $subfield ('0'..'9') {
-			my %subfield_data;
-			$subfield_data{marc_value}='';
-			$subfield_data{marc_subfield}=$subfield;
-			push(@subfields_data, \%subfield_data);
-		}
-		my %tag_data;
-		$tag_data{subfield} = \@subfields_data;
-		push (@loop_data, \%tag_data);
-}
-
-$template->param("0XX" =>\@loop_data);
-
-
-
-$template->param(authid => $authid?$authid:"", linkidsubfield=>$linkidsubfield,index=>$index,);
-output_html_with_http_headers $query, $cookie, $template->output;
-

Index: authorities/blinddetail-linker.pl
===================================================================
RCS file: authorities/blinddetail-linker.pl
diff -N authorities/blinddetail-linker.pl
--- authorities/blinddetail-linker.pl	27 Sep 2006 21:19:21 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,125 +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
-
-=head1 NAME
-
-etail.pl : script to show an authority in MARC format
-
-=head1 SYNOPSIS
-
-
-=head1 DESCRIPTION
-
-This script needs an authid
-
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
-
-use strict;
-use C4::AuthoritiesMarc;
-use C4::Auth;
-use C4::Context;
-use C4::Interface::CGI::Output;
-use CGI;
-use C4::Search;
-use C4::Koha;
-use C4::Biblio;
-my $query=new CGI;
-
-my $dbh=C4::Context->dbh;
-
-my $authid = $query->param('authid');
-my $index = $query->param('index');
-my $authtypecode=$query->param('authtypecode');
- $authtypecode = &AUTHfind_authtypecode($dbh,$authid) if !$authtypecode;
-my $tagslib = &AUTHgettagslib($dbh,1,$authtypecode);
-my ($linkidfield,$linkidsubfield)=MARCfind_marc_from_kohafield("linkid","authorities");
-my $auth_type = AUTHgetauth_type($authtypecode);
-
-my $record =XMLgetauthorityhash($dbh,$authid);
-# open template
-my ($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "authorities/blinddetail-linker.tmpl",
-			     query => $query,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {catalogue => 1},
-			     debug => 1,
-			     });
-
-# fill arrays
-my @loop_data =();
-my $tag;
-my @loop_data =();
-if ($authid) {
-
-#	foreach my $field ($record->field($auth_type->{auth_tag_to_report})) {
-#			my @subfields_data;
-#			my @subf=$field->subfields;
-#		# loop through each subfield
-#		for my $i (0..$#subf) {
-#			$subf[$i][0] = "@" unless $subf[$i][0];
-#			my %subfield_data;
-#			$subfield_data{marc_value}=$subf[$i][1];
-#			$subfield_data{marc_subfield}=$subf[$i][0];
-#			$subfield_data{marc_tag}=$field->tag();
-#			push(@subfields_data, \%subfield_data);
-#		}
-#		if ($#subfields_data>=0) {
-#			my %tag_data;
-#			$tag_data{tag}=$field->tag().' -'. $tagslib->{$field->tag()}->{lib};
-#			$tag_data{subfield} = \@subfields_data;
-#			push (@loop_data, \%tag_data);
-#		}
-#	}
-} else {
-# authid is empty => the user want to empty the entry.
-	my @subfields_data;
-	foreach my $subfield ('0'..'9') {
-			my %subfield_data;
-			$subfield_data{marc_value}='';
-			$subfield_data{marc_subfield}=$subfield;
-			push(@subfields_data, \%subfield_data);
-		}
-	foreach my $subfield ('a'..'z') {
-			my %subfield_data;
-			$subfield_data{marc_value}='';
-			$subfield_data{marc_subfield}=$subfield;
-			push(@subfields_data, \%subfield_data);
-		}
-	
-	if ($#subfields_data>=0) {
-		my %tag_data;
-		$tag_data{subfield} = \@subfields_data;
-		push (@loop_data, \%tag_data);
-	}
-}
-
-$template->param("0XX" =>\@loop_data);
-
-
-
-$template->param(authid => $authid?$authid:"",linkidsubfield=>$linkidsubfield, linkidfield=>$linkidfield,index => $index);
-output_html_with_http_headers $query, $cookie, $template->output;
-

Index: authorities/detail-biblio-search.pl
===================================================================
RCS file: authorities/detail-biblio-search.pl
diff -N authorities/detail-biblio-search.pl
--- authorities/detail-biblio-search.pl	6 Sep 2006 16:21:04 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,201 +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
-
-=head1 NAME
-
-etail.pl : script to show an authority in MARC format
-
-=head1 SYNOPSIS
-
-
-=head1 DESCRIPTION
-
-This script needs an authid
-
-It shows the authority in a (nice) MARC format depending on authority MARC
-parameters tables.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
-
-use strict;
-use C4::AuthoritiesMarc;
-use C4::Auth;
-use C4::Context;
-use C4::Interface::CGI::Output;
-use CGI;
-use C4::Search;
-use C4::Koha;
-
-my $query=new CGI;
-
-my $dbh=C4::Context->dbh;
-
-my $authid = $query->param('authid');
-my $index = $query->param('index');
-my $authtypecode = &AUTHfind_authtypecode($dbh,$authid);
-my $tagslib = &AUTHgettagslib($dbh,1,$authtypecode);
-
-my $record =XMLgetauthorityhash($dbh,$authid);
-# open template
-my ($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "authorities/detail-biblio-search.tmpl",
-			     query => $query,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {catalogue => 1},
-			     debug => 1,
-			     });
-
-# fill arrays
-my @loop_data =();
-my $tag;
-if ($xmlhash){
-# loop through each tab 0 through 9
-my $author=$xmlhash->{'datafield'};
-my $controlfields=$xmlhash->{'controlfield'};
-my $leader=$xmlhash->{'leader'};
-for (my $tabloop = 0; $tabloop<10;$tabloop++) {
-# loop through each tag
-	my @loop_data =();
-	my @subfields_data;
-
-	# deal with leader 
-	unless (($tagslib->{'000'}->{'@'}->{tab}  ne $tabloop)  || (substr($tagslib->{'000'}->{'@'}->{hidden},1,1)>0)) {
-		
-		my %subfield_data;
-		$subfield_data{marc_value}=$leader->[0] ;
-		push(@subfields_data, \%subfield_data);
-		my %tag_data;
-		$tag_data{tag}='000 -'. $tagslib->{'000'}->{lib};
-		my @tmp = @subfields_data;
-		$tag_data{subfield} = \@tmp;
-		push (@loop_data, \%tag_data);
-		undef @subfields_data;
-	}
-	##Controlfields
-		
-		 foreach my $control (@$controlfields){
-			my %subfield_data;
-			my %tag_data;
-			next if ($tagslib->{$control->{'tag'}}->{'@'}->{tab}  ne $tabloop);
-			next if (substr($tagslib->{$control->{'tag'}}->{'@'}->{hidden},1,1)>0);			
-			$subfield_data{marc_value}=$control->{'content'} ;
-			push(@subfields_data, \%subfield_data);
-				if (C4::Context->preference('hide_marc')) {
-					$tag_data{tag}=$tagslib->{$control->{'tag'}}->{lib};
-				} else {
-					$tag_data{tag}=$control->{'tag'}.' -'. $tagslib->{$control->{'tag'}}->{lib};
-				}			
-			my @tmp = @subfields_data;
-			$tag_data{subfield} = \@tmp;
-			push (@loop_data, \%tag_data);
-			undef @subfields_data;
-		}
-	my $previoustag;
-	my %datatags;
-	my $i=0;
-	foreach my $data (@$author){
-		$datatags{$i++}=$data->{'tag'};
-		 foreach my $subfield ( $data->{'subfield'}){
-		     foreach my $code ( @$subfield){
-			next if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{tab}  ne $tabloop);
-			next if (substr($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{hidden},1,1)>0);
-			my %subfield_data;
-			my $value=$code->{'content'};
-			$subfield_data{marc_lib}=$tagslib->{$data->{'tag'}}->{$code->{'code'}}->{lib};
-			$subfield_data{link}=$tagslib->{$data->{'tag'}}->{$code->{'code'}}->{link};
-			if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{isurl}) {
-				$subfield_data{marc_value}="<a href=\"$value]\">$value</a>";
-			} else {
-			$subfield_data{marc_value}=get_authorised_value_desc($data->{'tag'}, $code->{'code'}, $value, '', $dbh);
-			}
-			$subfield_data{marc_subfield}=$code->{'code'};
-			$subfield_data{marc_tag}=$data->{'tag'};
-			push(@subfields_data, \%subfield_data);
-		     }### $code
-		
-		
-		if ($#subfields_data>=0) {
-			my %tag_data;
-			if (($datatags{$i} eq $datatags{$i-1}) && (C4::Context->preference('LabelMARCView') eq 'economical')) {
-				$tag_data{tag}="";
-			} else {
-				if (C4::Context->preference('hide_marc')) {
-					$tag_data{tag}=$tagslib->{$data->{'tag'}}->{lib};
-				} else {
-					$tag_data{tag}=$data->{'tag'}.' -'. $tagslib->{$data->{'tag'}}->{lib};
-				}
-			}
-			my @tmp = @subfields_data;
-			$tag_data{subfield} = \@tmp;
-			push (@loop_data, \%tag_data);
-			undef @subfields_data;
-		}
-	      }### each $subfield
-	}
-
-	$template->param($tabloop."XX" =>\@loop_data);
-}
-
-my $authtypes = getauthtypes;
-my @authtypesloop;
-foreach my $thisauthtype (keys %$authtypes) {
-	my $selected = 1 if $thisauthtype eq $authtypecode;
-	my %row =(value => $thisauthtype,
-				selected => $selected,
-				authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
-			);
-	push @authtypesloop, \%row;
-}
-
-$template->param(authid => $authid,
-				authtypesloop => \@authtypesloop, index => $index);
-}
-output_html_with_http_headers $query, $cookie, $template->output;
-
-sub get_authorised_value_desc ($$$$$) {
-   my($tag, $subfield, $value, $framework, $dbh) = @_;
-
-   #---- branch
-    if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
-       return getbranchname($value);
-    }
-
-   #---- itemtypes
-   if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
-       return ItemType($value);
-    }
-
-   #---- "true" authorized value
-   my $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
-
-   if ($category ne "") {
-       my $sth = $dbh->prepare("select lib from authorised_values where category = ? and authorised_value = ?");
-       $sth->execute($category, $value);
-       my $data = $sth->fetchrow_hashref;
-       return $data->{'lib'};
-   } else {
-       return $value; # if nothing is found return the original value
-   }
-}

Index: authorities/detail.pl
===================================================================
RCS file: authorities/detail.pl
diff -N authorities/detail.pl
--- authorities/detail.pl	6 Sep 2006 16:21:04 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,210 +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
-
-=head1 NAME
-
-etail.pl : script to show an authority in MARC format
-
-=head1 SYNOPSIS
-
-
-=head1 DESCRIPTION
-
-This script needs an authid
-
-It shows the authority in a (nice) MARC format depending on authority MARC
-parameters tables.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
-
-use strict;
-use C4::AuthoritiesMarc;
-use C4::Auth;
-use C4::Context;
-use C4::Interface::CGI::Output;
-use CGI;
-use C4::Search;
-use C4::Koha;
-
-
-my $query=new CGI;
-
-my $dbh=C4::Context->dbh;
-my $nonav = $query->param('nonav');
-my $authid = $query->param('authid');
-my $authtypecode = &AUTHfind_authtypecode($dbh,$authid);
-my $tagslib = &AUTHgettagslib($dbh,1,$authtypecode);
-
-my $xmlhash =XMLgetauthorityhash($dbh,$authid);
-
-my ($count) = AUTHcount_usage($authid);
-
-#chop;
-
-# open template
-my ($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "authorities/detail.tmpl",
-			     query => $query,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {catalogue => 1},
-			     debug => 1,
-			     });
-
-
-# fill arrays
-my @loop_data =();
-my $tag;
-if ($xmlhash){
-# loop through each tab 0 through 9
-my $author=$xmlhash->{'datafield'};
-my $controlfields=$xmlhash->{'controlfield'};
-my $leader=$xmlhash->{'leader'};
-for (my $tabloop = 0; $tabloop<10;$tabloop++) {
-# loop through each tag
-	my @loop_data =();
-	my @subfields_data;
-
-	# deal with leader 
-	unless (($tagslib->{'000'}->{'@'}->{tab}  ne $tabloop)  || (substr($tagslib->{'000'}->{'@'}->{hidden},1,1)>0)) {
-		
-		my %subfield_data;
-		$subfield_data{marc_value}=$leader->[0] ;
-		push(@subfields_data, \%subfield_data);
-		my %tag_data;
-		$tag_data{tag}='000 -'. $tagslib->{'000'}->{lib};
-		my @tmp = @subfields_data;
-		$tag_data{subfield} = \@tmp;
-		push (@loop_data, \%tag_data);
-		undef @subfields_data;
-	}
-	##Controlfields
-		
-		 foreach my $control (@$controlfields){
-			my %subfield_data;
-			my %tag_data;
-			next if ($tagslib->{$control->{'tag'}}->{'@'}->{tab}  ne $tabloop);
-			next if (substr($tagslib->{$control->{'tag'}}->{'@'}->{hidden},1,1)>0);			
-			$subfield_data{marc_value}=$control->{'content'} ;
-			push(@subfields_data, \%subfield_data);
-				if (C4::Context->preference('hide_marc')) {
-					$tag_data{tag}=$tagslib->{$control->{'tag'}}->{lib};
-				} else {
-					$tag_data{tag}=$control->{'tag'}.' -'. $tagslib->{$control->{'tag'}}->{lib};
-				}			
-			my @tmp = @subfields_data;
-			$tag_data{subfield} = \@tmp;
-			push (@loop_data, \%tag_data);
-			undef @subfields_data;
-		}
-	my $previoustag;
-	my %datatags;
-	my $i=0;
-	foreach my $data (@$author){
-		$datatags{$i++}=$data->{'tag'};
-		 foreach my $subfield ( $data->{'subfield'}){
-		     foreach my $code ( @$subfield){
-			next if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{tab}  ne $tabloop);
-			next if (substr($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{hidden},1,1)>0);
-			my %subfield_data;
-			my $value=$code->{'content'};
-			$subfield_data{marc_lib}=$tagslib->{$data->{'tag'}}->{$code->{'code'}}->{lib};
-			$subfield_data{link}=$tagslib->{$data->{'tag'}}->{$code->{'code'}}->{link};
-			if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{isurl}) {
-				$subfield_data{marc_value}="<a href=\"$value]\">$value</a>";
-			} else {
-			$subfield_data{marc_value}=get_authorised_value_desc($data->{'tag'}, $code->{'code'}, $value, '', $dbh);
-			}
-			$subfield_data{marc_subfield}=$code->{'code'};
-			$subfield_data{marc_tag}=$data->{'tag'};
-			push(@subfields_data, \%subfield_data);
-		     }### $code
-		
-		
-		if ($#subfields_data>=0) {
-			my %tag_data;
-			if (($datatags{$i} eq $datatags{$i-1}) && (C4::Context->preference('LabelMARCView') eq 'economical')) {
-				$tag_data{tag}="";
-			} else {
-				if (C4::Context->preference('hide_marc')) {
-					$tag_data{tag}=$tagslib->{$data->{'tag'}}->{lib};
-				} else {
-					$tag_data{tag}=$data->{'tag'}.' -'. $tagslib->{$data->{'tag'}}->{lib};
-				}
-			}
-			my @tmp = @subfields_data;
-			$tag_data{subfield} = \@tmp;
-			push (@loop_data, \%tag_data);
-			undef @subfields_data;
-		}
-	      }### each $subfield
-	}
-
-	$template->param($tabloop."XX" =>\@loop_data);
-}
-my $authtypes = getauthtypes;
-my @authtypesloop;
-foreach my $thisauthtype (keys %$authtypes) {
-	my $selected = 1 if $thisauthtype eq $authtypecode;
-	my %row =(value => $thisauthtype,
-				selected => $selected,
-				authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
-			);
-	push @authtypesloop, \%row;
-}
-
-$template->param(authid => $authid,
-				count => $count,
-				authtypetext => $authtypes->{$authtypecode}{'authtypetext'},
-				authtypecode => $authtypes->{$authtypecode}{'authtypecode'},
-				authtypesloop => \@authtypesloop);
-$template->param(nonav =>$nonav);
-}### if $xmlash exist
-output_html_with_http_headers $query, $cookie, $template->output;
-
-sub get_authorised_value_desc ($$$$$) {
-   my($tag, $subfield, $value, $framework, $dbh) = @_;
-
-   #---- branch
-    if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
-       return getbranchname($value);
-    }
-
-   #---- itemtypes
-   if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
-       return ItemType($value);
-    }
-
-   #---- "true" authorized value
-   my $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
-
-   if ($category ne "") {
-       my $sth = $dbh->prepare("select lib from authorised_values where category = ? and authorised_value = ?");
-       $sth->execute($category, $value);
-       my $data = $sth->fetchrow_hashref;
-       return $data->{'lib'};
-   } else {
-       return $value; # if nothing is found return the original value
-   }
-}
\ No newline at end of file

Index: barcodes/barcodes.pl
===================================================================
RCS file: barcodes/barcodes.pl
diff -N barcodes/barcodes.pl
--- barcodes/barcodes.pl	4 Jul 2006 14:36:51 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,147 +0,0 @@
-#!/usr/bin/perl
-
-# script to generate items barcodes
-# written 07/04
-# by Veleda Matias - matias_veleda at hotmail.com - Physics Library UNLP Argentina and
-#    Castañeda Sebastian - seba3c at yahoo.com.ar - Physics Library UNLP Argentina and
-
-# 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::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Database;
-use HTML::Template;
-use C4::Context;
-use C4::Barcodes::PrinterConfig;
-
-
-
-# This function returns the path to deal with the correct files, considering
-# templates set and language.
-sub getPath {
-	my $type = shift @_;
-	my $templatesSet = C4::Context->preference('template');
-	my $lang = C4::Context->preference('opaclanguages');
-	if ($type eq "intranet") {
-		return "$ENV{'DOCUMENT_ROOT'}/intranet-tmpl/$templatesSet/$lang";
-	} else {
-		return "$ENV{'DOCUMENT_ROOT'}/opac-tmpl/$templatesSet/$lang";
-	}
-}
-
-# Load a configuration file. Before use this function, check if that file exists.
-sub loadConfFromFile {
-  my $fileName = shift @_;
-	my %keyValues;
-	open FILE, "<$fileName";
-	while (<FILE>) {
-		chomp;
-		if (/\s*([\w_]*)\s*=\s*([\[\]\<\>\w_\s:@,\.-]*)\s*/) {
-			$keyValues{$1} = $2;
-		}
-	}
-	close FILE;
-	return %keyValues;
-}
-
-# Save settings to a configuration file. It delete previous configuration settings.
-sub saveConfToFile {
-	my $fileName = shift @_;
-	my %keyValues = %{shift @_};
-	my $i;
-	open FILE, ">$fileName";			
-	my $i;
-	foreach $i (keys(%keyValues)) {
-    print FILE $i." = ".$keyValues{$i}."\n";
-	}
-	close FILE;
-}
-
-# Load the config file.
-my $filenameConf = &getPath("intranet")."/includes/labelConfig/itemsLabelConfig.conf";
-my %labelConfig = &loadConfFromFile($filenameConf);
-
-my $input = new CGI;
-# Defines type of page to use in the printer process
-my @labelTable = C4::Barcodes::PrinterConfig::labelsPage($labelConfig{'rows'}, $labelConfig{'columns'});
-
-# It creates a list of posible intervals to choose codes to generate
-my %list = ('continuous' => 'Continuous Range of items', 'individuals' => 'Individual Codes');
-my @listValues = keys(%list);
-my $rangeType = CGI::scrolling_list(-name => 'rangeType',
-                              		-values => \@listValues,
-			                        -labels => \%list,
-			                        -size => 1,
-									-default => ['continuous'],
-			                        -multiple => 0,
-									-id => "rangeType",
-									-onChange => "changeRange(this)");
-# It creates a list of posible standard codifications. First checks if the user has just added a new code.
-if ($input->param('addCode')) {
-	my $newCountryName = $input->param('countryName');
-	my $newCountryCode = $input->param('countryCode'); 
-
-	my $countryCodesFilename = &getPath("intranet")."/includes/countryCodes/countryCodes.dat";
-	open COUNTRY_CODES, ">>$countryCodesFilename";			
-    print COUNTRY_CODES $newCountryCode." = ".$newCountryName."\n";
-	close COUNTRY_CODES;
-}
-
-# Takes the country codes from a file and use them to set the country list.
-my $countryCodes = &getPath("intranet")."/includes/countryCodes/countryCodes.dat";
-my %list = &loadConfFromFile($countryCodes);
- at listValues = keys(%list);
-my $number_system = CGI::scrolling_list(-name => 'numbersystem',
-                              		    -values => \@listValues,
-			                            -labels   => \%list,
-			                            -size     => 1,
-			                            -multiple => 0);
-
-# Set the script name
-my $script_name = "/cgi-bin/koha/barcodes/barcodesGenerator.pl";
-
-
-# Get the template to use
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "barcodes/barcodes.tmpl",
-			                 type => "intranet",
-			                 query => $input,
-			                 authnotrequired => 0,
-			                 flagsrequired => {parameters => 1},
-					         debug => 1,
-			               });
-
-# Replace the template values with the real ones
-$template->param(SCRIPT_NAME => $script_name);
-$template->param(NUMBER_SYSTEM => $number_system);
-$template->param(PAGES => $labelConfig{'pageType'});
-$template->param(RANGE_TYPE => $rangeType);
-$template->param(LABEL_TABLE => \@labelTable);
-$template->param(COL_SPAN => $labelConfig{'columns'});
-if ($input->param('error')) {
-	$template->param(ERROR => 1);
-} else {
-	$template->param(ERROR => 0);
-}
-$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-		);
-# Shows the template with the real values replaced
-output_html_with_http_headers $input, $cookie, $template->output;

Index: barcodes/barcodesGenerator.pl
===================================================================
RCS file: barcodes/barcodesGenerator.pl
diff -N barcodes/barcodesGenerator.pl
--- barcodes/barcodesGenerator.pl	12 Sep 2005 01:52:41 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,302 +0,0 @@
-#!/usr/bin/perl
-
-# script to generate items barcodes
-# written 07/04
-# by Veleda Matias - matias_veleda at hotmail.com - Physics Library UNLP Argentina and
-#    Castañeda Sebastian - seba3c at yahoo.com.ar - Physics Library UNLP Argentina and
-
-# 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
-
-require Exporter;
-
-use strict;
-
-use CGI;
-use C4::Context;
-use C4::Output;
-use HTML::Template;
-use PDF::API2;
-use PDF::API2::Page;
-use PDF::API2::PDF::Utils;
-use C4::Barcodes::PrinterConfig;
-use Time::localtime; 
-
-
-# This function returns the path to deal with the correct files, considering
-# templates set and language.
-sub getPath {
-	my $type = shift @_;
-	my $templatesSet = C4::Context->preference('template');
-	my $lang = C4::Context->preference('opaclanguages');
-	if ($type eq "intranet") {
-		return "$ENV{'DOCUMENT_ROOT'}/intranet-tmpl/$templatesSet/$lang";
-	} else {
-		return "$ENV{'DOCUMENT_ROOT'}/opac-tmpl/$templatesSet/$lang";
-	}
-}
-
-# Load a configuration file. Before use this function, check if that file exists.
-sub loadConfFromFile {
-  my $fileName = shift @_;
-	my %keyValues;
-	open FILE, "<$fileName";
-	while (<FILE>) {
-		chomp;
-		if (/\s*([\w_]*)\s*=\s*([\[\]\<\>\w_\s:@,\.-]*)\s*/) {
-			$keyValues{$1} = $2;
-		}
-	}
-	close FILE;
-	return %keyValues;
-}
-
-# Save settings to a configuration file. It delete previous configuration settings.
-sub saveConfToFile {
-	my $fileName = shift @_;
-	my %keyValues = %{shift @_};
-	my $i;
-	open FILE, ">$fileName";			
-	my $i;
-	foreach $i (keys(%keyValues)) {
-    print FILE $i." = ".$keyValues{$i}."\n";
-	}
-	close FILE;
-}
-
-# Load the config file.
-my $filenameConf = &getPath("intranet")."/includes/labelConfig/itemsLabelConfig.conf";
-my %labelConfig = &loadConfFromFile($filenameConf);
-
-# Creates a CGI object and take its parameters
-my $cgi = new CGI;
-my $from = $cgi->param('from');
-my $to = $cgi->param('to');
-my $individualCodes = $cgi->param('individualCodes');
-my $rangeType = $cgi->param('rangeType');
-my $pageType = $cgi->param('pages');
-my $label = $cgi->param('label');
-my $numbersystem = $cgi->param('numbersystem');
-my $text_under_label = $cgi->param('text_under_label');
-
-# Generate the checksum from an inventary code
-sub checksum {
-
-  sub calculateDigit {
-    my $code = shift @_;
-    my $sum = 0;
-	  my $odd_parity = 1;
-    my $i;
-    for ($i = length($code) - 1; $i >= 0; $i--){
-	   if ( $odd_parity ) {
-		  $sum = $sum + ( 3 * substr($code, $i, 1) );
-     } else {
-			$sum = $sum + substr($code, $i, 1); }
-		  $odd_parity = !$odd_parity;
-	   }
-    my $check_digit = 10 - ($sum%10);
-	if ($check_digit==10) {
-		$check_digit=0;
-	}
-	  return $code.$check_digit;
-  }
-
-  my $currentCode = shift @_;
-  $currentCode = &calculateDigit($currentCode);
-  return $currentCode;
-}
-
-# Assigns a temporary name to the PDF file
-sub assingFilename {
-	my ($from, $to) = @_;
-	my $ip = $cgi->remote_addr();
-	my $random = int(rand(1000000));
-    my $timeObj = localtime();
-	my ($day, $month, $year, $hour, $min, $sec) = ($timeObj->mday,
-												   $timeObj->mon + 1,
-												   $timeObj->year + 1900,
-  												   $timeObj->hour,
-												   $timeObj->min,
-												   $timeObj->sec);
-	my $tmpFileName = $random.'-'.$ip.'-(From '.$from.' to '.$to.')-['.$day.'.'.$month.'.'.$year.']-['.$hour.':'.$min.':'.$sec.'].pdf';
-	return $tmpFileName;
-}
-sub getCallnum {
-#grabs a callnumber for the specified barcode
-my ($barcode) = @_;
-my $query = "select dewey from items,biblioitems where items.biblionumber=biblioitems.biblionumber and items.barcode=?";
-my $dbh = C4::Context->dbh;
-my $sth = $dbh->prepare($query);
-$sth->execute($barcode);
-my ($callnum) = $sth->fetchrow_array();
-warn "Call number is:".$barcode;
-return $callnum;
-}
-# Takes inventary codes from database and if they are between
-# the interval specify by parameters, it generates the correspond barcodes
-sub barcodesGenerator {
-	my ($from, $to, $rangeType, $individualCodes,$text_under_label) = @_;
-	# Returns a database handler
-	my $dbh = C4::Context->dbh;
-	# Create the query to database
-	# Assigns a temporary filename for the pdf file
-	my $tmpFileName = &assingFilename($from, $to);
-	# warn "range type: ".$rangeType;
-	if ($rangeType eq 'continuous') {
-		# Set the temp directory for pdf´s files
-		if (!defined($ENV{'TEMP'})) {
-			$ENV{'TEMP'} = '/tmp/';
-		}	
-		$tmpFileName = $ENV{'TEMP'}.$tmpFileName;
-		# Creates a PDF object
-		my $pdf = PDF::API2->new(-file => $tmpFileName);
-		# Set the positions where barcodes are going to be placed
-		C4::Barcodes::PrinterConfig::setPositionsForX($labelConfig{'marginLeft'}, $labelConfig{'labelWidth'}, $labelConfig{'columns'}, $labelConfig{'pageType'});
-		C4::Barcodes::PrinterConfig::setPositionsForY($labelConfig{'marginBottom'}, $labelConfig{'labelHeigth'}, $labelConfig{'rows'}, $labelConfig{'pageType'});
-		# Creates a font object
-		my $tr = $pdf->corefont('Helvetica-Bold');
-		# Barcode position
-		my ($page, $gfx, $text);
-		for (my $code=$from; $code<=$to; $code++) {
-			# Generetase checksum
-			my $codeC = &checksum($code);
-			# Generate the corresponde barcode to $code
-			# warn "Code is :-->".$codeC."<--";
-			my $barcode = $pdf->barcode(-font => $tr,	# The font object to use
-										-type => 'ean128',	# Standard of codification
-										-code => $codeC, # Text to codify
-										-extn	=> '012345',	# Barcode extension (if it is aplicable)
-										-umzn => 10,		# Top limit of the finished bar
-										-lmzn => 10,		# Bottom limit of the finished bar
-										-zone => 15,		# Bars size
-										-quzn => 0,		# Space destinated for legend
-										-ofwt => 0.01,	# Bars width
-										-fnsz => 8,		# Font size
-										-text => ''
-										);
-			
-			(my $x, my $y, $pdf, $page, $gfx, $text, $tr, $label) = C4::Barcodes::PrinterConfig::getLabelPosition(
-																						$label, 
-																						$pdf, 
-																						$page,
-																						$gfx,
-																						$text,
-																						$tr,
-																						$pageType);	
-			# Assigns a barcodes to $gfx
-			$gfx->barcode($barcode, $x, $y , (72/$labelConfig{'systemDpi'}));
-			# Assigns the additional information to the barcode (Legend)
-			$text->translate($x - 48, $y - 22);
-			warn "code is ".$codeC;
-			if ($text_under_label) {
-				$text->text($text_under_label);
-			} else {
-			$text->text(getCallnum($code));
-			}
-		}
-		# Writes the objects added in $gfx to $page
-		$pdf->finishobjects($page,$gfx, $text);
-		# Save changes to the PDF
-		$pdf->saveas;
-		# Close the conection with the PDF file
-		$pdf->end;
-		# Show the PDF file
-		print $cgi->redirect("/cgi-bin/koha/barcodes/pdfViewer.pl?tmpFileName=$tmpFileName");
-	} else {
-		my $rangeCondition;
-		if ($individualCodes ne "") {
-			$rangeCondition = "AND (I.barcode IN " . $individualCodes . ")";
-		} else {
-			$rangeCondition =  "AND (I.barcode >= " . $from . " AND I.barcode <="  . $to . " )";
-		}
-		warn "above the query";	
-		my $query = "SELECT CONCAT('$numbersystem',REPEAT('0',((12 - LENGTH('$numbersystem')) - LENGTH(I.barcode))), I.barcode) AS Codigo, I.dewey as dewey B.title, B.author FROM biblio B, items I WHERE (I.biblionumber = B.biblioNumber ) " .$rangeCondition. " AND (I.barcode <> 'FALTA') ORDER BY Codigo";
-		
-		# Prepare the query
-		my $sth = $dbh->prepare($query);
-		# Executes the query
-		$sth->execute;
-		if ($sth->rows) { # There are inventary codes
-			# Set the temp directory for pdf´s files
-			if (!defined($ENV{'TEMP'})) {
-				$ENV{'TEMP'} = '/tmp/';
-			}	
-			# Assigns a temporary filename for the pdf file
-			my $tmpFileName = &assingFilename($from, $to);
-			$tmpFileName = $ENV{'TEMP'}.$tmpFileName;
-			# Creates a PDF object
-			my $pdf = PDF::API2->new(-file => $tmpFileName);
-			# Set the positions where barcodes are going to be placed
-			C4::Barcodes::PrinterConfig::setPositionsForX($labelConfig{'marginLeft'}, $labelConfig{'labelWidth'}, $labelConfig{'columns'}, $labelConfig{'pageType'});
-			C4::Barcodes::PrinterConfig::setPositionsForY($labelConfig{'marginBottom'}, $labelConfig{'labelHeigth'}, $labelConfig{'rows'}, $labelConfig{'pageType'});
-			# Creates a font object
-			my $tr = $pdf->corefont('Helvetica-Bold');
-			# Barcode position
-			my ($page, $gfx, $text);
-			while (my ($code,$dewey,$title,$author) = $sth->fetchrow_array) {
-				# Generetase checksum
-				$code = &checksum($code);
-				# Generate the corresponde barcode to $code
-				my $barcode = $pdf->barcode(-font => $tr,	# The font object to use
-											-type => 'ean13',	# Standard of codification
-											-code => $code, # Text to codify
-											-extn	=> '012345',	# Barcode extension (if it is aplicable)
-											-umzn => 10,		# Top limit of the finished bar
-											-lmzn => 10,		# Bottom limit of the finished bar
-											-zone => 15,		# Bars size
-											-quzn => 0,		# Space destinated for legend
-											-ofwt => 0.01,	# Bars width
-											-fnsz => 8,		# Font size
-											-text => ''
-											);
-				
-				(my $x, my $y, $pdf, $page, $gfx, $text, $tr, $label) = C4::Barcodes::PrinterConfig::getLabelPosition(
-																							$label, 
-																							$pdf, 
-																							$page,
-																							$gfx,
-																							$text,
-																							$tr,
-																							$pageType);	
-				# Assigns a barcodes to $gfx
-				$gfx->barcode($barcode, $x, $y , (72/$labelConfig{'systemDpi'}));
-				# Assigns the additional information to the barcode (Legend)
-				$text->translate($x - 48, $y - 22);
-				if ($text_under_label) {
-					$text->text($text_under_label);
-				} else {
-					warn "here a dewey:".$dewey;
-					$text->text(substr $dewey, 0, 30);
-					$text->translate($x - 48, $y - 29);
-					#$text->text(substr $author, 0, 30);
-				}
-			}
-			# Writes the objects added in $gfx to $page
-			$pdf->finishobjects($page,$gfx, $text);
-			# Save changes to the PDF
-			$pdf->saveas;
-			# Close the conection with the PDF file
-			$pdf->end;
-			# Show the PDF file
-			print $cgi->redirect("/cgi-bin/koha/barcodes/pdfViewer.pl?tmpFileName=$tmpFileName");
-		} else {
-			# Rollback and shows the error legend
-			print $cgi->redirect("/cgi-bin/koha/barcodes/barcodes.pl?error=1");
-		}
-	$sth->finish;
-	}
-}
-
-barcodesGenerator($from, $to, $rangeType, $individualCodes,$text_under_label);

Index: barcodes/create_labels_conf_table.sql
===================================================================
RCS file: barcodes/create_labels_conf_table.sql
diff -N barcodes/create_labels_conf_table.sql
--- barcodes/create_labels_conf_table.sql	19 Jul 2006 01:10:45 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
--- MySQL dump 9.11
---
--- Host: localhost    Database: opusdev
--- ------------------------------------------------------
--- Server version	4.0.24_Debian-10sarge1
-
---
--- Table structure for table `labels_conf`
---
-
-DROP TABLE IF EXISTS `labels_conf`;
-CREATE TABLE `labels_conf` (
-  `id` int(4) NOT NULL auto_increment,
-  `barcodetype` char(100) default '',
-  `title` tinyint(1) default '0',
-  `isbn` tinyint(1) default '0',
-  `itemtype` tinyint(1) default '0',
-  `barcode` tinyint(1) default '0',
-  `dewey` tinyint(1) default '0',
-  `class` tinyint(1) default '0',
-  `author` tinyint(1) default '0',
-  `papertype` char(100) default '',
-  `startrow` int(2) default NULL,
-  `printingtype` char(10) default NULL,
-  `guidebox` tinyint(1) default NULL,
-  PRIMARY KEY  (`id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `labels`
---
-
-DROP TABLE IF EXISTS `labels`;
-CREATE TABLE `labels` (
-  `labelid` int(11) NOT NULL auto_increment,
-  `itemnumber` varchar(100) NOT NULL default '',
-  `timestamp` timestamp(14) NOT NULL,
-  PRIMARY KEY  (`labelid`)
-) TYPE=MyISAM;
-
-
-
-
-

Index: barcodes/label-home.pl
===================================================================
RCS file: barcodes/label-home.pl
diff -N barcodes/label-home.pl
--- barcodes/label-home.pl	19 Jul 2006 01:09:42 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,59 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use HTML::Template;
-
-#use Data::Dumper;
-
-my $query = new CGI;
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => "barcodes/label-home.tmpl",
-        query           => $query,
-        type            => "intranet",
-        authnotrequired => 0,
-        flagsrequired   => { catalogue => 1 },
-        debug           => 1,
-    }
-);
-
-my $dbh    = C4::Context->dbh;
-my $query2 = "SELECT * FROM labels_conf LIMIT 1";
-my $sth    = $dbh->prepare($query2);
-$sth->execute();
-
-my $data = $sth->fetchrow_hashref;
-$sth->finish;
-
-$template->param( guidebox => 1 ) if ( $data->{'guidebox'} );
-
-$data->{'printingtype'} = 'both' if ( !$data->{'printingtype'} );
-$template->param( "printingtype_$data->{'printingtype'}" => 1 );
-
-$template->param( "$data->{'barcodetype'}_checked"              => 1 );
-$template->param( "startrow" . $data->{'startrow'} . "_checked" => 1 );
-$template->param(
-    itemtype    => $data->{'itemtype'},
-    papertype   => $data->{'papertype'},
-    author      => $data->{'author'},
-    barcode     => $data->{'barcode'},
-    id          => $data->{'id'},
-    barcodetype => $data->{'barcodetype'},
-    title       => $data->{'title'},
-    isbn        => $data->{'isbn'},
-    dewey       => $data->{'dewey'},
-    class       => $data->{'class'},
-    startrow    => $data->{'startrow'},
-
-    intranetcolorstylesheet =>
-      C4::Context->preference("intranetcolorstylesheet"),
-    intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-    IntranetNav        => C4::Context->preference("IntranetNav"),
-);
-
-output_html_with_http_headers $query, $cookie, $template->output;

Index: barcodes/label-item-search.pl
===================================================================
RCS file: barcodes/label-item-search.pl
diff -N barcodes/label-item-search.pl
--- barcodes/label-item-search.pl	10 Aug 2006 13:00:27 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,226 +0,0 @@
-#!/usr/bin/perl
-# WARNING: 4-character tab stops here
-
-# 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;
-require Exporter;
-use CGI;
-use C4::Koha;
-use C4::Auth;
-use HTML::Template;
-use C4::Context;
-use C4::Search;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Biblio;
-use C4::Acquisition;
-#use C4::SearchMarc;
-use C4::Koha;    # XXX subfield_is_koha_internal_p
-
-# Creates a scrolling list with the associated default value.
-# Using more than one scrolling list in a CGI assigns the same default value to all the
-# scrolling lists on the page !?!? That's why this function was written.
-
-my $query = new CGI;
-my $type  = $query->param('type');
-my $op    = $query->param('op');
-my $dbh   = C4::Context->dbh;
-
-my $startfrom = $query->param('startfrom');
-$startfrom = 0 if ( !defined $startfrom );
-my ( $template, $loggedinuser, $cookie );
-my $resultsperpage;
-
-if ( $op eq "do_search" ) {
-    my @marclist  = $query->param('marclist');
-    my @and_or    = $query->param('and_or');
-    my @excluding = $query->param('excluding');
-    my @operator  = $query->param('operator');
-    my @value     = $query->param('value');
-
-    $resultsperpage = $query->param('resultsperpage');
-    $resultsperpage = 19 if ( !defined $resultsperpage );
-    my $orderby = $query->param('orderby');
-
-    # builds tag and subfield arrays
-    my @tags;
-
-    foreach my $marc (@marclist) {
-        if ($marc) {
-            my ( $tag, $subfield ) =
-              MARCfind_marc_from_kohafield( $dbh, $marc );
-            if ($tag) {
-                push @tags, $dbh->quote("$tag$subfield");
-            }
-            else {
-                push @tags, $dbh->quote( substr( $marc, 0, 4 ) );
-            }
-        }
-        else {
-            push @tags, "";
-        }
-    }
-    my ( $results, $total ) =
-      catalogsearch( $dbh, \@tags, \@and_or, \@excluding, \@operator, \@value,
-        $startfrom * $resultsperpage,
-        $resultsperpage, $orderby );
-
-    ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-        {
-            template_name   => "barcodes/result.tmpl",
-            query           => $query,
-            type            => "intranet",
-            authnotrequired => 0,
-            flagsrequired   => { borrowers => 1 },
-            flagsrequired   => { catalogue => 1 },
-            debug           => 1,
-        }
-    );
-
-    # multi page display gestion
-    my $displaynext = 0;
-    my $displayprev = $startfrom;
-    if ( ( $total - ( ( $startfrom + 1 ) * ($resultsperpage) ) ) > 0 ) {
-        $displaynext = 1;
-    }
-
-    my @field_data = ();
-
-    for ( my $i = 0 ; $i <= $#marclist ; $i++ ) {
-        push @field_data, { term => "marclist",  val => $marclist[$i] };
-        push @field_data, { term => "and_or",    val => $and_or[$i] };
-        push @field_data, { term => "excluding", val => $excluding[$i] };
-        push @field_data, { term => "operator",  val => $operator[$i] };
-        push @field_data, { term => "value",     val => $value[$i] };
-    }
-
-    my @numbers = ();
-
-    if ( $total > $resultsperpage ) {
-        for ( my $i = 1 ; $i < $total / $resultsperpage + 1 ; $i++ ) {
-            if ( $i < 16 ) {
-                my $highlight = 0;
-                ( $startfrom == ( $i - 1 ) ) && ( $highlight = 1 );
-                push @numbers,
-                  {
-                    number     => $i,
-                    highlight  => $highlight,
-                    searchdata => \@field_data,
-                    startfrom  => ( $i - 1 )
-                  };
-            }
-        }
-    }
-
-    my $from = $startfrom * $resultsperpage + 1;
-    my $to;
-
-    if ( $total < ( ( $startfrom + 1 ) * $resultsperpage ) ) {
-        $to = $total;
-    }
-    else {
-        $to = ( ( $startfrom + 1 ) * $resultsperpage );
-    }
-
-    # this gets the results of the search (which are bibs)
-    # and then does a lookup on all items that exist for that bib
-    # then pushes the items onto a new array, as we really want the
-    # items attached to the bibs not thew bibs themselves
-
-    my @results2;
-    my $i;
-    for ( $i = 0 ; $i <= ( $total - 1 ) ; $i++ )
-    {    #total-1 coz the array starts at 0
-            #warn $i;
-            #warn Dumper $results->[$i]{'bibid'};
-        my $type         = 'intra';
-        my @item_results = &ItemInfo( 0, $results->[$i]{'biblionumber'}, $type );
-
-        foreach my $item (@item_results) {
-
-            #warn Dumper $item;
-            push @results2, $item;
-        }
-
-    }
-
-    $template->param(
-        result         => \@results2,
-        startfrom      => $startfrom,
-        displaynext    => $displaynext,
-        displayprev    => $displayprev,
-        resultsperpage => $resultsperpage,
-        startfromnext  => $startfrom + 1,
-        startfromprev  => $startfrom - 1,
-        searchdata     => \@field_data,
-        total          => $total,
-        from           => $from,
-        to             => $to,
-        numbers        => \@numbers,
-    );
-}
-else {
-    ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-        {
-            template_name   => "barcodes/search.tmpl",
-            query           => $query,
-            type            => "intranet",
-            authnotrequired => 0,
-            flagsrequired   => { catalogue => 1 },
-            debug           => 1,
-        }
-    );
-    my $sth =
-      $dbh->prepare(
-        "Select itemtype,description from itemtypes order by description");
-    $sth->execute;
-    my @itemtype;
-    my %itemtypes;
-    push @itemtype, "";
-    $itemtypes{''} = "";
-    while ( my ( $value, $lib ) = $sth->fetchrow_array ) {
-        push @itemtype, $value;
-        $itemtypes{$value} = $lib;
-    }
-
-    my $CGIitemtype = CGI::scrolling_list(
-        -name     => 'value',
-        -values   => \@itemtype,
-        -labels   => \%itemtypes,
-        -size     => 1,
-        -multiple => 0
-    );
-    $sth->finish;
-
-    $template->param( CGIitemtype => $CGIitemtype, );
-}
-
-# Print the page
-$template->param(
-    intranetcolorstylesheet =>
-      C4::Context->preference("intranetcolorstylesheet"),
-    intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-    IntranetNav        => C4::Context->preference("IntranetNav"),
-);
-output_html_with_http_headers $query, $cookie, $template->output;
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: barcodes/label-manager.pl
===================================================================
RCS file: barcodes/label-manager.pl
diff -N barcodes/label-manager.pl
--- barcodes/label-manager.pl	19 Jul 2006 01:09:42 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,150 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use HTML::Template;
-use POSIX;
-
-my $dbh          = C4::Context->dbh;
-my $query        = new CGI;
-my $op           = $query->param('op');
-my $barcodetype  = $query->param('barcodetype');
-my $title        = $query->param('title');
-my $isbn         = $query->param('isbn');
-my $itemtype     = $query->param('itemtype');
-my $bcn          = $query->param('bcn');
-my $dcn          = $query->param('dcn');
-my $classif      = $query->param('classif');
-my $author       = $query->param('author');
-my $papertype    = $query->param('papertype');
-my $itemnumber   = $query->param('itemnumber');
-my $summary      = $query->param('summary');
-my $startrow     = $query->param('startrow');
-my $printingtype = $query->param('printingtype');
-my $guidebox     = $query->param('guidebox');
-
-warn $printingtype;
-
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => "barcodes/label-manager.tmpl",
-        query           => $query,
-        type            => "intranet",
-        authnotrequired => 1,
-        flagsrequired   => { catalogue => 1 },
-        debug           => 1,
-    }
-);
-
-if ( $op eq 'save_conf' ) {
-    my $query2 = "DELETE FROM labels_conf";
-    my $sth2   = $dbh->prepare($query2);
-    $sth2->execute();
-    $sth2->finish;
-    my $query2 = "INSERT INTO labels_conf 
-			( barcodetype, title, isbn, itemtype, barcode, 	
-			  dewey, class, author, papertype, printingtype, 
-				guidebox, startrow)
-			   values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )";
-    my $sth2 = $dbh->prepare($query2);
-    $sth2->execute(
-        $barcodetype, $title,        $isbn,     $itemtype,
-        $bcn,         $dcn,          $classif,  $author,
-        $papertype,   $printingtype, $guidebox, $startrow
-    );
-    $sth2->finish;
-
-}
-elsif ( $op eq 'add' ) {
-    my $query2 = "INSERT INTO labels ( itemnumber ) values ( ? )";
-    my $sth2   = $dbh->prepare($query2);
-    $sth2->execute($itemnumber);
-    $sth2->finish;
-}
-elsif ( $op eq 'deleteall' ) {
-    my $query2 = "DELETE FROM labels";
-    my $sth2   = $dbh->prepare($query2);
-    $sth2->execute();
-    $sth2->finish;
-}
-elsif ( $op eq 'delete' ) {
-    warn "MASON, deleting label..";
-    my $query2 = "DELETE FROM labels where itemnumber = ?";
-    my $sth2   = $dbh->prepare($query2);
-    $sth2->execute($itemnumber);
-    $sth2->finish;
-}
-
-#  first lets do a read of the labels table , to get the a list of the
-# currently entered items to be prinited
-
-my @resultsloop = ();
-my $count;
-my @data;
-my $query3 = "Select * from labels";
-my $sth    = $dbh->prepare($query3);
-$sth->execute();
-
-my $cnt = $sth->rows;
-my $i1  = 1;
-while ( my $data = $sth->fetchrow_hashref ) {
-
-    # lets get some summary info from each item
-    my $query1 = "
-			select * from biblio,biblioitems,items where itemnumber=? and 
-				items.biblioitemnumber=biblioitems.biblioitemnumber and 
-				biblioitems.biblionumber=biblio.biblionumber";
-
-    my $sth1 = $dbh->prepare($query1);
-    $sth1->execute( $data->{'itemnumber'} );
-    my $data1 = $sth1->fetchrow_hashref();
-
-    $data1->{'labelno'} = $i1;
-    $data1->{'summary'} =
-      "$data1->{'barcode'}, $data1->{'title'}, $data1->{'isbn'}";
-
-    push( @resultsloop, $data1 );
-    $sth1->finish;
-
-    $i1++;
-}
-$sth->finish;
-
-# this script can be run from the side nav, and is not passed a value for $startrow
-# so lets get it from the DB
-if ( !$startrow ) {
-
-    my $dbh    = C4::Context->dbh;
-    my $query2 = "SELECT * FROM labels_conf LIMIT 1";
-    my $sth    = $dbh->prepare($query2);
-    $sth->execute();
-
-    my $data = $sth->fetchrow_hashref;
-    $startrow = $data->{'startrow'};
-    $sth->finish;
-}
-
-#calc-ing number of sheets
-my $number_of_results = scalar @resultsloop;
-my $sheets_needed = ( ( --$number_of_results + $startrow ) / 8 );
-$sheets_needed = ceil($sheets_needed);    # rounding up int's
-
-my $tot_labels       = ( $sheets_needed * 8 );
-my $start_results    = ( $number_of_results + $startrow );
-my $labels_remaining = ( $tot_labels - $start_results );
-
-$template->param(
-    resultsloop      => \@resultsloop,
-    startrow         => $startrow,
-    sheets           => $sheets_needed,
-    labels_remaining => $labels_remaining,
-
-    intranetcolorstylesheet =>
-      C4::Context->preference("intranetcolorstylesheet"),
-    intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-    IntranetNav        => C4::Context->preference("IntranetNav"),
-);
-output_html_with_http_headers $query, $cookie, $template->output;

Index: barcodes/label-print-opus-pdf.pl
===================================================================
RCS file: barcodes/label-print-opus-pdf.pl
diff -N barcodes/label-print-opus-pdf.pl
--- barcodes/label-print-opus-pdf.pl	21 Jul 2006 13:55:57 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,62 +0,0 @@
-#!/usr/bin/perl
-
-#use lib '/usr/local/opus-dev/intranet/modules';
-#use C4::Context("/etc/koha-opus-dev.conf");
-
-use strict;
-use CGI;
-use C4::Labels;
-use C4::Auth;
-use C4::Serials;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use PDF::Reuse;
-use PDF::Reuse::Barcode;
-use PDF::Report;
-use PDF::Create;
-use PDF::Labels;
-use Acme::Comment;
-use Data::Dumper;
-warn "-------";
-
-my $htdocs_path = C4::Context->config('intrahtdocs');
-my $cgi         = new CGI;
-
-my $pdf = new PDF::Labels(
-    $PDF::Labels::PageFormats[1],
-    filename   => "$htdocs_path/barcodes/opus.pdf",
-    Author     => 'PDF Labelmaker',
-    'PageMode' => 'UseOutlines',
-    Title      => 'My Labels'
-);
-
-warn "$htdocs_path/barcodes/opus.pdf";
-
-my @resultsloop = get_label_items();
-
-#warn Dumper @resultsloop;
-warn Dumper $pdf->{'filename'};
-
-$pdf->setlabel(0);    # Start with label 5 on first page
-
-foreach my $result (@resultsloop) {
-    warn Dumper $result;
-    $pdf->label( $result->{'itemtype'}, $result->{'number'}, 'LAK',
-        $result->{'barcode'} );
-    $pdf->label( $result->{'itemtype'}, $result->{'dewey'}, 'LAK',
-        $result->{'barcode'} );
-
-}
-warn "HERE";
-$pdf->close();
-
-#--------------------------------------------------
-
-use PDF::Reuse;
-prFile("$htdocs_path/barcodes/opus1.pdf");
-prDoc("$htdocs_path/barcodes/opus.pdf");
-prEnd();
-
-print $cgi->redirect("/intranet-tmpl/barcodes/opus1.pdf");
-

Index: barcodes/label-print-pdf.pl
===================================================================
RCS file: barcodes/label-print-pdf.pl
diff -N barcodes/label-print-pdf.pl
--- barcodes/label-print-pdf.pl	21 Jul 2006 13:55:57 -0000	1.14
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,289 +0,0 @@
-#!/usr/bin/perl
-
-#----------------------------------------------------------------------
-# this script is really divided into 2 differenvt section,
-
-# the first section creates, and defines the new PDF file the barcodes
-# using PDF::Reuse::Barcode, then saves the file to disk.
-
-# the second section then opens the pdf file off disk, and places the spline label
-# text in the left-most column of the page. then save the file again.
-
-# the reason for this goofyness, it that i couldnt find a single perl package that handled both barcodes and decent text placement.
-
-#use lib '/usr/local/hlt/intranet/modules';
-#use C4::Context("/etc/koha-hlt.conf");
-
-#use strict;
-use CGI;
-use C4::Labels;
-use C4::Auth;
-use C4::Serials;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use HTML::Template;
-use PDF::Reuse;
-use PDF::Reuse::Barcode;
-use PDF::Report;
-use Data::Dumper;
-
-#use Acme::Comment;
-#use Data::Dumper;
-
-my $htdocs_path = C4::Context->config('intrahtdocs');
-my $cgi         = new CGI;
-
-my $spine_text = "";
-
-# get the printing settings
-
-my $conf_data   = get_label_options();
-my @resultsloop = get_label_items();
-
-warn Dumper $conf_data;
-
-
-my $barcodetype  = $conf_data->{'barcodetype'};
-my $printingtype = $conf_data->{'printingtype'};
-my $guidebox  = $conf_data->{'guidebox'};
-my $startrow     = $conf_data->{'startrow'};
-
-if (!$printingtype) {
-	$printingtype = 'both';
-}
-
-warn $printingtype;
-warn $guidebox;
-
-
-#warn Dumper @resultsloop;
-
-# dimensions of gaylord paper
-my $lowerLeftX  = 0;
-my $lowerLeftY  = 0;
-my $upperRightX = 612;
-my $upperRightY = 792;
-
-#----------------------------------
-# setting up the pdf doc
-
-#remove the file before write, for testing
-unlink "$htdocs_path/barcodes/new.pdf";
-
-prFile("$htdocs_path/barcodes/new.pdf");
-prLogDir("$htdocs_path/barcodes");
-
-#prMbox ( $lowerLeftX, $lowerLeftY, $upperRightX, $upperRightY );
-prMbox( 0, 0, 612, 792 );
-
-prFont('Times-Roman');    # Just setting a font
-prFontSize(10);
-
-my $margin = 36;
-
-my $label_height = 90;
-my $spine_width  = 72;
-my $circ_width   = 207;
-my $colspace     = 27;
-
-my $x_pos_spine = 36;
-my $x_pos_circ1 = 135;
-my $x_pos_circ2 = 369;
-
-my $pageheight = 792;
-
-warn "STARTROW = $startrow\n";
-
-#my $y_pos_initial = ( ( 792 - 36 ) - 90 );
-my $y_pos_initial = ( ( $pageheight - $margin ) - $label_height );
-my $y_pos_initial_startrow =
-  ( ( $pageheight - $margin ) - ( $label_height * $startrow ) );
-
-my $y_pos = $y_pos_initial_startrow;
-
-warn "Y POS INITAL : $y_pos_initial";
-warn "Y POS : $y_pos";
-warn "Y START ROW = $y_pos_initial_startrow";
-
-my $rowspace         = 36;
-my $page_break_count = $startrow;
-my $codetype         = 'Code39';
-
-# do border---------------
-my $str = "q\n";    # save the graphic state
-$str .= "4 w\n";                # border color red
-$str .= "0.0 0.0 0.0  RG\n";    # border color red
-$str .= "1 1 1 rg\n";           # fill color blue
-$str .= "0 0 612 792 re\n";     # a rectangle
-$str .= "B\n";                  # fill (and a little more)
-$str .= "Q\n";                  # save the graphic state
-
-# do border---------------
-
-prAdd($str);
-my $item;
-
-# for loop
-
-my $i2 = 1;
-foreach $item (@resultsloop) {
-    if ( $i2 == 1  && $guidebox  == 1) {
-        draw_boundaries(
-            $x_pos_spine, $x_pos_circ1,  $x_pos_circ2, $y_pos,
-            $spine_width, $label_height, $circ_width
-        );
-    }
-
-    #warn Dumper $item->{'itemtype'};
-    #warn "COUNT = $cnt1";
-
-    #building up spine text
-    my $line        = 75;
-    my $line_spacer = 16;
-
-    $DB::single = 1;
-
-    warn
-"COUNT=$i2, PBREAKCNT=$page_break_count, X,Y POS x=$x_pos_circ1, y=$y_pos";
- if ( $printingtype eq 'barcode' || $printingtype eq 'both' ) {
-    build_circ_barcode( $x_pos_circ1, $y_pos, $item->{'barcode'},
-        $conf_data->{'barcodetype'}, \$item );
-    build_circ_barcode( $x_pos_circ2, $y_pos, $item->{'barcode'},
-        $conf_data->{'barcodetype'}, \$item );
-}
-# added for xpdf compat. doesnt use type3 fonts., but increases filesize from 20k to 200k
-# i think its embedding extra fonts in the pdf file.
-#	mode => 'graphic',
-
-    $y_pos = ( $y_pos - $label_height );
-
-    # the gaylord labels have 8 rows per sheet, this pagebreaks after 8 rows
-    if ( $page_break_count == 8 ) {
-        prPage();
-
-        #warn "############# PAGEBREAK ###########";
-        $page_break_count = 0;
-        $i2               = 0;
-        $y_pos            = $y_pos_initial;
-    }
-    $page_break_count++;
-    $i2++;
-}
-############## end of loop
-
-
-prEnd();
-
-#----------------------------------------------------------------------------
-# this second section of the script uses a diff perl class than the previous section
-# it opens the 'new.pdf' file that the previous section has just saved
-
-if ( $printingtype eq 'spine' || $printingtype eq 'both' ) {
-
-    $file = "$htdocs_path/barcodes/new.pdf";
-
-    my $pdf = new PDF::Report( File => $file );
-
-    # my $pdf = new PDF::Report(PageSize => "letter",
-    #                                  PageOrientation => "Landscape");
-
-    #$pdf->newpage($nopage);
-    my $pagenumber = 1;
-    $pdf->openpage($pagenumber);
-
-    ( $pagewidth, $pageheight ) = $pdf->getPageDimensions();
-
-    #warn "PAGE DIM = $pagewidth, $pageheight";
-    #warn "Y START ROW = $y_pos_initial_startrow";
-    my $y_pos = ( $y_pos_initial_startrow + 90 );
-
-    #my $y_pos = ( $y_pos_initial_startrow  );
-    #warn "Y POS = $y_pos";
-
-    # now needed now we are using centerString().
-    #$pdf->setAlign('left');
-    
-    # SET THE FONT SIZE
-    $pdf->setSize(9);
-
-    my $page_break_count = $startrow;
-
-    #warn "INIT PAGEBREAK COUNT = $page_break_count";
-
-    #warn "#----------------------------------\n";
-    #warn "INIT VPOS = $vPos, hPos = $hPos";
-
-    my $vPosSpacer     = 15;
-    my $start_text_pos = 39;   # ( 36 - 5 = 31 ) 5 is an inside border for text.
-    my $spine_label_text_with = 67;
-
-    foreach $item (@resultsloop) {
-
-        #warn Dumper $item;
-        #warn "START Y_POS=$y_pos";
-        my $firstrow = 0;
-
-        $pdf->setAddTextPos( $start_text_pos, ( $y_pos - 20 ) )
-          ;                    # INIT START POS
-        ( $hPos, $vPos ) = $pdf->getAddTextPos();
-
-        my $hPosEnd = ( $hPos + $spine_label_text_with );    # 72
-        if ( $conf_data->{'dewey'} && $item->{'dewey'} ) {
-            ( $hPos, $vPos1 ) = $pdf->getAddTextPos();
-            $pdf->centerString( $hPos, $hPosEnd, $vPos, $item->{'dewey'} );
-            $vPos = $vPos - $vPosSpacer;
-        }
-
-        if ( $conf_data->{'isbn'} && $item->{'isbn'} ) {
-            ( $hPos, $vPos1 ) = $pdf->getAddTextPos();
-            $pdf->centerString( $hPos, $hPosEnd, $vPos, $item->{'isbn'} );
-            $vPos = $vPos - $vPosSpacer;
-        }
-
-        if ( $conf_data->{'class'} && $item->{'classification'} ) {
-            ( $hPos, $vPos1 ) = $pdf->getAddTextPos();
-            $pdf->centerString( $hPos, $hPosEnd, $vPos,
-                $item->{'classification'} );
-            $vPos = $vPos - $vPosSpacer;
-        }
-
-        if ( $conf_data->{'itemtype'} && $item->{'itemtype'} ) {
-            ( $hPos, $vPos1 ) = $pdf->getAddTextPos();
-            $pdf->centerString( $hPos, $hPosEnd, $vPos, $item->{'itemtype'} );
-            $vPos = $vPos - $vPosSpacer;
-        }
-
-        #$pdf->drawRect(
-        #    $x_pos_spine, $y_pos,
-        #    ( $x_pos_spine + $spine_width ),
-        #    ( $y_pos - $label_height )
-        #);
-
-        $y_pos = ( $y_pos - $label_height );
-
-        #warn "END LOOP Y_POS =$y_pos";
-        #    warn "PAGECOUNT END LOOP=$page_break_count";
-        if ( $page_break_count == 8 ) {
-            $pagenumber++;
-            $pdf->openpage($pagenumber);
-
-            #warn "############# PAGEBREAK ###########";
-            $page_break_count = 0;
-            $i2               = 0;
-            $y_pos            = ( $y_pos_initial + 90 );
-        }
-
-        $page_break_count++;
-        $i2++;
-
-        #warn "#----------------------------------\n";
-
-    }
-    $DB::single = 1;
-    $pdf->saveAs($file);
-}
-
-#------------------------------------------------
-
-print $cgi->redirect("/intranet-tmpl/barcodes/new.pdf");

Index: barcodes/label-print.pl
===================================================================
RCS file: barcodes/label-print.pl
diff -N barcodes/label-print.pl
--- barcodes/label-print.pl	21 Jul 2006 13:55:57 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,138 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Serials;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use HTML::Template;
-use GD::Barcode::UPCE;
-use Data::Random qw(:all);
-
-my $htdocs_path = C4::Context->config('intrahtdocs');
-
-use Data::Dumper;
-
-my $query = new CGI;
-
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => "barcodes/label-print.tmpl",
-        query           => $query,
-        type            => "intranet",
-        authnotrequired => 0,
-        flagsrequired   => { catalogue => 1 },
-        debug           => 1,
-    }
-);
-
-my $dbh    = C4::Context->dbh;
-my $query2 = "SELECT * FROM labels_conf LIMIT 1";
-my $sth    = $dbh->prepare($query2);
-$sth->execute();
-
-my $conf_data = $sth->fetchrow_hashref;
-
-#warn Dumper $conf_data;
-
-$sth->finish;
-
-my @data;
-my $query3 = "Select * from labels";
-my $sth    = $dbh->prepare($query3);
-$sth->execute();
-my @resultsloop;
-my $cnt = $sth->rows;
-my $i1  = 1;
-while ( my $data = $sth->fetchrow_hashref ) {
-
-    # lets get some summary info from each item
-
-    my $query1 = "
-                        select * from biblio,biblioitems,items where itemnumber=? and
-                                items.biblioitemnumber=biblioitems.biblioitemnumber and
-                                biblioitems.biblionumber=biblio.biblionumber";
-
-    my $sth1 = $dbh->prepare($query1);
-    $sth1->execute( $data->{'itemnumber'} );
-    my $data1 = $sth1->fetchrow_hashref();
-
-    push( @resultsloop, $data1 );
-    $sth1->finish;
-
-    $i1++;
-}
-$sth->finish;
-
-#warn Dumper @resultsloop;
-
-
-
-
-#------------------------------------------------------
-
-#lets write barcode files to tmp dir for every item in @resultsloop
-
-
-
-binmode(FILE);
-foreach my $item (@resultsloop){
-
-
-my $random = int( rand(100000000000)) + 999999999999;
-#warn  "$random\n";
-
-	$item->{'barcode'} = $random;
-
-#	my $itembarcode = $item->{'barcode'};
-#	warn $item->{'barcode'};
-
-
-	my $filename = "$htdocs_path/barcodes/$item->{'barcode'}.png";
-	#warn $filename;
-	open(FILE, ">$filename"); 
-
-	print FILE GD::Barcode->new('EAN13',  $item->{'barcode'})->plot->png;
-#	warn $GD::Barcode::errStr;
-
-	close(FILE);
-
-#warn Dumper  $item->{'barcode'};
-
-}
-
-
-
-
-
-# lets pass the config setting
-
-$template->param(
-
-    resultsloop             => \@resultsloop,
-
-
- 	  itemtype_opt => $conf_data->{'itemtype'},
-          papertype_opt => $conf_data->{'papertype'},
-          author_opt => $conf_data->{'author'},
-          barcode_opt => $conf_data->{'barcode'},
-          id_opt => $conf_data->{'id'},
-          type_opt => $conf_data->{'type'},
-          title_opt => $conf_data->{'title'},
-          isbn_opt => $conf_data->{'isbn'},
-          dewey_opt => $conf_data->{'dewey'},
-          class_opt => $conf_data->{'class'},
-
-
-
-
-    intranetcolorstylesheet =>
-      C4::Context->preference("intranetcolorstylesheet"),
-    intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-    IntranetNav        => C4::Context->preference("IntranetNav"),
-);
-output_html_with_http_headers $query, $cookie, $template->output;
-
-

Index: barcodes/pdfViewer.pl
===================================================================
RCS file: barcodes/pdfViewer.pl
diff -N barcodes/pdfViewer.pl
--- barcodes/pdfViewer.pl	5 Sep 2005 22:25:11 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,40 +0,0 @@
-#!/usr/bin/perl
-
-# script to show a PDF file.
-# written 07/04
-# by Veleda Matias - matias_veleda at hotmail.com - Physics Library UNLP Argentina and
-#    Castañeda Sebastian - seba3c at yahoo.com.ar - Physics Library UNLP Argentina and
-
-# 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
-
-require Exporter;
-
-use strict;
-use C4::Context;
-use CGI;
-
-# This script take a pdf filename as a parameter and output it to the browser.
-my $cgi = new CGI;
-my $filename = "barcodes.pdf";
-my $tmpFileName = $cgi->param('tmpFileName');
-print "Content-Disposition: attachment; filename = $filename\n\n";
-print $cgi->header(-type => 'application/pdf'),
-      $cgi->start_html(-title=>"Codify to PDF");
-open fh, "<$tmpFileName";
-while (<fh>) {
- print;
-}
-print $cgi->end_html();

Index: barcodes/printerConfig.pl
===================================================================
RCS file: barcodes/printerConfig.pl
diff -N barcodes/printerConfig.pl
--- barcodes/printerConfig.pl	4 Jul 2006 14:36:51 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,120 +0,0 @@
-#!/usr/bin/perl
-
-# script to set the labels configuration for the printer process.
-# written 07/04
-# by Veleda Matias - matias_veleda at hotmail.com - Physics Library UNLP Argentina and
-
-# 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
-
-require Exporter;
-
-use strict;
-
-use CGI;
-use C4::Context;
-use C4::Output;
-use C4::Auth;
-use HTML::Template;
-use PDF::API2;
-use PDF::API2::Page;
-use PDF::API2::PDF::Utils;
-use C4::Interface::CGI::Output;
-
-# This function returns the path to deal with the correct files, considering
-# templates set and language.
-sub getPath {
-	my $type = shift @_;
-	my $templatesSet = C4::Context->preference('template');
-	my $lang = C4::Context->preference('opaclanguages');
-	if ($type eq "intranet") {
-		return "$ENV{'DOCUMENT_ROOT'}/intranet-tmpl/$templatesSet/$lang";
-	} else {
-		return "$ENV{'DOCUMENT_ROOT'}/opac-tmpl/$templatesSet/$lang";
-	}
-}
-
-# Load a configuration file.
-sub loadConfFromFile {
-  my $fileName = shift @_;
-	my %keyValues;
-	open FILE, "<$fileName";
-	while (<FILE>) {
-		chomp;
-		if (/\s*([\w_]*)\s*=\s*([\[\]\<\>\w_\s:@,\.-]*)\s*/) {
-			$keyValues{$1} = $2;
-		}
-	}
-	close FILE;
-	return %keyValues;
-}
-
-# Save settings to a configuration file.
-sub saveConfToFile {
-	my $fileName = shift @_;
-	my %keyValues = %{shift @_};
-	my $i;
-	open FILE, ">$fileName";			
-	my $i;
-	foreach $i (keys(%keyValues)) {
-    print FILE $i." = ".$keyValues{$i}."\n";
-	}
-	close FILE;
-}
-
-# Creates a CGI object and take his parameters
-my $input = new CGI;
-
-if ($input->param('saveSettings')) {
-	my $labelConf = &getPath("intranet")."/includes/labelConfig/itemsLabelConfig.conf";
-	my %newConfiguration = (pageType => $input->param('pageType'), 	
-							columns => $input->param('columns'), 		
-							rows => $input->param('rows'), 	
-							systemDpi => $input->param('systemDpi'), 	
-							labelWidth => $input->param('labelWidth'), 	
-							labelHeigth => $input->param('labelHeigth'),	
-							marginBottom => $input->param('marginBottom'), 	
-							marginLeft => $input->param('marginLeft')); 	
-	saveConfToFile($labelConf, \%newConfiguration);
-	print $input->redirect('/cgi-bin/koha/barcodes/barcodes.pl')
-}
-
-# Get the template to use
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "barcodes/printerConfig.tmpl",
-			                 type => "intranet",
-			                 query => $input,
-			                 authnotrequired => 0,
-			                 flagsrequired => {parameters => 1},
-					         debug => 1,
-			               });
-
-my $filenameConf = &getPath("intranet")."/includes/labelConfig/itemsLabelConfig.conf";
-my %labelConfig = &loadConfFromFile($filenameConf);
-
-$template->param(COLUMNS => $labelConfig{'columns'});
-$template->param(ROWS => $labelConfig{'rows'});
-$template->param(SYSTEM_DPI => $labelConfig{'systemDpi'});
-$template->param(LABEL_WIDTH => $labelConfig{'labelWidth'});
-$template->param(LABEL_HEIGTH => $labelConfig{'labelHeigth'});
-$template->param(MARGIN_TOP => $labelConfig{'marginBottom'});
-$template->param(MARGIN_LEFT => $labelConfig{'marginLeft'});
-$template->param(SCRIPT_NAME => '/cgi-bin/koha/barcodes/printerConfig.pl');
-$template->param("$labelConfig{'pageType'}" => 1);
-$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;

Index: barcodes/test.textblock.pl
===================================================================
RCS file: barcodes/test.textblock.pl
diff -N barcodes/test.textblock.pl
--- barcodes/test.textblock.pl	19 Jul 2006 01:09:42 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-#!/usr/bin/perl
-
-use C4::Context;
-use PDF::API2;
-use PDF::Table;
-
-my $pdftable = new PDF::Table;
-my $pdf      = PDF::API2->new();
-
-#$pdf->mediabox(612,792);
-my $fnt = $pdf->corefont('Helvetica-Bold');
-my $page = $pdf->page;    # returns the last page
-my $txt  = $page->text;
-$txt->{' font'}=$fnt;
-$text_to_place = "moo moo";
-
-($width_of_last_line, $ypos_of_last_line, $left_over_text) = 
-  $pdftable->text_block(
-    $txt,
-    $text_to_place,
-    -x => 100,
-    -y => 300,
-    -w => 50,
-    -h => 40,
-      
-    # 	-lead     => 13,
-    #	-font_size => 12,
-    # -parspace => 0,
-    #   -align    => "left",
-    #   -hang     => 1,
-);
-
-$pdf->saveas("$htdocs_path/barcodes/foo.pdf");

Index: bookshelves/addbookbybiblionumber.pl
===================================================================
RCS file: bookshelves/addbookbybiblionumber.pl
diff -N bookshelves/addbookbybiblionumber.pl
--- bookshelves/addbookbybiblionumber.pl	27 Sep 2006 21:19:21 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,123 +0,0 @@
-#!/usr/bin/perl
-#script to provide bookshelf management
-# WARNING: This file uses 4-character tabs!
-#
-# $Header: /sources/koha/koha/bookshelves/addbookbybiblionumber.pl,v 1.5 2006/09/27 21:19:21 tgarip1957 Exp $
-#
-# 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 C4::Search;
-use C4::Biblio;
-use CGI;
-use C4::BookShelves;
-use C4::Circulation::Circ2;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-
-my $env;
-my $query = new CGI;
-my $biblionumber = $query->param('biblionumber');
-my $shelfnumber = $query->param('shelfnumber');
-my $newbookshelf = $query->param('newbookshelf');
-my $category = $query->param('category');
-
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "bookshelves/addbookbybiblionumber.tmpl",
-							query => $query,
-							type => "intranet",
-							authnotrequired => 0,
-							flagsrequired => {catalogue => 1},
-						});
-
-my $x; # for trash
-($x,$x,$shelfnumber) = AddShelf('',$newbookshelf,$loggedinuser,$category) if $newbookshelf;
-
-if ($shelfnumber) {
-	&AddToShelfFromBiblio($env, $biblionumber, $shelfnumber);
-	print "Content-Type: text/html\n\n<html><body onload=\"window.close()\"></body></html>";
-	exit;
-} else {
-
-	my  ( $bibliocount, @biblios )  = getbiblio($biblionumber);
-
-	my ($shelflist) = GetShelfList($loggedinuser,3);
-	my @shelvesloop;
-	my %shelvesloop;
-	foreach my $element (sort keys %$shelflist) {
-			push (@shelvesloop, $element);
-			$shelvesloop{$element} = $shelflist->{$element}->{'shelfname'};
-	}
-
-	my $CGIbookshelves=CGI::scrolling_list( -name     => 'shelfnumber',
-				-values   => \@shelvesloop,
-				-labels   => \%shelvesloop,
-				-size     => 1,
-	 			-tabindex=>'',
-				-multiple => 0 );
-
-	$template->param(biblionumber => $biblionumber,
-						title => $biblios[0]->{'title'},
-						author => $biblios[0]->{'author'},
-						CGIbookshelves => $CGIbookshelves,
-						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-						);
-
-	output_html_with_http_headers $query, $cookie, $template->output;
-}
-# $Log: addbookbybiblionumber.pl,v $
-# Revision 1.5  2006/09/27 21:19:21  tgarip1957
-# Finalized XML version for intranet
-#
-# Revision 1.4  2006/07/04 14:36:51  toins
-# Head & rel_2_2 merged
-#
-# Revision 1.3.2.4  2006/06/20 16:21:42  oleonard
-# Adding "tabindex=''" to CGI:scrolling_lists to prevent incorrect tabbing. See Bug 1098
-#
-# Revision 1.3.2.3  2006/02/05 21:59:21  kados
-# Adds script support for IntranetNav ... see mail to koha-devel for
-# details
-#
-# Revision 1.3.2.2  2006/02/05 21:45:25  kados
-# Adds support for intranetstylesheet system pref in Koha scripts
-#
-# Revision 1.3.2.1  2006/02/04 21:26:47  kados
-# Adds support for intranetcolorstylesheet
-#
-# Revision 1.3  2004/12/15 17:28:22  tipaul
-# adding bookshelf features :
-# * create bookshelf on the fly
-# * modify a bookshelf (this being not finished, will commit the rest soon)
-#
-# Revision 1.2  2004/11/19 16:31:30  tipaul
-# bugfix for bookshelves not in official CVS
-#
-# Revision 1.1.2.2  2004/03/10 15:08:18  tipaul
-# modifying shelves : introducing category of shelf : private, public, free for all
-#
-# Revision 1.1.2.1  2004/02/19 10:14:36  tipaul
-# new feature : adding book to bookshelf from biblio detail screen.
-#
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: bookshelves/shelves.pl
===================================================================
RCS file: bookshelves/shelves.pl
diff -N bookshelves/shelves.pl
--- bookshelves/shelves.pl	27 Sep 2006 21:19:21 -0000	1.10
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,295 +0,0 @@
-#!/usr/bin/perl
-#script to provide bookshelf management
-# WARNING: This file uses 4-character tabs!
-#
-# $Header: /sources/koha/koha/bookshelves/shelves.pl,v 1.10 2006/09/27 21:19:21 tgarip1957 Exp $
-#
-# 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 C4::Search;
-use CGI;
-use C4::BookShelves;
-use C4::Circulation::Circ2;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-
-my $env;
-my $query = new CGI;
-my $headerbackgroundcolor='#663266';
-my $circbackgroundcolor='#555555';
-my $circbackgroundcolor='#550000';
-my $linecolor1='#bbbbbb';
-my $linecolor2='#dddddd';
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "bookshelves/shelves.tmpl",
-							query => $query,
-							type => "intranet",
-							authnotrequired => 0,
-							flagsrequired => {catalogue => 1},
-						});
-
-if ($query->param('modifyshelfcontents')) {
-	my $shelfnumber=$query->param('shelfnumber');
-	my $barcode=$query->param('addbarcode');
-	my ($item) = getiteminformation($env, 0, $barcode);
-	if (ShelfPossibleAction($loggedinuser,$shelfnumber,'manage')) {
-		AddToShelf($env, $item->{'itemnumber'}, $shelfnumber);
-		foreach ($query->param) {
-			if (/REM-(\d*)/) {
-				my $itemnumber=$1;
-				RemoveFromShelf($env, $itemnumber, $shelfnumber);
-			}
-		}
-	}
-}
-my ($shelflist) = GetShelfList($loggedinuser,2);
-
-$template->param({	loggedinuser => $loggedinuser,
-					headerbackgroundcolor => $headerbackgroundcolor,
-					circbackgroundcolor => $circbackgroundcolor });
-SWITCH: {
-	if ($query->param('op') eq 'modifsave') {
-		ModifShelf($query->param('shelfnumber'),$query->param('shelfname'),$loggedinuser,$query->param('category'));
-		last SWITCH;
-	}
-	if ($query->param('op') eq 'modif') {
-		my ($shelfnumber,$shelfname,$owner,$category) = GetShelf($query->param('shelf'));
-		$template->param(edit => 1,
-						shelfnumber => $shelfnumber,
-						shelfname => $shelfname,
-						"category$category" => 1);
-# 		editshelf($query->param('shelf'));
-		last SWITCH;
-	}
-	if ($query->param('viewshelf')) {
-		viewshelf($query->param('viewshelf'));
-		last SWITCH;
-	}
-	if ($query->param('shelves')) {
-		shelves();
-		last SWITCH;
-	}
-}
-
-($shelflist) = GetShelfList($loggedinuser,2); # rebuild shelflist in case a shelf has been added
-
-my $color='';
-my @shelvesloop;
-foreach my $element (sort keys %$shelflist) {
-		my %line;
-		($color eq 1) ? ($color=0) : ($color=1);
-		$line{'toggle'}=$color;
-		$line{'shelf'}=$element;
-		$line{'shelfname'}=$shelflist->{$element}->{'shelfname'};
-		$line{"category".$shelflist->{$element}->{'category'}} = 1;
-		$line{'mine'} = 1 if $shelflist->{$element}->{'owner'} eq $loggedinuser;
-		$line{'shelfbookcount'}=$shelflist->{$element}->{'count'};
-		$line{'canmanage'} = ShelfPossibleAction($loggedinuser,$element,'manage');
-		$line{'firstname'}=$shelflist->{$element}->{'firstname'} unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
-		$line{'surname'}=$shelflist->{$element}->{'surname'} unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
-;
-		push (@shelvesloop, \%line);
-		}
-$template->param(shelvesloop => \@shelvesloop,
-		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-		);
-
-output_html_with_http_headers $query, $cookie, $template->output;
-
-# sub editshelf {
-# 	my ($shelfnumber) = @_;
-# 	my ($shelfnumber,$shelfname,$owner,$category) = GetShelf($shelfnumber);
-# 	$template->param(edit => 1,
-# 					shelfnumber => $shelfnumber,
-# 					shelfname => $shelfname,
-# 					"category$category" => 1);
-# }
-sub shelves {
-	if (my $newshelf=$query->param('addshelf')) {
-		my ($status, $string) = AddShelf($env,$newshelf,$query->param('owner'),$query->param('category'));
-		if ($status) {
-			$template->param(status1 => $status, string1 => $string);
-		}
-	}
-	my @paramsloop;
-	foreach ($query->param()) {
-		my %line;
-		if (/DEL-(\d+)/) {
-			my $delshelf=$1;
-			my ($status, $string) = RemoveShelf($env,$delshelf);
-			if ($status) {
-				$line{'status'}=$status;
-				$line{'string'} = $string;
-			}
-		}
-		#if the shelf is not deleted, %line points on null
-		push(@paramsloop,\%line);
-	}
-	$template->param(paramsloop => \@paramsloop);
-	my ($shelflist) = GetShelfList($loggedinuser,2);
-	my $color='';
-	my @shelvesloop;
-	foreach my $element (sort keys %$shelflist) {
-		my %line;
-		($color eq 1) ? ($color=0) : ($color=1);
-		$line{'toggle'}=$color;
-		$line{'shelf'}=$element;
-		$line{'shelfname'}=$shelflist->{$element}->{'shelfname'} ;
-		$line{'shelfbookcount'}=$shelflist->{$element}->{'count'} ;
-		push(@shelvesloop, \%line);
-	}
-	$template->param(shelvesloop=>\@shelvesloop,
-							shelves => 1,
-						);
-}
-
-sub viewshelf {
-	my $shelfnumber=shift;
-	#check that the user can view the shelf
-	return unless (ShelfPossibleAction($loggedinuser,$shelfnumber,'view'));
-	my ($itemlist) = GetShelfContents($env, $shelfnumber);
-	my $item='';
-	my $color='';
-	my @itemsloop;
-	foreach $item (sort {$a->{'barcode'} cmp $b->{'barcode'}} @$itemlist) {
-		my %line;
-		($color eq 1) ? ($color=0) : ($color=1);
-		$line{'toggle'}=$color;
-		$line{'itemnumber'}=$item->{'itemnumber'};
-		$line{'barcode'}=$item->{'barcode'};
-		$line{'title'}=$item->{'title'};
-		$line{'author'}=$item->{'author'};
-		$line{'publicationyear'}=$item->{'publicationyear'};
-		$line{'itemtype'}=$item->{'itemtype'};
-		$line{biblionumber} = $item->{biblionumber};
-		push(@itemsloop, \%line);
-	}
-	$template->param(	itemsloop => \@itemsloop,
-						shelfname => $shelflist->{$shelfnumber}->{'shelfname'},
-						shelfnumber => $shelfnumber,
-						viewshelf => $query->param('viewshelf'),
-						manageshelf => &ShelfPossibleAction($loggedinuser,$shelfnumber,'manage'),
-					);
-}
-
-#
-# $Log: shelves.pl,v $
-# Revision 1.10  2006/09/27 21:19:21  tgarip1957
-# Finalized XML version for intranet
-#
-# Revision 1.9  2006/07/04 14:36:51  toins
-# Head & rel_2_2 merged
-#
-# Revision 1.5.2.5  2006/02/05 21:59:21  kados
-# Adds script support for IntranetNav ... see mail to koha-devel for
-# details
-#
-# Revision 1.5.2.4  2006/02/05 21:45:25  kados
-# Adds support for intranetstylesheet system pref in Koha scripts
-#
-# Revision 1.5.2.3  2006/02/04 21:26:47  kados
-# Adds support for intranetcolorstylesheet
-#
-# Revision 1.5.2.2  2005/04/27 18:15:27  oleonard
-# Left out some instances in the previous update
-#
-# Revision 1.5.2.1  2005/04/27 16:55:38  oleonard
-# Moving alternating row colors to the template, adding publicationyear and itemtype variables
-#
-# Revision 1.5  2004/12/16 11:30:57  tipaul
-# adding bookshelf features :
-# * create bookshelf on the fly
-# * modify a bookshelf name & status
-#
-# Revision 1.4  2004/12/15 17:28:23  tipaul
-# adding bookshelf features :
-# * create bookshelf on the fly
-# * modify a bookshelf (this being not finished, will commit the rest soon)
-#
-# Revision 1.3  2004/12/02 16:38:50  tipaul
-# improvement in book shelves
-#
-# Revision 1.2  2004/11/19 16:31:30  tipaul
-# bugfix for bookshelves not in official CVS
-#
-# Revision 1.1.2.1  2004/03/10 15:08:18  tipaul
-# modifying shelves : introducing category of shelf : private, public, free for all
-#
-# Revision 1.13  2004/02/11 08:35:31  tipaul
-# synch'ing 2.0.0 branch and head
-#
-# Revision 1.12.2.1  2004/02/06 14:22:19  tipaul
-# fixing bugs in bookshelves management.
-#
-# Revision 1.12  2003/02/05 10:04:14  acli
-# Worked around weirdness with HTML::Template; without the {}, it complains
-# of being passed an odd number of arguments even though we are not
-#
-# Revision 1.11  2003/02/05 09:23:03  acli
-# Fixed a few minor errors to make it run
-# Noted correct tab size
-#
-# Revision 1.10  2003/02/02 07:18:37  acli
-# Moved C4/Charset.pm to C4/Interface/CGI/Output.pm
-#
-# Create output_html_with_http_headers function to contain the "print $query
-# ->header(-type => guesstype...),..." call. This is in preparation for
-# non-HTML output (e.g., text/xml) and charset conversion before output in
-# the future.
-#
-# Created C4/Interface/CGI/Template.pm to hold convenience functions specific
-# to the CGI interface using HTML::Template
-#
-# Modified moremembers.pl to make the "sex" field localizable for languages
-# where M and F doesn't make sense
-#
-# Revision 1.9  2002/12/19 18:55:40  hdl
-# Templating reservereport et shelves.
-#
-# Revision 1.9  2002/08/14 18:12:51  hdl
-# Templating files
-#
-# Revision 1.8  2002/08/14 18:12:51  tonnesen
-# Added copyright statement to all .pl and .pm files
-#
-# Revision 1.7  2002/07/05 05:03:37  tonnesen
-# Minor changes to authentication routines.
-#
-# Revision 1.5  2002/07/04 19:42:48  tonnesen
-# Minor changes
-#
-# Revision 1.4  2002/07/04 19:21:29  tonnesen
-# Beginning of authentication api.  Applied to shelves.pl for now as a test case.
-#
-# Revision 1.2.2.1  2002/06/26 20:28:15  tonnesen
-# Some udpates that I made here locally a while ago.  Still won't be useful, but
-# should be functional
-#
-#
-#
-
-
-
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: catalogue/ISBDdetail.pl
===================================================================
RCS file: catalogue/ISBDdetail.pl
diff -N catalogue/ISBDdetail.pl
--- catalogue/ISBDdetail.pl	15 Nov 2006 01:41:51 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,152 +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
-
-=head1 NAME
-
-ISBDdetail.pl : script to show a biblio in ISBD format
-
-=head1 SYNOPSIS
-
-
-=head1 DESCRIPTION
-
-This script needs a biblionumber in bib parameter (bibnumber
-from koha style DB.  Automaticaly maps to marc biblionumber).
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
-
-use strict;
-
-use C4::Auth;
-use C4::Context;
-use C4::AuthoritiesMarc;
-use C4::Interface::CGI::Output;
-use CGI;
-use C4::Search;
-use C4::Biblio;
-use C4::Acquisition;
-use C4::Koha;
-
-my $query=new CGI;
-
-my $dbh=C4::Context->dbh;
-
-my $biblionumber=$query->param('biblionumber');
-
-my $itemtype = &MARCfind_frameworkcode($dbh,$biblionumber);
-my $tagslib = &MARCgettagslib($dbh,1,$itemtype);
-
-my $record =XMLgetbibliohash($dbh,$biblionumber);
-# open template
-my ($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "catalogue/ISBDdetail.tmpl",
-			     query => $query,
-			     type => "intranet",
-			     authnotrequired => 1,
-			     debug => 1,
-			     });
-
-my $ISBD = C4::Context->preference('ISBD');
-my $res;
-	my $bloc = $ISBD;
-	my $blocres;
-	foreach my $isbdfield (split /#/,$bloc) {
-		$isbdfield =~ /(\d\d\d)\|(.*)\|(.*)\|(.*)/;
-		my $fieldvalue=$1;
-		my $textbefore=$2;
-		my $analysestring=$3;
-		my $textafter=$4;
-		if ($fieldvalue>0) {
-			my $hasputtextbefore=0;
-			
-				my $calculated = $analysestring;
-				my $tag = $fieldvalue;
-				if ($tag<10) {
-				my $value=XML_readline_onerecord($record,"","",$tag);
-				my $subfieldcode = "@";
-						my $subfieldvalue = get_authorised_value_desc($tag, "", $value, '', $dbh);;
-						my $tagsubf = $tag.$subfieldcode;
-						$calculated =~ s/\{(.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue\{$1$tagsubf$2\}$2/g;
-					
-				} else {
-					my @subf = XML_readline_withtags($record,"","",$tag);
-				
-					for my $i (0..$#subf) {
-						my $subfieldcode = $subf[$i][0];
-						my $subfieldvalue = get_authorised_value_desc($tag, $subf[$i][0], $subf[$i][1], '', $dbh);;
-						my $tagsubf = $tag.$subfieldcode;
-						$calculated =~ s/\{(.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue\{$1$tagsubf$2\}$2/g;
-					}
-					# field builded, store the result
-					if ($calculated && !$hasputtextbefore) { # put textbefore if not done
-						$blocres .=$textbefore;
-						$hasputtextbefore=1
-					}
-					# remove punctuation at start
-					$calculated =~ s/^( |;|:|\.|-)*//g;
-					$blocres.=$calculated;
-				}
-			
-			$blocres .=$textafter if $hasputtextbefore;
-		} else {
-			$blocres.=$isbdfield;
-		}
-	}
-	$res.=$blocres;
-# }
-$res =~ s/\{(.*?)\}//g;
-$res =~ s/\\n/\n/g;
-$res =~ s/\n/<br\/>/g;
-# remove empty ()
-$res =~ s/\(\)//g;
-$template->param(ISBD => $res,
-				biblionumber => $biblionumber);
-
-output_html_with_http_headers $query, $cookie, $template->output;
-
-sub get_authorised_value_desc ($$$$$) {
-   my($tag, $subfield, $value, $framework, $dbh) = @_;
-
-   #---- branch
-    if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
-       return getbranchname($value);
-    }
-
-   #---- itemtypes
-   if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
-       return ItemType($value);
-    }
-
-   #---- "true" authorized value
-   my $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
-
-   if ($category ne "") {
-       my $sth = $dbh->prepare("select lib from authorised_values where category = ? and authorised_value = ?");
-       $sth->execute($category, $value);
-       my $data = $sth->fetchrow_hashref;
-       return $data->{'lib'};
-   } else {
-       return $value; # if nothing is found return the original value
-   }
-}

Index: catalogue/MARCdetail.pl
===================================================================
RCS file: catalogue/MARCdetail.pl
diff -N catalogue/MARCdetail.pl
--- catalogue/MARCdetail.pl	27 Sep 2006 19:37:27 -0000	1.8
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,327 +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
-
-=head1 NAME
-
-MARCdetail.pl : script to show a biblio in MARC format
-
-=head1 SYNOPSIS
-
-
-=head1 DESCRIPTION
-
-This script needs a biblionumber in bib parameter (bibnumber
-from koha style DB.  Automaticaly maps to marc biblionumber).
-
-It shows the biblio in a (nice) MARC format depending on MARC
-parameters tables.
-
-The template is in <templates_dir>/catalogue/MARCdetail.tmpl.
-this template must be divided into 11 "tabs".
-
-The first 10 tabs present the biblio, the 11th one presents
-the items attached to the biblio
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
-
-use strict;
-use C4::Auth;
-use C4::Context;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use CGI;
-use C4::Search;
-use C4::Biblio;
-use C4::Acquisition;
-use C4::Serials; #uses getsubscriptionsfrombiblionumber
-use C4::Koha;
-
-my $query=new CGI;
-
-my $dbh=C4::Context->dbh;
-my $retrieve_from=C4::Context->preference('retrieve_from');
-my $biblionumber=$query->param('biblionumber');
-my $frameworkcode = $query->param('frameworkcode');
-my $popup = $query->param('popup'); # if set to 1, then don't insert links, it's just to show the biblio
-my $record;
-my @itemrecords;
-my $xmlhash;
-$frameworkcode=MARCfind_frameworkcode($dbh,$biblionumber);
-my $tagslib = &MARCgettagslib($dbh,1,$frameworkcode);
-my $itemstagslib = &MARCitemsgettagslib($dbh,1,$frameworkcode);
-
-if ($retrieve_from eq "zebra"){
-($xmlhash, at itemrecords)=ZEBRAgetrecord($biblionumber);
-
-}else{
- $record =XMLgetbiblio($dbh,$biblionumber);
-$xmlhash=XML_xml2hash_onerecord($record);
-my @itemxmls=XMLgetallitems($dbh,$biblionumber);
-	foreach my $itemrecord(@itemxmls){
-	my $itemhash=XML_xml2hash($itemrecord);
-	push @itemrecords, $itemhash;
-	}
-}
-
-my ($template, $loggedinuser, $cookie)
-		= get_template_and_user({template_name => "catalogue/MARCdetail.tmpl",
-			     query => $query,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {catalogue => 1},
-			     debug => 1,
-			     });
-
-#Getting the list of all frameworks
-my $queryfwk =$dbh->prepare("select frameworktext, frameworkcode from biblios_framework");
-$queryfwk->execute;
-my %select_fwk;
-my @select_fwk;
-my $curfwk;
-push @select_fwk,"Default";
-$select_fwk{"Default"} = "Default";
-while (my ($description, $fwk) =$queryfwk->fetchrow) {
-	push @select_fwk, $fwk;
-	$select_fwk{$fwk} = $description;
-}
-$curfwk=$frameworkcode;
-my $framework=CGI::scrolling_list( -name     => 'Frameworks',
-			-id => 'Frameworks',
-			-default => $curfwk,
-			-OnChange => 'Changefwk(this);',
-			-values   => \@select_fwk,
-			-labels   => \%select_fwk,
-			-size     => 1,
-			-multiple => 0 );
-
-$template->param( framework => $framework);
-# fill arrays
-my @loop_data =();
-my $tag;
-# loop through each tab 0 through 9
-##Only attempt to fill the template if we actually received a MARC record
-if ($xmlhash){
-my ($isbntag,$isbnsub)=MARCfind_marc_from_kohafield("isbn","biblios");
-my $biblio=$xmlhash->{'datafield'};
-my $controlfields=$xmlhash->{'controlfield'};
-my $leader=$xmlhash->{'leader'};
-for (my $tabloop = 0; $tabloop<10;$tabloop++) {
-# loop through each tag
-	my @loop_data =();
-	my @subfields_data;
-
-	# deal with leader 
-	unless (($tagslib->{'000'}->{'@'}->{tab}  ne $tabloop)  || (substr($tagslib->{'000'}->{'@'}->{hidden},1,1)>0)) {
-		
-		my %subfield_data;
-		$subfield_data{marc_value}=$leader->[0] ;
-		push(@subfields_data, \%subfield_data);
-		my %tag_data;
-		$tag_data{tag}='000 -'. $tagslib->{'000'}->{lib};
-		my @tmp = @subfields_data;
-		$tag_data{subfield} = \@tmp;
-		push (@loop_data, \%tag_data);
-		undef @subfields_data;
-	}
-	##Controlfields
-		
-		 foreach my $control (@$controlfields){
-			my %subfield_data;
-			my %tag_data;
-			next if ($tagslib->{$control->{'tag'}}->{'@'}->{tab}  ne $tabloop);
-			next if (substr($tagslib->{$control->{'tag'}}->{'@'}->{hidden},1,1)>0);			
-			$subfield_data{marc_value}=$control->{'content'} ;
-			push(@subfields_data, \%subfield_data);
-				if (C4::Context->preference('hide_marc')) {
-					$tag_data{tag}=$tagslib->{$control->{'tag'}}->{lib};
-				} else {
-					$tag_data{tag}=$control->{'tag'}.' -'. $tagslib->{$control->{'tag'}}->{lib};
-				}			
-			my @tmp = @subfields_data;
-			$tag_data{subfield} = \@tmp;
-			push (@loop_data, \%tag_data);
-			undef @subfields_data;
-		}
-	my $previoustag;
-	my %datatags;
-	my $i=0;
-	foreach my $data (@$biblio){
-		$datatags{$i++}=$data->{'tag'};
-		 foreach my $subfield ( $data->{'subfield'}){
-		     foreach my $code ( @$subfield){
-			next if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{tab}  ne $tabloop);
-			next if (substr($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{hidden},1,1)>0);
-			my %subfield_data;
-			my $value=$code->{'content'};
-			$subfield_data{marc_lib}=$tagslib->{$data->{'tag'}}->{$code->{'code'}}->{lib};
-			$subfield_data{link}=$tagslib->{$data->{'tag'}}->{$code->{'code'}}->{link};
-			if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{isurl}) {
-				$subfield_data{marc_value}="<a href=\"$value\">$value</a>";
-			} elsif ($data->{'tag'} eq $isbntag && $code->{'code'} eq $isbnsub) {
-				$subfield_data{marc_value}=DisplayISBN($value);
-			} else {
-				if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{authtypecode}) {
-				my ($authtag,$authtagsub)=MARCfind_marc_from_kohafield("auth_biblio_link_subf","biblios");
-				$subfield_data{authority}=XML_readline_onerecord($xmlhash,"","",$data->{'tag'},$authtagsub);
-				}	
-			$subfield_data{marc_value}=get_authorised_value_desc($data->{'tag'}, $code->{'code'}, $value, '', $dbh);
-			}
-			$subfield_data{marc_subfield}=$code->{'code'};
-			$subfield_data{marc_tag}=$data->{'tag'};
-			push(@subfields_data, \%subfield_data);
-		     }### $code
-		
-		
-		if ($#subfields_data==0) {
-		#	$subfields_data[0]->{marc_lib}='';
-		#	$subfields_data[0]->{marc_subfield}='';
-		}
-		if ($#subfields_data>=0) {
-			my %tag_data;
-			if (($datatags{$i} eq $datatags{$i-1}) && (C4::Context->preference('LabelMARCView') eq 'economical')) {
-				$tag_data{tag}="";
-			} else {
-				if (C4::Context->preference('hide_marc')) {
-					$tag_data{tag}=$tagslib->{$data->{'tag'}}->{lib};
-				} else {
-					$tag_data{tag}=$data->{'tag'}.' -'. $tagslib->{$data->{'tag'}}->{lib};
-				}
-			}
-			my @tmp = @subfields_data;
-			$tag_data{subfield} = \@tmp;
-			push (@loop_data, \%tag_data);
-			undef @subfields_data;
-		}
-	      }### each $subfield
-	}
-
-	$template->param($tabloop."XX" =>\@loop_data);
-}
-# now, build item tab !
-# the main difference is that datas are in lines and not in columns : thus, we build the <th> first, then the values...
-# loop through each tag
-# warning : we may have differents number of columns in each row. Thus, we first build a hash, complete it if necessary
-# then construct template.
-my @fields;
-my %witness; #---- stores the list of subfields used at least once, with the "meaning" of the code
-my @big_array;
-foreach my $itemrecord (@itemrecords){
-my $item=$itemrecord->{'datafield'};
-my $controlfields=$itemrecord->{'controlfield'};
-my $leader=$itemrecord->{'leader'};
-my %this_row;
-		### The leader
-		unless (substr($itemstagslib->{'000'}->{'@'}->{hidden},1,1)>0){
-			my @datasub='000@';
-			$witness{$datasub[0]} = $itemstagslib->{'000'}->{'@'}->{lib};
-			$this_row{$datasub[0]} =$leader->[0];
-		}
-		 foreach my $control (@$controlfields){
-		next if ($itemstagslib->{$control->{'tag'}}->{'@'}->{tab}  ne 10);
-			next if (substr($itemstagslib->{$control->{'tag'}}->{'@'}->{hidden},1,1)>0);
-			my @datasub=$control->{'tag'}.'@';
-			$witness{$datasub[0]} = $itemstagslib->{$control->{'tag'}}->{'@'}->{lib};
-			$this_row{$datasub[0]} =$control->{'content'};
-		}
-
-		foreach my $data (@$item){		
-		   foreach my $subfield ( $data->{'subfield'}){
-			foreach my $code ( @$subfield){
-			next if ($itemstagslib->{$data->{'tag'}}->{$code->{'code'}}->{tab}  ne 10);
-			next if (substr($itemstagslib->{$data->{'tag'}}->{$code->{'code'}}->{hidden},1,1)>0);
-			$witness{$data->{'tag'}.$code->{'code'}} = $itemstagslib->{$data->{'tag'}}->{$code->{'code'}}->{lib};
-			$this_row{$data->{'tag'}.$code->{'code'}} =$code->{'content'};
-			}			
-		    }# subfield
-		}## each field
-	if (%this_row) {
-	push(@big_array, \%this_row);
-	}
-}## each record
-my ($holdingbrtagf,$holdingbrtagsubf) = &MARCfind_marc_from_kohafield("holdingbranch","holdings");
- at big_array = sort {$a->{$holdingbrtagsubf} cmp $b->{$holdingbrtagsubf}} @big_array;
-
-#fill big_row with missing datas
-foreach my $subfield_code  (keys(%witness)) {
-	for (my $i=0;$i<=$#big_array;$i++) {
-		$big_array[$i]{$subfield_code}="&nbsp;" unless ($big_array[$i]{$subfield_code});
-	}
-}
-# now, construct template !
-my @item_value_loop;
-my @header_value_loop;
-for (my $i=0;$i<=$#big_array; $i++) {
-	my $items_data;
-	foreach my $subfield_code (keys(%witness)) {
-		$items_data .="<td>".$big_array[$i]{$subfield_code}."</td>";
-	}
-	my %row_data;
-	$row_data{item_value} = $items_data;
-	push(@item_value_loop,\%row_data);
-}
-foreach my $subfield_code (keys(%witness)) {
-	my %header_value;
-	$header_value{header_value} = $witness{$subfield_code};
-	push(@header_value_loop, \%header_value);
-}
-
-my $subscriptionsnumber = GetSubscriptionsFromBiblionumber($biblionumber);
-$template->param(item_loop => \@item_value_loop,
-						item_header_loop => \@header_value_loop,
-						biblionumber => $biblionumber,
-						subscriptionsnumber => $subscriptionsnumber,
-						popup => $popup,
-						hide_marc => C4::Context->preference('hide_marc'),
-						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-						);
-}##if $xmlhash
-output_html_with_http_headers $query, $cookie, $template->output;
-
-sub get_authorised_value_desc ($$$$$) {
-   my($tag, $subfield, $value, $framework, $dbh) = @_;
-
-   #---- branch
-    if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
-       return getbranchname($value);
-    }
-
-   #---- itemtypes
-   if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
-       return ItemType($value);
-    }
-
-   #---- "true" authorized value
-   my $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
-
-   if ($category ne "") {
-       my $sth = $dbh->prepare("select lib from authorised_values where category = ? and authorised_value = ?");
-       $sth->execute($category, $value);
-       my $data = $sth->fetchrow_hashref;
-       return $data->{'lib'};
-   } else {
-       return $value; # if nothing is found return the original value
-   }
-}

Index: catalogue/catalogue-search.pl
===================================================================
RCS file: catalogue/catalogue-search.pl
diff -N catalogue/catalogue-search.pl
--- catalogue/catalogue-search.pl	15 Nov 2006 01:41:51 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,268 +0,0 @@
-#!/usr/bin/perl
-use strict;
-
-use CGI;
-use C4::Search;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-use C4::Biblio;
-use C4::Koha;
-use POSIX qw(ceil floor);
-
-my $query = new CGI;
-my $dbh = C4::Context->dbh;
-
-my $op = $query->param('op'); #show the search form or execute the search
-
-my $format=$query->param('MARC');
-my ($template, $borrowernumber, $cookie);
-
-# get all the common search variables, 
-my @value=$query->param('value');
-my @kohafield=$query->param('kohafield');
-my @and_or=$query->param('and_or');
-my @relation=$query->param('relation');
-my $order=$query->param('order');
-my $reorder=$query->param('reorder');
-my $number_of_results=$query->param('number_of_results');
-my $zoom=$query->param('zoom');
-my $ascend=$query->param('asc');
-my $searchtype=$query->param('searchtype'); ## this is actual query type
-
-my @marclist = $query->param('marclist');
-# collect all the fields ...
-my %search;
-my @forminputs;		#this is for the links to navigate among the results
-my (@searchdesc, %hashdesc,$facetsdesc); 	#this is to show the description of the current search
-my @fields = ('value', 'kohafield', 'and_or', 'relation','order','barcode','biblionumber','itemnumber','asc','from','searchtype');
-
-###Collect all the marclist values coming from old Koha MARCdetails
-## Although we can not search on all marc fields- if any is matched in Zebra we can use it 
-my $sth=$dbh->prepare("Select kohafield from koha_attr where tagfield=? and tagsubfield=? and intrashow=1");
-foreach my $marc (@marclist) {
-		if ($marc) {
-		$sth->execute(substr($marc,0,3),substr($marc,3,1));
-			if ((my $kohafield)=$sth->fetchrow){
-			push @kohafield,$kohafield;
-			push @and_or,"\@or";
-			push @value, at value[0] if @kohafield>1;
-			push @relation ,"\@attr 5=1";
-			}
-		}
-}
-#### Now   normal search routine
-foreach my $field (@fields) {
-	$search{$field} = $query->param($field);
-	my @fieldvalue = $query->param($field);
-	foreach my $fvalue (@fieldvalue) {
-		push @forminputs, { field=>$field ,value=> $fvalue} unless ($field eq 'reorder');
-		
-	  }
-}
-## Build the query for facets as well
- for (my $i=0;$i<@value;$i++){
-$facetsdesc.="&value=".$value[$i];
-$facetsdesc.="&kohafield=".$kohafield[$i];
-$facetsdesc.="&relation=".$relation[$i];
-$facetsdesc.="&and_or=".$and_or[$i];
-}
-$facetsdesc.="&order=".$order;
-$hashdesc{'query'} = join " , ", @value;
-push @searchdesc,\%hashdesc;
-
-
-############################################################################
-if ($op eq "do_search"){
- 
-#this fields is just to allow the user come back to the search form with all the values  previously entered
-$search{'search_type'} = $query->param('search_type');# this is the panel type
-push @forminputs, {field => 'search_type', value => $search{'search_type'}};
-
-
-	($template, $borrowernumber, $cookie)
-		= get_template_and_user({template_name => "catalogue/catalogue_searchresults.tmpl",
-					 query => $query,
-					 type => "intranet",
-					 authnotrequired => 1,
-	});
-
-	$search{'from'} = 'intranet';
-	$search{'borrowernumber'} = $borrowernumber;
-	$search{'remote_IP'} = $query->remote_addr();
-	$search{'remote_URL'} = $query->url(-query=>1);
-	$search{'searchdesc'} = \@searchdesc;
-	$template->param(FORMINPUTS => \@forminputs);
-	$template->param(reorder => $query->param('reorder'));
-	$template->param(facetsdesc=>$facetsdesc);
-	# do the searchs ....
-	 $number_of_results = 10 unless $number_of_results;
-	my $startfrom=$query->param('startfrom');
-	($startfrom) || ($startfrom=0);
-my ($count, at results,$facets);
-if (!$zoom){
-## using sql search for barcode,biblionumber or itemnumber only useful for libraian interface
-	($count, @results) =sqlsearch($dbh,\%search);
-}else{
-my $sortorder=$order.$ascend if $order;
- ($count,$facets, at results) =ZEBRAsearch_kohafields(\@kohafield,\@value, \@relation,$sortorder, \@and_or, 1,$reorder,$startfrom, $number_of_results,"intranet",$searchtype);
-}
-	if ( $count eq "error"){
-	$template->param(error =>1);
-	goto "show";
-	}
-	my $num = scalar(@results) - 1;
-if ( $count == 1){
-    # if its a barcode search by definition we will only have one result.
-    # And if we have a result
-    # lets jump straight to the detail.pl page
-	if ($format eq '1') {
-    print $query->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?type=intra&biblionumber=$results[0]->{'biblionumber'}");
-	}else{
-    print $query->redirect("/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=$results[0]->{'biblionumber'}");
-	}
-}
-	# sorting out which results to display.
-	# the result number to star to show
-	$template->param(startfrom => $startfrom);
-	$template->param(beginning => $startfrom+1);
-	# the result number to end to show
-	($startfrom+$num<=$count) ? ($template->param(endat => $startfrom+$num+1)) : ($template->param(endat => $count));
-	# the total results searched
-	$template->param(numrecords => $count);
-	$template->param(FORMINPUTS => \@forminputs );
-	$template->param(searchdesc => \@searchdesc );
-	$template->param(SEARCH_RESULTS => \@results,
-			facets_loop => $facets,
-			);
-
-	#this is to show the images numbers to navigate among the results, if it has to show the number highlighted or not
-	my $numbers;
-	@$numbers = ();
-	my $pg = 1;
-	if (defined($query->param('pg'))) {
-		$pg = $query->param('pg');
-	}
-	my $start = 0;
-	
-	$start = ($pg - 1) * $number_of_results;
-	my $pages = ceil($count / $number_of_results);
-	my $total_pages = ceil($count / $number_of_results);
-
-	if ($pg > 1) {
-		my $url = $pg - 1;
-		push @$numbers, { number => "&lt;&lt;", 
-					      highlight => 0 , 
-					      startfrom => 0, 
-					      pg => '1' };
-		push @$numbers, { number => "&lt;", 
-						  highlight => 0 , forminputs=>\@forminputs,
-						  startfrom => ($url-1)*$number_of_results+1, 
-						  pg => $url };
-	}
-	my $current_ten = $pg / 10;
-	if ($current_ten == 0) {
-		 $current_ten = 0.1;           # In case it´s in ten = 0
-	} 
-	my $from = $current_ten * 10; # Calculate the initial page
-	my $end_ten = $from + 9;
-	my $to;
-	if ($pages > $end_ten) {
-		$to = $end_ten;
-	} else {
-		$to = $pages;
-	}
-	for (my $i = $from; $i <= $to ; $i++) {
-		if ($i == $pg) {   
-			if ($count > $number_of_results) {
-				push @$numbers, { number => $i, 
-								  highlight => 1 , forminputs=>\@forminputs,
-								  startfrom => ($i-1)*$number_of_results , 
-								  pg => $i };
-			}
-		} else {
-			push @$numbers, { number => $i, 
-							  highlight => 0 , forminputs=>\@forminputs,
-							  startfrom => ($i-1)*$number_of_results , 
-							  pg => $i };
-		}
-	}	        					
-	if ($pg < $pages) {
-		my $url = $pg + 1;
-		push @$numbers, { number => "&gt;", 
-						  highlight => 0 , forminputs=>\@forminputs,
-						  startfrom => ($url-1)*$number_of_results, 
-						  pg => $url };
-		push @$numbers, { number => "&gt;&gt;", 
-						  highlight => 0 , forminputs=>\@forminputs,
-						  startfrom => ($total_pages-1)*$number_of_results, 
-						  pg => $total_pages};
-	}
-#	push @$numbers,{forminputs=>@forminputs};
-	$template->param(numbers =>$numbers,
-			);
-	#show the virtual shelves
-	#my $results = &GetShelfList($borrowernumber);
-	#$template->param(shelvescount => scalar(@{$results}));
-	#$template->param(shelves => $results);
-
-########
-if ($format eq '1') {
-	$template->param(script => "catalogue/MARCdetail.pl");
-}else{
-	$template->param(script => "catalogue/detail.pl");
-}
-
-}else{ ## No search yet
-($template, $borrowernumber, $cookie)
-		= get_template_and_user({template_name => "catalogue/catalogue_search.tmpl",
-					query => $query,
-					type => "intranet",
-					authnotrequired => 1,
-				});
-#show kohafields
-	my $kohafield = $query->param('kohafield');
-	my ($fieldcount, at kohafields)=getkohafields();
-	foreach my $row (@kohafields) {
-		if ($kohafield eq $row->{'kohafield'}) {
-			$row->{'sel'} = 1;
-		}
-	}
-	$template->param(kohafields => \@kohafields);
-##show sorting fields
-my @sorts;
- $order=$query->param('order');
-	foreach my $sort (@kohafields) {
-	    if ($sort->{sorts}){
-		push @sorts,$sort;
-		if ($order eq $sort->{'kohafield'}) {
-			$sort->{'sel'} = 1;
-		}
-	   }
-	}
-	$template->param(sorts => \@sorts);
-# load the branches
-my @branches = GetallBranches();
-$template->param(branchloop => \@branches,);
-
-# load the itemtypes 
-my $itemtypes=GetItemTypes();
-my (@item_type_loop);
-foreach my $thisitemtype (sort keys %$itemtypes) {
-    my %row =(itemtype => $thisitemtype,
-                 description => $itemtypes->{$thisitemtype}->{'description'},
-            );
-    push @item_type_loop, \%row;
-}
-
-$template->param(itemtypeloop=>\@item_type_loop,);
-my $search_type = $query->param('search_type');
-	if ((!$search_type) || ($search_type eq 'zoom'))  {
-		$template->param(zoom_search => 1);
-	} else{
-		$template->param(sql_search => 1);
-	} 
-}
-
-show:
-output_html_with_http_headers $query, $cookie, $template->output();
-

Index: catalogue/detail.pl
===================================================================
RCS file: catalogue/detail.pl
diff -N catalogue/detail.pl
--- catalogue/detail.pl	15 Nov 2006 01:41:51 -0000	1.10
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,80 +0,0 @@
-#!/usr/bin/perl
-use strict;
-require Exporter;
-use C4::Search;
-use C4::Auth;
-use C4::Serials; #uses getsubscriptionfrom biblionumber
-use C4::Interface::CGI::Output;
-use CGI;
-use C4::Biblio;
-use C4::Context;
-
-my $dbh=C4::Context->dbh;
-my $query=new CGI;
-my ($template, $borrowernumber, $cookie) 
-    = get_template_and_user({template_name => "catalogue/detail.tmpl",
-			     query => $query,
-			     type => "intranet",
-			     authnotrequired => 1,
-			     flagsrequired => {borrow => 1},
-			     });
-
-my $biblionumber=$query->param('biblionumber');
-$template->param(biblionumber => $biblionumber);
-my $retrieve_from=C4::Context->preference('retrieve_from');
-my ($record,$frameworkcode);
-my @itemrecords;
-my @items;
-if ($retrieve_from eq "zebra"){
-($record, at itemrecords)=ZEBRAgetrecord($biblionumber);
-}else{
- $record =XMLgetbiblio($dbh,$biblionumber);
-$record=XML_xml2hash_onerecord($record);
-my @itemxmls=XMLgetallitems($dbh,$biblionumber);
-	foreach my $itemrecord(@itemxmls){
-	my $itemhash=XML_xml2hash_onerecord($itemrecord);
-	push @itemrecords, $itemhash;
-	}
-}	
-
-my $dat = XMLmarc2koha_onerecord($dbh,$record,"biblios");
-my $norequests = 1;
-foreach my $itemrecord (@itemrecords){
-
-my $item= XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
-$item=ItemInfo($dbh,$item);
-$item->{itemtype}=$dat->{itemtype};
-  $norequests = 0 unless $item->{'notforloan'};
-   $item->{$item->{'publictype'}} = 1; ## NOT sure what this is kept from old db probably useless now
-push @items,$item;
-}
-
-my $subscriptionsnumber = GetSubscriptionsFromBiblionumber($biblionumber);
-
-$dat->{'count'}=@items;
-$template->param(count =>$dat->{'count'});
-$template->param(norequests => $norequests);
-
-  ## get notes subjects and URLS from MARC record
-	
-	my $marcflavour = C4::Context->preference("marcflavour");
-	my $marcnotesarray = &getMARCnotes($dbh,$record,$marcflavour);
-	my $marcsubjctsarray = &getMARCsubjects($dbh,$record,$marcflavour);
-	my $marcurlssarray = &getMARCurls($dbh,$record,$marcflavour);
-	$template->param(MARCURLS => $marcurlssarray);
-	$template->param(MARCNOTES => $marcnotesarray);
-	$template->param(MARCSUBJCTS => $marcsubjctsarray);
-
-
-my @results = ($dat,);
-
-my $resultsarray=\@results;
-my $itemsarray=\@items;
-
-
-$template->param(BIBLIO_RESULTS => $resultsarray,
-				ITEM_RESULTS => $itemsarray,
-				subscriptionsnumber => $subscriptionsnumber,
-);
-
-output_html_with_http_headers $query, $cookie, $template->output;

Index: catalogue/detailprint.pl
===================================================================
RCS file: catalogue/detailprint.pl
diff -N catalogue/detailprint.pl
--- catalogue/detailprint.pl	15 Nov 2006 01:41:51 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,98 +0,0 @@
-#!/usr/bin/perl
-# NOTE: Use standard 8-space tabs for this file (indents are 4 spaces)
-
-# 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;
-require Exporter;
-use C4::Search;
-use C4::Auth;
-use C4::Serials; #uses getsubscriptionfrom biblionumber
-use C4::Interface::CGI::Output;
-use CGI;
-use C4::Biblio;
-use C4::Context;
-
-my $dbh=C4::Context->dbh;
-my $query=new CGI;
-my ($template, $borrowernumber, $cookie) 
-    = get_template_and_user({template_name => "catalogue/detailprint.tmpl",
-			     query => $query,
-			     type => "intranet",
-			     authnotrequired => 1,
-			     flagsrequired => {borrow => 1},
-			     });
-
-my $biblionumber=$query->param('biblionumber');
-$template->param(biblionumber => $biblionumber);
-my $retrieve_from=C4::Context->preference('retrieve_from');
-my ($record,$frameworkcode);
-my @itemrecords;
-my @items;
-if ($retrieve_from eq "zebra"){
-($record, at itemrecords)=ZEBRAgetrecord($biblionumber);
-}else{
- $record =XMLgetbiblio($dbh,$biblionumber);
-$record=XML_xml2hash_onerecord($record);
-my @itemxmls=XMLgetallitems($dbh,$biblionumber);
-	foreach my $itemrecord(@itemxmls){
-	my $itemhash=XML_xml2hash_onerecord($itemrecord);
-	push @itemrecords, $itemhash;
-	}
-}	
-
-my $dat = XMLmarc2koha_onerecord($dbh,$record,"biblios");
-my $norequests = 1;
-foreach my $itemrecord (@itemrecords){
-
-my $item= XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
-$item=ItemInfo($dbh,$item);
-$item->{itemtype}=$dat->{itemtype};
-  $norequests = 0 unless $item->{'notforloan'};
-   $item->{$item->{'publictype'}} = 1; ## NOT sure what this is kept from old db probably useless now
-push @items,$item;
-}
-
-my $subscriptionsnumber = GetSubscriptionsFromBiblionumber($biblionumber);
-
-$dat->{'count'}=@items;
-$template->param(count =>$dat->{'count'});
-$template->param(norequests => $norequests);
-
-  ## get notes subjects and URLS from MARC record
-	
-	my $marcflavour = C4::Context->preference("marcflavour");
-	my $marcnotesarray = &getMARCnotes($dbh,$record,$marcflavour);
-	my $marcsubjctsarray = &getMARCsubjects($dbh,$record,$marcflavour);
-	my $marcurlssarray = &getMARCurls($dbh,$record,$marcflavour);
-	$template->param(MARCURLS => $marcurlssarray);
-	$template->param(MARCNOTES => $marcnotesarray);
-	$template->param(MARCSUBJCTS => $marcsubjctsarray);
-
-
-my @results = ($dat,);
-
-my $resultsarray=\@results;
-my $itemsarray=\@items;
-
-
-$template->param(BIBLIO_RESULTS => $resultsarray,
-				ITEM_RESULTS => $itemsarray,
-				subscriptionsnumber => $subscriptionsnumber,
-);
-
-output_html_with_http_headers $query, $cookie, $template->output;

Index: catalogue/moredetail.pl
===================================================================
RCS file: catalogue/moredetail.pl
diff -N catalogue/moredetail.pl
--- catalogue/moredetail.pl	15 Nov 2006 01:41:51 -0000	1.9
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,183 +0,0 @@
-#!/usr/bin/perl
-# NOTE: Use standard 8-space tabs for this file (indents are 4 spaces)
-
-# $Id: moredetail.pl,v 1.9 2006/11/15 01:41:51 tgarip1957 Exp $
-
-# Copyright 2000-2003 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;
-require Exporter;
-use C4::Koha;
-use CGI;
-use C4::Search;
-use C4::Acquisition;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-use C4::Date;
-use C4::Context;
-use C4::Biblio;
-use C4::Accounts2;
-use C4::Circulation::Circ2;
-
-my $dbh=C4::Context->dbh;
-my $query=new CGI;
-
-
-my ($template, $loggedinuser, $cookie) = get_template_and_user({
-	template_name   => ( 'catalogue/moredetail.tmpl'),
-	query           => $query,
-	type            => "intranet",
-	authnotrequired => 0,
-	flagsrequired   => {catalogue => 1},
-    });
-
-# get variables
-my $op=$query->param('op');
-my $lost=$query->param('lost');
-my $withdrawn=$query->param('withdrawn');
-my $override=$query->param('override');
-my $itemnumber=$query->param('itemnumber');
-my $barcode=$query->param('barcode');
-
-my $title=$query->param('title');
-my $biblionumber=$query->param('biblionumber');
-my ($record)=XMLgetbibliohash($dbh,$biblionumber);
-my $data=XMLmarc2koha_onerecord($dbh,$record,"biblios");
-my $dewey = $data->{'dewey'};
-# FIXME Dewey is a string, not a number, & we should use a function
-$dewey =~ s/0+$//;
-if ($dewey eq "000.") { $dewey = "";};
-if ($dewey < 10){$dewey='00'.$dewey;}
-if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
-if ($dewey <= 0){
-      $dewey='';
-}
-$dewey=~ s/\.$//;
-$data->{'dewey'}=$dewey;
-
-my @results;
-
-my @items;
-if ($op eq "update"){
-my $env;
-##Do Lost or Withdraw here
-my $flag=0;
-  my ($resbor,$resrec)=C4::Reserves2::CheckReserves($env,$dbh,$itemnumber);
-if ($override ne "yes"){
-  if ($resbor){
-#    print $query->header;
-    $template->param(error => "This item   has a reserve on it");
- $template->param(biblionumber =>$biblionumber);
- $template->param(itemnumber =>$itemnumber);
- $template->param(lost =>$lost);
- $template->param(withdrawn =>$withdrawn);
-    $flag=1;
-  }
-  my $sth=$dbh->prepare("Select * from issues where (itemnumber=?) and (returndate is null)");
-  $sth->execute($itemnumber);
- 
-  if (my $data=$sth->fetchrow_hashref) {
-   $template->param(biblionumber =>$biblionumber);
- $template->param(itemnumber =>$itemnumber);
- $template->param(error => "This item   is On Loan to a member");
- $template->param(lost =>$lost);
- $template->param(withdrawn =>$withdrawn);
-    $flag=2;
-  }
-}
-if ($flag != 0 && $override ne "yes"){
-
-  }else {
-   ##UPDATE here
-
-XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'wthdrawn',$withdrawn,1);
-XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'itemlost',$lost);
-
-     if ($lost ==1 && $flag ==2){
-    my $sth=$dbh->prepare("Select * from issues where (itemnumber=?) and (returndate is null)");
-    $sth->execute($itemnumber);
-    my $data=$sth->fetchrow_hashref;
-    if ($data->{'borrowernumber'} ne '') {
-      #item on issue add replacement cost to borrowers record
-      my $accountno=getnextacctno($env,$data->{'borrowernumber'},$dbh);
-      my $item=getiteminformation($env, $itemnumber);
-      my $sth2=$dbh->prepare("Insert into accountlines
-      (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber)
-      values
-      (?,?,now(),?,?,'L',?,?)");
-      $sth2->execute($data->{'borrowernumber'},$accountno,$item->{'replacementprice'},
-      "Lost Item $item->{'title'} $item->{'barcode'}",
-      $item->{'replacementprice'},$itemnumber);
-      $sth2->finish;
-    }
-    }
-	if ($flag==1){
-	foreach my $res ($resrec){
-	C4::Reserves2::CancelReseve(undef,$res->{itemnumber},$res->{borrowernumber});
-	}
-	}
-    
-  }
-}
-my @itemrecords=XMLgetallitems($dbh,$biblionumber);
-foreach my $itemrecord (@itemrecords){
-$itemrecord=XML_xml2hash_onerecord($itemrecord);
-my $items = XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
-$items->{itemtype}=$data->{itemtype};
-$items->{biblionumber}=$biblionumber;
-$items=itemissues($dbh,$items,$items->{'itemnumber'});
-push @items,$items;
-}
-my $count=@items;
-$data->{'count'}=$count;
-my ($order,$ordernum)=GetOrder($biblionumber,$barcode);
-
-my $env;
-$env->{itemcount}=1;
-
-$results[0]=$data;
-
-foreach my $item (@items){
-    $item->{'replacementprice'}=sprintf("%.2f", $item->{'replacementprice'});
-    $item->{'datelastborrowed'}= format_date($item->{'datelastborrowed'});
-    $item->{'dateaccessioned'} = format_date($item->{'dateaccessioned'});
-    $item->{'datelastseen'} = format_date($item->{'datelastseen'});
-    $item->{'ordernumber'} = $ordernum;
-    $item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'};
-
-    if ($item->{'date_due'} gt '0000-00-00'){
-	$item->{'date_due'} = format_date($item->{'date_due'});		
-$item->{'issue'}= 1;
-		$item->{'borrowernumber'} = $item->{'borrower'};
-		$item->{'cardnumber'} = $item->{'card'};
-			
-    } else {
-	$item->{'issue'}= 0;
-    }
-}
-
-$template->param(BIBITEM_DATA => \@results);
-$template->param(ITEM_DATA => \@items);
-$template->param(loggedinuser => $loggedinuser);
-
-output_html_with_http_headers $query, $cookie, $template->output;
-
-
-# Local Variables:
-# tab-width: 8
-# End:

Index: cataloguing/addbiblio.pl
===================================================================
RCS file: cataloguing/addbiblio.pl
diff -N cataloguing/addbiblio.pl
--- cataloguing/addbiblio.pl	27 Sep 2006 21:19:21 -0000	1.19
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,718 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: addbiblio.pl,v 1.19 2006/09/27 21:19:21 tgarip1957 Exp $
-
-# 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::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Biblio;
-use C4::Search; # also includes Biblio.pm, Search is used to FindDuplicate
-use C4::Context;
-use C4::Koha; # XXX subfield_is_koha_internal_p
-use MARC::Record;
-use MARC::File::USMARC;
-my $format="USMARC";
-$format="UNIMARC" if (C4::Context->preference('marcflavour') eq 'UNIMARC');
-use MARC::File::XML(RecordFormat =>$format);
-use Encode;
-use vars qw( $tagslib);
-use vars qw( $authorised_values_sth);
-use vars qw( $is_a_modif );
-my $input = new CGI;
-my $z3950 = $input->param('z3950');
-my $logstatus=C4::Context->preference('Activate_log');
-my $xml;
-my $itemtype; # created here because it can be used in build_authorized_values_list sub
-my $fromserials=$input->param('fromserials');## if a serial is being added do not display navigation menus
-
-###Find related tags for Z3950 searches- required  by template
-my($isbntag,$isbnsub)=MARCfind_marc_from_kohafield("isbn","biblios");
-my($issntag,$issnsub)=MARCfind_marc_from_kohafield("issn","biblios");
-my($titletag,$titlesub)=MARCfind_marc_from_kohafield("title","biblios");
-my($authortag,$authorsub)=MARCfind_marc_from_kohafield("author","biblios");
-=item MARCfindbreeding
-
-    $record = MARCfindbreeding($dbh, $breedingid,$frameworkcode);
-
-Look up the breeding farm with database handle $dbh, for the
-record with id $breedingid.  If found, returns the decoded
-MARC::Record; otherwise, -1 is returned (FIXME).
-Returns as second parameter the character encoding.
-
-=cut
-
-sub MARCfindbreeding {
-	my ($dbh,$id,$oldbiblionumber) = @_;
-	my $sth = $dbh->prepare("select marc,encoding from marc_breeding where id=?");
-	$sth->execute($id);
-	my ($marc,$encoding) = $sth->fetchrow;
-	$sth->finish;
-	if ($marc) {
-		my $record = MARC::File::USMARC::decode($marc);
-		if (ref($record) eq undef) {
-			return -1;
-		} 
-	if (C4::Context->preference("z3950NormalizeAuthor") and C4::Context->preference("z3950AuthorAuthFields")){
-				my ($tag,$subfield) = MARCfind_marc_from_kohafield("author","biblios");
-				my $auth_fields = C4::Context->preference("z3950AuthorAuthFields");
-				my @auth_fields= split /,/,$auth_fields;
-				my $field;
-				if ($record->field($tag)){
-					foreach my $tmpfield ($record->field($tag)->subfields){
-						my $subfieldcode=shift @$tmpfield;
-						my $subfieldvalue=shift @$tmpfield;
-						if ($field){
-							$field->add_subfields("$subfieldcode"=>$subfieldvalue) if ($subfieldcode ne $subfield);
-						} else {
-							$field=MARC::Field->new($tag,"","",$subfieldcode=>$subfieldvalue) if ($subfieldcode ne $subfield);
-						}
-					}
-				}
-				$record->delete_field($record->field($tag));
-				foreach my $fieldtag (@auth_fields){
-					next unless ($record->field($fieldtag));
-					my $lastname = $record->field($fieldtag)->subfield('a');
-					my $firstname= $record->field($fieldtag)->subfield('b');
-					my $title = $record->field($fieldtag)->subfield('c');
-					my $number= $record->field($fieldtag)->subfield('d');
-					if ($title){
-						$field->add_subfields("$subfield"=>ucfirst($title)." ".ucfirst($firstname)." ".$number);
-					}else{
-						$field->add_subfields("$subfield"=>ucfirst($firstname).", ".ucfirst($lastname));
-					}
-				}
-				$record->insert_fields_ordered($field);
-			}
-##Delete biblionumber tag in case a similar tag is used in imported MARC ## 
-	my  (  $tagfield,  $tagsubfield )  =MARCfind_marc_from_kohafield("biblionumber","biblios");
-		my $old_field = $record->field($tagfield);
-		$record->delete_field($old_field);
-		##add the old biblionumber if a modif but coming from breedingfarm
-		if ($oldbiblionumber){
-			my $newfield;
-			if ($tagfield<10){
-	 		$newfield = MARC::Field->new($tagfield,  $oldbiblionumber);
-			}else{
- 			$newfield = MARC::Field->new($tagfield, '', '', "$tagsubfield" => $oldbiblionumber);
-			}	
-		$record->insert_fields_ordered($newfield);
-		}
-	my $xml=MARC::File::XML::record($record);
-	$xml=Encode::encode('utf8',$xml);
-	my $xmlhash=XML_xml2hash_onerecord($xml);
-		return $xmlhash,$encoding;
-		
-	}
-	return -1;
-}
-
-
-=item build_authorized_values_list
-
-=cut
-
-sub build_authorized_values_list ($$$$$) {
-	my($tag, $subfield, $value, $dbh,$authorised_values_sth) = @_;
-
-	my @authorised_values;
-	my %authorised_lib;
-
-	# builds list, depending on authorised value...
-
-	#---- branch
-	if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
-	my $sth=$dbh->prepare("select branchcode,branchname from branches order by branchname");
-	$sth->execute;
-	push @authorised_values, ""
-		unless ($tagslib->{$tag}->{$subfield}->{mandatory});
-
-	while (my ($branchcode,$branchname) = $sth->fetchrow_array) {
-		push @authorised_values, $branchcode;
-		$authorised_lib{$branchcode}=$branchname;
-	}
-
-	#----- itemtypes
-	} elsif ($tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes") {
-		my $sth=$dbh->prepare("select itemtype,description from itemtypes order by description");
-		$sth->execute;
-		push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
-	
-		while (my ($itemtype,$description) = $sth->fetchrow_array) {
-			push @authorised_values, $itemtype;
-			$authorised_lib{$itemtype}=$description;
-		}
-		$value=$itemtype unless ($value);
-
-	#---- "true" authorised value
-	} else {
-		$authorised_values_sth->execute($tagslib->{$tag}->{$subfield}->{authorised_value});
-
-		push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
-	
-		while (my ($value,$lib) = $authorised_values_sth->fetchrow_array) {
-			push @authorised_values, $value;
-			$authorised_lib{$value}=$lib;
-		}
-    }
-    return CGI::scrolling_list( -name     => 'field_value',
-				-values   => \@authorised_values,
-				-default  => $value,
-				-labels   => \%authorised_lib,
-				-override => 1,
-				-size     => 1,
-				-multiple => 0 );
-}
-
-=item create_input
- builds the <input ...> entry for a subfield.
-=cut
-sub create_input () {
-	my ($tag,$subfield,$value,$i,$tabloop,$rec,$authorised_values_sth,$id) = @_;	
-	my $dbh=C4::Context->dbh;
-	$value =~ s/"/&quot;/g;
-	my %subfield_data;
-	$subfield_data{id}=$id;
-	$subfield_data{tag}=$tag;
-	$subfield_data{subfield}=$subfield;
-	$subfield_data{marc_lib}="<span id=\"error$i\">".$tagslib->{$tag}->{$subfield}->{lib}."</span>";
-	$subfield_data{marc_lib_plain}=$tagslib->{$tag}->{$subfield}->{lib};
-	$subfield_data{tag_mandatory}=$tagslib->{$tag}->{mandatory};
-	$subfield_data{mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
-	$subfield_data{repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
-	$subfield_data{index} = $i;
-	$subfield_data{visibility} = "display:none" if (substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) gt "0") ; #check parity
-	if ($tagslib->{$tag}->{$subfield}->{authorised_value}) {
-		$subfield_data{marc_value}= build_authorized_values_list($tag, $subfield, $value, $dbh,$authorised_values_sth);
-	# it's an  authority field
-	} elsif ($tagslib->{$tag}->{$subfield}->{authtypecode}) {
-		
-		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff;'\"\" tabindex=\"1\" type=\"text\"   name=\"field_value\" id=\"field_value$id\" value=\"$value\" size=\"40\" maxlength=\"255\" DISABLE READONLY> <a  style=\"cursor: help;\" href=\"javascript:Dopop('../authorities/auth_finder.pl?authtypecode=".$tagslib->{$tag}->{$subfield}->{authtypecode}."&index=$id',$id);\">...</a>";
-	# it's a plugin field
-	} elsif ($tagslib->{$tag}->{$subfield}->{'value_builder'}) {
-		# opening plugin. Just check wether we are on a developper computer on a production one
-		# (the cgidir differs)
-		my $cgidir = C4::Context->intranetdir ."/cgi-bin/value_builder";
-		unless (opendir(DIR, "$cgidir")) {
-			$cgidir = C4::Context->intranetdir."/value_builder";
-		} 
-		my $plugin=$cgidir."/".$tagslib->{$tag}->{$subfield}->{'value_builder'}; 
-		require $plugin;
-		my $extended_param = plugin_parameters($dbh,$rec,$tagslib,$i,$tabloop);
-		my ($function_name,$javascript) = plugin_javascript($dbh,$rec,$tagslib,$i,$tabloop);
-		$subfield_data{marc_value}="<input tabindex=\"1\" type=\"text\"  name=\"field_value\" id=\"field_value$id\"  value=\"$value\" size=\"40\" maxlength=\"255\" DISABLE READONLY OnFocus=\"javascript:Focus$function_name($i)\" OnBlur=\"javascript:Blur$function_name($i); \"> <a  style=\"cursor: help;\" href=\"javascript:Clic$function_name($i)\">...</a> $javascript";
-	# it's an hidden field
-	} elsif  ($tag eq '') {
-		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff'; \" tabindex=\"1\" type=\"hidden\" name=\"field_value\" id=\"field_value$id\"  value=\"$value\">";
-	} elsif  (substr($tagslib->{$tag}->{$subfield}->{'hidden'},2,1) gt "1") {
-
-		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff'; \" tabindex=\"1\" type=\"text\" name=\"field_value\" id=\"field_value$id\"   value=\"$value\" size=\"40\" maxlength=\"255\" >";
-	# it's a standard field
-	} else {
-		if (length($value) >100) {
-			$subfield_data{marc_value}="<textarea tabindex=\"1\" name=\"field_value\" id=\"field_value$id\"  cols=\"40\" rows=\"5\" >$value</textarea>";
-		} else {
-			$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff'; \" tabindex=\"1\" type=\"text\" name=\"field_value\" id=\"field_value$id\"  value=\"$value\" size=\"50\">"; #"
-		}
-	}
-	return \%subfield_data;
-}
-
-sub build_tabs  ($$$;$){
-    my($template, $xmlhash, $dbh,$addedfield) = @_;
-    # fill arrays
-    my @loop_data =();
-    my $tag;
-    my $i=0;
-my $id=100;
-	my $authorised_values_sth = $dbh->prepare("select authorised_value,lib
-		from authorised_values
-		where category=? order by lib");
-my ($biblionumtagfield,$biblionumtagsubfield) = &MARCfind_marc_from_kohafield($dbh,"biblionumber","biblios");
-
-my $biblio;
-my $controlfields;
-my $leader;
-if ($xmlhash){
- $biblio=$xmlhash->{'datafield'};
- $controlfields=$xmlhash->{'controlfield'};
- $leader=$xmlhash->{'leader'};
-}
-    my @BIG_LOOP;
-my %built;
-
-# loop through each tab 0 through 9
-for (my $tabloop = 0; $tabloop <= 9; $tabloop++) {
-
-		my @loop_data = ();
-	foreach my $tag (sort(keys (%{$tagslib}))) {
-	next if ($tag eq $biblionumtagfield);## Otherwise biblionumber will be duplicated on modifs if user has set visibility to true
-			my $indicator;
-				# if MARC::Record is not empty => use it as master loop, then add missing subfields that should be in the tab.
-				# if MARC::Record is empty => use tab as master loop.
-		my @subfields_data;
-		
-	if ($xmlhash) {
-			####
-		
-			my %tagdefined;
-			my %definedsubfields;
-			
-			my ($ind1,$ind2);
-			
-		 if ($tag>9){
-			foreach my $data (@$biblio){
-					my @subfields_data;
-					undef %definedsubfields;
-   	 			 if ($data->{'tag'} eq $tag){
-					$tagdefined{$tag}=1 ;
-					    $ind1="  ";
-					      $ind2="  ";		
-					      foreach my $subfieldcode ( $data->{'subfield'}){
-		   				 foreach my $code ( @$subfieldcode){	
-							next if ($tagslib->{$tag}->{$code->{'code'}}->{tab} ne $tabloop);						
-							my $subfield=$code->{'code'}  ;
-							my $value=$code->{'content'};
-							$definedsubfields{$tag.$subfield}=1 ;
-							 $built{$tag}=1;
-							push(@subfields_data, &create_input($tag,$subfield,$value,$i,$tabloop,$xmlhash,$authorised_values_sth,$id)) ;
-							$i++ ;
-		   				}
-					      } ##each subfield
-					    $ind1=$data->{'ind1'};
-					    $ind2=	$data->{'ind2'};
-					  
-					
-					# now, loop again to add parameter subfield that are not in the MARC::Record
-					
-					foreach my $subfield (sort( keys %{$tagslib->{$tag}})) {
-						next if (length $subfield !=1);
-						next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
-						next if ((substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) gt "1")  ); #check for visibility flag
-						next if ($definedsubfields{$tag.$subfield} );
-						push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
-						$definedsubfields{$tag.$subfield}=1;
-						$i++;
-					}
-					if ($#subfields_data >= 0) {
-						my %tag_data;
-						$tag_data{tag} = $tag;
-						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
-						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
-						$tag_data{indicator} = $ind1.$ind2 if ($tag>=10);
-						$tag_data{subfield_loop} = \@subfields_data;
-						push (@loop_data, \%tag_data);
-						
-					}
-					$id++;
-  	  			     }## if tag matches
-			
-			}#eachdata
- 		}else{ ## tag <10
-			        if ($tag eq "000" || $tag eq "LDR"){
-					my $subfield="@";
-					next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
-					my @subfields_data;
-					my $value=$leader->[0] if $leader->[0];
-					$tagdefined{$tag}=1 ;
-					push(@subfields_data, &create_input($tag,$subfield,$value,$i,$tabloop,$xmlhash,$authorised_values_sth,$id));					
-					$i++;
-					if ($#subfields_data >= 0) {
-						my %tag_data;
-						$tag_data{tag} = $tag;
-						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
-						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
-						$tag_data{subfield_loop} = \@subfields_data;
-                                                			$tag_data{fixedfield} = 1;
-						push (@loop_data, \%tag_data);
-					}
-			         }else{
-	   			 foreach my $control (@$controlfields){
-					my $subfield="@";
-					next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
-					my @subfields_data;
-					if ($control->{'tag'} eq $tag){
-					$tagdefined{$tag}=1 ;
-					my $value=$control->{'content'} ;
-					$definedsubfields{$tag.'@'}=1;
-					push(@subfields_data, &create_input($tag,$subfield,$value,$i,$tabloop,$xmlhash,$authorised_values_sth,$id));					
-					$i++;
-					
-					   $built{$tag}=1;
-					
-					if ($#subfields_data >= 0) {
-						my %tag_data;
-						$tag_data{tag} = $tag;
-						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
-						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
-						$tag_data{subfield_loop} = \@subfields_data;
-						$tag_data{fixedfield} = 1;
-						push (@loop_data, \%tag_data);
-					}
-					$id++;
-					}## tag matches
-	  			 }# each control
-			       }
-   			}##tag >9
-
-
-			##### Any remaining tag
-				my @subfields_data;
-				# now, loop again to add parameter subfield that are not in the MARC::Record
-					foreach my $subfield (sort( keys %{$tagslib->{$tag}})) {
-						next if ($tagdefined{$tag} );
-						next if (length $subfield !=1);
-						next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
-						next if ((substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) gt "1")  ); #check for visibility flag
-						
-						push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
-						$tagdefined{$tag.$subfield}=1;
-						$i++;
-					}
-					if ($#subfields_data >= 0) {
-						my %tag_data;
-						$tag_data{tag} = $tag;
-						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
-						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
-						$tag_data{indicator} = $ind1.$ind2 if ($tag>=10);
-						$tag_data{subfield_loop} = \@subfields_data;
-						if ($tag<10) {
-                                                			$tag_data{fixedfield} = 1;
-                                        				}
-
-						push (@loop_data, \%tag_data);
-					}
-
-					
-					if ($addedfield eq $tag) {
-						my %tag_data;
-						my @subfields_data;
-						$id++;
-						$tagdefined{$tag}=1 ;
-						foreach my $subfield (sort( keys %{$tagslib->{$tag}})) {
-						next if (length $subfield !=1);
-						next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
-						next if ((substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) gt "1")  ); #check for visibility flag
-						$addedfield="";	
-						push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
-						$i++;
-							}
-						if ($#subfields_data >= 0) {
-						$tag_data{tag} = $tag;
-						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
-						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
-						$tag_data{indicator} = ' ' if ($tag>=10);
-						$tag_data{subfield_loop} = \@subfields_data;
-							if ($tag<10) {
-                                                				$tag_data{fixedfield} = 1;
-                                        					}
-						push (@loop_data, \%tag_data);
-											
-						}
-				
-					}
-				
-	# if breeding is empty
-			} else {
-				my @subfields_data;
-				foreach my $subfield (sort(keys %{$tagslib->{$tag}})) {
-					next if (length $subfield !=1);
-					next if ((substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) gt "1")  ); #check for visibility flag
-					next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
-					push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
-					$i++;
-				}
-				if ($#subfields_data >= 0) {
-					my %tag_data;
-					$tag_data{tag} = $tag;
-					$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
-					$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
-					$tag_data{indicator} = $indicator;
-					$tag_data{subfield_loop} = \@subfields_data;
-					$tag_data{tagfirstsubfield} = $tag_data{subfield_loop}[0];
-					if ($tag<10) {
-						$tag_data{fixedfield} = 1;
-					}
-					push (@loop_data, \%tag_data);
-				}
-			}
-		$id++;
-	}
-	if ($#loop_data >=0) {
-            my %big_loop_line;
-            $big_loop_line{number}=$tabloop;
-            $big_loop_line{innerloop}=\@loop_data;
-            push @BIG_LOOP,\%big_loop_line;
-            }	
-		$template->param(BIG_LOOP => \@BIG_LOOP);
-}## tab loop
-}
-
-
-sub build_hidden_data () {
-    # build hidden data =>
-    # we store everything, even if we show only requested subfields.
-
-    my @loop_data =();
-    my $i=0;
-    foreach my $tag (keys %{$tagslib}) {
-	my $previous_tag = '';
-
-	# loop through each subfield
-	foreach my $subfield (keys %{$tagslib->{$tag}}) {
-	    next if ($subfield eq 'lib');
-	    next if ($subfield eq 'tab');
-	    next if ($subfield eq 'mandatory');
-	next if ($subfield eq 'repeatable');
-	    next if ($tagslib->{$tag}->{$subfield}->{'tab'}  ne "-1");
-	    my %subfield_data;
-	    $subfield_data{marc_lib}=$tagslib->{$tag}->{$subfield}->{lib};
-	    $subfield_data{marc_mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
-	    $subfield_data{marc_repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
-	    $subfield_data{marc_value}="<input type=\"hidden\"  name=\"field_value[]\">";
-	    push(@loop_data, \%subfield_data);
-	    $i++
-	}
-    }
-}
-
-
-# ======================== 
-#          MAIN 
-#=========================
-my $input = new CGI;
-my $error = $input->param('error');
-my $oldbiblionumber=$input->param('oldbiblionumber'); # if bib exists, it's a modif, not a new biblio.
-my $breedingid = $input->param('breedingid');
-my $z3950 = $input->param('z3950');
-my $op = $input->param('op');
-my $duplicateok = $input->param('duplicateok');
-my $suggestionid=$input->param('suggestionid');
-my $frameworkcode = $input->param('frameworkcode');
-my $dbh = C4::Context->dbh;
-my $biblionumber;
-
-$biblionumber=$oldbiblionumber if $oldbiblionumber;
-
-$frameworkcode='' if ($frameworkcode eq 'Default');
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "cataloguing/addbiblio.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {editcatalogue => 1},
-			     debug => 1,
-			     });
-
-#Getting the list of all frameworks
-my $queryfwk =$dbh->prepare("select frameworktext, frameworkcode from biblios_framework");
-$queryfwk->execute;
-my %select_fwk;
-my @select_fwk;
-my $curfwk;
-push @select_fwk,"Default";
-$select_fwk{"Default"} = "Default";
-while (my ($description, $fwk) =$queryfwk->fetchrow) {
-	push @select_fwk, $fwk;
-	$select_fwk{$fwk} = $description;
-}
-$curfwk=$frameworkcode;
-my $framework=CGI::scrolling_list( -name     => 'Frameworks',
-			-id => 'Frameworks',
-			-default => $curfwk,
-			-OnChange => 'Changefwk(this);',
-			-values   => \@select_fwk,
-			-labels   => \%select_fwk,
-			-size     => 1,
-			-multiple => 0 );
-$template->param( framework => $framework);
-my $xmlhash;
-my $xml;
-#####DO NOT RETRIVE FROM ZEBRA######
-my $record =XMLgetbiblio($dbh,$biblionumber) if ($biblionumber);
-$xmlhash=XML_xml2hash_onerecord($record) if ($biblionumber);
-$frameworkcode=MARCfind_frameworkcode( $dbh, $biblionumber );
-###########
-$tagslib = &MARCgettagslib($dbh,1,$frameworkcode);
-if ($suggestionid && !$biblionumber){
-my $data=GetSuggestion($suggestionid) ;
-$xml=$data->{xml};
-$xmlhash=XML_xml2hash_onerecord($xml);
-}
-my $encoding="";
-($xmlhash,$encoding) = MARCfindbreeding($dbh,$breedingid,$oldbiblionumber) if ($breedingid);
-
-$is_a_modif=0;
-$is_a_modif=1 if $oldbiblionumber; 
-my ($oldbiblionumtagfield,$oldbiblionumtagsubfield);
-if ($biblionumber  && !$z3950) {
-	$is_a_modif=1;
-	# if it's a modif, retrieve old biblionumber for the future modification of old-DB.
-	($oldbiblionumtagfield,$oldbiblionumtagsubfield) = &MARCfind_marc_from_kohafield($dbh,"biblionumber","biblios");
-
-	
-}
-#------------------------------------------------------------------------------------------------------------------------------
-if ($op eq "addbiblio") {
-#------------------------------------------------------------------------------------------------------------------------------
-	# rebuild
-	my @tags = $input->param('tag');
-	my @subfields =$input->param('subfield');
-	my @values=$input->param('field_value');
-	# build indicator hash.
-	my @ind_tag = $input->param('ind_tag');
-	my @indicator = $input->param('indicator');
-	my @tagindex=$input->param('tagindex');
-	
-	
-## check for malformed xml -- non UTF-8 like (MARC8) will break xml without warning
-### This usually happens with data coming from other Z3950 servers
-## Slows the saving process so comment out at your own risk
-eval{
- $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag,\@tagindex);	
-};
- if ($@){
-warn $@;
- $template->param(error             =>1,xmlerror=>1,);
-goto FINAL;
-  };
-my $xmlhash=XML_xml2hash_onerecord($xml);
-	my ($duplicatebiblionumber,$duplicatetitle) = FindDuplicate($xmlhash) if (($op eq "addbiblio") && (!$is_a_modif) && (!$duplicateok));
-	my $confirm_not_duplicate = $input->param('confirm_not_duplicate');
-	# it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate)
-	if (!$duplicatebiblionumber or $confirm_not_duplicate) {
-		# MARC::Record built => now, record in DB
-		my $oldbibnum;
-		my $oldbibitemnum;
-		if ($is_a_modif) {
-			NEWmodbiblio($dbh,$biblionumber,$xmlhash,$frameworkcode);
-
-		} else {
-
-			($biblionumber) = NEWnewbiblio($dbh,$xmlhash,$frameworkcode);
-
-		}
-	# now, redirect to additem page
-		unless ($fromserials){
-		print $input->redirect("additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode") unless $fromserials;
-		exit;
-		}else{
-		my $title=XML_readline_onerecord($xmlhash,"title","biblios");
-		$template->param(exit=>1,biblionumber=>$biblionumber,title=>$title);
-		goto FINAL;
-		}
-
-	} else {
-FINAL:
-	# it may be a duplicate, warn the user and do nothing
-		build_tabs ($template, $xmlhash, $dbh);
-		build_hidden_data;
-		$template->param(fromserials=>$fromserials,
-			oldbiblionumber             => $oldbiblionumber,
-			biblionumber                      => $biblionumber,
-			oldbiblionumtagfield        => $oldbiblionumtagfield,
-			oldbiblionumtagsubfield     => $oldbiblionumtagsubfield,
-			duplicatebiblionumber		=> $duplicatebiblionumber,
-			duplicatetitle				=> $duplicatetitle,
-			 );
-	}
-#------------------------------------------------------------------------------------------------------------------------------
-} elsif ($op eq "addfield") {
-#------------------------------------------------------------------------------------------------------------------------------
-	my $addedfield = $input->param('addfield_field');
-	my @tags = $input->param('tag');
-	my @subfields = $input->param('subfield');
-	my @values = $input->param('field_value');
-	# build indicator hash.
-	my @ind_tag = $input->param('ind_tag');
-	my @indicator = $input->param('indicator');
-	my @tagindex=$input->param('tagindex');
-	my $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag,\@tagindex);
-	my $xmlhash=XML_xml2hash_onerecord($xml);
-	# adding an empty field
-	build_tabs ($template, $xmlhash, $dbh,$addedfield);
-	build_hidden_data;
-	$template->param(
-		oldbiblionumber             => $oldbiblionumber,
-		biblionumber                     => $biblionumber,
-		oldbiblionumtagfield        => $oldbiblionumtagfield,
-		oldbiblionumtagsubfield     => $oldbiblionumtagsubfield,
-		fromserials=>$fromserials
-		 );
-} elsif ($op eq "delete") {
-#------------------------------------------------------------------------------------------------------------------------------
-my $sth=$dbh->prepare("select iss.itemnumber from items i ,issues iss where iss.itemnumber=i.itemnumber and iss.returndate is null and  i.biblionumber=?");
- $sth->execute($biblionumber);
-my $onloan=$sth->fetchrow;
-
- 	if (!$onloan){	
-	NEWdelbiblio($dbh,$biblionumber);
-print	$input->redirect("/cgi-bin/koha/catalogue/catalogue-search.pl");
-	exit;
-	}else{
-
-$template->param(error            => 1, onloan=>1,);
-	}
-#------------------------------------------------------------------------------------------------------------------------------
-#------------------------------------------------------------------------------------------------------------------------------
-} else {
-#------------------------------------------------------------------------------------------------------------------------------
-
-	# If we're in a duplication case, we have to set to "" the  biblionumber
-	# as we'll save the biblio as a new one.
-	if ($op eq "duplicate")
-	{
-		$biblionumber = "";
-		$oldbiblionumber= "";
-	$template->param(duplicateok            => 1);
-	}
-	build_tabs ($template, $xmlhash, $dbh);
-	build_hidden_data;
-	$template->param(
-		oldbiblionumber             => $oldbiblionumber,
-		biblionumber                       => $biblionumber,
-		oldbiblionumtagfield        => $oldbiblionumtagfield,
-		oldbiblionumtagsubfield     => $oldbiblionumtagsubfield,
-		fromserials=>$fromserials			
-		);
-}
-$template->param(
-		isbntag             => $isbntag,
-		isbnsub                       => $isbnsub,
-		issntag             => $isbntag,
-		issnsub                       => $issnsub,
-		titletag             => $titletag,
-		titlesub                       => $titlesub,
-		authortag             => $authortag,
-		authorsub                       => $authorsub,
-		);
-
-$template->param(
-		frameworkcode => $frameworkcode,
-		itemtype => $frameworkcode, # HINT: if the library has itemtype = framework, itemtype is auto filled !
-		hide_marc => C4::Context->preference('hide_marc'),
-		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-		advancedMARCEditor => C4::Context->preference("advancedMARCEditor"),
-		);
-
-output_html_with_http_headers $input, $cookie, $template->output;

Index: cataloguing/addbooks.pl
===================================================================
RCS file: cataloguing/addbooks.pl
diff -N cataloguing/addbooks.pl
--- cataloguing/addbooks.pl	27 Sep 2006 21:19:21 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,59 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: addbooks.pl,v 1.7 2006/09/27 21:19:21 tgarip1957 Exp $
-
-# 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::Auth;
-use C4::Biblio;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Koha;
-
-my $query = new CGI;
-
-my $error   = $query->param('error');
-my $success = $query->param('biblioitem');
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => "cataloguing/addbooks.tmpl",
-        query           => $query,
-        type            => "intranet",
-        authnotrequired => 0,
-        flagsrequired   => { editcatalogue => 1 },
-        debug           => 1,
-    }
-);
-
-# get framework list
-my $frameworks = getframeworks;
-my @frameworkcodeloop;
-foreach my $thisframeworkcode (keys %$frameworks) {
-	my %row =(value => $thisframeworkcode,
-				frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
-			);
-	push @frameworkcodeloop, \%row;
-}
-
-my $marc_p = C4::Context->boolean_preference("marc");
-$template->param( NOTMARC => !$marc_p,
-				frameworkcodeloop => \@frameworkcodeloop );
-
-output_html_with_http_headers $query, $cookie, $template->output;

Index: cataloguing/additem.pl
===================================================================
RCS file: cataloguing/additem.pl
diff -N cataloguing/additem.pl
--- cataloguing/additem.pl	27 Sep 2006 21:19:21 -0000	1.12
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,442 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: additem.pl,v 1.12 2006/09/27 21:19:21 tgarip1957 Exp $
-
-# 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 CGI;
-use strict;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Biblio;
-use C4::Context;
-use C4::Koha; # XXX subfield_is_koha_internal_p
-use C4::Search;
-use C4::Circulation::Circ2;
-use C4::Log;
-
-my $logstatus=C4::Context->preference('Activate_log');
-
-sub find_value {
-	my ($tagfield,$insubfield,$record) = @_;
-	my $result;
-	my $indicator;
-my $item=$record->{datafield};
-my $controlfield=$record->{controlfield};
-my $leader=$record->{leader};
- if ($tagfield eq '000'){
-## We are getting the leader
-$result=$leader->[0];
-return($indicator,$result);
-}
-     if ($tagfield <10){
-	foreach my $control (@$controlfield) {
-		if ($control->{tag} eq $tagfield){
-		$result.=$control->{content};
-		}
-	}
-      }else{
-	foreach my $field (@$item) {		
-	      if ($field->{tag} eq $tagfield){	
-		    foreach my $subfield ( $field->{'subfield'}){
-		       foreach my $code ( @$subfield){
-			if ($code->{code} eq $insubfield) {
-				$result .= $code->{content};
-				$indicator = $field->{ind1}.$field->{ind2};
-			}
-		      }## each code
-		  }##each subfield
-	      }## if tag
-	}### $field
-     }## tag<10
-	return($indicator,$result);
-}
-my $input = new CGI;
-my $dbh = C4::Context->dbh;
-my $error = $input->param('error');
-my $biblionumber = $input->param('biblionumber');
-my $oldbiblionumber =$biblionumber;
-my $frameworkcode=$input->param('frameworkcode');
-my $op = $input->param('op');
-my $itemnumber = $input->param('itemnumber');
-my $fromserials=$input->param('fromserials');## if a serial is being added do not display navigation menus
-my $serialid=$input->param('serialid');
-my @itemrecords; ##Builds existing items
-my $bibliorecord; #Bibliorecord relared to this item
-my $newrecord; ## the new record buing built
-my $itemrecexist; #item record we are editing
-my $xml; ## data on html
- $frameworkcode=MARCfind_frameworkcode($dbh,$biblionumber) unless $frameworkcode;
-my $tagslib = &MARCitemsgettagslib($dbh,1,$frameworkcode);
-my $itemrecord;
-my $nextop="additem";
-my @errors; # store errors found while checking data BEFORE saving item.
-
-
-my ($template, $loggedinuser, $cookie)
-    = get_template_and_user({template_name => "cataloguing/additem.tmpl",
-			     query => $input,
-			     type => "intranet",
-			     authnotrequired => 0,
-			     flagsrequired => {editcatalogue => 1},
-			     debug => 1,
-			     });
-
-#------------------------------------------------------------------------------------------------------------------------------
-if ($op eq "additem") {
-#------------------------------------------------------------------------------------------------------------------------------
-	# rebuild
-
-	my @tags = $input->param('tag');
-	my @subfields = $input->param('subfield');
-	my @values = $input->param('field_value');
-	# build indicator hash.
-	my @ind_tag = $input->param('ind_tag');
-	my @indicator = $input->param('indicator');
-	my %indicators;
-	for (my $i=0;$i<=$#ind_tag;$i++) {
-		$indicators{$ind_tag[$i]} = $indicator[$i];
-	}
-## check for malformed xml -- non UTF-8 like (MARC8) will break xml without warning
-### This usually happens with data coming from other Z3950 servers
-## Slows the saving process so comment out at your own risk
-eval{
- $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag);	
-};
- if ($@){
-push @errors,"non_utf8" ;
-$nextop = "additem";
-goto FINAL;
-  };
- my $newrecord=XML_xml2hash_onerecord($xml);
-my $newbarcode=XML_readline_onerecord($newrecord,"barcode","holdings");	
-
-	# if autoBarcode is ON, calculate barcode...
-	if (C4::Context->preference('autoBarcode')) {	
-		unless ($newbarcode) {
-			my $sth_barcode = $dbh->prepare("select max(abs(barcode)) from items");
-			$sth_barcode->execute;
-			($newbarcode) = $sth_barcode->fetchrow;
-			$newbarcode++;
-			# OK, we have the new barcode, now create the entry in MARC record
-			$newrecord=XML_writeline( $newrecord, "barcode", $newbarcode,"holdings" );
-		}
-	}
-# check for item barcode # being unique
-	my ($oldrecord)=XMLgetitem($dbh,"",$newbarcode);
-	
-	push @errors,"barcode_not_unique" if($oldrecord);
-# MARC::Record builded => now, record in DB
-## User may be keeping serialids in marc records -- check and add it 
-if ($fromserials){
-$newrecord=XML_writeline( $newrecord, "serialid", $serialid,"holdings" );
-}
-	# if barcode exists, don't create, but report the problem.
-	unless ($oldrecord){
-	  $itemnumber=NEWnewitem($dbh,$newrecord,$biblionumber) ;
-		if ($fromserials){
-		my $holdingbranch=XML_readline_onerecord($newrecord,"holdingbranch","holdings");	
-		$template->param(exit=>1,holdingbranch=>$holdingbranch);
-		}
-	$nextop = "additem";
-	}
-	else{
-		$nextop = "additem";
-		$itemrecexist = $newrecord;
-	} 
-#------------------------------------------------------------------------------------------------------------------------------
-} elsif ($op eq "edititem") {
-#------------------------------------------------------------------------------------------------------------------------------
-# retrieve item if exist => then, it's a modif
-	 ($itemrecexist) = XMLgetitemhash($dbh,$itemnumber);## item is already in our array-getit
-	$nextop="saveitem";
-	
-#logaction($loggedinuser,"acqui.simple","modify",$oldbiblionumber,"item : ".$itemnumber) if ($logstatus);
-	
-#------------------------------------------------------------------------------------------------------------------------------
-} elsif ($op eq "delitem") {
-#------------------------------------------------------------------------------------------------------------------------------
-# retrieve item if exist => then, it's a modif
-my $sth=$dbh->prepare("select * from issues i where i.returndate is null and i.itemnumber=?");
- $sth->execute($itemnumber);
-my $onloan=$sth->fetchrow;
-push @errors,"book_on_loan" if ($onloan);
-	if ($onloan){
-	$nextop = "additem";
-}else{
-	&NEWdelitem($dbh,$itemnumber);
-	$nextop="additem";
-}
-#------------------------------------------------------------------------------------------------------------------------------
-} elsif ($op eq "saveitem") {
-#------------------------------------------------------------------------------------------------------------------------------
-	# rebuild
-#warn "save item";
-	my @tags = $input->param('tag');
-	my @subfields = $input->param('subfield');
-	my @values = $input->param('field_value');
-	# build indicator hash.
-	my @ind_tag = $input->param('ind_tag');
-	my @indicator = $input->param('indicator');
-	my $itemnumber = $input->param('itemnumber');
-	my %indicators;
-	for (my $i=0;$i<=$#ind_tag;$i++) {
-		$indicators{$ind_tag[$i]} = $indicator[$i];
-	}
-## check for malformed xml -- non UTF-8 like (MARC8) will break xml without warning
-### This usually happens with data coming from other Z3950 servers
-## Slows the saving process so comment out at your own risk
-eval{
- $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag);	
-};
-	 if ($@){
-push @errors,"non_utf8" ;
-$nextop = "edititem";
-goto FINAL;
-  };
- my $newrecord=XML_xml2hash_onerecord($xml);
-	my $newbarcode=XML_readline_onerecord($newrecord,"barcode","holdings");
-	my ($oldrecord)=XMLgetitem($dbh,"",$newbarcode);
-	$oldrecord=XML_xml2hash_onerecord($oldrecord);
-	my $exist=XML_readline_onerecord($oldrecord,"itemnumber","holdings") if $oldrecord;
-	if ($exist && ($exist ne $itemnumber)){
-	push @errors,"barcode_not_unique" ; ## Although editing user may have changed the barcode
-	$nextop="edititem";
-	}else{
-	 NEWmoditem($dbh,$newrecord,$biblionumber,$itemnumber);
-	$itemnumber="";
-	$nextop="additem";
-
-	}
-}
-
-#
-#------------------------------------------------------------------------------------------------------------------------------
-# build screen with existing items. and "new" one
-#------------------------------------------------------------------------------------------------------------------------------
-FINAL:
-my %indicators;
-$indicators{995}='  ';
-# now, build existing item list
-###DO NOT CHANGE TO RETRIVE FROM ZEBRA#####
-my $record =XMLgetbiblio($dbh,$biblionumber);
-$bibliorecord=XML_xml2hash_onerecord($record);
-my @itemxmls=XMLgetallitems($dbh,$biblionumber);
-	foreach my $itemrecord(@itemxmls){
-	my $itemhash=XML_xml2hash($itemrecord);
-	push @itemrecords, $itemhash;
-	}
-####
-
-
-
-my ($itemtagfield,$itemtagsubfield) = &MARCfind_marc_from_kohafield("itemnumber","holdings");
-my @itemnums;
-my @fields;
-my %witness; #---- stores the list of subfields used at least once, with the "meaning" of the code
-my @big_array;
-my @item_value_loop;
-my @header_value_loop;
-unless($fromserials){ ## do not display existing items if adding a serial. It could be a looong list
-foreach my $itemrecord (@itemrecords){
-
-my $item=$itemrecord->{datafield};
-my $controlfield=$itemrecord->{controlfield};
-my $leader=$itemrecord->{leader};
-my %this_row;
-	### The leader
-	unless ($tagslib->{'000'}->{'@'}->{tab}  ne 10 || substr($tagslib->{'000'}->{'@'}->{hidden},1,1)>0){
-	my @datasub='000@';
-	$witness{$datasub[0]} = $tagslib->{'000'}->{'@'}->{lib};
-	$this_row{$datasub[0]} =$leader->[0];
-	}## leader
-	foreach my $control (@$controlfield){
-		push @itemnums,$control->{content} if ($control->{tag} eq $itemtagfield);
-		next if ($tagslib->{$control->{tag}}->{'@'}->{tab}  ne 10);
-		next if (substr($tagslib->{$control->{tag}}->{'@'}->{hidden},1,1)>0);	
-					
-			my @datasub=$control->{tag}.'@';
-			$witness{$datasub[0]} = $tagslib->{$control->{tag}}->{'@'}->{lib};
-			$this_row{$datasub[0]} =$control->{content};		     	
-	}## Controlfields 
-	foreach my $data (@$item){
-		foreach my $subfield ( $data->{'subfield'}){
-		   	foreach my $code ( @$subfield){	
-			# loop through each subfield			
-			push @itemnums,$code->{content} if ($data->{tag} eq $itemtagfield && $code->{code} eq $itemtagsubfield);
-			next if ($tagslib->{$data->{tag}}->{$code->{code}}->{tab}  ne 10);
-			next if (substr($tagslib->{$data->{tag}}->{$code->{code}}->{hidden},1,1)>0);
-			$witness{$data->{tag}.$code->{code}} = $tagslib->{$data->{tag}}->{$code->{code}}->{lib};
-			$this_row{$data->{tag}.$code->{code}} =$code->{content};
-			}
-			
-		}# subfield
-	
-	}## each data
-	if (%this_row) {
-	push(@big_array, \%this_row);
-	}
-}## each record
-#fill big_row with missing datas
-foreach my $subfield_code  (keys(%witness)) {
-	for (my $i=0;$i<=$#big_array;$i++) {
-		$big_array[$i]{$subfield_code}="&nbsp;" unless ($big_array[$i]{$subfield_code});
-	}
-}
-# now, construct template !
-
-for (my $i=0;$i<=$#big_array; $i++) {
-	my $items_data;
-	foreach my $subfield_code (sort keys(%witness)) {
-		$items_data .="<td>".$big_array[$i]{$subfield_code}."</td>";
-	}
-	my %row_data;
-	$row_data{item_value} = $items_data;
-	$row_data{itemnumber} = $itemnums[$i];
-	push(@item_value_loop,\%row_data);
-}
-foreach my $subfield_code (sort keys(%witness)) {
-	my %header_value;
-	$header_value{header_value} = $witness{$subfield_code};
-	push(@header_value_loop, \%header_value);
-}
-}## unless from serials
-# next item form
-my @loop_data =();
-my $i=0;
-my $authorised_values_sth = $dbh->prepare("select authorised_value,lib from authorised_values where category=? order by lib");
-
-foreach my $tag (sort keys %{$tagslib}) {
- if ($itemtagfield <10){
-next if($tag==$itemtagfield);
-}
-	my $previous_tag = '';
-# loop through each subfield
-	foreach my $subfield (sort keys %{$tagslib->{$tag}}) {
-		next if subfield_is_koha_internal_p($subfield);
-		next if ($tagslib->{$tag}->{$subfield}->{'tab'}  ne "10");
-		next if  ($tagslib->{$tag} eq $itemtagfield && $tagslib->{$tag}->{$subfield} eq $itemtagsubfield);
-		my %subfield_data;
-		$subfield_data{tag}=$tag;
-		$subfield_data{subfield}=$subfield;
-		$subfield_data{marc_lib}="<span id=\"error$i\">".$tagslib->{$tag}->{$subfield}->{lib}."</span>";
-		$subfield_data{mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
-		$subfield_data{repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
-	$subfield_data{hidden}= "display:none" if (substr($tagslib->{$tag}->{$subfield}->{hidden},2,1)>0);
-	
-		my ($x,$value);
-		($x,$value) = find_value($tag,$subfield,$itemrecexist) if ($itemrecexist);
-		# search for itemcallnumber if applicable
-		my ($itemcntag,$itemcntagsub)=MARCfind_marc_from_kohafield("itemcallnumber","holdings");
-		if ($tag eq $itemcntag && $subfield eq $itemcntagsub && C4::Context->preference('itemcallnumber')) {
-			my $CNtag = substr(C4::Context->preference('itemcallnumber'),0,3);
-			my $CNsubfield = substr(C4::Context->preference('itemcallnumber'),3,1);
-			my $CNsubfield2 = substr(C4::Context->preference('itemcallnumber'),4,1);
-			my $temp1 = XML_readline_onerecord($bibliorecord,"","",$CNtag,$CNsubfield);
-			my $temp2 = XML_readline_onerecord($bibliorecord,"","",$CNtag,$CNsubfield2);
-			$value = $temp1.' '.$temp2;
-			$value=~s/^\s+|\s+$//g;
-			
-		}
-		if ($tagslib->{$tag}->{$subfield}->{authorised_value}) {
-			my @authorised_values;
-			my %authorised_lib;
-			# builds list, depending on authorised value...
-			#---- branch
-			if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
-				my $sth=$dbh->prepare("select branchcode,branchname from branches order by branchname");
-				$sth->execute;
-				push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
-				while (my ($branchcode,$branchname) = $sth->fetchrow_array) {
-					push @authorised_values, $branchcode;
-					$authorised_lib{$branchcode}=$branchname;
-				}
-			#----- itemtypes
-			} elsif ($tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes") {
-				my $sth=$dbh->prepare("select itemtype,description from itemtypes order by description");
-				$sth->execute;
-				push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
-				while (my ($itemtype,$description) = $sth->fetchrow_array) {
-					push @authorised_values, $itemtype;
-					$authorised_lib{$itemtype}=$description;
-				}
-			#---- "true" authorised value
-			} else {
-				$authorised_values_sth->execute($tagslib->{$tag}->{$subfield}->{authorised_value});
-				push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
-				while (my ($value,$lib) = $authorised_values_sth->fetchrow_array) {
-					push @authorised_values, $value;
-					$authorised_lib{$value}=$lib;
-				}
-			}
-			$subfield_data{marc_value}= CGI::scrolling_list(-name=>'field_value',
-																		-values=> \@authorised_values,
-																		-default=>"$value",																		-labels => \%authorised_lib,																		-size=>1,
-																		-multiple=>0,												);
-		} elsif ($tagslib->{$tag}->{$subfield}->{thesaurus_category}) {
-			$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\"  size=47 maxlength=255 DISABLE READONLY> <a href=\"javascript:Dopop('../authorities/auth_finder.pl?authtypecode=".$tagslib->{$tag}->{$subfield}->{authtypecode}."&index=$i',$i)\">...</a>";
-			#"
-		} elsif ($tagslib->{$tag}->{$subfield}->{'value_builder'}) {
-		my $cgidir = C4::Context->intranetdir ."/cgi-bin/value_builder";
-		unless (opendir(DIR, "$cgidir")) {
-			$cgidir = C4::Context->intranetdir."/value_builder";
-		} 
-		my $plugin=$cgidir."/".$tagslib->{$tag}->{$subfield}->{'value_builder'}; 
-		require $plugin;
-		my $extended_param = plugin_parameters($dbh,$newrecord,$tagslib,$i,0);
-		my ($function_name,$javascript) = plugin_javascript($dbh,$newrecord,$tagslib,$i,0);
-		$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\"  value=\"$value\" size=\"47\" maxlength=\"255\" DISABLE READONLY OnFocus=\"javascript:Focus$function_name($i)\" OnBlur=\"javascript:Blur$function_name($i)\"> <a href=\"javascript:Clic$function_name($i)\">...</a> $javascript";
-		} else {
-			$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\" value=\"$value\" size=50 maxlength=255>";
-		}
-#		$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\">";
-		push(@loop_data, \%subfield_data);
-		$i++
-	}
-}
-
-
-# what's the next op ? it's what we are not in : an add if we're editing, otherwise, and edit.
-$template->param(item_loop => \@item_value_loop,
-						item_header_loop => \@header_value_loop,
-						biblionumber =>$biblionumber,
-						title => &XML_readline_onerecord($bibliorecord,"title","biblios"),
-						author => &XML_readline_onerecord($bibliorecord,"author","biblios"),
-						item => \@loop_data,
-						itemnumber => $itemnumber,
-						itemtagfield => $itemtagfield,
-						itemtagsubfield =>$itemtagsubfield,
-						op => $nextop,
-						opisadd => ($nextop eq "saveitem")?0:1,
-						fromserials=>$fromserials, serialid=>$serialid,);
-foreach my $error (@errors) {
-	$template->param($error => 1);
-
-}
-output_html_with_http_headers $input, $cookie, $template->output;
-
-sub XMLfinditem {
-my ($itemnumber, at itemrecords)=@_;
-foreach my $record (@itemrecords){
-my $inumber=XML_readline_onerecord($record,"itemnumber","holdings");
-	if ($inumber ==$itemnumber){
-	return $record;
-	}
-}
-}

Index: cataloguing/isbnsearch.pl
===================================================================
RCS file: cataloguing/isbnsearch.pl
diff -N cataloguing/isbnsearch.pl
--- cataloguing/isbnsearch.pl	27 Sep 2006 21:19:21 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,190 +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::Auth;
-use C4::Biblio;
-use C4::Search;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Breeding;
-use C4::Koha;
-
-my $input      = new CGI;
-my $isbn       = $input->param('isbn');
-my $title      = $input->param('title');
-my $offset     = $input->param('offset');
-my $num        = $input->param('num');
-my $showoffset = $offset + 1;
-my $total;
-my $count;
-my @results;
-my $facets;
-my %search;
-my $toggle;
-my $marc_p = C4::Context->boolean_preference("marc");
-my $SQLorZEBRA=C4::Context->preference("SQLorZEBRA");
-if ( !$isbn && !$title ) {
-    print $input->redirect('addbooks.pl');
-}
-else {
-    my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-        {
-            template_name   => "cataloguing/isbnsearch.tmpl",
-            query           => $input,
-            type            => "intranet",
-            authnotrequired => 0,
-            flagsrequired   => { editcatalogue => 1 },
-            debug           => 1,
-        }
-    );
-
-    # fill with books in ACTIVE DB (biblio)
-    if ( !$offset ) {
-        $offset     = 0;
-        $showoffset = 1;
-    }
-    if ( !$num ) { $num = 10 }
-my @kohafield;
-my @value;
-my @relation;
-my @and_or;
-my $order="title,1";
-if ($isbn){
-$search{'isbn'}=$isbn;
-push @kohafield, "isbn";
-push @value,$isbn;
-}else{
-$search{'title'}=$title;
-push @kohafield, "title";
-push @value,$title;
-push @relation, "\@attr 5=1 \@attr 6=3 \@attr 4=1 \@attr 3=1 ";
-  }
-$search{avoidquerylog}=1;
-if ($SQLorZEBRA eq "sql"){
-($count, @results) =cataloguing_search(\%search,$num,$offset);
-}else{
-($count,$facets, at results) =ZEBRAsearch_kohafields(\@kohafield,\@value, \@relation,$order, \@and_or, 1,"",$offset, $num,"intranet");
-
-}
-my $grandtotal=$count;
-    if ( $count < ( $offset + $num ) ) {
-        $total = $count;
-    }
-    else {
-        $total = $offset + $num;
-    }    # else
-
-    my @loop_data;
- 
- @loop_data=@results if $count >0;;
-    $template->param( startfrom => $offset + 1 );
-    ( $offset + $num <= $count )
-      ? ( $template->param( endat => $offset + $num ) )
-      : ( $template->param( endat => $count ) );
-    $template->param( numrecords => $count );
-    my $nextstartfrom = ( $offset + $num < $count ) ? ( $offset + $num ) : (-1);
-    my $prevstartfrom = ( $offset - $num >= 0 ) ? ( $offset - $num ) : (-1);
-    $template->param( nextstartfrom => $nextstartfrom );
-    my $displaynext = 1;
-    my $displayprev = 0;
-    ( $nextstartfrom == -1 ) ? ( $displaynext = 0 ) : ( $displaynext = 1 );
-    ( $prevstartfrom == -1 ) ? ( $displayprev = 0 ) : ( $displayprev = 1 );
-    $template->param( displaynext => $displaynext );
-    $template->param( displayprev => $displayprev );
-    my @numbers = ();
-    my $term;
-    my $value;
-
-    if ($isbn) {
-        $term  = "isbn";
-        $value = $isbn;
-    }
-    else {
-        $term  = "title";
-        $value = $title;
-    }
-    if ( $count > 10 ) {
-        for ( my $i = 1 ; $i < $count / 10 + 1 ; $i++ ) {
-            if ( $i < 16 ) {
-                my $highlight = 0;
-                ( $offset == ( $i - 1 ) * 10 ) && ( $highlight = 1 );
-                push @numbers,
-                  {
-                    number    => $i,
-                    highlight => $highlight,
-                    term      => $term,
-                    value     => $value,
-                    startfrom => ( $i - 1 ) * 10
-                };
-            }
-        }
-    }
-
-    # fill with books in breeding farm
-    ( $count, @results ) = BreedingSearch( $title, $isbn );
-    my @breeding_loop = ();
-    for ( my $i = 0 ; $i <= $#results ; $i++ ) {
-        my %row_data;
-        if ( $i % 2 ) {
-            $toggle = "#ffffcc";
-        }
-        else {
-            $toggle = "white";
-        }
-        $row_data{toggle} = $toggle;
-        $row_data{id}     = $results[$i]->{'id'};
-        $row_data{isbn}   = $results[$i]->{'isbn'};
-        $row_data{file}   = $results[$i]->{'file'};
-        $row_data{title}  = $results[$i]->{'title'};
-        $row_data{author} = $results[$i]->{'author'};
-	$row_data{classification} = $results[$i]->{'classification'};
-	$row_data{subclass} = $results[$i]->{'subclass'};
-          push ( @breeding_loop, \%row_data );
-    }
-# get framework list
-	my $frameworks = getframeworks;
-	my @frameworkcodeloop;
-	foreach my $thisframeworkcode (keys %$frameworks) {
-		my %row =(value => $thisframeworkcode,
-					frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
-				);
-		push @frameworkcodeloop, \%row;
-	}
-
-
-    $template->param(
-        isbn          => $isbn,
-        title         => $title,
-        showoffset    => $showoffset,
-        total         => $total,
-	grandtotal         => $grandtotal,
-        offset        => $offset,
-        results_loop          => \@loop_data,
-        breeding_loop => \@breeding_loop,
-        numbers       => \@numbers,
-        term          => $term,
-        value         => $value,
-  	frameworkcodeloop => \@frameworkcodeloop
-    );
-
-  output_html_with_http_headers $input, $cookie, $template->output;
-}    # else

Index: circ/branchreserves.pl
===================================================================
RCS file: circ/branchreserves.pl
diff -N circ/branchreserves.pl
--- circ/branchreserves.pl	15 Nov 2006 01:41:51 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,136 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: branchreserves.pl,v 1.3 2006/11/15 01:41:51 tgarip1957 Exp $
-
-# 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 C4::Context;
-use CGI;
-use C4::Auth;
-use C4::Date;
-use C4::Circulation::Circ2;
-use C4::Reserves2;
-use C4::Search;
-use C4::Koha;
-
-my $input = new CGI;
-
-my $item=$input->param('itemnumber');
-my $borrowernumber=$input->param('borrowernumber');
-my $fbr=$input->param('fbr');
-my $tbr=$input->param('tbr');
-
-my $cancel;
-
-
-my $theme = $input->param('theme'); # only used if allowthemeoverride is set
-
-my ($template, $loggedinuser, $cookie)
-      = get_template_and_user({template_name => "circ/branchreserves.tmpl",
-	                                 query => $input,
-	                                 type => "intranet",
-	                                 authnotrequired => 0,
-	                                 flagsrequired => {borrowers => 1},
-	                                 debug => 1,
-	                                 });
-
-my $default = C4::Context->userenv->{'branch'};
-my $dbh=C4::Context->dbh;
-my $todaysdate = get_today();
-
-
-# if we have a return from the form we launch the subroutine CancelReserve
-	if ($item){
-		my $messages;
-		my $nextreservinfo;
-		my %env;
-		my $waiting;
-		($messages,$nextreservinfo) = GlobalCancel($item,$borrowernumber);
-# 		if we have a result 
-		if ($nextreservinfo){
-			my $borrowerinfo = getpatroninformation(\%env,$nextreservinfo);
-			my $iteminfo = C4::Circulation::Circ2::getiteminformation(\%env,$item);
-			if ($messages->{'transfert'}){
-			my $branchname = getbranchname($messages->{'transfert'});
-				$template->param(
-					messagetransfert => $messages->{'transfert'},
-					branchname 	=> $branchname,
-				);
-			}
-			if ($messages->{'waiting'}){
-			$waiting = 1;
-			}
-
-				$template->param(
-					message			=> 1,
-					nextreservnumber  =>  $nextreservinfo,
-					nextreservsurname => $borrowerinfo->{'surname'},
-					nextreservfirstname => $borrowerinfo->{'firstname'},
-					nextreservitem		=> $item,
-					nextreservtitle		=> $iteminfo->{'title'},
-					waiting 		=> $waiting
-				);
-			}
-# 		if the document is not in his homebranch location and there is not reservation after, we transfer it
-		if (($fbr ne $tbr) and (not $nextreservinfo)){
-			C4::Circulation::Circ2::dotransfer($item,$fbr,$tbr);
-			C4::Circulation::Circ2::itemseen($dbh,$itm);
-		}
-	}
-	
-my @reservloop;
-my @getreserves = GetReservesForBranch($default);
-foreach my $num (@getreserves) {
-	my %getreserv;
-	my %env;
-	my $gettitle = getiteminformation(\%env,$num->{'itemnumber'});
-	my $getborrower = getpatroninformation (\%env,$num->{'borrowernumber'});
-	my $itemtypeinfo = getitemtypeinfo($gettitle->{'itemtype'});
-	$getreserv{'waitingdate'} = format_date($num->{'waitingdate'});
-	my $calcDate=DateCalc($num->{'waitingdate'},"+".C4::Context->preference('ReservesMaxPickUpDelay')."  days");
-	my $warning=Date_Cmp(ParseDate("today"),$calcDate);
-	if ($warning>0){
-		$getreserv{'messcompa'} = 1;
-	}
-	$getreserv{'title'} = $gettitle->{'title'};
-	$getreserv{'itemnumber'} = $gettitle->{'itemnumber'};
-	$getreserv{'biblionumber'} = $gettitle->{'biblionumber'};
-	$getreserv{'barcode'} = $gettitle->{'barcode'};
-	$getreserv{'itemtype'} = $itemtypeinfo->{'description'};
-	$getreserv{'homebranch'} = $gettitle->{'homebranch'};
-	$getreserv{'holdingbranch'} = $gettitle->{'holdingbranch'};
-	if ($gettitle->{'homebranch'} ne $gettitle->{'holdingbranch'}){
-		$getreserv{'dotransfer'} = 1;
-		}
-	$getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'};
-	$getreserv{'borrowernum'} = $getborrower->{'borrowernumber'};
-	$getreserv{'borrowername'} = $getborrower->{'surname'};
-	$getreserv{'borrowerfirstname'} =  $getborrower->{'firstname'} ;
-	if ($getborrower->{'emailaddress'}){
-		$getreserv{'borrowermail'} =  $getborrower->{'emailaddress'} ;
-	}
-	$getreserv{'borrowerphone'} = $getborrower->{'phone'};
-	push(@reservloop, \%getreserv);
-}
-
-	$template->param( reserveloop       => \@reservloop,
-			show_date	=> format_date($todaysdate),	
-			 );
-	
-output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file

Index: circ/branchtransfers.pl
===================================================================
RCS file: circ/branchtransfers.pl
diff -N circ/branchtransfers.pl
--- circ/branchtransfers.pl	15 Nov 2006 01:41:51 -0000	1.26
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,283 +0,0 @@
-#!/usr/bin/perl
-# WARNING: This file uses 4-character tabs!
-
-#written 11/3/2002 by Finlay
-#script to execute branch transfers of books
-
-
-# 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::Circulation::Circ2;
-use C4::Reserves2;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-use C4::Koha;
-use C4::Members;
-###############################################
-# constants
-
-my %env;
-my $linecolor1='#ffffcc';
-my $linecolor2='white';
-
-my $branches = GetBranches();
-my $printers = getprinters(\%env);
-
-
-###############################################
-#  Getting state
-
-my $query=new CGI;
-
-
-my $branch = getbranch($query, $branches);
-my $printer = getprinter($query, $printers);
-
-my $genbrname = $branches->{$branch}->{'branchname'} ;
-my $genprname = $printers->{$printer}->{'printername'};
-
-my $messages;
-my $found;
-my $reserved;
-my $waiting;
-my $reqmessage;
-my $cancelled;
-my $setwaiting;
-my $reqbrchname;
-my $user=$query->param('loggedinuser');
-my $request=$query->param('request');
-my $borrnum = $query->param('borrowernumber');
-
-my $tobranchcd=$query->param('tobranchcd');
-my $frbranchcd='';
-my $dbh=C4::Context->dbh;
-############
-# Deal with the requests....
-if ($request eq "KillWaiting") {
-    my $item = $query->param('itemnumber');
-    CancelReserve(0, $item, $borrnum);
-	$cancelled = 1;
-	$reqmessage =1;
-}
-
-my $ignoreRs = 0;
-if ($request eq "SetWaiting") {
-    my $item = $query->param('itemnumber');
-    $tobranchcd = ReserveWaiting($item, $borrnum);
-	$reqbrchname = $branches->{$tobranchcd}->{'branchname'};
-    $ignoreRs = 1;
-	$setwaiting = 1;
-	$reqmessage =1;
-}
-if ($request eq 'KillReserved'){
-    my $biblio = $query->param('biblionumber');
-    CancelReserve($biblio, 0, $borrnum);
-	$cancelled = 1;
-	$reqmessage =1;
-}
-
-
-
-# set up the branchselect options....
-my @branchoptionloop;
-foreach my $br (keys %$branches) {
-    #(next) unless $branches->{$br}->{'CU'}; #FIXME disabled to fix bug 202
-    my %branch;
-    $branch{selected}=($br eq $tobranchcd);
-	$branch{code}=$br;
-	$branch{name}=$branches->{$br}->{'branchname'};
-	push (@branchoptionloop, \%branch);
-}
-
-
-# collect the stack of books already transfered so they can printed...
-my @trsfitemloop;
-my %transfereditems;
-my %frbranchcds;
-my %tobranchcds;
-my $color=$linecolor2;
-
-my $barcode = $query->param('barcode');
-if ($barcode) {
-	my $transfered;
-	my $iteminformation;
-	($transfered, $messages, $iteminformation)
-			= transferbook($tobranchcd, $barcode, $ignoreRs,$user);
-	$found = $messages->{'ResFound'};
-	if ($transfered) {
-		my %item;
-		my $frbranchcd = $iteminformation->{'holdingbranch'};
-		if (not ($found)) {
-			($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
-			$item{'color'}=$color;
-			$item{'biblionumber'}=$iteminformation->{'biblionumber'};
-			$item{'title'}=$iteminformation->{'title'};
-			$item{'author'}=$iteminformation->{'author'};
-			$item{'itemtype'}=$iteminformation->{'itemtype'};
-			$item{'frbrname'}=$branches->{$frbranchcd}->{'branchname'};
-			$item{'tobrname'}=$branches->{$tobranchcd}->{'branchname'};
-		}
-		$item{counter}=0;
-		$item{barcode}=$barcode;
-		$item{frombrcd}=$frbranchcd;
-		$item{tobrcd}=$tobranchcd;
-##########
-#Are these lines still useful ???
-		$transfereditems{0}=$barcode;
-		$frbranchcds{0}=$frbranchcd;
-		$tobranchcds{0}=$tobranchcd;
-##########
-		push (@trsfitemloop, \%item);
-	}
-}
-
-foreach ($query->param){
-	(next) unless (/bc-(\d*)/);
-	my $counter=$1;
-	my %item;
-	my $bc=$query->param("bc-$counter");
-	my $frbcd=$query->param("fb-$counter");
-	my $tobcd=$query->param("tb-$counter");
-	$counter++;
-	$item{counter}=$counter;
-	$item{barcode}=$bc;
-	$item{frombrcd}=$frbcd;
-	$item{tobrcd}=$tobcd;
-	my ($iteminformation) = getiteminformation(\%env, 0, $bc);
-	($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
-	$item{'color'}=$color;
-	$item{'biblionumber'}=$iteminformation->{'biblionumber'};
-	$item{'title'}=$iteminformation->{'title'};
-	$item{'author'}=$iteminformation->{'author'};
-	$item{'itemtype'}=$iteminformation->{'itemtype'};
-	$item{'frbrname'}=$branches->{$frbcd}->{'branchname'};
-	$item{'tobrname'}=$branches->{$tobcd}->{'branchname'};
-##########
-#Are these lines still useful ???
-	$transfereditems{$counter}=$bc;
-	$frbranchcds{$counter}=$frbcd;
-	$tobranchcds{$counter}=$tobcd;
-#########
-	push (@trsfitemloop, \%item);
-}
-
-
-my $name;
-my $bornum;
-my $borcnum;
-my $itemnumber;
-my $biblionum;
-my $branchname;
-
-
-#####################
-
-if ($found) {
-    my $res = $messages->{'ResFound'};
-	$branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
-	my ($borr) = getpatroninformation(\%env, $res->{'borrowernumber'}, 0);
-	$name = name($borr);
-	$bornum = $borr->{'borrowernumber'}; #Hopefully, borr->{borrowernumber}=res->{borrowernumber}
-	$borcnum = $borr->{'cardnumber'};
-	$itemnumber = $res->{'itemnumber'};
-
-	if ($res->{'ResFound'} eq "Waiting") {
-		$waiting = 1;
-	}
-	if ($res->{'ResFound'} eq "Reserved") {
-		$reserved = 1;
-		$biblionum = $res->{'biblionumber'};
-	}
-}
-
-#####################
-
-my @errmsgloop;
-foreach my $code (keys %$messages) {
-	my %err;
-    $err{errbadcode} = ($code eq 'BadBarcode');
-	if ($code eq 'BadBarcode') {
-		$err{msg}=$messages->{'BadBarcode'};
-	}
-
-    $err{errispermanent} = ($code eq 'IsPermanent');
-    if ($code eq 'IsPermanent'){
-		$err{msg} = $branches->{$messages->{'IsPermanent'}}->{'branchname'};
-		# Here, msg contains the branchname
-		# Not so satisfied with this... But should work
-    }
-    $err{errdesteqholding} = ($code eq 'DestinationEqualsHolding');
-
-	$err{errwasreturned} = ($code eq 'WasReturned');
-	if ($code eq 'WasReturned') {
-		my ($borrowerinfo) = getpatroninformation(\%env, $messages->{'WasReturned'}, 0);
-		$name =name($borrowerinfo);
-		$bornum =$borrowerinfo->{'borrowernumber'};
-		$borcnum =$borrowerinfo->{'cardnumber'};
-    }
-    if ($code eq 'WasTransfered'){
-# Put code here if you want to notify the user that item was transfered...
-    }
-	push (@errmsgloop, \%err);
-}
-
-
-#######################################################################################
-# Make the page .....
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "circ/branchtransfers.tmpl",
-							query => $query,
-                            type => "intranet",
-                            authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
-                         });
-$template->param(	genbrname => $genbrname,
-								genprname => $genprname,
-								branch => $branch,
-								printer => $printer,
-								found => $found,
-								reserved => $reserved,
-								waiting => $waiting,
-								name => $name,
-								bornum => $bornum,
-								borcnum => $borcnum,
-								branchname => $branchname,
-								itemnumber => $itemnumber,
-								barcode => $barcode,
-								biblionumber => $biblionum,
-								tobranchcd => $tobranchcd,
-								reqmessage => $reqmessage,
-								cancelled => $cancelled,
-								setwaiting => $setwaiting,
-								trsfitemloop => \@trsfitemloop,
-								branchoptionloop => \@branchoptionloop,
-								errmsgloop => \@errmsgloop
-							);
-output_html_with_http_headers $query, $cookie, $template->output;
-
-
-sub name {
-	my ($borinfo) = @_;
-	return $borinfo->{'surname'}." ".$borinfo->{'title'}." ".$borinfo->{'firstname'};
-}
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: circ/circulation.pl
===================================================================
RCS file: circ/circulation.pl
diff -N circ/circulation.pl
--- circ/circulation.pl	15 Nov 2006 01:41:51 -0000	1.99
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,486 +0,0 @@
-#!/usr/bin/perl
-
-# Please use 8-character tabs for this file (indents are every 4 characters)
-
-#written 8/5/2002 by Finlay
-#script to execute issuing of books
-# New functions (renew etc.) added 07-08-2005 Tumer Garip tgarip at neu.edu.tr
-
-# 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::Circulation::Circ2;
-use C4::Search;
-use C4::Output;
-use C4::Print;
-
-use C4::Auth;
-use C4::Interface::CGI::Output;
-use C4::Koha;
-
-use C4::Date;
-use C4::Context;
-use C4::Members;
-
-# PARAMETERS READING
-#
-my $query=new CGI;
-
-my ($template, $loggedinuser, $cookie) = get_template_and_user
-    ({
-	template_name	=> 'circ/circulation.tmpl',
-	query		=> $query,
-	type		=> "intranet",
-	authnotrequired	=> 0,
-	flagsrequired	=> { circulate => 1 },
-    });
-my $branches = GetBranches();
-my $printers = getprinters();
-#my $branch = getbranch($query, $branches);
-my $branch=C4::Context->preference("defaultBranch");
-my $printer = getprinter($query, $printers);
-
-my $findborrower = $query->param('findborrower');
-$findborrower =~ s|,| |g;
-$findborrower =~ s|'| |g;
-my $borrowernumber = $query->param('borrnumber');
-
-my $print=$query->param('print');
-my $barcode = $query->param('barcode');
-my $year=$query->param('year');
-my $month=$query->param('month');
-my $day=$query->param('day');
-my $stickyduedate=$query->param('stickyduedate');
-my $issueconfirmed = $query->param('issueconfirmed');
-my $cancelreserve = $query->param('cancelreserve');
-my %error;
-my  $errorflag=$query->param('error');
-## The following er
-if ( $errorflag gt "1"){
-%error=(TOO_EARLY=>{1},) if ($errorflag eq "2");
-%error=(NO_MORE_RENEWALS=>{1},) if ($errorflag eq "3");
-%error=(RESERVE_FOUND=>{1},) if ($errorflag eq "4");
-}elsif ( $errorflag eq "1"){
-%error=(SUCCESFULL_RENEW=>{1},)
-}
-#set up cookie.....
-my $branchcookie;
-my $printercookie;
-#if ($query->param('setcookies')) {
-#	$branchcookie = $query->cookie(-name=>'branch', -value=>"$branch", -expires=>'+1y');
-#	$printercookie = $query->cookie(-name=>'printer', -value=>"$printer", -expires=>'+1y');
-#}
-
-my %env; # FIXME env is used as an "environment" variable. Could be dropped probably...
-
-$env{'branchcode'}=$branch;
-$env{'printer'}=$printer;
-$env{'queue'}=$printer;
-
-
-my $todaysdate =get_today();
-
-
-# check and see if we should print
- if ($barcode eq ''  && $print eq 'maybe'){
- 	$print = 'yes';
- }
- if ($print eq 'yes' && $borrowernumber ne ''){
- 	printslip(\%env,$borrowernumber);
- 	$query->param('borrnumber','');
- 	$borrowernumber='';
- }
-
-#
-# STEP 2 : FIND BORROWER
-# if there is a list of find borrowers....
-#
-my $borrowerslist;
-my $message;
-if ($findborrower) {
-	my ($count,$borrowers)=BornameSearch(\%env,$findborrower,'cardnumber','web');
-	my @borrowers=@$borrowers;
-	if ($#borrowers == -1) {
-		$query->param('findborrower', '');
-		$message =  "'$findborrower'";
-	} elsif ($#borrowers == 0) {
-		$query->param('borrnumber', $borrowers[0]->{'borrowernumber'});
-		$query->param('barcode','');
-		$borrowernumber=$borrowers[0]->{'borrowernumber'};
-	} else {
-		$borrowerslist = \@borrowers;
-	}
-}
-
-# get the borrower information.....
-my $borrower;
-my $bornum=$query->param('bornum');
-if ($bornum){
-$borrowernumber=$bornum;
-}
-my $issues;
-if ($borrowernumber) {
-	$borrower = getpatroninformation(\%env,$borrowernumber,0);
-	my ($od,$issue,$fines)=borrdata2(\%env,$borrowernumber);
-my $warning;
-
-	$template->param(overduecount => $od,
-							issuecount => $issue.$warning,
-							finetotal => $fines);
-$issues=$issue;
-my $picture;
- my $htdocs = C4::Context->config('opacdir');
-
-$picture =$htdocs. "/htdocs/uploaded-files/users-photo/".$borrower->{'cardnumber'}.".jpg";
- if (-e $picture)
-{ 
-   $template->param(borrowerphoto => "http://library.neu.edu.tr/uploaded-files/users-photo/".$borrower->{'cardnumber'}.".jpg");
- }else{
-$picture = "http://cc.neu.edu.tr/stdpictures/".$borrower->{'cardnumber'}.".jpg";
-  $template->param(borrowerphoto => $picture);
-}
-}
-
-#
-# STEP 3 : ISSUING
-#
-#Try to  issue
-
-
-if ($barcode) {
-
-	$barcode = cuecatbarcodedecode($barcode);
-	my ($datedue, $invalidduedate) = fixdate($year, $month, $day);
-	if ($issueconfirmed) {
-		issuebook(\%env, $borrower, $barcode, $datedue,$cancelreserve);
-		my ($od,$issue,$fines)=borrdata2(\%env,$borrowernumber);
-		my $warning;
-
-	$template->param(overduecount => $od,
-							issuecount => $issue.$warning,
-							finetotal => $fines);	
-
-	} else {
-		my ($error, $question) = canbookbeissued(\%env, $borrower, $barcode, $year, $month, $day) unless %error;
-		$error=\%error if %error;
-
-		my $noerror=1;
-		my $noquestion = 1;
-		foreach my $impossible (keys %$error) {
-			$template->param($impossible => $$error{$impossible},
-							IMPOSSIBLE => 1) unless ($impossible eq 'SUCCESFULL_RENEW');
-			$noerror = 0;
-		}
-		foreach my $needsconfirmation (keys %$question) {
-			$template->param($needsconfirmation => $$question{$needsconfirmation},
-							NEEDSCONFIRMATION => 1);
-			$noquestion = 0;
-		}
-		$template->param(day => $day,
-						month => $month,
-						year => $year);
-		if ($noerror && ($noquestion || $issueconfirmed)) {
-
-			issuebook(\%env, $borrower, $barcode, $datedue);
-		my ($od,$issue,$fines)=borrdata2(\%env,$borrowernumber);
-		my $warning;
-
-	$template->param(overduecount => $od,
-							issuecount => $issue.$warning,
-							finetotal => $fines);
-		}
-	}
-
-}
-
-
-
-
-##################################################################################
-# BUILD HTML
-
-# make the issued books table.....
-my $todaysissues='';
-my $previssues='';
-my @realtodayissues;
-my @realprevissues;
-#my @renewissues;
-my $allowborrow;
-if ($borrower) {
-
-# get each issue of the borrower & separate them in todayissues & previous issues
-	my @todaysissues;
-	my @previousissues;
-	my $issueslist = getissues($borrower);
-	# split in 2 arrays for today & previous
-	foreach my $it (keys %$issueslist) {
-		my $issuedate = $issueslist->{$it}->{'issue_date'};
-#		$issuedate = substr($issuedate, 0, 10);
-	
-		if ($todaysdate eq $issuedate) {
-			push @todaysissues, $issueslist->{$it};
-		} else { 
-			push @previousissues, $issueslist->{$it};
-		}
-    }
-
-
-	my $od; # overdues
-	my $i = 0;
-	my $togglecolor;
-	# parses today & build Template array
-	foreach my $book (sort {$b->{'timestamp'} <=> $a->{'timestamp'}} @todaysissues){
-		my $dd = $book->{'date_due'};
-		my $datedue = $book->{'date_due'};
-
-		$dd=format_date($dd);
-#		$datedue=~s/-//g;
-		if ($datedue lt $todaysdate) {
-			$od = 1;
-		} else {
-			$od=0;
-		}
-		$book->{'od'}=$od;
-		$book->{'dd'}=$dd;
-		
-		if ($togglecolor) {
-			$togglecolor=0;
-		} else {
-			$togglecolor=1;
-		}
-		$book->{'tcolor'}=$togglecolor;
-		if ($book->{'author'} eq ''){
-			$book->{'author'}=' ';
-		}    
-		push @realtodayissues,$book;
-	$i++;
-	}
-
-
-
-	# parses previous & build Template array
-	$i=0;
-    foreach my $book (sort {$a->{'date_due'} cmp $b->{'date_due'}} @previousissues){
-		my $dd = $book->{'date_due'};
-		my $datedue = $book->{'date_due'};
-		$dd=format_date($dd);
-		my $pcolor = '';
-		my $od = '';
-#		$datedue=~s/-//g;
-		if ($datedue lt $todaysdate) {
-		
-			$od = 1;
-		} else {
-			$od = 0;
-		}
-	
-		if ($togglecolor) {
-			$togglecolor=0;
-		} else {
-			$togglecolor=1;
-		}
-	$book->{'tcolor'}=$togglecolor;
-		$book->{'dd'}=$dd; 
-		$book->{'od'}=$od;
-		#$book->{'tcolor'}=$pcolor;
-		if ($book->{'author'} eq ''){
-			$book->{'author'}=' ';
-		}    
-
-		push @realprevissues,$book;
-	$i++;
-	}
-
-}#borrower
-
-
-my @values;
-my %labels;
-my $CGIselectborrower;
-if ($borrowerslist) {
-	foreach (sort {$a->{'surname'}.$a->{'firstname'} cmp $b->{'surname'}.$b->{'firstname'}} @$borrowerslist){
-		push @values,$_->{'borrowernumber'};
-		$labels{$_->{'borrowernumber'}} ="$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'}) ...  $_->{'streetaddress'} ";
-	}
-	$CGIselectborrower=CGI::scrolling_list( -name     => 'borrnumber',
-				-values   => \@values,
-				-labels   => \%labels,
-				-size     => 7,
-				-multiple => 0 );
-}
-#title
-
-my ($patrontable, $flaginfotable) = patrontable($borrower);
-my $amountold=$borrower->{flags}->{'CHARGES'}->{'message'};
-my @temp=split(/\$/,$amountold);
-$amountold=$temp[1];
-$template->param( today=>format_date($todaysdate),
-		findborrower => $findborrower,
-		borrower => $borrower,
-		borrowernumber => $borrowernumber,
-		branch => $branch,
-		printer => $printer,
-		branchname => $branches->{$branch}->{'branchname'},
-		printername => $printers->{$printer}->{'printername'},
-		firstname => $borrower->{'firstname'},
-		surname => $borrower->{'surname'},
-		categorycode => getborrowercategory($borrower->{'categorycode'}),
-		streetaddress => $borrower->{'streetaddress'},
-		emailaddress => $borrower->{'emailaddress'},
-		borrowernotes => $borrower->{'borrowernotes'},
-		city => $borrower->{'city'},
-		phone => $borrower->{'phone'},
-		cardnumber => $borrower->{'cardnumber'},
-		amountold => $amountold,
-		barcode => $barcode,
-		stickyduedate => $stickyduedate,
-		message => $message,
-		CGIselectborrower => $CGIselectborrower,
-		todayissues => \@realtodayissues,
-		previssues => \@realprevissues,
-		
-	);
-# set return date if stickyduedate
-if ($stickyduedate) {
-	my $t_year = "year".$year;
-	my $t_month = "month".$month;
-	my $t_day = "day".$day;
-	$template->param(
-		$t_year => 1,
-		$t_month => 1,
-		$t_day => 1,
-	);
-}
-
-
-if ($branchcookie) {
-    $cookie=[$cookie, $branchcookie, $printercookie];
-}
-
-output_html_with_http_headers $query, $cookie, $template->output;
-
-####################################################################
-# Extra subroutines,,,
-
-sub patrontable {
-    my ($borrower) = @_;
-    my $flags = $borrower->{'flags'};
-    my $flaginfotable='';
-    my $flaginfotext;
-    #my $flaginfotext='';
-    my $flag;
-    my $color='';
-    foreach $flag (sort keys %$flags) {
-#    	my @itemswaiting='';
-	$flags->{$flag}->{'message'}=~s/\n/<br>/g;
-	if ($flags->{$flag}->{'noissues'}) {
-		$template->param(
-			flagged => 1,
-			noissues => 'true',
-			 );
-		if ($flag eq 'GNA'){
-			$template->param(
-				gna => 'true'
-				);
-			}
-		if ($flag eq 'LOST'){
-			$template->param(
-				lost => 'true'
-			);
-			}
-		if ($flag eq 'DBARRED'){
-			$template->param(
-				dbarred => 'true'
-			);
-			}
-		if ($flag eq 'CHARGES') {
-			$template->param(
-				charges => 'true',
-				chargesmsg => $flags->{'CHARGES'}->{'message'}
-				 );
-		}
-	} else {
-		 if ($flag eq 'CHARGES') {
-			$template->param(
-				charges => 'true',
-				flagged => 1,
-				chargesmsg => $flags->{'CHARGES'}->{'message'}
-			 );
-		}
-	    	if ($flag eq 'WAITING') {
-			my $items=$flags->{$flag}->{'itemlist'};
-		        my @itemswaiting;
-			foreach my $item (@$items) {
-			my ($iteminformation) = getiteminformation(\%env, $item->{'itemnumber'}, 0);
-			$iteminformation->{'branchname'} = $branches->{$iteminformation->{'holdingbranch'}}->{'branchname'};
-			push @itemswaiting, $iteminformation;
-			}
-			$template->param(
-				flagged => 1,
-				waiting => 'true',
-				waitingmsg => $flags->{'WAITING'}->{'message'},
-				itemswaiting => \@itemswaiting,
-				 );
-		}
-		if ($flag eq 'ODUES') {
-			$template->param(
-				odues => 'true',
-				flagged => 1,
-				oduesmsg => $flags->{'ODUES'}->{'message'}
-				 );
-
-			my $items=$flags->{$flag}->{'itemlist'};
-			{
-			    my @itemswaiting;
-			foreach my $item (@$items) {
-				my ($iteminformation) = getiteminformation(\%env, $item->{'itemnumber'}, 0);
-				push @itemswaiting, $iteminformation;
-			}
-			}
-			if ($query->param('module') ne 'returns'){
-				$template->param( nonreturns => 'true' );
-			}
-		}
-		if ($flag eq 'NOTES') {
-			$template->param(
-				notes => 'true',
-				flagged => 1,
-				notesmsg => $flags->{'NOTES'}->{'message'}
-				 );
-		}
-	}
-    }
-    return($patrontable, $flaginfotext);
-}
-
-sub cuecatbarcodedecode {
-    my ($barcode) = @_;
-    chomp($barcode);
-    my @fields = split(/\./,$barcode);
-    my @results = map(decode($_), @fields[1..$#fields]);
-    if ($#results == 2){
-  	return $results[2];
-    } else {
-	return $barcode;
-    }
-}
-
-# Local Variables:
-# tab-width: 8
-# End:

Index: circ/currenttransfers.pl
===================================================================
RCS file: circ/currenttransfers.pl
diff -N circ/currenttransfers.pl
--- circ/currenttransfers.pl	21 Jul 2006 10:10:29 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,125 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: currenttransfers.pl,v 1.3 2006/07/21 10:10:29 toins Exp $
-
-# 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 C4::Context;
-use C4::Output;
-use CGI;
-use HTML::Template;
-use C4::Auth;
-use C4::Date;
-use C4::Circulation::Circ2;
-use Date::Manip;
-use C4::Koha;
-use C4::Search;
-use C4::Reserves2;
-
-my $input = new CGI;
-
-my $theme = $input->param('theme'); # only used if allowthemeoverride is set
-my $itemnumber = $input->param('itemnumber');
-# if we have a resturn of the form to delete the transfer, we launch the subrroutine
-if ($itemnumber){
-	C4::Circulation::Circ2::DeleteTransfer($itemnumber);
-}
-
-my ($template, $loggedinuser, $cookie)
-      = get_template_and_user({template_name => "circ/currenttransfers.tmpl",
-	                                 query => $input,
-	                                 type => "intranet",
-	                                 authnotrequired => 0,
-	                                 flagsrequired => {borrowers => 1},
-	                                 debug => 1,
-	                                 });
-
-
-# set the userenv branch
-my $default = C4::Context->userenv->{'branch'};
-
-
-my @datearr = localtime(time());
-my $todaysdate = (1900+$datearr[5]).'-'.sprintf ("%0.2d", ($datearr[4]+1)).'-'.sprintf ("%0.2d", $datearr[3]);
-
-# get the all the branches for reference
-my $branches = GetBranches();
-my @branchesloop;
-foreach my $br (keys %$branches) {
-	my @transferloop;
-	my %branchloop;
-	$branchloop{'branchname'} = $branches->{$br}->{'branchname'};
-	$branchloop{'branchcode'} = $branches->{$br}->{'branchcode'};
-	# # # # # # # # # # # # # # # # # # # # # # 
-	my @gettransfers = GetTransfersFromBib($branches->{$br}->{'branchcode'},$default);
-		if (@gettransfers){
-		foreach my $num (@gettransfers) {
-			my %getransf;
-			my %env;
-			my $calcDate=DateCalc($num->{'datesent'},"+".C4::Context->preference('TransfersMaxDaysWarning')."  days");
-			my $warning=Date_Cmp(ParseDate("today"),$calcDate);
-			if ($warning>0){
-				$getransf{'messcompa'} = 1;
-			}
-			my $gettitle = getiteminformation(\%env,$num->{'itemnumber'});
-			my $itemtypeinfo = getitemtypeinfo($gettitle->{'itemtype'});
-			
-				$getransf{'title'} = $gettitle->{'title'};
-				$getransf{'datetransfer'} = format_date($num->{'datesent'});
-				$getransf{'biblionumber'} = $gettitle->{'biblionumber'};
-				$getransf{'itemnumber'} = $gettitle->{'itemnumber'};
-				$getransf{'barcode'} = $gettitle->{'barcode'};
-				$getransf{'itemtype'} = $itemtypeinfo->{'description'};
-				$getransf{'homebranch'} = $gettitle->{'homebranch'};
-				$getransf{'holdingbranch'} = $gettitle->{'holdingbranch'};
-				$getransf{'itemcallnumber'} = $gettitle->{'itemcallnumber'};
-
-# 				we check if we have a reserv for this transfer
-				my @checkreserv = FastFindReserves($num->{'itemnumber'});
-				if (@checkreserv[0]){
-					my $getborrower = getpatroninformation (\%env,$checkreserv[1]);
-					$getransf{'borrowernum'} = $getborrower->{'borrowernumber'};
-					$getransf{'borrowername'} = $getborrower->{'surname'};
-					$getransf{'borrowerfirstname'} =  $getborrower->{'firstname'};
-						if ($getborrower->{'emailaddress'}){
-							$getransf{'borrowermail'} =  $getborrower->{'emailaddress'} ;
-						}
-					$getransf{'borrowerphone'} = $getborrower->{'phone'};	
-
-				}
-				push(@transferloop, \%getransf);
-			}
-# 		If we have a return of reservloop we put it in the branchloop sequence
-		$branchloop{'reserv'} = \@transferloop ;
-		}		
-	else {
-# 	if we don't have a retrun from reservestobranch we unset branchname and branchcode
-	$branchloop{'branchname'} = 0;
-	$branchloop{'branchcode'} = 0;
-	}
-push(@branchesloop, \%branchloop);
-}
-	$template->param( branchesloop  => \@branchesloop,
-			show_date	=> format_date($todaysdate)	
-			 );
-	
-	print "Content-Type: text/html\n\n", $template->output;
-
-
-

Index: circ/renewscript.pl
===================================================================
RCS file: circ/renewscript.pl
diff -N circ/renewscript.pl
--- circ/renewscript.pl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: renewscript.pl,v 1.2 2006/09/11 17:41:55 tgarip1957 Exp $
-
-#written 18/1/2000 by chris at katipo.co.nz
-#script to renew items from the web
-
-
-# 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 CGI;
-use C4::Circulation::Circ2;
-use C4::Date;
-use C4::Members;
-#get input
-my $input= new CGI;
-
-
-my @names=$input->param();
-my $count=@names;
-my %data;
-my $dbh = C4::Context->dbh;
-for (my $i=0;$i<$count;$i++){
-  if ($names[$i] =~ /renew/){
-    my $temp=$names[$i];
-    $temp=~ s/renew_item_//;
-    $data{$temp}=$input->param($names[$i]);
-  }
-}
-my %env;
-my $barcode;
-my $destination = $input->param("destination");
-my $cardnumber = $input->param("cardnumber");
-my $bornum=$input->param("bornum");
-my $error;
-my $status=0;
-while ( my ($itemno, $value) = each %data) {
-
-   if ($value eq 'y'){
-my $iteminformation = getiteminformation($env, $itemno,0);
-$barcode=$iteminformation->{'barcode'};
-	 $status=renewstatus(\%env,$bornum,$itemno);
-	if ($status==1){
-     renewbook($env,$bornum,$itemno);	
-	}else{
-	last;
-	}   
-}
-}
-
-if($destination eq "circ" || $status>1){
-	print $input->redirect("/cgi-bin/koha/circ/circulation.pl?bornum=$bornum&error=$status&barcode=$barcode");
-} else {
-	print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$bornum");
-}
\ No newline at end of file

Index: circ/rescirculation.pl
===================================================================
RCS file: circ/rescirculation.pl
diff -N circ/rescirculation.pl
--- circ/rescirculation.pl	15 Nov 2006 01:41:51 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,460 +0,0 @@
-#!/usr/bin/perl
-
-# Please use 8-character tabs for this file (indents are every 4 characters)
-
-#written 8/5/2002 by Finlay
-#script to execute issuing of books
-# New functions added 07-08-2005 Tumer Garip tgarip at neu.edu.tr
-
-# 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::Circulation::Circ3;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-use C4::Koha;
-use C4::Date;
-use C4::Context;
-use C4::Members;
-use C4::Print;
-#
-# PARAMETERS READING
-#
-my $query=new CGI;
-
-my ($template, $loggedinuser, $cookie) = get_template_and_user
-    ({
-	template_name	=> 'circ/rescirculation.tmpl',
-	query		=> $query,
-	type		=> "intranet",
-	authnotrequired	=> 0,
-	flagsrequired	=> { circulate => 1 },
-    });
-my $branches = GetBranches();
-my $printers = getprinters();
-my $branch=C4::Context->preference("defaultBranch");
-my $printer = getprinter($query, $printers);
-
-my $findborrower = $query->param('findborrower');
-$findborrower =~ s|,| |g;
-$findborrower =~ s|'| |g;
-my $borrowernumber = $query->param('borrnumber');
-
-my $print=$query->param('print');
-my $barcode = $query->param('barcode');
-my $year=$query->param('year');
-my $month=$query->param('month');
-my $day=$query->param('day');
-my $stickyduedate=$query->param('stickyduedate');
-my $issueconfirmed = $query->param('issueconfirmed');
-my $cancelreserve = $query->param('cancelreserve');
-
-my $renew=0;
- 
-#set up cookie.....
-my $branchcookie;
-my $printercookie;
-#if ($query->param('setcookies')) {
-#	$branchcookie = $query->cookie(-name=>'branch', -value=>"$branch", -expires=>'+1y');
-#	$printercookie = $query->cookie(-name=>'printer', -value=>"$printer", -expires=>'+1y');
-#}
-
-my %env; # FIXME env is used as an "environment" variable. Could be dropped probably...
-
-$env{'branchcode'}=$branch;
-$env{'printer'}=$printer;
-$env{'queue'}=$printer;
-
-my $todaysdate =get_today();
-
-
-# check and see if we should print
- if ($barcode eq ''  && $print eq 'maybe'){
- 	$print = 'yes';
- }
- if ($print eq 'yes' && $borrowernumber ne ''){
- 	printslip(\%env,$borrowernumber);
- 	$query->param('borrnumber','');
- 	$borrowernumber='';
- }
-
-#
-# STEP 2 : FIND BORROWER
-# if there is a list of find borrowers....
-#
-my $borrowerslist;
-my $message;
-if ($findborrower) {
-	my ($count,$borrowers)=BornameSearch(\%env,$findborrower,'cardnumber','web');
-	my @borrowers=@$borrowers;
-	if ($#borrowers == -1) {
-		$query->param('findborrower', '');
-		$message =  "'$findborrower'";
-	} elsif ($#borrowers == 0) {
-		$query->param('borrnumber', $borrowers[0]->{'borrowernumber'});
-		$query->param('barcode','');
-		$borrowernumber=$borrowers[0]->{'borrowernumber'};
-	} else {
-		$borrowerslist = \@borrowers;
-	}
-}
-
-# get the borrower information.....
-my $borrower;
-my $bornum=$query->param('bornum');
-if ($bornum){
-$borrowernumber=$bornum;
-}
-
-if ($borrowernumber) {
-	$borrower = C4::Circulation::Circ2::getpatroninformation(\%env,$borrowernumber,0);
-	my ($od,$issue,$fines,$resfine)=borrdata3(\%env,$borrowernumber);
-if ($resfine >0 || $fines) {
-$template->param(
-			flagged => 1,
-			noissues => 'true',
-			 );
-}
-	$template->param(overduecount => $od,
-							issuecount => $issue,
-							finetotal => $fines,
-							resfine => $resfine);
-my $picture;
- my $htdocs = C4::Context->config('opacdir');
-
-$picture =$htdocs. "/htdocs/uploaded-files/users-photo/".$borrower->{'cardnumber'}.".jpg";
- if (-e $picture)
-{ 
-
-   $template->param(borrowerphoto => "http://library.neu.edu.tr/uploaded-files/users-photo/".$borrower->{'cardnumber'}.".jpg");
- }else{
-$picture = "http://cc.neu.edu.tr/stdpictures/".$borrower->{'cardnumber'}.".jpg";
-  $template->param(borrowerphoto => $picture);
-}
-}
-$renew=$query->param('renew');
-
-#
-# STEP 3 : ISSUING
-#
-#Try to issue
-
-if ($barcode) {
-
-	$barcode = cuecatbarcodedecode($barcode);
-#	my ($datedue, $invalidduedate) = fixdate($year, $month, $day);
-	if ($issueconfirmed) {
-			issuebook(\%env, $borrower, $barcode, $cancelreserve);
-my ($od,$issue,$fines,$resfine)=borrdata3(\%env,$borrowernumber);
-	$template->param(overduecount => $od,
-							issuecount => $issue,
-							finetotal => $fines,
-							resfine => $resfine);
-	} else {
-		my ($error, $question) = canbookbeissued(\%env, $borrower, $barcode, $year, $month, $day);
-		my $noerror=1;
-		my $noquestion = 1;
-		foreach my $impossible (keys %$error) {
-			$template->param($impossible => $$error{$impossible},
-							IMPOSSIBLE => 1);
-			$noerror = 0;
-		}
-		foreach my $needsconfirmation (keys %$question) {
-			$template->param($needsconfirmation => $$question{$needsconfirmation},
-							NEEDSCONFIRMATION => 1);
-			$noquestion = 0;
-		}
-		$template->param(day => $day,
-						month => $month,
-						year => $year);
-		if ($noerror && ($noquestion || $issueconfirmed)) {
-			issuebook(\%env, $borrower, $barcode);
-			my ($od,$issue,$fines,$resfine)=borrdata3(\%env,$borrowernumber);
-				$template->param(overduecount => $od,
-							issuecount => $issue,
-							finetotal => $fines,
-							resfine => $resfine);
-		}
-	}
-	}#barcode
-
-
-
-
-
-##################################################################################
-# BUILD HTML
-
-# make the issued books table.....
-my $todaysissues='';
-my $previssues='';
-my @realtodayissues;
-my @realprevissues;
-my $allowborrow;
-if ($borrower) {
-# get each issue of the borrower & separate them in todayissues & previous issues
-	my @todaysissues;
-	my @previousissues;
-	my $issueslist = getissues($borrower);
-	
-	# split in 2 arrays for today & previous
-	foreach my $it (keys %$issueslist) {
-		my $issuedate = $issueslist->{$it}->{'timestamp'};
-		$issuedate = substr($issuedate, 0, 10);
-#warn "$todaysdate,$issuedate";
-		if ($todaysdate == $issuedate) {
-			push @todaysissues, $issueslist->{$it};
-		} else {
-			push @previousissues, $issueslist->{$it};
-		}
-    }
-
-
-	my $od; # overdues
-	my $togglecolor;
-	# parses today & build Template array
-	foreach my $book (sort {$b->{'timestamp'} <=> $a->{'timestamp'}} @todaysissues){
-		my $dd = $book->{'duetime'};
-		my $overdue = $book->{'overdue'};
-#		$dd=format_date($dd);
-#		$datedue=~s/-//g;
-		if ($overdue) {
-			$od = 1;
-		} else {
-			$od=0;
-		}
-		$book->{'od'}=$od;
-		$book->{'dd'}=$dd;
-		
-		if ($togglecolor) {
-			$togglecolor=0;
-		} else {
-			$togglecolor=1;
-		}
-		$book->{'tcolor'}=$togglecolor;
-		if ($book->{'author'} eq ''){
-			$book->{'author'}=' ';
-		}    
-		push @realtodayissues,$book;
-	}
-
-	# parses previous & build Template array
-    foreach my $book (sort {$a->{'date_due'} cmp $b->{'date_due'}} @previousissues){
-		my $dd = $book->{'duedate'};
-		my $overdue = $book->{'overdue'};
-#		$dd=format_date($dd);
-		my $pcolor = '';
-		my $od = '';
-#		$datedue=~s/-//g;
-		if ($overdue) {
-			$od = 1;
-		} else {
-			$od = 0;
-		}
-		
-		if ($togglecolor) {
-			$togglecolor=0;
-		} else {
-			$togglecolor=1;
-		}
-		$book->{'dd'}=$dd; 
-		$book->{'od'}=$od;
-		$book->{'tcolor'}=$togglecolor;
-		if ($book->{'author'} eq ''){
-			$book->{'author'}=' ';
-		}    
-		push @realprevissues,$book
-	}
-}
-
-
-my @values;
-my %labels;
-my $CGIselectborrower;
-if ($borrowerslist) {
-	foreach (sort {$a->{'surname'}.$a->{'firstname'} cmp $b->{'surname'}.$b->{'firstname'}} @$borrowerslist){
-		push @values,$_->{'borrowernumber'};
-		$labels{$_->{'borrowernumber'}} ="$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'}) ...  $_->{'streetaddress'} ";
-	}
-	$CGIselectborrower=CGI::scrolling_list( -name     => 'borrnumber',
-				-values   => \@values,
-				-labels   => \%labels,
-				-size     => 7,
-				-multiple => 0 );
-}
-#title
-
-my ($patrontable, $flaginfotable) = patrontable($borrower);
-my $amountold=$borrower->{flags}->{'CHARGES'}->{'message'};
-my @temp=split(/\$/,$amountold);
-$amountold=$temp[1];
-$template->param( today=>format_date($todaysdate),
-		findborrower => $findborrower,
-		borrower => $borrower,
-		borrowernumber => $borrowernumber,
-		branch => $branch,
-		printer => $printer,
-		branchname => $branches->{$branch}->{'branchname'},
-		printername => $printers->{$printer}->{'printername'},
-		firstname => $borrower->{'firstname'},
-		surname => $borrower->{'surname'},
-		categorycode => getborrowercategory($borrower->{'categorycode'}),
-		streetaddress => $borrower->{'streetaddress'},
-		emailaddress => $borrower->{'emailaddress'},
-		borrowernotes => $borrower->{'borrowernotes'},
-		city => $borrower->{'city'},
-		phone => $borrower->{'phone'},
-		cardnumber => $borrower->{'cardnumber'},
-		amountold => $amountold,
-		barcode => $barcode,
-		renew=>$renew,
-		stickyduedate => $stickyduedate,
-		message => $message,
-		CGIselectborrower => $CGIselectborrower,
-		todayissues => \@realtodayissues,
-		previssues => \@realprevissues,
-	);
-# set return date if stickyduedate
-if ($stickyduedate) {
-	my $t_year = "year".$year;
-	my $t_month = "month".$month;
-	my $t_day = "day".$day;
-	$template->param(
-		$t_year => 1,
-		$t_month => 1,
-		$t_day => 1,
-	);
-}
-
-
-if ($branchcookie) {
-    $cookie=[$cookie, $branchcookie, $printercookie];
-}
-
-output_html_with_http_headers $query, $cookie, $template->output;
-
-####################################################################
-# Extra subroutines,,,
-
-sub patrontable {
-    my ($borrower) = @_;
-    my $flags = $borrower->{'flags'};
-    my $flaginfotable='';
-    my $flaginfotext;
-    #my $flaginfotext='';
-    my $flag;
-    my $color='';
-    foreach $flag (sort keys %$flags) {
-#    	my @itemswaiting='';
-	$flags->{$flag}->{'message'}=~s/\n/<br>/g;
-	if ($flags->{$flag}->{'noissues'}) {
-		$template->param(
-			flagged => 1,
-			noissues => 'true',
-			 );
-		if ($flag eq 'GNA'){
-			$template->param(
-				gna => 'true'
-				);
-			}
-		if ($flag eq 'LOST'){
-			$template->param(
-				lost => 'true'
-			);
-			}
-		if ($flag eq 'DBARRED'){
-			$template->param(
-				dbarred => 'true'
-			);
-			}
-		if ($flag eq 'CHARGES') {
-			$template->param(
-				charges => 'true',
-				chargesmsg => $flags->{'CHARGES'}->{'message'}
-				 );
-		}
-	} else {
-		 if ($flag eq 'CHARGES') {
-			$template->param(
-				charges => 'true',
-				flagged => 1,
-				chargesmsg => $flags->{'CHARGES'}->{'message'}
-			 );
-		}
-	    	if ($flag eq 'WAITING') {
-			my $items=$flags->{$flag}->{'itemlist'};
-		        my @itemswaiting;
-			foreach my $item (@$items) {
-			my ($iteminformation) = getiteminformation(\%env, $item->{'itemnumber'}, 0);
-			$iteminformation->{'branchname'} = $branches->{$iteminformation->{'holdingbranch'}}->{'branchname'};
-			push @itemswaiting, $iteminformation;
-			}
-			$template->param(
-				flagged => 1,
-				waiting => 'true',
-				waitingmsg => $flags->{'WAITING'}->{'message'},
-				itemswaiting => \@itemswaiting,
-				 );
-		}
-		if ($flag eq 'ODUES') {
-			$template->param(
-				odues => 'true',
-				flagged => 1,
-				oduesmsg => $flags->{'ODUES'}->{'message'}
-				 );
-
-			my $items=$flags->{$flag}->{'itemlist'};
-			{
-			    my @itemswaiting;
-			foreach my $item (@$items) {
-				my ($iteminformation) = getiteminformation(\%env, $item->{'itemnumber'}, 0);
-				push @itemswaiting, $iteminformation;
-			}
-			}
-			if ($query->param('module') ne 'returns'){
-				$template->param( nonreturns => 'true' );
-			}
-		}
-		if ($flag eq 'NOTES') {
-			$template->param(
-				notes => 'true',
-				flagged => 1,
-				notesmsg => $flags->{'NOTES'}->{'message'}
-				 );
-		}
-	}
-    }
-    return($patrontable, $flaginfotext);
-}
-
-sub cuecatbarcodedecode {
-    my ($barcode) = @_;
-    chomp($barcode);
-    my @fields = split(/\./,$barcode);
-    my @results = map(decode($_), @fields[1..$#fields]);
-    if ($#results == 2){
-  	return $results[2];
-    } else {
-	return $barcode;
-    }
-}
-
-# Local Variables:
-# tab-width: 8
-# End:

Index: circ/reserve.pl
===================================================================
RCS file: circ/reserve.pl
diff -N circ/reserve.pl
--- circ/reserve.pl	4 Jul 2006 14:36:51 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,117 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: reserve.pl,v 1.3 2006/07/04 14:36:51 toins Exp $
-
-# 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 C4::Context;
-use C4::Output;
-use CGI;
-use HTML::Template;
-use C4::Auth;
-use C4::Date;
-
-my $input = new CGI;
-my $type=$input->param('type');
-my $order=$input->param('order');
-
-my $theme = $input->param('theme'); # only used if allowthemeoverride is set
-
-my ($template, $loggedinuser, $cookie)
-      = get_template_and_user({template_name => "circ/reserve.tmpl",
-	                                 query => $input,
-	                                 type => "intranet",
-	                                 authnotrequired => 0,
-	                                 flagsrequired => {borrowers => 1},
-	                                 debug => 1,
-	                                 });
-# borrowernumber   	int(11) 
-# 	 reservedate  	date 	
-# 	 biblionumber  	int(11) 
-# 	 constrainttype  	char(1)
-# 	 branchcode  	varchar(4) 
-# 	 notificationdate  	date 	
-# 	 reminderdate  	date 	  	
-# 	 cancellationdate  	date 	
-# 	 reservenotes  	text 	
-# 	 priority  	smallint(6) 
-# 	 found  	char(1) 	
-# 	 timestamp  	timestamp 	  	ON UPDATE CURRENT_TIMESTAMP 	Oui  	CURRENT_TIMESTAMP  	  	Modifier 	Supprimer 	Primaire 	Index 	Unique 	Texte entier
-# 	 itemnumber  	int(11) 	
-my $duedate;
-my $bornum;
-my $itemnum;
-my $data1;
-my $data2;
-my $data3;
-my $name;
-my $phone;
-my $email;
-my $biblionumber;
-my $title;
-my $author;
-my @datearr = localtime(time());
-my $todaysdate = (1900+$datearr[5]).'-'.sprintf ("%0.2d", ($datearr[4]+1)).'-'.sprintf ("%0.2d", $datearr[3]);
-
-my $dbh = C4::Context->dbh;
-my $strsth="select reservedate,reserves.borrowernumber as bornum, concat(firstname,' ',surname) as borrower, borrowers.phone, borrowers.emailaddress,reserves.biblionumber, reserves.branchcode as branch, items.holdingbranch, items.itemcallnumber, items.itemnumber, notes, notificationdate, reminderdate, priority, reserves.found, biblio.title, biblio.author from reserves left join items on items.itemnumber=reserves.itemnumber, borrowers,biblio where isnull(cancellationdate) && reserves.borrowernumber=borrowers.borrowernumber && reserves.biblionumber=biblio.biblionumber order by reservedate, borrower ";
-$strsth="select reservedate,reserves.borrowernumber as bornum,concat(firstname,' ',surname) as borrower, borrowers.phone, borrowers.emailaddress,reserves.biblionumber, reserves.branchcode as branch, items.holdingbranch, items.itemcallnumber, items.itemnumber, notes, notificationdate, reminderdate, priority, reserves.found, biblio.title, biblio.author from reserves left join items on  items.itemnumber=reserves.itemnumber , borrowers,biblio where isnull(cancellationdate) && reserves.borrowernumber=borrowers.borrowernumber && reserves.biblionumber=biblio.biblionumber order by borrower,reservedate " if ($order eq "borrower");
-$strsth="select reservedate,reserves.borrowernumber as bornum,concat(firstname,' ',surname) as borrower, borrowers.phone, borrowers.emailaddress,reserves.biblionumber, reserves.branchcode as branch, items.holdingbranch, items.itemcallnumber, items.itemnumber, notes, notificationdate, reminderdate, priority, reserves.found, biblio.title, biblio.author from reserves left join items on items.itemnumber=reserves.itemnumber, borrowers,biblio where isnull(cancellationdate) && reserves.borrowernumber=borrowers.borrowernumber && reserves.biblionumber=biblio.biblionumber order by biblio.title, priority,reservedate " if ($order eq "biblio");
-my $sth=$dbh->prepare($strsth);
-warn "".$strsth;
-$sth->execute();
-
-my @reservedata;
-while (my $data=$sth->fetchrow_hashref) {
-  push (@reservedata, 
-			{
-				reservedate  => format_date($data->{reservedate}),
-				priority	 => $data->{priority},
-				name         => $data->{borrower},
-				title        => $data->{title},
-				author       => $data->{author},
-				bornum       => $data->{bornum},
-				itemnum      => $data->{itemnumber},
-				phone        => $data->{phone},
-				email        => $data->{email},
-				biblionumber => $data->{biblionumber},
-				statusw		 => ($data->{found} eq "w"),
-				statusf		 => ($data->{found} eq "f"),
-				holdingbranch		 => $data->{holdingbranch},
-				branch		 => $data->{branch},
-				itemcallnumber => $data->{itemcallnumber},
-				notes		 => $data->{notes},
-				notificationdate => $data->{notificationdate},
-				reminderdate => $data->{reminderdate}
-			}
-	
-	);
-
-}
-
-$sth->finish;
-
-$template->param(todaysdate        => format_date($todaysdate),
-		reserveloop       => \@reservedata,
-		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-		);
-
-print "Content-Type: text/html\n\n", $template->output;

Index: circ/resreturns.pl
===================================================================
RCS file: circ/resreturns.pl
diff -N circ/resreturns.pl
--- circ/resreturns.pl	15 Nov 2006 01:41:51 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,478 +0,0 @@
-#!/usr/bin/perl
-# WARNING: This file contains mixed-sized tabs! (some 4-character, some 8)
-# WARNING: Currently, 4-character tabs seem to be dominant
-# WARNING: But there are still lots of 8-character tabs
-
-#written 11/3/2002 by Finlay
-#script to execute returns of books
-
-# 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::Circulation::Circ3;
-use C4::Search;
-use C4::Output;
-use C4::Print;
-use C4::Reserves2;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-
-use C4::Koha;
-use C4::Members;
-my $query = new CGI;
-
-#getting the template
-my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
-    {
-        template_name   => "circ/resreturns.tmpl",
-        query           => $query,
-        type            => "intranet",
-        authnotrequired => 0,
-        flagsrequired   => { circulate => 1 },
-    }
-);
-
-#####################
-#Global vars
-my %env;
-my $headerbackgroundcolor = '#99cc33';
-my $linecolor1            = '#ffffcc';
-my $linecolor2            = 'white';
-
-my $branches = GetBranches();
-my $printers = getprinters( \%env );
-
-# my $branch  = getbranch( $query,  $branches );
-my $printer = getprinter( $query, $printers );
-
-#
-# Some code to handle the error if there is no branch or printer setting.....
-#
-my $branch=C4::Context->preference("defaultBranch");
-$env{'branchcode'} = $branch;
-$env{'printer'}    = $printer;
-$env{'queue'}      = $printer;
-
-# Set up the item stack ....
-my %returneditems;
-my %riduedate;
-my %riborrowernumber;
-my @inputloop;
-foreach ( $query->param ) {
-    (next) unless (/ri-(\d*)/);
-    my %input;
-    my $counter = $1;
-    (next) if ( $counter > 20 );
-    my $barcode        = $query->param("ri-$counter");
-    my $duedate        = $query->param("dd-$counter");
-    my $borrowernumber = $query->param("bn-$counter");
-    $counter++;
-
-    # decode cuecat
-    $barcode = cuecatbarcodedecode($barcode);
-
-    ######################
-    #Are these lines still useful ?
-    $returneditems{$counter}    = $barcode;
-    $riduedate{$counter}        = $duedate;
-    $riborrowernumber{$counter} = $borrowernumber;
-
-    #######################
-    $input{counter} = $counter;
-    $input{barcode} = $barcode;
-    $input{duedate} = $duedate;
-    $input{bornum}  = $borrowernumber;
-    push ( @inputloop, \%input );
-}
-
-############
-# Deal with the requests....
-if ( $query->param('resbarcode') ) {
-    my $item       = $query->param('itemnumber');
-    my $borrnum    = $query->param('borrowernumber');
-    my $resbarcode = $query->param('resbarcode');
-
-    # set to waiting....
-    my $iteminfo = getiteminformation( \%env, $item );
-    my $tobranchcd = ReserveWaiting( $item, $borrnum );
-    my $branchname = $branches->{$tobranchcd}->{'branchname'};
-    my ($borr) = getpatroninformation( \%env, $borrnum, 0 );
-    my $borcnum = $borr->{'cardnumber'};
-    my $name    =
-      $borr->{'surname'} . " " . $borr->{'title'} . " " . $borr->{'firstname'};
-    my $slip = $query->param('resslip');
-    printslip( \%env, $slip ); #removed by paul
-
-    if ( $tobranchcd ne $branch ) {
-        $template->param(
-            itemtitle  => $iteminfo->{'title'},
-            iteminfo   => $iteminfo->{'author'},
-            branchname => $branchname,
-            name       => $name,
-            bornum     => $borrnum,
-            borcnum    => $borcnum,
-            diffbranch => 1
-        );
-    }
-}
-
-my $iteminformation;
-my $borrower;
-my $returned = 0;
-my $messages;
-
-my $barcode = $query->param('barcode');
-
-# actually return book and prepare item table.....
-if ($barcode) {
-
-    # decode cuecat
-    $barcode = cuecatbarcodedecode($barcode);
-    ( $returned, $messages, $iteminformation, $borrower ) =
-      returnbook( $barcode, $branch );
-    if ($returned) {
-        $returneditems{0}    = $barcode;
-        $riborrowernumber{0} = $borrower->{'borrowernumber'};
-        $riduedate{0}        = $iteminformation->{'date_due'};
-        my %input;
-        $input{counter} = 0;
-        $input{first}   = 1;
-        $input{barcode} = $barcode;
-        $input{duedate} = $riduedate{0};
-        $input{bornum}  = $riborrowernumber{0};
-        push ( @inputloop, \%input );
-    }
-    elsif ( !$messages->{'BadBarcode'} ) {
-		if ( $messages->{'NotIssued'} ) {
-		my $dbh = C4::Context->dbh;
-		my $sth=$dbh->prepare("select date_due from issues where itemnumber=? and isnull(returndate)");
-		$sth->execute($iteminformation->{'itemnumber'});
-		my ($date_due) = $sth->fetchrow;
-		
-		$sth->finish;
-			if ($date_due){	
-			print $query->redirect("/cgi-bin/koha/circ/returns.pl?barcode=$barcode");
-			}
-		}
-        my %input;
-        $input{counter} = 0;
-        $input{first}   = 1;
-        $input{barcode} = $barcode;
-        $input{duedate} = 0;
-
-        $returneditems{0} = $barcode;
-        $riduedate{0}     = 0;
-        if ( $messages->{'wthdrawn'} ) {
-            $input{withdrawn} = 1;
-            $input{bornum}    = "Item Cancelled";
-            $riborrowernumber{0} = 'Item Cancelled';
-        }
-        else {
-            $input{bornum} = "&nbsp;";
-            $riborrowernumber{0} = '&nbsp;';
-        }
-        push ( @inputloop, \%input );
-    }
-    $template->param(
-        returned  => $returned,
-        itemtitle => $iteminformation->{'title'},
-
-        #									itembc => $iteminformation->{'barcode'},
-        #									itemdatedue => $iteminformation->{'date_due'},
-        itemauthor => $iteminformation->{'author'}
-    );
-}
-$template->param( inputloop => \@inputloop );
-
-my $found    = 0;
-my $waiting  = 0;
-my $reserved = 0;
-
-if ( $messages->{'ResFound'} ) {
-    my $res        = $messages->{'ResFound'};
-    my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'};
-    my ($borr) = getpatroninformation( \%env, $res->{'borrowernumber'}, 0 );
-    my $name =
-      $borr->{'surname'} . " " . $borr->{'title'} . " " . $borr->{'firstname'};
-    my ($iteminfo) = getiteminformation( \%env, 0, $barcode );
-
-    if ( $res->{'ResFound'} eq "Waiting" ) {
-        $template->param(
-            found         => 1,
-            name          => $name,
-            borfirstname  => $borr->{'firstname'},
-            borsurname    => $borr->{'surname'},
-            bortitle      => $borr->{'title'},
-            borphone      => $borr->{'phone'},
-            borstraddress => $borr->{'streetaddress'},
-            borcity       => $borr->{'city'},
-            borzip        => $borr->{'zipcode'},
-            bornum        => $res->{'borrowernumber'},
-            borcnum       => $borr->{'cardnumber'},
-            branchname  => $branches->{ $res->{'branchcode'} }->{'branchname'},
-            waiting     => 1,
-            itemnumber  => $res->{'itemnumber'},
-            itemtitle   => $iteminfo->{'title'},
-            itemauthor  => $iteminfo->{'author'},
-            itembarcode => $iteminfo->{'barcode'},
-            itemtype    => $iteminfo->{'itemtype'},
-            itembiblionumber => $iteminfo->{'biblionumber'}
-        );
-
-    }
-    if ( $res->{'ResFound'} eq "Reserved" ) {
-        my @da         = localtime( time() );
-        my $todaysdate =
-          sprintf( "%0.2d", ( $da[3] + 1 ) ) . "/"
-          . sprintf( "%0.2d", ( $da[4] + 1 ) ) . "/"
-          . ( $da[5] + 1900 );
-        $template->param(
-            found       => 1,
-            branchname  => $branches->{ $res->{'branchcode'} }->{'branchname'},
-            reserved    => 1,
-            today       => $todaysdate,
-            itemnumber  => $res->{'itemnumber'},
-            itemtitle   => $iteminfo->{'title'},
-            itemauthor  => $iteminfo->{'author'},
-            itembarcode => $iteminfo->{'barcode'},
-            itemtype    => $iteminfo->{'itemtype'},
-            itembiblionumber => $iteminfo->{'biblionumber'},
-            borsurname       => $borr->{'surname'},
-            bortitle         => $borr->{'title'},
-            borfirstname     => $borr->{'firstname'},
-            bornum           => $res->{'borrowernumber'},
-            borcnum          => $borr->{'cardnumber'},
-            borphone         => $borr->{'phone'},
-            borstraddress    => $borr->{'streetaddress'},
-            borsub           => $borr->{'suburb'},
-            borcity          => $borr->{'city'},
-            borzip           => $borr->{'zipcode'},
-            boremail         => $borr->{'emailadress'},
-            barcode          => $barcode
-        );
-    }
-}
-
-# Error Messages
-my @errmsgloop;
-foreach my $code ( keys %$messages ) {
-
-   #     warn $code;
-    my %err;
-    my $exit_required_p = 0;
-    if ( $code eq 'BadBarcode' ) {
-        $err{badbarcode} = 1;
-        $err{msg}        = $messages->{'BadBarcode'};
-    }
-    elsif ( $code eq 'NotIssued' ) {
-        $err{notissued} = 1;
-        $err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
-    }
-    elsif ( $code eq 'WasLost' ) {
-        $err{waslost} = 1;
-    }
-    elsif ( $code eq 'ResFound' ) {
-        ;    # FIXME... anything to do here?
-    }
-    elsif ( $code eq 'WasReturned' ) {
-        ;    # FIXME... anything to do here?
-    }
-    elsif ( $code eq 'WasTransfered' ) {
-        ;    # FIXME... anything to do here?
-    }
-    elsif ( $code eq 'wthdrawn' ) {
-        $err{withdrawn} = 1;
-        $exit_required_p = 1;
-    }
-    elsif ( ( $code eq 'IsPermanent' ) && ( not $messages->{'ResFound'} ) ) {
-        if ( $messages->{'IsPermanent'} ne $branch ) {
-            $err{ispermanent} = 1;
-            $err{msg}         =
-              $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
-        }
-    }
-    else {
-        die "Unknown error code $code";    # XXX
-    }
-    if (%err) {
-        push ( @errmsgloop, \%err );
-    }
-    last if $exit_required_p;
-}
-$template->param( errmsgloop => \@errmsgloop );
-
-# patrontable ....
-if ($borrower) {
-    my $flags = $borrower->{'flags'};
-    my $color = '';
-    my @flagloop;
-    my $flagset;
-    foreach my $flag ( sort keys %$flags ) {
-        my %flaginfo;
-        ( $color eq $linecolor1 ) 
-          ? ( $color = $linecolor2 )
-          : ( $color = $linecolor1 );
-        unless ($flagset) { $flagset = 1; }
-        $flaginfo{color}   = $color;
-        $flaginfo{redfont} = ( $flags->{$flag}->{'noissues'} );
-        $flaginfo{flag}    = $flag;
-        if ( $flag eq 'CHARGES' ) {
-            $flaginfo{msg}     = $flag;
-            $flaginfo{charges} = 1;
-	    $flaginfo{bornum} = $borrower->{borrowernumber};
-        }
-        elsif ( $flag eq 'WAITING' ) {
-            $flaginfo{msg}     = $flag;
-            $flaginfo{waiting} = 1;
-            my @waitingitemloop;
-            my $items = $flags->{$flag}->{'itemlist'};
-            foreach my $item (@$items) {
-                my ($iteminformation) =
-                  getiteminformation( \%env, $item->{'itemnumber'}, 0 );
-                my %waitingitem;
-                $waitingitem{biblionum} = $iteminformation->{'biblionumber'};
-                $waitingitem{barcode}   = $iteminformation->{'barcode'};
-                $waitingitem{title}     = $iteminformation->{'title'};
-                $waitingitem{brname}    =
-                  $branches->{ $iteminformation->{'holdingbranch'} }->{
-                  'branchname'};
-                push ( @waitingitemloop, \%waitingitem );
-            }
-            $flaginfo{itemloop} = \@waitingitemloop;
-        }
-        elsif ( $flag eq 'ODUES' ) {
-            my $items = $flags->{$flag}->{'itemlist'};
-            my @itemloop;
-            foreach my $item ( sort { $a->{'date_due'} cmp $b->{'date_due'} }
-                @$items )
-            {
-                my ($iteminformation) =
-                  getiteminformation( \%env, $item->{'itemnumber'}, 0 );
-                my %overdueitem;
-                $overdueitem{duedate}   = $item->{'date_due'};
-                $overdueitem{biblionum} = $iteminformation->{'biblionumber'};
-                $overdueitem{barcode}   = $iteminformation->{'barcode'};
-                $overdueitem{title}     = $iteminformation->{'title'};
-                $overdueitem{brname}    =
-                  $branches->{ $iteminformation->{'holdingbranch'} }->{
-                  'branchname'};
-                push ( @itemloop, \%overdueitem );
-            }
-            $flaginfo{itemloop} = \@itemloop;
-            $flaginfo{overdue}  = 1;
-        }
-        else {
-            $flaginfo{other} = 1;
-            $flaginfo{msg}   = $flags->{$flag}->{'message'};
-        }
-        push ( @flagloop, \%flaginfo );
-    }
-    $template->param(
-        flagset        => $flagset,
-        flagloop       => \@flagloop,
-        ribornum       => $borrower->{'borrowernumber'},
-        riborcnum      => $borrower->{'cardnumber'},
-        riborsurname   => $borrower->{'surname'},
-        ribortitle     => $borrower->{'title'},
-        riborfirstname => $borrower->{'firstname'}
-    );
-}
-
-my $color = '';
-
-#set up so only the last 8 returned items display (make for faster loading pages)
-my $count = 0;
-my @riloop;
-foreach ( sort { $a <=> $b } keys %returneditems ) {
-    my %ri;
-    if ( $count < 8 ) {
-        ( $color eq $linecolor1 ) 
-          ? ( $color = $linecolor2 )
-          : ( $color = $linecolor1 );
-        $ri{color} = $color;
-        my $barcode = $returneditems{$_};
-        my $duedate = $riduedate{$_};
-        my $overduetext;
-        my $borrowerinfo;
-        if ($duedate) {
-            my @tempdate = split ( /-/, $duedate );
-	    $ri{year}=$tempdate[0];
-	    $ri{month}=$tempdate[1];
-	    $ri{day}=$tempdate[2];
-            my $duedatenz  = "$tempdate[2]/$tempdate[1]/$tempdate[0]";
-            my @datearr    = localtime( time() );
-            my $todaysdate =
-              $datearr[5] . '-'
-              . sprintf( "%0.2d", ( $datearr[4] + 1 ) ) . '-'
-              . sprintf( "%0.2d", $datearr[3] );
-	    $ri{duedate}=$duedate;
-            my ($borrower) =              getpatroninformation( \%env, $riborrowernumber{$_}, 0 );
-            $ri{bornum}       = $borrower->{'borrowernumber'};
-            $ri{borcnum}      = $borrower->{'cardnumber'};
-            $ri{borfirstname} = $borrower->{'firstname'};
-            $ri{borsurname}   = $borrower->{'surname'};
-            $ri{bortitle}     = $borrower->{'title'};
-        }
-        else {
-            $ri{bornum} = $riborrowernumber{$_};
-        }
-#        my %ri;
-        my ($iteminformation) =C4::Circulation::Circ2::getiteminformation( \%env, 0, $barcode );
-        $ri{color}            = $color;
-        $ri{itembiblionumber} = $iteminformation->{'biblionumber'};
-        $ri{itemtitle}        = $iteminformation->{'title'};
-        $ri{itemauthor}       = $iteminformation->{'author'};
-        $ri{itemtype}         = $iteminformation->{'itemtype'};
-        $ri{barcode}          = $barcode;
-    }
-    else {
-        last;
-    }
-    $count++;
-    push ( @riloop, \%ri );
-}
-$template->param( riloop => \@riloop );
-
-$template->param(
-    genbrname  => $branches->{$branch}->{'branchname'},
-    genprname  => $printers->{$printer}->{'printername'},
-    branch     => $branch,
-    printer    => $printer,
-    errmsgloop => \@errmsgloop
-);
-
-# actually print the page!
-output_html_with_http_headers $query, $cookie, $template->output;
-
-sub cuecatbarcodedecode {
-    my ($barcode) = @_;
-    chomp($barcode);
-    my @fields = split ( /\./, $barcode );
-    my @results = map( decode($_), @fields[ 1 .. $#fields ] );
-    if ( $#results == 2 ) {
-        return $results[2];
-    }
-    else {
-        return $barcode;
-    }
-}
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: circ/returns.pl
===================================================================
RCS file: circ/returns.pl
diff -N circ/returns.pl
--- circ/returns.pl	15 Nov 2006 01:41:51 -0000	1.45
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,471 +0,0 @@
-#!/usr/bin/perl
-# WARNING: This file contains mixed-sized tabs! (some 4-character, some 8)
-# WARNING: Currently, 4-character tabs seem to be dominant
-# WARNING: But there are still lots of 8-character tabs
-
-#written 11/3/2002 by Finlay
-#script to execute returns of books
-
-# 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::Circulation::Circ2;
-use C4::Search;
-use C4::Output;
-use C4::Print;
-use C4::Reserves2;
-use C4::Auth;
-use C4::Interface::CGI::Output;
-use C4::Koha;
-use C4::Members;
-use C4::Date;
-my $query = new CGI;
-
-#getting the template
-my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
-    {
-        template_name   => "circ/returns.tmpl",
-        query           => $query,
-        type            => "intranet",
-        authnotrequired => 0,
-        flagsrequired   => { circulate => 1 },
-    }
-);
-
-#####################
-#Global vars
-my %env;
-my $headerbackgroundcolor = '#99cc33';
-my $linecolor1            = '#ffffcc';
-my $linecolor2            = 'white';
-my $todaysdate =get_today();
-my $branches = GetBranches();
-my $printers = getprinters( \%env );
-
-# my $branch  = getbranch( $query,  $branches );
-my $printer = getprinter( $query, $printers );
-
-#
-# Some code to handle the error if there is no branch or printer setting.....
-#
-my $branch=C4::Context->preference("defaultBranch");
-$env{'branchcode'} = $branch;
-$env{'printer'}    = $printer;
-$env{'queue'}      = $printer;
-
-# Set up the item stack ....
-my %returneditems;
-my %riduedate;
-my %riborrowernumber;
-my @inputloop;
-foreach ( $query->param ) {
-    (next) unless (/ri-(\d*)/);
-    my %input;
-    my $counter = $1;
-    (next) if ( $counter > 20 );
-    my $barcode        = $query->param("ri-$counter");
-    my $duedate        = $query->param("dd-$counter");
-    my $borrowernumber = $query->param("bn-$counter");
-    $counter++;
-
-    # decode cuecat
-    $barcode = cuecatbarcodedecode($barcode);
-
-    ######################
-    #Are these lines still useful ?
-    $returneditems{$counter}    = $barcode;
-    $riduedate{$counter}        = $duedate;
-    $riborrowernumber{$counter} = $borrowernumber;
-
-    #######################
-    $input{counter} = $counter;
-    $input{barcode} = $barcode;
-    $input{duedate} = $duedate;
-    $input{bornum}  = $borrowernumber;
-    push ( @inputloop, \%input );
-}
-
-############
-my $item;
-# Deal with the requests....
-if ( $query->param('resbarcode') ) {
-    $item       = $query->param('itemnumber');
-    my $borrnum    = $query->param('borrowernumber');
-    my $resbarcode = $query->param('resbarcode');
-
-    # set to waiting....
-    my $iteminfo = getiteminformation( \%env, $item );
-    my $tobranchcd = ReserveWaiting( $item, $borrnum );
-    my $branchname = $branches->{$tobranchcd}->{'branchname'};
-    my ($borr) = getpatroninformation( \%env, $borrnum, 0 );
-    my $borcnum = $borr->{'cardnumber'};
-    my $name    =
-      $borr->{'surname'} . " " . $borr->{'title'} . " " . $borr->{'firstname'};
-    my $slip = $query->param('resslip');
-    printslip( \%env, $slip ); #removed by paul
-
-    if ( $tobranchcd ne $branch ) {
-        $template->param(
-            itemtitle  => $iteminfo->{'title'},
-            iteminfo   => $iteminfo->{'author'},
-            branchname => $branchname,
-            name       => $name,
-            bornum     => $borrnum,
-            borcnum    => $borcnum,
-            diffbranch => 1
-        );
-    }
-}
-
-my $iteminformation;
-my $borrower;
-my $returned = 0;
-my $messages;
-my $barcode = $query->param('barcode');
-
-# actually return book and prepare item table.....
-if ($barcode) {
-
-    # decode cuecat
-    $barcode = cuecatbarcodedecode($barcode);
-    ( $returned, $messages, $iteminformation, $borrower ) =
-      returnbook( $barcode, $branch );
-    if ($returned) {
-        $returneditems{0}    = $barcode;
-        $riborrowernumber{0} = $borrower->{'borrowernumber'};
-        $riduedate{0}        = $iteminformation->{'date_due'};
-        my %input;
-        $input{counter} = 0;
-        $input{first}   = 1;
-        $input{barcode} = $barcode;
-        $input{duedate} = $riduedate{0};
-        $input{bornum}  = $riborrowernumber{0};
-        push ( @inputloop, \%input );
-    }
-    elsif ( !$messages->{'BadBarcode'} ) {
-		if ( $messages->{'NotIssued'} ) {
-		my $dbh = C4::Context->dbh;
-		my $sth=$dbh->prepare("select duetime from reserveissue where itemnumber=? and isnull(rettime)");
-		$sth->execute($iteminformation->{'itemnumber'});
-		my ($date_due) = $sth->fetchrow;
-		
-		$sth->finish;
-			if ($date_due){
-#				$messages->{'ReserveIssued'} =$barcode;			
-			print $query->redirect("/cgi-bin/koha/circ/resreturns.pl?barcode=$barcode");
-			}
-		}
-        my %input;
-        $input{counter} = 0;
-        $input{first}   = 1;
-        $input{barcode} = $barcode;
-        $input{duedate} = 0;
-
-        $returneditems{0} = $barcode;
-        $riduedate{0}     = 0;
-        if ( $messages->{'wthdrawn'} ) {
-            $input{withdrawn} = 1;
-            $input{bornum}    = "Item Cancelled";
-            $riborrowernumber{0} = 'Item Cancelled';
-        }
-        else {
-            $input{bornum} = "&nbsp;";
-            $riborrowernumber{0} = '&nbsp;';
-        }
-        push ( @inputloop, \%input );
-    }
-    $template->param(
-        returned  => $returned,
-        itemtitle => $iteminformation->{'title'},
-
-        #									itembc => $iteminformation->{'barcode'},
-        #									itemdatedue => $iteminformation->{'datedue'},
-        itemauthor => $iteminformation->{'author'}
-    );
-}
-$template->param( inputloop => \@inputloop );
-
-my $found    = 0;
-my $waiting  = 0;
-my $reserved = 0;
-
-if ( $messages->{'ResFound'} ) {
-    my $res        = $messages->{'ResFound'};
-    my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'};
-    my ($borr) = getpatroninformation( \%env, $res->{'borrowernumber'}, 0 );
-    my $name =
-      $borr->{'surname'} . " " . $borr->{'title'} . " " . $borr->{'firstname'};
-    my ($iteminfo) = getiteminformation( \%env, 0, $barcode );
-
-    if ( $res->{'ResFound'} eq "Waiting" ) {
-        $template->param(
-            found         => 1,
-            name          => $name,
-            borfirstname  => $borr->{'firstname'},
-            borsurname    => $borr->{'surname'},
-            bortitle      => $borr->{'title'},
-            borphone      => $borr->{'phone'},
-            borstraddress => $borr->{'streetaddress'},
-            borcity       => $borr->{'city'},
-            borzip        => $borr->{'zipcode'},
-            bornum        => $res->{'borrowernumber'},
-            borcnum       => $borr->{'cardnumber'},
-            branchname  => $branches->{ $res->{'branchcode'} }->{'branchname'},
-            waiting     => 1,
-            itemnumber  => $res->{'itemnumber'},
-            itemtitle   => $iteminfo->{'title'},
-            itemauthor  => $iteminfo->{'author'},
-            itembarcode => $iteminfo->{'barcode'},
-            itemtype    => $iteminfo->{'itemtype'},
-            itembiblionumber => $iteminfo->{'biblionumber'}
-        );
-
-    }
-    if ( $res->{'ResFound'} eq "Reserved" ) {
-      
-        $template->param(
-            found       => 1,
-            branchname  => $branches->{ $res->{'branchcode'} }->{'branchname'},
-            reserved    => 1,
-            today       =>format_date( $todaysdate),
-            itemnumber  => $res->{'itemnumber'},
-            itemtitle   => $iteminfo->{'title'},
-            itemauthor  => $iteminfo->{'author'},
-            itembarcode => $iteminfo->{'barcode'},
-            itemtype    => $iteminfo->{'itemtype'},
-            itembiblionumber => $iteminfo->{'biblionumber'},
-            borsurname       => $borr->{'surname'},
-            bortitle         => $borr->{'title'},
-            borfirstname     => $borr->{'firstname'},
-            bornum           => $res->{'borrowernumber'},
-            borcnum          => $borr->{'cardnumber'},
-            borphone         => $borr->{'phone'},
-            borstraddress    => $borr->{'streetaddress'},
-            borsub           => $borr->{'suburb'},
-            borcity          => $borr->{'city'},
-            borzip           => $borr->{'zipcode'},
-            boremail         => $borr->{'emailadress'},
-            barcode          => $barcode
-        );
-    }
-}
-
-# Error Messages
-my @errmsgloop;
-foreach my $code ( keys %$messages ) {
-
-    #    warn $code;
-    my %err;
-    my $exit_required_p = 0;
-    if ( $code eq 'BadBarcode' ) {
-        $err{badbarcode} = 1;
-        $err{msg}        = $messages->{'BadBarcode'};
-    }
-    elsif ( $code eq 'NotIssued' ) {
-        $err{notissued} = 1;
-        $err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
-    }
-    elsif ( $code eq 'WasLost' ) {
-        $err{waslost} = 1;
-    }
-    elsif ( $code eq 'ResFound' ) {
-        ;    # FIXME... anything to do here?
-    }
-    elsif ( $code eq 'WasReturned' ) {
-        ;    # FIXME... anything to do here?
-    }
-    elsif ( $code eq 'WasTransfered' ) {
-        ;    # FIXME... anything to do here?
-    }
-	elsif ( $code eq 'ReserveIssued' ) {
-        $err{reserveissued} = 1;
-    }
-    elsif ( $code eq 'wthdrawn' ) {
-        $err{withdrawn} = 1;
-        $exit_required_p = 1;
-    }
-    elsif ( ( $code eq 'IsPermanent' ) && ( not $messages->{'ResFound'} ) ) {
-        if ( $messages->{'IsPermanent'} ne $branch ) {
-            $err{ispermanent} = 1;
-            $err{msg}         =
-              $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
-        }
-    }
-    else {
-        die "Unknown error code $code";    # XXX
-    }
-    if (%err) {
-        push ( @errmsgloop, \%err );
-    }
-    last if $exit_required_p;
-}
-$template->param( errmsgloop => \@errmsgloop );
-
-# patrontable ....
-if ($borrower) {
-    my $flags = $borrower->{'flags'};
-    my $color = '';
-    my @flagloop;
-    my $flagset;
-    foreach my $flag ( sort keys %$flags ) {
-        my %flaginfo;
-        ( $color eq $linecolor1 ) 
-          ? ( $color = $linecolor2 )
-          : ( $color = $linecolor1 );
-        unless ($flagset) { $flagset = 1; }
-        $flaginfo{color}   = $color;
-        $flaginfo{redfont} = ( $flags->{$flag}->{'noissues'} );
-        $flaginfo{flag}    = $flag;
-        if ( $flag eq 'CHARGES' ) {
-            $flaginfo{msg}     = $flag;
-            $flaginfo{charges} = 1;
-	    $flaginfo{bornum} = $borrower->{borrowernumber};
-        }
-        elsif ( $flag eq 'WAITING' ) {
-            $flaginfo{msg}     = $flag;
-            $flaginfo{waiting} = 1;
-            my @waitingitemloop;
-            my $items = $flags->{$flag}->{'itemlist'};
-            foreach my $item (@$items) {
-                my ($iteminformation) =
-                  getiteminformation( \%env, $item->{'itemnumber'}, 0 );
-                my %waitingitem;
-                $waitingitem{biblionum} = $iteminformation->{'biblionumber'};
-                $waitingitem{barcode}   = $iteminformation->{'barcode'};
-                $waitingitem{title}     = $iteminformation->{'title'};
-                $waitingitem{brname}    =
-                  $branches->{ $iteminformation->{'holdingbranch'} }->{
-                  'branchname'};
-                push ( @waitingitemloop, \%waitingitem );
-            }
-            $flaginfo{itemloop} = \@waitingitemloop;
-        }
-        elsif ( $flag eq 'ODUES' ) {
-            my $items = $flags->{$flag}->{'itemlist'};
-            my @itemloop;
-            foreach my $item ( sort { $a->{'date_due'} cmp $b->{'date_due'} }
-                @$items )
-            {
-                my ($iteminformation) =
-                  getiteminformation( \%env, $item->{'itemnumber'}, 0 );
-                my %overdueitem;
-                $overdueitem{duedate}   = $item->{'date_due'};
-                $overdueitem{biblionum} = $iteminformation->{'biblionumber'};
-                $overdueitem{barcode}   = $iteminformation->{'barcode'};
-                $overdueitem{title}     = $iteminformation->{'title'};
-                $overdueitem{brname}    =
-                  $branches->{ $iteminformation->{'holdingbranch'} }->{
-                  'branchname'};
-                push ( @itemloop, \%overdueitem );
-            }
-            $flaginfo{itemloop} = \@itemloop;
-            $flaginfo{overdue}  = 1;
-        }
-        else {
-            $flaginfo{other} = 1;
-            $flaginfo{msg}   = $flags->{$flag}->{'message'};
-        }
-        push ( @flagloop, \%flaginfo );
-    }
-    $template->param(
-        flagset        => $flagset,
-        flagloop       => \@flagloop,
-        ribornum       => $borrower->{'borrowernumber'},
-        riborcnum      => $borrower->{'cardnumber'},
-        riborsurname   => $borrower->{'surname'},
-        ribortitle     => $borrower->{'title'},
-        riborfirstname => $borrower->{'firstname'}
-    );
-}
-
-my $color = '';
-
-#set up so only the last 8 returned items display (make for faster loading pages)
-my $count = 0;
-my @riloop;
-foreach ( sort { $a <=> $b } keys %returneditems ) {
-    my %ri;
-    if ( $count < 8 ) {
-        ( $color eq $linecolor1 ) 
-          ? ( $color = $linecolor2 )
-          : ( $color = $linecolor1 );
-        $ri{color} = $color;
-        my $barcode = $returneditems{$_};
-        my $duedate = $riduedate{$_};
-        my $overduetext;
-        my $borrowerinfo;
-        if ($duedate) {
-           
-           
-	    $ri{duedate}=format_date($duedate);
-            my ($borrower) =
-              getpatroninformation( \%env, $riborrowernumber{$_}, 0 );
-            $ri{bornum}       = $borrower->{'borrowernumber'};
-            $ri{borcnum}      = $borrower->{'cardnumber'};
-            $ri{borfirstname} = $borrower->{'firstname'};
-            $ri{borsurname}   = $borrower->{'surname'};
-            $ri{bortitle}     = $borrower->{'title'};
-        }
-        else {
-            $ri{bornum} = $riborrowernumber{$_};
-        }
-#        my %ri;
-        my ($iteminformation) = getiteminformation( \%env, 0, $barcode );
-        $ri{color}            = $color;
-        $ri{itembiblionumber} = $iteminformation->{'biblionumber'};
-        $ri{itemtitle}        = $iteminformation->{'title'};
-        $ri{itemauthor}       = $iteminformation->{'author'};
-        $ri{itemtype}         = $iteminformation->{'itemtype'};
-        $ri{barcode}          = $barcode;
-    }
-    else {
-        last;
-    }
-    $count++;
-    push ( @riloop, \%ri );
-}
-$template->param( riloop => \@riloop );
-
-$template->param(
-    genbrname  => $branches->{$branch}->{'branchname'},
-    genprname  => $printers->{$printer}->{'printername'},
-    branch     => $branch,
-    printer    => $printer,
-    errmsgloop => \@errmsgloop
-);
-
-# actually print the page!
-output_html_with_http_headers $query, $cookie, $template->output;
-
-sub cuecatbarcodedecode {
-    my ($barcode) = @_;
-    chomp($barcode);
-    my @fields = split ( /\./, $barcode );
-    my @results = map( decode($_), @fields[ 1 .. $#fields ] );
-    if ( $#results == 2 ) {
-        return $results[2];
-    }
-    else {
-        return $barcode;
-    }
-}
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: circ/selectbranchprinter.pl
===================================================================
RCS file: circ/selectbranchprinter.pl
diff -N circ/selectbranchprinter.pl
--- circ/selectbranchprinter.pl	21 Jul 2006 10:10:29 -0000	1.16
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,147 +0,0 @@
-#!/usr/bin/perl
-# WARNING: This file uses 4-character tabs!
-
-
-# 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 qw/:standard/;
-use C4::Circulation::Circ2;
-use C4::Output;
-use C4::Auth;
-use C4::Print;
-use C4::Interface::CGI::Output;
-use HTML::Template;
-use DBI;
-use C4::Koha;
-
-
-# this is a reorganisation of circulationold.pl
-# dividing it up into three scripts......
-# this will be the first one that chooses branch and printer settings....
-
-#general design stuff...
-my $headerbackgroundcolor='#99cc33';
-my $circbackgroundcolor='#ffffcc';
-my $circbackgroundcolor='white';
-my $linecolor1='#ffffcc';
-my $linecolor2='white';
-my $backgroundimage="/images/background-mem.gif";
-
-# try to get the branch and printer settings from the http....
-my %env;
-my $query=new CGI;
-my $branches=GetBranches('IS');
-my $printers=getprinters(\%env);
-my $branch=$query->param('branch');
-my $printer=$query->param('printer');
-
-($branch) || ($branch=$query->cookie('branch'));
-($printer) || ($printer=$query->cookie('printer'));
-
-($branches->{$branch}) || ($branch=(keys %$branches)[0]);
-($printers->{$printer}) || ($printer=(keys %$printers)[0]);
-
-
-# is you force a selection....
-my $oldbranch = $branch;
-my $oldprinter = $printer;
-
-#$branch='';
-#$printer='';
-
-
-$env{'branchcode'}=$branch;
-$env{'printer'}=$printer;
-$env{'queue'}=$printer;
-
-# set up select options....
-my $branchcount=0;
-my $printercount=0;
-my @branchloop;
-foreach my $br (keys %$branches) {
-    next unless $br =~ /\S/;
-    #(next) unless ($branches->{$_}->{'IS'}); # FIXME disabled to fix bug 202
-    $branchcount++;
-	my %branch;
-	$branch{selected}=($br eq $oldbranch);
-	$branch{name}=$branches->{$br}->{'branchname'};
-	$branch{value}=$br;
-    push(@branchloop,\%branch);
-}
-my @printerloop;
-foreach (keys %$printers) {
-    (next) unless ($_);
-    $printercount++;
-	my %printer;
-	$printer{selected}=($_ eq $oldprinter);
-	$printer{name}=$printers->{$_}->{'printername'};
-	$printer{value}=$_;
-    push(@printerloop,\%printer);
-}
-
-# if there is only one....
-my $printername;
-my $branchname;
-
-my $oneprinter=($printercount==1) ;
-my $onebranch=($branchcount==1) ;
-if ($printercount==1) {
-    my ($tmpprinter)=keys %$printers;
-	$printername=$printers->{$tmpprinter}->{printername};
-}
-if ($branchcount==1) {
-    my ($tmpbranch)=keys %$branches;
-	$branchname=$branches->{$tmpbranch}->{branchname};
-}
-
-
-#############################################################################################
-# Start writing page....
-# set header with cookie....
-
-my ($template, $borrowernumber, $cookie)
-    = get_template_and_user({template_name => "circ/selectbranchprinter.tmpl",
-							query => $query,
-                            type => "intranet",
-                            authnotrequired => 0,
-                            flagsrequired => {circulate => 1},
-                         });
-$template->param(headerbackgroundcolor => $headerbackgroundcolor,
-							backgroundimage => $backgroundimage,
-							oneprinter => $oneprinter,
-							onebranch => $onebranch,
-							printername => $printername,
-							branchname => $branchname,
-							printerloop => \@printerloop,
-							branchloop => \@branchloop,
-							intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-		IntranetNav => C4::Context->preference("IntranetNav"),
-							);
-
-my $branchcookie=$query->cookie(-name => 'branch', -value => "$branch", -expires => '+1y');
-my $printercookie=$query->cookie(-name => 'printer', -value => "$printer", -expires => '+1y');
-
-my $cookies=[$cookie,$branchcookie, $printercookie]; 
-output_html_with_http_headers $query, $cookies, $template->output;
-
-
-# Local Variables:
-# tab-width: 4
-# End:

Index: circ/waitingreservestransfers.pl
===================================================================
RCS file: circ/waitingreservestransfers.pl
diff -N circ/waitingreservestransfers.pl
--- circ/waitingreservestransfers.pl	15 Nov 2006 01:41:51 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,127 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: waitingreservestransfers.pl,v 1.5 2006/11/15 01:41:51 tgarip1957 Exp $
-
-# 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 C4::Context;
-use C4::Output;
-use CGI;
-use HTML::Template;
-use C4::Auth;
-use C4::Date;
-use C4::Circulation::Circ2;
-use Date::Manip;
-use C4::Koha;
-use C4::Biblio;
-
-my $input = new CGI;
-
-my $theme = $input->param('theme'); # only used if allowthemeoverride is set
-
-my ($template, $loggedinuser, $cookie)
-      = get_template_and_user({template_name => "circ/waitingreservestransfers.tmpl",
-	                                 query => $input,
-	                                 type => "intranet",
-	                                 authnotrequired => 0,
-	                                 flagsrequired => {borrowers => 1},
-	                                 debug => 1,
-	                                 });
-
-
-# set the userenv branch
-my $default = C4::Context->userenv->{'branch'};
-
-
-my @datearr = localtime(time());
-my $todaysdate = (1900+$datearr[5]).'-'.sprintf ("%0.2d", ($datearr[4]+1)).'-'.sprintf ("%0.2d", $datearr[3]);
-
-my $item=$input->param('itemnumber');
-my $fbr=$input->param('fbr');
-my $tbr=$input->param('tbr');
-# If we have a return of the form dotransfer, we launch the subroutine dotransfer
-if ($item){
-	C4::Circulation::Circ2::dotransfer($item,$fbr,$tbr);
-}
-
-# get the all the branches for reference
-my $branches = GetBranches();
-my @branchesloop;
-foreach my $br (keys %$branches) {
-	my @reservloop;
-	my %branchloop;
-	$branchloop{'branchname'} = $branches->{$br}->{'branchname'};
-	$branchloop{'branchcode'} = $branches->{$br}->{'branchcode'};
-	my @getreserves = GetReservesToBranch($branches->{$br}->{'branchcode'},$default);
-		if (@getreserves){
-		foreach my $num (@getreserves) {
-			my %getreserv;
-			my %env;
-			my $gettitle = getiteminformation(\%env,$num->{'itemnumber'});
-			my $itemtypeinfo = getitemtypeinfo($gettitle->{'itemtype'});
-			if ($gettitle->{'holdingbranch'} eq $default){
-				my $getborrower = getpatroninformation (\%env,$num->{'borrowernumber'});
-				$getreserv{'reservedate'} = format_date($num->{'reservedate'});
-				my $calcDate=DateCalc($num->{'reservedate'},"+".C4::Context->preference('TransfersMaxDaysWarning')."  days");
-				my $warning=Date_Cmp(ParseDate("today"),$calcDate);
-				if ($warning>0){
-					$getreserv{'messcompa'} = 1;
-				}
-				$getreserv{'title'} = $gettitle->{'title'};
-				$getreserv{'biblionumber'} = $gettitle->{'biblionumber'};
-				$getreserv{'itemnumber'} = $gettitle->{'itemnumber'};
-				$getreserv{'barcode'} = $gettitle->{'barcode'};
-				$getreserv{'itemtype'} = $itemtypeinfo->{'description'};
-				$getreserv{'holdingbranch'} = $gettitle->{'holdingbranch'};
-				$getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'};
-				$getreserv{'borrowernum'} = $getborrower->{'borrowernumber'};
-				$getreserv{'borrowername'} = $getborrower->{'surname'};
-				$getreserv{'borrowerfirstname'} =  $getborrower->{'firstname'} ;
-				if ($getborrower->{'emailaddress'}){
-					$getreserv{'borrowermail'} =  $getborrower->{'emailaddress'} ;
-				}
-				$getreserv{'borrowerphone'} = $getborrower->{'phone'};
-				push(@reservloop, \%getreserv);
-			}
-		}
-# 		If we have a return of reservloop we put it in the branchloop sequence
-		if (@reservloop){
-		$branchloop{'reserv'} = \@reservloop ;
-		}
-# 		else, we unset the value of the branchcode .
-		else{
-		$branchloop{'branchcode'} = 0;
-		}
-	}
-	else {
-# 	if we don't have a retrun from reservestobranch we unset branchname and branchcode
-	$branchloop{'branchname'} = 0;
-	$branchloop{'branchcode'} = 0;
-	}
-	push(@branchesloop, \%branchloop);
-}
-
-	$template->param( branchesloop  => \@branchesloop,
-			show_date	=> format_date($todaysdate)	
-			 );
-	
-	print "Content-Type: text/html\n\n", $template->output;
-
-
-

Index: koha-curses/circ.pl
===================================================================
RCS file: koha-curses/circ.pl
diff -N koha-curses/circ.pl
--- koha-curses/circ.pl	22 Sep 2005 15:31:05 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,340 +0,0 @@
-#!/usr/bin/perl -w
-
-# $Id: circ.pl,v 1.6 2005/09/22 15:31:05 tipaul Exp $
-
-# Copyright 2005 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 lib '/usr/local/koha/intranet/modules';
-use Curses::UI;
-use C4::Circulation::Circ2;
-use C4::Members;
-use C4::Print;
-use C4::Context;
-
-my $cui = new Curses::UI( -color_support => 1 );
-
-my @menu = (
-    {
-        -label   => 'File',
-        -submenu => [
-            { -label => 'Issues   ^I', -value => \&issues },
-            { -label => 'Returns  ^R', -value => \&returns },
-            { -label => 'Exit     ^Q', -value => \&exit_dialog }
-        ]
-    },
-    {
-        -label   => 'Parameters',
-        -submenu => [
-            { -label => 'Branch',  -value => \&changebranch },
-            { -label => 'Printer', -value => \&changeprinter }
-        ]
-    },
-);
-
-my $menu = $cui->add(
-    'menu', 'Menubar',
-    -menu => \@menu,
-    -fg   => "blue",
-);
-
-my $win1 = $cui->add(
-    'win1', 'Window',
-    -border => 1,
-    -y      => 1,
-    -bfg    => 'red',
-    -width  => 40,
-);
-
-my $win2 = $cui->add(
-    'win2', 'Window',
-    -border => 1,
-    -y      => 1,
-    -x      => 40,
-    -height => 10,
-    -bfg    => 'red',
-);
-
-my $win3 = $cui->add(
-    'win3', 'Window',
-    -border => 1,
-    -y      => 11,
-    -x      => 40,
-    -height => 10,
-    -bfg    => 'red',
-);
-
-my $texteditor = $win1->add( "text", "TextEditor",
-    -text =>
-      "This is the first cut of a \ncirculations system using Curses::UI\n"
-      . "Use the menus (or the keyboard\nshortcuts) to choose issues or \nreturns"
-);
-
-$cui->set_binding( sub { $menu->focus() }, "\cX" );
-$cui->set_binding( \&exit_dialog, "\cQ" );
-$cui->set_binding( \&issues,      "\cI" );
-$cui->set_binding( \&returns,     "\cR" );
-
-$texteditor->focus();
-$cui->mainloop();
-
-my %env;
-
-sub exit_dialog() {
-    my $return = $cui->dialog(
-        -message => "Do you really want to quit?",
-        -title   => "Are you sure???",
-        -buttons => [ 'yes', 'no' ],
-
-    );
-
-    exit(0) if $return;
-}
-
-sub returns {
-    my $barcode = $cui->question(
-        -title    => 'Returns',
-        -question => 'Barcode'
-    );
-    my $branch = 'MAIN';
-
-    if ($barcode) {
-        my ( $returned, $messages, $iteminformation, $borrower ) =
-          returnbook( $barcode, $branch );
-        if ( $borrower && $borrower->{'borrowernumber'} ) {
-            $borrower =
-              getpatroninformation( \%env, $borrower->{'borrowernumber'}, 0 );
-            $win1->delete('borrowerdata');
-            my $borrowerdata = $win1->add(
-                'borrowerdata', 'TextViewer',
-                -text => "Cardnumber: $borrower->{'cardnumber'}\n"
-                  . "Name: $borrower->{'title'} $borrower->{'firstname'} $borrower->{'surname'}\n"
-
-            );
-
-            $borrowerdata->focus();
-        }
-        else {
-            $cui->error( -message => 'That item isnt on loan' );
-        }
-    }
-}
-
-sub issues {
-
-    # this routine does the actual issuing
-
-    my $borrowernumber;
-    my $borrowerlist;
-
-   # the librarian can overide system issue date, need to fetch values from them
-    my $year;
-    my $month;
-    my $day;
-
-    $win1->delete('text');
-
-    # get a cardnumber or a name
-    my $cardnumber = $cui->question(
-        -title    => 'Issues',
-        -question => 'Cardnumber'
-    );
-
-    # search for that borrower
-    my ( $count, $borrowers ) =
-      BornameSearch( \%env, $cardnumber, 'cardnumber', 'web' );
-    my @borrowers = @$borrowers;
-    if ( $#borrowers == -1 ) {
-        $cui->error( -message =>
-              'No borrowers match that name or cardnumber please try again.' );
-    }
-    elsif ( $#borrowers == 0 ) {
-        $borrowernumber = $borrowers[0]->{'borrowernumber'};
-    }
-    else {
-        $borrowerlist = \@borrowers;
-    }
-
-    if ($borrowernumber) {
-
-        # if we have one single borrower, we can start issuing
-        doissues( $borrowernumber, \%env, $year, $month, $day );
-    }
-    elsif ($borrowerlist) {
-
-        # choose from a list then start issuing
-        my @borrowernumbers;
-        my %borrowernames;
-        foreach my $bor (@$borrowerlist) {
-            push @borrowernumbers, $bor->{'borrowernumber'};
-            $borrowernames{ $bor->{'borrowernumber'} } =
-              "$bor->{'cardnumber'} $bor->{'firstname'} $bor->{surname}";
-        }
-        $win1->delete('mypopupbox');
-        my $popupbox = $win1->add(
-            'mypopupbox', 'Popupmenu',
-            -values   => [@borrowernumbers],
-            -labels   => \%borrowernames,
-            -onchange => \&dolistissues,
-        );
-
-        $popupbox->focus();
-    }
-    else {
-    }
-}
-
-sub dolistissues {
-    my $list           = shift;
-    my $borrowernumber = $list->get();
-    doissues($borrowernumber);
-}
-
-sub doissues {
-    my ( $borrowernumber, $env, $year, $month, $day ) = @_;
-    my $datedue;
-
-    my $borrower = getpatroninformation( $env, $borrowernumber, 0 );
-    $win1->delete('borrowerdata');
-    my $borrowerdata = $win1->add( 'borrowerdata', 'TextViewer',
-        -text => "Cardnumber: $borrower->{'cardnumber'}\n"
-          . "Name: $borrower->{'title'} $borrower->{'firstname'} $borrower->{'surname'}"
-    );
-
-    $borrowerdata->focus();
-
-    $win3->delete('pastissues');
-    my $issueslist = getissues($borrower);
-    my $oldissues;
-    foreach my $it ( keys %$issueslist ) {
-        $oldissues .=
-          $issueslist->{$it}->{'barcode'}
-          . " $issueslist->{$it}->{'title'} $issueslist->{$it}->{'date_due'}\n";
-
-    }
-
-    my $pastissues =
-      $win3->add( 'pastissues', 'TextViewer', -text => $oldissues, );
-    $pastissues->focus();
-
-    $win2->delete('currentissues');
-    my $currentissues =
-      $win2->add( 'currentissues', 'TextViewer',
-        -text => "Todays issues go here", );
-    $currentissues->focus();
-
-    # go into a loop issuing until a blank barcode is given
-    while ( my $barcode = $cui->question( -question => 'Barcode' ) ) {
-        my $issues;
-        my $issueconfirmed;
-        my ( $error, $question ) =
-          canbookbeissued( $env, $borrower, $barcode, $year, $month, $day );
-        my $noerror    = 1;
-        my $noquestion = 1;
-        foreach my $impossible ( keys %$error ) {
-            $cui->error( -message => $impossible );
-            $noerror = 0;
-        }
-        if ($noerror) {
-
-            # no point asking confirmation questions if we cant issue
-            foreach my $needsconfirmation ( keys %$question ) {
-                $noquestion     = 0;
-                $issueconfirmed = $cui->dialog(
-                    -message =>
-"$needsconfirmation $question->{$needsconfirmation} Issue anyway?",
-                    -title   => "Confirmation",
-                    -buttons => [ 'yes', 'no' ],
-
-                );
-
-            }
-        }
-        if ( $noerror && ( $noquestion || $issueconfirmed ) ) {
-            issuebook( $env, $borrower, $barcode, $datedue );
-            $issues .= "$barcode";
-            $win2->delete('currentissues');
-            $currentissues =
-              $win2->add( 'currentissues', 'TextViewer', -text => $issues, );
-
-        }
-
-    }
-
-    # finished issuing
-    my $printconfirm = $cui->dialog(
-        -message => "Print a slip for this borrower?",
-        -title   => "Print Slip",
-        -buttons => [ 'yes', 'no' ],
-
-    );
-    if ($printconfirm) {
-        printslip( $env, $borrowernumber );
-    }
-}
-
-sub changebranch {
-    my $dbh = C4::Context->dbh();
-    my $sth = $dbh->prepare('SELECT * FROM branches');
-    $sth->execute();
-    my @branches;
-    while ( my $data = $sth->fetchrow_hashref() ) {
-        push @branches, $data->{'branchcode'};
-    }
-    $sth->finish;
-    $win1->delete('text');
-    $win1->delete('mypopupbox');
-    my $popupbox = $win1->add(
-        'mypopupbox', 'Popupmenu',
-        -values   => [@branches],
-        -onchange => \&setbranch,
-    );
-    $popupbox->focus();
-}
-
-sub changeprinter {
-    my $dbh = C4::Context->dbh();
-    my $sth = $dbh->prepare('SELECT * FROM printers');
-    $sth->execute();
-    my @printers;
-    while ( my $data = $sth->fetchrow_hashref() ) {
-        push @printers, $data->{'printqueue'};
-    }
-    $sth->finish;
-    $win1->delete('text');
-    $win1->delete('mypopupbox');
-    my $popupbox = $win1->add(
-        'mypopupbox', 'Popupmenu',
-        -values   => [@printers],
-        -onchange => \&setprinter,
-    );
-    $popupbox->focus();
-
-}
-
-sub setbranch {
-    my $list   = shift;
-    my $branch = $list->get();
-    $env{'branch'} = $branch;
-}
-
-sub setprinter {
-    my $list    = shift;
-    my $printer = $list->get();
-    $env{'printer'} = $printer;
-}

Index: koha-tmpl/errors/400.pl
===================================================================
RCS file: koha-tmpl/errors/400.pl
diff -N koha-tmpl/errors/400.pl
--- koha-tmpl/errors/400.pl	13 Jan 2005 18:35:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use HTML::Template;
-
-my $query = new CGI;
-my $admin = C4::Context->preference('KohaAdminEmailAddress');
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "errors/400.tmpl",
-				query => $query,
-				type => "intranet",
-				authnotrequired => 0,
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-$template->param( admin => $admin);
-output_html_with_http_headers $query, $cookie, $template->output;

Index: koha-tmpl/errors/401.pl
===================================================================
RCS file: koha-tmpl/errors/401.pl
diff -N koha-tmpl/errors/401.pl
--- koha-tmpl/errors/401.pl	13 Jan 2005 18:35:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use HTML::Template;
-
-my $query = new CGI;
-my $admin = C4::Context->preference('KohaAdminEmailAddress');
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "errors/401.tmpl",
-				query => $query,
-				type => "intranet",
-				authnotrequired => 0,
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-$template->param( admin => $admin);				
-output_html_with_http_headers $query, $cookie, $template->output;

Index: koha-tmpl/errors/402.pl
===================================================================
RCS file: koha-tmpl/errors/402.pl
diff -N koha-tmpl/errors/402.pl
--- koha-tmpl/errors/402.pl	13 Jan 2005 18:35:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use HTML::Template;
-
-my $query = new CGI;
-my $admin = C4::Context->preference('KohaAdminEmailAddress');
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "errors/402.tmpl",
-				query => $query,
-				type => "intranet",
-				authnotrequired => 0,
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-$template->param( admin => $admin);				
-output_html_with_http_headers $query, $cookie, $template->output;

Index: koha-tmpl/errors/403.pl
===================================================================
RCS file: koha-tmpl/errors/403.pl
diff -N koha-tmpl/errors/403.pl
--- koha-tmpl/errors/403.pl	13 Jan 2005 18:35:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use HTML::Template;
-
-my $query = new CGI;
-my $admin = C4::Context->preference('KohaAdminEmailAddress');
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "errors/403.tmpl",
-				query => $query,
-				type => "intranet",
-				authnotrequired => 0,
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-$template->param( admin => $admin);				
-output_html_with_http_headers $query, $cookie, $template->output;

Index: koha-tmpl/errors/404.pl
===================================================================
RCS file: koha-tmpl/errors/404.pl
diff -N koha-tmpl/errors/404.pl
--- koha-tmpl/errors/404.pl	13 Jan 2005 18:35:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use HTML::Template;
-
-my $query = new CGI;
-my $admin = C4::Context->preference('KohaAdminEmailAddress');
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "errors/404.tmpl",
-				query => $query,
-				type => "intranet",
-				authnotrequired => 0,
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-$template->param( admin => $admin);				
-output_html_with_http_headers $query, $cookie, $template->output;

Index: koha-tmpl/errors/500.pl
===================================================================
RCS file: koha-tmpl/errors/500.pl
diff -N koha-tmpl/errors/500.pl
--- koha-tmpl/errors/500.pl	13 Jan 2005 18:35:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use HTML::Template;
-
-my $query = new CGI;
-my $admin = C4::Context->preference('KohaAdminEmailAddress');
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "errors/500.tmpl",
-				query => $query,
-				type => "intranet",
-				authnotrequired => 0,
-				flagsrequired => {catalogue => 1},
-				debug => 1,
-				});
-$template->param( admin => $admin);
-output_html_with_http_headers $query, $cookie, $template->output;

Index: koha-tmpl/favicon.ico
===================================================================
RCS file: koha-tmpl/favicon.ico
diff -N koha-tmpl/favicon.ico
Binary files /tmp/cvsMCKwCC and /dev/null differ

Index: koha-tmpl/index.html
===================================================================
RCS file: koha-tmpl/index.html
diff -N koha-tmpl/index.html
--- koha-tmpl/index.html	18 Mar 2003 14:17:56 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,6 +0,0 @@
-<html>
-<body>
-<a href="intranet.html">Intranet</a>
-<a href="opac.html">OPAC</a>
-</body>
-</html>
\ No newline at end of file

Index: koha-tmpl/intranet.html
===================================================================
RCS file: koha-tmpl/intranet.html
diff -N koha-tmpl/intranet.html
--- koha-tmpl/intranet.html	9 Apr 2003 08:40:28 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0; url=/cgi-bin/koha/mainpage.pl">
-</head>
-<body bgcolor=white>
-<table border=0 width=100% height=100%>
-<tr><td align=center valign=center>
-WELCOME TO KOHA
-</td></tr>
-</table>
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/default/en/about.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/about.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/about.tmpl
--- koha-tmpl/intranet-tmpl/default/en/about.tmpl	4 May 2005 08:58:30 -0000	1.14
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,82 +0,0 @@
-<!-- TMPL_INCLUDE NAME="about-top.inc" -->
-
-<div id="mainbloc">
-	<!-- TMPL_VAR NAME="about" -->
-	<h1>Data about the current version of Koha for bug reports (or general interest).</h1>
-	<div id="bloc25">
-		<h2>Server information</h2>
-		<p><label class="label100">Koha version</label><!-- TMPL_VAR ESCAPE=HTML name="kohaVersion" --></p>
-		<p><label class="label100">OS version ('uname -a')</label><!-- TMPL_VAR ESCAPE=HTML name="osVersion" --></p>
-		<p><label class="label100">Perl version</label><!-- TMPL_VAR ESCAPE=HTML name="perlVersion" --></p>
-		<p><label class="label100">MySQL version</label><!-- TMPL_VAR ESCAPE=HTML name="mysqlVersion" --></p>
-		<p><label class="label100">Apache version</label><!-- TMPL_VAR ESCAPE=HTML name="apacheVersion" --></p>
-	</div>
-	<div id="bloc25">
-		<h2>Special thanks to the following libraries</h2>
-		<p><b>Horowhenua Library Trust</b>, New Zealand, and Rosalie Blake, Head of Libraries, (Koha 1.0)</p>
-		<p>The <b>Nelsonville Public Library</b>, USA, Ohio (MARC support funding)</p>
-		<p><b>EMN (Ecole des Mines de Nantes)</b>, France (Suggestion, stats modules and improved ldap support funding)</p>
-		<p><b>ENSMP (Ecole Nationale Supérieure des Mines de Paris)</b>, France (biblio frameworks, MARC authorities, OPAC basket, Serials support funding)</p>
-	</div>
-	<div id="bloc25">
-		<h2>Core team for 2.2</h2>
-		<p><b>Rachel Hamilton-Williams</b>, Kaitiaki</p>
-		<p><b>Paul Poulain</b>, 2.2 release manager (MARC developer)</p>
-		<p>Stephen Hedges, Owen Leonard, Joshua Ferraro (<b>Nelsonville Public Library</b>)</p>
-		<p><b>Katipo Communications</b> (Koha 1.0 developers)</p>
-		<ul>
-			<p>Rachel Hamilton-Williams, General Manager (Webmistress)</p>
-			<p>Chris Cormack, 1.2 release manager</p>
-			<p>and Simon Blake, Amanda Atkins, Operations Manager, Olwen Williams, Finlay Thompson,</p>
-			<p>Gynn Lomax, Richard Anderson, Jeremy Blake, Rebecca Holden, Olive T. Canine</p>
-		</ul>
-		<p>Emiliano Marmonti, Matías Veleda & Sebastian Catañeda <b>La Plata University, Argentina</b> (barcode printing)</p>
-		<p>MJ Ray and <b>Turo Technology LLP</b>, (quality control, installer &amp; updater, 2.0 release maintainer)</p>
-		<p>Nicholas Rosasco, (Documentation Compiler)</p>
-		<p>Mike Hansen</p>
-		<p><b>Pate Eyler</b> (Kaitiaki from 2002 to 2004)</p>
-	</div>
-	<div id="bloc25">
-	<h2>Thanks to</h2>
-					<p>Adam Thick</p>
-					<p>Andrew Hooper</p>
-					<p>Al Banks</p>
-					<p>Ambrose Li (translation tool)</p>
-					<p>Andrew Arensburger (the small &amp; great C4::Context module)</p>
-					<p>Benedykt P. Barszcz (Polish for 2.0)</p>
-					<p>Brig C. McCoy</p>
-					<p>Daniel Holth</p>
-					<p>David Strainchamps</p>
-					<p>Dorian Meid (German translation)</p>
-					<p>doXulting (Matthieu Branlat) OPAC basket</p>
-					<p>Ed Summers (Some code and Perl packages like MARC::Record)</p>
-					<p>Esiee School (Jérome Vizcaino, Michel Lerenard, Pierre Cauchois)</p>
-					<p>Florian Bischof</p>
-					<p>Francisco M. Marzoa Alonso</p>
-					<p>Glen Stewart</p>
-					<p>Henri-Damien Laurent</p>
-					<p>Jo Ransom</p>
-					<p>Kip DeGraaf</p>
-					<p>Marco Gaiarin</p>
-					<p>Md. Aftabuddin</p>
-					<p>Michaes Herman</p>
-					<p>Mike Johnson</p>
-					<p>Mike Mylonas</p>
-					<p>Nicolas Morin (French Translation in 2.0)</p>
-					<p>Pawel Skuza (Polish for 1.2)</p>
-					<p>Regula Sebastiao</p>
-					<p>Roger Buck</p>
-					<p>Ron Wickersham</p>
-					<p>Sebastiaan Durand</p>
-					<p>Steve Tonnesen (early MARC work, Virtual Bookshelves concept, KohaCD)</p>
-					<p>Universidad ORT Uruguay (Ernesto Silva, Andres Tarallo)</p>
-	</div>
-	<div id="bloc25">
-	<h2>Translation</h2>
-		<p><label>French</label>Pascale Nalon (ENSMP) and Jean Yves Lemaire (Chatel Saint Germain)</p>
-		<p><label>Chinese</label>Ambrose Li</p>
-		<p><label>Spanish</label>Andres Tarallo</p>
-		<p><label>Italian</label>Giuseppe Angilella</p>
-	</div>
-</div>
-<!-- TMPL_INCLUDE NAME="about-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/auth.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/auth.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/auth.tmpl
--- koha-tmpl/intranet-tmpl/default/en/auth.tmpl	19 Jul 2004 21:41:29 -0000	1.8
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,49 +0,0 @@
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-
-<!-- TMPL_IF NAME="nopermission" -->
-<!-- This is what is displayed if user doesn't have permission -->
-<h2>Sorry, Koha doesn't think you have permission for this page.</h2>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="timed_out" -->
-<!-- This is what is displayed if login has timed out -->
-<h2>Sorry, your session has timed out.  Please login again.</h2>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="different_ip" -->
-<!-- This is what is displayed if user's IP has changed -->
-<h2>You are accessing Koha from a different ip address! Please login again.</h2>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="invalid_username_or_password" -->
-<!-- This is what is displayed if the username or password doesn't work -->
-<h2>You entered an incorrect username or password.  Please try again.</h2>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF NAME="loginprompt" -->
-<!-- login prompt time-->
-
-
-<form action="<!-- TMPL_VAR NAME="url" -->" method="post">
-<!-- TMPL_LOOP NAME="INPUTS" -->
-  <input type="hidden" name="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="value" -->">
-<!-- /TMPL_LOOP -->
-<table border="0" cellpadding="10" cellspacing="0" width="60%" align="center">
-    <tr><td align="center" valign="top">
-
-    <table border="0" bgcolor="#dddddd" cellpadding="10" cellspacing="0">
-    <tr><th colspan="2"><font size="+2">Koha Login</font></th></tr>
-    <tr><td>Card number:</td><td><input name="userid"></td></tr>
-    <tr><td>Password:</td><td><input type="password" name="password"></td></tr>
-    <tr><td colspan="2" align="center"><input type="submit" value="login"></td></tr>
-    </table>
-    </td><td align="center" valign="top">
-
-
-    </td></tr>
-</table>
-</form>
-
-
-<!-- /TMPL_IF -->

Index: koha-tmpl/intranet-tmpl/default/en/bookcount.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/bookcount.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/bookcount.tmpl
--- koha-tmpl/intranet-tmpl/default/en/bookcount.tmpl	19 Jul 2004 21:41:29 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,36 +0,0 @@
-<!-- TMPL_INCLUDE Name="reports-top.inc" -->
-<h1><a href="/cgi-bin/koha/detail.pl?bib=<!-- TMPL_VAR NAME="bib" -->&amp;type=intra"> <!-- TMPL_VAR NAME="title" --> (<!-- TMPL_VAR NAME="author" -->)</a></h1><p>&nbsp;</p>
-
-<table  cellspacing="0"  cellpadding="5" border="1" width="440">
-	<tr valign="top">
-		<td  bgcolor="#99cc33" background="/images/background-mem.gif">
-			<b>BARCODE <!-- TMPL_VAR NAME="barcode" --></b>
-		</td>
-	</tr>
-	<tr valign="top">
-		<td width="440">
-
-		<b>Home Branch: </b> <!-- TMPL_VAR NAME="homebranch" --> <br>
-		<b>Current Branch: </b> <!-- TMPL_VAR NAME="holdingbranch" --><br>
-		<b>Date arrived at current branch: </b> <!-- TMPL_VAR NAME="lastdate" --> <br>
-		<b>Number of issues since the above date:</b> <!-- TMPL_VAR NAME="count" --> <br>
-
-		<table cellspacing="0" cellpadding="5" border="1" width="440">
-			<tr>
-				<th>Branch</th>
-				<th>No. of Issues</th>
-				<th>Last seen at branch</th>
-			</tr>
-			<!-- TMPL_LOOP Name="branchloop" -->
-				<tr>
-					<td> <b> <!-- TMPL_VAR NAME="branchname" --> </b></td>
-					<td> <b> <!-- TMPL_VAR NAME="issues" --> </b></td>
-					<td> <b> <!-- TMPL_VAR NAME="seen" --> </b></td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-		</td>
-	</tr>
-</table>
-
-<!-- TMPL_INCLUDE Name="reports-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/boraccount.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/boraccount.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/boraccount.tmpl
--- koha-tmpl/intranet-tmpl/default/en/boraccount.tmpl	20 Jun 2005 14:21:39 -0000	1.11
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,39 +0,0 @@
-<!-- TMPL_INCLUDE NAME="members-top.inc" -->
-<div id="mainbloc">
-	<!-- The manual invoice and credit buttons -->
-	
-	<h1>Account for <a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a></h1><P>
-	<a class="button" href="/cgi-bin/koha/maninvoice.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->">Create Manual Invoice</a>
-	&nbsp;
-	<a class="button" href="/cgi-bin/koha/mancredit.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->">Create Manual Credit</a>
-	<!-- The table with the account items -->
-	
-	<table>
-	
-	<tr>
-		<th>FINES &amp; CHARGES</th>
-		<th>AMOUNT</th>
-		<th>STILL OWING</th>
-	</tr>
-	
-	<!-- TMPL_LOOP NAME="accounts" -->
-	
-		<tr>
-		<td><!-- TMPL_VAR NAME="date" --> <!-- TMPL_VAR NAME="description" --><!-- TMPL_IF NAME="printtitle" --> <!-- TMPL_VAR NAME="title" --><!-- /TMPL_IF --></td>
-		<td><!-- TMPL_VAR NAME="amount" --></td>
-		<td><!-- TMPL_VAR NAME="amountoutstanding" --></td>
-		</tr>
-	
-	<!-- /TMPL_LOOP -->
-	
-	<tr>
-		<th>Total Due</th>
-		<th colspan="2"><!-- TMPL_VAR NAME="total" --></th>
-	</tr>
-	
-	</table>
-	
-	<!-- endmenu (member) -->
-</div>
-<!-- TMPL_INCLUDE NAME="members-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/default/en/charges.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/charges.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/charges.tmpl
--- koha-tmpl/intranet-tmpl/default/en/charges.tmpl	19 Jul 2004 21:41:29 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-<html>
-
-<!-- TMPL_VAR NAME="startmenuissue" -->
-
-<p>
-Each box needs to be filled in with fine,time to start charging,charging cycle<br>
-eg 1,7,7 = $1 fine, after 7 days, every 7 days.<p>
-
-<table>
-  <tr bgcolor="white">
-    <!-- TMPL_LOOP NAME="firstrowloop" -->
-      <td><!-- TMPL_VAR NAME="description" --></td>
-    <!-- /TMPL_LOOP -->
-  </tr>
-  <form action="/cgi-bin/koha/updatecharges.pl" method="post">
-  <!-- TMPL_LOOP NAME="tablebodyloop" -->
-    <tr bgcolor="whitw">
-      <td><!-- TMPL_VAR NAME="description" --></td>
-      <!-- TMPL_LOOP NAME="rowloop" -->
-        <td><input type="text" name="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="value" -->" size="6"></td>
-      <!-- /TMPL_LOOP -->
-    </tr>
-  <!-- /TMPL_LOOP -->
-</table>
-
-<input type="submit">
-</form>
-
-<!-- TMPL_VAR NAME="endmenuissue" -->
-
-</body>
-</html>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/acqui/acqui-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/acqui-home.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/acqui-home.tmpl
--- koha-tmpl/intranet-tmpl/default/en/acqui/acqui-home.tmpl	20 Jun 2005 14:13:12 -0000	1.15
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,90 +0,0 @@
-<!-- TMPL_INCLUDE name="acquisitions-top.inc" -->
-<div id="mainbloc">
-
-<h1 class="acquisition">Acquisitions</h1>
-<div id="bloc25">
-	<h2 class="acquisition">Start, receive, modify order</h2>
-	<!-- TMPL_IF name="nobudget" -->
-		<p class="problem">You must define a budget in parameters</p>
-	<!-- TMPL_ELSE -->
-		<form action="/cgi-bin/koha/acqui/order.pl" method="post">
-			Supplier name : <input type="text"  size="25"   name="supplier">
-			<input type="submit" class="button acquisition" value="OK">
-		</form>
-	<p>or <a href="histsearch.pl" class="button acquisition">Search order history</a></p>
-	<!-- /TMPL_IF -->
-</div>
-
-<!-- currencies-->
-<div id="bloc25">
-	<form action="/cgi-bin/koha/currency.pl">
-	<input type="hidden" name="type" value="change">
-	<h2 class="acquisition">exchange rates</h2>
-	<!-- TMPL_LOOP NAME="loop_currency" -->
-		<p>
-			<label><!-- TMPL_VAR NAME="currency" --></label>
-			<input type="text"  size="10"  name="<!-- TMPL_VAR NAME="currency" -->" value=<!-- TMPL_VAR NAME="rate" -->>
-		</p>
-	<!-- /TMPL_LOOP -->
-	<input type="submit" value="Save" class="button acquisition">
-</div>
-
-<!-- suggestions -->
-<div id="bloc25">
-	<h2 class="acquisition">Suggestions to check</h2>
-		<!-- TMPL_IF name="suggestion" -->
-			<!--TMPL_VAR NAME="suggestion" --> suggestions waiting <a href="/cgi-bin/koha/suggestion/acceptorreject.pl" class="button acquisition">Manage</a>
-		<!-- TMPL_ELSE -->
-			No suggestions waiting
-		<!-- /TMPL_IF -->
-</div>
-
-<!-- showbudget-->
-<div id="bloc25">
-	<h2 class="acquisition">budgets and bookfunds</h2>
-	<!-- TMPL_IF name="nobudget" -->
-		<p class="problem">You must define a budget in parameters</p>
-	<!-- TMPL_ELSE -->
-		<table class="noborder">
-			<tr>
-				<th class="acquisition">Budgets</th>
-				<th class="acquisition">Total</th>
-				<th class="acquisition">Spent</th>
-				<th class="acquisition">Comtd</th>
-				<th class="acquisition">Avail</th>
-			</tr>
-			<!-- TMPL_LOOP NAME="loop_budget" -->
-				<tr>
-					<td><!-- TMPL_VAR NAME="bookfundname" --></td>
-					<td align="right"><!-- TMPL_VAR NAME="budgetamount" --></td>
-					<td align="right"><!-- TMPL_VAR NAME="spent" --></td>
-					<td align="right"><!-- TMPL_VAR NAME="comtd" --></td>
-					<td align="right"><!-- TMPL_VAR NAME="avail" --></td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-			<tr>
-				<th class="acquisition" align="right">Total</th>
-				<th class="acquisition" align="right"><!-- TMPL_VAR NAME="total" --></th>
-				<th class="acquisition" align="right"><!-- TMPL_VAR NAME="totspent" --></th>
-				<th class="acquisition" align="right"><!-- TMPL_VAR NAME="totcomtd" --></th>
-				<th class="acquisition" align="right"><!-- TMPL_VAR NAME="totavail" --></th>
-			</tr>
-		</table>
-		<p>
-		Use your reload button to get the most recent figures. Committed figures are approximate only, as exchange rates will affect the amount actually paid.
-		</p>
-	<!-- /TMPL_IF -->
-</div>
-
-<div id="bloc25">
-	<h2 class="acquisition">HELP Ordering</h2>
-	<ul>
-		<p>To start an acquisition, whether an order, local purchase or donation first search on the supplier, Add a new one if needed.</p>
-		<p>Then select a previous shopping basket or create a new one. Note the basket will be attached to the user you've logged to </p>
-		<p>To order an item you need to establish whether a biblio already exists for it, and either add an item, or set up a new biblio then add the item.</p>
-		<p>To close off a shopping basket click on "view shopping baskets" or search above, and then click on "confirm basket".</p>
-	</ul>
-</div>
-
-</div>
-<!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/acquire.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/acquire.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/acquire.tmpl
--- koha-tmpl/intranet-tmpl/default/en/acqui/acquire.tmpl	2 Dec 2004 16:40:12 -0000	1.15
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,123 +0,0 @@
-<!-- TMPL_INCLUDE name="acquisitions-top.inc" -->
-
-<div id="mainbloc">
-<h1 class="acquisition">Receipt Summary for: <i><!-- TMPL_VAR NAME="name" --></i> Invoice <i><!-- TMPL_VAR NAME="invoice" --></i></h1>
-
-	<!-- TMPL_IF name="count" -->
-		<form action="/cgi-bin/koha/acqui/finishreceive.pl" method="post">
-		<h1 class="acquisition"><!-- TMPL_VAR NAME="ordernumber" --> - Receive Order</h1>
-		Shopping Basket For: <!-- TMPL_VAR NAME="name" -->
-		<br> Order placed: <!-- TMPL_VAR NAME="date" -->
-		<div id="bloc25">
-				<h2 class="acquisition">catalogue details</h2>
-			<p>
-				<label class="label100">Title </label>
-				<!-- TMPL_VAR NAME="title" -->
-			</p>
-			<p>
-				<label class="label100">Author</label>
-				<!-- TMPL_VAR NAME="author" -->
-			</p>
-			<p>
-				<label class="label100">Copyright Date</label>
-				<!-- TMPL_VAR NAME="copyrightdate" -->
-			</p>
-			<p>
-				<label class="label100">Format</label>
-				<!-- TMPL_VAR NAME="itemtype" -->
-			</p>
-			<p>
-				<label class="label100">ISBN</label>
-				<!-- TMPL_VAR NAME="isbn" -->
-			</p>
-			<p>
-				<label class="label100">Series</label>
-				<!-- TMPL_VAR NAME="seriestitle" -->
-			</p>
-			<p>Enter barcode(s) and branch if you want to add item(s) immediatly</p>
-			<p>
-				<label class="label100">Branch</label>
-				<!-- TMPL_VAR NAME="CGIbranch" -->
-			</p>
-			<p>
-				<label class="label100">Item Barcode *</label>
-				<input type=text size=20 name=barcode value="<!-- TMPL_VAR name="barcode" -->">
-			</p>
-		</div>
-		<div id="bloc25">
-			<h2 class="acquisition">Accounting details</h2>
-			<p>
-				<label class="label100">Bookfund</label>
-				<!-- TMPL_VAR NAME="bookfund" -->
-			</p>
-			<p>
-				<label class="label100">Quantity Ordered</label>
-				<!-- TMPL_VAR NAME="quantity" -->
-				<input type="hidden" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->">
-			</p>
-			<p>
-				<label class="label100">Quantity Received *</label>
-				<input type="text" size="20" name="quantityrec" value="<!-- TMPL_VAR NAME="quantityreceived" -->">
-			</p>
-			<p>
-				<label class="label100">Replacement Cost</label>
-				<input type="text" size="20" name="rrp" value="<!-- TMPL_VAR NAME="rrp" -->">
-			</p>
-			<p>
-				<label class="label100">Budgeted Cost </label>
-				<!-- TMPL_VAR NAME="ecost" -->
-			</p>
-			<p>
-				<label class="label100">Actual Cost *</label>
-				<input type="text" size="20" name="cost" value="<!-- TMPL_IF name="unitprice"--><!-- TMPL_VAR NAME="unitprice" --><!-- TMPL_ELSE --><!-- TMPL_VAR name="rrp" --><!-- /TMPL_IF -->">
-			</p>
-			<p>
-				<label class="label100">Invoice Number</label>
-					<!-- TMPL_VAR NAME="invoice" -->
-					<input type="hidden" name="invoice" value="<!-- TMPL_VAR NAME="invoice" -->">
-			</p>
-			<p>
-				<label class="label100">Notes</label>
-				<!-- TMPL_VAR NAME="notes" -->
-			</p>
-			<p>
-				<input type="hidden" name="biblio" value="<!-- TMPL_VAR NAME="biblionumber" -->">
-				<input type="hidden" name="ordnum" value="<!-- TMPL_VAR NAME="ordernumber" -->">
-				<input type="hidden" name="biblioitemnum" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->">
-				<input type="hidden" name="supplierid" value="<!-- TMPL_VAR NAME="supplierid" -->">
-				<input type="hidden" name="freight" value="<!-- TMPL_VAR NAME="freight" -->">
-				<input type="hidden" name="gst" value="<!-- TMPL_VAR NAME="gst" -->">
-				<!-- TMPL_IF name="catview" -->
-					<input type="submit" class="button acquisition" value="save"> (that all costs are for 1 item)
-				<!-- TMPL_ELSE -->
-					<a class="button acquisition" href="/cgi-bin/koha/acqui/newbiblio.pl?ordnum=<!-- TMPL_VAR NAME="ordernumber" -->&amp;booksellerid=<!-- TMPL_VAR NAME="supplierid" -->">
-						Edit
-					</a>
-				<!-- /TMPL_IF -->
-			</p>
-		</div>
-		</form>
-	<!-- TMPL_ELSE -->
-		<table>
-		<tr>
-			<th class="acquisition">Basket</th>
-			<th class="acquisition">ISBN</th>
-			<th class="acquisition">TITLE</th>
-			<th class="acquisition">AUTHOR</th>
-			<th class="acquisition">Qty</th>
-			<th class="acquisition">Received</th>
-		</tr>
-		<!-- TMPL_LOOP NAME="loop" -->
-			<tr>
-				<td><!-- TMPL_VAR NAME="basketno" --></td>
-				<td><!-- TMPL_VAR NAME="isbn" --></td>
-				<td><a href="acquire.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&amp;biblio=<!-- TMPL_VAR NAME="biblionumber" -->&amp;invoice=<!-- TMPL_VAR NAME="invoice" -->&amp;freight=<!-- TMPL_VAR NAME="freight" -->&amp;gst=<!-- TMPL_VAR NAME="gst" -->&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="title" --></a></td>
-				<td><!-- TMPL_VAR NAME="author" --></td>
-				<td><!-- TMPL_VAR NAME="quantity" --></td>
-				<td><!-- TMPL_VAR NAME="quantityrecieved" --></td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		</table>
-	<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl
--- koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl	5 Sep 2006 21:30:58 -0000	1.25
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,151 +0,0 @@
-<!-- TMPL_INCLUDE name="acquisitions-top.inc" -->
-
-<div id="mainbloc">
-	<h1 class="acquisition"><!-- TMPL_UNLESS name="basketno" -->New <!-- /TMPL_UNLESS -->shopping Basket <b><!-- TMPL_VAR NAME="basketno" --> </b>for <a href="supplier.pl?supplierid=<!-- TMPL_VAR NAME="booksellerid" -->"><!-- TMPL_VAR NAME="name" --></a></h1><br />
-	<!-- TMPL_UNLESS name="closedate" -->
-		<div id="bloc25">
-			<h2 class="acquisition">Basket info</h2>
-			<p><label class="label100">Basket number<label> <!-- TMPL_VAR NAME="basketno" --></p>
-			<p><label class="label100">Managed by<label><!-- TMPL_VAR NAME="authorisedbyname" --></p>
-			<p><label class="label100">open on<label> <!-- TMPL_VAR NAME="creationdate" --></p>
-			<p><label class="label100">for<label> <!-- TMPL_VAR NAME="booksellerid" --></p>
-			<p><label class="label100">Invoice number </label><!-- TMPL_VAR NAME="booksellerinvoicenumber" --></p>
-			<!-- TMPL_IF name="closedate" -->
-				Closed on <!-- TMPL_VAR name="closedate" -->
-			<!-- TMPL_ELSE -->
-				<a href="/cgi-bin/koha/acqui/order.pl?op=close&amp;basket=<!-- TMPL_VAR NAME="basketno" -->&supplier=<!-- TMPL_VAR name="booksellerid" -->" class="button acquisition">Close</a>
-			<!-- /TMPL_IF -->
-		</div>
-	<!-- /TMPL_UNLESS -->
-	<div id="bloc25" style="align:right">
-		<p><!-- TMPL_VAR name="name" --></p>
-		<p><!-- TMPL_VAR name="address1" --></p>
-		<p><!-- TMPL_VAR name="address2" --></p>
-		<p><!-- TMPL_VAR name="address3" --></p>
-		<p><!-- TMPL_VAR name="address4" --></p>
-	</div>
-	<div id="bloc100">
-	<h2 class="acquisition">Order</h2>
-	<!-- TMPL_IF name="books_loop" -->
-		<table>
-			<tr valign="top" bgcolor="#ffdf61">
-				<th class="acquisition doNotPrint">Order</th>
-				<th class="acquisition">Publisher<a href="basket.pl?basket=<!-- TMPL_VAR name="basketno" -->&order=biblioitems.publishercode" class="acquisition">[order]</a></th>
-				<th class="acquisition">Title</th>
-				<th class="acquisition doNotPrint">rrp</th>
-				<th class="acquisition">est</th>
-				<th class="acquisition">Qty</th>
-				<th class="acquisition">Total</th>
-				<th class="acquisition doNotPrint">Fund <a href="basket.pl?basket=<!-- TMPL_VAR name="basketno" -->&order=aqorderbreakdown.bookfundid,biblioitems.publishercode">[order]</a></th>
-				<!-- TMPL_IF name="active" -->
-				<th class="acquisition doNotPrint">Remove</th>
-				<th class="acquisition doNotPrint">Edit</th>
-				<!-- /TMPL_IF -->
-			</tr>
-			<!-- TMPL_LOOP NAME="books_loop" -->
-				<!-- TMPL_IF name="odd" -->
-				<tr class="hilighted">
-				<!-- TMPL_ELSE -->
-				<tr>
-				<!-- /TMPL_IF -->
-					<td class="doNotPrint"><!-- TMPL_VAR NAME="ordernumber" --></td>
-					<td><!-- TMPL_VAR NAME="publishercode" --></td>
-					<!-- TMPL_IF name="closedate" -->
-						<td>
-							<b><!-- TMPL_VAR NAME="title" --></b><br/>
-								<!-- TMPL_VAR NAME="author" -->
-								<!-- TMPL_IF name="isbn"-->- <!-- TMPL_VAR name="isbn" --><!-- /TMPL_IF -->
-								<!-- TMPL_IF name="notes" --><p class="doNotPrint"><i><!--TMPL_VAR name="notes" --></i></p><!-- /TMPL_IF -->
-						</td>
-					<!-- TMPL_ELSE -->
-						<td>
-							<a href="newbiblio.pl?ordnum=<!-- TMPL_VAR NAME="ordernumber" -->&booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="title" --></a><br/>
-								<!-- TMPL_VAR NAME="author" -->
-								<!-- TMPL_IF name="isbn"-->- <!-- TMPL_VAR name="isbn" --><!-- /TMPL_IF -->
-								<!-- TMPL_IF name="notes" --></p><p class="doNotPrint"><i><!--TMPL_VAR name="notes" --></i><!-- /TMPL_IF -->
-						</td>
-					<!-- /TMPL_IF -->
-					<td class="doNotPrint number"><p><!-- TMPL_VAR NAME="rrp" --></p></td>
-					<td class="number"><p><!-- TMPL_VAR NAME="ecost" --></p></td>
-					<td class="number"><p><!-- TMPL_VAR NAME="quantity" --></p></td>
-					<td class="number"><p><!-- TMPL_VAR NAME="line_total" --></p></td>
-					<td class="doNotPrint"><p><!-- TMPL_VAR NAME="bookfundid" --></p></td>
-					<!-- TMPL_IF name="active" -->
-						<td class="doNotPrint">
-							<a href="addorder.pl?ordnum=<!-- TMPL_VAR NAME="ordernumber" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->&quantity=0&biblio=<!-- TMPL_VAR NAME="biblionumber" -->">
-								<img src="/intranet-tmpl/default/images/edittrash.png" alt="Remove from basket" title="Remove from basket" width="32" hspace="0" vspace="0" border="0">
-							</a>
-						</td>
-						<td class="doNotPrint">
-							<a href="newbiblio.pl?sub=&booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->&biblio=<!-- TMPL_VAR NAME="biblionumber" -->&ordnum=<!-- TMPL_VAR NAME="ordernumber" --><!--TMPL_IF name="closedate"-->&close=1<!--/TMPL_IF -->">
-								<img src="/intranet-tmpl/default/images/fileopen.png" alt="Edit" title="Remove from basket" width="32" hspace="0" vspace="0" border="0">
-							</a>
-						</td>
-					<!-- /TMPL_IF -->
-				</tr>
-			<!-- /TMPL_LOOP -->
-			<input type="hidden" name="number" value=<!-- TMPL_VAR NAME="count" -->>
-			<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->">
-			<tr>
-				<td colspan="2" class="acquisition">
-					&nbsp;
-				</td>
-				<td class="acquisition number">
-					<p>Sub total</p>
-					<p>GST</p>
-					<p>TOTAL (<!-- TMPL_VAR NAME="currency" -->)</p>
-				</td>
-				<td class="acquisition number">
-					<p><!-- TMPL_VAR NAME="sub_total_est" --></p>
-					<p><!-- TMPL_VAR NAME="gist_est" --></p>
-					<p><!-- TMPL_VAR NAME="grand_total_est" --></p>
-				</td>
-				<td class="acquisition">
-					<p>&nbsp;</p>
-					<p>&nbsp;</p>
-					<p>&nbsp;</p>
-				</td>
-				<td class="acquisition number">
-					<p><!-- TMPL_VAR name="qty_total" --></p>
-					<p>&nbsp;</p>
-					<p>&nbsp;</p>
-				</td>
-				<td class="acquisition number">
-					<p><!-- TMPL_VAR NAME="sub_total" --></p>
-					<p><!-- TMPL_VAR NAME="gist" --></p>
-					<p><!-- TMPL_VAR NAME="grand_total" --></p>
-				</td>
-				<td class="acquisition">
-					<p>&nbsp;</p>
-					<p>&nbsp;</p>
-					<p>&nbsp;</p>
-				</td>
-			</tr>
-		</table>
-	<!-- TMPL_ELSE -->
-		<p>Basket empty</p>
-	<!-- /TMPL_IF -->
-	</div>
-	<!-- TMPL_IF name="active" -->
-		<!-- TMPL_UNLESS name="closedate" -->
-		<div id="bloc25">
-			<h2 class="acquisition">Add order line</h2>
-			<form action="/cgi-bin/koha/acqui/newbasket2.pl" method="post">
-				<input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->">
-				<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->">
-				<input type="hidden" name="acq_search" value="1">
-				<p>from an existing biblio: </b><input type="text"  size="25"   name="search"><input type="submit" class="button acquisition" value="Search"></p>
-				<p>or
-					<a href="/cgi-bin/koha/acqui/suggestion-select.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">
-						from a suggestion
-					</a>
-					<a href="/cgi-bin/koha/acqui/newbiblio.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">
-						New biblio
-					</a>
-				</p>
-			</form>
-		</div>
-		<!-- /TMPL_UNLESS -->
-	<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/histsearch.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/histsearch.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/histsearch.tmpl
--- koha-tmpl/intranet-tmpl/default/en/acqui/histsearch.tmpl	6 Jan 2006 16:39:39 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,252 +0,0 @@
-<!-- TMPL_INCLUDE NAME="acquisitions-top.inc" -->
-<div id="mainbloc">
-	<h1 class="acquisition">Order search</h1>
-	<p class="resultcount"><!-- TMPL_VAR Name ="numresults" --> orders were found.
-	 </p>
-	<table>
-		<tr>
-			<th class="acquisition">&nbsp;</th>
-			<th class="acquisition">Supplier</th>
-			<th class="acquisition">Title/Author</th>
-			<th class="acquisition">Placed on</th>
-			<th class="acquisition">Recieved on</th>
-			<th class="acquisition">Quantity ordered</th>
-			<th class="acquisition">Quantity received</th>
-			<th class="acquisition">Unit cost</th>
-			<th class="acquisition">&nbsp;</th>
-		</tr>
-		<tr>
-			<form action="/cgi-bin/koha/acqui/histsearch.pl" method="get">
-				<th class="acquisition">
-					Filter on
-				</th>
-				<th class="acquisition">
-					<input type="text" name="name" value="<!-- TMPL_VAR name="name" -->">
-				</th>
-				<th class="acquisition">
-					<input type="text" name="title" value="<!-- TMPL_VAR name="title"-->">/
-					<input type="text" name="author" value="<!-- TMPL_VAR name="author" -->">
-				</th>
-				<th class="acquisition">
-					From <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFrom" style="cursor: pointer;" valign="top">
-					<input type="text" readonly="readonly" size="10" id="from" name="fromplacedon" value="<!-- TMPL_VAR name="from_placed_on" -->">
-					<script language="JavaScript" type="text/javascript">
-						function validate1(date) {
-							var day = date.getDate();
-							var month = date.getMonth() + 1;
-							var year = date.getFullYear();
-							var weekDay = date.getDay();
-							var dayMonth = month + '-' + day;
-							var dateString = year + '-' + month + '-' + day;
-							var dateTo = document.getElementById('to').value.split("-");
-							var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-							if (date > limitDate) {
-								return true;
-							} else {
-								return false;
-							}
-						}
-						Calendar.setup(
-							{
-								inputField : "from",
-								ifFormat : "%Y-%m-%d",
-								button : "openCalendarFrom",
-								disableFunc : validate1,
-								dateStatusFunc : validate1
-							}
-						);
-					</script>
-					<br/>
-					To <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-					<input readonly="readonly" size="10" id="to" name="toplacedon" value="<!-- TMPL_VAR name="to_placed_on" -->" type="text">
-					<script type="text/javascript">
-						function validate2(date) {
-							var day = date.getDate();
-							var month = date.getMonth() + 1;
-							var year = date.getFullYear();
-							var weekDay = date.getDay();
-							var dayMonth = month + '-' + day;
-							var dateString = year + '-' + month + '-' + day;
-							var dateFrom = document.getElementById('from').value.split("-");
-							var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-							if (limitDate > date) {
-								return true;
-							} else {
-								return false;
-							}
-						}
-
-						Calendar.setup(
-							{
-								inputField : "to",
-								ifFormat : "%Y-%m-%d",
-								button : "openCalendarTo",
-								disableFunc : validate2,
-								dateStatusFunc : validate2
-							}
-						);
-					</script>
-				</th>
-				<th class="acquisition">
-					From <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFrom" style="cursor: pointer;" valign="top">
-					<input type="text" readonly="readonly" size="10" id="from" name="fromplacedon" value="<!-- TMPL_VAR name="from_placed_on" -->">
-					<script language="JavaScript" type="text/javascript">
-						function validate1(date) {
-							var day = date.getDate();
-							var month = date.getMonth() + 1;
-							var year = date.getFullYear();
-							var weekDay = date.getDay();
-							var dayMonth = month + '-' + day;
-							var dateString = year + '-' + month + '-' + day;
-							var dateTo = document.getElementById('to').value.split("-");
-							var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-							if (date > limitDate) {
-								return true;
-							} else {
-								return false;
-							}
-						}
-						Calendar.setup(
-							{
-								inputField : "from",
-								ifFormat : "%Y-%m-%d",
-								button : "openCalendarFrom",
-								disableFunc : validate1,
-								dateStatusFunc : validate1
-							}
-						);
-					</script>
-					To <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-					<input readonly="readonly" size="10" id="to" name="toplacedon" value="<!-- TMPL_VAR name="to_placed_on" -->" type="text">
-					<script type="text/javascript">
-						function validate2(date) {
-							var day = date.getDate();
-							var month = date.getMonth() + 1;
-							var year = date.getFullYear();
-							var weekDay = date.getDay();
-							var dayMonth = month + '-' + day;
-							var dateString = year + '-' + month + '-' + day;
-							var dateFrom = document.getElementById('from').value.split("-");
-							var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-							if (limitDate > date) {
-								return true;
-							} else {
-								return false;
-							}
-						}
-
-						Calendar.setup(
-							{
-								inputField : "to",
-								ifFormat : "%Y-%m-%d",
-								button : "openCalendarTo",
-								disableFunc : validate2,
-								dateStatusFunc : validate2
-							}
-						);
-					</script>
-				</th>
-				<th class="acquisition">
-					&nbsp;
-				</th>
-				<th class="acquisition">
-					&nbsp;
-				</th>
-				<th class="acquisition">
-					&nbsp;
-				</th>
-				<th class="acquisition">
-					&nbsp;
-				</th>
-				<th class="acquisition">
-					&nbsp;
-				</th>
-				<th class="acquisition">
-					<input type="submit" class="button acquisition" value="Set Filter">
-				</th>
-			</form>
-		</tr>
-		<!-- TMPL_LOOP NAME="suggestions_loop" -->
-			<tr>
-				<!-- TMPL_IF name="toggle" -->
-					<td class="hilighted">
-				<!-- TMPL_ELSE -->
-					<td>
-				<!-- /TMPL_IF -->
-					<!-- TMPL_VAR NAME="count" -->
-				</td>
-				<!-- TMPL_IF name="toggle" -->
-					<td class="hilighted">
-				<!-- TMPL_ELSE -->
-					<td>
-				<!-- /TMPL_IF -->
-					<!-- TMPL_VAR NAME="name" -->
-				</td>
-				<!-- TMPL_IF name="toggle" -->
-					<td class="hilighted">
-				<!-- TMPL_ELSE -->
-					<td>
-				<!-- /TMPL_IF -->
-					<p><a href="basket.pl?basket=<!-- TMPL_VAR name="basketno" -->"><!-- TMPL_VAR NAME="title" --></a></p>
-					<p><!-- TMPL_VAR NAME="author" --></p>
-				</td>
-				<!-- TMPL_IF name="toggle" -->
-					<td class="hilighted">
-				<!-- TMPL_ELSE -->
-					<td>
-				<!-- /TMPL_IF -->
-					<!-- TMPL_VAR name="creationdate" -->
-				</td>
-				<!-- TMPL_IF name="toggle" -->
-					<td class="hilighted">
-				<!-- TMPL_ELSE -->
-					<td>
-				<!-- /TMPL_IF -->
-					<!-- TMPL_VAR name="datereceived" -->
-				</td>
-				<!-- TMPL_IF name="toggle" -->
-					<td class="hilighted number">
-				<!-- TMPL_ELSE -->
-					<td class="number">
-				<!-- /TMPL_IF -->
-					<!-- TMPL_VAR name="quantity" -->
-				</td>
-				<!-- TMPL_IF name="toggle" -->
-					<td class="hilighted number">
-				<!-- TMPL_ELSE -->
-					<td class="number">
-				<!-- /TMPL_IF -->
-					<!-- TMPL_VAR name="quantityreceived" -->
-				</td>
-				<!-- TMPL_IF name="toggle" -->
-					<td class="hilighted number">
-				<!-- TMPL_ELSE -->
-					<td class="number">
-				<!-- /TMPL_IF -->
-					<!-- TMPL_VAR name="ecost" -->
-				</td>
-				<!-- TMPL_IF name="toggle" -->
-					<td class="hilighted">
-				<!-- TMPL_ELSE -->
-					<td>
-				<!-- /TMPL_IF -->
-					&nbsp;
-				</td>
-
-			</tr>
-		<!-- /TMPL_LOOP -->
-		<tr>
-			<th class="acquisition">&nbsp;</th>
-			<th class="acquisition">&nbsp;</th>
-			<th class="acquisition">&nbsp;</th>
-			<th class="acquisition">&nbsp;</th>
-			<th class="acquisition">&nbsp;</th>
-			<th class="acquisition"><!-- TMPL_VAR name="total_qty" --></th>
-			<th class="acquisition"><!-- TMPL_VAR name="total_qtyreceived" --></th>
-			<th class="acquisition"><!-- TMPL_VAR name="total_price" --></th>
-			<th class="acquisition">&nbsp;</th>
-		</tr>
-	</table>
-</div>
-
-<!-- TMPL_INCLUDE NAME="acquisitions-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/lateorders.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/lateorders.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/lateorders.tmpl
--- koha-tmpl/intranet-tmpl/default/en/acqui/lateorders.tmpl	6 Jan 2006 16:39:39 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,105 +0,0 @@
-<!-- TMPL_INCLUDE NAME="acquisitions-top.inc" -->
-<!--------------------------MAIN BODY OF PAGE-------------------------->
-<div id="mainbloc">
-	<h1 class="acquisition"><!-- TMPL_IF name="Supplier" --><!-- TMPL_VAR name="Supplier" --> : <!--/TMPL_IF -->Late issues</h1>
-	<table>
-		<tr>
-			<th class="acquisition doNotPrint">Supplier</th>
-			<th class="acquisition">Order Date</th>
-			<th class="acquisition">Ordered for</th>
-			<th class="acquisition doNotPrint">Including Basket</th>
-			<th class="acquisition">Book information</th>
-			<th class="acquisition doNotPrint">Branch</th>
-			<th class="acquisition doNotPrint">Estimated Unit Price</th>
-			<th class="acquisition">Retailer Catalogue Unit Price</th>
-			<th class="acquisition">Quantity</th>
-			<th class="acquisition">Total cost</th>
-			<th class="acquisition doNotPrint">Budget</th>
-			<th class="acquisition doNotPrint">&nbsp;</th>
-		</tr>
-		<tr class="doNotPrint">
-			<form action="lateorders.pl" method="post">
-				<td class="doNotPrint">
-					<!-- TMPL_VAR name="CGIsupplier" -->
-				</td>
-				<td> &nbsp;</td>
-				<td align="center" class="doNotPrint">
-					<input align="right" size="4" maxlength="3" type="text" name="delay" value="<!--TMPL_VAR Name="delay" -->" > days
-				</td>
-				<td colspan="2">
-					&nbsp;
-				</td>
-				<td class="doNotPrint">
-					<!-- TMPL_VAR name="CGIbranch" -->
-				</td>
-				<td colspan="5">
-					&nbsp;
-				</td>
-				
-				<td class="doNotPrint">
-					<input type="submit" value="filter" class="button acquisition">
-				</td>
-			</form>
-		</tr>
-		<!-- TMPL_LOOP name="lateorders" -->
-			<!--TMPL_IF Name="hilighted" --> <tr class="hilighted"> <!--TMPL_ELSE--> <tr> <!-- /TMPL_IF -->
-				<td class="doNotPrint">
-					<!-- TMPL_VAR name="supplier" -->
-				</td>
-				<td>
-					<!-- TMPL_VAR name="orderdate" -->
-				</td>
-				<td class="number" align="right">
-					<!-- TMPL_VAR name="latesince" -->
-				</td>
-				<td align="center" class="doNotPrint">
-					<!-- TMPL_VAR name="basketno" -->
-				</td>
-				<td >
-					<b><!-- TMPL_VAR name="title" --></b>
-				<!-- TMPL_IF name="author" --><br/><i>Author:</i> <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="publisher" --><br/><i>Published by:</i> <!-- TMPL_VAR NAME="publisher" --><!-- TMPL_IF name="publicationyear" --><i> in </i><!-- TMPL_VAR name="publicationyear" --><!-- /TMPL_IF --><!-- /TMPL_IF -->
-				</td>
-				<td class="doNotPrint">
-					<!-- TMPL_VAR name="branch" -->
-				</td>
-				<td align="right" class="doNotPrint">
-					<!-- TMPL_VAR name="unitpricelib" -->
-				</td>
-				<td align="right">
-					<!-- TMPL_VAR name="unitpricesupplier" -->
-				</td>
-				<td align="right">
-					<!-- TMPL_VAR name="quantity" -->
-				</td>
-				<td align="right">
-					<!-- TMPL_VAR name="subtotal" -->
-				</td>
-				<td class="doNotPrint">
-					<!-- TMPL_VAR name="budget" -->
-				</td>
-				<td class="doNotPrint">
-					&nbsp;
-				</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		<tr> 
-				<th class="acquisition">
-					Total
-				</th>
-				<th class="acquisition" colspan="2">
-					&nbsp;
-				</th>
-				<th class="acquisition" class="doNotPrint"> &nbsp;</th>
-				<th class="acquisition"  colspan="5">
-					&nbsp;
-				</th>
-				
-				<th class="acquisition">
-					<!-- TMPL_VAR name="total" -->
-				</th>
-		</tr>
-	</table>
-</div>
-<!-- TMPL_INCLUDE NAME="acquisitions-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/default/en/acqui/newbasket2.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/newbasket2.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/newbasket2.tmpl
--- koha-tmpl/intranet-tmpl/default/en/acqui/newbasket2.tmpl	5 Sep 2006 21:30:58 -0000	1.15
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,93 +0,0 @@
-<!-- TMPL_INCLUDE NAME="acquisitions-top.inc" -->
-<div id="mainbloc">
-	<h1 class="acquisition">Shopping basket <!-- TMPL_VAR name="basketno" --> for: <!-- TMPL_VAR NAME="bookselname" --></h1>
-		<a href="newbiblio.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;sub=<!-- TMPL_VAR NAME="parsub" -->">
-		<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filenew.png" border="0" alt="Add New Biblio"></a>
-	<a href="basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->">
-		<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1uparrow.png"  border="0" alt="View Basket">
-	</a>
-	<form action="/cgi-bin/koha/acqui/newbasket2.pl">
-	<input type="hidden" name="booksellerid" value=<!-- TMPL_VAR NAME="booksellerid" -->>
-	<input type="hidden" name="basketno" value=<!-- TMPL_VAR NAME="basketno" -->>
-	<input type="hidden" name="acq_search" value="1">
-	<b>New Search: </b><input="text"  size="25"   name="search">
-	<input type="submit" value="Search" class="button acquisition">
-	</form>
-
-	You searched on
-	<b>
-	<!-- TMPL_LOOP NAME="loopsearch" -->
-		<!-- TMPL_VAR NAME="key" --> <!-- TMPL_VAR NAME="value" -->
-	<!-- /TMPL_LOOP -->
-	</b>
-	<br>
-	<!-- TMPL_VAR NAME="count" -->  results found.
-	
-	<br> Results <i><!-- TMPL_VAR NAME="dispnum" --></i> to <i><!-- TMPL_VAR NAME="offset2" --></i> displayed.
-	
-	<table>
-		<tr>
-			<th class="acquisition">TITLE</th>
-			<th class="acquisition">AUTHOR</th>
-			<th class="acquisition">&copy;</th>
-			<th class="acquisition">COUNT</th>
-			<th class="acquisition">LOCATION</th>
-		</tr>
-	
-	<!-- TMPL_LOOP NAME="loopresult" -->
-		<tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
-			<td>
-					<a href="/cgi-bin/koha/acqui/newbiblio.pl?sub=<!-- TMPL_VAR NAME="sub" -->&amp;booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;biblio=<!-- TMPL_VAR NAME="biblionumber" -->">
-					<!-- TMPL_VAR NAME="title" -->
-					</a>
-			</td>
-			<td>
-				<!-- TMPL_VAR NAME="author" -->
-			</td>
-			<td>
-				<!-- TMPL_VAR NAME="copyright" -->
-			</td>
-			<td>
-				<!-- TMPL_VAR NAME="itemcount" -->
-			</td>
-			<td>
-				<!-- TMPL_IF name="use-location-flags-p" -->
-				<!-- TMPL_IF name="location-only" --><!-- TMPL_VAR NAME="location-only" --><br><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="on-loan-p" -->On Loan<br><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="lost-p" -->Lost<br><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="mending-p" -->Mending<br><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="in-transit-p" -->In Transit<br><!-- /TMPL_IF -->
-				<!-- TMPL_ELSE -->
-				<!-- TMPL_VAR NAME="location" -->
-				<!-- /TMPL_IF -->
-			</td>
-		</tr>
-	
-	<!-- /TMPL_LOOP -->
-	
-		<tr bgcolor="#ffdf61">
-			<td>
-				&nbsp;
-			</td>
-			<td>
-				&nbsp;
-			</td>
-			<td>
-				&nbsp;
-			</td>
-			<td>
-				&nbsp;
-			</td>
-			<td>
-				&nbsp;
-			</td>
-		</tr>
-	</table>
-	
-	<!-- TMPL_IF name="offsetover" -->
-	<a href="/cgi-bin/koha/acqui/newbasket2.pl?num=<!-- TMPL_VAR NAME="num" -->&amp;offset=<!-- TMPL_VAR NAME="offset" -->&amp;type=<!-- TMPL_VAR NAME="type" -->&amp;booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;search=<!-- TMPL_VAR NAME="title" -->&amp;author=<!-- TMPL_VAR NAME="author" -->">
-	Next
-	</a>
-	<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE NAME="acquisitions-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/newbiblio.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/newbiblio.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/newbiblio.tmpl
--- koha-tmpl/intranet-tmpl/default/en/acqui/newbiblio.tmpl	6 Jan 2006 16:39:39 -0000	1.22
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,237 +0,0 @@
-<!-- TMPL_INCLUDE name="acquisitions-top.inc" -->
-<script language="javascript" type="text/javascript">
-
-<!--
-function update(f){
-  //collect values
-  quantity=f.quantity.value
-  if (quantity ==0) {
-  	alert("Quantity must be >0");
-  }
-  discount=f.discount.value
-  listinc=parseInt(f.listinc.value)
-  currency=f.currency.value
-  applygst=parseInt(f.applygst.value)
-  listprice=f.list_price.value
-  //  rrp=f.rrp.value
-  //  ecost=f.ecost.value  //budgetted cost
-  //  GST=f.GST.value
-  //  total=f.total.value
-  //make useful constants out of the above
-  exchangerate=f.elements[currency].value      //get exchange rate
-  gst_on=(!listinc && applygst);
-  //do real stuff
-  rrp=listprice*exchangerate;
-  ecost=rrp*(100-discount)/100
-  GST=0;
-  if (gst_on){
-    rrp=rrp*(1+<!-- TMPL_VAR NAME="gstrate" -->);
-    GST=ecost*(<!-- TMPL_VAR NAME="gstrate" -->);
-  }
-
-  total=(ecost+GST)*quantity
-
-  f.rrp.value=rrp;
-  f.ecost.value=ecost;
-  f.GST.value=GST;
-  f.total.value=total;
-  return true;
-}
-
-
-
-function messenger(X,Y,etc){
-	win=window.open("","mess","height="+X+",width="+Y+",screenX=150,screenY=0");
-	win.focus();
-	win.document.close();
-	win.document.write("<body link='#333333' bgcolor='#ffffff' text='#000000'><font size='2'><p><br>");
-	win.document.write(etc);
-	win.document.write("<center><form><input type=button onclick='self.close()' value='Close'></form></center>");
-	win.document.write("</font></body></html>");
-}
-
-function check(f) {
-  quantity=f.quantity.value
-  title=f.title.value
-  if (title == "") {
-  	alert("Title can't be empty");
-	return false;
-  }
-  if (quantity ==0) {
-  	alert("Quantity must be >0");
-	return false;
-  }
-	document.frusin.submit();
-}
-
-//-->
-
-</script>
-<div id="mainbloc">
-	<form action="/cgi-bin/koha/acqui/addorder.pl" method="post" name="frusin">
-	<!-- TMPL_UNLESS name="existing" --><input type="hidden" name="existing" value="no"><!-- /TMPL_UNLESS -->
-	<!-- <!-- TMPL_VAR NAME="title" --> -->
-	<input type="hidden" name="ordnum" value="<!-- TMPL_VAR NAME="ordnum" -->">
-	<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->">
-	<input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->">
-	<input type="hidden" name="biblio" value="<!-- TMPL_VAR NAME="biblio" -->">
-	<input type="hidden" name="bibitemnum" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->">
-	<input type="hidden" name="oldtype" value="<!-- TMPL_VAR NAME="itemtype" -->">
-	<input type="hidden" name="discount" value="<!-- TMPL_VAR NAME="discount" -->">
-	<input type="hidden" name="listinc" value="<!-- TMPL_VAR NAME="listincgst" -->">
-	<input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="currency" -->">
-	<input type="hidden" name="applygst" value="<!-- TMPL_VAR NAME="gstreg" -->">
-	<input type="hidden" name="suggestionid" value="<!-- TMPL_VAR NAME="suggestionid" -->">
-	<!-- TMPL_LOOP NAME="loop_currencies" -->
-		<input type="hidden" name="<!-- TMPL_VAR NAME="currency" -->" value="<!-- TMPL_VAR NAME="rate" -->">
-	<!-- /TMPL_LOOP -->
-	<a href="basket.pl?basket=<!-- TMPL_VAR NAME="basket" -->" class="button acquisition">View Basket</a>
-	<h1 class="acquisition">
-		<!-- TMPL_IF name="ordnum" -->
-			Modify order details (line #<!-- TMPL_VAR NAME="ordnum" -->)
-		<!-- TMPL_ELSE -->
-			New order
-		<!-- /TMPL_IF -->
-		 <!-- TMPL_IF name="suggestionid" -->(defined from suggestion #<!-- TMPL_VAR NAME="suggestionid" -->)<!-- /TMPL_IF -->
-	</h1>
-	Shopping Basket For <!-- TMPL_VAR NAME="name" -->
-	<div id="bloc25">
-		<h2 class="acquisition">catalogue details</h2>
-		<p>
-			<label class="label100"><b>Title *</b></label>
-			<!-- TMPL_IF name="biblio" -->
-				<input type="hidden" size="20" name="title" value="<!-- TMPL_VAR NAME="title" -->"><!-- TMPL_VAR NAME="title" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="title" value="<!-- TMPL_VAR NAME="title" -->">
-			<!-- /TMPL_IF -->
-		</p>
-		<p>
-			<label class="label100">Author</label>
-			<!-- TMPL_IF name="biblio" -->
-				<input type="hidden" size="20" name="author" value="<!-- TMPL_VAR NAME="author" -->"><!-- TMPL_VAR NAME="author" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="author" value="<!-- TMPL_VAR NAME="author" -->">
-			<!-- /TMPL_IF -->
-		</p>
-		<p>
-			<label class="label100"> Publisher</label>
-			<!-- TMPL_IF name="biblio" -->
-				<input type="hidden" size="20" name="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->"><!-- TMPL_VAR NAME="publishercode" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->">
-			<!-- /TMPL_IF -->
-		</p>
-		<p>
-			<label class="label100">Copyright Date</label>
-			<!-- TMPL_IF name="biblio" -->
-				<input type="hidden" size="20" name="copyrightdate" value="<!-- TMPL_VAR NAME="copyrightdate" -->"><!-- TMPL_VAR NAME="copyrightdate" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="copyrightdate" value="<!-- TMPL_VAR NAME="copyrightdate" -->">
-			<!-- /TMPL_IF -->
-		</p>
-		<p>
-			<label class="label100">Format</label>
-			<!-- TMPL_VAR NAME="CGIitemtype" -->
-		</p>
-		<p>
-			<label class="label100">ISBN</label>
-			<!-- TMPL_IF name="biblio" -->
-				<input type="hidden" size="20" name="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->"><!-- TMPL_VAR NAME="isbn" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->">
-			<!-- /TMPL_IF -->
-		</p>
-		<p>
-			<label class="label100">Series</label>
-			<!-- TMPL_IF name="biblio" -->
-				<input type="hidden" size="20" name="series" value="<!-- TMPL_VAR NAME="seriestitle" -->"><!-- TMPL_VAR NAME="seriestitle" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="series" value="<!-- TMPL_VAR NAME="seriestitle" -->">
-			<!-- /TMPL_IF -->
-		</p>
-		<p>
-			<label class="label100">Branch</label>
-			<!-- TMPL_VAR NAME="CGIbranch" -->
-		</p>
-	</div>
-	<div id="bloc25">
-		<h2 class="acquisition">Accounting details</h2>
-		<p>
-			<label class="label100">Quantity</label>
-			<!-- TMPL_IF name="close" -->
-				<input type="hidden" size="20" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->"><!-- TMPL_VAR NAME="quantity" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" onchange="update(this.form);">
-		  	<!--/TMPL_IF-->
-		</p>
-		<p>
-			<label class="label100">Bookfund</label>
-			<!-- TMPL_IF name="close" -->
-				<input type="hidden" size="20" name="bookfund" value="<!-- TMPL_VAR NAME="bookfundid" -->"><!-- TMPL_VAR NAME="bookfundname" -->
-			<!-- TMPL_ELSE -->
-				<!-- TMPL_VAR NAME="CGIbookfund" -->
-		  	<!--/TMPL_IF-->
-		</p>
-		<p>
-			<label class="label100">Suppliers List Price</label>
-			<!-- TMPL_IF name="close" -->
-				<input type="hidden" size="20" name="list_price" value="<!-- TMPL_VAR NAME="listprice" -->"><!-- TMPL_VAR NAME="listprice" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="list_price" value="<!-- TMPL_VAR NAME="listprice" -->" onchange="update(this.form)">
-		  	<!--/TMPL_IF-->
-		</p>
-		<p>
-			<label class="label100">Replacement Cost </label>
-			<!-- TMPL_IF name="close" -->
-				<input type="hidden" size="20" name="rrp" value="<!-- TMPL_VAR NAME="rrp" -->"><!-- TMPL_VAR NAME="rrp" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="rrp" value="<!-- TMPL_VAR NAME="rrp" -->">
-		  	<!--/TMPL_IF-->
-		</p>
-		<p>
-			<label class="label100">Budgeted Cost</label>
-			<input type="text" size="20" name="ecost" value="<!-- TMPL_VAR NAME="ecost" -->"<!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF-->>
-		</p>
-		<p>
-			<label class="label100">Budgeted GST</label>
-			<input type="text" size="20" name="GST" value="" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF-->>
-		</p>
-		<p>
-			<label class="label100"><b>BUDGETED TOTAL</b></label>
-			<input type="text" size="20" name="total" value="" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF-->>
-		</p>
-		<p>
-			<label class="label100">Actual Cost</label>
-			<input type="text" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF-->>
-		</p>
-		<p>
-			<label class="label100">Invoice Number *</label>
-			<input type="text" size="20" name="invoice"  value="<!-- TMPL_VAR name="invoice" -->">
-		<p>
-			<label class="label100">Notes</label>
-			<input type="text" size="20" name="notes" value="<!-- TMPL_VAR NAME="notes" -->">
-		</p>
-		<p>The 2 following fields are available for your own usage. They can be useful for stat purposes</p>
-		<p>
-			<label class="label100">Sort field 1</label>
-			<!-- TMPL_IF Name="CGIsort1" -->
-				<!-- TMPL_VAR Name="CGIsort1" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="sort1" value="<!-- TMPL_VAR NAME="sort1" -->">
-			<!--/TMPL_IF -->
-		</p>
-		<p>
-			<label class="label100">Sort field 2</label>
-			<!-- TMPL_IF Name="CGIsort2" -->
-				<!-- TMPL_VAR Name="CGIsort2" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="sort2" value="<!-- TMPL_VAR NAME="sort2" -->">
-			<!--/TMPL_IF -->
-		</p>
-		<p>
-			<input type="button" value="OK" class="button acquisition" onClick="check(this.form)">
-		</p>
-	</form>
-	</div>
-</div>
-<!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/order.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/order.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/order.tmpl
--- koha-tmpl/intranet-tmpl/default/en/acqui/order.tmpl	4 May 2005 08:52:50 -0000	1.22
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,65 +0,0 @@
-<!-- TMPL_INCLUDE name="acquisitions-top.inc" -->
-<div id="mainbloc">
-<h1 class="acquisition">You searched on <b>supplier <!-- TMPL_VAR name="supplier" -->,</b> <!-- TMPL_VAR name="count" --> results found</h1>
-<div id="bloc100">
-<table>
-<tr>
-	<th class="acquisition">Order</th>
-	<th class="acquisition">Receive</th>
-	<th class="acquisition">Company</th>
-	<th class="acquisition">&nbsp;</th>
-</tr>
-
-<!-- TMPL_LOOP name="loop_suppliers" -->
-	<tr valign="top">
-		<td>
-			<!-- TMPL_IF name="active" -->
-				<a href="basket.pl?supplierid=<!-- TMPL_VAR name=supplierid -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/mail_send.png" title="Add order" ALT="Add" BORDER=0 ></a>
-			<!-- TMPL_ELSE -->
-				Inactive
-			<!-- /TMPL_IF -->
-		</td>
-		<td>
-			<a href="recieveorder.pl?supplierid=<!-- TMPL_VAR name=supplierid -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/mail_get.png" title="receive" ALT="Add" BORDER=0 ></a>
-		</td>
-		<td><a href="supplier.pl?supplierid=<!-- TMPL_VAR name=supplierid -->"><!-- TMPL_VAR name="name" --></a></td>
-		<td>
-			<table>
-					<tr>
-						<th class="acquisition">Basket</th>
-						<th class="acquisition">Items</th>
-						<th class="acquisition">Created by</th>
-						<th class="acquisition">Date</th>
-						<th class="acquisition">&nbsp;</th>
-					</tr>
-					<!-- TMPL_LOOP NAME="loop_basket" -->
-						<tr>
-							<td><!-- TMPL_VAR NAME="basketno" --></a></td>
-							<td><TMPL_VAR NAME="total"></td>
-							<td>
-								<!-- TMPL_VAR name="firstname" -->
-									<!-- TMPL_VAR name="surname" -->
-							</td>
-							<td><!-- TMPL_VAR NAME="creationdate" --></td>
-							<td>
-								<!-- TMPL_IF name="closedate" -->
-									closed on <!-- TMPL_VAR NAME="closedate" -->
-									<a href="/cgi-bin/koha/acqui/basket.pl?basket=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">View</a>
-								<!-- TMPL_ELSE -->
-									<!-- TMPL_IF name="active" -->
-										<a href="/cgi-bin/koha/acqui/basket.pl?basket=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">modify</a>
-									<!-- TMPL_ELSE -->
-										<a href="/cgi-bin/koha/acqui/basket.pl?basket=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">View</a>
-									<!-- /TMPL_IF -->
-								<!-- /TMPL_IF -->
-							</td>
-						</tr>
-					<!-- /TMPL_LOOP -->
-				</table>
-		</tr>
-	<!-- /TMPL_LOOP -->
-	</table>
-	</div>
-	<a class="button acquisition" href="supplier.pl?supplierid=0">Add supplier</a>
-</div>
-<!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl
--- koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl	5 Sep 2006 22:24:10 -0000	1.14
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,80 +0,0 @@
-<!-- TMPL_INCLUDE name="acquisitions-top.inc" -->
-
-<div id="mainbloc">
-	<h1 class="acquisition">
-		<!-- TMPL_IF name="invoice" -->
-			Receipt Summary for <i><!-- TMPL_VAR NAME="name" --></i> Invoice <i><!-- TMPL_VAR NAME="invoice" --></i>
-		<!-- TMPL_ELSE -->
-			orders not yet recieved for <!-- TMPL_VAR NAME="name" -->
-		<!-- /TMPL_IF -->
-	</h1>
-	
-	<div id="bloc25">
-		Invoice: <!-- TMPL_VAR NAME="invoice" --><br>
-		Received By: <!-- TMPL_VAR NAME="user" --><br>
-		<!-- TMPL_VAR NAME="date" -->
-	</div>
-	
-	<div id="bloc25">
-		<form action="/cgi-bin/koha/acqui/acquire.pl">
-			<input type="hidden" name="supplierid" value="<!-- TMPL_VAR NAME="supplierid" -->">
-			<input type="hidden" name="gst" value="<!-- TMPL_VAR NAME="gst" -->">
-			<input type="hidden" name="freight" value="<!-- TMPL_VAR NAME="freight" -->">
-			<input type="hidden" name="invoice" value="<!-- TMPL_VAR NAME="invoice" -->">
-			<input type="hidden" name="acq_search" value="1">
-			
-			<b>Search ISBN or Title:</b> <input type="text" size="25" name="recieve">
-		</form>
-	<p>
-	<form action="" method="get" name="orderform">
-	
-	<table>
-		<tr>
-			<th class="acquisition">BASKET</th>
-			<th class="acquisition">ISBN</th>
-			<th class="acquisition">TITLE</th>
-			<th class="acquisition">AUTHOR</th>
-			<th class="acquisition">ACTUAL</th>
-			<th class="acquisition">P&amp;P</th>
-			<th class="acquisition">QTY</th>
-			<th class="acquisition">TOTAL</th>
-		</tr>
-		<!-- TMPL_VAR NAME="count" -->
-		<!-- TMPL_LOOP NAME="loop_orders" -->
-			<tr bgcolor="<!-- TMPL_VAR NAME="color" -->">
-				<td><!-- TMPL_VAR NAME="basketno" --></td>
-				<td><!-- TMPL_VAR NAME="isbn" --></td>
-				<td><a href="acquire.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&amp;biblio=<!-- TMPL_VAR NAME="biblionumber" -->&amp;invoice=<!-- TMPL_VAR NAME="invoice" -->&amp;gst=<!-- TMPL_VAR NAME="gst" -->&amp;freight=<!-- TMPL_VAR NAME="freight" -->&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="title" --></a></td>
-				<td><!-- TMPL_VAR NAME="author" --></td>
-				<td><!-- TMPL_VAR NAME="unitprice" --></td>
-				<td></td>
-				<td><!-- TMPL_VAR NAME="quantityrecieved" --></td>
-				<td><!-- TMPL_VAR NAME="total" --></td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		<tr bgcolor="white">
-			<th class="acquisition"></th>
-			<th class="acquisition"></th>
-			<th class="acquisition"></th>
-			<th class="acquisition">SUBTOTALS</th>
-			<th class="acquisition"><!-- TMPL_VAR NAME="totalprice" --></th>
-			<th class="acquisition"><!-- TMPL_VAR NAME="totalfreight" --></th>
-			<th class="acquisition"><!-- TMPL_VAR NAME="totalquantity" --></th>
-			<th class="acquisition"><!-- TMPL_VAR NAME="tototal" --></th>
-		</tr>
-		<tr>
-			<td colspan="5" rowspan=2  bgcolor="#ffdf61">
-			<b>HELP</b>
-				<p>The total at the bottom of the page should be within a few cents of the total for the invoice.</p>
-			</td>
-			<td colspan="2" align="right"><b>GST</b></td>
-			<td><!-- TMPL_VAR NAME="gst" --></td>
-		</tr>
-		<tr bgcolor="white">
-			<td colspan="2" align="right" ><b>TOTAL</b></td>
-			<td><!-- TMPL_VAR NAME="grandtot" --></td>
-		</tr>
-	</table>
-	</div>
-</div>
-<!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/recieveorder.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/recieveorder.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/recieveorder.tmpl
--- koha-tmpl/intranet-tmpl/default/en/acqui/recieveorder.tmpl	12 Aug 2004 14:37:11 -0000	1.10
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-<!-- TMPL_INCLUDE name="acquisitions-top.inc" -->
-<div id="mainbloc">
-	<h1 class="acquisition">Receive Orders From Supplier <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="name" --></a></h1>
-	<div id="bloc25">
-		<form method="get" action="receive.pl">
-		<p>
-			<input type="hidden" name="supplierid" value=<!-- TMPL_VAR NAME="supplierid" -->>
-			<h2 class="acquisition">Supplier invoice information</h2>
-		<p>
-			<label>Supplier Invoice Number</label>
-			<input type="text" size="20" name="invoice">
-		</p>
-		<p>
-			<label>GST</label>
-			<input type="text" size="20" name="gst">
-		</p>
-		<p>
-			<label>Freight</label>
-			<input type="text" size="20" name="freight">
-		</p>
-		<p>
-			<input type="submit" class="button acquisition" value="save">
-		</p>
-		</form>
-	</div>
-</div>
-<!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/suggestion-select.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/suggestion-select.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/suggestion-select.tmpl
--- koha-tmpl/intranet-tmpl/default/en/acqui/suggestion-select.tmpl	26 Oct 2005 09:15:56 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,60 +0,0 @@
-<!-- TMPL_INCLUDE NAME="acquisitions-top.inc" -->
-<div id="mainbloc">
-	<h1 class="acquisition">Suggestions</h1>
-	<table>
-		<tr>
-			<th class="acquisition">Suggestion</th>
-			<th class="acquisition">Suggested by</th>
-			<th class="acquisition">Accepted by</th>
-			<th class="acquisition">&nbsp;</th>
-		</tr>
-		<tr>
-			<form action="/cgi-bin/koha/acqui/suggestion-select.pl" method="get">
-				<th class="acquisition">
-					<p>Filter on :
-					title: <input type="text" name="title" value="<!-- TMPL_VAR NAME="title"-->">
-					author: <input type="text" name="author" value="<!-- TMPL_VAR NAME="author" -->">
-					publisher: <input type="text" name="publishercode" value="<!-- TMPL_VAR NAME="publishercode"-->">
-				</th>
-				<th class="acquisition">
-					&nbsp;
-				</th>
-				<th class="acquisition">
-					&nbsp;
-				</th>
-				<th class="acquisition">
-					<input type="submit" class="button acquisition" value="Set Filter">
-				</th>
-			</form>
-		</tr>
-		<!-- TMPL_LOOP NAME="suggestions_loop" -->
-			<tr>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<p><!-- TMPL_VAR NAME="title" --> - <!-- TMPL_VAR NAME="author" --></p>
-					<p>
-						<!-- TMPL_IF name="copyrightdate" -->copy. year:<!-- TMPL_VAR NAME="copyrightdate" --> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="volumedesc" -->volume:<i><!-- TMPL_VAR NAME="volumedesc" --></i> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="isbn" -->ISBN :<i><!-- TMPL_VAR NAME="isbn" --></i> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="publishercode" --><br/>published by:<!-- TMPL_VAR NAME="publishercode" --> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="publicationyear" --> in <i><!-- TMPL_VAR NAME="publicationyear" --></i> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="place" --> at <i><!-- TMPL_VAR NAME="place" --></i> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="note" --><p><i>(<!-- TMPL_VAR NAME="note" -->)</i></p> <!-- /TMPL_IF -->
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_VAR NAME="surnamesuggestedby" --><!-- TMPL_IF name="firstnamesuggestedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="firstnamesuggestedby" -->
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_VAR NAME="surnamemanagedby" --><!-- TMPL_IF name="firstnamemanagedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="firstnamemanagedby" -->
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_IF name="biblionumber" -->
-						<a href="newbiblio.pl?booksellerid=<!-- TMPL_VAR NAME="supplierid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;suggestionid=<!-- TMPL_VAR NAME="suggestionid" -->&biblio=<!-- TMPL_VAR name="biblionumber" -->" class="button acquisition">Order</a>
-					<!-- TMPL_ELSE -->
-						<a href="newbiblio.pl?booksellerid=<!-- TMPL_VAR NAME="supplierid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;suggestionid=<!-- TMPL_VAR NAME="suggestionid" -->" class="button acquisition">Order</a>
-					<!-- /TMPL_IF -->
-				</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-	</table>
-</div>
-<!-- TMPL_INCLUDE NAME="acquisitions-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl
--- koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl	1 Mar 2005 13:40:51 -0000	1.13
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,128 +0,0 @@
-<!-- TMPL_INCLUDE name="acquisitions-top.inc" -->
-
-<div id="mainbloc">
-	<form action=updatesupplier.pl method="post">
-	
-	<input type="hidden" name="id" value=<!-- TMPL_VAR NAME="id" -->>
-	
-	<!-- TMPL_IF name="id" -->
-		<h1 class="acquisition">Update: <!-- TMPL_VAR NAME="name" --></h1>
-	<!-- TMPL_ELSE -->
-		<h1 class="acquisition">Add supplier</h1>
-	<!-- /TMPL_IF -->
-	<div id="bloc25">
-		<h2 class="acquisition">COMPANY DETAILS</h2>
-		<p>
-			<label>Company Name</label>
-			<input type="text" size="40" name="company" value="<!-- TMPL_VAR NAME="name" -->">
-		</p>
-		<p>
-			<label>Postal Address</label>
-				<textarea name="company_postal" cols="40" rows="3"><!-- TMPL_VAR NAME="postal" --></textarea>
-		</p>
-		<p>
-			<label>Physical Address</label>
-			<textarea name="physical" cols="40" rows="4"><!-- TMPL_VAR NAME="address1" --><!-- TMPL_VAR NAME="address2" --><!-- TMPL_VAR NAME="address3" --><!-- TMPL_VAR NAME="address4" --></textarea>
-		</p>
-		<p>
-			<label>Phone</label>
-			<input type="text" size="20" name="company_phone" value="<!-- TMPL_VAR NAME="phone" -->">
-		</p>
-		<p>
-			<label>Fax</label>
-			<input type="text" size="20" name="company_fax" value="<!-- TMPL_VAR NAME="fax" -->">
-		</p>
-		<p>
-			<label>Website</label>
-			<input type="text" size="40" name="website" value="<!-- TMPL_VAR NAME="url" -->">
-		</p>
-		<h2 class="acquisition">CONTACT DETAILS</h2>
-		<p>
-			<label>Contact Name</label>
-			<input type="text" size="40" name="company_contact_name" value="<!-- TMPL_VAR NAME="contact" -->">
-		</p>
-		<p>
-			<label>Position</label>
-			<input type="text" size="40" name="company_contact_position" value="<!-- TMPL_VAR NAME="contpos" -->">
-		</p>
-		<p>
-			<label>Phone</label>
-			<input type="text" size="20" name="contact_phone" value="<!-- TMPL_VAR NAME="contphone" -->">
-		</p>
-		<p>
-			<label>Alternative phone</label>
-			<input type="text" size="20" name="contact_phone_2" value="<!-- TMPL_VAR NAME="contaltphone" -->">
-		</p>
-		<p>
-			<label>Fax</label>
-			<input type="text" size="20" name="contact_fax" value="<!-- TMPL_VAR NAME="contfax" -->">
-		</p>
-		<p>
-			<label>E-mail</label>
-			<input type="text" size="40" name="company_email" value="<!-- TMPL_VAR NAME="contemail" -->">
-		</p>
-		<p>
-			<label>Notes</label>
-			<textarea name="notes" cols="40" rows="4"><!-- TMPL_VAR NAME="contnotes" --></textarea>
-		</p>
-	</div>
-	<div id="bloc25">
-		<h2 class="acquisition">CURRENT STATUS</h2>
-		<p>
-			<label>Supplier is</label>
-				<!-- TMPL_IF name="active" -->
-					<input type="radio" name="status" value="1" checked>Active
-					<input type="radio" name="status" value="0">Inactive</td>
-				<!-- TMPL_ELSE -->
-					<input type="radio" name="status" value="1">Active
-					<input type="radio" name="status" value="0" checked>Inactive</td>
-				<!-- /TMPL_IF -->
-		</p>
-		<h2 class="acquisition">ORDERING INFORMATION</h2>
-		</p>
-		<p>
-			<label>Publishers and Imprints</label>
-			<textarea name="publishers_imprints" cols="20" rows="4"><!-- TMPL_VAR NAME="specialty" --></textarea>
-		</p>
-		<p>
-			<label class="label100">List Prices are</label>
-				<select name="list_currency" size="1">
-				<!-- TMPL_LOOP NAME="loop_pricescurrency" -->
-					<!-- TMPL_VAR NAME="currency" -->
-				<!-- /TMPL_LOOP -->
-				</select>
-		</p>
-		<p>
-			<label class="label100">Invoice Prices are</label>
-				<select name="invoice_currency" size="1">
-				<!-- TMPL_LOOP NAME="loop_invoicecurrency" -->
-					<!-- TMPL_VAR NAME="currency" -->
-				<!-- /TMPL_LOOP -->
-				</select>
-		</p>
-		<p>
-			<label class="label100">GST Registered</label>
-				<input type="radio" name="gst" value="1" <!-- TMPL_IF name="gstreg" -->checked<!-- /TMPL_IF -->>Yes
-				<input type="radio" name="gst" value="0" <!-- TMPL_UNLESS name="gstreg" -->checked<!-- /TMPL_UNLESS -->>No
-		</p>
-		<p>
-			<label class="label100">List Item Price Includes GST</label>
-				<input type="radio" name="list_gst" value="1" <!-- TMPL_IF name="listincgst" -->checked<!-- /TMPL_IF -->>Yes
-				<input type="radio" name="list_gst" value="0" <!-- TMPL_UNLESS name="listincgst" -->checked<!-- /TMPL_UNLESS -->>No
-		</p>
-		<p>
-			<label class="label100">Invoice Item Price Includes GST</label>
-				<input type="radio" name="invoice_gst" value="1" <!-- TMPL_IF name= "invoiceincgst" -->checked<!-- /TMPL_IF -->>Yes
-				<input type="radio" name="invoice_gst" value="0" <!-- TMPL_UNLESS name="invoiceincgst" -->checked<!-- /TMPL_UNLESS -->>No
-		</p>
-		<p>
-			<label class="label100">Discount</label>
-			<input type="text" size="3" name="discount" value="<!-- TMPL_VAR NAME="discount" -->"> %
-		</p>
-	<br/>
-	<br/><input type="image"  name="submit" src="/<!-- TMPL_VAR NAME="theme" -->/images/filesave.png" border="0" title="save" alt="save" class="button acquisition">
-	</form>
-	</div>
-</div>
-
-<!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/about.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/about.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/about.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/about.tmpl	16 Mar 2006 11:33:28 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,102 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->About Koha
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<div id="mainbloc">
-	<h1>Data about the current version of Koha for bug reports (or general interest).</h1>
-	
-<table>
-	<caption>Server information</caption>
-	<tr><th scope="row">Koha version: </th><td><!-- TMPL_VAR ESCAPE=HTML name="kohaVersion" --></td></tr>
-	<tr><th scope="row">OS version ('uname -a'): </th><td><!-- TMPL_VAR ESCAPE=HTML name="osVersion" --></td></tr>
-	<tr><th scope="row">Perl version: </th><td><!-- TMPL_VAR ESCAPE=HTML name="perlVersion" --></td></tr>
-	<tr><th scope="row">MySQL version: </th><td><!-- TMPL_VAR ESCAPE=HTML name="mysqlVersion" --></td></tr>
-	<tr><th scope="row">Apache version: </th><td><!-- TMPL_VAR ESCAPE=HTML name="apacheVersion" --></td></tr>
-	<tr><th scope="row">Zebra version: </th><td><!-- TMPL_VAR ESCAPE=HTML name="zebraVersion" --></td></tr>
-</table>
-
-<table>
-        <caption>Perl modules</caption>
-	<!-- TMPL_LOOP name="components" -->
-	<tr>
-	  <th scope="row"><!-- TMPL_VAR NAME="name" --></th>
-          <td><!-- TMPL_VAR NAME="version" --></td>
-        </tr>
-	<!-- /TMPL_LOOP -->
-</table>
-
-	
-		<h2>Special thanks to the following libraries</h2>
-<ul>
-	<li><strong>Horowhenua Library Trust</strong>, New Zealand, and Rosalie Blake, Head of Libraries, (Koha 1.0)</li>
-	<li>The <strong>Nelsonville Public Library</strong>, USA, Ohio (MARC support funding)</li>
-	<li><strong>EMN (Ecole des Mines de Nantes)</strong>, France (Suggestion, stats modules and improved ldap support funding)</li>
-	<li><strong>ENSMP (Ecole Nationale Supérieure des Mines de Paris)</strong>, France (biblio frameworks, MARC authorities, OPAC basket, Serials support funding)</li>
-</ul>	
-	
-		<h2>Core team for 2.2</h2>
-<ul>
-	<li><strong>Rachel Hamilton-Williams</strong>, Kaitiaki</li>
-	<li><strong>Paul Poulain</strong>, 2.2 release manager (MARC developer)</li>
-	<li>Stephen Hedges, Owen Leonard, Joshua Ferraro (<strong>Nelsonville Public Library</strong>)</li>
-	<li><strong>Katipo Communications</strong> (Koha 1.0 developers)</li>
-	<li><ul></li>
-	<li>Rachel Hamilton-Williams, General Manager (Webmistress)</li>
-	<li>Chris Cormack, 1.2 release manager</li>
-	<li>and Simon Blake, Amanda Atkins, Operations Manager, Olwen Williams, Finlay Thompson,</li>
-	<li>Gynn Lomax, Richard Anderson, Jeremy Blake, Rebecca Holden, Olive T. Canine</li></ul></li>
-	<li>Emiliano Marmonti, Matías Veleda and Sebastian Catañeda <strong>La Plata University, Argentina</strong> (barcode printing)</li>
-	<li>MJ Ray and <strong>Turo Technology LLP</strong>, (quality control, installer and updater, 2.0 release maintainer)</li>
-	<li>Nicholas Rosasco, (Documentation Compiler)</li>
-	<li>Mike Hansen</li>
-	<li><strong>Pate Eyler</strong> (Kaitiaki from 2002 to 2004)</li>
-</ul>
-	
-	
-	<h2>Thanks to</h2>
-<ul>
-	<li>Adam Thick</li>
-	<li>Andrew Hooper</li>
-	<li>Al Banks</li>
-	<li>Ambrose Li (translation tool)</li>
-	<li>Andrew Arensburger (the small and great C4::Context module)</li>
-	<li>Benedykt P. Barszcz (Polish for 2.0)</li>
-	<li>Brig C. McCoy</li>
-	<li>Daniel Holth</li>
-	<li>David Strainchamps</li>
-	<li>Dorian Meid (German translation)</li>
-	<li>doXulting (Matthieu Branlat) OPAC basket</li>
-	<li>Ed Summers (Some code and Perl packages like MARC::Record)</li>
-	<li>Esiee School (Jérome Vizcaino, Michel Lerenard, Pierre Cauchois)</li>
-	<li>Florian Bischof</li>
-	<li>Francisco M. Marzoa Alonso</li>
-	<li>Glen Stewart</li>
-	<li>Henri-Damien Laurent</li>
-	<li>Jo Ransom</li>
-	<li>Kip DeGraaf</li>
-	<li>Marco Gaiarin</li>
-	<li>Md. Aftabuddin</li>
-	<li>Michaes Herman</li>
-	<li>Mike Johnson</li>
-	<li>Mike Mylonas</li>
-	<li>Nicolas Morin (French Translation in 2.0)</li>
-	<li>Pawel Skuza (Polish for 1.2)</li>
-	<li>Regula Sebastiao</li>
-	<li>Roger Buck</li>
-	<li>Ron Wickersham</li>
-	<li>Sebastiaan Durand</li>
-	<li>Steve Tonnesen (early MARC work, Virtual Bookshelves concept, KohaCD)</li>
-	<li>Universidad ORT Uruguay (Ernesto Silva, Andres Tarallo)</li>
-</ul>
-	
-	
-	<h2>Translation</h2>
-<ul>
-	<li><strong>French: </strong>Pascale Nalon (ENSMP) and Jean Yves Lemaire (Chatel Saint Germain)</li>
-	<li><strong>Chinese: </strong>Ambrose Li</li>
-	<li><strong>Spanish: </strong>Andres Tarallo</li>
-	<li><strong>Italian: </strong>Giuseppe Angilella</li>
-</ul>
-	
-
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/auth.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/auth.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/auth.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/auth.tmpl	6 Aug 2005 20:19:56 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,43 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_IF NAME="nopermission" -->Access Denied<!-- /TMPL_IF --><!-- TMPL_IF NAME="timed_out" -->Session Timed Out --<!-- /TMPL_IF --><!-- TMPL_IF NAME="different_ip" -->IP Change -- <!-- /TMPL_IF --><!-- TMPL_IF NAME="invalid_username_or_password" -->Invalid Username or Password -- <!-- /TMPL_IF --><!-- TMPL_IF NAME="loginprompt" -->Log in to Koha<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_IF NAME="nopermission" -->
-<!-- This is what is displayed if user doesn"t have permission --><h3>Login Error</h3>
-<p>Sorry, Koha doesn"t think you have permission for this page.</p>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="timed_out" -->
-<!-- This is what is displayed if login has timed out -->
-<h3>Login Error</h3><p>Sorry, your session has timed out.  Please login again.</p>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="different_ip" -->
-<!-- This is what is displayed if user"s IP has changed -->
-<h3>Login Error</h3><p>You are accessing Koha from a different ip address! Please login again.</p>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="invalid_username_or_password" -->
-<!-- This is what is displayed if the username or password doesn"t work -->
-<h3>Login Error</h3><p>You entered an incorrect username or password.  Please try again.</p>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF NAME="loginprompt" -->
-<!-- login prompt time-->
-
-<form action="<!-- TMPL_VAR NAME="url" -->" method="post" name="mainform" id="mainform">
-<!-- TMPL_LOOP NAME="INPUTS" -->
-  <input type="hidden" name="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="value" -->" />
-<!-- /TMPL_LOOP -->
-
-<table>
-	<caption>Log In to Koha</caption>
-    <tr><th scope="row"><label for="userid">Cardnumber:</label></th><td><input name="userid" id="userid" /></td></tr>
-    <tr><th scope="row"><label for="password">Password:</label></th><td><input type="password" name="password" id="password" /></td></tr>
-    </table>
-<p><input type="submit" value="Submit" /></p>
-</form>
-
-
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/intranet-main.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/intranet-main.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/intranet-main.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/intranet-main.tmpl	4 Jul 2006 15:02:42 -0000	1.9
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,99 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha Intranet Home<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<h1>Koha Intranet Home</h1>
-<ul>
-	<li>Circulation
-		<ul>
-			<li><a href="/cgi-bin/koha/circ/circulation.pl">Circulation</a></li>
-			<li><a href="/cgi-bin/koha/circ/circulation.pl">Issues</a></li>
-			<li><a href="/cgi-bin/koha/circ/returns.pl">Returns</a></li>
-			<li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfers</a></li>
-			<li><a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set branch</a></li>
-			<li><a href="/cgi-bin/koha/circ/branchreserves.pl">Waiting reserves</a></li>
-			<li><a href="/cgi-bin/koha/circ/waitingreservestransfers.pl">Transfers to do</a></li>
-			<li><a href="/cgi-bin/koha/circ/currenttransfers.pl">Transfers to recieve</a></li>
-		</ul>
-	</li>
-	<li>Members
-		<ul>
-			<li><a href="/cgi-bin/koha/members/members-home.pl">Search</a></li>
- 			<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=A"/>Add adult</a></li>
- 			<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=C"/>Add child</a></li>
- 			<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=P"/>Add prof</a></li>
- 			<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=I"/>Add org</a></li>
-		</ul>
-	</li>
-	<li>Catalogue
-		<ul>
-			<li><a href="/cgi-bin/koha/loadmodules.pl?module=search&amp;marc=1&amp;type=intranet">Advanced Search</a></li>
-			<li><a href="/cgi-bin/koha/bookshelves/shelves.pl">Virtual Shelves</a></li>
-		</ul>
-	</li>
-	<li>Cataloging
-<ul>
-			<li><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></li>
-			<li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add Full MARC Record</a></li>
-</ul></li>
-<li>Acquisitions<ul>
-<li><a href="/cgi-bin/koha/loadmodules.pl?module=acquisitions">Acquisitions</a></li><li><a href="/cgi-bin/koha/admin/aqbookfund.pl">Book funds</a></li>
-<li><a href="/cgi-bin/koha/acqui/histsearch.pl">Search Order History</a></li>
-<li><a href="/cgi-bin/koha/import/breeding.pl">Import to reservoir</a></li><li><a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a></li></ul>
-	</li>
-	<li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li>
-	<li>Accounts and Reports
-		<ul>
-			<li>Catalogue Statistics
-				<ul>
-					<li><a href="/cgi-bin/koha/reports/inventory.pl">Inventory/Stocktaking</a></li>
-					<li><a href="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">Catalogue by itemtype</a></li>
-				</ul>
-			</li>
-			<li>Circulation Statistics
-				<ul>
-					<li><a href="/cgi-bin/koha/reports/stats.pl?time=yesterday">Till Reconcipation: Daily Report (yesterday)</a></li>
-					<li><a href="/cgi-bin/koha/reports/stats.pl?time=today">Till Reconcipation: Daily Report (today)</a></li>
-					<li><a href="/cgi-bin/koha/reports/overdue.pl">Overdue items</a></li>
-				</ul>
-			</li>
-			<li>Statistics Wizards
-				<ul>
-					<li><a href="/cgi-bin/koha/reports/acquisitions_stats.pl">Acquisitions</a></li>
-					<li><a href="/cgi-bin/koha/reports/borrowers_stats.pl">Borrowers</a></li>
-					<li><a href="/cgi-bin/koha/reports/catalogue_stats.pl">Catalogue</a></li>
-					<li><a href="/cgi-bin/koha/reports/issues_stats.pl">Circulation</a></li>
-				</ul>
-			</li>
-			<li>Top Lists
-				<ul>
-					<li><a href="/cgi-bin/koha/reports/bor_issues_top.pl">Most issuing Borrowers</a></li>
-					<li><a href="/cgi-bin/koha/reports/cat_issues_top.pl">Most issued items</a></li>
-				</ul>
-			</li>
-		</ul>
-	</li>
-	<li>Koha Administration
-		<ul>
-		<li><a href="/cgi-bin/koha/admin/admin-home.pl">Tools</a></li>
-		<li><a href="/cgi-bin/koha/admin/admin-home.pl">System Administration Home</a></li>
-		<li><a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a></li>
-		<li><a href="/cgi-bin/koha/barcodes/barcodes.pl">Barcodes generator</a></li>
-		</ul>
-	</li>
-</ul>
-<div id="news">
-	<h1>News</h1>
-	<!-- TMPL_LOOP name="koha_news" -->
-			<table>
-				<tr>
-				<th>
-					<!-- TMPL_VAR NAME="title" --></th>
-					<td>
-					<!-- TMPL_VAR NAME="new" -->
-					</td>
-				<td>
-						<!-- TMPL_VAR NAME="newdate" --> 
-					</td>
-				</tr>
-			</table>
-	<!-- /TMPL_LOOP -->
-</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/acqui/acqui-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/acqui/acqui-home.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/acqui/acqui-home.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/acqui/acqui-home.tmpl	20 Sep 2006 21:40:41 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,102 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Acquisitions<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
-
-<h1>Acquisitions</h1>
-<div id="acqui_acqui_home_order">
-	<!-- TMPL_IF name="nobudget" -->
-		You must define a budget in parameters
-	<!-- TMPL_ELSE -->
-		<form action="/cgi-bin/koha/acqui/booksellers.pl" method="post">
-			<h2>Start, recieve, or modify any order</h2>
-			<p><label for="supplier">Supplier ID or name</label><input type="text" size="25" name="supplier" id="supplier" />
-			<input type="submit" value="Search" />
-			</p>
-		</form>
-	<!-- /TMPL_IF -->
-</div>
-
-
-<div id="acqui_acqui_home_currency">
-<!-- TMPL_IF NAME="loop_currency" -->
-	<h2>Exchange rates</h2>
-	<form action="/cgi-bin/koha/acqui/currency.pl">
-	<table>
-		<tr>
-			<th>Currency</th>
-			<th>Rate</th>
-		</tr>
-		<!-- TMPL_LOOP name="loop_currency" -->
-			<tr>
-				<td>
-					<label for="<!-- TMPL_VAR name="currency" -->"><!-- TMPL_VAR name="currency" --></label>
-				</td>
-				<td>
-						<input type="hidden" name="type" value="change" />
-						<input type="text" size="10" id="<!-- TMPL_VAR name="currency" -->" name="<!-- TMPL_VAR name="currency" -->" value="<!-- TMPL_VAR name="rate" -->" />
-				</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-	</table>
-	<input type="submit" value="Save Exchange Rate" />
-	</form>
-<!-- TMPL_ELSE -->
-	<form action="/cgi-bin/koha/admin/currency.pl" method="post">
-	<input type="hidden" name="op" value="add_form" /><input type="submit" value="Add Currency" />
-	</form>
-<!-- /TMPL_IF -->
-</div>
-
-<div id="acqui_acqui_home_suggestions">
-	<h2>Pending Suggestions</h2>
-		<!-- TMPL_IF name="suggestion" -->
-			<!--TMPL_VAR NAME="suggestion" --> suggestions waiting <a href="/cgi-bin/koha/suggestion/acceptorreject.pl">Manage suggestions</a>
-		<!-- TMPL_ELSE -->
-			<p>No suggestions waiting</p>
-		<!-- /TMPL_IF -->
-</div>
-
-<div id="acqui_acqui_home_budgets">
-	<!-- TMPL_IF name="nobudget" -->
-		<p>You must define a budget in parameters</p>
-	<!-- TMPL_ELSE -->
-	<h2>Budgets and bookfunds</h2>
-	<table>
-		<tr>
-			<th>Budgets</th>
-			<th>Total</th>
-			<th>Spent</th>
-			<th>Comtd</th>
-			<th>Avail</th>
-		</tr>
-		<!-- TMPL_LOOP name="loop_budget" -->
-			<tr>
-				<td><!-- TMPL_VAR name="bookfundname" --></td>
-				<td><!-- TMPL_VAR name="budgetamount" --></td>
-				<td><!-- TMPL_VAR name="spent" --></td>
-				<td><!-- TMPL_VAR name="comtd" --></td>
-				<td><!-- TMPL_VAR name="avail" --></td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		<tr>
-			<td>Total</td>
-			<td><!-- TMPL_VAR name="total" --></td>
-			<td><!-- TMPL_VAR name="totspent" --></td>
-			<td><!-- TMPL_VAR name="totcomtd" --></td>
-			<td><!-- TMPL_VAR name="totavail" --></td>
-		</tr>
-	</table><!-- /TMPL_IF -->
-</div>
-<div id="acqui_acqui_home_hints">
-	<p>Use your reload button [ctrl + r] to get the most recent figures.
-	Committed figures are approximate only, as exchange rates will affect the amount actually paid.</p>
-	
-	<h2>Help</h2>
-	<p>To start an acquisition, whether an order, local purchase or donation first search on the supplier, (set donations as a supplier if you wish), and click add order which  will set up a "shopping basket" for you.</p>
-	<p>To place an order you need to establish whether a biblio already exists for it, or set up a new biblio from scratch or from a suggestion.  </p>
-	<p>To close  a shopping basket  click on "confirm Close Basket". After closing a basket it can not be modified or deleted</p>
-	<p>To receive an order (a parcel)  search for the supplier and click receive. After confirming invoice details you will be asked to create items for the order</p>
-	
-</div>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/acqui/basket.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/acqui/basket.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/acqui/basket.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/acqui/basket.tmpl	20 Sep 2006 21:40:41 -0000	1.9
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,147 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- <!-- TMPL_UNLESS name="basketno" -->New <!-- /TMPL_UNLESS -->Shopping Basket (<!-- TMPL_VAR NAME="basketno" -->) for <!-- TMPL_VAR NAME="name" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
-<script>
-function Searchrecord()
-{
-	 window.open('/cgi-bin/koha/serials/subscription-bib-search.pl','FindABibIndex','width=500,height=400,toolbar=no,scrollbars=yes');
-}
-</script>
-	<h1><!-- TMPL_UNLESS name="basketno" -->New <!-- /TMPL_UNLESS -->Shopping Basket <!-- TMPL_VAR NAME="basketno" --> for <a href="supplier.pl?supplierid=<!-- TMPL_VAR NAME="booksellerid" -->"><!-- TMPL_VAR NAME="name" --></a></h1>
-	<div id="acqui_basket_summary">
-		<h2>Basket Details</h2>
-		<table>
-		<tr><th>Basket Number:</th><td><!-- TMPL_VAR NAME="basketno" --></td></tr>
-		<tr><th>Managed By:</th><td><!-- TMPL_VAR NAME="authorisedbyname" --></td></tr>
-		<tr><th>Open On:</th><td><!-- TMPL_VAR NAME="creationdate" --></td></tr>
-		<tr><th>For:</th><td>Supplier Id <!-- TMPL_VAR NAME="booksellerid" --></td></tr>
-		<tr><th>Invoice Number:</th><td><!-- TMPL_VAR NAME="booksellerinvoicenumber" --></td></tr>
-		<tr><th>Purchase Order Number:</th><td><!-- TMPL_VAR NAME="purchaseordernumber" --></td></tr>
-		<!-- TMPL_IF name="closedate" --><tr><th>Closed On:</th><td> <!-- TMPL_VAR name="closedate" --></td></tr><!-- /TMPL_IF -->
-		</table>
-		<!-- TMPL_UNLESS name="closedate" -->
-		<!-- TMPL_IF NAME="basketno" -->
-		<form action="/cgi-bin/koha/acqui/booksellers.pl" method="get">
-			<input type="hidden" name="op" value="close" />
-			<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
-			<input type="hidden" name="supplier" value="<!-- TMPL_VAR name="booksellerid" -->" />
-			<input type="submit" value="Confirm Close this Basket" />
-		</form>
-		<!-- /TMPL_IF-->
-		<!-- /TMPL_UNLESS -->
-	</div>
-	
-	<div id="acqui_basket_content">
-	<h2>Order Details</h2>
-	<!-- TMPL_IF name="books_loop" -->
-		<table>
-			<tr>
-				<th scope="col">Order</th>
-				<th scope="col">Publisher</th>
-				<th scope="col"><a href="basket.pl?basketno=<!-- TMPL_VAR name="basketno" -->&amp;order=biblio.title">Title</a></th>
-				<th scope="col">RRP</th>
-				<th scope="col">Qty.</th>
-				<th scope="col">Total</th>
-				<th scope="col"><a href="basket.pl?basketno=<!-- TMPL_VAR name="basketno" -->&amp;order=aqorderbreakdown.bookfundid">Fund</a></th>
-<!-- TMPL_IF name="active" -->
-<!-- TMPL_UNLESS name="closedate" -->
-					<th scope="col">Remove</th>
-				<!-- /TMPL_UNLESS -->
-					<!-- /TMPL_IF -->
-			</tr>
-			<!-- TMPL_LOOP NAME="books_loop" -->
-				<!-- TMPL_IF NAME="highlight" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-							<td><!-- TMPL_VAR NAME="ordernumber" --></td>
-					<td><!-- TMPL_VAR NAME="publishercode" --></td>
-					<!-- TMPL_IF name="closedate" -->
-						<td><p>
-							<!-- TMPL_VAR NAME="title" --><br/>
-								<!-- TMPL_VAR NAME="author" -->
-								<!-- TMPL_IF name="isbn"-->- <!-- TMPL_VAR name="isbn" --><!-- /TMPL_IF -->
-								<!-- TMPL_IF name="notes" --></p><p><!--TMPL_VAR name="notes" --><!-- /TMPL_IF -->
-							</p>
-						</td>
-					<!-- TMPL_ELSE -->
-						<td>
-							<p>
-							<a href="neworderempty.pl?ordnum=<!-- TMPL_VAR NAME="ordernumber" -->&booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="title" --></a><br/>
-								<!-- TMPL_VAR NAME="author" -->
-								<!-- TMPL_IF name="isbn"-->- <!-- TMPL_VAR name="isbn" --><!-- /TMPL_IF -->
-								<!-- TMPL_IF name="notes" --></p><p><!--TMPL_VAR name="notes" --><!-- /TMPL_IF -->
-							</p>
-						</td>
-					<!-- /TMPL_IF -->
-					<td><!-- TMPL_VAR NAME="rrp" --></td>					
-					<td><!-- TMPL_VAR NAME="quantity" --></td>
-					<td><!-- TMPL_VAR NAME="line_total" --></td>
-					<td><!-- TMPL_VAR NAME="bookfundid" --></td>
-					<!-- TMPL_IF name="active" -->
-					<!-- TMPL_UNLESS name="closedate" -->
-					<!-- TMPL_UNLESS name="donotdelete" -->
-					<td>
-							<form action="addorder.pl" method="get">
-								<input type="hidden" name="ordnum" value="<!-- TMPL_VAR NAME="ordernumber" -->" />
-								<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
-								<input type="hidden" name="quantity" value="0" />
-								<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
-								<input type="submit" class="delete" value="Delete" />
-							</form>
-						</td>
-					<!-- /TMPL_UNLESS -->
-					<!-- /TMPL_UNLESS -->
-					<!-- /TMPL_IF -->
-				</tr>
-			<!-- /TMPL_LOOP -->
-			
-			<tr>
-				<td colspan="2" rowspan="3">
-					<input type="hidden" name="number" value="<!-- TMPL_VAR NAME="count" -->" />
-					<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
-				</td>
-				<th align="right">SubTotal</th>
-				<th><!-- TMPL_VAR NAME="sub_total_est" --></th>
-				<th><!-- TMPL_VAR name="qty_total" --></th>				
-			</tr>
-			<!--TMPL_IF NAME="disc_est"-->
-			<tr>
-				<th align="right">Discount</th>
-				<th>-<!-- TMPL_VAR NAME="disc_est" --></th>
-			</tr>
-			<!--/TMPL_IF-->
-			<!--TMPL_IF NAME="gist"-->
-			<tr>
-				<th align="right">Tax</th>
-				<th><!-- TMPL_VAR NAME="gist_est" --></th>
-			</tr>
-			<!--/TMPL_IF-->
-			<tr><td></td><td></td>
-				<th align="right">TOTAL</th>
-				<th><!-- TMPL_VAR NAME="grand_total_est" --></th>
-			</tr>
-		</table>
-	<!-- TMPL_ELSE -->
-		<table>
-			<tr><td>Basket empty</td></tr>
-		</table>
-	<!-- /TMPL_IF -->
-	
-	<!-- TMPL_UNLESS name="closedate" -->
-	</div>
-	<div id="acqui_basket_add">
-		<h2>Add To Order</h2>
-		<form action="/cgi-bin/koha/acqui/neworderempty.pl" method="get" name="f" id="f">
-			<input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
-			<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
-			To add from an existing record:
-			<li>Enter an existing  biblionumber: <input type="text"  size="25"   name="biblionumber" />
-			<input type="submit" value="Add order" /></li>
-			<li>or <a href="#" onClick="Searchrecord()">Search for an existing Biblio</a></li>
-			<ul><li><a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->">From a Suggestion</a></li>
-			<li><a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->">New Record</a></li>
-			</ul>
-		</form>
-	</div>
-	<!-- /TMPL_UNLESS -->
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/acqui/booksellers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/acqui/booksellers.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/acqui/booksellers.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/acqui/booksellers.tmpl	20 Sep 2006 21:40:41 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,83 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Search supplier <!-- TMPL_VAR name="bookselname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
-
-<h1>You searched on <b>supplier: <!-- TMPL_VAR name="supplier" -->,</b> <!-- TMPL_VAR name="count" --> baskets found</h1>
-<div id="acqui_order_supplierlist">
-	<table>
-	<tr>
-		<th>Order</th>
-		<th>Company</th>
-		<th>&nbsp;</th>
-		
-	</tr>
-	
-	<!-- TMPL_LOOP name="loop_suppliers" -->
-		<tr>
-			<td>
-				<!-- TMPL_IF name="active" -->
-					<a href="basket.pl?supplierid=<!-- TMPL_VAR name=supplierid -->">Add order</a>
-				<!-- TMPL_ELSE -->
-					Inactive
-				<!-- /TMPL_IF -->
-			</td>
-			
-			<td><a href="supplier.pl?supplierid=<!-- TMPL_VAR name=supplierid -->"><!-- TMPL_VAR name="name" --></a></td>
-			
-			<!--TMPL_IF NAME="ordcount"-->
-				<td>
-				<a href="parcel.pl?supplierid=<!-- TMPL_VAR name="supplierid" -->">Recieve All orders</a>
-				</td>
-			<!--/TMPL_IF-->
-			
-				<td>
-				<table><!--TMPL_IF NAME="ordcount"-->
-					<th>Basket</th>
-					<th>Purchase order</th>
-					<th>Created by</th>
-					<th>Date</th>
-					<th>&nbsp;</th>
-					<!--/TMPL_IF-->	
-						<!-- TMPL_LOOP NAME="loop_basket" -->
-							<tr>
-								<td><!-- TMPL_VAR NAME="basketno" --></td>
-								<td><TMPL_VAR NAME="purchaseordernumber"></td>
-								<td>
-									<!-- TMPL_VAR name="firstname" -->
-										<!-- TMPL_VAR name="surname" -->
-								</td>
-								<td><!-- TMPL_VAR NAME="creationdate" --></td>
-								<td>
-									<!-- TMPL_IF name="closedate" -->
-										closed on <!-- TMPL_VAR NAME="closedate" -->
-										<a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">View</a>
-									<!-- TMPL_ELSE -->
-										<!-- TMPL_IF name="active" -->
-											<a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">modify</a>
-										<!-- TMPL_ELSE -->
-											<a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">View</a>
-										<!-- /TMPL_IF -->
-									<!-- /TMPL_IF -->
-								</td>
-								<td>
-								<!--TMPL_IF NAME="ordcount"-->
-								
-								<a href="parcel.pl?supplierid=<!-- TMPL_VAR name="supplierid" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->">Recieve this order</a>
-								
-								<!--/TMPL_IF-->
-								</td>
-							</tr>
-						<!-- /TMPL_LOOP -->
-					</table>
-			</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		</table>
-</div>
-<div id="acqui_order_add_supplier">
-	<form action="supplier.pl">
-		<input type="hidden" name="supplierid" value="0" />
-		<input type="submit" value="Add supplier" />
-	</form>
-</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/acqui/finishreceive.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/acqui/finishreceive.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/acqui/finishreceive.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/acqui/finishreceive.tmpl	20 Sep 2006 21:40:41 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Receipt Summary for : <!-- TMPL_VAR NAME="name" --> <!-- TMPL_IF NAME="invoice" -->Invoice, <!-- TMPL_VAR NAME="invoice" --><!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
-
-
-<h1>Finish Receiveing Order </h1>
-
-
-
-
-   
-<div id="acqui_acquire_orderlist">
-    <table><tr><th colspan="5">Use these values to create the items for this order</th><tr>
-    <tr>
-        <th>Title</th>
-        <th>Supplier</th>
-        <th>Replacement</th>
-        <th>Qty</th>
-        
-    </tr>
-    <!-- TMPL_LOOP name="loopbiblios" -->
-        <tr><input type="hidden" name="bibliocount" value="<!--TMPL_VAR NAME="biblionumber"-->"/>
-            <td><!-- TMPL_VAR NAME="title" --></td>
-            <td><!-- TMPL_VAR NAME="supplier" --></td>
-             <td><!-- TMPL_VAR NAME="rrp" --></td>
-            <td><input type="text" name="itemcount" size="1" value="<!-- TMPL_VAR NAME="itemcount" -->" READONLY/></td>
-            <td><div id="<!--TMPL_VAR NAME="biblionumber"-->"><a href="#" onClick="AddItem(<!--TMPL_VAR NAME="biblionumber"-->)">Add item</a></div></td>
-        </tr>
-    <!-- /TMPL_LOOP -->
-    </table>
-</div>
-
-<script type="text/javascript">
-function AddItem(biblionumber) {
-     window.open("/cgi-bin/koha/cataloguing/additem.pl?fromserials=1&serialid=000&biblionumber="+biblionumber,"AddItem",'width=700,height=400,toolbar=no,scrollbars=yes,status=yes');
-
-}
-</script>
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/acqui/histsearch.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/acqui/histsearch.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/acqui/histsearch.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/acqui/histsearch.tmpl	20 Sep 2006 21:40:41 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,106 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Search order
-<!-- TMPL_INCLUDE NAME="doc-head-close-calendar.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
-
-	<h1>Order search</h1>
-	<div id="acqui_histsearch">
-		<form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
-		<table>
-			<tr>
-				<th>&nbsp;</th>
-				<th>Title</th>
-				<th>Author</th>
-				<th>Supplier</th>
-				<th>Placed on</th>
-				<th>Recieved on</th>
-				<th>Quantity ordered</th>
-				<th>Unit cost</th>
-				<th>&nbsp;</th>
-			</tr>
-			<tr>
-					<th>Filter By:</th>
-					<th><input type="text" name="title" value="<!-- TMPL_VAR name="title"-->" /></th>
-					<th><input type="text" name="author" value="<!-- TMPL_VAR name="author" -->" /></th>
-					<th><input type="text" name="name" value="<!-- TMPL_VAR name="name" -->" /></th>
-					<th>From <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFrom" style="cursor: pointer;" alt="calendar" />
-						<input type="text" readonly="readonly" size="10" id="from" name="fromplacedon" value="<!-- TMPL_VAR name="from_placed_on" -->" />
-						<script language="JavaScript" type="text/javascript">
-							function validate1(date) {
-								var day = date.getDate();
-								var month = date.getMonth() + 1;
-								var year = date.getFullYear();
-								var weekDay = date.getDay();
-								var dayMonth = month + '-' + day;
-								var dateString = year + '-' + month + '-' + day;
-								var dateTo = document.getElementById('to').value.split("-");
-								var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-								if (date > limitDate) {
-									return true;
-								} else {
-									return false;
-								}
-							}
-							Calendar.setup(
-								{
-									inputField : "from",
-									ifFormat : "%Y-%m-%d",
-									button : "openCalendarFrom",
-									disableFunc : validate1,
-									dateStatusFunc : validate1
-								}
-							);
-						</script>
-						To <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" alt="calendar" />
-						<input readonly="readonly" size="10" id="to" name="toplacedon" value="<!-- TMPL_VAR name="to_placed_on" -->" type="text" />
-						<script type="text/javascript">
-							function validate2(date) {
-								var day = date.getDate();
-								var month = date.getMonth() + 1;
-								var year = date.getFullYear();
-								var weekDay = date.getDay();
-								var dayMonth = month + '-' + day;
-								var dateString = year + '-' + month + '-' + day;
-								var dateFrom = document.getElementById('from').value.split("-");
-								var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-								if (limitDate > date) {
-									return true;
-								} else {
-									return false;
-								}
-							}
-	
-							Calendar.setup(
-								{
-									inputField : "to",
-									ifFormat : "%Y-%m-%d",
-									button : "openCalendarTo",
-									disableFunc : validate2,
-									dateStatusFunc : validate2
-								}
-							);
-						</script></th>
-					<th>&nbsp;</th>
-					<th>&nbsp;</th>
-					<th>&nbsp;</th>
-					<th><input type="submit" value="Set Filter" /></th>
-			</tr>
-			<!-- TMPL_LOOP NAME="suggestions_loop" -->
-				<tr>
-					<td>&nbsp;</td>
-					<td><a href="basket.pl?basketno=<!-- TMPL_VAR name="basketno" -->"><!-- TMPL_VAR NAME="title" --></a></td>
-					<td><!-- TMPL_VAR NAME="author" --></td>
-					<td><!-- TMPL_VAR NAME="name" --></td>
-					<td><!-- TMPL_VAR name="creationdate" --></td>
-					<td><!-- TMPL_VAR name="datereceived" --></td>
-					<td><!-- TMPL_VAR name="quantity" --></td>
-					<td><!-- TMPL_VAR name="ecost" --></td>
-					<td>&nbsp;</td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-		</form>
-	</div>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/acqui/lateorders.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/acqui/lateorders.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/acqui/lateorders.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/acqui/lateorders.tmpl	20 Jan 2006 16:04:42 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,111 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Acquisitions<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
-
-<h1 ><!-- TMPL_IF name="Supplier" --><!-- TMPL_VAR name="Supplier" --> : <!--/TMPL_IF -->Late issues</h1>
-	<div id="acqui_lateorders">
-		<form action="lateorders.pl" method="post">
-		<table>
-			<tr>
-				<th>Supplier</th>
-				<th>Order Date</th>
-				<th>Ordered for</th>
-				<th>Including Basket</th>
-				<th>Book information</th>
-				<th>Branch</th>
-				<th>Estimated Unit Price</th>
-				<th>Retailer Catalogue Unit Price</th>
-				<th>Quantity</th>
-				<th>Total cost</th>
-				<th>Budget</th>
-				<th>&nbsp;</th>
-			</tr>
-			<tr>
-					<td class="doNotPrint">
-						<!-- TMPL_VAR name="CGIsupplier" -->
-					</td>
-					<td> &nbsp;</td>
-					<td align="center" class="doNotPrint">
-						<input align="right" size="4" maxlength="3" type="text" name="delay" value="<!--TMPL_VAR Name="delay" -->" /> days
-					</td>
-					<td colspan="2">
-						&nbsp;
-					</td>
-					<td class="doNotPrint">
-						<select name="branch">
-						<!-- TMPL_LOOP name="branchloop" -->
-							<option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="branchname" --></option>
-						<!-- /TMPL_LOOP -->
-						</select>
-					</td>
-					<td colspan="5">
-						&nbsp;
-					</td>
-					
-					<td class="doNotPrint">
-						<input type="submit" value="filter" />
-					</td>
-			</tr>
-			<!-- TMPL_LOOP name="lateorders" -->
-				<!--TMPL_IF Name="hilighted" --> <tr class="hilighted"> <!--TMPL_ELSE--> <tr> <!-- /TMPL_IF -->
-					<td class="doNotPrint">
-						<!-- TMPL_VAR name="supplier" -->
-					</td>
-					<td>
-						<!-- TMPL_VAR name="orderdate" -->
-					</td>
-					<td class="number" align="right">
-						<!-- TMPL_VAR name="latesince" -->
-					</td>
-					<td align="center" class="doNotPrint">
-						<!-- TMPL_VAR name="basketno" -->
-					</td>
-					<td >
-						<b><!-- TMPL_VAR name="title" --></b>
-					<!-- TMPL_IF name="author" --><br/><i>Author:</i> <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF -->
-					<!-- TMPL_IF name="publisher" --><br/><i>Published by:</i> <!-- TMPL_VAR NAME="publisher" --><!-- TMPL_IF name="publicationyear" --><i> in </i><!-- TMPL_VAR name="publicationyear" --><!-- /TMPL_IF --><!-- /TMPL_IF -->
-					</td>
-					<td class="doNotPrint">
-						<!-- TMPL_VAR name="branch" -->
-					</td>
-					<td align="right" class="doNotPrint">
-						<!-- TMPL_VAR name="unitpricelib" -->
-					</td>
-					<td align="right">
-						<!-- TMPL_VAR name="unitpricesupplier" -->
-					</td>
-					<td align="right">
-						<!-- TMPL_VAR name="quantity" -->
-					</td>
-					<td align="right">
-						<!-- TMPL_VAR name="subtotal" -->
-					</td>
-					<td class="doNotPrint">
-						<!-- TMPL_VAR name="budget" -->
-					</td>
-					<td class="doNotPrint">
-						&nbsp;
-					</td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-			<tr> 
-					<th>
-						Total
-					</th>
-					<th colspan="2">
-						&nbsp;
-					</th>
-					<th class="doNotPrint"> &nbsp;</th>
-					<th colspan="5">
-						&nbsp;
-					</th>
-					
-					<th>
-						<!-- TMPL_VAR name="total" -->
-					</th>
-			</tr>
-		</table>
-		</form>
-	</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/acqui/neworderempty.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/acqui/neworderempty.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/acqui/neworderempty.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/acqui/neworderempty.tmpl	20 Sep 2006 21:40:41 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,254 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Shopping Basket For: <!-- TMPL_VAR name="bookselname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
-
-<script language="javascript" type="text/javascript">
-
-function update(f){
-  //collect values
-  quantity=f.quantity.value
-  if (quantity ==0) {
-  	alert("Quantity must be >0");
-  }
-  discount=f.discount.value
-  listinc=parseInt(f.listinc.value)
-  currency=f.currency.value
-  applygst=parseInt(f.applygst.value)
-  listprice=f.list_price.value
-  //  rrp=f.rrp.value
-  //  ecost=f.ecost.value  //budgetted cost
-  //  GST=f.GST.value
-  //  total=f.total.value
-  //make useful constants out of the above
-  exchangerate=f.elements[currency].value      //get exchange rate
-  gst_on=(applygst);
-  //do real stuff
-   if (listinc){
-listprice=listprice*100/(100+f.gstrate.value)
-}
-  rrp=listprice*exchangerate;
-  ecost=rrp*(100-discount)/100
-  GST=0;
-  if (gst_on){
- //   rrp=rrp*(1+f.gstrate.value/100);
-    GST=ecost*(f.gstrate.value)/100;
-  }
-
-  total=(ecost+GST)*quantity
-
-  f.rrp.value=rrp;
-  f.ecost.value=ecost;
-  f.unitprice.value=ecost+GST
-  f.GST.value=GST;
-  f.total.value=total;
-  return true;
-}
-
-
-
-function messenger(X,Y,etc){
-	win=window.open("","mess","height="+X+",width="+Y+",screenX=150,screenY=0");
-	win.focus();
-	win.document.close();
-	win.document.write("<body link='#333333' bgcolor='#ffffff' text='#000000'><font size='2'><p><br>");
-	win.document.write(etc);
-	win.document.write("<center><form><input type=button onclick='self.close()' value='Close'></form></center>");
-	win.document.write("</font></body></html>");
-}
-
-function check(f) {
-  quantity=f.quantity.value;
-  title=f.title.value;
- biblio=f.biblionumber.value;
- invoice=f.purchaseordernumber.value;
-suggestionid="<!--TMPL_VAR NAME="suggestionid"-->";
-  if (title == "") {
-  	alert("Title can't be empty- Have you created the biblio?");
-	return false;
-  }
- if (biblio == "" && suggestionid=="") {
-  	alert("A biblio is not created- please create the biblio first?");
-	return false;
-  }
-  if (quantity ==0) {
-  	alert("Quantity must be >0");
-	return false;
-  }
-
-	document.frusin.submit();
-}
-function AddBiblio() {
-     window.open("/cgi-bin/koha/cataloguing/addbiblio.pl?fromserials=1&popup=1&suggestionid=<!--TMPL_VAR NAME="suggestionid"-->","AddBiblio",'width=700,height=400,toolbar=no,scrollbars=yes,status=yes');
-
-}
-</script>
-<h1>
-	<!-- TMPL_IF name="ordnum" -->
-		Modify order details (line #<!-- TMPL_VAR NAME="ordnum" -->)
-	<!-- TMPL_ELSE -->
-		New order
-	<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="suggestionid" -->(defined from suggestion #<!-- TMPL_VAR NAME="suggestionid" -->)<!-- /TMPL_IF -->
-</h1>
-	<div id="acqui_basket_summary">
-		<h2>Basket Details</h2>
-		<table>
-		<tr><th>Basket Number:</th><td><!-- TMPL_VAR NAME="basketno" --></td></tr>
-		<tr><th>Managed By:</th><td><!-- TMPL_VAR NAME="authorisedbyname" --></td></tr>
-		<tr><th>Open On:</th><td><!-- TMPL_VAR NAME="creationdate" --></td></tr>
-		<tr><th>For:</th><td>Supplier Id <!-- TMPL_VAR NAME="booksellerid" --></td></tr>
-		<tr><th>Invoice Number:</th><td><!-- TMPL_VAR NAME="booksellerinvoicenumber" --></td></tr>
-		<tr><th>Purchase Order Number:</th><td><!-- TMPL_VAR NAME="purchaseordernumber" --></td></tr>
-		<!-- TMPL_IF name="closedate" --><tr><th>Closed On:</th><td> <!-- TMPL_VAR name="closedate" --></td></tr><!-- /TMPL_IF -->
-		</table>
-	</div>
-
-<div id="acqui_newbiblio_edit_catalogue">
-	<h2>catalogue details</h2>
-	<form action="/cgi-bin/koha/acqui/addorder.pl" method="post" name="frusin">
-	<!-- TMPL_UNLESS name="existing" -->
-		<input type="hidden" name="existing" value="no" >
-	<!-- /TMPL_UNLESS -->
-	<input type="hidden" name="ordnum" value="<!-- TMPL_VAR NAME="ordnum" -->" />
-	<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
-	<input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
-	<input type="hidden" name="biblionumber" id="biblionumber"  value="<!-- TMPL_VAR NAME="biblionumber" -->" />
-	<input type="hidden" name="oldtype" value="<!-- TMPL_VAR NAME="itemtype" -->" />
-	<input type="hidden" name="listinc" value="<!-- TMPL_VAR NAME="listincgst" -->" />
-	<input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="currency" -->" />
-	<input type="hidden" name="applygst" value="<!-- TMPL_VAR NAME="gstreg" -->" />
-	<input type="hidden" name="suggestionid" value="<!-- TMPL_VAR NAME="suggestionid" -->" />
-	<!-- TMPL_LOOP NAME="loop_currencies" -->
-		<input type="hidden" name="<!-- TMPL_VAR NAME="currency" -->" value="<!-- TMPL_VAR NAME="rate" -->" />
-	<!-- /TMPL_LOOP -->
-	
-	<p> 
-		<label><b>Title *</b></label>
-		
-			<input type="text" size="20" name="title" id="title" value="<!-- TMPL_VAR NAME="title" -->" READONLY/>Auto filled
-	</p>
-	<!-- TMPL_IF name="biblionumber" -->
-	<p>
-		<label>Author</label>
-			<input type="hidden" size="20" name="author" value="<!-- TMPL_VAR NAME="author" -->" /><!-- TMPL_VAR NAME="author" -->
-	</p>
-	<p>
-		<label> Publisher</label>
-			<input type="hidden" size="20" name="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->" /><!-- TMPL_VAR NAME="publishercode" -->
-	</p>
-	<p>
-		<label>Copyright Date</label>
-			<input type="hidden" size="20" name="copyrightdate" value="<!-- TMPL_VAR NAME="copyrightdate" -->" /><!-- TMPL_VAR NAME="copyrightdate" -->
-		
-	</p>
-	<p>
-		<label>Format</label>
-		<!-- TMPL_VAR NAME="itemtype" -->
-	</p>
-	<p>
-		<label>ISBN</label>
-			<input type="hidden" size="20" name="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_VAR NAME="isbn" -->
-		
-	</p>
-	<p>
-		<label>Series</label>
-			<input type="hidden" size="20" name="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" /><!-- TMPL_VAR NAME="seriestitle" -->
-	</p>
-	<!--TMPL_ELSE-->
-	<!--TMPL_UNLESS NAME="suggestionid"--><p><a href="#" onClick="AddBiblio()">First Create a Biblio for this order</a></p><!--/TMPL_UNLESS-->
-	<!--/TMPL_IF-->
-		
-	<h2>Accounting details</h2>
-		<p>
-		<label>Branch</label>
-		<select name="branch">
-		<!-- TMPL_LOOP name="branchloop" -->
-			<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="branchname" --></option>
-		<!-- /TMPL_LOOP -->
-		</select>
-	</p>
-		<p>
-			<label>Quantity</label>
-			
-				<input type="text" size="20" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" onchange="update(this.form);" <!-- TMPL_IF name="close" -->readonly<!--/TMPL_IF--/>
-		
-		</p>
-		<p>
-			<label>Bookfund</label>
-			<!-- TMPL_IF name="close" -->
-				<input type="hidden" size="20" name="bookfundid" value="<!-- TMPL_VAR NAME="bookfundid" -->" /><!-- TMPL_VAR NAME="bookfundname" -->
-			<!-- TMPL_ELSE -->
-				<!-- TMPL_VAR NAME="CGIbookfund" -->
-		  	<!--/TMPL_IF-->
-		</p>
-		Note: All figures are in local currency, except the suppliers list price which is indicated.Currency conversion is done automatically
-		<!-- TMPL_IF NAME="gstreg" -->
-		<p>
-		 <label> Applicable Tax rate</label>
-		<input type="text" size="20" name="gstrate" value="<!--TMPL_VAR NAME="gstrate"-->" onchange="update(this.form)" />%
-		</p>
-		<!--/TMPL_IF-->
-		<p>
-			<label>Suppliers List Price</label>
-	
-				<input type="text" size="20" name="list_price" value="<!-- TMPL_VAR NAME="listprice" -->" onchange="update(this.form)" <!-- TMPL_IF name="close" -->readonly<!--/TMPL_IF-->/><!-- TMPL_VAR NAME="currency" -->
-		  	
-		</p>
-		<p>
-			<label>Replacement Cost </label>
-				<input type="text" size="20" name="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" <!-- TMPL_IF name="close" -->readonly<!--/TMPL_IF--> />
-		  	
-		</p>
-		<p>
-			<label>Discount Applied</label>
-			<input type="text" size="20" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" onchange="update(this.form)" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF--> />%
-		</p>
-		<p>
-			<label>Budgeted Cost</label>
-			<input type="text" size="20" name="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF--> />
-		</p>
-		<!--TMPL_IF NAME="gstreg"-->
-		<p>
-			<label>Budgeted GST</label>
-			<input type="text" size="20" name="GST" value="<!-- TMPL_VAR NAME="gst" -->" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF--> />
-		</p>
-		<!--/TMPL_IF-->
-		<p>
-			<label><b>BUDGETED TOTAL</b></label>
-			<input type="text" size="20" name="total" value="<!-- TMPL_VAR name="total"-->" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF--> />
-		</p>
-		<p>
-			<label>Unit Cost</label>
-			<input type="text" size="20" name="unitprice" value="<!-- TMPL_VAR name="unitprice"-->" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF--> /><!--TMPL_IF NAME="gstreg"-->includes any applicable tax less any discount<!--/TMPL_IF-->
-		</p>
-		<p>
-			<label>Purchase Order No </label>
-			<input type="text" size="20" name="purchaseordernumber"  value="<!-- TMPL_VAR name="purchaseordernumber" -->" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF--> /> (using recommended!)
-		</p>
-		<p>
-			<label>Notes</label>
-			<input type="text" size="20" name="notes" value="<!-- TMPL_VAR NAME="notes" -->" />
-		</p>
-		<p>The 2 following fields are available for your own usage. They can be useful for stat purposes</p>
-		<p>
-			<label>Sort field 1</label>
-			<!-- TMPL_IF Name="CGIsort1" -->
-				<!-- TMPL_VAR Name="CGIsort1" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="sort1" value="<!-- TMPL_VAR NAME="sort1" -->" />
-			<!--/TMPL_IF -->
-		</p>
-		<p>
-			<label>Sort field 2</label>
-			<!-- TMPL_IF Name="CGIsort2" -->
-				<!-- TMPL_VAR Name="CGIsort2" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" size="20" name="sort2" value="<!-- TMPL_VAR NAME="sort2" -->" />
-			<!--/TMPL_IF -->
-		</p>
-		<p>
-			<input type="button" value="OK" onclick="check(this.form)" />
-		</p>
-	</form>
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/acqui/newordersuggestion.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/acqui/newordersuggestion.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/acqui/newordersuggestion.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/acqui/newordersuggestion.tmpl	20 Sep 2006 21:40:41 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,65 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Add order from suggestion: <!-- TMPL_VAR name="bookselname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
-
-<h1>Suggestions</h1>
-<div id="acqui_suggestion_select">
-	<form action="/cgi-bin/koha/acqui/newordersuggestion.pl" method="get">
-	<table>
-		<tr>
-			<th>Suggestion</th>
-			<th>Suggested by</th>
-			<th>Accepted by</th>
-			<th>&nbsp;</th>
-		</tr>
-		<tr>
-			<th>
-				<p>Filter on :
-				title: <input type="text" name="title" value="<!-- TMPL_VAR NAME="title"-->" />
-				author: <input type="text" name="author" value="<!-- TMPL_VAR NAME="author" -->" />
-				publisher: <input type="text" name="publishercode" value="<!-- TMPL_VAR NAME="publishercode"-->" /></p>
-			</th>
-			<th>
-				&nbsp;
-			</th>
-			<th>
-				&nbsp;
-			</th>
-			<th>
-				<input type="submit" class="button acquisition" value="Set Filter" />
-			</th>
-		</tr>
-		<!-- TMPL_LOOP NAME="suggestions_loop" -->
-			<tr>
-				<td>
-					<p><!-- TMPL_VAR NAME="title" --> - <!-- TMPL_VAR NAME="author" --></p>
-					<p>
-						<!-- TMPL_IF name="copyrightdate" -->copy. year:<!-- TMPL_VAR NAME="copyrightdate" --> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="volumedesc" -->volume:<i><!-- TMPL_VAR NAME="volumedesc" --></i> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="isbn" -->ISBN :<i><!-- TMPL_VAR NAME="isbn" --></i> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="publishercode" --><br/>published by:<!-- TMPL_VAR NAME="publishercode" --> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="publicationyear" --> in <i><!-- TMPL_VAR NAME="publicationyear" --></i> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="place" --> at <i><!-- TMPL_VAR NAME="place" --></i> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="note" --><p><i>(<!-- TMPL_VAR NAME="note" -->)</i></p> <!-- /TMPL_IF -->
-					</p>
-				</td>
-				<td>
-					<!-- TMPL_VAR NAME="surnamesuggestedby" --><!-- TMPL_IF name="firstnamesuggestedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="firstnamesuggestedby" -->
-				</td>
-				<td>
-					<!-- TMPL_VAR NAME="surnamemanagedby" --><!-- TMPL_IF name="firstnamemanagedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="firstnamemanagedby" -->
-				</td>
-				<td>
-					<!-- TMPL_IF name="biblionumber" -->
-						<a href="neworderempty.pl?booksellerid=<!-- TMPL_VAR NAME="supplierid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;suggestionid=<!-- TMPL_VAR NAME="suggestionid" -->&biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button acquisition">Order</a>
-					<!-- TMPL_ELSE -->
-						<a href="neworderempty.pl?booksellerid=<!-- TMPL_VAR NAME="supplierid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;suggestionid=<!-- TMPL_VAR NAME="suggestionid" -->" class="button acquisition">Order</a>
-					<!-- /TMPL_IF -->
-				</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-	</table>
-	</form>
-</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/acqui/parcel.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/acqui/parcel.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/acqui/parcel.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/acqui/parcel.tmpl	20 Sep 2006 21:40:41 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,172 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Recieve <!-- TMPL_VAR name="bookselname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
-<script type="text/javascript">
-function docalculate(){
-  //collect values
-received=document.getElementsByName('received');
- actual=document.getElementsByName('actual');
- freight=document.getElementsByName('freight');
-discounts=document.getElementsByName('discount');
-gstrate=document.getElementsByName('gstrate');
-totalreceived=0;
-totalactual=0;
-totalfreight=0;
-totaldiscount=0;
-totalgst=0;
-	for (var s=0; s<received.length; s++){
-		receivedvalue =received.item(s).value;	
-		totalreceived +=(receivedvalue*1);
-		thisactual =actual.item(s).value*receivedvalue;
-		totalactual +=thisactual;
-		totalfreight +=freight.item(s).value*receivedvalue;
-		thisdiscount =thisactual*discounts.item(s).value/100;
-		totaldiscount +=thisdiscount;
-		totalgst +=(thisactual - thisdiscount)*gstrate.item(s).value/100;
-	}
- document.f.totalreceived.value=totalreceived*1;
- document.f.totalactual.value=totalactual;
- document.f.totalfreight.value=totalfreight*1;
-document.f.actualdiscount.value=totaldiscount;
-includesgst=parseInt(document.f.incgst.value);
- if(includesgst>0){
- document.f.actualgst.value="-inc.-";
- }else{
- document.f.actualgst.value=totalgst;
-}
-document.f.freightgst.value=totalfreight*document.f.freightgstrate.value/100;
-disct=0;
- if ( document.f.actualgst.value>0){
-disct= document.f.actualgst.value;
-}
-document.f.actualtotal.value=totalactual + -totaldiscount +disct*1;
-document.f.actualfreight.value=totalfreight+ document.f.freightgst.value*1;
-document.f.invoicetotal.value=document.f.actualfreight.value*1 +document.f.actualtotal.value*1;
-<!--TMPL_IF NAME="invcurrency"-->
-document.f.localtotal.value=document.f.invoicetotal.value*<!--TMPL_VAR NAME="currencyrate"-->;
-<!--/TMPL_IF-->
-  return true;
-}
-function updatetotal(){
-document.f.actualtotal.value= document.f.totalactual.value - document.f.actualdiscount.value + document.f.actualgst.value*1;
-document.f.invoicetotal.value=document.f.actualfreight.value*1+document.f.actualtotal.value*1;
-<!--TMPL_IF NAME="invcurrency"-->
-document.f.localtotal.value=document.f.invoicetotal.value*<!--TMPL_VAR NAME="currencyrate"-->;
-<!--/TMPL_IF-->
-  return true;
-}
-function checkform(){
-if (document.f.invoice.value==""){
-alert ("You need a suppliers Invoice number!");
-return false;
-}
-if ( document.f.totalreceived.value==0 || document.f.totalreceived.value==""){
-alert ("no items entered as received !");
-return false;
-}
-document.f.submit();
-}
-</script>
-    <h1>
-                 Orders being recieved from <!-- TMPL_VAR NAME="name" -->
-      
-    </h1>
- <form action="finishreceive.pl" method="post" name="orderform" id="f">
-<input type="hidden" name="supplierid" value="<!--TMPL_VAR NAME="supplierid"-->" />
-<div >
-<p>Received By: <!-- TMPL_VAR NAME="user" --></p>
-<p>   Suppliers Invoice No: <input type="text" name="invoice" value="<!-- TMPL_VAR NAME="invoice" -->" />
-    
-    Date received:  <input type="text" name="datereceived" value="<!-- TMPL_VAR NAME="date" -->" /></p>
-</div>
-<div >
-    <h2>Recieve list</h2>
-   <input type="hidden" name="incgst" value="<!--TMPL_VAR NAME="incgst"-->" />
-  <input type="hidden" name="currencyrate" value="<!--TMPL_VAR NAME="currencyrate"-->" />
-    <table >
-	<tr>Rate of tax used for P&P:<input type="text" size="2" name="freightgstrate" value="<!--TMPL_VAR NAME="gstrate"-->" />%</td>
-        <tr> <th align="left">Basket/Order</th>
-             <th class="acquisition">ISBN</th>
-            <th class="acquisition">Title</th>
-            <th class="acquisition">Price</th>
-	  <th class="acquisition">Actual <!--TMPL_VAR NAME="invcurrency"--></th>
-            <th class="acquisition">P&amp;P <!--TMPL_VAR NAME="invcurrency"--></th>
-            <th class="acquisition">Qty</th>
-	 <th class="acquisition">Received</th>
-            
-        </tr>
-        <!-- TMPL_LOOP NAME="loop_orders" -->
-            <tr><input type="hidden" name="ordernumber" value="<!-- TMPL_VAR NAME="ordernumber" -->" />
-	<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
-	<input type="hidden" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
-                <td ><!-- TMPL_VAR NAME="basketno" -->/<!-- TMPL_VAR NAME="ordernumber" --></td>
-                <td><!-- TMPL_VAR NAME="isbn" --></td>
-                <td><!-- TMPL_VAR NAME="title" --></td>
-                <td align="right"><!-- TMPL_VAR NAME="rrp" --></td>
-                <td align="right"> <input type="text" size="2" name="actual" value="<!-- TMPL_VAR NAME="actualrrp" -->" onChange="docalculate();"/></td>
-	  <td align="right"> <input type="text" size="2" name="freight" value="0.00" onChange="docalculate();"/></td>
-                <td><!-- TMPL_VAR NAME="quantity" --></td>
-	<td> <input type="text" size="2" name="received" value="<!-- TMPL_VAR NAME="toreceive" -->" onChange="docalculate();"/></td>
-                <input type="hidden" name="discount" value="<!--TMPL_VAR NAME="discount"-->" />
-	<input type="hidden" name="gstrate" value="<!--TMPL_VAR NAME="gst"-->" />
-            </tr>
-        <!-- /TMPL_LOOP -->
-        <tr>
-            <td ></td>
-            <td></td>
-            <th class="acquisition" align="right">SubTotals</th>
-            <td align="right"><b><!-- TMPL_VAR NAME="totalprice" --></b></td>
-	<td align="right"><b><input type="text" name="totalactual" size="2" value="<!-- TMPL_VAR NAME="totalactual" -->" /></b></td>
-            <td align="right"><b><input type="text" size="2" name="totalfreight" /></b></th>
-            <td ><b><!-- TMPL_VAR NAME="totalquantity" --></b></td>
-	 <td ><b><input type="text" size="2" name="totalreceived" value="<!-- TMPL_VAR NAME="totaltoreceive" -->" READONLY /></b></td>
-          
-        </tr>
-	 <!--TMPL_IF NAME="totaldiscount"-->    <tr>
-           <td >&nbsp;</td>
-            <td>&nbsp;</td>
-  <th class="acquisition" align="right">- Discount</th>
-            <td align="right"><b><!-- TMPL_VAR NAME="totaldiscount" --></b></td>
-	<td align="right"><b><input type="text" name="actualdiscount" size="2" value="<!-- TMPL_VAR NAME="actualdiscount" -->" onChange="updatetotal();"/></b></td>
-        </tr><!--/TMPL_IF-->
-     <!--TMPL_IF NAME="gstreg"-->    <tr>
-           <td >&nbsp;</td>
-            <td>&nbsp;</td>
-  <th class="acquisition" align="right">Tax</th>
-            <td align="right"><b><!-- TMPL_VAR NAME="totalgst" --></b></td>
-	<td align="right"><b><input type="text" name="actualgst" size="2" value="<!-- TMPL_VAR NAME="actualgst" -->"/></b></td>
-	<td align="right"><b><input type="text" name="freightgst" size="2"  /></td></b>
-        </tr><!--/TMPL_IF-->
-        <tr>
-	 <td >&nbsp;</td>
-            <td>&nbsp;</td>
-            <th class="acquisition" align="right">Totals</th>
-            <td align="right"><b><!-- TMPL_VAR NAME="total" --></b></td>
-	<td align="right"><b><input type="text" name="actualtotal" size="2" value="<!-- TMPL_VAR NAME="actualtotal" -->"   onChange="updatetotal();"/></b></td>
-	<td align="right"><b><input type="text" name="actualfreight" size="2"  onChange="updatetotal();"/></b></td>
-        </tr>
-	<tr>
-	<td >&nbsp;</td>
-	<td >&nbsp;</td>
-            <th class="acquisition" align="right" colspan="5">Invoice Total <!--TMPL_VAR NAME="invcurrency"--></th>         
-	<td ><b><input type="text" name="invoicetotal" size="4"  /></b></td>
-        </tr>
-	<!--TMPL_IF NAME="invcurrency"-->
-	<tr>
-	<td >&nbsp;</td>
-	<td >&nbsp;</td>
-            <th class="acquisition" align="right" colspan="5">Invoice Total </th>         
-	<td ><b><input type="text" name="localtotal" size="4"  /></b></td>
-        </tr>
-	<!--/TMPL_IF-->
-    </table>
-Note: P&P is per item. If you have a total freight fill the Total P&P only.!
-	<p><input type="button" value="Receive" onClick="checkform();" /></p>
-    </form>
-</div>
-<script>
-updatetotal();
-</script>
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
- 

Index: koha-tmpl/intranet-tmpl/prog/en/acqui/parcels.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/acqui/parcels.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/acqui/parcels.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/acqui/parcels.tmpl	20 Sep 2006 21:40:41 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,106 +0,0 @@
- <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Recieve <!-- TMPL_VAR name="bookselname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
-
-<h1 class="acquisition">Receive parcel from supplier <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="name" --></a></h1>
-
-<!-- TMPL_IF NAME="count" --><p> <!-- TMPL_VAR NAME="count" --> parcels found</p><!--/TMPL_IF-->
-<div id="resultnumber">
-<!-- Row of numbers corresponding to search result pages -->
-<!-- TMPL_IF NAME="displayprev" -->
-	<a href="parcels.pl?supplierid=<!-- TMPL_VAR NAME="supplierid" -->&amp;startfrom=<!-- TMPL_VAR NAME="prevstartfrom" --><!--TMPL_IF Name="datefrom"-->&amp;datefrom=<!--TMPL_VAR Name="datefrom"--><!--/TMPL_IF--><!--TMPL_IF Name="dateto"-->&amp;dateto=<!--TMPL_VAR Name="dateto"--><!--/TMPL_IF--><!--TMPL_IF Name="code"-->&amp;filter=<!--TMPL_VAR Name="code"--><!--/TMPL_IF--><!--TMPL_IF Name="orderby"-->&amp;orderby=<!--TMPL_VAR Name="orderby"--><!--/TMPL_IF--><!--TMPL_IF Name="resultsperpage"-->&amp;resultsperpage=<!--TMPL_VAR Name="resultsperpage"--><!--/TMPL_IF-->&amp;type=intra"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border="0"></a>
-<!-- TMPL_ELSE -->
-	<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/placeholder.gif" border="0">
-<!-- /TMPL_IF -->
-<!-- TMPL_LOOP NAME="numbers" -->
-	<!-- TMPL_IF NAME="highlight" -->
-	<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
-	<!-- TMPL_ELSE -->
-	<a href="parcels.pl?supplierid=<!-- TMPL_VAR NAME="supplierid" -->&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" --><!--TMPL_IF Name="datefrom"-->&amp;datefrom=<!--TMPL_VAR Name="datefrom"--><!--/TMPL_IF--><!--TMPL_IF Name="dateto"-->&amp;dateto=<!--TMPL_VAR Name="dateto"--><!--/TMPL_IF--><!--TMPL_IF Name="code"-->&amp;filter=<!--TMPL_VAR Name="code"--><!--/TMPL_IF--><!--TMPL_IF Name="orderby"-->&amp;orderby=<!--TMPL_VAR Name="orderby"--><!--/TMPL_IF--><!--TMPL_IF Name="resultsperpage"-->&amp;resultsperpage=<!--TMPL_VAR Name="resultsperpage"--><!--/TMPL_IF-->&amp;type=intra"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
-	<!-- /TMPL_IF -->
-<!-- /TMPL_LOOP -->
-<!-- TMPL_IF NAME="displaynext" -->
-	<a href="parcels.pl?supplierid=<!-- TMPL_VAR NAME="supplierid" -->&amp;startfrom=<!-- TMPL_VAR NAME="nextstartfrom" --><!--TMPL_IF Name="datefrom"-->&amp;datefrom=<!--TMPL_VAR Name="datefrom"--><!--/TMPL_IF--><!--TMPL_IF Name="dateto"-->&amp;dateto=<!--TMPL_VAR Name="dateto"--><!--/TMPL_IF--><!--TMPL_IF Name="code"-->&amp;filter=<!--TMPL_VAR Name="code"--><!--/TMPL_IF--><!--TMPL_IF Name="orderby"-->&amp;orderby=<!--TMPL_VAR Name="orderby"--><!--/TMPL_IF--><!--TMPL_IF Name="resultsperpage"-->&amp;resultsperpage=<!--TMPL_VAR Name="resultsperpage"--><!--/TMPL_IF-->&amp;type=intra"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0"></a>
-<!-- TMPL_ELSE -->
-	<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/placeholder.gif" border="0">
-<!-- /TMPL_IF -->
-</div>
-
-<div id="resultlist">
-<!-- Search Results Table -->
-
-<form method="post" action="parcels.pl">
-	<table class="small">
-		<tr>
-			<th class="acquisition">Line</th>
-			<th class="acquisition">Code</th>
-			<th class="acquisition">Date Received</th>
-			<th class="acquisition">Item Count</th>
-			<th class="acquisition">Biblio count</th>
-			<th class="acquisition">Items expected</th>
-		</tr>
-		<tr>
-			<th class="acquisition">
-				&nbsp;
-				<input type="hidden" name="supplierid" value=<!-- TMPL_VAR NAME="supplierid" -->>
-			</th>
-			<th class="acquisition">
-				<input type="text" size="20" name="filter" value="<!-- TMPL_VAR NAME="filter" -->">
-			</th>
-			<th class="acquisition">
-				From :<input type="text" size="9" name="datefrom" value="<!-- TMPL_VAR NAME="datefrom" -->"> 
-				<p>To :<input type="text" size="9" name="dateto" value="<!-- TMPL_VAR NAME="dateto" -->">
-			</th>
-			<th class="acquisition">
-				&nbsp;
-			</th>
-			<th class="acquisition">
-				Sort by :<select name="orderby" size="1">
-				<option value="aqorders.booksellerinvoicenumber"> Invoice- Ascending order</option>
-				<option value="datereceived"> Date Received</option>
-				<option value="datereceived desc"> Date Received reverse</option>
-				<option value="aqorders.booksellerinvoicenumber desc"> Invoice reverse</option>
-				</select><br />
-				Results per page :<select name="resultsperpage" value ="<!--TMPL_VAR Name="resultsperpage"-->" size="1">
-				<option value="20">20</option>
-				<option value="30">30</option>
-				<option value="50">50</option>
-				<option value="100">100</option>
-				</select>
-			</th>
-			<th class="acquisition">
-				<input type="submit" class="button acquisition" value="Filter">
-			</th>
-		</tr>
-<!-- Actual Search Results -->
-<!-- TMPL_LOOP NAME="searchresults" -->
-	<tr>
-		<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-			<!-- TMPL_VAR NAME="number" -->
-		</td>
-		<!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number"><!-- /TMPL_IF -->
-			<!--TMPL_IF Name="code"--><!--TMPL_VAR Name="code" --><!--/TMPL_IF-->
-		</td>
-		<!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number">
-		<!-- /TMPL_IF -->
-			<a href="/cgi-bin/koha/acqui/parcel.pl?type=intra&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" ESCAPE=URL -->&amp;datereceived=<!-- TMPL_VAR NAME="raw_datereceived" ESCAPE=URL --><!--TMPL_IF Name="code"-->&amp;code=<!--TMPL_VAR Name="code" ESCAPE=URL --><!--/TMPL_IF-->">
-				<!-- TMPL_VAR NAME="datereceived" -->
-			</a>
-		</td>
-		<!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number">
-		<!-- /TMPL_IF -->
-			<!-- TMPL_VAR NAME="reccount" --> 
-		</td>
-		<!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number"><!-- /TMPL_IF -->
-			<!-- TMPL_VAR NAME="bibcount" -->
-		</td>
-		<!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number"><!-- /TMPL_IF -->
-			<!-- TMPL_VAR NAME="itemcount" -->
-		</td>
-	</tr>
-<!-- /TMPL_LOOP -->
-</table>
-</form>
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/acqui/supplier.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/acqui/supplier.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/acqui/supplier.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/acqui/supplier.tmpl	20 Sep 2006 21:40:41 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,141 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Supplier <!-- TMPL_VAR name="bookselname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
-
-	<!-- TMPL_IF name="id" -->
-		<h1>Update: <!-- TMPL_VAR NAME="name" --></h1>
-	<!-- TMPL_ELSE -->
-		<h1>Add supplier</h1>
-	<!-- /TMPL_IF -->
-	<form action="updatesupplier.pl" method="post">
-	<input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
-	<div id="acqui_supplier_company">
-		<h2>COMPANY DETAILS</h2>
-		<p>
-			<label>Company Name</label>
-			<input type="text" size="40" name="company" value="<!-- TMPL_VAR NAME="name" -->" />
-		</p>
-		<p>
-			<label>Postal Address</label>
-				<textarea name="company_postal" cols="40" rows="3"><!-- TMPL_VAR NAME="postal" --></textarea>
-		</p>
-		<p>
-			<label>Physical Address</label>
-			<textarea name="physical" cols="40" rows="4"><!-- TMPL_VAR NAME="address1" --><!-- TMPL_VAR NAME="address2" --><!-- TMPL_VAR NAME="address3" --><!-- TMPL_VAR NAME="address4" --></textarea>
-		</p>
-		<p>
-			<label>Phone</label>
-			<input type="text" size="20" name="company_phone" value="<!-- TMPL_VAR NAME="phone" -->" />
-		</p>
-		<p>
-			<label>Fax</label>
-			<input type="text" size="20" name="company_fax" value="<!-- TMPL_VAR NAME="fax" -->" />
-		</p>
-		<p>
-			<label>Website</label>
-			<input type="text" size="40" name="website" value="<!-- TMPL_VAR NAME="url" -->" />
-		</p>
-		<h2 class="acquisition">CONTACT DETAILS</h2>
-		<p>
-			<label>Contact Name</label>
-			<input type="text" size="40" name="company_contact_name" value="<!-- TMPL_VAR NAME="contact" -->" />
-		</p>
-		<p>
-			<label>Position</label>
-			<input type="text" size="40" name="company_contact_position" value="<!-- TMPL_VAR NAME="contpos" -->" />
-		</p>
-		<p>
-			<label>Phone</label>
-			<input type="text" size="20" name="contact_phone" value="<!-- TMPL_VAR NAME="contphone" -->" />
-		</p>
-		<p>
-			<label>Alternative phone</label>
-			<input type="text" size="20" name="contact_phone_2" value="<!-- TMPL_VAR NAME="contaltphone" -->" />
-		</p>
-		<p>
-			<label>Fax</label>
-			<input type="text" size="20" name="contact_fax" value="<!-- TMPL_VAR NAME="contfax" -->" />
-		</p>
-		<p>
-			<label>E-mail</label>
-			<input type="text" size="40" name="company_email" value="<!-- TMPL_VAR NAME="contemail" -->" />
-		</p>
-		<p>
-			<label>Notes</label>
-			<textarea name="notes" cols="40" rows="4"><!-- TMPL_VAR NAME="contnotes" --></textarea>
-		</p>
-	</div>
-	<div id="acqui_supplier_status">
-		<h2>CURRENT STATUS</h2>
-		<p>
-			<label>Supplier is</label>
-				<!-- TMPL_IF name="active" -->
-					<input type="radio" name="status" value="1" checked="checked" />Active
-					<input type="radio" name="status" value="0" />Inactive
-				<!-- TMPL_ELSE -->
-					<input type="radio" name="status" value="1" />Active
-					<input type="radio" name="status" value="0" checked="checked" />Inactive
-				<!-- /TMPL_IF -->
-		</p>
-	</div>
-	<div id="acqui_supplier_ordering">
-		<h2>ORDERING INFORMATION</h2>
-		<p>
-			<label>Publishers and Imprints</label>
-			<textarea name="publishers_imprints" cols="20" rows="4"><!-- TMPL_VAR NAME="specialty" --></textarea>
-		</p>
-		<p>
-			<label>List Prices are</label>
-				<select name="list_currency" size="1">
-				<!-- TMPL_LOOP NAME="loop_pricescurrency" -->
-					<!-- TMPL_VAR NAME="currency" -->
-				<!-- /TMPL_LOOP -->
-				</select>
-		</p>
-		<p>
-			<label>Invoice Prices are</label>
-				<select name="invoice_currency" size="1">
-				<!-- TMPL_LOOP NAME="loop_invoicecurrency" -->
-					<!-- TMPL_VAR NAME="currency" -->
-				<!-- /TMPL_LOOP -->
-				</select>
-		</p>
-		<p>
-			<label>GST Registered</label>
-				<!-- TMPL_IF name="gstreg" -->
-					<input type="radio" name="gst" value="1" checked="checked" /> Yes
-					<input type="radio" name="gst" value="0" /> No
-				<!-- TMPL_ELSE -->
-					<input type="radio" name="gst" value="1" /> Yes
-					<input type="radio" name="gst" value="0" checked="checked" /> No
-				<!-- /TMPL_IF -->
-		</p>
-		<p>
-			<label>List Item Price Includes GST</label>
-				<!-- TMPL_IF name="listincgst" -->
-					<input type="radio" name="list_gst" value="1" checked="checked" /> Yes
-					<input type="radio" name="list_gst" value="0" /> No
-				<!-- TMPL_ELSE -->
-					<input type="radio" name="list_gst" value="1" /> Yes
-					<input type="radio" name="list_gst" value="0" checked="checked" /> No
-				<!-- /TMPL_IF -->
-		</p>
-		<p>
-			<label>Invoice Item Price Includes GST</label>
-				<!-- TMPL_IF name="invoiceincgst" -->
-					<input type="radio" name="invoiceincgst" value="1" checked="checked" /> Yes
-					<input type="radio" name="invoiceincgst" value="0" /> No
-				<!-- TMPL_ELSE -->
-					<input type="radio" name="invoiceincgst" value="1" /> Yes
-					<input type="radio" name="invoiceincgst" value="0" checked="checked" /> No
-				<!-- /TMPL_IF -->
-		</p>
-		<p>
-			<label>Discount</label>
-			<input type="text" size="3" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" /> %
-		</p>
-	</div>
-	<input type="submit"  name="submit" value="save" />
-	</form>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/admin-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/admin-home.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/admin-home.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/admin-home.tmpl	27 Sep 2006 21:40:47 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,109 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<div id="main">
-<h1>NEULIS Administration</h1>
-<div class="menu">
-<table>
-<caption>System Preferences</caption>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/systempreferences.pl">System preferences</a></th>
-	<td>Change essential system preferences like MARC flavor, date format, administrator e-mail, and templates.</td>
-</tr>
-</table>
-<table>
-<caption>System parameters </caption>
-<tr>
-<th class="header" colspan="2">For best results, configure these parameters in the order they appear</th>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/koha-news.pl">OPAC news</a></th>
-	<td>Manage the news in the OPAC main page.</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/opac-electronic.pl">OPAC electronic</a></th>
-	<td>Manage the online OPAC databases.</td>
-</tr>
-	<tr>
-	<th><a href="/cgi-bin/koha/admin/institutions-careers.pl">Faculties-courses</a></th>
-	<td>Add courses to faculties.</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/viewlog.pl">View Logs</a></th>
-	<td>View Logs.</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/holidays/holidays.pl?branch=MAIN">Holiday Management</a></th>
-	<td>Set the days library is closed for circulation purposes.</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/branches.pl">Library branches</a></th>
-	<td>The different branches you manage with this Koha server.</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/aqbookfund.pl">Book funds</a></th>
-	<td>Book fund administration. Remember to edit your book funds before you start editing the budgets.</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/currency.pl">Currencies</a></th>
-	<td>Define exchange rates.</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a></th>
-	<td>Define item types.</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/categorie.pl">Borrower categories</a></th>
-	<td>Define the categories of borrowers.</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/issuingrules.pl">Issuing rules</a></th>
-	<td>Define issuing rules for branches / borrowers / item types (nb of issues, duration, cost...)</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorised values</a></th>
-	<td>Define categories and authorised values for them. Authorised values are used in MARC form to limit and help editing MARC biblios.</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/authtypes.pl">Authorities Structure</a></th>
-	<td>Define categories and thesaurus/authority MARC structure.</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/biblios_framework.pl">Biblio framework (MARC structure)</a></th>
-	<td>the frameworks defined for the MARC editor. Create frameworks, then define the MARC structure (fields &amp; subfields)</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/holdingstagstructure.pl">Holdings framework (MARC structure)</a></th>
-	<td>the frameworks defined for theholdings MARC editor. (Complements the Biblios framework)</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/koha_attr.pl">Links MARC - ZEBRA</a></th>
-	<td>Define links between the ZEBRA DB and the MARC one. </td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/checkmarc.pl">MARC Check</a></th>
-	<td>Checks the MARC structure. USE IT before working with real data. It will show mistakes that can BREAK Koha's database!</td></tr>
-
-<tr>
-<th colspan="2" class="header">Various parameters</th>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/printers.pl">Printers</a></th>
-	<td>Printers (UNIX paths).</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/stopwords.pl">Stop words</a></th>
-	<td>Words deleted during searches.</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a></th>
-	<td>Servers to query for MARC data.</td>
-</tr>
-</table>
-
-
-</div>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/aqbookfund.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/aqbookfund.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/aqbookfund.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/aqbookfund.tmpl	27 Sep 2006 21:40:47 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,254 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-Koha -- System Administration: Book Funds
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<!-- TMPL_IF name="else" -->
-<h1>Book Fund Administration</h1>
-  <!-- TMPL_IF NAME="bookfund" -->
-<table>
-  <tr>
-    <th>Code</th>
-    <th>Name</th>
-    <th>Branch</th>
-    <th>Actions</th>
-  </tr>
-
-<form action="<!-- TMPL_VAR name="scriptname" -->" method="post">
-  <tr class="filter">
-    <td>
-      <select name="filter_bookfundid">
-        <option value="">----</option>
-    <!-- TMPL_LOOP name="filter_bookfundids" -->
-      <!-- TMPL_IF NAME="selected" -->
-        <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundid" --></option>
-      <!-- TMPL_ELSE -->
-        <option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundid" --></option>
-      <!-- /TMPL_IF -->
-    <!-- /TMPL_LOOP -->
-      </select>
-    </td>
-    <td>
-      <input type="text" name="filter_bookfundname" value="<!-- TMPL_VAR name="filter_bookfundname" -->" />
-    </td>
-    <td>
-      <select name="filter_branchcode">
-        <option value="">----</option>
-    <!-- TMPL_LOOP name="filter_branches" -->
-      <!-- TMPL_IF NAME="selected" -->
-        <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
-      <!-- TMPL_ELSE -->
-        <option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
-      <!-- /TMPL_IF -->
-    <!-- /TMPL_LOOP -->
-      </select>
-    </td>
-    <td>
-      <input type="submit" name="filter" value="Filter" />
-    </td>
-  </tr>
-</form>
-
-<form action="aqbudget.pl" method="post">
-    <!-- TMPL_LOOP name="bookfund" -->
-      <!-- TMPL_IF NAME="toggle" -->
-  <tr class="highlight">
-      <!-- TMPL_ELSE -->
-  <tr>
-      <!-- /TMPL_IF -->
-    <td>
-      <!-- TMPL_VAR name="bookfundid" -->
-    </td>
-    <td>
-      <!-- TMPL_VAR name="bookfundname" -->
-    </td>
-    <td>
-      <!-- TMPL_IF NAME="branchname" -->
-      <!-- TMPL_VAR name="branchname" -->
-      <!-- TMPL_ELSE -->
-      None
-      <!-- /TMPL_IF -->
-    </td>
-    <td>
-      <a href="<!-- TMPL_VAR name="scriptname" -->?op=add_form&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->">Edit</a>
-      <a href="<!-- TMPL_VAR name="scriptname" -->?op=delete_confirm&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->">Delete</a>
-      <a href="aqbudget.pl?op=add_form&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->">Add budget</a>
-      <!-- TMPL_IF NAME="has_budgets" -->
-      <a href="aqbudget.pl?filter_bookfundid=<!-- TMPL_VAR name="bookfundid" -->">Show budgets</a>
-      <!-- /TMPL_IF -->
-    </td>
-  </tr>
-
-    <!-- /TMPL_LOOP --> <!-- bookfund -->
-</table>
-
-<div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
-  <!-- /TMPL_IF --> <!-- bookfund -->
-
-<p>
-  <a href="<!-- TMPL_VAR name=scriptname -->?op=add_form">Add bookfund</a>
-  <a href="aqbudget.pl">Show all budgets</a>
-</p>
-
-</form>
-<!-- /TMPL_IF --> <!-- else -->
-
-<!-- TMPL_IF name="add_form" -->
-<script>
-	//
-	function isNotNull(f,noalert) {
-		if (f.value.length ==0) {
-   return false;
-		}
-		return true;
-	}
-	//
-	function toUC(f) {
-		var x=f.value.toUpperCase();
-		f.value=x;
-		return true;
-	}
-	//
-	function isNum(v,maybenull) {
-	var n = new Number(v.value);
-	if (isNaN(n)) {
-		return false;
-		}
-	if (maybenull==0 && v.value=="") {
-		return false;
-	}
-	return true;
-	}
-	//
-	function isDate(f) {
-		var t = Date.parse(f.value);
-		if (isNaN(t)) {
-			return false;
-		}
-	}
-	//
-	function Check(f) {
-		var ok=1;
-		var _alertString="";
-		var alertString2;
-		if (f.bookfundid.value.length==0) {
-			_alertString += "- bookfundid missing\n";
-		}
-		if (f.bookfundname.value.length==0) {
-			_alertString += "- bookfundname missing\n";
-		}
-		if (_alertString.length==0) {
-			document.Aform.submit();
-		} else {
-			alertString2 = "Form not submitted because of the following problem(s)\n";
-			alertString2 += "------------------------------------------------------------------------------------\n\n";
-			alertString2 += _alertString;
-			alert(alertString2);
-		}
-	}
-	</script>
-
-<form action="<!-- TMPL_VAR name="action" -->" name="Aform" method="post">
-  <input type="hidden" name="op" value="add_validate" />
-  <input type="hidden" name="checked" value="0" />
-
-  <table>
-    <caption><!-- TMPL_VAR name="header" --></caption>
-    
-  <!-- TMPL_IF name="add_or_modify" -->
-    <tr>
-      <th>Book fund</th>
-      <td>
-        <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" />
-        <!-- TMPL_VAR name="bookfundid" -->
-      </td>
-    </tr>
-  <!-- TMPL_ELSE -->
-    <tr>
-      <th>Book fund</th>
-      <td>
-        <input type="text" name="bookfundid" size="5" maxlength="5" onblur="toUC(this)" />
-      </td>
-    </tr>
-  <!-- /TMPL_IF --> <!-- add_or_modify -->
-    
-    <tr>
-      <th>Name</th>
-      <td>
-        <input type="text"
-               name="bookfundname"
-               size="40"
-          maxlength="80"
-              value="<!-- TMPL_VAR name="bookfundname" escape="HTML" -->"
-        />
-      </td>
-    </tr>
-
-    <tr>
-      <th>Branch</th>
-      <td>
-        <select name="branchcode">
-          <option value="">None</option>
-  <!-- TMPL_LOOP NAME="branches" -->  
-          <option value="<!-- TMPL_VAR NAME="branchcode" -->"  <!-- TMPL_IF NAME="selected" -->selected="selected" <!-- /TMPL_IF -->><!-- TMPL_VAR NAME="branchname" --></option>
-  <!-- /TMPL_LOOP -->
-      </td>
-    </tr>
-    
-  </table>
-
-  <p>
-    <input type="button" value="Submit" onclick="Check(this.form); return false;" />
-    <input type="reset" value="Reset" />
-  </p>
-</form>
-<!-- /TMPL_IF --> <!-- add_form -->
-
-<!-- TMPL_IF name="add_validate" -->
-<h3>Data Recorded</h3>
-
-<p>
-  <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a>
-</p>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="delete_confirm" -->
-<h3>Confirm Deletion of Fund <em><!-- TMPL_VAR name="bookfundid" --></em></h3>
-<table>
-  <tr>
-    <th>Book fund</th>
-    <td><!-- TMPL_VAR name="bookfundid" --></td>
-  </tr>
-  <tr>
-    <th>Name</th>
-    <td><!-- TMPL_VAR name="bookfundname" --></td>
-  </tr>
-  <tr>
-    <th>Group</th>
-    <td><!-- TMPL_VAR name="bookfundgroup" --></td>
-  </tr>
-</table>
-
-<form action="<!-- TMPL_VAR name="action" -->" method="post">
-  <input type="hidden" name="op" value="delete_confirmed" />
-  <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" />
-
-  <div id="action">
-    <input type="submit" value="Delete this Fund" />
-  </div>
-</form>
-
-<form action="<!-- TMPL_VAR name="action" -->" method="post">
-  <input type="submit" value="Do not Delete" />
-</form>
-<!-- /TMPL_IF --> <!-- delete_confirm -->
-
-<!-- TMPL_IF name="delete_confirmed" -->
-<h3>Data Deleted</h3>
-<form action="<!-- TMPL_VAR name="action" -->" method="post">
-  <input type="submit" value="OK" />
-</form>
-<!-- /TMPL_IF --> <!-- delete_confirmed -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/aqbudget.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/aqbudget.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/aqbudget.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/aqbudget.tmpl	27 Sep 2006 21:40:47 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,368 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-Koha -- System Administration: Budgets
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<ul id="_informations">
-<!-- TMPL_IF NAME="add_validate" -->
-  <li>Budget Data Recorded, return to <a href="<!-- TMPL_VAR name="script_name" -->">budget list</a></li>
-<!-- /TMPL_IF --> <!-- add_validate -->
-
-<!-- TMPL_IF name="delete_confirmed" -->
-  <li>Budget deleted, return to <a href="<!-- TMPL_VAR name="script_name" -->">budget list</a></li>
-<!-- /TMPL_IF --> <!-- delete_confirmed -->
-</ul>
-
-<!-- TMPL_IF name="else" -->
-<h1>Budget admin</h1>
-
-<table>
-  <tr>
-    <th>Book fund</th>
-    <th>Branch</th>
-    <th>Start date</th>
-    <th>End date</th>
-    <th>Budget amount</th>
-    <th>Actions</th>
-  </tr>
-
-<form action="/cgi-bin/koha/admin/aqbudget.pl" method="post">
-  <tr class="filter">
-    <td>
-      <select name="filter_bookfundid">
-        <option value="">----</option>
-    <!-- TMPL_LOOP name="filter_bookfundids" -->
-      <!-- TMPL_IF NAME="selected" -->
-        <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundid" --></option>
-      <!-- TMPL_ELSE -->
-        <option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundid" --></option>
-      <!-- /TMPL_IF -->
-    <!-- /TMPL_LOOP -->
-      </select>
-    </td>
-    <td>
-      <select name="filter_branchcode">
-        <option value="">----</option>
-    <!-- TMPL_LOOP name="filter_branches" -->
-      <!-- TMPL_IF NAME="selected" -->
-        <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
-      <!-- TMPL_ELSE -->
-        <option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
-      <!-- /TMPL_IF -->
-    <!-- /TMPL_LOOP -->
-      </select>
-    </td>
-    <td>
-      <select name="filter_startdate_sign">
-    <!-- TMPL_IF NAME="filter_startdate_sign_equal_selected" -->
-        <option value="=" selected="selected">=</option>
-    <!-- TMPL_ELSE -->
-        <option value="=">=</option>
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF NAME="filter_startdate_sign_superior_selected" -->
-        <option value="&gt;=" selected="selected">&gt;=</option>
-    <!-- TMPL_ELSE -->
-        <option value="&gt;=">&gt;=</option>
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF NAME="filter_startdate_sign_inferior_selected" -->
-        <option value="&lt;=" selected="selected">&lt;=</option>
-    <!-- TMPL_ELSE -->
-        <option value="&lt;=">&lt;=</option>
-    <!-- /TMPL_IF -->
-      </select>
-      <input type="text" size="10" id="filter_startdate" name="filter_startdate" value="<!-- TMPL_VAR Name="filter_startdate" -->" />
-      <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="filter_startdate_button" />
-      <script language="JavaScript" type="text/javascript">
-        Calendar.setup(
-          {
-            inputField : "filter_startdate",
-            ifFormat : "%Y-%m-%d",
-            button : "filter_startdate_button"
-          }
-        );
-      </script>
-    </td>
-    <td>
-      <select name="filter_enddate_sign">
-    <!-- TMPL_IF NAME="filter_enddate_sign_equal_selected" -->
-        <option value="=" selected="selected">=</option>
-    <!-- TMPL_ELSE -->
-        <option value="=">=</option>
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF NAME="filter_enddate_sign_superior_selected" -->
-        <option value="&gt;=" selected="selected">&gt;=</option>
-    <!-- TMPL_ELSE -->
-        <option value="&gt;=">&gt;=</option>
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF NAME="filter_enddate_sign_inferior_selected" -->
-        <option value="&lt;=" selected="selected">&lt;=</option>
-    <!-- TMPL_ELSE -->
-        <option value="&lt;=">&lt;=</option>
-    <!-- /TMPL_IF -->
-      </select>
-      <input type="text" size="8" maxlength="10" id="filter_enddate" name="filter_enddate" value="<!-- TMPL_VAR Name="filter_enddate" -->" />
-      <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="filter_enddate_button" />
-      <script language="JavaScript" type="text/javascript">
-        Calendar.setup(
-          {
-            inputField : "filter_enddate",
-            ifFormat :"%Y-%m-%d",
-            button : "filter_enddate_button"
-          }
-        );
-      </script>
-    </td>
-    <td>
-      <select name="filter_amount_sign">
-    <!-- TMPL_IF NAME="filter_amount_sign_equal_selected" -->
-        <option value="=" selected="selected">=</option>
-    <!-- TMPL_ELSE -->
-        <option value="=">=</option>
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF NAME="filter_amount_sign_superior_selected" -->
-        <option value="&gt;=" selected="selected">&gt;=</option>
-    <!-- TMPL_ELSE -->
-        <option value="&gt;=">&gt;=</option>
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF NAME="filter_amount_sign_inferior_selected" -->
-        <option value="&lt;=" selected="selected">&lt;=</option>
-    <!-- TMPL_ELSE -->
-        <option value="&lt;=">&lt;=</option>
-    <!-- /TMPL_IF -->
-      </select>
-      <input type="text" name="filter_amount" value="<!-- TMPL_VAR NAME="filter_amount" -->" size="8"/>
-    </td>
-    <td>
-      <input type="submit" name="filter" value="Filter" />
-    </td>
-  </tr>
-</form>
-  
-  <!-- TMPL_LOOP name="budget" -->
-    <!-- TMPL_IF NAME="toggle" -->
-  <tr class="highlight">
-    <!-- TMPL_ELSE -->
-  <tr>
-    <!-- /TMPL_IF -->
-    <td><!-- TMPL_VAR NAME="bookfundid" --></td>
-    <td><!-- TMPL_VAR NAME="branchname" --></td>
-    <td><!-- TMPL_VAR NAME="startdate" --></td>
-    <td><!-- TMPL_VAR NAME="enddate" --></td>
-    <td><!-- TMPL_VAR NAME="budgetamount" --></td>
-    <td>
-      <a href="/cgi-bin/koha/admin/aqbudget.pl?op=add_form&amp;aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Edit</a>
-      <a href="/cgi-bin/koha/admin/aqbudget.pl?op=delete_confirm&amp;aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Delete</a>
-    </td>
-  </tr>
-  <!-- /TMPL_LOOP --> <!-- budget -->
-<p>
-  <a href="aqbookfund.pl?op=add_form">Add bookfund</a>
-  <a href="aqbudget.pl">Show all budgets</a>
-</p>
-</table>
-
-<div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
-<!-- /TMPL_IF --> <!-- else -->
-
-<!-- TMPL_IF name="add_form" -->
-<script language="JavaScript" type="text/javascript">
-	//
-	function isNotNull(f,noalert) {
-		if (f.value.length ==0) {
-   return false;
-		}
-		return true;
-	}
-	//
-	function toUC(f) {
-		var x=f.value.toUpperCase();
-		f.value=x;
-		return true;
-	}
-	//
-	function isNum(v,maybenull) {
-	var n = new Number(v.value);
-	if (isNaN(n)) {
-		return false;
-		}
-	if (maybenull==0 && v.value=='') {
-		return false;
-	}
-	return true;
-	}
-	//
-	function isDate(f) {
-		var t = Date.parse(f.value);
-		if (isNaN(t)) {
-			return false;
-		}
-	}
-	//
-	function Check(f) {
-		var ok=1;
-		var _alertString="";
-		var alertString2;
-		if (f.bookfundid.value.length==0) {
-			_alertString += "- bookfundid missing\n";
-		}
-		if (!(isNotNull(window.document.Aform.budgetamount,1))) {
-			_alertString += "- Budget missing\n";
-		}
-		if (_alertString.length==0) {
-			document.Aform.submit();
-		} else {
-			alertString2 = "Form not submitted because of the following problem(s)\n";
-			alertString2 += "------------------------------------------------------------------------------------\n\n";
-			alertString2 += _alertString;
-			alert(alertString2);
-		}
-	}
-</script>
-
-<form action="/cgi-bin/koha/admin/aqbudget.pl" name="Aform" method="post">
-  <fieldset>
-    <legend>Add budget</legend>
-    <input type="hidden" name="op" value="add_validate" />
-    <input type="hidden" name="checked" value="0" />
-
-    <table>
-      <tr>
-        <th>Book fund</th>
-        <td>
-          <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR NAME="bookfundid" -->" />
-          <!-- TMPL_VAR NAME="bookfundname" -->
-        </td>
-      </tr>
-
-      <tr>
-        <th>
-          <label for="startdate">Start date (<!-- TMPL_VAR NAME="dateformat" -->)</label>
-        </th>
-        <td>
-          <input type="text" size="8" maxlength="10" id="startdate" name="startdate" value="<!-- TMPL_VAR Name="startdate" -->" />
-          <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="startdate_button" />
-          <script language="JavaScript" type="text/javascript">
-            Calendar.setup(
-              {
-                inputField : "startdate",
-                ifFormat : "%Y-%m-%d",
-                button : "startdate_button"
-              }
-            );
-          </script>
-        </td>
-      </tr>
-      <tr>
-        <th>
-          <label for="enddate">End date (<!-- TMPL_VAR NAME="dateformat" -->)</label>
-        </th>
-        <td>
-          <input type="text" size="8" maxlength="10" id="enddate" name="enddate" value="<!-- TMPL_VAR Name="enddate" -->" />
-          <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="enddate_button" />
-          <script language="JavaScript" type="text/javascript">
-            Calendar.setup(
-              {
-                inputField : "enddate",
-                ifFormat : "%Y-%m-%d",
-                button : "enddate_button"
-              }
-            );
-          </script>
-        </td>
-      </tr>
-      <tr>
-        <th>
-          <label for="budgetamount">Budget amount</label>
-        </th>
-        <td>
-          <input type="text" name="budgetamount" id="budgetamount" value="<!-- TMPL_VAR NAME="budgetamount" -->" size="8" />
-        </td>
-      </tr>
-      <tr>
-        <th>
-          <label for="branch">Branch</label>
-        </th>
-        <td>
-  <!-- TMPL_IF NAME="disable_branchselection" -->
-          <!-- Pierrick's note: I've found that a disabled select was not -->
-          <!-- giving its value to Perl :-/ So I use a hidden field trick -->
-          <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
-          <select name="branch" disabled="disabled">
-  <!-- TMPL_ELSE -->
-          <select name="branch">
-  <!-- /TMPL_IF -->
-
-            <option value="">----</option>
-  <!-- TMPL_LOOP NAME="branches" -->
-    <!-- TMPL_IF NAME="selected" -->
-            <option value="<!-- TMPL_VAR NAME="branchcode" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
-    <!-- TMPL_ELSE -->
-            <option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
-    <!-- /TMPL_IF -->
-  <!-- /TMPL_LOOP -->
-          </select>
-        </td>
-      </tr>
-    </table>
-
-  <!-- TMPL_IF NAME="aqbudgetid" -->
-    <input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" />
-  <!-- /TMPL_IF -->
-
-    <p id="action">
-      <input type="button" value="Submit" onclick="Check(this.form)" />
-      <input type="submit" value="Cancel" onclick="location.href='/cgi-bin/koha/admin/aqbudget.pl'; return false;" />
-    </p>
-  </fieldset>
-</form>
-<!-- /TMPL_IF --> <!-- add_form -->
-
-<!-- TMPL_IF name="delete_confirm" -->
-<form action="<!-- TMPL_VAR NAME="action" -->" method="post">
-  <fieldset>
-    <legend>Delete Book Budget?</legend>
-
-    <table>
-      <tr>
-        <th>Start date</th>
-        <td><!-- TMPL_VAR NAME="startdate" --></td>
-      </tr>
-      
-      <tr>
-        <th>End date</th>
-        <td><!-- TMPL_VAR NAME="enddate" --></td>
-      </tr>
-      
-      <tr>
-        <th>Budget Amount</th>
-        <td><!-- TMPL_VAR NAME="budgetamount" --></td>
-      </tr>
-    </table>
-
-    <input type="hidden" name="op" value="delete_confirmed" />
-    <input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" />
-
-    <p id="action">
-      <input type="submit" value="Delete this budget" />
-      <input type="submit" value="Do Not Delete" />
-    </p>
-  </fieldset>
-</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/auth_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/auth_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/auth_subfields_structure.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/auth_subfields_structure.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,131 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-<!-- TMPL_IF NAME="add_form" -->
-
-	<h1><!-- TMPL_IF NAME="use-heading-flags-p" -->
-	<!-- TMPL_IF NAME="heading-edit-subfields-p" -->Edit MARC subfields constraints<!-- /TMPL_IF -->
-	<!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></h1>
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-	<input type="hidden" name="op" value="add_validate" />
-	<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
-	<!-- TMPL_LOOP NAME="loop" -->
-	<div class="data <!-- TMPL_VAR NAME="toggle" -->"><h2>Tag <!-- TMPL_VAR NAME="tagfield" -->, Subfield <!-- TMPL_VAR NAME="tagsubfield" --></h2>
-	<table>
-	<caption>MARC constraints</caption>
-	<tr><th><label for="repeatable<!-- TMPL_VAR NAME="row" -->">Repeatable:</label></th><td><!-- TMPL_VAR NAME="repeatable" --></td></tr>
-	<tr><th><label for="mandatory<!-- TMPL_VAR NAME="row" -->">Mandatory:</label></th><td><!-- TMPL_VAR NAME="mandatory" --> </td></tr>
-	<tr><th><label for="seealso<!-- TMPL_VAR NAME="row" -->">Search also:</label></th><td><input type="text" id="seealso<!-- TMPL_VAR NAME="row" -->" name="seealso" value="<!-- TMPL_VAR name="seealso" -->" size="20" /> (example for 200a: '200c','200d','200e'...)</td></tr>
-			</table>
-	<table>
-	<caption>Editor constaints</caption>
-	<tr><th><label for="liblibrarian<!-- TMPL_VAR NAME="row" -->">Text for librarian:</label></th><td><input id="liblibrarian<!-- TMPL_VAR NAME="row" -->" type="text" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" -->" size="40" maxlength="80" /></td></tr>
-	<tr><th><label for="libopac<!-- TMPL_VAR NAME="row" -->">Text for OPAC:</label></th><td><input type="text" id="libopac<!-- TMPL_VAR NAME="row" -->" name="libopac" value="<!-- TMPL_VAR NAME="libopac" -->" size="40" maxlength="80" /></td></tr>
-	<tr><th><label for="tab<!-- TMPL_VAR NAME="row" -->">Managed in tab:</label></th><td><!-- TMPL_VAR NAME="tab" --> (ignore means that the subfield is NOT managed by Koha)</td></tr>
-
-	<tr><th><label for="hidden<!-- TMPL_VAR NAME="row" -->">Hidden:</label></th><td> Opac:<!-- TMPL_VAR name="ohidden" -->  Intranet:<!-- TMPL_VAR name="ihidden" --> Editor:<!-- TMPL_VAR name="ehidden" --> (see online help)</td></tr>
-
-	<tr><th><label for="isurl<!-- TMPL_VAR NAME="row" -->">Is a URL: </label></th><td><!-- TMPL_VAR NAME="isurl" --> (if checked, it means that the subfield is an URL and can be clicked</td></tr>
-	<tr><th><label for="link<!-- TMPL_VAR NAME="row" -->">Is a Linking field: </label></th><td><!-- TMPL_VAR NAME="link" --> (if checked, it means that the subfield is used for linking authorities</td></tr>
-
-<tr><th><label>Default Options: <p>(choose one)</p></label></th><td>
-<ul>
-	<li>Authorized Value: <!-- TMPL_VAR NAME="authorised_value" --></li>
-	<li>Thesaurus: <!-- TMPL_VAR NAME="authtypecode" --></li>
-	<li>Plugin: <!-- TMPL_VAR NAME="value_builder" --></li>
-</ul>
-</td></tr>	 
-		</table>
-		</div>
-	<!-- /TMPL_LOOP -->
-	<input type="submit" class="submit" value="Save Changes" />
-	<p>Note: in the last column, you can choose:
-	<ul><li>An "authorised value": it refers to a list of authorised values for this subfield. See the corresponding admin table.</li>
-	<li>A "thesaurus category": it refers to a thesaurus category. See the corresponding admin table.</li>
-	<li>A "value builder": values builders are perl programs that help you select the value of the field. They are MARC-flavor dependant and sometimes fill another subfield automatically.</li>
-	</ul>
-	</p>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-
-<div class="data"><table>
-<caption>Confirm Deletion of Subfield <span class="ex"><!-- TMPL_VAR NAME="tagsubfield" -->?</span></caption>
-	<tr>
-		<th>Subfield</th>
-		<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
-	</tr>
-	<tr><th>Description</th><td><!-- TMPL_VAR NAME="liblibrarian" --></td></tr>
-</table></div>
-			<form class="inline" action="<!-- TMPL_VAR NAME="delete_link" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" />
-				<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-				<input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->" /><input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR NAME="tagsubfield" -->" /><input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" /><input type="submit" class="cancel" value="Yes, Delete this Subfield" />
-			</form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">	<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />	<input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->" />	<input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR NAME="tagsubfield" -->" />	<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />	<input type="submit" class="submit" value="No, Do Not Delete" />
-			</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirmed" -->
-
-	Data deleted
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->">
-	<input type="submit" class="submit" value="OK" />
-	</form>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF NAME="else" -->
-<h1>Authority MARC subfield structure admin for <!-- TMPL_VAR NAME="tagfield" --> (authority: <!--TMPL_VAR NAME="authtypecode" -->)</h1>
-<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit. </p>
-
-<table>
-<tr>
-	<th>Subfield</th>
-	<th>Text</th>
-	<th>Constraints</th>
-	<th>Delete</th>
-<!-- TMPL_LOOP NAME="loop" -->
-<!-- TMPL_IF NAME="toggle" --><tr class="highlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-	<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
-	<td>
-		<!-- TMPL_IF NAME="subfield_ignored" -->
-			<i><!-- TMPL_VAR NAME="liblibrarian" --></i>
-		<!-- TMPL_ELSE -->
-			<!-- TMPL_VAR NAME="liblibrarian" -->
-		<!-- /TMPL_IF -->
-	</td>
-	<td>
-		<!-- TMPL_IF NAME="subfield_ignored" -->
-			<i>subfield ignored</i>
-		<!-- TMPL_ELSE -->
-			<strong>Tab:</strong><!-- TMPL_VAR NAME="tab" -->,
-			<!-- TMPL_IF NAME="repeatable" -->Repeatable, <!-- TMPL_ELSE -->Not repeatable,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="mandatory" -->Mandatory, <!-- TMPL_ELSE -->Not mandatory,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="seealso" --> | <strong>See Also:</strong> <!-- TMPL_VAR NAME="seealso" -->,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="hidden" -->hidden,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="isurl" -->is an url,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="authorised_value" --> | <strong>Auth value:</strong><!-- TMPL_VAR NAME="authorised_value" -->,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="authtypecode" --> | <strong>Authority:</strong><!-- TMPL_VAR NAME="authtypecode" -->,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="value_builder" --> | <strong>Plugin:</strong><!-- TMPL_VAR NAME="value_builder" -->,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="link" --> | <strong>Link:</strong><!-- TMPL_VAR NAME="link" -->,<!-- /TMPL_IF -->
-		<!-- /TMPL_IF -->
-	</td>
-	<td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
-</tr>
-<!-- /TMPL_LOOP -->
-</table>
-<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="edit_tagfield" -->" /><input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="edit_authtypecode" -->" /><input type="submit" class="submit" value="Edit Subfields" /></form> <form class="inline" action="auth_tag_structure.pl" method="get"><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="tagfield" -->" /><input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" /><input type="submit" class="submit" value="Return to Auth Structure" /></form>
-<!-- TMPL_IF NAME="previous" -->
-	<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1leftarrow.png" title="previous" alt="previous" border="0" >
-	</a><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="next" -->
-	<!-- TMPL_VAR NAME="next" -->
-		<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1rightarrow.png" title="next" alt="next" border="0" />
-	</a>
-<!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/auth_tag_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/auth_tag_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/auth_tag_structure.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/auth_tag_structure.tmpl	19 May 2006 17:35:53 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,179 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<h1>Authority MARC framework for <!-- TMPL_IF NAME="authtypecode" --><!-- TMPL_VAR NAME="authtypecode" --><!-- TMPL_ELSE -->default framework<!-- /TMPL_IF --></h1>
-<script language="javascript" type="text/javascript">
-	function _(s) { return s } // dummy function for gettext
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function isNotNull(f,noalert) {
-		if (f.value.length ==0) {
-   return false;
-		}
-		return true;
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function toUC(f) {
-		var x=f.value.toUpperCase();
-		f.value=x;
-		return true;
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function isNum(v,maybenull) {
-	var n = new Number(v.value);
-	if (isNaN(n)) {
-		return false;
-		}
-	if (maybenull==0 && v.value=='') {
-		return false;
-	}
-	return true;
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function isDate(f) {
-		var t = Date.parse(f.value);
-		if (isNaN(t)) {
-			return false;
-		}
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function Check(f) {
-		var ok=1;
-		var _alertString="";
-		var alertString2;
-		if (f.tagfield.value.length==0) {
-			_alertString += "\n- " + _("tag number missing");
-		}
-		if (_alertString.length==0) {
-			document.Aform.submit();
-		} else {
-			alertString2  = _("Form not submitted because of the following problem(s)");
-			alertString2 += "\n------------------------------------------------------------------------------------\n";
-			alertString2 += _alertString;
-			alert(alertString2);
-		}
-	}
-	</script>
-
-<!-- TMPL_IF NAME="add_form" -->
-
-	<h1>
-	<!-- TMPL_IF NAME="use-heading-flags-p" -->
-	<!-- TMPL_IF NAME="heading-modify-tag-p" -->Modify tag<!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="heading-add-tag-p" -->Add tag<!-- /TMPL_IF -->
-	<!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF -->
-	</h1>
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-		<input type="hidden" name="op" value="add_validate" />
-		<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
-		<p><label>Tag<label><!-- TMPL_VAR NAME="searchfield" --></p>
-		<p><label>Text for librarians</label><input type="text" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" escape=HTML -->" size="80" maxlength="100" /></p>
-		<p><label>Text for opac</label><input type="text" name="libopac" value="<!-- TMPL_VAR NAME="libopac" escape=HTML -->" size="80" maxlength="100" /></p>
-		<p><label>Repeatable</label><!-- TMPL_VAR NAME="repeatable" --></p>
-		<p><label>Mandatory</label><!-- TMPL_VAR NAME="mandatory" --></p>
-		<p><label>Authorised value</label><!-- TMPL_VAR NAME="authorised_value" --> (if you select a value here, the indicators will be limited to the authorised value list)</p>
-		<p><label>&nbsp;</label><input type="button" value="OK" class="button" onclick="Check(this.form)" /></p>
-	</form>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-
-<table>
-	<tr>
-		<td>tag</td>
-		<td><!-- TMPL_VAR NAME="searchfield" --></td>
-	</tr>
-	<tr>
-		<td>&nbsp;</td><td><!-- TMPL_VAR NAME="liblibrarian" --></td>
-	</tr>
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="hidden" name="op" value="delete_confirmed" />
-		<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR name="authtypecode" -->">
-		<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-	<tr><td colspan="2" align="center">CONFIRM DELETION</td></tr>
-	<tr><td><input type="submit" value="YES"></form></td><td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="NO" class="submit" /></form></td></tr>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirmed" -->
-
-	Data deleted
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-	<input type="submit" value="OK" class="submit" />
-	</form>
-<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="authtype_create" -->
-
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="hidden" name="op" value="authtype_create_confirm" />
-		<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
-		Create authority framework for <!-- TMPL_VAR NAME="authtypecode" --> using
-		<select name="existingauthtypecode">
-			<option value="">Default</option>
-		<!-- TMPL_LOOP NAME="existingauthtypeloop" -->
-			<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="authtypetext" --></option>
-		<!-- /TMPL_LOOP -->
-		</select>
-		<input type="submit" value="OK" class="submit" />
-	</form>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF NAME="else" -->
-<div id="bloc25">
-<h2>Select an authority framework</h2>
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-	<select name="authtypecode">
-		<option value="">Default</option>
-	<!-- TMPL_LOOP NAME="authtypeloop" -->
-		<option value="<!-- TMPL_VAR NAME="value" -->" <!-- TMPL_IF NAME="selected" -->selected<!-- /TMPL_IF -->>
-			<!-- TMPL_VAR NAME="authtypetext" -->
-		</option>
-	<!-- /TMPL_LOOP -->
-	</select>
-	<input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-	<input type="submit" value="OK" class="submit" />
-</form>
-</div>
-<div id="bloc100">
-	<table>
-	<tr>
-		<th>Tag</th>
-		<th>Lib</th>
-		<th>Repeatable</th>
-		<th>Mandatory</th>
-		<th>Authorised<br />value</th>
-		<th>Subfields</th>
-		<th>Edit</th>
-		<th>Delete</th>
-	<!-- TMPL_LOOP NAME="loop" -->
-	<tr valign="top" bgcolor="<!-- TMPL_VAR NAME="bgcolor" -->">
-		<td><b><!-- TMPL_VAR NAME="tagfield" --></b></td>
-		<td><!-- TMPL_VAR NAME="liblibrarian" --></td>
-		<td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-		<td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-		<td><!-- TMPL_VAR NAME="authorised_value" --></td>
-		<td><a href="<!-- TMPL_VAR NAME="subfield_link" -->" class="button">subfields</a></td>
-		<td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit</a></td>
-		<td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
-	</tr>
-	<!-- /TMPL_LOOP -->
-	</table>
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="hidden" name="op" value="add_form" />
-		<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
-		<input type="hidden" name="op" value="add_form" />
-		<input type="submit" class="submit" value="Add Tag" />
-		<!-- TMPL_IF NAME="isprevpage" -->
-			<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->&amp;searchfield=<!-- TMPL_VAR NAME="searchfield" -->&authtypecode=<!-- TMPL_VAR NAME="authtypecode" --> ">Previous Page</a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="nextpage" -->
-			<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->&amp;searchfield=<!-- TMPL_VAR NAME="searchfield" -->&authtypecode=<!-- TMPL_VAR NAME="authtypecode" --> ">Next Page</a>
-		<!-- /TMPL_IF -->
-	</form>
-</div>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/authorised_values.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/authorised_values.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/authorised_values.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/authorised_values.tmpl	24 Feb 2006 11:18:17 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,97 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF name="add_form" --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion<!-- /TMPL_IF -->
-<!-- TMPL_IF name="else" -->Authorised values admin<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_IF name="add_form" -->
-	<form class="inline" action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
-	<input type="hidden" name="op" value="add_validate" />
-	<table>
-	<caption><!-- TMPL_VAR name="action" --></caption>
-	<tr>
-		<th><label for="category">Category</label></th>
-		<td><!-- TMPL_VAR name="category" --></td>
-	</tr>
-	<tr>
-		<th><label for="authorised_value">Authorised value</label></th>
-		<td><input type="text" id="authorised_value" name="authorised_value" value="<!-- TMPL_VAR name="authorised_value" -->" /></td>
-	</tr>
-	<tr>
-		<th><label for="lib">Description</label></th>
-		<td><input type="text" name="lib" id="lib" value="<!-- TMPL_VAR name="lib" -->" /></td>
-	</tr>
-	</table><input type="hidden" name="id" value="<!-- TMPL_VAR name="id" -->" />
-			<input type="submit" value="<!-- TMPL_VAR name="action" -->" /></form> <form class="inline" action="/cgi-bin/koha/admin/authorised_values.pl" method="get"><input type="submit" value="Cancel and Return to Authorized Values" /></form>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF name="delete_confirm" -->
-<!-- -->
-<h3>Confirm Deletion</h3>
-<table>
-	<tr>
-		<td>Variable</td>
-		<td>Description</td>
-		<td><!-- TMPL_VAR name="searchfield" --></td>
-	</tr>
-	<tr><td>Value</td><td><!-- TMPL_VAR name="Tvalue" --></td></tr>
-	</table>
-	<form action="<!-- TMPL_VAR name=" script_name " -->" method="post">
-		<input type="hidden" name="op" value="delete_confirmed" />
-		<input type="hidden" name="id" value="<!-- TMPL_VAR name=" id " -->" />
-		<input type="hidden" name="searchfield" value="<!-- TMPL_VAR name="searchfield" -->" /><input type="submit" value="Confirm Deletion" /></form> <form class="inline" action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="submit" value="Do Not Delete" /></form>
-<!-- /TMPL_IF -->
-
-<!-- -->
-<!-- TMPL_IF name="else" -->
-
-<h1>Authorised values admin</h1>
-<p>This table is used in MARC definition. You can define as many categories as you want, and as many authorised values as you want in each category.</p>
-<p>When you define the MARC subfield structure, you can link a subfield to a authorised-value category. When the user ask for adding of modifying a biblio,
-the subfield is not entered through a free field, but though a list of authorised values</p>
-<form action="/cgi-bin/koha/admin/authorised_values.pl" method="post"><label for="searchfield">Show Category: </label><!-- TMPL_VAR name="tab_list" --> <input type="submit" value="Submit" /></form>
-<table>
-<tr>
-	<th>Category</th>
-	<th>Authorised value</th>
-	<th>Description</th>
-	<th>Edit</th>
-	<th>Delete</th>
-	</tr>
-<!-- TMPL_LOOP name="loop" -->
-<tr>
-	<td><!-- TMPL_VAR name="category" --></td>
-	<td><!-- TMPL_VAR name="authorised_value" --></td>
-	<td><!-- TMPL_VAR name="lib" --></td>
-	<td><a href="<!-- TMPL_VAR name="edit" -->">Edit</a></td>
-	<td><a href="<!-- TMPL_VAR name="delete" -->">Delete</a></td>
-</tr>
-<!-- /TMPL_LOOP -->
-</table>
-
-<!-- TMPL_IF NAME="isprevpage" -->
-<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="prevpage" -->" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-	<input type="submit" value="&lt;&lt; Previous Page" /></form>
-<!-- /TMPL_IF --> 
-
-<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-<input type="hidden" name="op" value="add_form">
-<input type="hidden" name="category" value="<!-- TMPL_VAR NAME="category" -->">
-<input type="submit" value="Add Authorised value" /></form> 
-
-<form class="inline" action="/cgi-bin/koha/admin/authorised_values.pl" method="get"><input type="hidden" value="add_form" name="op" /><input type="submit" value="Add New Category" /></form>
-
-<!-- TMPL_IF NAME="nextpage" -->
-<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextpage" -->" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-	<input type="submit" value="Next Page &gt;&gt;" /></form>
-<!-- /TMPL_IF -->
-
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/authtypes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/authtypes.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/authtypes.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/authtypes.tmpl	24 Feb 2006 11:18:17 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,150 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<script language="javascript" type="text/javascript">
-function _(s) { return s } // dummy function for gettext
-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function isNotNull(f,noalert) {
-	if (f.value.length ==0) {
-		return false;
-	}
-	return true;
-}
-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function toUC(f) {
-	var x=f.value.toUpperCase();
-	f.value=x;
-	return true;
-}
-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function isNum(v,maybenull) {
-var n = new Number(v.value);
-if (isNaN(n)) {
-	return false;
-	}
-if (maybenull==0 && v.value=='') {
-	return false;
-}
-return true;
-}
-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function isDate(f) {
-	var t = Date.parse(f.value);
-	if (isNaN(t)) {
-		return false;
-	}
-}
-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function Check(f) {
-	var ok=1;
-	var _alertString="";
-	var alertString2;
-	if (f.authtypecode.value.length==0) {
-		_alertString += "\n- " + _("Authority type : code missing");
-	}
-	if (!(isNotNull(window.document.Aform.authtypetext,1))) {
-		_alertString += "\n- " + _("Description missing");
-	}
-	if (_alertString.length==0) {
-		document.Aform.submit();
-	} else {
-		alertString2  = _("Form not submitted because of the following problem(s)");
-		alertString2 += "\n------------------------------------------------------------------------------------\n";
-		alertString2 += _alertString;
-		alert(alertString2);
-	}
-}
-</script>
-
-<!-- TMPL_IF NAME="add_form" -->
-
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-	<table>
-		<!-- TMPL_IF NAME="authtypecode" -->
-		<caption>Modify authority type</caption>
-	<!-- TMPL_ELSE -->
-		<caption>Add authority type</caption>
-	<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="authtypecode" -->
-				<tr><td><label for="authtypecode">Authority type<label></td><td><input type="hidden" name="op" value="add_validate" />
-		<input type="hidden" name="checked" value="0" /><input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" /><!-- TMPL_VAR NAME="authtypecode" --></td></tr>
-			<!-- TMPL_ELSE -->
-				<tr><td><label for="authtypecode">Authority type<label></td><td><input id="authtypecode" type="text" name="authtypecode" size="10" maxlength="10" onblur="toUC(this)" /></td></tr>
-			<!-- /TMPL_IF -->
-		<tr><td><label for="authtypetext">Description</label></td><td><input type="text" id="authtypetext" name="authtypetext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="authtypetext" escape=HTML -->" /></td></tr>
-		<tr><td><label for="summary">Summary</label></td><td><textarea id="summary" name="summary" cols="40" rows="10"><!-- TMPL_VAR NAME="summary" --></textarea></td></tr>
-		<tr><td><label for="auth_tag_to_report">Report tag</label></td><td><input type="text" id="auth_tag_to_report" name="auth_tag_to_report" size="5" maxlength="3" value="<!-- TMPL_VAR NAME="auth_tag_to_report">" />Enter here the number of the tag that will be reported in the biblio (subfield by subfield). For example, in UNIMARC, enter 200 to report every 200 subfield in the 70x biblio</td></tr></table>
-	<p><input type="submit" value="OK" onclick="Check(this.form); return false;" />
-			</p>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-<div>
-	<h2>Authority structure definition for <!-- TMPL_VAR NAME="authtypetext" --> (<!-- TMPL_VAR NAME="authtypecode" -->)</h2>
-	<!-- TMPL_IF NAME="total" -->
-		<p>
-			This record is used <!-- TMPL_VAR NAME="total" --> times
-		</p>
-	<!-- /TMPL_IF -->
-	<p>CONFIRM DELETION</p>
-	<p>
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-			<input type="hidden" name="op" value="delete_confirmed" />
-			<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
-			<input type="submit" value="YES" />
-		</form>
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-			<input type="submit" value="NO" />
-		</form>
-	</p>
-
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="else" -->
-<h1>Auth type Admin</h1>
-<p>Define authority types, then authority MARC structure in the same way you define itemtypes and biblio MARC tag structure. Authority values are managed through plugins</p>
-<table>
-	<tr>
-		<th>Code</th>
-		<th>Description</th>
-		<th>summary</th>
-		<th>Tag reported</th>
-		<th>&nbsp;</th>
-		<th>Edit</th>
-		<th>Delete</th>
-	</tr>
-	<tr>
-		<td>&nbsp;</td>
-		<td>Default framework</td>
-		<td>&nbsp;</td>
-		<td>&nbsp;</td>
-		<td><a href="auth_tag_structure.pl">MARC structure</td>
-		<td>&nbsp;</td>
-		<td>&nbsp;</td>
-	</tr>
-	
-	<!-- TMPL_LOOP NAME="loop" -->
-		<tr>
-			<td><!-- TMPL_VAR NAME="authtypecode" --></td>
-			<td><!-- TMPL_VAR NAME="authtypetext" --></td>
-			<td><!-- TMPL_VAR NAME="summary" --></td>
-			<td><!-- TMPL_VAR NAME="auth_tag_to_report" --></td>
-			<td><a href="auth_tag_structure.pl?authtypecode=<!-- TMPL_VAR NAME="authtypecode" -->" class="button parameters" >MARC structure</a></td>
-			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;authtypecode=<!-- TMPL_VAR NAME="authtypecode" escape="HTML" -->">Edit</a></td>
-			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;authtypecode=<!-- TMPL_VAR NAME="authtypecode" escape="HTML" -->">Delete</a></td>
-		</tr>
-	<!-- /TMPL_LOOP -->
-</table>
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-	<input type="hidden" name="op" value="add_form" />
-	<input type="submit" value="Add authority type" title="Add authority type" alt="Add authority type" />
-	<td width="33%"><!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF --></td>
-	<td width="33%"><!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF --></td>
-</form>
-
-<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/biblios_framework.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/biblios_framework.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/biblios_framework.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/biblios_framework.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,131 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<script language="javascript" type="text/javascript">
-function _(s) { return s } // dummy function for gettext
-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function isNotNull(f,noalert) {
-	if (f.value.length ==0) {
-		return false;
-	}
-	return true;
-}
-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function toUC(f) {
-	var x=f.value.toUpperCase();
-	f.value=x;
-	return true;
-}
-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function isNum(v,maybenull) {
-var n = new Number(v.value);
-if (isNaN(n)) {
-	return false;
-	}
-if (maybenull==0 && v.value=='') {
-	return false;
-}
-return true;
-}
-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function isDate(f) {
-	var t = Date.parse(f.value);
-	if (isNaN(t)) {
-		return false;
-	}
-}
-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-function Check(f) {
-	var ok=1;
-	var _alertString="";
-	var alertString2;
-	if (f.frameworkcode.value.length==0) {
-		_alertString += "\n- " + _("Framework code missing");
-	}
-	if (!(isNotNull(window.document.Aform.frameworktext,1))) {
-		_alertString += "\n- " + _("Description missing");
-	}
-	if (_alertString.length==0) {
-		document.Aform.submit();
-	} else {
-		alertString2  = _("Form not submitted because of the following problem(s)");
-		alertString2 += "\n------------------------------------------------------------------------------------\n";
-		alertString2 += _alertString;
-		alert(alertString2);
-	}
-}
-</script>
-
-<!-- TMPL_IF NAME="add_form" -->
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-		<input type="hidden" name="op" value="add_validate" />
-		<input type="hidden" name="checked" value="0" />
-	<table>
-	<caption><!-- TMPL_IF NAME="frameworkcode" -->Modify framework text<!-- TMPL_ELSE -->Add framework<!-- /TMPL_IF --></caption>
-	<tr>
-			<!-- TMPL_IF NAME="frameworkcode" -->
-				<td><label for="frameworkcode">Framework Code<label></td><td><input type="hidden" id="frameworkcode" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><!-- TMPL_VAR NAME="frameworkcode" --></td>
-			<!-- TMPL_ELSE -->
-				<td><label for="frameworkcode">Framework Code<label></td><td><input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" /></td>
-			<!-- /TMPL_IF -->
-			</tr>
-			<tr>
-				<td><label for="description">Description</label></td><td>
-				<input type="text" name="frameworktext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="frameworktext" escape=HTML -->" /></td>
-</tr></table>
-			<p>	<input type="button" value="Submit"class="submit" onclick="Check(this.form)" /></p>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-<h3>Delete framework for <!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)?</h3>
-	<!-- TMPL_IF NAME="total" -->
-		<div class="error">This framework is used <!-- TMPL_VAR NAME="total" --> times</div>
-	<!-- /TMPL_IF -->
-	<p>
-		<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" value="Yes, Delete this Framework!" class="cancel" />
-		</form>
-		<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No, Do not Delete!" class="submit" /></form>
-	</p>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="else" -->
-<h1>Biblio framework</h1>
-<p>Framework name, then go to MARC biblio to set MARC editor parameters</p>
-<table>
-	<tr>
-		<th>Code</th>
-		<th>Description</th>
-		<th>&nbsp;</th>
-		<th>Edit</th>
-		<th>Delete</th>
-	</tr>
-	<tr>
-		<td>&nbsp;</td>
-		<td>Default framework</td>
-		<td><a href="bibliostagstructure.pl?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->">MARC structure</td>
-		<td>&nbsp;</td>
-		<td>&nbsp;</td>
-	</tr>
-	
-	<!-- TMPL_LOOP NAME="loop" -->
-		<tr>
-			<td><!-- TMPL_VAR name="frameworkcode" --></td>
-			<td><!-- TMPL_VAR name="frameworktext" --></td>
-			<td><a href="bibliostagstructure.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->" >MARC structure</a></td>
-			<td><a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->">Edit</a></td>
-			<td><a href="<!-- TMPL_VAR name="script_name" -->?op=delete_confirm&amp;frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->">Delete</a></td>
-		</tr>
-	<!-- /TMPL_LOOP -->
-</table>
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-	<input type="hidden" name="op" value="add_form" />
-	<input type="submit" class="submit" value="Add framework" />
-	<td><!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF --></td>
-	<td><!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF --></td>
-</form>
-<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/biblios_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/biblios_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/biblios_subfields_structure.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/biblios_subfields_structure.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,134 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
-<!-- TMPL_IF name="add_form" --><!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" -->Data Added<!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->Preferences<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menu.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-
-<!-- TMPL_IF NAME="add_form" -->
-
-	<h1><!-- TMPL_IF NAME="use-heading-flags-p" -->
-	<!-- TMPL_IF NAME="heading-edit-subfields-p" -->Edit MARC subfields constraints<!-- /TMPL_IF -->
-	<!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></h1>
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-	<input type="hidden" name="op" value="add_validate" />
-	<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
-	<!-- TMPL_LOOP NAME="loop" -->
-	<div class="data <!-- TMPL_VAR NAME="toggle" -->"><h2>Tag <!-- TMPL_VAR NAME="tagfield" -->, Subfield <!-- TMPL_VAR NAME="tagsubfield" --></h2>
-	<table>
-	<caption>MARC constraints</caption>
-	<tr><th><label for="repeatable<!-- TMPL_VAR NAME="row" -->">Repeatable:</label></th><td><!-- TMPL_VAR NAME="repeatable" --></td></tr>
-	<tr><th><label for="mandatory<!-- TMPL_VAR NAME="row" -->">Mandatory:</label></th><td><!-- TMPL_VAR NAME="mandatory" --> </td></tr>
-	<tr><th><label for="seealso<!-- TMPL_VAR NAME="row" -->">Search also:</label></th><td><input type="text" id="seealso<!-- TMPL_VAR NAME="row" -->" name="seealso" value="<!-- TMPL_VAR name="seealso" -->" size="20" /> (example for 200a: '200c','200d','200e'...)</td></tr>
-			</table>
-	<table>
-	<caption>Editor constaints</caption>
-	<tr><th><label for="liblibrarian<!-- TMPL_VAR NAME="row" -->">Text for librarian:</label></th><td><input id="liblibrarian<!-- TMPL_VAR NAME="row" -->" type="text" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" -->" size="40" maxlength="80" /></td></tr>
-	<tr><th><label for="libopac<!-- TMPL_VAR NAME="row" -->">Text for OPAC:</label></th><td><input type="text" id="libopac<!-- TMPL_VAR NAME="row" -->" name="libopac" value="<!-- TMPL_VAR NAME="libopac" -->" size="40" maxlength="80" /></td></tr>
-	<tr><th><label for="tab<!-- TMPL_VAR NAME="row" -->">Managed in tab:</label></th><td><!-- TMPL_VAR NAME="tab" --> (ignore means that the subfield is NOT managed by Koha)</td></tr>
-
-	<tr><th><label for="hidden<!-- TMPL_VAR NAME="row" -->">Hidden:</label></th><td> Opac:<!-- TMPL_VAR name="ohidden" -->  Intranet:<!-- TMPL_VAR name="ihidden" --> Editor:<!-- TMPL_VAR name="ehidden" --> (see online help)</td></tr>
-
-	<tr><th><label for="isurl<!-- TMPL_VAR NAME="row" -->">Is a URL: </label></th><td><!-- TMPL_VAR NAME="isurl" --> (if checked, it means that the subfield is an URL and can be clicked</td></tr>
-<tr><th><label>Default Options: <p>(choose one)</p></label></th><td>
-<ul>
-	<li>Authorized Value: <!-- TMPL_VAR NAME="authorised_value" --></li>
-	<li>Thesaurus: <!-- TMPL_VAR NAME="authtypes" --></li>
-	<li>Plugin: <!-- TMPL_VAR NAME="value_builder" --></li>
-	<li>Link: <input type="text" name="link" value="<!-- TMPL_VAR NAME="link" -->" size="10" maxlength="5" /> (exemple:200b)</li>
-</ul>
-</td></tr>	 
-		</table>
-		</div>
-	<!-- /TMPL_LOOP -->
-	<input type="submit" class="submit" value="Save Changes" />
-	<p>Note: in the last column, you can choose:
-	<ul><li>An "authorised value": it refers to a list of authorised values for this subfield. See the corresponding admin table.</li>
-	<li>A "thesaurus category": it refers to a thesaurus category. See the corresponding admin table.</li>
-	<li>A "value builder": values builders are perl programs that help you select the value of the field. They are MARC-flavor dependant and sometimes fill another subfield automatically.</li>
-	</ul>
-	</p>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-
-<div class="data"><table>
-<caption>Confirm Deletion of Subfield <span class="ex"><!-- TMPL_VAR NAME="tagsubfield" -->?</span></caption>
-	<tr>
-		<th>Subfield</th>
-		<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
-	</tr>
-	<tr><th>Description</th><td><!-- TMPL_VAR NAME="liblibrarian" --></td></tr>
-</table></div>
-			<form class="inline" action="<!-- TMPL_VAR NAME="delete_link" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" />
-				<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-				<input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->" /><input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR NAME="tagsubfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" class="cancel" value="Yes, Delete this Subfield" />
-			</form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">	<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />	<input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->" />	<input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR NAME="tagsubfield" -->" />	<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />	<input type="submit" class="submit" value="No, Do Not Delete" />
-			</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirmed" -->
-
-	Data deleted
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->">
-	<input type="submit" class="submit" value="OK" />
-	</form>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF NAME="else" -->
-<h1>MARC subfield structure admin for <!-- TMPL_VAR NAME="tagfield" --> (framework <!--TMPL_VAR NAME="frameworkcode" -->)</h1>
-<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit. </p>
-
-
-<table>
-<tr>
-	<th>Subfield</th>
-	<th>Text</th>
-	<th>Constraints</th>
-	<th>Delete</th>
-<!-- TMPL_LOOP NAME="loop" -->
-<!-- TMPL_IF NAME="toggle" --><tr class="highlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-	<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
-	<td>
-		<!-- TMPL_IF NAME="subfield_ignored" -->
-			<i><!-- TMPL_VAR NAME="liblibrarian" --></i>
-		<!-- TMPL_ELSE -->
-			<!-- TMPL_VAR NAME="liblibrarian" -->
-		<!-- /TMPL_IF -->
-	</td>
-	<td>
-		<!-- TMPL_IF NAME="subfield_ignored" -->
-			<i>subfield ignored</i>
-		<!-- TMPL_ELSE -->
-			<strong>Tab:</strong><!-- TMPL_VAR NAME="tab" -->,
-			<!-- TMPL_IF NAME="repeatable" -->Repeatable, <!-- TMPL_ELSE -->Not repeatable,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="mandatory" -->Mandatory, <!-- TMPL_ELSE -->Not mandatory,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="seealso" --> | <strong>See Also:</strong> <!-- TMPL_VAR NAME="seealso" -->,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="hidden" -->hidden,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="isurl" -->is an url,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="authorised_value" --> | <strong>Auth value:</strong><!-- TMPL_VAR NAME="authorised_value" -->,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="authtypecode" --> | <strong>Authority:</strong><!-- TMPL_VAR NAME="authtypecode" -->,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="value_builder" --> | <strong>Plugin:</strong><!-- TMPL_VAR NAME="value_builder" -->,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="link" --> | <strong>Link:</strong><!-- TMPL_VAR NAME="link" -->,<!-- /TMPL_IF -->
-		<!-- /TMPL_IF -->
-	</td>
-	<td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
-</tr>
-<!-- /TMPL_LOOP -->
-</table>
-<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="edit_tagfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="edit_frameworkcode" -->" /><input type="submit" class="submit" value="Edit Subfields" /></form> <form class="inline" action="bibliostagstructure.pl" method="get"><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="tagfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" class="submit" value="Return to Marc Structure" /></form>
-<!-- TMPL_IF NAME="previous" -->
-	<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1leftarrow.png" title="previous" alt="previous" border="0" >
-	</a><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="next" -->
-	<!-- TMPL_VAR NAME="next" -->
-		<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1rightarrow.png" title="next" alt="next" border="0" />
-	</a>
-<!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/bibliostagstructure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/bibliostagstructure.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/bibliostagstructure.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/bibliostagstructure.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,207 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
-<!-- TMPL_IF name="add_form" --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Tag '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirmed" -->Data Deleted<!-- /TMPL_IF -->
-<!-- TMPL_IF name="else" -->MARC tag Structure<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menu.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-
-<h1>MARC tag structure admin for <!-- TMPL_IF NAME="frameworkcode" --><!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)<!-- TMPL_ELSE -->default MARC framework<!-- /TMPL_IF --></h1>
-<script language="javascript" type="text/javascript">
-	function _(s) { return s } // dummy function for gettext
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function isNotNull(f,noalert) {
-		if (f.value.length ==0) {
-   return false;
-		}
-		return true;
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function toUC(f) {
-		var x=f.value.toUpperCase();
-		f.value=x;
-		return true;
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function isNum(v,maybenull) {
-	var n = new Number(v.value);
-	if (isNaN(n)) {
-		return false;
-		}
-	if (maybenull==0 && v.value=='') {
-		return false;
-	}
-	return true;
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function isDate(f) {
-		var t = Date.parse(f.value);
-		if (isNaN(t)) {
-			return false;
-		}
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function Check(f) {
-		var ok=1;
-		var _alertString="";
-		var alertString2;
-		if (f.tagfield.value.length==0) {
-			_alertString += "\n- " + _("tag number missing");
-		}
-		if (_alertString.length==0) {
-			document.Aform.submit();
-		} else {
-			alertString2  = _("Form not submitted because of the following problem(s)");
-			alertString2 += "\n------------------------------------------------------------------------------------\n";
-			alertString2 += _alertString;
-			alert(alertString2);
-		}
-	}
-	</script>
-
-<!-- TMPL_IF NAME="add_form" -->
-<!-- ------------------------------------------------------------------------ -->
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-		<input type="hidden" name="op" value="add_validate" />
-		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
-	<div class="data"><table>
-		<caption><!-- TMPL_IF NAME="use-heading-flags-p" --><!-- TMPL_IF NAME="heading-modify-tag-p" -->Modify tag<!-- /TMPL_IF --><!-- TMPL_IF NAME="heading-add-tag-p" -->Add tag<!-- /TMPL_IF --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></caption>
-	<tr><th><label>Tag<label></th><td><!-- TMPL_VAR NAME="searchfield" --></td></tr>
-	<tr><th><label for="liblibrarian">Tag Label in Intranet</label></th><td><input type="text" id="liblibrarian" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" escape="HTML" -->" size="80" maxlength="100" /></td></tr>
-	<tr><th><label for="libopac">Tag Label in OPAC</label></th><td><input type="text" id="libopac" name="libopac" value="<!-- TMPL_VAR NAME="libopac" escape=HTML -->" size="80" maxlength="100" /></td></tr>
-	<tr><th><label for="repeatable">Repeatable</label></th><td><!-- TMPL_VAR NAME="repeatable" --></td></tr>
-	<tr><th><label for="mandatory">Mandatory</label></th><td><!-- TMPL_VAR NAME="mandatory" --></td></tr>
-	<tr><th><label for="authorised_value">Authorized value</label></th><td><!-- TMPL_VAR NAME="authorised_value" --> (if you select a value here, the indicators will be limited to the authorised value list)</td></tr>
-	</table></div>
-		<p><input type="submit" value="Save Changes" class="submit" onclick="Check(this.form)" /></p>
-	<p><input type="submit" value="Cancel and Return to MARC Tag Structure" class="cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->'; return false;" /></p>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-<!-- ------------------------------------------------------------------------ -->
-<div class="data"><table>
-<caption>Confirm Deletion of Tag <em><!-- TMPL_VAR NAME="searchfield" --></em>?</caption>
-	<tr><th>Tag: </th><td><!-- TMPL_VAR NAME="searchfield" --></td></tr>
-	<tr><th>Description: </th><td><!-- TMPL_VAR NAME="liblibrarian" --></td></tr>
-	</table></div>
-	<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed"><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />	<input type="submit" class="cancel" value="Yes, Delete this Tag" /></form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" class="submit" value="No, Do Not Delete" /></form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirmed" -->
-<!-- ------------------------------------------------------------------------ -->
-	<div class="details"><h3>Tag Deleted</h3>
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
-	<input type="submit" class="submit" value="Return to MARC Tag Structure" />
-	</form></div>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="framework_create" -->
-<!-- ------------------------------------------------------------------------ -->
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="hidden" name="op" value="framework_create_confirm" />
-		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
-		Create framework for <!-- TMPL_VAR NAME="frameworkcode" --> (<!-- TMPL_VAR NAME="frameworktext" -->) using
-		<select name="existingframeworkcode">
-			<option value="">Default</option>
-		<!-- TMPL_LOOP NAME="existingframeworkloop" -->
-			<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="frameworktext" --></option>
-		<!-- /TMPL_LOOP -->
-		</select>
-		<input type="submit" value="OK" class="submit" />
-	</form>
-<!-- /TMPL_IF -->
-<!-- ------------------------------------------------------------------------ -->
-<!-- TMPL_IF NAME="else" -->
-	<form name="f" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><label for="frameworkcode">Select a framework: </label>
-		<select name="frameworkcode" id="frameworkcode">
-			<option value="">Default</option>
-		<!-- TMPL_LOOP NAME="frameworkloop" -->
-			<!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="frameworktext" --></option>
-		<!-- /TMPL_LOOP -->
-		</select>
-		<input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" size="5" />
-		<input type="submit" value="Tag Search" class="submit" />
-		<p><!-- TMPL_IF Name="select_display"-->
-				<label for="onlyused">Display only used Tags/Subfields</label><input type="checkbox" name="select_display" id="onlyused" value="True" checked="checked" onchange="document.f.submit()" />
-			<!-- TMPL_ELSE -->
-				<label for="onlyused">Display only used Tags/Subfields</label><input type="checkbox" name="select_display"  id="onlyused" value="True" onchange="document.f.submit()" />
-			<!--/TMPL_IF --> 
-		</p>
-	</form>
-	<div class="help">NOTE : Framework consists of 2 parts biblio & holdings. This is for BIBLIOGRAPHIC definitions, and main framework definer</div>
-
-	<div class="data">
-	<table>
-		<tr>
-			<th scope="col">Tag</th>
-			<th scope="col">Label</th>
-			<th scope="col">Repeatable</th>
-			<th scope="col">Mandatory</th>
-			<th scope="col">Authorized value</th>
-			<th scope="col">Subfields</th>
-			<th scope="col">&nbsp;</th>
-		</tr>
-	<!-- TMPL_IF NAME="select_display" -->
-		<!-- TMPL_LOOP NAME="loop" -->
-		<tr class="highlight">
-			<td><b><!-- TMPL_VAR NAME="tagfield" --></b></td>
-			<td><!-- TMPL_VAR NAME="liblibrarian" --></td>
-			<td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_VAR NAME="authorised_value" --></td>
-			<td><a href="<!-- TMPL_VAR NAME="subfield_link" -->">Edit Subfields</a></td>
-			<td><a class="edit" href="<!-- TMPL_VAR NAME="edit" -->">Edit Tag</a> <a class="delete" href="<!-- TMPL_VAR NAME="delete" -->">Delete Tag</a></td>
-		</tr>
-		<tr>
-			<td>
-				&nbsp;
-			</td>
-			<td colspan="6">
-				<ul>
-				<!-- TMPL_LOOP NAME="subfields" -->
-					<li>Tab:<!-- TMPL_VAR NAME="tab" --> | $<!-- TMPL_VAR NAME="tagsubfield" -->
-							<!-- TMPL_VAR NAME="liblibrarian" --> <!-- TMPL_IF NAME="kohafield" --><!-- TMPL_VAR NAME="kohafield" --><!--/TMPL_IF --><!-- TMPL_IF NAME="repeatable" -->, repeatable<!-- /TMPL_IF --><!-- TMPL_IF NAME="mandatory" -->, Mandatory<!-- /TMPL_IF --><!-- TMPL_IF NAME="seealso" -->, See <!-- TMPL_VAR name="seealso" --><!--/TMPL_IF --><!-- TMPL_IF NAME="authorised_value" -->, <!-- TMPL_VAR NAME="authorised_value" --><!--/TMPL_IF --><!-- TMPL_IF NAME="authtypecode" -->, <!-- TMPL_VAR NAME="authtypecode" --><!--/TMPL_IF --><!-- TMPL_IF NAME="value_builder" -->, <!-- TMPL_VAR NAME="value_builder" --><!--/TMPL_IF -->
-					</li>
-				<!-- /TMPL_LOOP -->
-				</ul>
-			</td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-	<!-- TMPL_ELSE -->
-		<!-- TMPL_LOOP NAME="loop" -->
-		<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-			<td><b><!-- TMPL_VAR NAME="tagfield" --></b></td>
-			<td><!-- TMPL_VAR NAME="liblibrarian" --></td>
-			<td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_VAR NAME="authorised_value" --></td>
-			<td><a href="<!-- TMPL_VAR NAME="subfield_link" -->">View Subfields</a></td>
-			<td><a class="edit" href="<!-- TMPL_VAR NAME="edit" -->">Edit Tag</a> <a class="delete" href="<!-- TMPL_VAR NAME="delete" -->">Delete Tag</a></td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-	<!--/TMPL_IF -->
-	</table>
-	<div class="tabitem">
-		<!-- TMPL_IF NAME="isprevpage" -->
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
-		<input type="hidden" value="<!-- TMPL_VAR NAME="prevpage" -->" name="offset" /><input type="hidden" value="<!-- TMPL_VAR NAME="searchfield" -->" name="searchfield" /><input type="hidden" value="<!-- TMPL_VAR NAME="frameworkcode" -->" name="frameworkcode" /><!--TMPL_IF Name="select_display"--><input type="hidden" value="select_display" name="True" /><!--/TMPL_IF --><input type="submit" value="&lt;&lt; Previous Page" class="submit" /></form>
-		<!-- /TMPL_IF -->	
-		
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="hidden" name="op" value="add_form" />
-	<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
-		<input type="submit" value="Add New MARC Tag" class="submit" /></form>
-		
-		<!-- TMPL_IF NAME="nextpage" -->
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextpage" -->" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><!--TMPL_IF Name="select_display"--><input type="hidden" name="select_display" value="True" /><!--/TMPL_IF --><input type="submit" class="submit" value="Next Page &gt;&gt;" /></form>
-		<!-- /TMPL_IF -->
-</div>
-</div>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/branches.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/branches.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/branches.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/branches.tmpl	12 Jun 2006 09:38:52 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,242 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF name="add" --><!-- TMPL_VAR name="head" --><!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirm" -->Confirm deletion of branch '<!-- TMPL_VAR NAME="branchcode" -->'<!-- /TMPL_IF -->
-<!-- TMPL_IF name="else" --><!-- TMPL_VAR name="head" --><!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_category" -->Confirm deletion of category<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<!-- TMPL_IF name="add" -->
-<h1><!-- TMPL_VAR name="head" --></h1>
-<form action="<!-- TMPL_VAR name="action" -->" name="Aform" method="post">
-<input type="hidden" name="op" value="add_validate" />
-<table>
-	<tr>
-		<td>Branch code</td>
-		<td>
-			<!-- TMPL_IF name="branchcode" -->
-				<input type="hidden" name="branchcode" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
-				<!-- TMPL_VAR name="branchcode" -->
-			<!-- TMPL_ELSE -->
-				<input type="text" name="branchcode" size="5" maxlength="5" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
-			<!-- /TMPL_IF -->
-		</td>
-	</tr>
-	<tr>
-		<td>Name</td>
-		<td><input type="text" name="branchname" size="40" maxlength="80" value="<!-- TMPL_VAR name="branch_name" escape="HTML" -->" />&nbsp;</td>
-	</tr>
-<!-- TMPL_LOOP name="categoryloop" -->
-					<tr>
-						<td><!-- TMPL_VAR name="categoryname" --></td>
-						<td><input type="checkbox" name="<!-- TMPL_VAR name="categorycode" -->" <!-- TMPL_VAR name="checked" --> /><!-- TMPL_VAR name="codedescription" --></td>
-					</tr>
-				<!-- /TMPL_LOOP -->
-<tr>
-		<td>Address</td>
-		<td><input type="text" name="branchaddress1" value="<!-- TMPL_VAR name="branchaddress1" escape="HTML" -->" /></td>
-	</tr>
-	<tr>
-		<td>&nbsp;</td>
-		<td><input type="text" name="branchaddress2" value="<!-- TMPL_VAR name="branchaddress2" escape="HTML" -->" /></td>
-	</tr>
-	<tr>
-		<td>&nbsp;</td>
-		<td><input type="text" name="branchaddress3" value="<!-- TMPL_VAR name="branchaddress3" escape="HTML" -->" /></td>
-	</tr>
-	<tr>
-		<td>Phone</td>
-		<td><input type="text" name="branchphone" value="<!-- TMPL_VAR name="branchphone" escape="HTML" -->" /></td>
-	</tr>
-	<tr>
-		<td>Fax</td>
-		<td><input type="text" name="branchfax" value="<!-- TMPL_VAR name="branchfax" escape="HTML" -->" /></td>
-	</tr>
-	<tr>
-		<td>E-mail</td>
-		<td><input type="text" name="branchemail" value="<!-- TMPL_VAR name="branchemail" escape="HTML" -->" /></td>
-	</tr>
-	<tr>
-		<td>Branch IP</td>
-		<td><input type="text" name="branchip" value="<!-- TMPL_VAR name="branchip" escape="HTML" -->" /></td>
-	</tr>
-	<tr>
-		<td>Branch Printer</td>
-		<td>	
-			<select id="branchprinter" name="branchprinter">
-				<option value="">None</option>
-			<!-- TMPL_LOOP NAME="printerloop" -->
-				<option value="<!-- TMPL_VAR NAME="value" -->"<!-- TMPL_IF NAME="selected" --> selected="selected"<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="branchprinter" --></option>
-				<!-- /TMPL_LOOP -->
-			</select>
-		</td>
-	</tr>
-</table><p><input type="submit" value="Submit" /></p>
-</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="delete_confirm" -->
-	<h3>Confirm deletion of <!-- TMPL_VAR NAME="branchname" --> (<!-- TMPL_VAR NAME="branchcode" -->)?</h3>
-	<span class="form"><form action="<!-- TMPL_VAR name="action" -->" method="post">
-		<input type="hidden" name="op" value="delete_confirmed" />
-		<input type="hidden" name="branchcode" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
-			<input type="hidden" name="branchname" value="<!-- TMPL_VAR NAME="branchname" escape="HTML" -->">
-		<input type="submit" value="Delete Branch" />
-	</form> 
-	<form action="<!-- TMPL_VAR name="action" -->" method="post"><input type="hidden" name="op" value="">
-		<input type="submit" value="Do Not Delete" />
-	</form></span>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="else" -->
-	
-	<!-- TMPL_IF NAME="message" --><div class="error"><!-- TMPL_VAR name="message" --><!-- /TMPL_IF -->
-	<table>
-	<caption><!-- TMPL_VAR name="head" --></caption>
-		<tr>
-			<th>Name</th>
-			<th>Code</th>
-			<th>Address</th>
-			<th>Category</th>
-			<th>Branch IP</th>
-			<th>Branch Printer</th>
-			<th>&nbsp;</th>
-			<th>&nbsp;</th>
-		</tr>
-		<!-- TMPL_LOOP name="branches" -->
-			<tr>
-				<td><!-- TMPL_VAR name="branch_name" escape="HTML" --></td>
-				<td><!-- TMPL_VAR name="branch_code" escape="HTML" --></td>
-				<td>
-					<!-- TMPL_IF name="address-empty-p" -->
-						(nothing entered)
-					<!-- TMPL_ELSE -->
-						<!-- TMPL_IF name="branchaddress1" -->
-							<!-- TMPL_VAR name="branchaddress1" escape="HTML" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="branchaddress2" -->
-							<br /><!-- TMPL_VAR name="branchaddress2" escape="HTML" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="branchaddress3" -->
-							<br /><!-- TMPL_VAR name="branchaddress3" escape="HTML" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name=branchphone -->
-							<br />Ph: <!-- TMPL_VAR name="branchphone" escape="HTML" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="branchfax" -->
-							<br />Fax: <!-- TMPL_VAR name="branchfax" escape="HTML" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="branchemail" -->
-							<br />Email: <!-- TMPL_VAR name="branchemail" escape="HTML" --><!-- /TMPL_IF -->
-					<!-- /TMPL_IF -->
-				</td>
-				<td>
-					<!-- TMPL_IF name="no-categories-p" -->
-						(no categories set)
-					<!-- TMPL_ELSE -->
-						<!-- TMPL_LOOP name="category_list" -->
-							<!-- TMPL_VAR name="categoryname" --><br />
-						<!-- /TMPL_LOOP -->
-					<!-- /TMPL_IF -->
-				</td>
-				<td>
-					<!-- TMPL_VAR NAME="branchip" -->
-				</td>
-				<td>
-					<!-- TMPL_VAR NAME="branchprinter" -->
-				</td>
-				<td>
-					<form action="<!-- TMPL_VAR name=action -->" method="post">
-					<input type="hidden" name="op" value="edit" />
-					<input type="hidden" name="branchcode" value="<!-- TMPL_VAR name=value escape="HTML" -->" />
-					<input type="submit" value="Edit" />
-					</form>
-				</td>
-				<td>
-					<form action="<!-- TMPL_VAR name=action -->" method="post">
-					<input type="hidden" name="branchcode" value="<!-- TMPL_VAR name=value escape="HTML" -->" />
-<input type="hidden" name="branchname" value="<!-- TMPL_VAR NAME="branch_name" escape="HTML" -->">
-					<input type="hidden" name="op" value="delete" /><input type="submit" value="Delete" />
-					</form>
-				</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-	</table>
-<form action="<!-- TMPL_VAR name=action -->" method="post">
-		<p><input type="hidden" name="op" value="add" />
-		<input type="submit" value="Add New Branch" /></p>
-	</form>
-	
-	<table>
-	<caption>Branches Categories</caption>
-	<tr>
-		<th>Name</th>
-		<th>Code</th>
-		<th>Description</th>
-		<th>&nbsp;</th>
-		<th>&nbsp;</th>
-	</tr>
-	<!-- TMPL_LOOP name="branchcategories" -->
-		<tr>
-		<td><!-- TMPL_VAR name="categoryname" --></td>
-		<td><!-- TMPL_VAR name="categorycode" --></td>
-		<td><!-- TMPL_VAR name="codedescription" --></td>
-		<td>
-			<form action="<!-- TMPL_VAR name=action -->" method="post">
-			<input type="hidden" name="op" value="editcategory" />
-			<input type="hidden" name="categorycode" value="<!-- TMPL_VAR name=categorycode escape="HTML" -->" />
-			<input type="submit" value="Edit" />
-			</form>
-		</td>
-		<td>
-			<form action="<!-- TMPL_VAR name=action -->" method="post">
-			<input type="hidden" name="categorycode" value="<!-- TMPL_VAR name=categorycode escape="HTML" -->" />
-			<input type="hidden" name="op" value="delete_category" /><input type="submit" value="Delete" />
-			</form>
-		</td>
-		</tr>
-	<!-- /TMPL_LOOP -->
-	</table><form action="<!-- TMPL_VAR name="action" -->" method="post"><p>
-		<input type="hidden" name="op" value="editcategory" />
-		<input type="submit" value="Add New Category" /></p>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="editcategory" -->
-	
-	<form action="<!-- TMPL_VAR name=action -->" name="Aform" method="post">
-	<input type="hidden" name=op value="addcategory_validate" />
-	<table>
-		<caption><!-- TMPL_VAR name="head" --></caption>
-		<tr>
-			<td>Category code</td>
-			<td>
-				<!-- TMPL_IF name="categorycode" -->
-					<input type="hidden" name="categorycode" value="<!-- TMPL_VAR name=categorycode escape="HTML" -->" />
-					<!-- TMPL_VAR name="categorycode" -->
-				<!-- TMPL_ELSE -->
-					<input type="text" name="categorycode" size="5" maxlength="5" value="<!-- TMPL_VAR name="categorycode" escape="HTML" -->" />
-				<!-- /TMPL_IF -->
-			</td>
-		</tr>
-		<tr>
-			<td>Name</td>
-			<td><input type="text" name="categoryname" size="40" maxlength="80" value="<!-- TMPL_VAR name=categoryname escape="HTML" -->" />&nbsp;</td>
-		</tr>
-		<tr>
-			<td>Description</td>
-			<td><input type="text" name="codedescription" size="40" maxlength="80" value="<!-- TMPL_VAR name="codedescription" escape="HTML" -->" />&nbsp;</td>
-		</tr>
-	</table><input type="submit" value="Update" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="delete_category" -->
-	Confirm delete:
-	<form action="<!-- TMPL_VAR name=action -->" method="post">
-		<input type="hidden" name="op" value="categorydelete_confirmed" />
-		<input type="hidden" name="categorycode" value="<!-- TMPL_VAR name=categorycode escape="HTML" -->" />
-		<input type="submit" value="YES" />
-	</form>
-	<form action="<!-- TMPL_VAR name="action" -->" method="post"><input type="hidden" name="op" value="">
-		<input type="submit" value="NO" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/categorie.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/categorie.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/categorie.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/categorie.tmpl	6 Jun 2006 08:38:18 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,194 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF NAME=add_form --><!-- TMPL_IF NAME="categorycode" -->Modify category '<!-- TMPL_VAR NAME="categorycode" -->'<!-- TMPL_ELSE -->Add category<!-- /TMPL_IF --><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="add_validate" -->Data recorded<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Category '<!-- TMPL_VAR NAME="categorycode" -->'<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="delete_confirmed" -->Category Deleted<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="else" -->Patron Categories<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<!-- TMPL_IF NAME=add_form -->
-	<script language="JavaScript" type="text/javascript">
-	//
-	function isNotNull(f,noalert) {
-		if (f.value.length ==0) {
-   return false;
-		}
-		return true;
-	}
-	//
-	function toUC(f) {
-		var x=f.value.toUpperCase();
-		f.value=x;
-		return true;
-	}
-	//
-	function isNum(v,maybenull) {
-	var n = new Number(v.value);
-	if (isNaN(n)) {
-		return false;
-		}
-	if (maybenull==0 && v.value=='') {
-		return false;
-	}
-	return true;
-	}
-	//
-	function isDate(f) {
-		var t = Date.parse(f.value);
-		if (isNaN(t)) {
-			return false;
-		}
-	}
-	//
-	function Check(f) {
-		var ok=1;
-		var _alertString="";
-		var alertString2;
-		if (f.categorycode.value.length==0) {
-			_alertString += "- categorycode missing\n";
-		}
-//		alert(window.document.Aform.description.value);
-		if (!(isNotNull(window.document.Aform.description,1))) {
-			_alertString += "- description missing\n";
-		}
-		if (!isNum(f.upperagelimit,0)) {
-			_alertString += "- upperagelimit is not a number\n";
-		}
-		if (_alertString.length==0) {
-			document.Aform.submit();
-		} else {
-			alertString2 = "Form not submitted because of the following problem(s)\n";
-			alertString2 += "------------------------------------------------------------------------------------\n\n";
-			alertString2 += _alertString;
-			alert(alertString2);
-		}
-	}
-	</script>
-
-
-	
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-	<input type="hidden" name="op" value="add_validate" />
-	<input type="hidden" name="checked" value="0" />
-<!-- TMPL_IF NAME="categorycode" -->
-		<h1>Modify category <!-- TMPL_VAR NAME="categorycode" --></h1>
-	<!-- TMPL_ELSE -->
-		<h1>Add category</h1>
-	<!-- /TMPL_IF -->
-	<table>
-	<!-- TMPL_IF NAME="categorycode" -->
-	<tr><th>Category code</th><td><!-- TMPL_VAR NAME="categorycode" -->
-				<input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->" /></td></tr>
-	<!-- TMPL_ELSE -->
-	<tr><th>Category code</th><td><input type="text" name="categorycode" size="3" maxlength="2" onblur="toUC(this)" /></td></tr>
-	<!-- /TMPL_IF -->
-	<tr><th>Description</th><td>&nbsp; <input type="text" name="description" size="40" maxlength="80" value="<!-- TMPL_VAR NAME=description -->" /></td></tr>
-	<tr><th>Enrolment period</th><td>&nbsp; <input type="text" name="enrolmentperiod" size="2" maxlength="2" value="<!-- TMPL_VAR NAME=enrolmentperiod -->" /> months</td></tr>
-	<tr><th>Upperage limit</th><td>&nbsp; <input type="text" name="upperagelimit" size="3" maxlength="3" value="<!-- TMPL_VAR NAME=upperagelimit -->" /> years</td></tr>
-	<tr><th>Age Required</th><td>&nbsp; <input type="text" name="dateofbirthrequired" value="<!-- TMPL_VAR NAME=dateofbirthrequired -->" size="3" maxlength="3" /> years</td></tr>
-	<tr><th>Enrollment fee</th><td>$ <input type="text" name="enrolmentfee" size="6" value="<!-- TMPL_VAR NAME=enrolmentfee -->" /></td></tr>
-	<tr><th>Overdue notice required</th><td>&nbsp; <select name="overduenoticerequired" id="overduenoticerequired">
-						<option<!-- TMPL_UNLESS name="overduenoticerequired" --> selected="selected"<!-- /TMPL_UNLESS --> value="0">No</option>
-						<option<!-- TMPL_IF NAME="overduenoticerequired" --> selected="selected"<!-- /TMPL_IF --> value="1">Yes</option>
-					</select></td></tr>
-	<tr><th>Reserve fee</th><td>$ <input type="text" name="reservefee" size="6" value="<!-- TMPL_VAR NAME="reservefee" -->" /></td></tr>
-	<tr><th>Category type</th><td><SELECT name="category_type" >
-					<option value="" <!-- TMPL_VAR NAME="type_n" -->>Select a Category type</option>
-     					<option value="A" <!-- TMPL_VAR NAME="type_A" -->>Adult</option>
-					<option value="C" <!-- TMPL_VAR NAME="type_C" -->>Children</option>
-					<option value="I" <!-- TMPL_VAR NAME="type_I" -->>Institution</option>
-					<option value="P" <!-- TMPL_VAR NAME="type_P" -->>Professional</option>
-					</SELECT></td>
-	</tr>
-</table>
-
-	<p>				<input type="button" value="<!-- TMPL_IF NAME="categorycode" -->Update Category<!-- TMPL_ELSE -->Add Category<!-- /TMPL_IF -->" onclick="Check(this.form);" /> <input type="button" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->'; return false;" /></p>
-	</form>
-
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="add_validate" -->
-<h3>Data recorded</h3>
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="submit" value="OK" />
-	</form>
-
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-	
-        	
-	<!-- TMPL_IF NAME="totalgtzero" --><h3>Cagegory <!-- TMPL_VAR NAME="categorycode" --> is in use.  Deletion not possible!</h3><!-- TMPL_ELSE --><h2>Confirm Deletion of Category <!-- TMPL_VAR NAME="categorycode" --></h2><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="totalgtzero" --><div class="error">This category is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible<!-- /TMPL_IF -->
-	<div class="compact"><table>
-	<tr><th>Category code</th><td><!-- TMPL_VAR NAME="categorycode" --></td></tr>
-	<tr><th>Description</th><td><!-- TMPL_VAR NAME="description" --></td></tr>
-	<tr><th>Enrolment period</th><td><!-- TMPL_VAR NAME="enrolmentperiod" --> months</td></tr>
-	<tr><th>Upperage limit</th><td><!-- TMPL_VAR NAME="upperagelimit" --> years</td></tr>
-	<tr><th>Age Required</th><td><!-- TMPL_VAR NAME="dateofbirthrequired" --> years</td></tr>
-	<tr><th>Enrolment fee</th><td>$<!-- TMPL_VAR NAME="enrolmentfee" --></td></tr>
-	<tr><th>Overdue notice required</th><td><!-- TMPL_IF NAME="overduenoticerequired" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td></tr>
-	<tr><th>Reserve fee</th><td>$<!-- TMPL_VAR NAME="reservefee" --></td></tr>
-</table>
-		<!-- TMPL_IF NAME="totalgtzero" -->
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="OK" /></form>
-		<!-- TMPL_ELSE -->
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-			<input type="hidden" name="op" value="delete_confirmed" />
-			<input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->" /> <input type="submit" value="Delete this Category" /></form> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="Do Not Delete" /></form>
-		<!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirmed" -->
-<h3>Category Deleted</h3>
-
-        <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-        <input type="submit" value="OK" />
-        </form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="else" -->
-<h2>Patron Category Administration</h2>
-<!-- TMPL_IF NAME="searchfield" -->
-		You Searched for <!-- TMPL_VAR NAME="searchfield" --></span>
-	<!-- /TMPL_IF -->
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="text" name="description" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-		<input type="submit" name="search" value="Find" />
-	</form>	
-        <table>
-		<tr>
-			<th scope="col">Category Name</th>
-			<th scope="col">Code</th>
-			<th scope="col">Enrollment Period</th>
-			<th scope="col">Upper Age Limit</th>
-			<th scope="col">Age Required</th>
- 			<th scope="col">Enrollment Fee</th>
-			<th scope="col">Overdue</th>
- 			<th scope="col">Reservation Fee</th>
-			<th scope="col" colspan="2">&nbsp; </th>
-		</tr>
-		<!-- TMPL_LOOP NAME="loop" -->
-		<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPl_IF -->
-                        <td><a href="<!-- TMPL_VAR NAME=script_name -->?op=add_form&amp;categorycode=<!-- TMPL_VAR NAME=categorycode -->"><!-- TMPL_VAR NAME="description" --></a></td><td><!-- TMPL_VAR NAME="categorycode" --></td>
-                        
-                        <td><!-- TMPL_VAR NAME="enrolmentperiod" --> months</td>
-                        <td><!-- TMPL_VAR NAME="upperagelimit" --> years</td>
-                        <td><!-- TMPL_VAR NAME="dateofbirthrequired" --> years</td>
-                        <td><!-- TMPL_VAR NAME="enrolmentfee" --></td>
-                        <td><!-- TMPL_IF NAME="overduenoticerequired" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-                        <td><!-- TMPL_VAR NAME="reservefee" --></td>
-                        <td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->" /><input type="submit" value="Edit" /></form></td>
-                        <td><form action="<!-- TMPL_VAR NAME=script_name -->" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->" /><input type="submit" value="Delete" /></form></td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-	</table><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="hidden" name="op" value="add_form" />
-		<input type="submit" value="Add Category" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/categoryitem.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/categoryitem.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/categoryitem.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/categoryitem.tmpl	24 Feb 2006 11:18:17 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,308 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- <!-- TMPL_IF NAME="categorycode" -->Modify category<!-- TMPL_ELSE -->Add category<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<!-- TMPL_IF NAME="add_form" -->
-        <script language="JavaScript" type="text/javascript">
-        //
-        function isNotNull(f,noalert) {
-                if (f.value.length ==0) {
-   return false;
-                }
-                return true;
-        }
-        //
-        function toUC(f) {
-                var x=f.value.toUpperCase();
-                f.value=x;
-                return true;
-        }
-        //
-        function isNum(v,maybenull) {
-        var n = new Number(v.value);
-        if (isNaN(n)) {
-                return false;
-                }
-        if (maybenull==0 && v.value=='') {
-                return false;
-        }
-        return true;
-        }
-        //
-        function isDate(f) {
-                var t = Date.parse(f.value);
-                if (isNaN(t)) {
-                        return false;
-                }
-        }
-        //
-        function Check(f) {
-                var ok=1;
-                var _alertString="";
-                var alertString2;
-                if (f.categorycode.value.length==0) {
-                        _alertString += "- categorycode missing\n";
-                }
-//              alert(window.document.Aform.description.value);
-                if (!(isNotNull(window.document.Aform.description,1))) {
-                        _alertString += "- description missing\n";
-                }
-                if (!isNum(f.upperagelimit,0)) {
-                        _alertString += "- upperagelimit is not a number\n";
-                }
-                if (_alertString.length==0) {
-                        document.Aform.submit();
-                } else {
-                        alertString2 = "Form not submitted because of the following problem(s)\n";
-                        alertString2 += "------------------------------------------------------------------------------------\n\n";
-                        alertString2 += _alertString;
-                }
-        }
-        </script>
-
-        <!-- TMPL_IF NAME="categorycode" -->
-                <h1>Modify category</h1>
-        <!-- TMPL_ELSE -->
-                <h1>Add category</h1>
-        <!-- /TMPL_IF -->
-
-        <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-        <input type="hidden" name="op" value="add_validate">
-        <input type="hidden" name="checked" value=0>
-                        
-        <table>  
-        <!-- TMPL_IF NAME="categorycode" -->
-                <tr>
-                        <td>Category code</td>
-                        <td>
-                                <input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->">
-                        </td>
-                </tr>
-        <!-- TMPL_ELSE -->
-                <tr>
-                        <td>Category code</td>
-                        <td>
-                                <input type="text" name="categorycode" size="3" maxlength="2" onblur="toUC(this)">
-                        </td>
-                </tr>
-        <!-- /TMPL_IF -->
-                <tr>
-                        <td>Description</td>
-                        <td>
-                                <input type="text" name="description" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="description" -->">
-                                &nbsp;
-                        </td>
-                </tr>
-                <tr>
-                        <td>Enrolment period</td>
-                        <td>
-                                <input type="text" name="enrolmentperiod" value="<!-- TMPL_VAR NAME="enrolmentperiod" -->">
-                        </td>
-                </tr>
-                <tr>
-                        <td>Upperage limit</td>
-                        <td>
-                                <input type="text" name="upperagelimit" value="<!-- TMPL_VAR NAME="upperagelimit" -->">
-                        </td>
-                </tr>
-                <tr>
-                        <td>Age Required</td>
-                        <td>
-                                <input type="text" name="dateofbirthrequired" value="<!-- TMPL_VAR NAME="dateofbirthrequired" -->">
-                        </td>
-                </tr>
-                <tr>
-                        <td>Fine type</td>
-                        <td>
-                                <input type="text" name="finetype" size="30" maxlength="30" value="<!-- TMPL_VAR NAME="finetype" -->">
-                        </td>
-                </tr>
-                <tr>
-                        <td>Bulk</td>
-                        <td>
-                                <input type="text" name="bulk" value="<!-- TMPL_VAR NAME="bulk" -->">
-                        </td>
-                </tr>
-                <tr>
-                        <td>Enrolment fee</td>
-                        <td>
-                                <input type="text" name="enrolmentfee" value="<!-- TMPL_VAR NAME="enrolmentfee" -->">
-                        </td>
-                </tr>
-                <tr>
-                        <td>Overdue notice required</td>
-                        <td>
-                                <input type="text" name="overduenoticerequired" value="<!-- TMPL_VAR NAME="overduenoticerequired" -->">
-                        </td>
-                </tr>
-                <tr>
-                        <td>Issue limit</td>
-                        <td>
-                                <input type="text" name="issuelimit" value="<!-- TMPL_VAR NAME="issuelimit" -->">
-                        </td>
-                </tr>
-                <tr>
-                        <td>Reserve fee</td>
-                        <td>
-                                <input type="text" name="reservefee" value="<!-- TMPL_VAR NAME="reservefee" -->">
-                        </td>
-                </tr>
-                <tr>
-                        <td>&nbsp;</td>
-                        <td>
-                                <input type="button" value="OK" onclick="Check(this.form)">
-                        </td>
-                </tr>
-        </table>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="add_validate" -->
-        Data recorded
-        <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                <input type="submit" value="OK">
-        </form>
-<!-- /TMPL_IF -->
-
-        TOTAL : <!-- TMPL_VAR NAME="categorycode" --> : <!-- TMPL_VAR NAME="total" --><br />
-                    
-        <table>
-                <tr>
-                        <td>
-                                Category code
-                        </td>
-                        <td>
-                                <!-- TMPL_VAR NAME="categorycode" -->
-                        </td>
-                </tr>
-                <form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
-                        <input type="hidden" name="op" value="delete_confirmed">
-                        <input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->">
-                <tr>
-                        <td>Description</td>
-                        <td><!-- TMPL_VAR NAME="description" --></td>
-                </tr>
-                <tr>
-                        <td>Enrolment period</td>
-                        <td><!-- TMPL_VAR NAME="enrolmentperiod" --></td>
-                </tr>
-                <tr>
-                        <td>Upperage limit</td>
-                        <td><!-- TMPL_VAR NAME="upperagelimit" --></td>
-                </tr>
-                <tr>
-                        <td>Age Required</td>
-                        <td><!-- TMPL_VAR NAME="dateofbirthrequired" --></td>
-                </tr>
-                <tr>
-                        <td>Fine type</td>
-                        <td><!-- TMPL_VAR NAME="finetype" --></td>
-                </tr>
-                <tr>
-                        <td>Bulk</td>
-                        <td><!-- TMPL_VAR NAME="bulk" --></td>
-                </tr>
-                <tr>
-                        <td>Enrolment fee</td>
-                        <td><!-- TMPL_VAR NAME="enrolmentfee" --></td>
-                </tr>
-                <tr>
-                        <td>Overdue notice required</td>
-                        <td><!-- TMPL_VAR NAME="overduenoticerequired" --></td>
-                </tr>
-                <tr>
-                        <td>Issue limit</td>
-                        <td><!-- TMPL_VAR NAME="issuelimit" --></td>
-                </tr>
-                <tr>
-                        <td>Reserve fee</td>
-                        <td><!-- TMPL_VAR NAME="reservefee" --></td>
-                </tr>
-                <!-- TMPL_IF NAME="totalgtzero" -->
-                <tr>
-                        <td colspan="2">This record is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</td>
-                </tr>
-               <tr>
-                        <td colspan=2>
-                                </form><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                                <input type="submit" value="OK">
-                                </form>
-                        </td>
-                </tr>
-                <!-- TMPL_ELSE -->
-                <tr>
-                        <td colspan="2">CONFIRM DELETION</td>
-                </tr>
-                <tr>
-                        <td><input type="submit" value="YES"></form></td>
-                        <td><form action="<!-- TMPL_VAR NAME=script_name -->" method="post"><input type="submit" value="NO"></form></td>
-                </tr>
-                <!-- /TMPL_IF -->
-
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME=delete_confirmed -->
-        data deleted
-        <form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
-        <input type="submit" value="OK">
-        </form>
-
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="else" -->
-        <h2>Category admin</h2>
-        <!-- TMPL_IF NAME="searchfield" -->
-                You Searched for <!-- TMPL_VAR NAME="searchfield" -->
-        <!-- /TMPL_IF -->
-
-        <form action="<TMP_VAR NAME="script_name">" method="post">
-                <input type="text" name="description" value="<!-- TMPL_VAR NAME=searchfield -->">
-                <input type="reset" name="reset" value="clr">
-        </form>
-
-        <table>
-                <tr>
-                        <th>Category</th>
-                        <th>Description</th>
-                        <th>Enrolment</th>
-                        <th>Upper Age Limit</th>
-                        <th>Age Required</th>
-                        <th>Fine</th>
-                        <th>Bulk</th>
-                        <th>Fee</th>
-                        <th>Overdue</th>
-                        <th>Issue Limit</th>
-                        <th>Reserve</th>
-                        <th>&nbsp;</th>
-                        <th>&nbsp;</th>
-                </tr>
-                <!-- TMPL_LOOP NAME="loop" -->
-                <tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
-                        <td><!-- TMPL_VAR NAME="categorycode" --></td>
-                        <td><!-- TMPL_VAR NAME="description" --></td>
-                        <td><!-- TMPL_VAR NAME="enrolmentperiod" --></td>
-                        <td><!-- TMPL_VAR NAME="upperagelimit" --></td>
-                        <td><!-- TMPL_VAR NAME="dateofbirthrequired" --></td>
-                        <td><!-- TMPL_VAR NAME="finetype" --></td>
-                        <td><!-- TMPL_VAR NAME="bulk" --></td>
-                        <td><!-- TMPL_VAR NAME="enrolmentfee" --></td>
-                        <td><!-- TMPL_VAR NAME="overduenoticerequired" --></td>
-                        <td><!-- TMPL_VAR NAME="issuelimit" --></td>
-                        <td><!-- TMPL_VAR NAME="reservefee" --></td>
-                        <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Edit</a></td>
-                        <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Delete</a></t$                </tr>
-                <!-- /TMPL_LOOP -->
-
-        </table>
-        <p><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                <input type="hidden" name="op" value="add_form">
-                <input type="submit" value="Add Category"></a><br />
-        </form></p>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-
-
-
-

Index: koha-tmpl/intranet-tmpl/prog/en/admin/charges.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/charges.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/charges.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/charges.tmpl	24 Feb 2006 11:18:17 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: Fines
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<h2>Calculating Fines</h2>
-<p>Each box needs to be filled in with fine,time to start charging,charging cycle</p>
-<p>eg 1,7,7 = $1 fine, after 7 days, every 7 days</p>
-<p>Note : fines are calculated by the fines2.pl</span> script, located in misc</span> directory. Ask your administrator to put this script in crontab (after midnight) to have fines calculated every night</p>
-<form action="/cgi-bin/koha/admin/updatecharges.pl" method="post">
-<div class="table"><table>
-<tr>
-	<th>&nbsp;</th><!-- TMPL_LOOP NAME="title" --><th><!-- TMPL_VAR NAME="in_title" --></th><!-- /TMPL_LOOP -->
-</tr>
-<!-- TMPL_LOOP NAME="row" -->
-	<tr>
-		<th>
-			<!-- TMPL_VAR NAME="categorycode" -->
-		</th>
-		<!-- TMPL_LOOP NAME="cell" -->
-			<td bgcolor="<!-- TMPL_VAR name="toggle" -->">
-				<input name="<!-- TMPL_VAR name="inputname" -->" value="<!-- TMPL_VAR name="inputvalue" -->" size="6" maxlength="10">
-			</td>
-		<!-- /TMPL_LOOP -->
-	</TR>
-<!-- /TMPL_LOOP -->
-</table>
-<input type="submit" value="Submit Changes">
-</form>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/checkmarc.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/checkmarc.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/checkmarc.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/checkmarc.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,122 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: MARC Check: 
-<!-- TMPL_IF name="total" --><!-- TMPL_VAR name="total" --> errors found<!-- TMPL_ELSE -->Configuration OK!<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menu.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-<h1>MARC Checks</h1>
-<table>
-	<tr>
-		<th>Test</th>
-		<th>Result</th>
-	</tr>
-<!-- TMPL_IF name="biblionumber" -->
-	<tr>
-		<td> biblionumber</td>
-		<td>The biblio.biblionumber  and items.biblionumber fields MUST :
-			<ul><li>each be mapped to a MARC field/subfield,</li>
-			</ul></td>
-	</tr>
-<!-- TMPL_ELSE -->
-	<tr>
-		<td>OK</td>
-		<td>biblionumber  mapped correctly</td>
-	</tr>
-<!-- /TMPL_IF -->
-<!-- TMPL_IF name="itemnumber" -->
-	<tr>
-		<td>itemnum</td>
-		<td><ul><li>The field itemnumber MUST be mapped </li>
-			<li>The corresponding fileld or subfield MUST be in tab 10 and may be hidden</li></ul></td>
-	</tr>
-<!-- TMPL_ELSE -->
-	<tr>
-		<td>OK</td>
-		<td>The field itemnumber is mapped to a  MARC field </td>
-	</tr>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="barcode" -->
-	<tr>
-		<td>itemnum</td>
-		<td><ul><li>The field barcodde MUST be mapped </li>
-			<li>The corresponding field or subfield MUST be in tab 10 and may be hidden</li></ul></td>
-	</tr>
-<!-- TMPL_ELSE -->
-	<tr>
-		<td>OK</td>
-		<td>The field barcode is mapped to a  MARC field </td>
-	</tr>
-<!-- /TMPL_IF -->
-<!-- TMPL_IF name="isbn" -->
-	<tr>
-		<td>ISBN NOT mapped</td>
-		<td>isbn  MUST :<br />
-			<ul><li>be mapped to a MARC subfield,</li>
-		 </ul></td>
-	</tr>
-<!-- TMPL_ELSE -->
-	<tr>
-		<td>OK</td>
-		<td>ISBN defined</td>
-	</tr>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF name="itemtype" -->
-	<tr>
-		<td>itemtype NOT mapped</td>
-		<td>itemtype field MUST :<br />
-			<ul><li>be mapped to a MARC subfield, </li>
-			<li>the correspounding subfield MUST have authorised_value=itemtype</li></ul></td>
-	</tr>
-<!-- TMPL_ELSE -->
-	<tr>
-		<td>OK</td>
-		<td>itemtype mapped</td>
-	</tr>
-<!-- /TMPL_IF -->
-<!-- -->
-<!-- TMPL_IF name="branch" -->
-	<tr>
-		<td>homebranch NOT mapped</td>
-		<td>homebranch  MUST :<br />
-			<ul><li>be mapped to a MARC subfield,</li>
-		 </ul></td>
-	</tr>
-<!-- TMPL_ELSE -->
-	<tr>
-		<td>OK</td>
-		<td>homebranch defined</td>
-	</tr>
-<!-- /TMPL_IF -->
-<!-- -->
-<!-- TMPL_IF name="holdingbranch" -->
-	<tr>
-		<td>holdingbranch NOT mapped</td>
-		<td>the holdingbranch  MUST :<br />
-			<ul><li>be mapped to a MARC subfield, </li>
-			<li>the correspounding subfield MUST have authorised value=branches</li></ul></td>
-	</tr>
-<!-- TMPL_ELSE -->
-	<tr>
-		<td>OK</td>
-		<td>holdingbranch defined</td>
-	</tr>
-<!-- /TMPL_IF -->
-<!-- -->
-
-<!-- -->
-<!-- TMPL_IF name="total" -->
-	<tr>
-		<td>TOTAL</td>
-		<td>You have <!-- TMPL_VAR name="total" --> error(s) in your MARC configuration. Please fix them before using Koha</td>
-	</tr>
-</table>
-<!-- TMPL_ELSE -->
-	</table>
-		<p>Configuration OK, you don't have errors in your MARC parameters </p>
-<!-- /TMPL_IF -->
-
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/cities.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/cities.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/cities.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/cities.tmpl	23 May 2006 11:44:23 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,176 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System administration: cities
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<!-- TMPL_IF NAME="add_form" -->
-	<!-- TMPL_IF NAME="cityid" -->
-		<h1>Modify a city</h1>
-	<!-- TMPL_ELSE -->
-		<h1>Add a city</h1>
-	<!-- /TMPL_IF -->
-
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-	<input type="hidden" name="op" value="add_validate">
-	<input type="hidden" name="checked" value="0">
-	<input type="hidden" name="cityid" value="<!-- TMPL_VAR NAME="cityid" -->">
-
-	<!-- TMPL_IF NAME="cityid" -->
-		<p class="p_borrowers">
-	
-		<label>City id</label>
-		<label><b><!-- TMPL_VAR NAME="cityid" --></b></label>
-		</p>
-	<!-- /TMPL_IF -->
-	<p>
-	<label>City name</label>
-	<input  type="text" name="city_name" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="city_name" escape=HTML -->">&nbsp;
-	</p>
-	<p>				
-	<label>City zipcode</label>
-	<input type="text" name="city_zipcode" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="city_zipcode" -->">
-	</p>
-	
-	<p>
-	<div >
-		<input class="button" type="button" onclick="Check(this.form)" value="OK">
-	</div>	
-	</p>
-	</form>
-
-<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="delete_confirm" -->
-	<table>
-		<tr>
-			<td>
-				<b>City id</b>
-			</td>
-			<td>
-				<!-- TMPL_VAR NAME="cityid" -->
-			</td>
-		</tr>
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-			<input type="hidden" name="op" value="delete_confirmed">
-			<input type="hidden" name="cityid" value="<!-- TMPL_VAR NAME="cityid" -->">        
-		<tr>
-			<td>city name</td>
-			<td><!-- TMPL_VAR NAME="city_name" --></td>
-		</tr>
-		<tr>
-			<td>City zipcode</td>
-			<td><!-- TMPL_VAR NAME="city_zipcode" --></td>
-		</tr>
-		</tr>
-		<!-- TMPL_IF NAME="totalgtzero" -->
-		<tr>
-			<td colspan="2" align="center" class="problem">This record is used <!-- TMPL_VAR NAME="total" --> times. Impossible to delete it</td>
-		</tr>
-	<tr>
-			<td colspan="2">
-				</form><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-				<input type="submit" value="OK">
-				</form>
-			</td>
-		</tr>
-		<!-- TMPL_ELSE -->
-		<tr>
-			<td colspan="2" align="center">confirm deletion</td>
-		</tr>
-		<tr>
-			<td><input type="submit" value="YES"></form></td>
-			<td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-			<input type="submit" value="NO"></form></td>
-		</tr>
-		<!-- /TMPL_IF -->
-</table>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="else" -->
-	<h2>Cities management</h2>
-	<!-- TMPL_IF NAME="searchfield" -->
-		Searching: <!-- TMPL_VAR NAME="searchfield" -->
-	<!-- /TMPL_IF -->
-	<form action="<TMPL_VAR NAME="script_name">" method="post">
-		<input type="text" name="city_name" value="<!-- TMPL_VAR NAME="searchfield" -->">
-		<input type="submit" name="submit" value="OK" class="button">
-	</form>
-
-	<table>
-		<tr>
-			<th>City id</th>
-			<th>City name</th>
-			<th>City zipcode</th>
-			<th> </th>
-			<th> </th>
-			
-		</tr>
-		<!-- TMPL_LOOP NAME="loop" -->
-		<!-- TMPL_IF NAME="toggle" -->
-		<tr class="hilighted">
-		<!-- TMPL_ELSE -->
-		<tr>
-		<!-- /TMPL_IF -->
-			<td><!-- TMPL_VAR NAME="cityid" --></td>
-			<td><!-- TMPL_VAR NAME="city_name" --></td>
-			<td><!-- TMPL_VAR NAME="city_zipcode" --></td>
-			
-			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;cityid=<!-- TMPL_VAR NAME="cityid" -->">edit</a></td>
-			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;cityid=<!-- TMPL_VAR NAME="cityid" -->">delete</a></td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-
-	</table>
-	<p><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="hidden" name="op" value="add_form">
-		<input type="submit" class="button" value="Add a city"  alt="Add city"><br>
-	</form></p>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-<script language="javascript" type="text/javascript">
-		function _(s) { return s } // dummy function for gettext
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function isNotNull(f,noalert) {
-			if (f.value.length == 0) {
-		return false;
-			}
-		return true;
-		}
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function toUC(f) {
-			var x=f.value.toUpperCase();
-			f.value=x;
-			return true;
-		}
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function isNum(v,maybenull) {
-		var n = new Number(v.value);
-		if (isNaN(n)) {
-			return false;
-			}
-		if (maybenull == 0 && v.value =='') {
-			return false;
-		}
-		return true;
-		}
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function isDate(f) {
-			var t = Date.parse(f.value);
-			if (isNaN(t)) {
-				return false;
-			}
-		}
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function Check(f) {
-			var ok=1;
-			var _alertString="";
-			var alertString2;
-			if (f.city_zipcode.value.length == 0 && f.city_name.value.length == 0 ) {
-				_alertString += "\n- " + _("City name & zipcode missing");
-				alert(_alertString);	
-			}
-			else{
-			document.Aform.submit();
-			}
-		}
-</script>

Index: koha-tmpl/intranet-tmpl/prog/en/admin/currency.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/currency.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/currency.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/currency.tmpl	24 Feb 2006 11:18:17 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,193 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
-<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify currency '<!-- TMPL NAME="searchfield" -->'<!-- TMPL_ELSE -->Add currency<!-- /TMPL_IF --><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="add_validate" -->Data Recorded<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="delete_confirmed" -->Currency Deleted<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="else" -->Currencies<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<!-- TMPL_IF NAME=add_form -->
-        <script>
-        //
-        function isNotNull(f,noalert) {
-                if (f.value.length ==0) {
-   return false;
-                }
-                return true;
-        }
-        //
-        function toUC(f) {
-                var x=f.value.toUpperCase();
-                f.value=x;
-                return true;
-        }
-        //
-        function isNum(v,maybenull) {
-        var n = new Number(v.value);
-        if (isNaN(n)) {
-                return false;
-                }
-        if (maybenull=="0" && v.value=="") {
-                return false;
-        }
-        return true;
-        }
-        //
-        function isDate(f) {
-                var t = Date.parse(f.value);
-                if (isNaN(t)) {
-                        return false;
-                }
-        }
-        //
-        function Check(f) {
-                var ok=1;
-                var _alertString="";
-                var alertString2;
-                if (f.currency.value.length==0) {
-                        _alertString += "- Currency name missing\\n";
-                }
-                if (f.rate.value.length==0) {
-                        _alertString += "- Rate missing\\n";
-                }
-                if (_alertString.length==0) {
-                        document.Aform.submit();
-                } else {
-                        alertString2 = "Form not submitted because of the following problem(s)\\n";
-                        alertString2 += "------------------------------------------------------------------------------------\\n\\n";
-                        alertString2 += _alertString;
-                        alert(alertString2);
-                }
-        }
-        </SCRIPT>
-
-        <form action="<!-- TMPL_VAR NAME=script_name -->" name="Aform" method="post">
-        <input type="hidden" name="op" value="add_validate" />
-
-	<table>
-	<caption><!-- TMPL_IF NAME=searchfield -->
-		Modify currency
-	<!-- TMPL_ELSE -->
-		Add currency
-	<!-- /TMPL_IF --></caption>
-	<!-- TMPL_IF NAME="searchfield" -->
-		<tr>
-			<th>Currency</th>
-			<td>
-				<input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
-			</td>
-		</tr>
-	<!-- TMPL_ELSE -->
-		<tr>
-			<th>Currency</th>
-			<td>
-				<input type="text" name="currency" size="50" maxlength="50" onblur="toUC(this);" />
-			</td>
-		</tr>
-	<!-- /TMPL_IF -->
-
-        	<tr>
-			<th>Rate</th	>
-			<td>
-				<input type="text" name="rate" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="rate" -->" />
-			</td>
-		</tr>
-        </table>
-		
-		<input type="button" value="Update" onClick="Check(this.form)" /> <input type="button" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->'; return false;" />
-        </form>
-
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="add_validate" -->
-<h3>Data Recorded</h3>
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="OK" />
-        </form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-<div class="table details">	<table><caption>Confirm Deletion of Currency <!-- TMPL_VAR NAME="searchfield" --></caption>
-
-		<tr>
-			<th>Currency</th>
-			<td><!-- TMPL_VAR NAME="searchfield" --></td>
-		</tr>
-
-
-        
-        	<tr>
-			<th>Rate</th>
-			<td><!-- TMPL_VAR NAME="rate" --></td>
-		</tr>
-		</table>
-		<!-- TMPL_IF NAME="totalgtzero" -->
-
-				<span class="alert">This currency is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</span>
-				<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-					<input type="submit" value="OK" />
-				</form>
-		<!-- TMPL_ELSE -->
-     	<form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
-			<input type="hidden" name="op" value="delete_confirmed" />
-			<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-				<input type="submit" value="Delete this Currency" />
-				</form>
-				<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-					<input type="submit" value="Do Not Delete" />
-				</form>
-		<!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirmed" -->
-<h3>Currency Deleted</h3>
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="submit" value="OK" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="else" -->
-
-<h2>Currencies Management</h2>
-	<!-- TMPL_IF NAME="searchfield" -->
-		You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
-	<!-- /TMPL_IF -->	
-        <form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
-                <input type="text" name="description" value="<!-- TMPL_VAR NAME=searchfield -->" />
-                <input type="submit" name="Search" value="Search" />
-        </form>	
-	<div class="table"><table>
-		<tr>
-			<th>Currency</th>
-			<th>Rate</th>
-			<th colspan="2">&nbsp;</th>
-		</tr>
-		<!-- TMPL_LOOP NAME="loop" -->
-		<tr>
-			<td><!-- TMPL_VAR NAME="currency" --></td>
-			<td><!-- TMPL_VAR NAME="rate" --></td>
-			<td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="currency" -->" /><input type="submit" value="Edit" /></form></td>
-                        <td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="currency" -->" /><input type="submit" value="Delete" /></form></td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-	</table>
-<form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
-        <input type="hidden" name="op" value="add_form" /><input type="submit" value="Add Currency" />
-        </form>
-
-	
-	<!-- TMPL_IF NAME="offsetgtzero" -->
-		<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Prev</a>
-	<!-- /TMPL_IF -->
-
-
-	<!-- TMPL_IF NAME="ltcount" -->
-		<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>	
-	<!-- /TMPL_iF -->
-
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/holdings_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/holdings_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/holdings_subfields_structure.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/holdings_subfields_structure.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,131 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
-<!-- TMPL_IF name="add_form" --><!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" -->Data Added<!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->Preferences<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menu.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-<!-- TMPL_IF NAME="add_form" -->
-
-	<h1><!-- TMPL_IF NAME="use-heading-flags-p" -->
-	<!-- TMPL_IF NAME="heading-edit-subfields-p" -->Edit MARC subfields constraints<!-- /TMPL_IF -->
-	<!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></h1>
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-	<input type="hidden" name="op" value="add_validate" />
-	<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
-	<!-- TMPL_LOOP NAME="loop" -->
-	<div class="data <!-- TMPL_VAR NAME="toggle" -->"><h2>Tag <!-- TMPL_VAR NAME="tagfield" -->, Subfield <!-- TMPL_VAR NAME="tagsubfield" --></h2>
-	<table>
-	<caption>MARC constraints</caption>
-	<tr><th><label for="repeatable<!-- TMPL_VAR NAME="row" -->">Repeatable:</label></th><td><!-- TMPL_VAR NAME="repeatable" --></td></tr>
-	<tr><th><label for="mandatory<!-- TMPL_VAR NAME="row" -->">Mandatory:</label></th><td><!-- TMPL_VAR NAME="mandatory" --> </td></tr>
-	<tr><th><label for="seealso<!-- TMPL_VAR NAME="row" -->">Search also:</label></th><td><input type="text" id="seealso<!-- TMPL_VAR NAME="row" -->" name="seealso" value="<!-- TMPL_VAR name="seealso" -->" size="20" /> (example for 200a: '200c','200d','200e'...)</td></tr>
-			</table>
-	<table>
-	<caption>Editor constaints</caption>
-	<tr><th><label for="liblibrarian<!-- TMPL_VAR NAME="row" -->">Text for librarian:</label></th><td><input id="liblibrarian<!-- TMPL_VAR NAME="row" -->" type="text" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" -->" size="40" maxlength="80" /></td></tr>
-	<tr><th><label for="libopac<!-- TMPL_VAR NAME="row" -->">Text for OPAC:</label></th><td><input type="text" id="libopac<!-- TMPL_VAR NAME="row" -->" name="libopac" value="<!-- TMPL_VAR NAME="libopac" -->" size="40" maxlength="80" /></td></tr>
-	<tr><th><label for="tab<!-- TMPL_VAR NAME="row" -->">Managed in tab:</label></th><td><!-- TMPL_VAR NAME="tab" --> (ignore means that the subfield is NOT managed by Koha)</td></tr>
-
-	<tr><th><label for="hidden<!-- TMPL_VAR NAME="row" -->">Hidden:</label></th><td> Opac:<!-- TMPL_VAR name="ohidden" -->  Intranet:<!-- TMPL_VAR name="ihidden" --> Editor:<!-- TMPL_VAR name="ehidden" --> (see online help)</td></tr>
-
-	<tr><th><label for="isurl<!-- TMPL_VAR NAME="row" -->">Is a URL: </label></th><td><!-- TMPL_VAR NAME="isurl" --> (if checked, it means that the subfield is an URL and can be clicked</td></tr>
-<tr><th><label>Default Options: <p>(choose one)</p></label></th><td>
-<ul>
-	<li>Authorized Value: <!-- TMPL_VAR NAME="authorised_value" --></li>
-	<li>Thesaurus: <!-- TMPL_VAR NAME="authtypes" --></li>
-	<li>Plugin: <!-- TMPL_VAR NAME="value_builder" --></li>
-	<li>Link: <input type="text" name="link" value="<!-- TMPL_VAR NAME="link" -->" size="10" maxlength="5" /> (exemple:200b)</li>
-</ul>
-</td></tr>	 
-		</table>
-		</div>
-	<!-- /TMPL_LOOP -->
-	<input type="submit" class="submit" value="Save Changes" />
-	<p>Note: in the last column, you can choose:
-	<ul><li>An "authorised value": it refers to a list of authorised values for this subfield. See the corresponding admin table.</li>
-	<li>A "thesaurus category": it refers to a thesaurus category. See the corresponding admin table.</li>
-	<li>A "value builder": values builders are perl programs that help you select the value of the field. They are MARC-flavor dependant and sometimes fill another subfield automatically.</li>
-	</ul>
-	</p>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-
-<div class="data"><table>
-<caption>Confirm Deletion of Subfield <span class="ex"><!-- TMPL_VAR NAME="tagsubfield" -->?</span></caption>
-	<tr>
-		<th>Subfield</th>
-		<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
-	</tr>
-	<tr><th>Description</th><td><!-- TMPL_VAR NAME="liblibrarian" --></td></tr>
-</table></div>
-			<form class="inline" action="<!-- TMPL_VAR NAME="delete_link" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" />
-				<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-				<input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->" /><input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR NAME="tagsubfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" class="cancel" value="Yes, Delete this Subfield" />
-			</form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">	<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />	<input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->" />	<input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR NAME="tagsubfield" -->" />	<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />	<input type="submit" class="submit" value="No, Do Not Delete" />
-			</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirmed" -->
-
-	Data deleted
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->">
-	<input type="submit" class="submit" value="OK" />
-	</form>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF NAME="else" -->
-<h1>Holdings MARC subfield structure admin for <!-- TMPL_VAR NAME="tagfield" --> (framework <!--TMPL_VAR NAME="frameworkcode" -->)</h1>
-<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit. </p>
-
-<table>
-<tr>
-	<th>Subfield</th>
-	<th>Text</th>
-	<th>Constraints</th>
-	<th>Delete</th>
-<!-- TMPL_LOOP NAME="loop" -->
-<!-- TMPL_IF NAME="toggle" --><tr class="highlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-	<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
-	<td>
-		<!-- TMPL_IF NAME="subfield_ignored" -->
-			<i><!-- TMPL_VAR NAME="liblibrarian" --></i>
-		<!-- TMPL_ELSE -->
-			<!-- TMPL_VAR NAME="liblibrarian" -->
-		<!-- /TMPL_IF -->
-	</td>
-	<td>
-		<!-- TMPL_IF NAME="subfield_ignored" -->
-			<i>subfield ignored</i>
-		<!-- TMPL_ELSE -->
-			<strong>Tab:</strong><!-- TMPL_VAR NAME="tab" -->,
-			<!-- TMPL_IF NAME="repeatable" -->Repeatable, <!-- TMPL_ELSE -->Not repeatable,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="mandatory" -->Mandatory, <!-- TMPL_ELSE -->Not mandatory,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="seealso" --> | <strong>See Also:</strong> <!-- TMPL_VAR NAME="seealso" -->,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="hidden" -->hidden,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="isurl" -->is an url,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="authorised_value" --> | <strong>Auth value:</strong><!-- TMPL_VAR NAME="authorised_value" -->,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="authtypecode" --> | <strong>Authority:</strong><!-- TMPL_VAR NAME="authtypecode" -->,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="value_builder" --> | <strong>Plugin:</strong><!-- TMPL_VAR NAME="value_builder" -->,<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="link" --> | <strong>Link:</strong><!-- TMPL_VAR NAME="link" -->,<!-- /TMPL_IF -->
-		<!-- /TMPL_IF -->
-	</td>
-	<td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
-</tr>
-<!-- /TMPL_LOOP -->
-</table>
-<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="edit_tagfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="edit_frameworkcode" -->" /><input type="submit" class="submit" value="Edit Subfields" /></form> <form class="inline" action="holdingstagstructure.pl" method="get"><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="tagfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" class="submit" value="Return to Marc Structure" /></form>
-<!-- TMPL_IF NAME="previous" -->
-	<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1leftarrow.png" title="previous" alt="previous" border="0" >
-	</a><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="next" -->
-	<!-- TMPL_VAR NAME="next" -->
-		<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1rightarrow.png" title="next" alt="next" border="0" />
-	</a>
-<!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/holdingstagstructure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/holdingstagstructure.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/holdingstagstructure.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/holdingstagstructure.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,205 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
-<!-- TMPL_IF name="add_form" --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Tag '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirmed" -->Data Deleted<!-- /TMPL_IF -->
-<!-- TMPL_IF name="else" -->MARC tag Structure<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menu.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-<h1>Holdings MARC tag structure admin for <!-- TMPL_IF NAME="frameworkcode" --><!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)<!-- TMPL_ELSE -->default MARC framework<!-- /TMPL_IF --></h1>
-<script language="javascript" type="text/javascript">
-	function _(s) { return s } // dummy function for gettext
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function isNotNull(f,noalert) {
-		if (f.value.length ==0) {
-   return false;
-		}
-		return true;
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function toUC(f) {
-		var x=f.value.toUpperCase();
-		f.value=x;
-		return true;
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function isNum(v,maybenull) {
-	var n = new Number(v.value);
-	if (isNaN(n)) {
-		return false;
-		}
-	if (maybenull==0 && v.value=='') {
-		return false;
-	}
-	return true;
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function isDate(f) {
-		var t = Date.parse(f.value);
-		if (isNaN(t)) {
-			return false;
-		}
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function Check(f) {
-		var ok=1;
-		var _alertString="";
-		var alertString2;
-		if (f.tagfield.value.length==0) {
-			_alertString += "\n- " + _("tag number missing");
-		}
-		if (_alertString.length==0) {
-			document.Aform.submit();
-		} else {
-			alertString2  = _("Form not submitted because of the following problem(s)");
-			alertString2 += "\n------------------------------------------------------------------------------------\n";
-			alertString2 += _alertString;
-			alert(alertString2);
-		}
-	}
-	</script>
-
-<!-- TMPL_IF NAME="add_form" -->
-<!-- ------------------------------------------------------------------------ -->
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-		<input type="hidden" name="op" value="add_validate" />
-		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
-	<div class="data"><table>
-		<caption><!-- TMPL_IF NAME="use-heading-flags-p" --><!-- TMPL_IF NAME="heading-modify-tag-p" -->Modify tag<!-- /TMPL_IF --><!-- TMPL_IF NAME="heading-add-tag-p" -->Add tag<!-- /TMPL_IF --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></caption>
-	<tr><th><label>Tag<label></th><td><!-- TMPL_VAR NAME="searchfield" --></td></tr>
-	<tr><th><label for="liblibrarian">Tag Label in Intranet</label></th><td><input type="text" id="liblibrarian" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" escape="HTML" -->" size="80" maxlength="100" /></td></tr>
-	<tr><th><label for="libopac">Tag Label in OPAC</label></th><td><input type="text" id="libopac" name="libopac" value="<!-- TMPL_VAR NAME="libopac" escape=HTML -->" size="80" maxlength="100" /></td></tr>
-	<tr><th><label for="repeatable">Repeatable</label></th><td><!-- TMPL_VAR NAME="repeatable" --></td></tr>
-	<tr><th><label for="mandatory">Mandatory</label></th><td><!-- TMPL_VAR NAME="mandatory" --></td></tr>
-	<tr><th><label for="authorised_value">Authorized value</label></th><td><!-- TMPL_VAR NAME="authorised_value" --> (if you select a value here, the indicators will be limited to the authorised value list)</td></tr>
-	</table></div>
-		<p><input type="submit" value="Save Changes" class="submit" onclick="Check(this.form)" /></p>
-	<p><input type="submit" value="Cancel and Return to MARC Tag Structure" class="cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->'; return false;" /></p>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-<!-- ------------------------------------------------------------------------ -->
-<div class="data"><table>
-<caption>Confirm Deletion of Tag <em><!-- TMPL_VAR NAME="searchfield" --></em>?</caption>
-	<tr><th>Tag: </th><td><!-- TMPL_VAR NAME="searchfield" --></td></tr>
-	<tr><th>Description: </th><td><!-- TMPL_VAR NAME="liblibrarian" --></td></tr>
-	</table></div>
-	<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed"><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />	<input type="submit" class="cancel" value="Yes, Delete this Tag" /></form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" class="submit" value="No, Do Not Delete" /></form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirmed" -->
-<!-- ------------------------------------------------------------------------ -->
-	<div class="details"><h3>Tag Deleted</h3>
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
-	<input type="submit" class="submit" value="Return to MARC Tag Structure" />
-	</form></div>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="framework_create" -->
-<!-- ------------------------------------------------------------------------ -->
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="hidden" name="op" value="framework_create_confirm" />
-		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
-		Create framework for <!-- TMPL_VAR NAME="frameworkcode" --> (<!-- TMPL_VAR NAME="frameworktext" -->) using
-		<select name="existingframeworkcode">
-			<option value="">Default</option>
-		<!-- TMPL_LOOP NAME="existingframeworkloop" -->
-			<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="frameworktext" --></option>
-		<!-- /TMPL_LOOP -->
-		</select>
-		<input type="submit" value="OK" class="submit" />
-	</form>
-<!-- /TMPL_IF -->
-<!-- ------------------------------------------------------------------------ -->
-<!-- TMPL_IF NAME="else" -->
-	<form name="f" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><label for="frameworkcode">Select a framework: </label>
-		<select name="frameworkcode" id="frameworkcode">
-			<option value="">Default</option>
-		<!-- TMPL_LOOP NAME="frameworkloop" -->
-			<!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="frameworktext" --></option>
-		<!-- /TMPL_LOOP -->
-		</select>
-		<input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" size="5" />
-		<input type="submit" value="Tag Search" class="submit" />
-		<p><!-- TMPL_IF Name="select_display"-->
-				<label for="onlyused">Display only used Tags/Subfields</label><input type="checkbox" name="select_display" id="onlyused" value="True" checked="checked" onchange="document.f.submit()" />
-			<!-- TMPL_ELSE -->
-				<label for="onlyused">Display only used Tags/Subfields</label><input type="checkbox" name="select_display"  id="onlyused" value="True" onchange="document.f.submit()" />
-			<!--/TMPL_IF --> 
-		</p>
-	</form>
-	<div class="help">NOTE : Framework consists of 2 parts biblio & holdings. This is for HOLDINGS definition.</div>
-
-	<div class="data">
-	<table>
-		<tr>
-			<th scope="col">Tag</th>
-			<th scope="col">Label</th>
-			<th scope="col">Repeatable</th>
-			<th scope="col">Mandatory</th>
-			<th scope="col">Authorized value</th>
-			<th scope="col">Subfields</th>
-			<th scope="col">&nbsp;</th>
-		</tr>
-	<!-- TMPL_IF NAME="select_display" -->
-		<!-- TMPL_LOOP NAME="loop" -->
-		<tr class="highlight">
-			<td><b><!-- TMPL_VAR NAME="tagfield" --></b></td>
-			<td><!-- TMPL_VAR NAME="liblibrarian" --></td>
-			<td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_VAR NAME="authorised_value" --></td>
-			<td><a href="<!-- TMPL_VAR NAME="subfield_link" -->">Edit Subfields</a></td>
-			<td><a class="edit" href="<!-- TMPL_VAR NAME="edit" -->">Edit Tag</a> <a class="delete" href="<!-- TMPL_VAR NAME="delete" -->">Delete Tag</a></td>
-		</tr>
-		<tr>
-			<td>
-				&nbsp;
-			</td>
-			<td colspan="6">
-				<ul>
-				<!-- TMPL_LOOP NAME="subfields" -->
-					<li>Tab:<!-- TMPL_VAR NAME="tab" --> | $<!-- TMPL_VAR NAME="tagsubfield" -->
-							<!-- TMPL_VAR NAME="liblibrarian" --> <!-- TMPL_IF NAME="kohafield" --><!-- TMPL_VAR NAME="kohafield" --><!--/TMPL_IF --><!-- TMPL_IF NAME="repeatable" -->, repeatable<!-- /TMPL_IF --><!-- TMPL_IF NAME="mandatory" -->, Mandatory<!-- /TMPL_IF --><!-- TMPL_IF NAME="seealso" -->, See <!-- TMPL_VAR name="seealso" --><!--/TMPL_IF --><!-- TMPL_IF NAME="authorised_value" -->, <!-- TMPL_VAR NAME="authorised_value" --><!--/TMPL_IF --><!-- TMPL_IF NAME="authtypecode" -->, <!-- TMPL_VAR NAME="authtypecode" --><!--/TMPL_IF --><!-- TMPL_IF NAME="value_builder" -->, <!-- TMPL_VAR NAME="value_builder" --><!--/TMPL_IF -->
-					</li>
-				<!-- /TMPL_LOOP -->
-				</ul>
-			</td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-	<!-- TMPL_ELSE -->
-		<!-- TMPL_LOOP NAME="loop" -->
-		<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-			<td><b><!-- TMPL_VAR NAME="tagfield" --></b></td>
-			<td><!-- TMPL_VAR NAME="liblibrarian" --></td>
-			<td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_VAR NAME="authorised_value" --></td>
-			<td><a href="<!-- TMPL_VAR NAME="subfield_link" -->">View Subfields</a></td>
-			<td><a class="edit" href="<!-- TMPL_VAR NAME="edit" -->">Edit Tag</a> <a class="delete" href="<!-- TMPL_VAR NAME="delete" -->">Delete Tag</a></td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-	<!--/TMPL_IF -->
-	</table>
-	<div class="tabitem">
-		<!-- TMPL_IF NAME="isprevpage" -->
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
-		<input type="hidden" value="<!-- TMPL_VAR NAME="prevpage" -->" name="offset" /><input type="hidden" value="<!-- TMPL_VAR NAME="searchfield" -->" name="searchfield" /><input type="hidden" value="<!-- TMPL_VAR NAME="frameworkcode" -->" name="frameworkcode" /><!--TMPL_IF Name="select_display"--><input type="hidden" value="select_display" name="True" /><!--/TMPL_IF --><input type="submit" value="&lt;&lt; Previous Page" class="submit" /></form>
-		<!-- /TMPL_IF -->	
-		
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="hidden" name="op" value="add_form" />
-	<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
-		<input type="submit" value="Add New MARC Tag" class="submit" /></form>
-		
-		<!-- TMPL_IF NAME="nextpage" -->
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextpage" -->" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><!--TMPL_IF Name="select_display"--><input type="hidden" name="select_display" value="True" /><!--/TMPL_IF --><input type="submit" class="submit" value="Next Page &gt;&gt;" /></form>
-		<!-- /TMPL_IF -->
-</div>
-</div>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/institutions-careers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/institutions-careers.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/institutions-careers.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/institutions-careers.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,126 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="masthead.inc" -->
-<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
-<script language="JavaScript" type="text/javascript">
-
-function confirm_delete_career(id_career) {
-	if (confirm('Are you sure you want to delete the selected career/curse?')) {
-	
-		document.location.href = "/cgi-bin/koha/admin/admin-careers.pl?op=del&id_career=" + id_career;
-	}
-	
-}
-
-function confirm_delete(id_institution) {
-	if (confirm('Are you sure you want to delete the selected educational institution?')) {
-
-		document.location.href = "/cgi-bin/koha/admin/institutions-careers.pl?op=del&id_institution=" + id_institution;
-	}
-
-}
-
-more = 0;
-less = 0;
-
-	function preloadImages() {
-		more = new Image();
-		more.src = "<!-- TMPL_VAR NAME="themelang" -->/images/more.gif";
-		less = new Image();
-		less.src = "<!-- TMPL_VAR NAME="themelang" -->/images/less.gif";
-	}
-
-	function show(element, img) {
-	    var block = document.getElementById(element);
-		if (block.style.display == 'none') {
-		    block.style.display = 'inline';
-		    img.src = less.src;
-		} else {
-			block.style.display = 'none';
-			img.src = more.src;
-		}
-	}
-	
-	preloadImages();
-
-</script>
-
-<div id="main">
-	<h1>Educational institutions (Courses)</h1>
-	
-	<!-- TMPL_IF NAME="add_form" -->
-	
-	    <form action="/cgi-bin/koha/admin/institutions-careers.pl">
-	        <input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->">
-	        <input type="hidden" name="id_institution" value="<!-- TMPL_VAR NAME="id_institution" -->">
-			Educational institution name:&nbsp;&nbsp;
-			<input size="50" type="text" name="institution_name" value="<!-- TMPL_VAR NAME="institution_name" -->"
-	        <br><br>
-	        <input type="submit" class="button" value="Save">
-	        <input type="button" class="button" value="Cancel" onclick="document.location.href='/cgi-bin/koha/admin/institutions-careers.pl'">
-	    </form>
-	
-	
-	<!-- TMPL_ELSE -->
-	
-	<table border="0" cellspacing="0" cellpadding="3">
-
-		<!-- TMPL_LOOP NAME="institutions" -->
-			<tr>
-			    <td class="hilighted" width="5%">
-					<a href="/cgi-bin/koha/admin/institutions-careers.pl?op=add_form&id_institution=<!-- TMPL_VAR NAME="id_institution" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/fileopen.png" border="0"></a>
-				</td>
-				<td class="hilighted" width="5%">
-					<a href="javascript:confirm_delete(<!-- TMPL_VAR NAME="id_institution" -->)" ><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/edittrash.png" border="0"></a>
-				</td>
-				<td align="center" class="hilighted"><b><!-- TMPL_VAR NAME="institution_name" --></b></td>
-				<td class="hilighted" align="center" width="15%">
-				    <a class="button" id="small" href="/cgi-bin/koha/admin/admin-careers.pl?op=add_form&id_institution=<!-- TMPL_VAR NAME="id_institution" -->">Add course</a>
-				</td>
-			</tr>
-			
-			<tr>
-			    <td colspan="3" style="font-size:13px">
-			        <img style="cursor:hand" class="relative" onclick="show('<!-- TMPL_VAR NAME="id_institution" -->', this)" src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif"> Courses
-			    </td>
-			    <td colspan="1">
-			    </td>
-			</tr>
-			
-			<tr>
-			    <td colspan="4">
-			        <table  id="<!-- TMPL_VAR NAME="id_institution" -->" style="border-spacing:5px;border-collapse:separate;border:0;display:none">
-						<tr>
-							<td colspan="3">
-								<hr>
-							</td>
-						</tr>
-			        <!-- TMPL_LOOP NAME="careers" -->
-			            <tr>
-			                <td>
-			                    <!-- TMPL_VAR NAME="career_name" -->
-			                </td>
-			                <td width="5%">
-                                <a class="button" id="small" href="/cgi-bin/koha/admin/admin-careers.pl?op=add_form&id_career=<!-- TMPL_VAR NAME="id_career" -->&id_institution=<!-- TMPL_VAR NAME="id_institution" -->">Edit</a>
-			                </td>
-			                <td width="5%">
-                                <input class="button" id="small" type="button" onclick="confirm_delete_career(<!-- TMPL_VAR NAME="id_career" -->)" value="Delete">
-			                </td>
-						</tr>
-						<tr>
-			                <td colspan="3">
-								<hr>
-							</td>
-			            </tr>
-			        <!-- /TMPL_LOOP -->
-			        </table>
-			    </td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-	</table>
-	<br>
-    <a class="button" href="/cgi-bin/koha/admin/institutions-careers.pl?op=add_form">Add educational institution</a>
-
-	<!-- /TMPL_IF -->
-
-</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/issuingrules.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/issuingrules.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/issuingrules.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/issuingrules.tmpl	24 Feb 2006 11:18:17 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,61 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: Issuing Rules<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-	<h1>Defining <!-- TMPL_IF NAME="branch" -->issuing rules for <!-- TMPL_VAR NAME="branch" --><!-- TMPL_ELSE -->default issuing rules<!-- /TMPL_IF --></h1>
-	<div class="help">
-		<h3>HINT for issues</h3>
-		<p>Each box needs to be filled in with issuelength,maxissues</p>
-		<p>eq 21,5</span> enables 5 issues for 21 days</p>
-		
-	<div class="help">
-		<h3>HINT for fines</h3>
-		<p>Each box needs to be filled in with fine,time to start charging,charging cycle</p>
-		<p>eg 1,7,7</span> = 1 [USD,EUR,etc] fine after 7 days, every 7 days</p>
-		<p>Fines are calculated by the fines2.pl script, located in misc directory.  Ask your administrator to put this script in crontab, after midnight, to have fines calculated every night</p>
-	
-	<div class="help">
-		<h3>Default values</h3>
-		<p> If a cell is not filled, the 1st of the following value is searched :</p>
-		<ul>
-			<li>same branch and same borrower category, itemtype *</li>
-			<li>same branch and same itemtype, borrower category *</li>
-			<li>same itemtype and borrower category, branch *</li>
-			<li>everywhere</li>
-			<li>If nothing is set, default is 21,5 (hardcoded)</li>
-		</ul>
-	
-		<form method="post" action="/cgi-bin/koha/admin/issuingrules.pl">
-		<label for="branch">Select a branch :</label>
-			<select id="branch" name="branch">
-				<option value="">Default</option>
-			<!-- TMPL_LOOP NAME="branchloop" -->
-				<option value="<!-- TMPL_VAR NAME="value" -->"<!-- TMPL_IF NAME="selected" --> selected="selected"<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="branchname" --></option><!-- /TMPL_LOOP --></select>
-			<input type="submit" value="Select" />
-		</form>
-		<form method="post" action="/cgi-bin/koha/admin/issuingrules.pl">
-			<input type="hidden" name="op" value="save" />
-			
-			<table>
-			<caption>Defining issuing rules for <!-- TMPL_VAR NAME="branch" --></caption>
-			<tr>
-				<th>&nbsp;</th><!-- TMPL_LOOP NAME="title" --><th scope="col"><!-- TMPL_VAR NAME="in_title" --><br/>Issue / fine</th><!-- /TMPL_LOOP -->
-			</tr>
-			<!-- TMPL_LOOP NAME="row" -->
-				<tr>
-					<th><!-- TMPL_VAR NAME="categorycode" --></th>
-					<!-- TMPL_LOOP NAME="cell" -->
-						<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
-							<input name="<!-- TMPL_VAR NAME="issuingname" -->" value="<!-- TMPL_VAR NAME="issuingvalue" -->" size="6" maxlength="10" /> /
-							<input name="<!-- TMPL_VAR NAME="finesname" -->" value="<!-- TMPL_VAR NAME="finesvalue" -->" size="6" maxlength="10" />
-						</td>
-					<!-- /TMPL_LOOP -->
-				</tr>
-			<!-- /TMPL_LOOP -->
-			</table>
-			
-			<input type="submit" value="Save Changes" />
-		</form>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/itemtypes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/itemtypes.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/itemtypes.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/itemtypes.tmpl	7 Apr 2006 11:10:25 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,296 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-Koha -- System Administration: 
-
-<!-- TMPL_IF name="add_form" -->
-  <!-- TMPL_IF name="itemtype" -->
-Modify item type '<!-- TMPL_VAR name="itemtype" -->'
-  <!-- TMPL_ELSE -->
-Add item type
-  <!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="delete_confirm" -->
-  <!-- TMPL_IF name="total" -->
-Cannot Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'
-  <!-- TMPL_ELSE -->
-Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'?
-  <!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="delete_confirmed" -->
-Data Deleted
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="else" -->
-Item Types Administration
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<!-- TMPL_IF name="add_form" -->
-
-<form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
-  <feldset>
-    <legend>
-  <!-- TMPL_IF name="itemtype" -->
-      Modify item type
-  <!-- TMPL_ELSE -->
-      Add item type
-  <!-- /TMPL_IF -->
-    </legend>
-
-    <input type="hidden" name="op" value="add_validate" />
-    <input type="hidden" name="checked" value="0" />
-		
-    <table>
-  <!-- TMPL_IF name="itemtype" -->
-      <tr>
-        <th>
-          <label for="">Item type</label>
-        </th>
-        <td>
-          <input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->" />
-          <!-- TMPL_VAR name="itemtype" -->
-        </td>
-      </tr>
-  <!-- TMPL_ELSE -->
-      <tr>
-        <th>
-          <label for="">Item type</label>
-        </th>
-        <td>
-          <input type="text" name="itemtype" size="6" maxlength="4" onblur="toUC(this)" />
-        </td>
-      </tr>
-  <!-- /TMPL_IF -->
-      <tr>
-        <th>
-          <label for="description">Description</label>
-        </th>
-	<td>
-          <input type="text" id="description" name="description" size="48" maxlength="80"
-                value="<!-- TMPL_VAR name="description" escape="HTML" -->" />
-        </td>
-      </tr>
-      <tr>
-        <th>Image</th>
-        <td>
-          <p>
-  <!-- TMPL_LOOP NAME="IMAGESLOOP" -->
-            <label>
-    <!-- TMPL_IF name="checked" -->
-              <input type="radio" name="image" value="<!-- TMPL_VAR name="KohaImage" -->" checked="checked" />
-    <!-- TMPL_ELSE -->
-              <input type="radio" name="image" value="<!-- TMPL_VAR name="KohaImage" -->" />
-    <!-- /TMPL_IF -->
-              <img src="<!-- TMPL_VAR name="KohaImageSrc" -->">
-            </label>
-  <!-- /TMPL_LOOP -->
-          </p>
-          <hr />
-          <p>
-            <label>
-  <!-- TMPL_IF name="remote_image" -->
-            <input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" />
-  <!-- TMPL_ELSE -->
-            <input type="radio" id="remote_image_check" name="image" value="remoteImage" />
-  <!-- /TMPL_IF -->
-            remote image
-            </label>
-            <input type="text"
-                   name="remoteImage"
-                   size="48"
-              maxlength="200"
-                  value="<!-- TMPL_VAR name="remote_image" -->"
-            onmousedown="document.getElementById('remote_image_check').checked = true;"
-            />
-            </label>
-  <!-- TMPL_IF name="remote_image" -->
-            <img src="<!-- TMPL_VAR name="remote_image" -->" />
-  <!-- /TMPL_IF -->
-          </p>
-          <hr />
-          <p>
-            <label><input type="radio" name="image" value="removeImage" /> remove image</label>
-          </p>
-        </td>
-      </tr>
-      <tr>
-        <th>
-          <label for="notforloan">Not for loan</label>
-        </th>
-        <td>
-          <input type="checkbox" id="notforloan" name="notforloan"
-  <!-- TMPL_IF name="notforloan" -->
-              checked="checked"
-  <!-- /TMPL_IF -->
-                value="1">
-          (if checked, no item of this type can be issued. If not checked, every item of this type can be issued unless notforloan is set for a specific item)
-        </td>
-      </tr>
-      <tr>
-        <th>
-          <label for="renewalsallowed">Renewals</label>
-        </th>
-        <td>
-          <input type="text" id="renewalsallowed" name="renewalsallowed" size="3" maxlength="3" value="
-  <!-- TMPL_IF name="renewalsallowed" -->
-          <!-- TMPL_VAR NAME="renewalsallowed" -->
-  <!-- /TMPL_IF -->" value="1" /><!-- Display for NPL //<input type="hidden" name="rentalcharge" value="0" /> //Display for NPL -->
-        </td>
-      </tr>
-<!-- Hide from NPL-->
-      <tr>
-        <th>
-          <label for="rentalcharge">Rental charge</label>
-        </th>
-        <td>
-          <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="<!-- TMPL_VAR name="rentalcharge" -->" />
-        </td>
-      </tr><!--  /Hide from NPL -->
-    </table>
-
-    <p id="action">
-      <input type="button" value="Save Changes" onclick="Check(this.form)" />
-      <input type="button" value="Cancel" onclick="history.back();" />
-    </p>
-  </fieldset>
-</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="delete_confirm" -->
-<!-- TMPL_IF name="total" --><div class="error">This record is used <!-- TMPL_VAR name="total" --> times. Deletion is not possible.<!-- /TMPL_IF -->
-<div class="table details">	<table>
-	<caption><!-- TMPL_IF name="total" -->Cannot Delete Item Type<!-- TMPL_ELSE -->Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'?<!-- /TMPL_IF --></caption>
-		<tr>
-			<th>Item type</th>
-			<td><!-- TMPL_VAR name="itemtype" --></td>
-		</tr>
-
-	<tr><th>Description</th><td><!-- TMPL_VAR name="description" --></td></tr>
-	<tr><th>Loan length</th><td><!-- TMPL_VAR name="loanlength" --></td></tr>
-	<tr><th>Renewals</th><td><!-- TMPL_IF name="renewalsallowed" -->Allowed<!-- TMPL_ELSE -->Not allowed<!-- /TMPL_IF --></td></tr>
-<!-- Hide from NPL  --><tr><th>Rental charge</th><td><!-- TMPL_VAR name="rentalcharge" --></td></tr><!-- Hide from NPL --></table>
-		<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
-		<input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->" /><!-- TMPL_IF name="total" -->
-		</form><form action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="submit" value="OK" /></form>
-	<!-- TMPL_ELSE -->
-		<input type="submit" value="Delete this Item Type" /></form> <form action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="submit" value="Do Not Delete" /></form>
-	<!-- /TMPL_IF -->
-
-	
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="else" -->
-<h2>Item Types Administration</h2>
-<table>
-  <tr>
-    <th>image</th>
-    <th>Code</th>
-    <th>Description</th>
-    <th>Not for Loan</th>
-    <th>Renewable</th>
-    <th>Charge</th>
-    <th>Actions</th>
-  </tr>
-  <!-- TMPL_LOOP name="loop" -->
-    <!-- TMPL_IF NAME="toggle" -->
-  <tr>
-    <!-- TMPL_ELSE -->
-  <tr class="highlight">
-    <!-- /TMPL_IF -->
-    <td><img src="<!-- TMPL_VAR name="imageurl" -->" /></td>
-    <td>
-      <a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;itemtype=<!-- TMPL_VAR name="itemtype" escape="HTML" -->">
-        <!-- TMPL_VAR name="itemtype" -->
-      </a>
-    </td>
-    <td><!-- TMPL_VAR name="description" --></td>
-    <td><!-- TMPL_IF NAME="notforloan" -->Yes<!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
-    <td>
-    <!-- TMPL_IF NAME="renewalsallowed" -->
-      <!-- TMPL_VAR name="renewalsallowed" --> time(s)
-    <!-- TMPL_ELSE -->
-      No
-    <!-- /TMPL_IF -->
-    </td>
-    <td>
-    <!-- TMPL_UNLESS name="notforloan" -->
-      <!-- TMPL_VAR NAME="rentalcharge" -->
-    <!-- /TMPL_UNLESS -->
-    </td>
-    <td>
-      <a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;itemtype=<!-- TMPL_VAR name="itemtype" escape="HTML" -->">Edit</a>
-      <a href="<!-- TMPL_VAR name="script_name" -->?op=delete_confirm&amp;itemtype=<!-- TMPL_VAR name="itemtype" escape="HTML" -->">Delete</a>
-    </td>
-  </tr>
-  <!-- /TMPL_LOOP -->
-</table>
-
-<div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
-
-<p><a href="<!-- TMPL_VAR name="script_name" -->?op=add_form">Add Item type</a></p>
-<!-- /TMPL_IF -->
-
-
-<script language="javascript" type="text/javascript">
-function _(s) { return s } // dummy function for gettext
-
-function isNotNull(f,noalert) {
-	if (f.value.length ==0) {
-		return false;
-	}
-	return true;
-}
-
-function toUC(f) {
-	var x=f.value.toUpperCase();
-	f.value=x;
-	return true;
-}
-
-function isNum(v,maybenull) {
-var n = new Number(v.value);
-if (isNaN(n)) {
-	return false;
-	}
-if (maybenull==0 && v.value=='') {
-	return false;
-}
-return true;
-}
-
-function isDate(f) {
-	var t = Date.parse(f.value);
-	if (isNaN(t)) {
-		return false;
-	}
-}
-
-function Check(f) {
-	var ok=1;
-	var _alertString="";
-	var alertString2;
-	if (f.itemtype.value.length==0) {
-		_alertString += "\n- " + _("Itemtype missing");
-	}
-	if (!(isNotNull(window.document.Aform.description,1))) {
-		_alertString += "\n- " + _("Description missing");
-	}
-	if ((!isNum(f.rentalcharge,0)) && f.rentalcharge.value.length > 0) {
-		_alertString += "\n- " + _("Rental charge is not a number");
-	}
-	if (_alertString.length==0) {
-		document.Aform.submit();
-	} else {
-		alertString2  = _("Form not submitted because of the following problem(s)");
-		alertString2 += "\n------------------------------------------------------------------------------------\n";
-		alertString2 += _alertString;
-		alert(alertString2);
-	}
-}
-</script>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/koha-electronic.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/koha-electronic.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/koha-electronic.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/koha-electronic.tmpl	27 Sep 2006 21:40:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,113 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="masthead.inc" -->
-<!-- TMPL_INCLUDE NAME="intranet-nav-brief.inc" -->
-<div id="main">
-	<h1> OPAC Online Databases</h1>
-	<!-- TMPL_IF name="add_form" -->
-
-		<form name="add_form" method="post" action="/cgi-bin/koha/admin/koha-electronic.pl" >
-			<input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->">
-			<input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->">
-			<table style="border:0" cellspacing="0" cellpadding="2">
-			    <tr>
-			        <td>Language
-			       
-						<select name="lang">
-			    			<option value="tr" <!-- TMPL_IF name="tr" -->selected<!-- /TMPL_IF --> > Türkçe</option>
-			    			<option value="en" <!-- TMPL_IF name="en" -->selected<!-- /TMPL_IF -->>English</option>
-						</select>
-					</td><td></td>
-					<td>Section
-						<select name="section">
-						<option value="affiliated" <!-- TMPL_IF name="affiliated" -->selected<!-- /TMPL_IF --> >Affiliated</option>
-			    			<option value="trial" <!-- TMPL_IF name="trial" -->selected<!-- /TMPL_IF --> >Trial</option>
-			    			<option value="economy" <!-- TMPL_IF name="economy" -->selected<!-- /TMPL_IF --> >Economy & Politics</option>
-			    			<option value="social" <!-- TMPL_IF name="social" -->selected<!-- /TMPL_IF -->>Social Sciences</option>
-						<option value="computer" <!-- TMPL_IF name="computer" -->selected<!-- /TMPL_IF --> >Computer Sciences</option>
-			    			<option value="health" <!-- TMPL_IF name="health" -->selected<!-- /TMPL_IF -->>Health & Medicine</option>
-						<option value="general" <!-- TMPL_IF name="general" -->selected<!-- /TMPL_IF --> > Interdiciplinary</option>
-			    			<option value="maths" <!-- TMPL_IF name="maths" -->selected<!-- /TMPL_IF -->>Maths,Physics,Chemistry</option>
-						<option value="other" <!-- TMPL_IF name="other" -->selected<!-- /TMPL_IF --> > Other Subjects</option>
-			    			</select>
-					</td>
-			    </tr>
-				<tr>
-					<td>Title:
-					<input size="30" type="text" name="title" value="<!-- TMPL_VAR NAME="title" -->"></td>
-					<td>URL:
-					<input size="30" type="text" name="href" value="<!-- TMPL_VAR NAME="href" -->"></td>
-					<td>Resim:
-					<input size="20" type="text" name="image" value="<!-- TMPL_VAR NAME="image" -->"></td>
-				</tr>
-				<tr>
-					<td>Text</td>
-					<td><textarea name="edata" cols="35" rows="4"><!-- TMPL_VAR NAME="edata" --></textarea></td>
-				</tr>
-				<tr>
-					<td  colspan="2">
-						<input class="button" type="submit" value="Save">
-						<input class="button" type="button" value="Cancel" onclick="window.location.href='/cgi-bin/koha/admin/koha-electronic.pl'">
-					</td>
-				</tr>
-			</table>
-		</form>
-
-
-	<!-- TMPL_ELSE -->
-
-		<!-- TMPL_IF NAME="opac_electronic_count" -->
-
-            <form name="add_form" method="post" action="/cgi-bin/koha/admin/koha-electronic.pl" >
-			Language:
-			<select name="lang">
-			    <option value="">All</option>
-			    <option value="tr" <!-- TMPL_IF name="tr" -->selected<!-- /TMPL_IF --> >Türkçe</option>
-			    <option value="en" <!-- TMPL_IF name="en" -->selected<!-- /TMPL_IF -->>English</option>
-			</select>
-			<input type="submit" class="button" value="Filter">
-			</form>
-
-			<form name="del_form" method="post" action="/cgi-bin/koha/admin/koha-electronic.pl" onsubmit="return confirm("Are you sure you want to delete the selected database?')">
-				<table border="0" cellspacing="0" cellpadding="3">
-					<tr bgcolor="#99cc33">
-						<th></td>
-						<th style="padding-left:3px;padding-right:3px">Language</th>
-						<th>image</th>
-						<th>URL</th>
-						<th  width="20%">Title</th>
-						<th>Text</th>
-						<th></th>
-					</tr>
-
-					<!-- TMPL_LOOP NAME="opac_electronic" -->
-						<tr>
-							<td width="5%"><input type="checkbox" name="ids" value="<!-- TMPL_VAR NAME="idelectronic" -->"</td>
-							<td align="center"><!-- TMPL_VAR NAME="lang" --></td>
-							<td><!-- TMPL_VAR NAME="image" --></td>
-							<td><!-- TMPL_VAR NAME="href" --></td>
-							<td align="center"><!-- TMPL_VAR NAME="title" --></td>
-							<td><!-- TMPL_VAR NAME="edata" --></td>
-							<td width="5%">
-								<a href="/cgi-bin/koha/admin/koha-electronic.pl?op=add_form&id=<!-- TMPL_VAR NAME="idelectronic" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/fileopen.png" border="0"></a>
-							</td>
-						</tr>
-					<!-- /TMPL_LOOP -->
-
-				</table>
-					<input type="hidden" name="op" value="del">
-					<input type="submit" class="button" value="Delete selected">
-			</form>
-		<!-- TMPL_ELSE -->
-			<h5>No databases loaded</h5>
-		<!-- /TMPL_IF -->
-
-		<form name="add_form" method="post" action="/cgi-bin/koha/admin/koha-electronic.pl">
-			<input type="hidden" name="op" value="add_form">
-			<input type="submit" class="button" value="Add OPAC databases">
-		</form>
-	
-	
-	<!-- /TMPL_IF -->
-
-</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/koha_attr.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/koha_attr.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/koha_attr.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/koha_attr.tmpl	27 Sep 2006 21:40:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,199 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
-<!-- TMPL_IF name="add_form" --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of attribute '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirmed" -->Data Deleted<!-- /TMPL_IF -->
-<!-- TMPL_IF name="else" -->MARC tag Structure<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-<h1>KOHA attr matching for biblios,holdings and authorities XML & MARC records</h1>
-<script language="javascript" type="text/javascript">
-	function _(s) { return s } // dummy function for gettext
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function isNotNull(f,noalert) {
-		if (f.value.length ==0) {
-   return false;
-		}
-		return true;
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function toUC(f) {
-		var x=f.value.toUpperCase();
-		f.value=x;
-		return true;
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function isNum(v,maybenull) {
-	var n = new Number(v.value);
-	if (isNaN(n)) {
-		return false;
-		}
-	if (maybenull==0 && v.value=='') {
-		return false;
-	}
-	return true;
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function isDate(f) {
-		var t = Date.parse(f.value);
-		if (isNaN(t)) {
-			return false;
-		}
-	}
-	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-	function Check(f) {
-		var ok=1;
-		var _alertString="";
-		var alertString2;
-		if (f.marctokoha.value.length==0) {
-			_alertString += "\n- " + _("field name missing");
-		}
-		if (_alertString.length==0) {
-			document.Aform.submit();
-		} else {
-			alertString2  = _("Form not submitted because of the following problem(s)");
-			alertString2 += "\n------------------------------------------------------------------------------------\n";
-			alertString2 += _alertString;
-			alert(alertString2);
-		}
-	}
-	</script>
-
-<!-- TMPL_IF NAME="add_form" -->
-<!-- ------------------------------------------------------------------------ -->
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-		<input type="hidden" name="op" value="add_validate" />
-		<input type="hidden" name="id" value='<!-- TMPL_VAR NAME="id" -->' />
-	<div class="data"><table>
-		<caption><!-- TMPL_IF NAME="use-heading-flags-p" --><!-- TMPL_IF NAME="heading-modify-tag-p" -->Modify tag<!-- /TMPL_IF --><!-- TMPL_IF NAME="heading-add-tag-p" -->Add tag<!-- /TMPL_IF --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></caption>
-	<tr><th><label>Kohafield<label></th><td><!-- TMPL_VAR NAME="searchfield" --></td></tr>
-	<tr><th><label for="label">Field description</label></th><td><input type="text" id="label" name="label" value="<!-- TMPL_VAR NAME="label" escape="HTML" -->" size="80" maxlength="100" /></td></tr>
-	<tr><th><label for="attr">Main attribute name</label></th><td><input type="text" id="attr" name="attr" value="<!-- TMPL_VAR NAME="attr" escape="HTML" -->" size="40" maxlength="80" />Do not insert the "@attr 1=" part </td></tr>
-	<tr><th><label for="attr">Extra attributes</label></th><td><input type="text" id="extraattr" name="extraattr" value="<!-- TMPL_VAR NAME="extraattr" escape="HTML" -->" size="40" maxlength="80" />any other structure attribute like @attr 4=5 for date</td></tr>
-	<tr><th><label for="taglist">MARC tag for this field</label></th><td><!-- TMPL_VAR NAME="tagfield"  --></td></tr>
-	<tr><th><label for="tagsublist">MARC subfieldcode for this field</label></th><td><!-- TMPL_VAR NAME="tagsubfield"  --></td></tr>
-	<tr><th><label for="sorts">Sorts on this field</label></th><td><!-- TMPL_VAR NAME="sorts" --></td></tr>
-	<tr><th><label for="opacshow">Shows in librarian searches</label></th><td><!-- TMPL_VAR NAME="intrashow" --><label for="opacshow">Shows in opac search</label><!-- TMPL_VAR NAME="opacshow" --></td></tr>
-	<tr><th><label for="facets_label">Grouping name in facets</label></th><td><input type="text" id="facets_label" name="facets_label" value="<!-- TMPL_VAR NAME="facets_label" escape="HTML"-->" size="80" /></td></tr>
-	<tr><th><label for="serverlist">Record type for this field</label></th><td><!-- TMPL_VAR NAME="recordtype"  --></td></tr>
-	
-	
-	</table></div>
-		<p><input type="submit" value="Save Changes" class="submit" onclick=Check(this.form) /></p>
-	<p><input type="submit" value="Cancel and Return to Koha attr Structure" class="cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->'; return false;" /></p>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-<!-- ------------------------------------------------------------------------ -->
-<div class="data"><table>
-<caption>Confirm Deletion of Field <em><!-- TMPL_VAR NAME="searchfield" --></em>?</caption>
-	<tr><th>Kohafield: </th><td><!-- TMPL_VAR NAME="searchfield" --></td></tr>
-	<tr><th>Description: </th><td><!-- TMPL_VAR NAME="label" --></td></tr>
-	</table></div>
-	<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed"/><input type="hidden" name="id" value='<!-- TMPL_VAR NAME="id" -->' />	<input type="submit" class="cancel" value="Yes, Delete this Tag" /></form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" class="submit" value="No, Do Not Delete" /></form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirmed" -->
-<!-- ------------------------------------------------------------------------ -->
-	<div class="details"><h3>Field Deleted</h3>
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-	<input type="submit" class="submit" value="Return to Koha attributes Structure" />
-	</form></div>
-<!-- /TMPL_IF -->
-
-
-<!-- ------------------------------------------------------------------------ -->
-<!-- TMPL_IF NAME="else" -->
-	<form name="f" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		
-		<input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" size="60" />
-		<input type="submit" value="Kohafield Search" class="submit" />
-		<p><!-- TMPL_IF Name="select_display"-->
-				<label for="onlyused">Display only used Tags/Subfields</label><input type="checkbox" name="select_display" id="onlyused" value="True" checked="checked" onchange="document.f.submit()" />
-			<!-- TMPL_ELSE -->
-				<label for="onlyused">Display only used Tags/Subfields</label><input type="checkbox" name="select_display"  id="onlyused" value="True" onchange="document.f.submit()" />
-			<!--/TMPL_IF --> 
-		</p>
-	</form>
-	<div class="help">NOTE : if you change the link between a KOHA field and a Z39.50 attribute, ask your administrator to reindex ZEBRA with these attributes.</div>
-
-	<div class="data">
-	<table>
-		<tr>
-			<th scope="col">Koha field</th>
-			<th scope="col">Attribute</th>
-			<th scope="col">MARC tag/sub</th>
-			<th scope="col">Label</th>
-			<th scope="col">Sorts</th>
-			<th scope="col">Intra Show</th>
-			<th scope="col">Opac Show</th>
-			<th scope="col">Facets Group</th>
-			<th scope="col">Related record</th>
-			
-			
-			<th scope="col">&nbsp;</th>
-		</tr>
-	<!-- TMPL_IF NAME="select_display" -->
-		<!-- TMPL_LOOP NAME="loop" -->
-		<input type="hidden" value="<!-- TMPL_VAR NAME="attr" -->" />
-		<input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
-		<tr class="highlight">
-			<td><b><!-- TMPL_VAR NAME="kohafield" --></b></td>
-			<td>@attr 1=<!-- TMPL_VAR NAME="attr" --> <!-- TMPL_VAR NAME="extraattr" --></td>
-			<td><!-- TMPL_VAR NAME="tagfield" --><!-- TMPL_VAR NAME="tagsubfield" --></td>
-			<td><!-- TMPL_VAR NAME="label" --></td>
-			<td><!-- TMPL_IF NAME="sorts" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_IF NAME="intrashow" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_IF NAME="opacshow" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_VAR NAME="facets_label" --></td>
-			<td><!-- TMPL_VAR NAME="recordtype" --></td>
-			<td><a class="edit" href="<!-- TMPL_VAR NAME="edit" -->">Edit Tag</a> <a class="delete" href="<!-- TMPL_VAR NAME="delete" -->">Delete Tag</a></td>
-		</tr>
-		<tr>
-			<td>
-				&nbsp;
-			</td>
-			
-		</tr>
-		<!-- /TMPL_LOOP -->
-	<!-- TMPL_ELSE -->
-		<!-- TMPL_LOOP NAME="loop" -->
-	<input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
-		<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-			<td><b><!-- TMPL_VAR NAME="kohafield" --></b></td>
-			<td>@attr 1=<!-- TMPL_VAR NAME="attr" --> <!-- TMPL_VAR NAME="extraattr" --></td>
-			<td><!-- TMPL_VAR NAME="tagfield" --><!-- TMPL_VAR NAME="tagsubfield" --></td>
-			<td><!-- TMPL_VAR NAME="label" --></td>
-			<td><!-- TMPL_IF NAME="sorts" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_IF NAME="intrashow" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_IF NAME="opacshow" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_VAR NAME="facets_label" --></td>
-			<td><!-- TMPL_VAR NAME="recordtype" --></td>
-			<td><a class="edit" href="<!-- TMPL_VAR NAME="edit" -->">Edit Tag</a> <a class="delete" href="<!-- TMPL_VAR NAME="delete" -->">Delete Tag</a></td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-	<!--/TMPL_IF -->
-	</table>
-	<div class="tabitem">
-		<!-- TMPL_IF NAME="isprevpage" -->
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
-		<input type="hidden" value="<!-- TMPL_VAR NAME="prevpage" -->" name="offset" /><input type="hidden" value="<!-- TMPL_VAR NAME="searchfield" -->" name="searchfield" /><!--TMPL_IF Name="select_display"--><input type="hidden" value="select_display" name="True" /><!--/TMPL_IF --><input type="submit" value="&lt;&lt; Previous Page" class="submit" /></form>
-		<!-- /TMPL_IF -->	
-		
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="hidden" name="op" value="add_form" />
-	
-	
-		<input type="submit" value="Add Koha atrribute" class="submit" /></form>
-		
-		<!-- TMPL_IF NAME="nextpage" -->
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextpage" -->" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-		<!--TMPL_IF Name="select_display"--><input type="hidden" name="select_display" value="True" /><!--/TMPL_IF --><input type="submit" class="submit" value="Next Page &gt;&gt;" /></form>
-		<!-- /TMPL_IF -->
-</div>
-</div>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/printers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/printers.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/printers.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/printers.tmpl	24 Feb 2006 11:18:17 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,191 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
-<!-- TMPL_IF NAME=add_form --><!-- TMPL_IF NAME="searchfield" -->Modify printer '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add printer<!-- /TMPL_IF --><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="add_validate" -->Printer Added<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Printer '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="delete_confirmed" -->Printer Deleted<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="else" -->Printers<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<!-- TMPL_IF NAME=add_form -->
-        <script language="JavaScript" type="text/javascript">
-        //
-        function isNotNull(f,noalert) {
-                if (f.value.length ==0) {
-   return false;
-                }
-                return true;
-        }
-        //
-        function toUC(f) {
-                var x=f.value.toUpperCase();
-                f.value=x;
-                return true;
-        }
-        //
-        function isNum(v,maybenull) {
-        var n = new Number(v.value);
-        if (isNaN(n)) {
-                return false;
-                }
-        if (maybenull==0 && v.value=="") {
-                return false;
-        }
-        return true;
-        }
-        //
-        function isDate(f) {
-                var t = Date.parse(f.value);
-                if (isNaN(t)) {
-                        return false;
-                }
-        }
-        //
-        function Check(f) {
-                var ok=1;
-                var _alertString="";
-                var alertString2;
-                if (f.printername.value.length==0) {
-                        _alertString += "- printer name missing\n";
-                }
-                if (f.printqueue.value.length==0) {
-                        _alertString += "- Queue missing\n";
-                }
-                if (_alertString.length==0) {
-                        document.Aform.submit();
-                } else {
-                        alertString2 = "Form not submitted because of the following problem(s)\n";
-                        alertString2 += "------------------------------------------------------------------------------------\n\n";
-                        alertString2 += _alertString;
-                        alert(alertString2);
-                }
-        }
-        </script>
-
-
-        
-<!-- TMPL_IF NAME="searchfield" -->
-		<h1>Modify printer</h1>
-	<!-- TMPL_ELSE -->
-		<h1>Add printer</h1>
-	<!-- /TMPL_IF -->
-        <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-        <input type="hidden" name="op" value="add_validate" />
-	<table>
-	<!-- TMPL_IF NAME="searchfield" -->
-		<tr>
-			<td>Printer Name</td>
-			<td>
-				<input type="hidden" name="printername" value="<!-- TMPL_VAR NAME=searchfield -->" /><!-- TMPL_VAR NAME="searchfield" -->
-			</td>
-		</tr>
-	<!-- TMPL_ELSE -->
-		<tr>
-			<td>Printer Name</td>
-			<td>
-				<input type="text" name="printername" size="50" maxlength="50" />
-			</td>
-		</tr>
-	<!-- /TMPL_IF -->
-
-        	<tr>
-			<td>Queue</td>
-			<td><input type="text" name="printqueue" size="50" maxlength="50" value="<!-- TMPL_VAR NAME="printqueue" -->" /> </td>
-		</tr>
-        	<tr>
-			<td>Type</td>
-			<td><input type="text" name="printtype" size="50" maxlength="50" value="<!-- TMPL_VAR NAME="printtype" -->" /> </td>
-		</tr>
-        </table><p><input type="button" value="OK" onclick="Check(this.form);" /> <input type="button" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->';" /></p>
-        </form>
-
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="add_validate" -->
-<h3>Printer Added</h3>
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-        <input type="submit" value="OK" />
-</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-<h3>Confirm Deletion of Printer <em><!-- TMPL_VAR NAME="searchfield" --></em></h3>
-<table>
-		<tr>
-			<td>Printer</td>
-			<td><!-- TMPL_VAR NAME="searchfield" --></td>
-		</tr>
-		<tr>
-			<td>Queue</td>
-			<td><!-- TMPL_VAR NAME="printqueue" --></td>
-		</tr>
-        	<tr>
-			<td>Type</td>
-			<td><!-- TMPL_VAR NAME="printtype" --></td>
-		</tr>
-        	<tr>
-			<td>
-
-			</td>
-			<td>
-
-			</td>
-		</tr>
-	</table>
-    	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-			<input type="hidden" name="op" value="delete_confirmed" />
-			<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-			<input type="submit" value="Delete this Printer" />
-			</form> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-				<input type="submit" value="Do not Delete" />
-			</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirmed" -->
-<h3>Printer Deleted</h3>
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="submit" value="Ok" />
-</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="else" -->
-<h2>Printer Admin</h2>
-	<!-- TMPL_IF NAME=searchfield -->
-		You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
-	<!-- /TMPL_IF -->
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                <input type="text" name="description" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-                <input type="submit" name="submit" value="Search" />
-        </form>
-<table>
-		<tr>
-			<th>Name</th>
-			<th>Queue</th>
-			<th>Type</th>
-			<th>&nbsp;</th>
-		</tr>
-		<!-- TMPL_LOOP NAME=loop -->
-		<tr>
-			<td><!-- TMPL_VAR NAME="printername" --></td>
-			<td><!-- TMPL_VAR NAME="printqueue" --></td>
-			<td><!-- TMPL_VAR NAME="printtype" --></td>
-			<td><form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="printername" -->" /><input type="submit" value="Edit" /></form> <form class="inline" action="" method="get"><input type="hidden" name=
-"op" value="delete_confirm" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="printername" -->" /><input type="submit" value="Delete" /></form></td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-	</table>
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-       <p> <input type="hidden" name="op" value="add_form" /><input type="submit" value="Add Printer" /></p></form>
-	<!-- TMPL_IF NAME="offsetgtzero" -->
-		<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Prev</a>
-	<!-- /TMPL_IF -->
-
-	<!-- TMPL_IF NAME="ltcount" -->
-		<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>	
-	<!-- /TMPL_iF -->
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/roadtype.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/roadtype.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/roadtype.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/roadtype.tmpl	23 May 2006 11:44:23 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,152 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- system administration: road types
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<!-- TMPL_IF NAME="add_form" -->
-	<!-- TMPL_IF NAME="id_city" -->
-		<h1>Modifier un type de voie</h1>
-	<!-- TMPL_ELSE -->
-		<h1>Ajouter un type de voie</h1>
-	<!-- /TMPL_IF -->
-
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-	<input type="hidden" name="op" value="add_validate">
-	<input type="hidden" name="checked" value="0">
-	<input type="hidden" name="roadtypeid" value="<!-- TMPL_VAR NAME="roadtypeid" -->">
-
-<!-- TMPL_IF NAME="roadtypeid" -->
-
-	<p>
-
-	<label>Road type</label>
-	<label><b><!-- TMPL_VAR NAME="roadtypeid" --></b></label>
-	</p>
-	
-<!-- /TMPL_IF -->
-	<p>			
-	<label>Road type</label>
-		
-	<input  type="text" name="road_type" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="road_type" escape=HTML -->">
-				
-	</p>
-	
-	<p>					  
-	<div >
-		<input class="button" type="button" onclick="Check(this.form)" value="OK">
-	</div>	
-	</p>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-	<table>
-		<tr>
-			<th>Road type id </th>
-			<th>
-				<!-- TMPL_VAR NAME="roadtypeid" -->
-			</td>
-		</tr>
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-			<input type="hidden" name="op" value="delete_confirmed">
-			<input type="hidden" name="roadtypeid" value="<!-- TMPL_VAR NAME="roadtypeid" -->">        
-		<tr>
-			<td>Rod type</td>
-			<td><!-- TMPL_VAR NAME="road_type" --></td>
-		</tr>
-		</tr>
-		<tr>
-			<td colspan="2" align="center">Confirm deletion</td>
-		</tr>
-		<tr>
-			<td><input type="submit" value="YES"></form></td>
-			<td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-			<input type="submit" value="NO"></form></td>
-		</tr>	
-	</table>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="else" -->
-	<h2>Road type</h2>
-	<!-- TMPL_IF NAME="searchfield" -->
-		Search on  <!-- TMPL_VAR NAME="searchfield" -->
-	<!-- /TMPL_IF -->
-	<form action="<TMPL_VAR NAME="script_name">" method="post">
-		<input type="text" name="road_type" value="<!-- TMPL_VAR NAME="searchfield" -->">
-		<input type="submit" name="submit" value="OK" class="button">
-	</form>
-
-	<table>
-		<tr>
-			<th>Road type</bh>
-			<th> </th>
-			<th> </th>
-		</tr>
-		<!-- TMPL_LOOP NAME="loop" -->
-		<!-- TMPL_IF NAME="toggle" -->
-		<tr class="hilighted">
-		<!-- TMPL_ELSE -->
-		<tr>
-		<!-- /TMPL_IF -->
-			<td><!-- TMPL_VAR NAME="road_type" --></td>
-			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;roadtypeid=<!-- TMPL_VAR NAME="roadtypeid" -->">edit</a></td>
-			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;roadtypeid=<!-- TMPL_VAR NAME="roadtypeid" -->">delete</a></td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-
-	</table>
-	<p><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="hidden" name="op" value="add_form">
-		<input type="submit" class="button" value="Add road type"  alt="Add road type"><br>
-	</form></p>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-
-<script language="javascript" type="text/javascript">
-		function _(s) { return s } // dummy function for gettext
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function isNotNull(f,noalert) {
-			if (f.value.length == 0) {
-		return false;
-			}
-		return true;
-		}
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function toUC(f) {
-			var x=f.value.toUpperCase();
-			f.value=x;
-			return true;
-		}
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function isNum(v,maybenull) {
-		var n = new Number(v.value);
-		if (isNaN(n)) {
-			return false;
-			}
-		if (maybenull == 0 && v.value =='') {
-			return false;
-		}
-		return true;
-		}
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function isDate(f) {
-			var t = Date.parse(f.value);
-			if (isNaN(t)) {
-				return false;
-			}
-		}
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function Check(f) {
-			var ok=1;
-			var _alertString="";
-			var alertString2;
-			if (f.road_type.value.length == 0  ) {
-				_alertString += "\n- " + _("Road type");
-				alert(_alertString);	
-			}
-			else{
-			document.Aform.submit();
-			}
-		}
-</script>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/admin/stopwords.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/stopwords.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/stopwords.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/stopwords.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,160 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
-<!-- TMPL_IF NAME="else" -->Stop Words Administration<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify Stop Word<!-- TMPL_ELSE -->Add Stop Word<!-- /TMPL_IF --><!-- /TMPL_IF --> 
-<!-- TMPL_IF NAME="add_validate" -->Stop Word Added<!-- /TMPL_IF --> 
-<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Stop Word '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF --> 
-<!-- TMPL_IF NAME="delete_confirmed" -->Stop Word Deleted<!-- /TMPL_IF --> 
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="masthead.inc" -->
-<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
-<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
-
-<div id="main">
-<!-- TMPL_IF NAME="add_form" -->
-        <script>
-        //
-        function isNotNull(f,noalert) {
-                if (f.value.length ==0) {
-   return false;
-                }
-                return true;
-        }
-        //
-        function toUC(f) {
-                var x=f.value.toUpperCase();
-                f.value=x;
-                return true;
-        }
-        //
-        function isNum(v,maybenull) {
-        var n = new Number(v.value);
-        if (isNaN(n)) {
-                return false;
-                }
-        if (maybenull==0 && v.value=="") {
-                return false;
-        }
-        return true;
-        }
-        //
-        function isDate(f) {
-                var t = Date.parse(f.value);
-                if (isNaN(t)) {
-                        return false;
-                }
-        }
-        //
-        function Check(f) {
-                var ok=1;
-                var _alertString="";
-                var alertString2;
-                if (f.word.value.length==0) {
-                        _alertString += "- word missing\n";
-                }
-                if (_alertString.length==0) {
-                        document.Aform.submit();
-                } else {
-                        alertString2 = "Form not submitted because of the following problem(s)\n";
-                        alertString2 += "------------------------------------------------------------------------------------\n\n";
-                        alertString2 += _alertString;
-                        alert(alertString2);
-                }
-        }
-        </SCRIPT>
-
-
-
-        <form action="<!-- TMPL_VAR NAME=script_name -->" name="Aform" method="post">
-        <input type="hidden" name="op" value="add_validate" />
-<!-- TMPL_IF NAME="searchfield" -->
-                <h1>Modify Stop Word</h1>
-        <!-- TMPL_ELSE -->
-                <h1>Add Stop Word</h1>
-        <!-- /TMPL_IF -->         
-<table>
-        <!-- TMPL_IF NAME="searchfield" -->
-                <tr>
-                        <td>Stop Word</td>
-                        <td><input type="hidden" name="word" value="<!-- TMPL_VAR NAME=searchfield -->" /><!-- TMPL_VAR NAME="searchfield" -->
-                        </td>
-                </tr>
-        <!-- TMPL_ELSE -->
-                <tr>
-                        <td>Stop Word: </td>
-                        <td>
-                                <input type="text" name="word" size="50" maxlength="250" onblur="toUC(this);" />
-                        </td>
-                </tr>
-        <!-- /TMPL_IF -->
-        </table><p><input type="button" value="<!-- TMPL_IF NAME="searchfield" -->Update Stop Word<!-- TMPL_ELSE -->Add Stop Word <!-- /TMPL_IF -->" onclick="Check(this.form);" class="submit" /> <input type="button" class="cancel" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->';" /></p>
-        </form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="add_validate" -->
-<h3>Stop Word Added</h3>
-<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-        <input type="submit" value="OK" class="submit" />
-        </form></div>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
- <h3>Confirm Deletion of Stop Word <em><!-- TMPL_VAR NAME="searchfield" --></em></h3>                       <table>
-                <tr>
-                        <td>Stop Word: </td>
-                        <td><!-- TMPL_VAR NAME="searchfield" --></td>
-                </tr>
-	</table><div class="tabitem"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                        <input type="hidden" name="op" value="delete_confirmed" />
-                        <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><input type="submit" value="Delete this Stop Word" class="cancel" />
-                                </form> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                                        <input type="submit" value="Do Not Delete" class="submit" />
-                                </form></div>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirmed" -->
-<h3>Stop Word Deleted</h3>
-<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                <input type="submit" value="OK" class="submit" />
-</form></div>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="else" -->
- <h3>Stop Words Administration</h3>
-        <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                <input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-                <input type="submit" name="submit" value="Search" class="submit" />
-        </form>
-<div id="results">        <!-- TMPL_IF NAME="searchfield" -->
-                You searched for <b><!-- TMPL_VAR NAME="searchfield" --></b>
-        <!-- /TMPL_IF --></div>
-<!-- TMPL_IF NAME="loop" -->
-<table>
-                <tr>
-                        <th>Word</th>
-                        <th>&nbsp;</th>
-                </tr>
-                <!-- TMPL_LOOP NAME="loop" -->
-                <tr>
-                        <td><!-- TMPL_VAR NAME="word" --></td>
-                        <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;searchfield=<!-- TMPL_VAR NAME="word" -->">Delete</a></td>
-                </tr>
-                <!-- /TMPL_LOOP -->
-        </table>
-<!-- /TMPL_IF -->
-<div class="tabitem"><!-- TMPL_IF NAME="offsetgtzero" -->
-               <form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="prevpage" -->" /><input type="submit" class="submit" value="&lt;&lt; Prev" /></form>
-        <!-- /TMPL_IF --> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-        <input type="hidden" name="op" value="add_form" /><input type="submit" value="Add Word" class="submit" />
-        </form> <!-- TMPL_IF NAME="ltcount" -->
-                <form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="next_page" -->" /><input type="submit" class="submit" value="Next &gt;&gt;" /></form>
-        <!-- /TMPL_iF --></div>
-        
-
-        
-
-        
-
-<!-- /TMPL_IF -->
-
-</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/systempreferences.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/systempreferences.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/systempreferences.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/systempreferences.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,254 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
-<!-- TMPL_IF name="add_form" --><!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" -->Data Added<!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->Preferences<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<script language="JavaScript" type="text/javascript">
-		function _(s) { return s } // dummy function for gettext
-		//
-		function isNotNull(f,noalert) {
-			if (f.value.length ==0) {
-	return false;
-			}
-			return true;
-		}
-		//
-		function toUC(f) {
-			var x=f.value.toUpperCase();
-			f.value=x;
-			return true;
-		}
-		//
-		function isNum(v,maybenull) {
-		var n = new Number(v.value);
-		if (isNaN(n)) {
-			return false;
-			}
-		if (maybenull==0 && v.value=='') {
-			return false;
-		}
-		return true;
-		}
-		//
-		function isDate(f) {
-			var t = Date.parse(f.value);
-			if (isNaN(t)) {
-				return false;
-			}
-		}
-		//
-		function Check(f) {
-			var ok=1;
-			var _alertString="";
-			var alertString2;
-			if (f.variable.value.length==0) {
-				_alertString += "\n- " + _("variable missing");
-			}
-			if (f.value.value.length==0) {
-				_alertString += "\n- " + _("value missing");
-			}
-			if (_alertString.length==0) {
-				document.Aform.submit();
-			} else {
-				alertString2  = _("Form not submitted because of the following problem(s)");
-				alertString2 += "\n------------------------------------------------------------------------------------\n";
-				alertString2 += _alertString;
-				alert(alertString2);
-			}
-		}
-		</script>
-
-<!-- TMPL_IF NAME="add_form" -->
-	
-		<!-- TMPL_IF NAME="modify" -->
-			<h1>Modify a system preference</h1>
-		<!-- TMPL_ELSE -->
-			<h1>Add a system preference</h1>
-		<!-- /TMPL_IF -->
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-		
-		
-		<table>
-			<tr><td><label for="explanation">Explanation: </label></td><td><input type="text" name="explanation" id="explanation" size="60" value="<!-- TMPL_VAR NAME="explanation" escape="HTML" -->" /><input type="hidden" name="op" value="add_validate" /></td></tr>
-			<tr><!-- TMPL_IF NAME="searchfield" --><td><label>Variable</label></td><td><!-- TMPL_VAR NAME="searchfield" --><input type="hidden" name="variable" value="<!-- TMPL_VAR NAME="searchfield" -->"></td>
-			<!-- TMPL_ELSE --><td><label for="variable">Variable</label></td><td><input type="text" name="variable" id="variable" size="60" /></td><!-- /TMPL_IF --></tr>
-			<tr><td><label for="value">Value</label></td><td><!-- TMPL_IF NAME="type-free" -->
-					<input type="text" id="value" name="value" value="<!-- TMPL_VAR NAME="value" escape="HTML" -->" size="<!-- TMPL_VAR NAME="fieldlength" -->" />
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF NAME="type-textarea" -->
-					<textarea name="value" id="value" rows="<!--TMPL_VAR NAME="rows" -->" cols="<!-- TMPL_VAR NAME="cols" -->"><!-- TMPL_VAR NAME="value" escape="HTML" --></textarea>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF NAME="type-choice" -->
-					<select name="value" id="value">
-						<!-- TMPL_LOOP NAME="options" -->
-							<option value="<!-- TMPL_VAR NAME="option" -->"<!-- TMPL_IF NAME="selected" -->selected="selected"<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="option" --></option>
-						<!-- /TMPL_LOOP -->
-					</select>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF NAME="type-yesno" -->
-					<!-- TMPL_IF NAME="value-yes" -->
-					<input type="radio" name="value" id="value" value="1" checked="checked"><!-- TMPL_ELSE --><input type="radio" name="value" id="value" value="1" /><!-- /TMPL_IF -->Yes
-				<!-- TMPL_IF NAME="value-no" -->	
-					<input type="radio" name="value" value="0" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" value="0" /><!-- /TMPL_IF -->No<!-- /TMPL_IF -->
-				</td></tr>
-		</table>
-		<p><input type="submit" value="<!-- TMPL_IF NAME="modify" -->Save Changes<!-- TMPL_ELSE -->Add this Preference<!-- /TMPL_IF -->"> <input type="button"  value="Cancel" onclick="location.href='<!-- TMPL_VAR name="script_name" -->'; return false;" /></p>
-		
-<h3>Koha internal</h3>		
-		Note: you should have no reasons to modify the following default values
-		<table>
-		<tr><td><label for="preftype">Variable type:</label></td><td><input type="text" name="preftype" id="preftype" value="<!--TMPL_VAR NAME="preftype" -->" size="40" maxlength="40"><span class="formfield-notes"> (Choice, YesNo, Integer, Textarea, Float, Themes, or Languages)</td></tr>
-		<tr><td><label for="prefoptions">Variable options:</label></td><td><input type="text" name="prefoptions" id="prefoptions" value="<!-- TMPL_VAR NAME="prefoptions" -->" size="60" maxlength="80" />(a choice list for Choice (separated by |) or cols|rows for Texarea)</td></tr>
-		</table>
-		</form>
-	<!-- /TMPL_IF -->
-	
-	<!-- TMPL_IF NAME="add_validate" -->
-	
-
-		<h3>Data recorded</h3>
-		
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="submit" value="OK" />
-		</form>
-	<!-- /TMPL_IF -->
-	
-	<!-- TMPL_IF NAME="delete_confirm" -->
-	
-	<table>
-		<caption>Confirm Deletion of <!-- TMPL_VAR NAME="searchfield" -->?</caption>
-		<tr>
-			<th>Variable Name:</th>
-			<td><!-- TMPL_VAR NAME="searchfield" --></td>
-		</tr>
-		<tr><th>Value: </th><td><!-- TMPL_VAR NAME="Tvalue" --></td></tr></table>
-		<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-		<input type="submit"  value="Yes, Delete"></form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No, Do not Delete" /></form>
-	
-	
-	<!-- /TMPL_IF -->
-	
-	<!-- TMPL_IF NAME="delete_confirmed" -->
-	
-		<h3>Data deleted</h3>
-		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="submit" value="Back to System Preferences" />
-		</form>
-	<!-- /TMPL_IF -->
-	
-	<!-- TMPL_IF NAME="else" -->
-	<h1>System preferences admin</h1>
-		<ul>
-			<li>
-				<!--TMPL_IF Name="Admin"-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Admin" class="here">Admin
-					</a>
-				<!--TMPL_ELSE-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Admin">Admin
-					</a>
-				<!--/TMPL_IF-->
-			</li>
-			<li>
-				<!--TMPL_IF Name="Acquisitions"-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Acquisitions" class="here">Acquisitions
-					</a>
-				<!--TMPL_ELSE-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Acquisitions">Acquisitions
-					</a>
-				<!--/TMPL_IF-->
-			</li>
-			<li>
-				<!--TMPL_IF Name="Authorities"-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Authorities" class="here">Authorities
-					</a>
-				<!--TMPL_ELSE-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Authorities">Authorities
-					</a>
-				<!--/TMPL_IF-->
-			</li>
-			<li>
-				<!--TMPL_IF Name="Librarian"-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Intranet" class="here">Intranet
-					</a>
-				<!--TMPL_ELSE-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Intranet">Intranet
-					</a>
-				<!--/TMPL_IF-->
-			</li>
-			<li>
-				<!--TMPL_IF Name="Catalogue"-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Catalogue" class="here">Catalogue
-					</a>
-				<!--TMPL_ELSE-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Catalogue">Catalogue
-					</a>
-				<!--/TMPL_IF-->
-			</li>
-			<li>
-				<!--TMPL_IF Name="Circulation"-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Circulation" class="here">Circulation
-					</a>
-				<!--TMPL_ELSE-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Circulation">Circulation
-					</a>
-				<!--/TMPL_IF-->
-			</li>
-			<li>
-				<!--TMPL_IF Name="Members"-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Members" class="here">Members
-					</a>
-				<!--TMPL_ELSE-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Members">Members
-					</a>
-				<!--/TMPL_IF-->
-			</li>
-			<li>
-				<!--TMPL_IF Name="OPAC"-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=OPAC" class="here">OPAC
-					</a>
-				<!--TMPL_ELSE-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=OPAC">OPAC
-					</a>
-				<!--/TMPL_IF-->
-			</li>
-			<li>
-				<!--TMPL_IF Name="Others"-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=" class="here">Others
-					</a>
-				<!--TMPL_ELSE-->
-					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=">Others
-					</a>
-				<!--/TMPL_IF-->
-			</li>
-		</ul>
-
-	<!-- TMPL_VAR NAME="searchfield" -->
-	<table>
-	<tr>
-		<th>Variable</th>
-		<th>Value</th>
-		<th colspan="3">Explanation</th>
-	</tr>
-	<!-- TMPL_LOOP NAME="loop" -->
-	<tr<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
-		<td><!-- TMPL_VAR NAME="variable" --></td>
-		<td><!-- TMPL_VAR NAME="value" --></td>
-		<td><!-- TMPL_VAR NAME="explanation" --></td>
-		<td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit</a></td>
-		<td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
-	</tr>
-	<!-- /TMPL_LOOP -->
-	</table>
-	</form>
-	
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-		<input type="hidden" name="op" value="add_form" />
-		<input type="submit" value="Add a System Preference" />
-	</form>
-	
-	<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/thesaurus.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/thesaurus.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/thesaurus.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/thesaurus.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,153 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: Thesaurus Management
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="masthead.inc" -->
-<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
-<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
-
-<div id="main">
-<!-- TMPL_IF name="detail_form" -->
-	<!-- -->
-	<h1>Thesaurus management</h1><table>
-	<tr><td>&nbsp;</td></tr>
-	<tr>
-		<td><b>Values related to <!-- TMPL_VAR name="stdlib" --> (<!-- TMPL_VAR name="category" -->)</b></td>
-	</tr>
-	</table>
-	<br/><br/>
-	<table>
-	<tr>
-		<th>Other forms</th>
-		<th>&nbsp;</th>
-		<th>&nbsp;</th>
-	</tr>
-	<!-- TMPL_LOOP name="loop" -->
-	<tr>
-		<td><!-- TMPL_VAR name="freelib" --></td>
-		<td><a href="<!-- TMPL_VAR name="edit" -->">Edit</a></td>
-		<td><a href="<!-- TMPL_VAR name="delete" -->">Delete</a></td>
-	</tr>
-	<!-- /TMPL_LOOP -->
-	<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
-	<input type="hidden" name="op" value="add_form" />
-	</table>
-	<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
-	<input type="hidden" name="op" value="add_form" />
-	<input type="hidden" name="category" value="<!-- TMPL_VAR name="category" -->" />
-	<input type="hidden" name="stdlib" value="<!-- TMPL_VAR name="stdlib" -->" />
-	<br><input type="submit" value="Add thesaurus entry" /><br>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="add_form" -->
-<!-- -->
-
-	<form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
-	<h1><!-- TMPL_IF name="search_category" -->Add<!-- TMPL_ELSE -->Modify<!-- /TMPL_IF --></h1><!-- TMPL_IF name="search_category" -->
-		<input type="hidden" name="op" value="add_validate" />
-	<!-- TMPL_ELSE -->
-		<input type="hidden" name="op" value="mod_validate" />
-	<!-- /TMPL_IF --><table>
-	<tr>
-		<td>Category</td>
-		<td><!-- TMPL_VAR name="category" --></td>
-	</tr>
-	<tr>
-		<td>Authority lib</td>
-		<!-- TMPL_IF name="id" -->
-			<td><!-- TMPL_VAR name="father" --><!-- TMPL_VAR name="stdlib" --><input type="hidden" name="stdlib" value="<!-- TMPL_VAR name="stdlib" -->" /></td>
-		<!-- TMPL_ELSE -->
-			<td><!-- TMPL_VAR name="father" --><input type="text" name="stdlib" value="<!-- TMPL_VAR name="stdlib" escape="HTML" -->" maxlength="80" size="80" /></td>
-		<!-- /TMPL_IF -->
-	</tr>
-	<tr>
-		<td>Other lib</td>
-		<td><!-- TMPL_VAR name="father" --><input type="text" name="freelib" value="<!-- TMPL_VAR name="freelib" escape="HTML" -->" maxlength="80" size="80" /></td>
-	</tr>
-	</table>
-	<p><input type="hidden" name="id" value="<!-- TMPL_VAR name="id" -->" />
-			<input type="hidden" name="father" value="<!-- TMPL_VAR name="father" escape="HTML" -->" />
-			<input type="hidden" name="branch" value="<!-- TMPL_VAR name="branch" escape="HTML" -->" />
-			<input type="hidden" name="search_category" value="<!-- TMPL_VAR name="search_category" -->" />
-			<input type="hidden" name="searchstring" value="<!-- TMPL_VAR name="searchstring" escape="HTML" -->" />
-			<input type="hidden" name="offset" value="<!-- TMPL_VAR name="offset" -->" />
-			<input type="submit" class="submit" value="<!-- TMPL_IF name="search_category" -->Add<!-- TMPL_ELSE -->Modify<!-- /TMPL_IF --> Value" /></p></form>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF name="delete_confirm" -->
-<!-- -->
-		<table>
-		<tr>
-			<td><b>lib</b></td>
-			<td><b><!-- TMPL_VAR name="search_category" --></b></td>
-		</tr>
-		<tr><td>Value</td><td><!-- TMPL_VAR name="Tvalue" --></td></tr>
-		<tr><td>
-			<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
-				<input type="hidden" name="op" value="delete_confirmed" />
-				<input type="hidden" name="id" value="<!-- TMPL_VAR name="id" -->" />
-				<input type="hidden" name="search_category" value="<!-- TMPL_VAR name="search_category" -->" />
-		</tr></td>
-		<tr><td colspan=2 align=center>CONFIRM DELETION of this entry <b>and all entries depending on this one</b></td></tr>
-		<tr><td><input type="submit" value="YES" /></form></td>
-				<td><form action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="submit" value="NO" /></form></td></tr>
-	</table>
-<!-- /TMPL_IF -->
-
-<!-- -->
-<!-- TMPL_IF name="else" -->
-<h1>Thesaurus management</h1>
-	<p>Manages thesaurus and authorities files.</p>
-	<ul>
-		<li><b>Dig</b>: see data dependent on this one</li>
-		<li><b>Related</b>: see other forms of this authority entry</li>
-	</ul>
-<div class="tabitem">	<form action="/cgi-bin/koha/admin/thesaurus.pl" method="post">
-		<!-- TMPL_VAR name="tab_list" -->
-		<input type="text" name="searchstring" value="<!-- TMPL_VAR name="searchstring" -->" />
-		<input type="submit" value="OK" class="submit" /></form>
-	<form action="/cgi-bin/koha/admin/thesaurus.pl" method="get"><input type="hidden" value="add_form" name="op" /><input type="submit" class="submit" value="New Category" /></form></div>
-	
-	<!-- TMPL_LOOP name="hierarchy_loop" -->
-		<a href="thesaurus.pl?branch=<!-- TMPL_VAR name="branch" -->&search_category=<!-- TMPL_VAR name="category" -->"><!-- TMPL_VAR name="string" --></a><br />
-	<!-- /TMPL_LOOP -->
-	
-<!-- TMPL_IF NAME="loop" -->
-<table>
-	<tr>
-		<th>&nbsp;</th>
-		<th>Free form</th>
-		<th>Authority</th>
-		<th>Dig</th>
-		<th>Related</th>
-		<th>Edit</th>
-		<th>Delete</th>
-	</tr>	<!-- TMPL_LOOP name="loop" -->
-
-	<tr>
-		<td>&nbsp;</td>
-		<td><!-- TMPL_VAR name="freelib" --></td>
-		<td><!-- TMPL_VAR name="father" --> <!-- TMPL_VAR name="stdlib" --></td>
-		<td><!-- TMPL_VAR name="dig" -->Dig</a></td>
-		<td><!-- TMPL_VAR name="related" -->Related</a></td>
-		<td><a href="<!-- TMPL_VAR name="edit" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png"  width="32" hspace="0" vspace="0" border="0" /></a></td>
-		<td><a href="<!-- TMPL_VAR name="delete" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png" width="32" hspace="0" vspace="0" border="0" /></a></td>
-	</tr>
-	<!-- /TMPL_LOOP -->
-	</table>
-<!-- /TMPL_IF -->
-<p>		<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
-	<input type="hidden" name="op" value="add_form" />
-</p>
-<p><form action="<!-- TMPL_VAR name="script_name" -->" method="post">
-	<input type="hidden" name="op" value="add_form" />
-	<input type="hidden" name="category" value="<!-- TMPL_VAR name="category" -->" />
-	<input type="hidden" name="branch" value="<!-- TMPL_VAR name="branch" -->" />
-	<input type="hidden" name="father" value="<!-- TMPL_VAR name="father" -->" />
-	<input type="submit" class="submit"  value="Add Thesaurus entry" />
-	</form></p>
-<!-- TMPL_VAR name="previous" --> <!-- TMPL_VAR name="next" -->
-<!-- /TMPL_IF -->
-</div>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/viewlog.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/viewlog.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/viewlog.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/viewlog.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,232 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->System Administration<!-- TMPL_INCLUDE NAME="doc-head-close-calendar.inc" -->
-<!-- TMPL_INCLUDE NAME="masthead.inc" -->
-<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
-<div id="main" >
-
-<!-- TMPL_IF NAME="do_it" -->
-<script language="JavaScript" type="text/javascript">
-function Dopop(link) {
-	newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
-}
-</script>
-		<h1 class="parameters">Koha :  <!-- TMPL_VAR NAME="modulename"--> için yapılan işlemler cetveli. Toplam:<!-- TMPL_VAR NAME="counter"--></h1>
-		<!-- TMPL_IF NAME="loopfilter"-->
-			<p>Filtered on</p>
-			<!-- TMPL_LOOP NAME="loopfilter" -->
-					<p><!-- TMPL_IF NAME="err" --> <font color="red"> <b><!--/TMPL_IF --><label class="label100"> <!-- TMPL_VAR NAME="name"--> =</label><!-- TMPL_VAR NAME="value"--><!-- TMPL_IF NAME="err" --> </font> </b><!--/TMPL_IF --></p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_IF NAME="loopfilter"-->
-		<br>
-		<table border="1">
-			<!-- TMPL_IF NAME="catalogue" -->
-				<tr >
-							<th class="parameters">Modified on
-							</th>
-							<th class="parameters">Title
-							</th>
-							<th class="parameters">Librarian
-							</th>
-							<th class="parameters">Action
-							</th>
-							<th class="parameters">Info
-							</th>
-				</tr>
-				<!-- TMPL_LOOP NAME="looprow" -->
-					<!-- TMPL_IF NAME="hilighted" --><tr class="higlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-						<td><!-- TMPL_VAR NAME="day" --><br/>(<!-- TMPL_VAR NAME="timestamp" -->)
-						</td>
-						<td><!-- TMPL_VAR NAME="title" -->, <!-- TMPL_VAR NAME="author" -->
-						</td>
-						<td><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->
-						</td>
-						<td><!-- TMPL_IF NAME="action" --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF -->
-						</td>
-						<td><!-- TMPL_IF NAME="info" --><!-- TMPL_VAR NAME="info" --><!-- /TMPL_IF -->
-						</td>
-					</tr>
-				<!-- /TMPL_LOOP -->
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF NAME="acqui" -->
-				<tr >
-							<th class="parameters">Timestamp
-							</th>
-							<th class="parameters">Firstname
-							</th>
-							<th class="parameters">Surname
-							</th>
-							<th class="parameters">Action
-							</th>
-							<th class="parameters">Info
-							</th>
-							<th class="parameters">Title
-							</th>
-							<th class="parameters">Author
-							</th>
-				</tr>
-				<!-- TMPL_LOOP NAME="looprow" -->
-					<!-- TMPL_IF NAME="hilighted" --><tr class="higlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-						<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-						<!-- TMPL_VAR NAME="rowtitle" --></td>
-						<!-- TMPL_LOOP NAME="loopcell" -->
-							<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td ><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="reference" --><a href="javascript:Dopop('../members/moremember.pl?bornum=<!-- TMPL_VAR NAME="reference" -->')" ><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="reference" --></a><!-- /TMPL_IF -->
-							</td>
-							<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td ><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="count" --><!-- TMPL_VAR NAME="count" --><!-- /TMPL_IF -->
-							</td>
-						<!-- /TMPL_LOOP -->
-					</tr>
-				<!-- /TMPL_LOOP NAME="looprow" -->
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF NAME="members" -->
-				<tr >
-							<th class="parameters">Timestamp
-							</th>
-							<th class="parameters">Firstname
-							</th>
-							<th class="parameters">Surname
-							</th>
-							<th class="parameters">Action
-							</th>
-							<th class="parameters">Info
-							</th>
-							<th class="parameters">Title
-							</th>
-							<th class="parameters">Author
-							</th>
-				</tr>
-				<!-- TMPL_LOOP NAME="looprow" -->
-					<!-- TMPL_IF NAME="hilighted" --><tr class="higlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-						<td><!-- TMPL_IF NAME="timestamp" --><!-- TMPL_VAR NAME="timestamp" --><!-- /TMPL_IF -->
-						</td>
-						<td><!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
-						</td>
-						<td><!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
-						</td>
-						<td><!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
-						</td>
-						<td><!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
-						</td>
-						<td><!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
-						</td>
-						<td><!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
-						</td>
-						<td><!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
-						</td>
-					</tr>
-				<!-- /TMPL_LOOP NAME="looprow" -->
-				<!-- /TMPL_IF -->
-		</table>
-<!-- TMPL_ELSE -->
-	<h1 class = "parameters">Koha : Display Logs </h1>
-	<form method="post">
-	
-	<table>
-		<thead>
-			<tr>
-			<th class="parameters">On Module</th>
-			<th class="parameters">User/Action Filters</th>
-			<th class="parameters">Object Filter</th>
-			</tr>
-		</thead>
-		<tbody>
-			<tr>
-				<td>
-					<select name="module">
-						<option value ="catalogue" checked>Eser kaydı</option>
-						<option value ="members">Ãœyeler</option>
-						<option value ="acqui">Satın alma</option>
-					</select>
-				</td>
-				<td>
-				<p>
-					Koha User : <input type="text" name="user" value="">
-				</p>
-				<p>	Action type : <select name="action">
-						<option value ="">Tümü</option>
-						<option value ="add">Ekleme</option>
-						<option value ="del">Sılme</option>
-						<option value ="modify">DeÄŸiÅŸme</option>
-					</select>
-				</p>
-				<p> From <input type="text" readonly="readonly" size="10" id="from" name="from" >
-							<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFrom" style="cursor: pointer;" valign="top">
-								<script language="JavaScript" type="text/javascript">
-									function validate1(date) {
-										var day = date.getDate();
-										var month = date.getMonth() + 1;
-										var year = date.getFullYear();
-										var weekDay = date.getDay();
-										var dayMonth = month + '-' + day;
-										var dateString = year + '-' + month + '-' + day;
-										var dateTo = document.getElementById('to').value.split("-");
-										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-										if (date > limitDate) {
-											return true;
-										} else {
-											return false;
-										}
-									}
-					
-									Calendar.setup(
-										{
-											inputField : "from",
-											ifFormat : "%Y-%m-%d",
-											button : "openCalendarFrom",
-											disableFunc : validate1,
-											dateStatusFunc : validate1
-										}
-									);
-								</script>
-					To <input readonly="readonly" size="10" id="to" name="Filter" value="" type="to">
-						<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-							<script type="text/javascript">
-								function validate2(date) {
-									var day = date.getDate();
-									var month = date.getMonth() + 1;
-									var year = date.getFullYear();
-									var weekDay = date.getDay();
-									var dayMonth = month + '-' + day;
-									var dateString = year + '-' + month + '-' + day;
-									var dateFrom = document.getElementById('from').value.split("-");
-									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-									if (limitDate > date) {
-										return true;
-									} else {
-										return false;
-									}
-								}
-		
-								Calendar.setup(
-									{
-										inputField : "to",
-										ifFormat : "%Y-%m-%d",
-										button : "openCalendarTo",
-										disableFunc : validate2,
-										dateStatusFunc : validate2
-									}
-								);
-							</script>
-				</td>
-			</tr>
-	</table>
-	
-	<div id="bloc25">
-		<h3 class="parameters"> Output </h3>
-		<input type="radio" checked name="output" value="screen" > To screen into the browser
-		<br>
-		<input type="radio" name="output" value="file"> To file <input type="text" name="basename" value="Export"> into an application  
-		<!-- TMPL_VAR NAME="CGIextChoice" -->
-		<!-- TMPL_VAR NAME="CGIsepChoice" -->
-	</p>
-	</div>
-	<p>
-	<input TYPE="submit" value="OK" class="button parameters">
-	<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->">
-	<input type="hidden" name="do_it" value="1">
-	</form>
-<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/admin/z3950servers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/admin/z3950servers.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/admin/z3950servers.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/admin/z3950servers.tmpl	24 Feb 2006 11:18:17 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,273 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF NAME="else" -->z39.50 Servers<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME=searchfield -->Modify z39.50 Server <!-- TMPL_VAR NAME="searchfield" --><!-- TMPL_ELSE -->Add z39.50 Server<!-- /TMPL_IF --><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="add_validate" -->z39.50 Server Added<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="delete_confirmed" -->z39.50 Server Deleted<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<!-- TMPL_IF NAME="add_form" -->
-        <script language="JavaScript" type="text/javascript">
-        //
-        function isNotNull(f,noalert) {
-                if (f.value.length ==0) {
-                    return false;
-                }
-                return true;
-        }
-        //
-        function toUC(f) {
-                var x=f.value.toUpperCase();
-                f.value=x;
-                return true;
-        }
-        //
-        function isNum(v,maybenull) {
-        var n = new Number(v.value);
-        if (isNaN(n)) {
-                return false;
-                }
-        if (maybenull==0 && v.value=='') {
-                return false;
-        }
-        return true;
-        }
-        //
-        function isDate(f) {
-                var t = Date.parse(f.value);
-                if (isNaN(t)) {
-                       return false;                       
-                }
-        }
-        //
-        function Check(f) {
-                var ok=1;
-                var _alertString="";
-                var alertString2;
-                if (f.searchfield.value.length==0) {
-                        _alertString += "- site name missing\n";
-                }
-                if (f.host.value.length==0) {
-                        _alertString += "- host missing\n";
-                }
-                if (f.port.value.length==0) {
-                        _alertString += "- port missing\n";
-                }
-                if (f.db.value.length==0) {
-                        _alertString += "- database missing\n";
-                }
-                if (isNaN(f.port.value)) {
-                        _alertString += "- port must be a number\n";
-                }
-                if (isNaN(f.rank.value)) {
-                        _alertString += "- rank must be a number\n";
-                }
-                if (isNaN(f.checked.value) || f.checked.value<0 || f.checked.value>1) {
-                        _alertString += "- checked must be 0 or 1\n";
-                }
-                if (_alertString.length==0) {
-                        document.Aform.submit();
-                } else {
-                        alertString2 = "Form not submitted because of the following problem(s)\n";
-                        alertString2 += "------------------------------------------------------------------------------------\n\n";
-                        alertString2 += _alertString;
-                        alert(alertString2);
-                }
-        }
-        </script>
-
-       
-        <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-        <input type="hidden" name="op" value="add_validate" />
-<!-- TMPL_IF NAME=searchfield -->
-                <h1>Modify Z39.50 Server</h1>
-        <!-- TMPL_ELSE -->
-                <h1>Add Z39.50 Server</h1>
-        <!-- /TMPL_IF -->                
-        <table>
-        <!-- TMPL_IF NAME=searchfield -->
-                <tr>
-                        <th>Z39.50 Server</th>
-                        <td>
-                                <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
-                        </td>
-                </tr>
-        <!-- TMPL_ELSE -->
-                <tr>
-                        <th>Z39.50 Server</th>
-                        <td>
-                                <input type="text" name="searchfield" size="65" maxlength="100" onblur="toUC(this)" />
-                        </td>
-                </tr>
-        <!-- /TMPL_IF -->
-
-		<tr>
-			<th>Hostname</th>
-			<td>
-				<input type="text" name="host" size="30" value="<!-- TMPL_VAR NAME="host" -->" />
-			</td>
-		</tr>
-		<tr>
-			<th>Port</th>
-			<td>
-				<input type="text" name="port" size="5" value="<!-- TMPL_VAR NAME="port" -->" onblur="isNum(this)" />
-			</td>
-		</tr>
-		<tr>
-			<th>Database</th>
-			<td>
-				<input type="text" name="db" value="<!-- TMPL_VAR NAME="db" -->" />
-			</td>
-		</tr>
-		<tr>
-			<th>Userid</th>
-			<td>
-				<input type="text" name="userid" value="<!-- TMPL_VAR NAME="userid" -->" />
-			</td>
-		</tr>
-		<tr>
-			<th>Password</th>
-			<td>
-				<input type="text" name="password" value="<!-- TMPL_VAR NAME="password" -->" />
-			</td>
-		</tr>
-		<tr>
-			<th>Checked (searched by default)</th>
-			<td>
-				<input type="text" size="1" name="checked" value="<!-- TMPL_VAR NAME="checked" -->" onblur="isNum(this)" />  
-		<tr>
-			<th>Rank (display order)</th>
-			<td>
-				<input type="text" name="rank" size="4" value="<!-- TMPL_VAR NAME="rank" -->" onblur="isNum(this)" />
-			</td>
-		</tr>
-				<tr>
-			<th>Syntax (z3950 can send<br>
-			 records in various format. Choose one)</th>
-			<td>
-				<select name="syntax">
-					<option value="USMARC">USMARC</option>
-					<option value="UNIMARC">UNIMARC</option>
-				</select>
-			</td>
-		</tr>
-        </table><input type="button" value="<!-- TMPL_IF NAME=searchfield -->Update Z39.50 Server<!-- TMPL_ELSE -->Add Z39.50 Server<!-- /TMPL_IF -->" onclick="Check(this.form)" />  <input type="button" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->';" />
-        </form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="add_validate" -->
-<h3>Z39.50 Server Added</h3>
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-        <input type="submit" value="OK" />
-        </form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirm" -->
-	<!-- TMPL_VAR NAME="reqsel" -->
-<h3>Confirm Deletion of Server <!-- TMPL_VAR NAME="searchfield" --></h3>	
-        <table>
-                <tr>
-                        <td>Site</td>
-                        <td>
-                                <!-- TMPL_VAR NAME="searchfield" -->
-                        </td>
-                </tr>
-                <tr>
-                        <td>Hostname</td>
-                        <td><!-- TMPL_VAR NAME="host" --></td>
-                </tr>
-                <tr>
-                        <td>Port</td>
-                        <td><!-- TMPL_VAR NAME="port" --></td>
-                </tr>
-                <tr>
-                        <td>Database</td>
-                        <td><!-- TMPL_VAR NAME="db" --></td>
-                </tr>
-                <tr>
-                        <td>Userid</td>
-                        <td><!-- TMPL_VAR NAME="userid" --></td>
-                </tr>
-                <tr>
-                        <td>Password</td>
-                        <td><!-- TMPL_VAR NAME="password" --></td>
-                </tr>
-                <tr>
-                        <td>Checked</td>
-                        <td><!-- TMPL_VAR NAME="checked" --></td>
-                </tr>
-                <tr>
-                        <td>Rank</td>
-                        <td><!-- TMPL_VAR NAME="rank" --></td>
-                </tr>
-                <tr>
-                        <td>                <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                        <input type="hidden" name="op" value="delete_confirmed" />
-                        <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><input type="submit" value="Delete this Server" /></form> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="Do Not Delete" /></form></td>
-                </tr>
-	</table>
-
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="delete_confirmed" -->
-<h3>Z39.50 Server Deleted</h3>
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                <input type="submit" value="OK" />
-</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME=else -->
-<h3>Z39.50 Servers Admininistration</h3>
-         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                <input type="text" name="description" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-                <input type="submit" name="search" value="Search" />
-        </form>
-        <!-- TMPL_IF NAME="searchfield" -->
-                You searched for <!-- TMPL_VAR NAME="searchfield" -->
-        <!-- /TMPL_IF -->		
-<table>
-                <tr>
-                        <th>Site</th>
-                        <th>Hostname/Port</th>
-                        <th>Database</th>
-                        <th>Userid</th>
-                        <th>Password</th>
-                        <th>Checked</th>
-                        <th>Rank</th>       
-						<th>Syntax</th>
-                        <th colspan="2">&nbsp;</th>
-                </tr>
-                <!-- TMPL_LOOP NAME=loop -->
-               <!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-                        <td><!-- TMPL_VAR NAME="name" --></td>
-                        <td><!-- TMPL_VAR NAME="host" -->:<!-- TMPL_VAR NAME="port" --></td>
-                        <td><!-- TMPL_VAR NAME="db" --></td>
-                        <td><!-- TMPL_VAR NAME="userid" --></td>
-                        <td><!-- TMPL_VAR NAME="password" --></td>
-                        <td><!-- TMPL_VAR NAME="checked" --></td>
-                        <td><!-- TMPL_VAR NAME="rank" --></td>
-						<td><!-- TMPL_VAR NAME="syntax" --></td>
-                        <td><form action="<!-- TMPL_VAR name="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="name" -->" /><input type="submit" value="Edit" /></form></td>
-                        <td><form action="<!-- TMPL_VAR name="script_name" -->" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="name" -->" /><input type="submit" value="Delete" /></form></td>                
-			</tr>
-                <!-- /TMPL_LOOP -->
-	</table>
-
-<!-- TMPL_IF NAME="offsetgtzero" --><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
-	<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="prevpage" -->" />
-	<input type="submit" value="&lt;&lt; Prev">
-</form><!-- /TMPL_IF -->
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-        <input type="hidden" name="op" value="add_form" />
-		<input type="submit" value="Add z39.50 Server" />
-</form>
-<!-- TMPL_IF NAME="ltcount" --><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
-	<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextpage" -->" />
-	<input type="submit" value="Next &gt;&gt;" />
-</form> <!-- /TMPL_iF -->
- 
-
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/authorities/auth_finder.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/authorities/auth_finder.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/authorities/auth_finder.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/authorities/auth_finder.tmpl	27 Sep 2006 21:40:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,53 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-authorities.inc" -->
-
-
-
-<h1>Authority search</h1>
-
-<form name="f" method="post">
-	<input type="hidden" name="nonav" value="<!-- TMPL_VAR NAME="nonav" -->">
-	<input type="hidden" name="op" value="do_search">
-	<input type="hidden" name="type" value="author">
-	<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->">
-	<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
-	<div id="bloc25">
-		<h2 class="authority">Search on</h2>
-		<p>
-			<label class="label100">Authority type</label>
-			<!-- TMPL_VAR NAME="authtypecode" -->
-			<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->">
-		</p>
-		<p>
-			<label class="label100">Main heading(a)</label><input type="text" name="value" value="<!-- TMPL_VAR name="resultstring" -->">
-			<input type="hidden" name="marclist" value="mainentry">
-			<input type="hidden" name="and_or" value="and">
-			<input type="hidden" name="excluding" value="">
-			<select name="operator">
-				<option value="all">All words</option>
-				<option value="phrase">Phrase</option>
-			</select>
-			<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
-		</p>
-		<p>
-			<label class="label100">Sub heading</label><input type="text" name="value">
-			<input type="hidden" name="marclist" value="">
-			<input type="hidden" name="and_or" value="and">
-			<input type="hidden" name="excluding" value="">
-			<select name="operator">
-				<option value="all">All words</option>
-				<option value="phrase">Phrase</option>
-			</select>
-			
-		</p>
-		<p>
-			<input type="submit" value="Start search" class="button authority">
-		</p>
-	</div>
-</form>
-
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/authorities/auth_linker.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/authorities/auth_linker.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/authorities/auth_linker.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/authorities/auth_linker.tmpl	19 May 2006 17:58:40 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,58 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-<div id="main">
-
-<h1>Authority search</h1>
-
-<form name="f" method="post">
-	<input type="hidden" name="nonav" value="<!-- TMPL_VAR NAME="nonav" -->">
-	<input type="hidden" name="op" value="do_search">
-	<input type="hidden" name="type" value="author">
-	<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->">
-	<div id="bloc25">
-		<h2 class="authority">Search on</h2>
-		<p>
-			
-<label for="authtypecode">Authority type</label></th><td><select id="authtypecode" name="authtypecode">
-			<!-- TMPL_LOOP NAME="authtypesloop" -->
-				<option value="<!-- TMPL_VAR NAME="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->>
-					<!-- TMPL_VAR NAME="authtypetext" -->
-				</option>
-			<!-- /TMPL_LOOP -->
-			</select>
-			
-		</p>
-		<p>
-			<label class="label100">Main heading(a)</label><input type="text" name="value" value="<!-- TMPL_VAR name="resultstring" -->">
-			<input type="hidden" name="marclist" value="mainentry">
-			<input type="hidden" name="and_or" value="and">
-			<input type="hidden" name="excluding" value="">
-			<select name="operator">
-				<option value="all">All words</option>
-				<option value="phrase">Phrase</option>
-			</select>
-			<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
-		</p>
-		<p>
-			<label class="label100">Sub heading</label><input type="text" name="value">
-			<input type="hidden" name="marclist" value="">
-			<input type="hidden" name="and_or" value="and">
-			<input type="hidden" name="excluding" value="">
-			<select name="operator">
-				<option value="all">All words</option>
-				<option value="phrase">Phrase</option>
-			</select>
-			<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
-		</p>
-		<p>
-			<input type="submit" value="Start search" class="button authority">
-		</p>
-	</div>
-</form>
-</div>
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/authorities/authorities-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/authorities/authorities-home.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/authorities/authorities-home.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/authorities/authorities-home.tmpl	27 Sep 2006 21:40:47 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,42 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-authorities.inc" -->
-
-
-<form name="f" method="post">
-	<input type="hidden" name="op" value="do_search" />
-	<input type="hidden" name="type" value="intranet" />
-	<input type="hidden" name="stype" value="author" />
-	<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
-<div class="data"><table>
-<caption>Authority search</caption>
-<tr><th><label for="authtypecode">Authority type</label></th><td><select id="authtypecode" name="authtypecode"  >
-			<!-- TMPL_LOOP NAME="authtypesloop" -->
-				<option value="<!-- TMPL_VAR NAME="value" -->" >
-					<!-- TMPL_VAR NAME="authtypetext" -->
-				</option>
-			<!-- /TMPL_LOOP -->
-			</select></td></tr>
-<tr><th><label id="mainentry">Main entry</label></th><td><select name="operator" id="mainentry">
-				<option value="all">All words</option>
-				<option value="phrase">Phrase</option>
-			</select> <input type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->" />
-			<input type="hidden" name="marclist" value="mainentry" />
-			
-			</td></tr>			
-<tr><th><label for="anywhere">Anywhere</label></th><td><select name="operator" id="anywhere">
-				<option value="all">All words</option>
-				<option value="phrase">Phrase</option>
-			</select> <input type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->">
-			<input type="hidden" name="marclist" value="">
-			
-			</td></tr></table></div>
-		<p>
-			<input type="submit" value="Start search" class="submit">
-		</p>
-</form>
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/authorities/authorities.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/authorities/authorities.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/authorities/authorities.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/authorities/authorities.tmpl	27 Sep 2006 21:40:47 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,342 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Authorities
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!--TMPL_UNLESS NAME="nonav"--><!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-authorities.inc" -->
-<!--TMPL_ELSE-->
-<!-- TMPL_INCLUDE NAME="menu-authorities.inc" -->
-<!--/TMPL_UNLESS-->
-
-
-
-
-<!-- TMPL_IF name="error" -->
-			<div class="error">
-				<!--TMPL_IF NAME="xmlerror"-->
-				<ul>
-					<li>Non UTF-8 characters present or malformed XML</li>
-					<li>Please correct and save.</li>
-				</ul>
-				<!--/TMPL_IF-->
-			</div>
-<!-- /TMPL_IF -->
-<form method="post" name="f" id="f" action="authorities.pl?authid=<!-- TMPL_VAR NAME="authid" -->&nonav=<!-- TMPL_VAR NAME="nonav" -->&linkid="+document.form.f.linkid.value >
-	
-<div class="tabitem">
-	<h1>Authority number <!-- TMPL_VAR NAME="authid" --></h1>
-	<p><input type="hidden" name="nonav" value="<!-- TMPL_VAR NAME="nonav" -->"><input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
-		<input type="hidden" name="op" value="add">
-		<input type="hidden" name="addfield_field">
-		<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->">
-		<input type="hidden" name="authid" value="<!-- TMPL_VAR NAME="authid" -->">
-	<input type="hidden" name="linkid" id="linkid" value="0000">
-		<!-- TMPL_IF name="authid" -->
-			<input type="button" value="Save" onClick="Check(this.form)" accesskey="w" class="button authority">
-		<!-- TMPL_ELSE -->
-			<input type="button" value="Add authority" onClick="Check(this.form)" accesskey="w" class="button authority">
-		<!-- /TMPL_IF -->
-	</p>
-</div>
-<br>
-	<div class="tabs">
-        <!-- TMPL_LOOP name="BIG_LOOP" -->
-            <a href="#" onclick="active(<!-- TMPL_VAR name="number"-->); return false;" id="link<!-- TMPL_VAR name="number"-->"><!-- TMPL_VAR name="number"--></a>
-        <!--  /TMPL_LOOP -->
-	</div>
-
-
-<! -- RESET PAGINATION -->
-<!-- TMPL_LOOP name="BIG_LOOP" -->
-<!-- hide every tab except the 1st -->
-<!-- TMPL_IF name="number" -->
-    <div name="<!-- TMPL_VAR name="number" -->XX" id="<!-- TMPL_VAR name="number" -->XX" class="tab" style="visibility:hidden">
-<!-- TMPL_ELSE -->
-    <div name="<!-- TMPL_VAR name="number" -->XX" id="<!-- TMPL_VAR name="number" -->XX" class="tab" style="visibility:visible">
-<!-- /TMPL_IF -->
-<!-- TMPL_UNLESS name="number" -->
-    <!-- show duplicate warning on tab 0 only -->
-<!-- TMPL_IF name="duplicateauthid" -->
-			<div class="error">
-				<p>Is this a duplicate of <a href="detail.pl?authid=<!-- TMPL_VAR name="duplicateauthid" -->&nonav=<!-- TMPL_VAR name="nonav" -->" onclick="openWindow('detail.pl?nonav=<!-- TMPL_VAR name="nonav" -->&authid=<!-- TMPL_VAR name="duplicateauthid" -->&popup=1', ''; return false;)"><!-- TMPL_VAR name="duplicateauthvalue" --></a>?</p>
-				
-				<ul>
-					
-					<li>If not, click to <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" /> <a href="#" onclick="confirmnotdup(); return false;">Confirm it's not a duplicate</a></li>
-				</ul>
-			</div>
-		<!-- /TMPL_IF -->
-  <!-- /TMPL_UNLESS -->
-    <!-- TMPL_LOOP NAME="innerloop" -->
-		<div style=";" id="tag<!-- TMPL_VAR name="tag"-->">
-        <!-- TMPL_IF name="tag" -->
-        <p class="MARCtag">
-            <input type="hidden" name="ind_tag" value="<!-- TMPL_VAR NAME="tag" -->">
-            <!-- TMPL_UNLESS name="hide_marc" -->
-                <a title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --></a>
-                <input tabindex="1" onblur="this.style.backgroundColor='#ffffff';" onfocus="this.style.backgroundColor='#ffff00;'" type="text" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> name="indicator" size="2" maxlength="2" value="<!-- TMPL_VAR NAME="indicator" -->" class="flat"> -
-            <!-- TMPL_ELSE -->
-                <input tabindex="1" type="hidden" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> name="indicator" value="<!-- TMPL_VAR NAME="indicator" -->">
-            <!-- /TMPL_UNLESS -->
-            <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
-            <!-- TMPL_VAR NAME="tag_lib" -->
-            <!-- /TMPL_UNLESS -->
-            <!-- TMPL_IF name="repeatable" --><a href="javascript:AddField('<!-- TMPL_VAR NAME="tag" -->')">+</a><!-- /TMPL_IF -->
-        </p>
-        <!-- /TMPL_IF -->
-        <!-- TMPL_LOOP NAME="subfield_loop" -->
-            <!-- TMPL_IF NAME="visibility" -->
-                <a tabindex="1" style="color: grey; font-size: 80%; cursor: se-resize;" id="label<!-- TMPL_VAR name="index" -->" onclick="unHideSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->','label<!-- TMPL_VAR name="index" -->')">
-                    <!-- TMPL_VAR NAME="subfield" -->
-                </a>
-            <!-- /TMPL_IF -->
-            <div style="<!-- TMPL_VAR NAME='visibility' -->;" id="subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='index' -->">
-                <p>
-                <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
-                    <label <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> class="labelsubfield">
-                <!-- /TMPL_UNLESS -->
-                <!-- TMPL_UNLESS name="hide_marc" -->
-                    <img style="cursor: crosshair; color: grey; font-size: 80%;" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> src="<!-- TMPL_VAR NAME="themelang" -->/images/up.png" onclick="upSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->')"/>
-                        <input title="<!-- TMPL_VAR NAME="marc_lib_plain" -->" style=" <!-- TMPL_IF NAME="fixedfield" -->display:none; <!-- /TMPL_IF -->border:0;" type="text" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="subfield" -->" size="1" maxlength="1" class="flat" DISABLE READONLY tabindex=-1 />
-                <!-- TMPL_ELSE -->
-                    <input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="subfield" -->"/>
-                <!-- /TMPL_UNLESS -->
-                <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
-                    <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF -->
-                    <!-- TMPL_VAR NAME="marc_lib" -->
-                    <!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF -->
-                    </label>
-                <!-- /TMPL_UNLESS -->
-                <!-- TMPL_VAR NAME="marc_value" -->
-                <!-- TMPL_IF NAME="repeatable" -->
-                    <a style="cursor: crosshair; color: grey; font-size: 80%;" onclick="cloneSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->')">+</a>
-                <!-- /TMPL_IF -->
-                <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->"/>
-                <input type="hidden" name="subfieldYYY" value="<!-- TMPL_VAR NAME="subfield" -->" size="2" maxlength="1"/>
-                <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->"/>
-                <input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->"/>
-                </p>
-            </div>
-        <!-- /TMPL_LOOP -->
-        </div>
-    <!-- /TMPL_LOOP -->
-    </div>
-<!-- /TMPL_LOOP -->
-		<div name="hidden" id="hidden" class="tab">
-		<!-- TMPL_LOOP NAME="hidden_loop" -->
-				<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->">
-				<input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="subfield" -->">
-				<input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->">
-				<input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->">
-		<!-- /TMPL_LOOP -->
-		</div>
-		<!-- TMPL_IF name="oldauthnumtagfield" -->
-			<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="oldauthnumtagfield" -->">
-			<input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="oldauthnumtagsubfield" -->">
-			<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="authid" -->">
-			<input type="hidden" name="mandatory" value="0">
-			<input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->">
-			<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="oldauthtypetagfield" -->">
-			<input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="oldauthtypetagsubfield" -->">
-			<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="authtypecode" -->">
-			<input type="hidden" name="mandatory" value="0">
-			<input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->">
-
-		<!-- /TMPL_IF -->
-	</form>
-<script language="JavaScript" type="text/javascript">
-function _(s) { return s } // dummy function for gettext
-function confirmnotdup(){
-	document.getElementById("confirm_not_duplicate").value = 1;
-	var checkform =	document.getElementById("f");
-	Check(checkform);
-}
-function active(numlayer)
-{
-	for (i=0; i <= 9 ; i++ ) {
-		ong = i+"XX";
-		link = "link"+i;
-		if (numlayer==i) {
-			with(document){
-			if (document.getElementById(ong)){
-				document.getElementById(ong).style.visibility="visible";
-			}
-			if(document.getElementById(link)){
-				document.getElementById(link).style.color="#000066";
-				document.getElementById(link).style.backgroundColor="#FFFFCC";
-			}
-			}
-		} else {
-			with(document){
-			if (document.getElementById(ong)){
-				document.getElementById(ong).style.visibility="hidden";
-			}
-			if (document.getElementById(link)) {
-				document.getElementById(link).style.color="#669999";
-				document.getElementById(link).style.backgroundColor="#D8DEB8";
-			}
-			}
-		}
-	}
-}
-active(0);
-function Check(f) {
-	document.body.style.cursor ="wait";
-	// Scan for nonempty fields
-	var field_is_nonempty_p = new Array();
-	for (i=0 ; i<f.field_value.length ; i++) {
-	    field_is_nonempty_p[f.tag[i].value] = 0;
-	}
-	for (i=0 ; i<f.field_value.length ; i++) {
-	    if (f.field_value[i].value.length != 0) {
-		field_is_nonempty_p[f.tag[i].value] += 1;
-	    }
-	}
-
-	// Scan for missing mandatory subfields
-	var total_missing_mandatory_subfields = 0;
-	var missing_mandatory_subfields = new Array();
-	for (i=0 ; i<f.field_value.length-2 ; i++) {
-		if (f.field_value[i].value.length==0 && f.mandatory[i].value==1) {
-		    // We should not flag an error unless the tag is also
-		    // mandatory, or if something else in the tag is entered
-
-		    if (f.tag_mandatory[i].value == 1 || field_is_nonempty_p[f.tag[i].value]) {
-				f.field_value[i].style.backgroundColor="#FF0000";
-				total_missing_mandatory_subfields++;
-			if (f.field_value[i].parentNode.tagName == "B")
-			{
-				missing_mandatory_subfields.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.parentNode.id.substr(0,1) + ")");
-			}
-			else
-			{
-				missing_mandatory_subfields.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.id.substr(0,1) + ")");
-			}
-
-			}
-		} else {
-			f.field_value[i].style.backgroundColor="#FFFFFF";
-		}
-	}
-
-	// Scan for missing mandatory tags
-	var total_missing_mandatory_tags = 0;
-	var seen_mandatory_tag_p = new Array();
-	var missing_mandatory_tags = new Array();
-	for (i=0 ; i<f.field_value.length ; i++) {
-	    var j = f.tag[i].value;
-	    if (!field_is_nonempty_p[j] && f.tag_mandatory[i].value == 1) {
-		if (seen_mandatory_tag_p[j] != 1) {
-		    seen_mandatory_tag_p[j] = 1;
-		    total_missing_mandatory_tags++;
- 		    if (f.field_value[i].parentNode.tagName == "B")
-		    {
-				missing_mandatory_tags.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.parentNode.id.substr(0,1) + ")");
-		    }
-		    else
-		    {
-				missing_mandatory_tags.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.id.substr(0,1) + ")");
-			}
-		}
-		f.field_value[i].style.backgroundColor="#FFFF00";
-	    }
-	}
-
-	var total_errors = total_missing_mandatory_tags + total_missing_mandatory_subfields;
-	var alertString2;
-	if (total_errors!=0) {
-		alertString2  = _("Form not submitted because of the following problem(s)");
-		alertString2 += "\n------------------------------------------------------------------------------------\n";
-		alertString2 += "\n- "+ total_missing_mandatory_tags +_(" mandatory tags empty");
-		for (i=0; i<missing_mandatory_tags.length; i++)
-		{
-			alertString2 += "\n--->"+ missing_mandatory_tags[i];
-		}
-  		alertString2 += "\n- "+ total_missing_mandatory_subfields +_(" mandatory fields empty (see bold subfields)");
-		for (i=0; i<missing_mandatory_subfields.length; i++)
-		{
-			alertString2 += "\n--->"+ missing_mandatory_subfields[i];
-		}
-		alert(alertString2);
-	} else {
-		document.forms['f'].submit();
-	}
-}
-function Dopop(link,id) {
- var subf=document.getElementsByName('subfield'+id);
-var fields=document.getElementsByName('field_value'+id);
-var defaultvalue="";
-	for (var s=0; s<fields.length; s++){
-		if (subf.item(s).value == 'a'){
-		defaultvalue=fields.item(s).value;
-		}
-	}
-
-	newin=window.open(link+"&result="+defaultvalue,"",'width=550,height=550,toolbar=false,scrollbars=yes');
-
-}
-
-
-function AddField(field) {
-	document.forms['f'].op.value = "addfield";
-	document.forms['f'].addfield_field.value=field;
-	document.f.submit();
-}
-
-function cloneSubfield(index) {
- var original = document.getElementById(index);
- var clone = original.cloneNode(true);
- clone.setAttribute("id", index + index); 
-// orginput : the value of the original field (in [0] if hide_marc=1, otherwise in [1]
-// image : the up button. don't exist is hide_marc=1
- <!-- TMPL_IF name="hide_marc" -->
-	var orginput = original.getElementsByTagName('input')[0];
- <!-- TMPL_ELSE -->
- 	var orginput = original.getElementsByTagName('input')[1];
-	image = clone.getElementsByTagName('img')[0];
-	image.setAttribute("onclick","upSubfield('" + index + index + "')");
- <!-- /TMPL_IF -->
- trigger = original.getElementsByTagName('a')[0];
- if (trigger) {
- 	trigger.parentNode.removeChild(trigger);
- }
- clonetrigger = clone.getElementsByTagName('a')[0];
- clonetrigger.setAttribute("onclick","cloneSubfield('" + index + index + "')");
- clone.setAttribute("tabindex","1");
- orginput.value = '';
- original.parentNode.insertBefore( clone, original); 
-}
-
-function upSubfield(index) {
-	try{
-		var line = document.getElementById(index); // get the line where the user has clicked.
-	} catch(e) {
-		return;
-	}
-	var tag = line.parentNode; // get the dad of this line. (should be "<div tag=XXX>")
-	
-	// getting all subfields for this tag
-	var subfields = tag.getElementsByTagName('div');
-	var subfieldsLength = subfields.length;
-	if(subfieldsLength<=1) return; // nothing to do if there is just one subfield.
-	// among all subfields 
-	for(var i=0;i<subfieldsLength;i++){ 
-		if(subfields[i].getAttribute('id') == index){ //looking for the subfield which is clicked :
-			if(i==0){ // if the clicked subfield is on the top
-				tag.appendChild(subfields[0]);
-				return;
-			}else{
-				var lineAbove = subfields[i-1];
-				tag.insertBefore(line,lineAbove);
-				return;
-			}
-		}
-	}
-}
-
-function unHideSubfield(index,labelindex) {
-	subfield = document.getElementById(index);
-	subfield.style.display = 'block';
-	label = document.getElementById(labelindex);
-	label.style.display='none';	
-}
-</script>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/authorities/blinddetail-biblio-search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/authorities/blinddetail-biblio-search.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/authorities/blinddetail-biblio-search.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/authorities/blinddetail-biblio-search.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<html>
-<body>
-
-<script language="JavaScript" type="text/javascript">
-
-function goforward()
-{
-var start = <!-- TMPL_VAR NAME="index">;
-var subfields=opener.opener.document.getElementsByName('subfield'+start);
-var fields=opener.opener.document.getElementsByName('field_value'+start);
-// go forward, until reaching the end of the field.
-for  (var i=0; i<fields.length; i++) {
-	if ( subfields.item(i).value == '<!-- TMPL_VAR NAME="linkidsubfield">') {
-		fields.item(i).value = "<!-- TMPL_VAR NAME="authid">";
-	}
-	<!-- TMPL_LOOP NAME="0XX" -->
-		<!-- TMPL_LOOP NAME="subfield" -->
-			if (subfields.item(i).value == '<!-- TMPL_VAR NAME="marc_subfield" -->') 
-			{
-				fields.item(i).value = "<!-- TMPL_VAR NAME="marc_value" -->";
-			}
-		<!-- /TMPL_LOOP -->
-	<!-- /TMPL_LOOP -->
-}
-
-	opener.close();
-	self.close();
-	return false;
-
-
-}
-</script>
-<script language="javascript" type="text/javascript">
-window.onload=goforward();
-</script>
-
-
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/authorities/blinddetail-linker.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/authorities/blinddetail-linker.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/authorities/blinddetail-linker.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/authorities/blinddetail-linker.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<html>
-<body>
-<script language="JavaScript" type="text/javascript">
-
-function go()
-{
-var index_start = <!-- TMPL_VAR NAME="index" -->;
-var whichfield = opener.opener.document.f.tag[index_start].value;
-i=index_start
-//try to fill authid as linkid to be used for linking authorities
-//opener.opener.document.f.linkid.value="<!-- TMPL_VAR NAME="authid"-->";
-
-// go forward, until reaching the end of the field.
-				opener.opener.document.f.field_value[i].value = "<!-- TMPL_VAR NAME="authid" -->";
-
-	opener.close();
-	self.close();
-	return false;
-
-
-}
-</script>
-<script language="javascript" type="text/javascript">
-window.onload = go();
-</script>
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/authorities/detail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/authorities/detail.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/authorities/detail.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/authorities/detail.tmpl	27 Sep 2006 21:40:47 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,55 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities 
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!--TMPL_UNLESS NAME="nonav"--><!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-authorities.inc" -->
-<!--TMPL_ELSE-->
-<!-- TMPL_INCLUDE NAME="menu-authorities.inc" -->
-<!--/TMPL_UNLESS-->
-
-<div id="main">
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/includes/marc-editor.css">
-<div class="tabbed"><input type="hidden" name="nonav" value="<!-- TMPL_VAR NAME="nonav" -->">
-	<h1>Authority number : <!-- TMPL_VAR NAME="authid" --> in <!-- TMPL_VAR NAME="authtypetext" --></h1>
-	<a href="authorities.pl?authid=<!-- TMPL_VAR NAME="authid" -->&nonav=<!-- TMPL_VAR NAME="nonav" -->&authtypecode=<!-- TMPL_VAR name="authtypecode" -->"">
-		<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/fileopen.png">
-	</a>
-	<!--TMPL_UNLESS NAME="nonav"--><a href="javascript:confirm_deletion()">
-		<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/edittrash.png">
-	</a>
-	<a href="javascript:Dopop('detailprint.pl?authid=<!-- TMPL_VAR NAME="authid" -->')" class="button authority">
-		Print
-	</a><!--/TMPL_UNLESS--><!--TMPL_IF NAME="count"-->&nbsp;<a href="/cgi-bin/koha/catalogue/catalogue-search.pl?value=<!-- TMPL_VAR NAME="authid" -->&kohafield=authid&amp;op=do_search&amp;zoom=1" class="button authority">Used in <!-- TMPL_VAR NAME="count" --> biblio(s)</a><!--/TMPL_IF-->
-</div>
-
-<div name="0XX" id="0XX" class="tab" style="visibility:visible">
-	<!-- TMPL_LOOP NAME="0XX" -->
-			<p class="MARCtag">
-				<!-- TMPL_VAR NAME="tag" -->
-			</p>
-		<!-- TMPL_LOOP NAME="subfield" -->
-			<p>
-				<label class="labelsubfield">
-				<a href="/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&authtypecode=<!-- TMPL_VAR NAME="authtypecode" -->&marclist=<!-- TMPL_VAR NAME="marc_tag" --><!-- TMPL_VAR NAME="marc_subfield" -->&and_or=and&excluding=&operator=all&stype=author&value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-					<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filefind.png" height="15">
-				</a>
-				<!-- TMPL_VAR NAME="marc_subfield" -->
-				<!-- TMPL_VAR NAME="marc_lib" --></label>
-				<!-- TMPL_VAR NAME="marc_value" -->
-			</p>
-		<!-- /TMPL_LOOP -->
-	<!-- /TMPL_LOOP -->
-</div>
-	
-<script language="JavaScript" type="text/javascript">
-
-function confirm_deletion() {
-	var is_confirmed = confirm('Are you sure you want to delete this biblio?');
-	if (is_confirmed) {
-		window.location="authorities.pl?op=delete&authid=<!-- TMPL_VAR NAME="authid" -->&nonav=<!-- TMPL_VAR NAME="nonav" -->";
-	}
-}
-function Dopop(link) {
-	newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
-}
-</script>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/authorities/linkresultlist-auth.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/authorities/linkresultlist-auth.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/authorities/linkresultlist-auth.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/authorities/linkresultlist-auth.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,94 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<div id="main">
-	<h1 class="authority">Authority search results</h1>
-		<div id="resultnumber">
-			<p>
-				<!-- TMPL_IF name="displayprev" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif"  border="0">
-					</a>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_LOOP NAME="numbers" -->
-					<!-- TMPL_IF name="highlight" -->
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
-					<!-- TMPL_ELSE -->
-						<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
-							<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
-					<!-- /TMPL_IF -->
-				<!-- /TMPL_LOOP -->
-				<!-- TMPL_IF name="displaynext" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0"></a>
-				<!-- /TMPL_IF -->
-			</p>
-			<p>
-				<!-- TMPL_IF name="total" -->
-					&nbsp;<b>Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --></b><br><br>
-				<!-- TMPL_ELSE -->
-					&nbsp;No results found.<br>
-				<!-- /TMPL_IF -->
-			</p>
-		</div>
-		<div id="resultlist">
-			<table>
-				<tr>
-					<th class="authority">Summary</th>
-					<th class="authority">Used</th>
-					<th class="authority">Get It!</th>
-					
-				</tr>
-				<tr>
-					<td>Clear any entry</td>
-					<td>&nbsp;</td>
-					<td>
-						<a href="javascript:jumpfull('blinddetail-linker.pl?authid=0&amp;index=<!-- TMPL_VAR NAME="index" -->&amp;authtypecode=<!-- TMPL_VAR NAME="authtypecode" -->')" class="button authority">
-							Clear
-						</a>
-					</td>
-				<!-- TMPL_LOOP NAME="result" -->
-					<tr>
-						<td><!-- TMPL_VAR NAME="summary" --></td>
-						<td><!-- TMPL_VAR NAME="used" --> times</td>
-						<td>
-							<a href="javascript:jumpfull('blinddetail-linker.pl?authid=<!-- TMPL_VAR NAME="authid" -->&amp;index=<!-- TMPL_VAR NAME="index" -->')"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/arrow.gif" width="16" height="16" hspace="0" vspace="0" border="0"></a>
-						</td>
-							</tr>
-				<!-- /TMPL_LOOP -->
-			</table>
-	
-		</div>
-		<div id="resultnumber">
-			<p>
-				<!-- TMPL_IF name="displayprev" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border="0">
-					</a>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_LOOP NAME="numbers" -->
-					<!-- TMPL_IF name="highlight" -->
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
-					<!-- TMPL_ELSE -->
-						<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
-							<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
-					<!-- /TMPL_IF -->
-				<!-- /TMPL_LOOP -->
-				<!-- TMPL_IF name="displaynext" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0"></a>
-				<!-- /TMPL_IF -->
-			</p>
-		</div>	
-		<a href="auth_linker.pl?index=<!-- TMPL_VAR NAME="index" -->">Search again</a>
-	</div>
-</div>
-
-<script language="JavaScript" type="text/javascript">
-
-function jumpfull(page)
-{	
-	window.open(page,'','');
-}
-</script>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/authorities/searchresultlist-auth.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/authorities/searchresultlist-auth.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/authorities/searchresultlist-auth.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/authorities/searchresultlist-auth.tmpl	27 Sep 2006 21:40:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,93 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-authorities.inc" -->
-	<h1 class="authority">Authority search results</h1>
-		<div id="resultnumber">
-			<p>
-				<!-- TMPL_IF name="displayprev" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif"  border="0">
-					</a>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_LOOP NAME="numbers" -->
-					<!-- TMPL_IF name="highlight" -->
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
-					<!-- TMPL_ELSE -->
-						<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
-							<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
-					<!-- /TMPL_IF -->
-				<!-- /TMPL_LOOP -->
-				<!-- TMPL_IF name="displaynext" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0"></a>
-				<!-- /TMPL_IF -->
-			</p>
-			<p>
-				<!-- TMPL_IF name="total" -->
-					&nbsp;<b>Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --></b><br><br>
-				<!-- TMPL_ELSE -->
-					&nbsp;No results found.<br>
-				<!-- /TMPL_IF -->
-			</p>
-		</div>
-		<div id="resultlist">
-			<table>
-				<tr>
-					<th class="authority">Summary</th>
-					<th class="authority">Used</th>
-					<th class="authority">Get It!</th>
-					<th class="authority">Edit It!</th>
-				</tr>
-				<tr>
-					<td>Clear any entry</td>
-					<td>&nbsp;</td>
-					<td>
-						<a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=0&amp;index=<!-- TMPL_VAR NAME="index" -->')" class="button authority">
-							Clear
-						</a>
-					</td>
-				<!-- TMPL_LOOP NAME="result" -->
-					<tr>
-						<td><!-- TMPL_VAR NAME="summary" --></td>
-						<td><!-- TMPL_VAR NAME="used" --> times</td>
-						<td>
-							<a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=<!-- TMPL_VAR NAME="authid" -->&amp;index=<!-- TMPL_VAR NAME="index" -->')"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/arrow.gif" width="16" height="16" hspace="0" vspace="0" border="0"></a>
-						</td>
-						<td> <a href="/cgi-bin/koha/authorities/authorities.pl?nonav=<!-- TMPL_VAR NAME="nonav" -->&authid=<!-- TMPL_VAR NAME="authid" -->&index=<!-- TMPL_VAR NAME="index" -->&authtypecode=<!-- TMPL_VAR name="authtypecode" -->">Edit<a/></td>
-					</tr>
-				<!-- /TMPL_LOOP -->
-			</table>
-	
-		</div>
-		<div id="resultnumber">
-			<p>
-				<!-- TMPL_IF name="displayprev" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border="0">
-					</a>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_LOOP NAME="numbers" -->
-					<!-- TMPL_IF name="highlight" -->
-						<img src="/intranet-tmpl/default/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
-					<!-- TMPL_ELSE -->
-						<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
-							<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
-					<!-- /TMPL_IF -->
-				<!-- /TMPL_LOOP -->
-				<!-- TMPL_IF name="displaynext" -->
-					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/numbers/next.gif" border="0"></a>
-				<!-- /TMPL_IF -->
-			</p>
-		</div><a href="auth_finder.pl?index=<!-- TMPL_VAR NAME="index" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">Search again</a>	
-	</div>
-
-
-<script language="JavaScript" type="text/javascript">
-
-function jumpfull(page)
-{	
-	window.open(page,'','');
-}
-</script>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/authorities/searchresultlist.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/authorities/searchresultlist.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/authorities/searchresultlist.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/authorities/searchresultlist.tmpl	27 Sep 2006 21:40:47 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,108 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-authorities.inc" -->
-
-	<h1 class="authority">Authority search results</h1>
-	<div id="resultnumber">
-		<p>
-			<!-- TMPL_IF name="displayprev" -->
-				<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border="0">
-				</a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP NAME="numbers" -->
-				<!-- TMPL_IF name="highlight" -->
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
-				<!-- TMPL_ELSE -->
-					<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0">
-					</a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF name="displaynext" -->
-				<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0">
-				</a>
-				<!-- /TMPL_IF -->
-		</p>
-		<p>
-			<!-- TMPL_IF name="total" -->
-			&nbsp;<b>Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --></b><br><br>
-			<!-- TMPL_ELSE -->
-			&nbsp;No results found.<br>
-			<!-- /TMPL_IF -->
-		</p>
-	</div>
-	<div id="resultlist">
-		<table>
-			<tr>
-				<th class="authority">Summary</th>
-				<th class="authority">Used in</th>
-				<th class="authority">Authid/Delete</th>
-				
-			</tr>
-			<!-- TMPL_LOOP NAME="result" -->
-				<tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
-				
-					<td><!-- TMPL_VAR NAME="summary" --></td>
-					<td><a href="/cgi-bin/koha/catalogue/catalogue-search.pl?kohafield=authid&amp;value=<!-- TMPL_VAR NAME="authid" -->&amp;op=do_search&amp;zoom=1" class="button authority"><!-- TMPL_VAR NAME="used" --> biblio(s)</a></td>
-					
-					<td><!-- TMPL_VAR NAME="authid" -->&nbsp;
-						<!-- TMPL_UNLESS name="used" -->
-						<a href="javascript:do_delete('authorities-home.pl?op=delete&authid=<!-- TMPL_VAR NAME="authid" -->')">Delete</a>
-						<!-- /TMPL_UNLESS -->
-					</td>
-					
-				</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-	</div>
-	<div id="resultnumber">
-		<p>
-			<!-- TMPL_IF name="displayprev" -->
-				<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border="0">
-				</a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP NAME="numbers" -->
-				<!-- TMPL_IF name="highlight" -->
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
-				<!-- TMPL_ELSE -->
-					<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0">
-					</a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF name="displaynext" -->
-				<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0">
-				</a>
-				<!-- /TMPL_IF -->
-		</p>
-	</div>	
-<form name"m" id="m">
-
-From:<input type="text" size="10" name="mergefrom" id="mergefrom" value=""/>&nbsp;&nbsp;To:<input type="text" size="10" id="mergeto" name="mergeto" value=""/>
-<input type="button" class="submit" value="Merge" onclick="do_merge(); return false;" /></form>
-					
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-
-
-<script language="JavaScript" type="text/javascript" >
-function do_delete(page)
-{
-window.location = page;
-}
-function do_merge(page)
-{
-
-X = document.forms['m'].elements['mergefrom'].value;
-	Y = document.forms['m'].elements['mergeto'].value;
-var is_confirmed = confirm('Merging from ID:'+X+'  to ID: '+Y+' .Confirm?');
-	if (is_confirmed) {
-window.location="authorities-home.pl?op=merge&mergefrom="+X+"&mergeto="+Y;
-}
-}
-</script>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/barcodes/barcodes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/barcodes/barcodes.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/barcodes/barcodes.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/barcodes/barcodes.tmpl	4 Aug 2005 19:43:45 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,80 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-barcodes.inc" -->
-
-<!--   START OF ADD COUNTRY CODE PANEL  -->
-<div class="countryPanel" id="addCountryCode">
- 	<form action="/cgi-bin/koha/barcodes/barcodes.pl" method="post" style="display:inline">
-		<input type="hidden" name="addCode" value="1" />
-<h4>Add a new Country Code</h4>
-<ul>
-	<li><label for="countryName">Country Name:</label> <input type="text" size="10" id="countryName" name="countryName" /></li>
-	<li><label for="countryCode">Country Code:</label> <input type="text" size="3" id="countryCode" name="countryCode" /></li>
-</ul>
-<input type="submit" name="submit" id="submit" value="Save Code"/>
-<input type="button" name="cancel" id="cancel" value="Cancel" onclick="document.getElementById('addCountryCode').style.display = 'none'" />
-	</form>
-</div>
-
-<!--   END OF ADD COUNTRY CODE PANEL  -->
-
-	<h1>Barcodes Generator</h1>
-	<h3>Generate barcodes from inventory codes</h3>
-	<ul>
-		<li>Select a range of inventary codes. You can choose a continuous range or individual inventory codes</li>
-		<li>Select the standard type to generate barcodes.</li>
-		<li>Define the page size for output the PDF.</li>
-		<li>Depending on page size, Koha will show you how the page is arranged
-		    for each barcode. You can define wich point to start printing the page.
-		</li>
-	</ul>
-	
-<!-- TMPL_IF NAME="ERROR" -->Can't find inventory codes in that range. Please try again.<!-- /TMPL_IF -->
-
-	<form id="formulario" method="POST" action="<!-- TMPL_VAR NAME="SCRIPT_NAME" -->" name="form1" onsubmit="return checkFields(this);" target="_blank">
-		<label for="rangeType">Type of Interval: </label><!-- TMPL_VAR NAME="RANGE_TYPE" -->
-
-<div id="continuous" class="panel" style="display:inline">
-	<ul>
-		<li><label for="from">From:</label><input id="from" type="text" name="from" size="20" /></li>
-		<li><label for="to">To:</label><input id="to" type="text" name="to" size="20" /></li>
-	</ul>
-</div>
-
-					 
- <div id="individuals" class="panel" style="display:none; background-color: #ffffff;">
-<label for="inventaryCode">Inventory Code: </label><input id="inventaryCode" type="text" name="inventaryCode" size="20" />
-<a href="#" onclick="addItem(); return false;">[+]</a>	
-<a href="#" onclick="removeItem(); return false;">[-]</a>
-<select id="inventaryList" size="5" style="width:150px">
-</select>
-<input type="hidden" id="individualCodes" name="individualCodes">																						
-</div>						
-
-<p>
-<label for="numbersystem">Country Code: </label><!-- TMPL_VAR NAME="NUMBER_SYSTEM" --><a href="#" onClick="addCountryCode(); return false;">[+]</a></p>
-
-<p>								<label for="pageType">Page Size</label><input type="text" id="pageType" name="pageType" readonly="readonly" disabled="disabled" value="<!-- TMPL_VAR NAME="PAGES" -->"  size="10" /><a href="/cgi-bin/koha/barcodes/printerConfig.pl">[Go to Printer Configuration]</a></p>
-								
-
-<p><label for="text_under_label">Text under label</label>
-					<input type="text" id="text_under_label" name="text_under_label" size="40" value="<!-- TMPL_VAR name="text_under_label -->" /> If this field is empty, author and title will be used instead</p>
-
-			    	<table>
-						<tr>
-							<th colspan="<!-- TMPL_VAR NAME="COL_SPAN" -->">Label number to start printing</th>
-						</tr>
-						<!-- TMPL_LOOP NAME="LABEL_TABLE" -->
-							<tr>
-								<!-- TMPL_LOOP NAME="columns" -->
-									<td>
-										<input type="radio" id="label" value="<!-- TMPL_VAR NAME="tagname" -->" name="label" <!-- TMPL_VAR NAME="check" -->>  Label  <!-- TMPL_VAR NAME="labelname" --></td>
-								<!-- /TMPL_LOOP -->
-							</tr>
-						<!-- /TMPL_LOOP -->  			    
-					</table>
-
-<input type="submit" value="Generate Barcodes" name="B1">
-<input type="reset" value="Clear Fields" name="B2">
-</form>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/barcodes/printerConfig.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/barcodes/printerConfig.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/barcodes/printerConfig.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/barcodes/printerConfig.tmpl	4 Aug 2005 19:43:45 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,83 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-barcodes.inc" -->
-
-	<h1>Printer Configuration</h1>
-	<h3>Set printer configuration corresponding to your environment</h3>
-	<ul>
-		<li>Set width and height of the label that you are going to work with.</li>
-		<li>Set your system's default DPI.</li>
-		<li>Set the page type.</li>
-		<li>Select how many columns and rows are in your page type.</li>
-		<li>Set left- and bottom-margins of the page that you are going to use. This parameter will help to center the barcodes on the labels.</li>
-	</ul>
-	<br>
-	<form id="formulario" method="POST" action="<!-- TMPL_VAR NAME="SCRIPT_NAME" -->" name="form1">
-		<input type="hidden" name="saveSettings" value="1" />
-		<table>
-			<tr>
-				<th scope="row">
-					Label width (Expressed in mm)
-				</th><td> 
-					<input id="labelWidth" type="text" name="labelWidth" size="5"
-					       value="<!-- TMPL_VAR NAME="LABEL_WIDTH" -->">
-				</td></tr>
-				<th scope="row">
-					Label heigth (Expressed in mm)
-				</th><td> 
-					<input id="labelHeigth" type="text" name="labelHeigth" size="5"
-					       value="<!-- TMPL_VAR NAME="LABEL_HEIGTH" -->">
-				</td></tr>
-				<th scope="row">
-					System dpi
-				</th><td>
-					<input id="systemDpi" type="text" name="systemDpi" size="5"
-					       value="<!-- TMPL_VAR NAME="SYSTEM_DPI" -->">
-				</td></tr>
-				<th scope="row">
-					Page Type
-				</th>	<td>
-					<select name="pageType" id="pageType" size="1">
-						<!-- TMPL_IF name="A4" -->
-							<option value="A4" selected>A4</option>
-				        <!-- TMPL_ELSE -->
-							<option value="A4">A4</option>
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF name="Letter" -->
-							<option value="Letter" selected>Letter</option>
-				        <!-- TMPL_ELSE -->
-							<option value="Letter">Letter</option>
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF name="Legal" -->
-							<option value="Legal" selected>Legal</option>
-				        <!-- TMPL_ELSE -->
-							<option value="Legal">Legal</option>
-						<!-- /TMPL_IF -->
-		            </select>
-				</td></tr>
-				<th scope="row">
-					Columns
-				</th>  <td>
-					<input id="columns" type="text" name="columns" size="5"
-					       value="<!-- TMPL_VAR NAME="COLUMNS" -->">
-				</td></tr>
-				<th scope="row">
-					Rows
-				</th>   <td>
-					<input id="rows" type="text" name="rows" size="5"
-					       value="<!-- TMPL_VAR NAME="ROWS" -->">
-				</td></tr>
-				<th scope="row">
-					Margin Bottom (Expressed in mm)
-				</th>   <td>
-					<input id="marginBottom" type="text" name="marginBottom" size="5"
-					       value="<!-- TMPL_VAR NAME="MARGIN_TOP" -->">
-				</td></tr>
-				<th scope="row">
-					Margin Left (Expressed in mm)
-				</th>   <td>
-					<input id="marginLeft" type="text" name="marginLeft" size="5"
-					       value="<!-- TMPL_VAR NAME="MARGIN_LEFT" -->">
-				</td></tr>
-			</table><input type="submit" value="Save Settings" />
-	</form>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/bookshelves/addbookbybiblionumber.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/bookshelves/addbookbybiblionumber.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/bookshelves/addbookbybiblionumber.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/bookshelves/addbookbybiblionumber.tmpl	20 Jul 2005 18:55:20 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Add to Virtual Shelf<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h3>Add <i><!-- TMPL_VAR NAME="title" --></i> <!-- TMPL_IF NAME="author" -->by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --> to a Virtual Shelf</h3>
-<form>
-	<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->">
-<div class="data">
-	<table>
-		<caption>Select an Existing Bookshelf</caption>
-		<tr><th><label>Add to virtual shelf</label></th><td><!-- TMPL_VAR NAME="CGIbookshelves" --></td></tr>
-		</table>
-</div>
-<input type="submit" value="Add to virtual shelf" class="submit" />
-<h4>...or...</h4>
-<div class="data">
-	<table>
-	<caption>Add to a New Bookshelf:</caption>
-		<tr><th><label for="newbookshelf">Shelf Name:</label> </th><td><input type="text" name="newbookshelf" id="newbookshelf" size="60" /></td></tr>
-		<tr><th><label for="category">Category:</label> </th><td><select name="category" id="category">
-			<option value="1">Private</option>
-			<option value="2">Public</option>
-		</select></td></tr>
-	</table>
-	</div>
-	<input type="submit" value="Add to virtual shelf" class="submit" />
-</form>
-<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/bookshelves/shelves.tmpl	20 Jul 2005 18:55:20 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,169 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Virtual Shelves<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<script type="text/javascript">
-	function CheckAll() { 
-	count = document.mainform.elements.length;
-    for (i=0; i < count; i++){
-	    if(document.mainform.elements[i].checked == 1){
-			document.mainform.elements[i].checked = 0;
-		} else {
-			document.mainform.elements[i].checked = 1;
-		}
-	}
-}
-</script>
-
-<!-- TMPL_IF name="edit" -->
-		<form method="post" action="<!-- TMPL_VAR NAME="script_name" -->">
-			<input type="hidden" name="op" value="modifsave" />
-			<table>
-			<caption>Editing Shelf <!-- TMPL_VAR name="shelfname"--></caption>
-			<tr><td><input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR name="shelfnumber" -->" /><label for="shelfname">Name:</label></td><td><input id="shelfname" type="text" name="shelfname" size="25" value="<!-- TMPL_VAR name="shelfname"-->" /></td></tr>
-			<tr><td><label for="owner">Owner:</label></td><td><input type="hidden" id="owner" name="owner" value="<!-- TMPL_VAR NAME="loggedinuser" -->" /><!-- TMPL_VAR NAME="loggedinusername" --></td></tr>
-			<tr><td><label for="category">Category:</label></td><td><select id="category" name="category">
-					<!-- TMPL_IF name="category1" -->
-						<option value="1" selected>Private</option>
-					<!-- TMPL_ELSE -->
-						<option value="1">Private</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="category2" -->
-						<option value="2" selected>Public</option>
-					<!-- TMPL_ELSE -->
-						<option value="2">Public</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="category3" -->
-						<option value="3" selected>Free</option>
-					<!-- TMPL_ELSE -->
-						<option value="3">Free</option>
-					<!-- /TMPL_IF -->
-				</select></td></tr>
-			</table>
-			<ul><li>a private bookshelf is managed by you and can be seen only by you.</li>
-				<li> A public can be seen by everybody, but managed only by you.</li>
-				<li> A free can be managed by any user.</li></ul>
-			<input type="submit" value="Save Changes" /></p>
-		</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF Name="viewshelf" -->
-	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post" name="mainform">
-			<table>
-			<caption>Contents of <!-- TMPL_VAR NAME="shelfname" --></caption>
-			<tr>
-					<!-- TMPL_IF name="manageshelf" --><th><a href="/cgi-bin/koha/shelves.pl" onclick="CheckAll(); return false;">Check All</a></th><!-- /TMPL_IF -->
-					<th>Title</th>
-					<th>Author</th>
-					<th>Item Type</th>
-					<th>&copy;</th>
-					<th>&nbsp;</th>
-				</tr><!-- TMPL_LOOP Name="itemsloop" --><!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF --><!-- TMPL_IF name="manageshelf" --><td><input type="checkbox" name="REM-<!-- TMPL_VAR NAME="itemnumber" -->" /></td><!-- /TMPL_IF -->
-						<td><a href="/cgi-bin/koha/detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a></td>
-						<td><!-- TMPL_VAR NAME="author" --></td> 
-						<td><!-- TMPL_VAR NAME="itemtype" --></td>
-						<td><!-- TMPL_VAR NAME="publicationyear" --></td>
-						<td><a href="/cgi-bin/koha/request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->">Reserves</a></td>
-					</tr>
-				<!-- /TMPL_LOOP -->
-			</table>
-			<input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->" />
-			<input type="hidden" name="modifyshelfcontents" value="1" />
-			<input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" />
-			<!-- TMPL_IF name="manageshelf" -->
-				<input type="submit" value="Remove Selected Items" />
-			<!-- /TMPL_IF --></form><br>
-
-	<!-- TMPL_IF name="manageshelf" -->
-		<form>
-<table>
-		<caption>Add an item by barcode</caption>
-		<tr><th><label for="barcode">Barcode:</label></th><td><input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->" />
-			<input type="hidden" name="modifyshelfcontents" value="1" />
-			<input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" />
-			<input type="text" size="14" maxlength="14" id="barcode" name="addbarcode" />
-			<input type="hidden" name="modifyshelfcontents" value="1" />
-			<input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->" /><input type="submit" value="Save" /></td></tr></table>
-		</form>
-	<!-- /TMPL_IF -->
-		<form action="/cgi-bin/koha/bookshelves/shelves.pl" method="get"><input type="submit" value="Return to Virtual Shelves" /></form>
-				
-<!-- TMPL_ELSE -->
-	<!-- TMPL_IF Name="shelves" -->
-		<!-- TMPL_IF Name="status1" -->
-			<!-- TMPL_VAR NAME="string1" -->
-		<!-- /TMPL_IF -->
-		<!-- TMPL_LOOP Name="paramsloop" -->
-			<!-- TMPL_IF Name="status" -->
-				<!-- TMPL_VAR NAME="string" -->
-			<!-- /TMPL_IF -->
-		<!-- /TMPL_LOOP -->
-					<form method="post" action="<!-- TMPL_VAR NAME="script_name" -->">								
-					<input type="hidden" name="shelves" value="1" /><table>
-						<caption>Bookshelves</caption>
-						<th>&nbsp;</th><th>Title</th><th>Item Count</th>
-					<!-- TMPL_LOOP Name="shelvesloop" -->
-						<!-- TMPL_IF name="canmanage" -->
-
-						<!-- TMPL_IF NAME="toggle" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF --><td><!-- TMPL_IF NAME="shelfbookcount" --><input type="checkbox" name="DEL-<!-- TMPL_VAR NAME="shelf" -->" disabled="disabled" readonly="readonly" /><!-- TMPL_ELSE --><input type="checkbox" name="DEL-<!-- TMPL_VAR NAME="shelf" -->" /><!-- /TMPL_IF --></td><td><a href="shelves.pl?viewshelf=<!-- TMPL_VAR name="shelf" -->"><!-- TMPL_VAR NAME="shelfname" --></a></td><td><!-- TMPL_IF NAME="shelfbookcount" --><!-- TMPL_VAR NAME="shelfbookcount" --> item(s)*<!-- TMPL_ELSE -->Empty<!-- /TMPL_IF --></td></tr>
-						<!-- /TMPL_IF -->
-						<!-- /TMPL_LOOP --></table>
-					
-						<input type="submit" value="Delete Selected Shelves" /> <sup>*</sup>Shelves must be empty before they can be deleted.
-					</p>
-					</form>
-
-			<form method="post" action="<!-- TMPL_VAR NAME="script_name" -->">
-				<input type="hidden" name="shelves" value="1" />
-				<table>
-				<caption>Add Shelf</caption>
-				<tr><th><label>Name</label></th><td><input type="text" name="addshelf" size="25" /></td></tr>
-				<tr><th><label>Owner</label></th><td><input type="hidden" name="owner" value="<!-- TMPL_VAR NAME="loggedinuser" -->" /><!-- TMPL_VAR NAME="loggedinusername" --></td></tr>
-				<tr><th><label>Category</label></th>
-					<td><select name="category">
-						<option value="1">Private</option>
-						<option value="2">Public</option>
-					</select></td></tr>
-</table>
-<ul><li>A private bookshelf is managed by you and can be seen only by you.</li>
-					<li> A public shelf can be seen by everybody, but managed only by you.</li></ul>
-					<input type="submit" value="Add New Shelf" /></form>
-					<form action="shelves.pl" method="get"><input type="submit" value="Back to Shelf List" /></form>
-	<!-- TMPL_ELSE -->
-			<table>
-			<caption>Virtual Shelves</caption>
-				<tr>
-					<th>Shelf Name</th>
-					<th>Category</th>
-					<th>Content size</th>
-					<th>&nbsp;</th>
-				</tr>
-				<!-- TMPL_LOOP Name="shelvesloop" -->
-				<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-					<td>
-						<a href="shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelf" -->">
-							<!-- TMPL_VAR NAME="shelfname" -->
-						</a>
-					</td>
-					<td>
-						<!-- TMPL_IF NAME="category1" -->
-							Private
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF NAME="category2" -->
-							Public
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF NAME="category3" -->
-							Free
-						<!-- /TMPL_IF -->
-					</td>
-					<td>
-						<!-- TMPL_VAR NAME="shelfbookcount" --> item(s)
-					</td>
-					<td><!-- TMPL_IF name="mine" --><a href="shelves.pl?op=modif&amp;shelf=<!-- TMPL_VAR NAME="shelf" -->">Edit</a><!-- TMPL_VAR name="surname" --><!-- TMPL_VAR name="firstname" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
-				</tr>
-				<!-- /TMPL_LOOP -->
-			</table>
-		<form action="shelves.pl" method="get"><input type="hidden" value="1" name="shelves" /><input type="submit" value="Add or Remove Book Shelves" />				
-	<!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/catalogue/ISBDdetail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/catalogue/ISBDdetail.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/catalogue/ISBDdetail.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/catalogue/ISBDdetail.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: ISBD View<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="masthead.inc" -->
-<!-- TMPL_INCLUDE NAME="search-topmenu.inc" -->
-<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
-
-<div id="main">
-
-<div class="tabitem"><form action="MARCdetail.pl" method="get">
-<input type="hidden" name="bib" value="<!-- TMPL_VAR name="biblionumber" -->" />
-<input type="submit" class="submit" value="View MARC" /></form> <form action="/cgi-bin/koha/moredetail.pl" method="get"><input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" /><input type="hidden" name="item" value="<!-- TMPL_VAR NAME="itemnumber" -->" /><input type="hidden" name="bib" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="hidden" name="bi" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->" /><input type="submit" class="submit" value="Item Details" /></form> <form action="detailprint.pl" method="get"><input type="hidden" name="bib" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Print" onclick="Dopop('detailprint.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->'); return false;" /></form><!-- TMPL_IF NAME="norequests" --><!-- TMPL_ELSE --> <form action="request.pl" method="get"><input type="hidden" value="<!-- TMPL_VAR name="biblionumber" -->" name="bib" /> <input type="submit" value="Place Reserve" class="submit" /></form> <form action="acqui.simple/addbiblio.pl"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" /><input type="submit" value="Edit this Record" class="submit" /></form><!-- /TMPL_IF -->
-</div>
-
-	<div class="isbd">
-		<p><!-- TMPL_VAR NAME="ISBD" --></p>
-	</div>
-</div>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/catalogue/MARCdetail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/catalogue/MARCdetail.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/catalogue/MARCdetail.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/catalogue/MARCdetail.tmpl	11 Sep 2006 17:41:55 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,250 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: MARC Record View<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!--TMPL_UNLESS NAME="popup"-->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
-<h2>MARC Record for number <em><!-- TMPL_VAR name="biblionumber" --><!-- TMPL_VAR NAME="biblio_title" --><!-- TMPL_IF NAME="biblio_subtitle" -->: <!-- TMPL_VAR NAME="biblio_subtitle" --><!-- /TMPL_IF --></em></h2>
-<div class="tabitem"><form action="detail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="hidden" value="intra" name="type" /><input type="submit" class="submit" value="Brief Display" /></form><!-- TMPL_IF NAME="norequests" -->&nbsp;<!-- TMPL_ELSE --> <form action="/cgi-bin/koha/reserve/request.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /> <input type="submit" class="submit" value="Place Reserve" /></form>
-		<!-- /TMPL_IF --><form action="detailprint.pl" method="get"><input type="hidden" name="bib" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Simple Print View" /></form> <!-- TMPL_IF name="subscriptionid" --><form action="/cgi-bin/koha/bull/subscription-detail.pl" method="get"><input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR NAME="subscriptionid" -->" /><input type="submit" value="Subscription" class="submit" /></form>
-<form action="/cgi-bin/koha/bull/serial-issues.pl" method="get"><input type="hidden" name="subscriptionid" value="!-- TMPL_VAR NAME="subscriptionid" -->" /><input type="submit" value="Serial Issues" class="submit" /></form><!-- /TMPL_IF -->  <form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Edit MARC" /></form> <form action="/cgi-bin/koha/cataloguing/additem.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber"-->" /><input type="submit" class="submit" value="Edit Items" /></form> <form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get"><input type="hidden" name="op" value="delete" /><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="cancel" value="Delete Record" onclick="confirm_deletion(); return false;" /></form></div>
-
-<!-- TMPL_IF NAME="0XX" -->
-<table class="marc">
-	<!-- TMPL_LOOP NAME="0XX" -->
-	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
-	<!-- TMPL_LOOP NAME="subfield" -->
-	<tr>
-         <td>&nbsp;</td>
-	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS --></td>
-		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
-		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
-<td><!-- TMPL_IF name="link" -->
-						<a href="catalogue-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;zoom=1&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF --></td> 
-	</tr>
-	<!-- /TMPL_LOOP -->
-	<!-- /TMPL_LOOP -->
-     </table>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="1XX" -->
-    <table class="marc">
-	<!-- TMPL_LOOP NAME="1XX" -->
-	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
-	<!-- TMPL_LOOP NAME="subfield" -->
-	<tr>
-         <td>&nbsp;</td>
-	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS --></td>
-		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
-		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
-<td><!-- TMPL_IF name="link" -->
-						<a href="catalogue-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;zoom=1&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF --></td> 
-       </tr>
-	<!-- /TMPL_LOOP -->
-	<!-- /TMPL_LOOP -->
-     </table>
-	 <!-- /TMPL_IF -->
-	 
-<!-- TMPL_IF NAME="2XX" -->
-    <table class="marc">
-	<!-- TMPL_LOOP NAME="2XX" -->
-	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
-	<!-- TMPL_LOOP NAME="subfield" -->
-	<tr>
-         <td>&nbsp;</td>
-	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
-		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
-		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
-<td><!-- TMPL_IF name="link" -->
-						<a href="catalogue-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;zoom=1&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF --></td> 
-       </tr>
-	<!-- /TMPL_LOOP -->
-	<!-- /TMPL_LOOP -->
-     </table>
-	 <!-- /TMPL_IF -->
-	 
-<!-- TMPL_IF NAME="3XX" -->
-    <table class="marc">
-	<!-- TMPL_LOOP NAME="3XX" -->
-	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
-	<!-- TMPL_LOOP NAME="subfield" -->
-	<tr>
-         <td>&nbsp;</td>
-	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
-		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
-		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
-<td><!-- TMPL_IF name="link" -->
-						<a href="catalogue-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;zoom=1&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF --></td> 
-       </tr>
-	<!-- /TMPL_LOOP -->
-	<!-- /TMPL_LOOP -->
-     </table>
-	 <!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="4XX" -->
-    <table class="marc">
-	<!-- TMPL_LOOP NAME="4XX" -->
-	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
-	<!-- TMPL_LOOP NAME="subfield" -->
-	<tr>
-         <td>&nbsp;</td>
-	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
-		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
-		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
-<td><!-- TMPL_IF name="link" -->
-						<a href="catalogue-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;zoom=1&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF --></td> 
-	<!-- /TMPL_LOOP -->
-	<!-- /TMPL_LOOP -->
-     </table>
-	 <!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="5XX" -->
-    <table class="marc">
-	<!-- TMPL_LOOP NAME="5XX" -->
-	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
-	<!-- TMPL_LOOP NAME="subfield" -->
-	<tr>
-         <td>&nbsp;</td>
-	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
-		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
-		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
-<td><!-- TMPL_IF name="link" -->
-						<a href="catalogue-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;zoom=1&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF --></td> 
-       </tr>
-	<!-- /TMPL_LOOP -->
-	<!-- /TMPL_LOOP -->
-     </table>
-	 <!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="6XX" -->
-    <table class="marc">
-	<!-- TMPL_LOOP NAME="6XX" -->
-	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
-	<!-- TMPL_LOOP NAME="subfield" -->
-	<tr>
-         <td>&nbsp;</td>
-	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
-		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
-		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
-<td><!-- TMPL_IF name="link" -->
-						<a href="catalogue-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;zoom=1&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF --></td> 
-       </tr>
-	<!-- /TMPL_LOOP -->
-	<!-- /TMPL_LOOP -->
-     </table>
-	 <!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="7XX" -->
-    <table class="marc">
-	<!-- TMPL_LOOP NAME="7XX" -->
-	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
-	<!-- TMPL_LOOP NAME="subfield" -->
-	<tr>
-         <td>&nbsp;</td>
-	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
-		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
-		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
-<td><!-- TMPL_IF name="link" -->
-						<a href="catalogue-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;zoom=1&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF --></td> 
-       </tr>
-	<!-- /TMPL_LOOP -->
-	<!-- /TMPL_LOOP -->
-     </table>
-	 <!-- /TMPL_IF -->
-
-	 
-<!-- TMPL_IF NAME="8XX" -->
-    <table class="marc">
-	<!-- TMPL_LOOP NAME="8XX" -->
-	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
-	<!-- TMPL_LOOP NAME="subfield" -->
-	<tr>
-         <td>&nbsp;</td>
-	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
-		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
-		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
-<td><!-- TMPL_IF name="link" -->
-						<a href="catalogue-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;zoom=1&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF --></td> 
-       </tr>
-	<!-- /TMPL_LOOP -->
-	<!-- /TMPL_LOOP -->
-     </table>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="9XX" -->
-    <table class="marc">
-	<!-- TMPL_LOOP NAME="9XX" -->
-	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
-	<!-- TMPL_LOOP NAME="subfield" -->
-	<tr>
-         <td>&nbsp;</td>
-	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
-		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
-		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
-<td><!-- TMPL_IF name="link" -->
-						<a href="catalogue-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;zoom=1&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF --></td> 
-       </tr>
-	<!-- /TMPL_LOOP -->
-	<!-- /TMPL_LOOP -->
-     </table>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF NAME="item_loop" -->    <table>
-		<tr>
-			<!-- TMPL_LOOP NAME="item_header_loop" --><th><!-- TMPL_VAR NAME="header_value" --></th><!-- /TMPL_LOOP -->
-		</tr>
-		<!-- TMPL_LOOP NAME="item_loop" -->
-			<tr>
-					<!-- TMPL_VAR NAME="item_value" -->
-			</tr>
-		<!-- /TMPL_LOOP -->
-     </table><!-- /TMPL_IF -->
-
-	
-	<script language="JavaScript" type="text/javascript">
-function confirm_deletion() {
-	var is_confirmed = confirm('Are you sure you want to delete this record and all the attached items?');
-	if (is_confirmed) {
-		window.location="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&amp;oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->";
-	}
-}
-function Changefwk(FwkList) {
-  var fwk = FwkList.options[FwkList.selectedIndex].value;
-  window.location = "MARCdetail.pl?biblionumber=<!--TMPL_VAR Name="biblionumber"-->&frameworkcode="+fwk;
-}
-function Addbiblio(op) {
-  var fwk = document.forms['duplicate'].Frameworks.options[document.forms['duplicate'].Frameworks.selectedIndex].value;
-  window.location = "/cgi-bin/koha/cataloguing/addbiblio.pl?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode="+fwk+"&op="+op; 
-}
-</script>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/catalogue/catalogue_search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/catalogue/catalogue_search.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/catalogue/catalogue_search.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/catalogue/catalogue_search.tmpl	27 Sep 2006 21:40:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,243 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Simple Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
-	<h1>Catalogue Search</h1>
-
-<table align ="center" >
-	
-	    <td align ="center">
-	       <input id="searchType1" type="button" value="Zoom Search" onclick="changeSearch1()" <!-- TMPL_IF name="zoom_search" -->style="background-color:orange"<!-- TMPL_ELSE -->style="background-color:yellow"<!-- /TMPL_IF -->>
-		</td>	
-		<td align ="center">
-	       <input id="searchType2" type="button" value="SQL search" onclick="changeSearch2()" <!-- TMPL_IF name="sql_search" -->style="background-color:orange"<!-- TMPL_ELSE -->style="background-color:yellow"<!-- /TMPL_IF --> background-color="orange">
-		</td>
-		<td align ="center">
-	       <input id="searchType3" type="button" value="Brave search" onclick="changeSearch3()" <!-- TMPL_IF name="brave_search" -->style="background-color:orange"<!-- TMPL_ELSE -->style="background-color:yellow"<!-- /TMPL_IF --> background-color="orange">
-		</td>
-	</tr>
-</table>
-
-<form  name="zoom_form" id="zoom_form" action="/cgi-bin/koha/catalogue/catalogue-search.pl" method='post' <!-- TMPL_IF name="zoom_search" -->style="display:inline;"<!-- TMPL_ELSE -->style="display:none;"<!-- /TMPL_IF -->>
-    <input type="hidden" name="op" value="do_search">
-    <input type="hidden" name="search_type" value="zoom">
-    <input type="hidden" name="startfrom" value="0">
-	<input type="hidden" name="zoom" value="1">
-<table style="border:0" align="center"><tbody id="queryarea">
-
-<tr><td ><fieldset><b>Display per page:</b><input type text name="number_of_results" value="10" size="3"/></fieldset></td><td colspan="2"><fieldset><b>Format to display </b>MARC<input type="radio" name="MARC" value="1" checked=1>Brief<input type="radio" name="MARC" value="0"></fieldset></td></tr>
-
-<tr>	<td align="right">Search on:</td><td><select size="1"  name="kohafield" style="width:170px">
-				<!-- TMPL_LOOP name="kohafields" -->
-	                <option value="<!-- TMPL_VAR name="kohafield" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF -->  ><!-- TMPL_VAR name="label" --></option>
-				<!-- /TMPL_LOOP --></select></td><td><input type="text"  size="25" name="value" value="<!-- TMPL_VAR name="value" -->" ></td>
-							<td>With</td><td><Select type="text"  name="relation">
-							<option value=" " <!-- TMPL_IF name="blank" -->selected<!-- /TMPL_IF --> >&nbsp;
-							</option>
-				            			<option value="@attr 5=1 " <!-- TMPL_IF name="@attr 5=1 " -->selected<!-- /TMPL_IF --> >* wildcard anywhere
-							</option>
-							<option value="@attr 5=100 " <!-- TMPL_IF name="@attr 5=100 " -->selected<!-- /TMPL_IF --> >No truncation
-							</option>
-							<option value="@attr 5=102 " <!-- TMPL_IF name="@attr 5=102 " -->selected<!-- /TMPL_IF --> >Mistakes allowed
-							</option>
-							<option value="@attr 5=1 @attr 6=3 " <!-- TMPL_IF name="@attr 5=1 @attr 6=3 " -->selected<!-- /TMPL_IF --> >Starts with
-							</option>
-							<option value="@attr 2=1  " <!-- TMPL_IF name="@attr 2=1 " -->selected<!-- /TMPL_IF --> >Less than
-							</option>
-							<option value="@attr 2=2  " <!-- TMPL_IF name="@attr 2=2 " -->selected<!-- /TMPL_IF --> >Less than & equal
-							</option>
-							<option value="@attr 2=5  " <!-- TMPL_IF name="@attr 2=5 " -->selected<!-- /TMPL_IF --> >Greater than
-							</option>
-							<option value="@attr 2=4  " <!-- TMPL_IF name="@attr 2=4 " -->selected<!-- /TMPL_IF --> >Greater than & equal
-							</option>
-						</select></td></tr>
-		<tr id="andor"><td>		
-					<Select type="text"   name="and_or">
-				            			<option value="@and" <!-- TMPL_IF name="and" -->selected<!-- /TMPL_IF --> >AND
-							</option>
-							<option value="@or" <!-- TMPL_IF name="or" -->selected<!-- /TMPL_IF --> >OR
-							</option>
-							<option value="@not" <!-- TMPL_IF name="not" -->selected<!-- /TMPL_IF --> >NOT
-							</option>
-						</select></td>
-				<td><select size="1"  name="kohafield" id="kohafield" style="width:170px">
-				
-				<!-- TMPL_LOOP name="kohafields" -->
-	               		 <option value="<!-- TMPL_VAR name="kohafield" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF -->  ><!-- TMPL_VAR name="label" --></option>
-				<!-- /TMPL_LOOP --></select></td><td><input type="text"  size="25" name="value" value="<!-- TMPL_VAR name="value" -->" ></td>
-							<td>With</td><td><Select type="text"  name="relation">
-							<option value=" " <!-- TMPL_IF name="blank" -->selected<!-- /TMPL_IF --> >&nbsp;
-							</option>
-				            			<option value="@attr 5=1 " <!-- TMPL_IF name="@attr 5=1 " -->selected<!-- /TMPL_IF --> >* wildcard anywhere
-							</option>
-							<option value="@attr 5=100 " <!-- TMPL_IF name="@attr 5=100 " -->selected<!-- /TMPL_IF --> >No truncation
-							</option>
-							<option value="@attr 5=102 " <!-- TMPL_IF name="@attr 5=102 " -->selected<!-- /TMPL_IF --> >Mistakes allowed
-							</option>
-							<option value="@attr 5=1 @attr 6=3 " <!-- TMPL_IF name="@attr 5=1 @attr 6=3 " -->selected<!-- /TMPL_IF --> >Starts with
-							</option>
-							<option value="@attr 2=1  " <!-- TMPL_IF name="@attr 2=1 " -->selected<!-- /TMPL_IF --> >Less than
-							</option>
-							<option value="@attr 2=2  " <!-- TMPL_IF name="@attr 2=2 " -->selected<!-- /TMPL_IF --> >Less than & equal
-							</option>
-							<option value="@attr 2=5  " <!-- TMPL_IF name="@attr 2=5 " -->selected<!-- /TMPL_IF --> >Greater than
-							</option>
-							<option value="@attr 2=4  " <!-- TMPL_IF name="@attr 2=4 " -->selected<!-- /TMPL_IF --> >Greater than & equal
-							</option>
-						</select></td></tr></tbody>
-	<tr>
-<td ><fieldset>Limit with itemtype: 
-			<input type="hidden" name="kohafield" value="itemtype"/>
-			<input type="hidden" name="and_or" value="@and"/>
-			<select name="value"  style="width:170px">			
-			<option value="">All item types</option>
-		<!-- TMPL_LOOP NAME="itemtypeloop" -->
-			<option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
-		<!-- /TMPL_LOOP -->
-			</select></fieldset>
-</td>
-<td colspan="4">
-	<fieldset>Location:<input type="hidden" name="kohafield" value="holdingbranch"/>
-		<input type="hidden" name="and_or" value="@and"/>
-		<select name="value" id="branchloop" size="1">
-		<option value="">All Branches</option>
-		<!-- TMPL_LOOP NAME="branchloop" -->
-		<option value=<!-- TMPL_VAR NAME="branchcode" --> ><!-- TMPL_VAR NAME="branchname"--></option>
-		<!-- /TMPL_LOOP -->
-		</select>
-		<input type="hidden" name="kohafield" value="date_due"/>
-		<input type="hidden" name="and_or" value="@and"/>
-		<input type="checkbox" id="available-items" name="value" value="0000-00-00"/><label for="available-items">Only items currently available</label></p>
-	</fieldset>
-</td>
-
-</tr>
-<tr>
-			<td colspan="2"><fieldset >Sort on:<select size="1"  name="order" style="width:170px">
-			<option value="">System Ranked</option>	
-			<!-- TMPL_LOOP name="sorts" -->
-	              	  <option value="<!-- TMPL_VAR name="attr" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF -->  ><!-- TMPL_VAR name="label" --></option>
-				<!-- /TMPL_LOOP --></select>
-			<select size="1"  name="asc" style="width:100px">
-				<option value="<i">Ascending</option>
-				<option value=">i">Descending</option>
-				</fieldset></td>
-
-</tr>
-<tr><td colspan=2><input class = "button" type="submit" value="Start search"></td><td><a href="#" onClick="cloneQuery();" title="add another search field">[+]</a></td></tr>
-
-</form>
-<form onSubmit="return checkSQLSearch()" name="precise_form" id="sql_form" action="/cgi-bin/koha/catalogue/catalogue-search.pl" method='post' <!-- TMPL_IF name="sql_search" -->style="display:inline;"<!-- TMPL_ELSE -->style="display:none;"<!-- /TMPL_IF -->>
-
-    <input type="hidden" name = "op" value="do_search">
-    <input type="hidden" name = "search_type" value="sql">
-<input type="hidden" name="zoom" value="0">
-	<table style="border:0" align="center">
-<tr>
-<td><b>Format to display</b></td><td>MARC<input type="radio" name="MARC" value="1" checked=1>Brief<input type="radio" name="MARC" value="0"></td>
-	    <tr>
-			<td>Barcode</td>
-			<td colspan="1"><input type="text"  size="15"   name="barcode" value="<!-- TMPL_VAR name="barcode" -->" onchange="if(this.value != '') {this.form.itemnumber.value = ''; this.form.biblionumber.value = ''}"></td>
-		    <td>Item number</td>
-			<td colspan="1"><input type="text"  size="15"   name="itemnumber" value="<!-- TMPL_VAR name="itemnumber" -->" onchange="if(this.value != '') {this.form.biblionumber.value = ''; this.form.barcode.value = ''} "></td>
-		
-			 <td>Biblio Number</td>
-			<td colspan="1"><input type="text"  size="15"   name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" onchange="if(this.value != '') {this.form.barcode.value = ''; this.form.itemnumber.value = ''} "></td>
-		</tr>
-
-	    <tr>
-			<td colspan = "4" align = "center">
-			    <br>
-				<input class = "button" type="submit" value="Start search">
-	      		</td>
-		</tr>
-
-	</table>
-</form>
-<form onSubmit="return BraveSearch()" name="brave_form" id="brave_form" action="/cgi-bin/koha/catalogue/catalogue-search.pl" method='post' <!-- TMPL_IF name="brave_search" -->style="display:inline;"<!-- TMPL_ELSE -->style="display:none;"<!-- /TMPL_IF -->>
-
-    <input type="hidden" name = "op" value="do_search">
-  <input type="hidden" name="search_type" value="brave">
-<input type="hidden" name="zoom" value="1">
-	<table style="border:0" align="center">
-<tr>
-<td><fieldset><b>Format to display </b>MARC<input type="radio" name="MARC" value="1" checked=1>Brief<input type="radio" name="MARC" value="0"></fieldset></td><td><fieldset><b>Display per page:</b><input type text name="number_of_results" value="10" size="1"/></fieldset></td></tr>
-	    <tr>
-			<td>Query  <textarea name = "value"  id="bravetext" cols="40" rows="5" ></textarea></td>
-			 <td> of type: <select  name = "searchtype" >
-			<option value="pqf">PQF</option>
-			<option value="ccl">CCL</option>
-			<option value="cql">CQL</option>
-			</select>
-			</td>
-		</tr>
-
-	    <tr>
-			<td colspan = "4" align = "center">
-			    <br>
-				<input class = "button" type="submit" value="Start search">
-	      		</td>
-		</tr>
-
-	</table>
-</form>
-</table>	
-<script language="JavaScript" type="text/javascript">
-function hideSearchsTypes() {
-            document.getElementById('zoom_form').style.display = 'none';
-            document.getElementById('sql_form').style.display = 'none';
-	 document.getElementById('brave_form').style.display = 'none';
-          
-		}
-
-		function resetButtonsColors() {
-			document.getElementById('searchType1').style.backgroundColor = 'yellow';
-			document.getElementById('searchType2').style.backgroundColor = 'yellow';
-			document.getElementById('searchType3').style.backgroundColor = 'yellow';
-			
-		}
-
-		function changeSearch1() {
-		    resetButtonsColors();
-		    document.getElementById('searchType1').style.backgroundColor = 'orange';
-		    hideSearchsTypes();
-		    document.getElementById('zoom_form').style.display = 'inline';
-		}
-
-        function changeSearch2() {
-            resetButtonsColors();
-		    document.getElementById('searchType2').style.backgroundColor = 'orange';
-		    hideSearchsTypes();
-		    document.getElementById('sql_form').style.display = 'inline';
-		}
-	 function changeSearch3() {
-            resetButtonsColors();
-		    document.getElementById('searchType3').style.backgroundColor = 'orange';
-		    hideSearchsTypes();
-		    document.getElementById('brave_form').style.display = 'inline';
-		}
-function checkSQLSearch() {
-		if ( (document.sql_form.barcode.value == '') &&
-			(document.sql_form.itemnumber.value == '') && (document.sql_form.biblionumber.value == '') ) {
-			alert("Enter a barcode or itemnumber or biblionumber to start searching.");
-			return false;
-		} else {
-		    return true;
-		}
-	}
-
-function BraveSearch() {
-		if ( document.brave_form.text.value == '')   {
-			alert("Enter some code to start searching.");
-			return false;
-		} else {
-		    return true;
-		}
-	}
-function cloneQuery() {
-var cloneoriginal = document.getElementById('andor');
- var clone = cloneoriginal.cloneNode(true);
-queryarea.appendChild(clone);
-
-}
-</script>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/catalogue/catalogue_searchresults.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/catalogue/catalogue_searchresults.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/catalogue/catalogue_searchresults.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/catalogue/catalogue_searchresults.tmpl	27 Sep 2006 21:40:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,237 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Simple Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!--TMPL_IF NAME="facets_loop"-->
-<!-- TMPL_INCLUDE NAME="intranet-facets.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
-<!--TMPL_ELSE-->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
-<!--/TMPL_IF-->
-<script language="JavaScript" type="text/javascript">
-
-var no_biblios_selected = "Select one or more documents to add to your virtual shelves.";
-var no_shelves_selected = "Select one or more virtual shelves to add the selected documents.";
-
-/*Add the selected biblionumber to the seleted virtual shelves*/
-function addBibliosToShelves(){
-	shelf_frm = document.shelf_form;
-	//check for at least one shelf seleted
-	shelf_sel = false;
-	for (var i=0; i < shelf_frm.shelfnumber.length; i++) {
-		if (shelf_frm.shelfnumber[i].checked) {
-			shelf_sel = true;
-			break;
-		}
-	}
-	if (shelf_sel) {
-	    shelf_frm.biblios.value = '';
-		for (var i=0; i < document.myform.bibid.length; i++) {
-			if (document.myform.bibid[i].checked) {
-				shelf_frm.biblios.value = shelf_frm.biblios.value + document.myform.bibid[i].value + ",";
-			}
-		}
-		if (shelf_frm.biblios.value == '') {
-            alert(no_biblios_selected);
-		} else {
-			shelf_frm.submit();
-		}
-	} else {
-        alert(no_shelves_selected);
-	}
-}
-
-function show_shelfPanel() {
-
-	if (document.getElementById('shelf_panel').style.display == 'block') {
-	    //document.getElementById('shelf_panel').style.visibility = 'hidden';
-	    document.getElementById('shelf_panel').style.display = 'none';
-	} else {
-	    document.getElementById('shelf_panel').style.display = 'block';
-        //document.getElementById('shelf_panel').style.visibility = 'visible';
-	}
-}
-
-</script>
-
-
-
-    <h1>Catalogue search</h1>
-
-
-	<!-- TMPL_LOOP NAME="searchdesc" -->
-    	You searched:
-    	<div style="color:green;">|&nbsp;
-	 <!-- TMPL_VAR name="query" -->&nbsp;|&nbsp;
-		</div>
-	<!-- /TMPL_LOOP -->
-	<!-- TMPL_VAR NAME="numrecords" --> results
-
-<div id="pages" >
-    <!-- Row of numbers corresponding to search result pages -->
-    
-    <!-- TMPL_LOOP NAME="numbers" -->
-		<!-- TMPL_IF NAME="highlight" -->
-		    <span class="current">
-		    <!-- TMPL_VAR NAME="number" -->
-	        </span>
-		<!-- TMPL_ELSE -->
-		    <span class="pages">
-	        <a class="pages"  href="catalogue-search.pl?op=do_search&amp;zoom=1&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="forminputs" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="HTML" --><!-- /TMPL_LOOP -->&amp;pg=<!-- TMPL_VAR NAME="pg" -->&amp;reorder=<!-- TMPL_VAR NAME="reorder" -->"><!-- TMPL_VAR NAME="number" --></a>
-	        </span>
-		<!-- /TMPL_IF -->
-    <!-- /TMPL_LOOP -->
-    
-</div>
-
-<!-- TMPL_IF name="shelvescount" -->
-<table style="border:0">
-	<tr>
-	    <td width="75%"></td>
-		<td>
-			<input type="button" value="Add to my virtual shelves" class="button"
-				    style="border:0px;background-color:#F2F0E9;text-align:left;display:block;"
-					onclick="show_shelfPanel();">
-
-			<div class="shelf_panel" id="shelf_panel" style="display:none;">
-	    		<form name="shelf_form" action="/cgi-bin/koha/bookshelves/add-biblios-to-shelves.pl" method="post">
-        		<input type="checkbox" name="shelfnumber" value="-1" style="display:none;">
-				<input type="hidden" name="biblios" value="">
-				<input type="hidden" name="return_url" value="catalogue-search.pl?op=do_search&amp;zoom=1&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->">
-				<span class="style3">Select one or more documents and the virtual shelves you want to add them.</span>
-				<table style="border:0">
-				<!-- TMPL_LOOP name="shelves" -->
-		    	<tr>
-		        	<td>
-						<input type="checkbox" name="shelfnumber" value="<!-- TMPL_VAR name="shelfnumber" -->">
-					</td>
-		        	<td>
-						<a class="style12" href="/cgi-bin/koha/bookshelves/shelves.pl?op=viewcontent&shelfnumber=<!-- TMPL_VAR name="shelfnumber" -->"><!-- TMPL_VAR name="shelfname" --></a>
-					</td>
-					<td>
-						<!-- TMPL_VAR name="bibliocount" --> documents
-					</td>
-				</tr>
-				<!-- /TMPL_LOOP -->
-				</table>
-				<div align="right" class="style5">
-					<input type="button" onclick="addBibliosToShelves()" value="Add" style="border:0px;background-color:#4898B0;height:20px;" class="button">
-				</div>
-				</form>
-			</div>
-  		</td>
-  	</tr>
-</table>
-<!-- /TMPL_IF -->
-
-<!-- Search Results Table -->
-<!-- TMPL_IF NAME="numrecords" -->
-<form name="myform" action="" style="margin:0px">
-	<br>
-	<table border="0" cellspacing="0" cellpadding="2" width="80%" align="center">
-	<tr bgcolor="#99cccc" background="<!-- TMPL_VAR NAME="themelang" -->/images/background-opac.gif">
-        <th colspan="2"></th>
-		<th align="left"> <a  href="catalogue-search.pl?op=do_search&amp;zoom=1&amp;reorder=title,2<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->">â–¼</a>Title <a  href="catalogue-search.pl?op=do_search&zoom=1<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;reorder=title,1">â–²</a>
-	   </th>
-		<th align="left"> <a  href="catalogue-search.pl?op=do_search&amp;zoom=1<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;reorder=author,2 ">â–¼</a>Author<a  href="catalogue-search.pl?op=do_search&zoom=1<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;reorder=author,1">â–²</a>
-
-		<th>Publisher</th>
-		
-		<th>&copy;</th>
-		<th align="left"> <a  href="catalogue-search.pl?op=do_search&zoom=1<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;reorder=local-number,2 ">â–¼</a>LC <a  href="catalogue-search.pl?op=do_search&zoom=1<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;reorder=local-number,1">â–²</a>
-	<th>Availability</th>
-		<th>&nbsp;</th>
-	</tr>
-
-
-	<!-- Actual Search Results -->
-	    <input type="checkbox" name="bibid" value="0" style="display:none">
-		<!-- TMPL_LOOP NAME="SEARCH_RESULTS" -->
-			<tr <!-- TMPL_IF name="even" -->bgcolor="#ffffcc"<!-- /TMPL_IF -->>
-				<td>
-					<div align="center">
-							<img src='<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif'
-							     width="16" height="16">
-						</div>
-				</td>
-				<td width="10" align="center" valign="middle">
-					<input type="checkbox" name="bibid" value='<!-- TMPL_VAR NAME="biblionumber" -->'>
-				</td>
-				<td >
-					
-					<a class="transparent" href="/cgi-bin/koha/<!--TMPL_VAR NAME="script"-->?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" -->
-					</a>
-					<br>
-					<span style="font-size:90%">
-                    <!-- TMPL_IF NAME="subtitle" --><!-- TMPL_VAR NAME="subtitle" --><br> <!-- /TMPL_IF -->
-					<!-- TMPL_IF NAME="isbn" -->ISBN: <!-- TMPL_VAR NAME="isbn" --> <!-- /TMPL_IF -->
-					</span>
-				</td>
-				<td> <!-- TMPL_IF NAME="author" --> <a class="transparent" href="catalogue-search.pl?op=do_search&zoom=1&kohafield=author&value=<!-- TMPL_VAR NAME="author" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="author" --></a><br><!-- /TMPL_IF -->
-				    <span style="font-size:90%">
-					<!-- TMPL_LOOP NAME="additionalauthors" -->
-					    <a class="transparent" href="catalogue-search.pl?op=do_search&zoom=1&kohafield=author&value=<!-- TMPL_VAR NAME="value" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="value" --></a><br>
-                   				 <!-- /TMPL_LOOP -->
-                    </span>
-				</td>
-                <td ><!-- TMPL_VAR NAME="publishercode" --></a></td>
-				
-				<td align="center" > <!-- TMPL_IF NAME="copyrightdate" --> <!-- TMPL_VAR NAME="copyrightdate" --> <!-- TMPL_ELSE --> - <!-- /TMPL_IF --> </td>
-				<td><!-- TMPL_VAR NAME="classification" --></td>
-				<td align="center">
-                    <!-- TMPL_IF NAME="on-loan-p" --> <!-- TMPL_VAR NAME="on-loan-p" --> - On Loan <br> <!-- /TMPL_IF -->
-					    <!-- TMPL_IF NAME="lost-p" --> <!-- TMPL_VAR NAME="lost-p" --> - Lost <br> <!-- /TMPL_IF -->
-					  <!-- TMPL_IF NAME="withdrawn-p" --> <!-- TMPL_VAR NAME="withdrawn-p" --> -Withdrawn <br> <!-- /TMPL_IF -->
-					  
-					    <!-- TMPL_IF NAME="not-available-p" --> <!-- TMPL_VAR NAME="not-available-p" --> - Not available <br> <!-- /TMPL_IF -->
-							<!-- TMPL_IF name="location-only" -->
-							<!-- TMPL_VAR name="location-only" -->
-						<!-- TMPL_ELSE -->
-							-
-						<!-- /TMPL_IF -->
-				</td>
-				<td align="center">
-					<!-- TMPL_IF NAME="noitems" -->
-								-
-							<!-- TMPL_ELSE -->
-								<!-- TMPL_IF NAME="norequests" -->
-        							 Not reservable
-								<!-- TMPL_ELSE -->
-									<a class="style1"
-									   href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
-          								Reserve
-									</a>
-								<!-- /TMPL_IF -->
-							<!-- /TMPL_IF -->
-				</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-
-
-		
-		</table>
-</form>
-<br>
-<div class="pages">
-    <!-- Row of numbers corresponding to search result pages -->
-
-    <!-- TMPL_LOOP NAME="numbers" -->
-		<!-- TMPL_IF NAME="highlight" -->
-		    <span class="current">
-		    <!-- TMPL_VAR NAME="number" -->
-	        </span>
-		<!-- TMPL_ELSE -->
-		    <span class="pages">
-	        <a class="pages" href="catalogue-search.pl?op=do_search&zoom=1&startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="forminputs" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;pg=<!-- TMPL_VAR NAME="pg" -->&amp;reorder=<!-- TMPL_VAR NAME="reorder" -->"><!-- TMPL_VAR NAME=number --></a>
-	        </span>
-		<!-- /TMPL_IF -->
-    <!-- /TMPL_LOOP -->
-    
-</div>
-<br>
-<div align="center">Results <b><!-- TMPL_VAR NAME="beginning" --></b> - <b><!-- TMPL_VAR NAME="endat" --></b> of <b><!-- TMPL_VAR NAME="numrecords" --></b> records.</div>
-<!-- TMPL_ELSE -->
-	<div align="center">0 records <br></div>
-<!-- /TMPL_IF -->
-
-<div align="center"><a class="transparent" href="catalogue-search.pl">New search</a></div>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/catalogue/detail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/catalogue/detail.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/catalogue/detail.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/catalogue/detail.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,103 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Details for <!-- TMPL_LOOP NAME="BIBLIO_RESULTS" --><!-- TMPL_VAR NAME="title" --><!-- /TMPL_LOOP --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
-<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-<h3 class="title"><!-- TMPL_VAR NAME="title" --> <!-- TMPL_IF NAME="author" -->(<!-- TMPL_VAR NAME="author" -->)<!-- /TMPL_IF --></h3>
-
-	<div class="tabitem">
-<form action="MARCdetail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" /><input type="submit" class="submit" value="View MARC" /></form>
-<form action="moredetail.pl" method="get"><input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" /><input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->" /><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="View Item Details" /></form> 	
-<form action="/cgi-bin/koha/bookshelves/addbookbybiblionumber.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Add to Shelf" onclick="openWindow('/cgi-bin/koha/bookshelves/addbookbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->', 'popped'); return false;" /></form> 
-<form action="detailprint.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Print" onclick="openWindow('detailprint.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->','printview'); return false;" /></form>
-<!-- TMPL_UNLESS NAME="norequests" --> <form action="/cgi-bin/koha/reserve/request.pl" method="get"><input type="hidden" value="<!-- TMPL_VAR name="biblionumber" -->" name="biblionumber" /> <input type="submit" value="Reserves" class="submit" /></form><!-- /TMPL_UNLESS -->
-	 </div>
-<!-- TMPL_IF NAME="isbn" --><div >
-<img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="isbn" -->.01.MZZZZZZZ.jpg" alt="Book Cover Image" />
-</div><!-- /TMPL_IF -->
-<div class="details">
-			
-<ul>
-			<!-- TMPL_IF NAME="subtitle" --><li><b>Subtitle:</b> <!-- TMPL_VAR NAME="subtitle" --></li><!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="author" --><li><b>Author:</b> <a href="catalogue-search.pl?kohafield=author&op=do_search&value=<!--TMPL_VAR NAME="author" ESCAPE=URL>&and_or=@and&order=author,1&zoom=1"><!-- TMPL_VAR NAME="author" --></a></li><!--/TMPL_IF-->
-			<!-- TMPL_IF NAME="additionalauthor" --><li><b>Additional Author:</b> <!-- TMPL_VAR NAME="additionalauthor" --></li><!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="isbn" --><li><strong>ISBN:</strong> <!-- TMPL_VAR NAME="isbn" --></li><!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="classification" --><li><strong>Classification:</strong> <!-- TMPL_VAR NAME="classification" --></li><!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="seriestitle" --><li><b>Series Title:</b> <!-- TMPL_VAR NAME="seriestitle" --><!-- TMPL_IF NAME="volume" --><!-- TMPL_VAR NAME="volume" --><!-- /TMPL_IF --></li><!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="subject" --><li><b>Subject:</b> <!-- TMPL_VAR NAME="subject" --></li><!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="copyrightdate" --><li><b>Copyright:</b> <!-- TMPL_VAR NAME="copyrightdate" --></li><!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="notes" --><li><b>Notes:</b> <!-- TMPL_VAR NAME="notes" --></li><!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="unititle" --><li><b>Unititle:</b> <!-- TMPL_VAR NAME="unititle" --></li><!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="serial" --><li><b>Serial:</b> <!-- TMPL_VAR NAME="serial" --></li><!-- /TMPL_IF --> 
-			<!-- TMPL_IF name="url" --><li><b>URL:</b> <a href="<!-- TMPL_VAR name="url" -->"><!--TMPL_VAR NAME="url" --></a></li><!-- /TMPL_IF -->
-			
-<!-- /TMPL_LOOP -->
-			<!-- TMPL_LOOP NAME="MARCSUBJCTS" --><!-- TMPL_IF NAME="MARCSUBJCT" --><li><b>Subjects:</b><!-- TMPL_VAR NAME="MARCSUBJCT" --><!--/TMPL_IF--><!-- /TMPL_LOOP -->
-			<!-- TMPL_LOOP NAME="MARCURLS" --><!-- TMPL_IF NAME="MARCURL" --><li><b>URLs:</b><!-- TMPL_VAR NAME="MARCURL" --><!--/TMPL_IF--><!-- /TMPL_LOOP -->
-			<!-- TMPL_LOOP NAME="MARCNOTES" --><!-- TMPL_IF NAME="MARCNOTE" --><li><b>Abstract:</b><!-- TMPL_VAR NAME="MARCNOTE" --><!--/TMPL_IF--><!-- /TMPL_LOOP -->
-
-			<li><b>Biblio Record</b> <!-- TMPL_VAR NAME="biblionumber" --></li>
-			<li><b>Total Number of Items:</b> <!-- TMPL_VAR NAME="count" --></li>
-			</ul>
-
-<br clear="both" /></div><div class="tabitem">
-		<form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Edit Record" /></form>
-		<form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="hidden" name="op" value="duplicate" /><input type="submit" class="submit" value="Duplicate Record" /></form>
-		<form action="/cgi-bin/koha/cataloguing/additem.pl" method="get" ><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber"-->" /><input type="submit" class="submit" value="Edit Items" /></form>
-		</div>
-
-
-<div class="table"><table>
-	<tr>
-		<th>Item Type</th>
-		<th>LC Classifiction</th>
-		<th>Location</th>
-		<th>Date Due</th>
-		<th>Last Seen</th>
-		<th>Barcode</th>
-		<th>Volume</th>
-	</tr>
-	
-<!-- TMPL_IF NAME="ITEM_RESULTS" -->
-<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
-		<tr>
-			<td><!-- TMPL_VAR NAME="itemtype" --></td>
-			<td><!-- TMPL_IF NAME="itemcallnumber" --> <!-- TMPL_VAR NAME="itemcallnumber" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="classification" --><!-- /TMPL_IF --></td>
-			<td><!-- TMPL_VAR NAME="branchname" -->-<!-- TMPL_VAR NAME="shelf" --></td>
-			<td><!-- TMPL_VAR NAME="datedue" --></td>
-			<td><!-- TMPL_VAR NAME="datelastseen" --></td>
-			<td><a href="moredetail.pl?type=<!-- TMPL_VAR NAME="type" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;barcode=<!-- TMPL_VAR NAME="barcode" -->"><!-- TMPL_VAR NAME="barcode" --></a></td>
-			 <td><!-- TMPL_IF NAME="volumedesc" --><!-- TMPL_VAR NAME="volumeddesc" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td> 
-		
-		</tr>
-	<!-- /TMPL_LOOP --><!-- TMPL_ELSE --><tr><td colspan="6">This record has no items.</td></tr><!-- /TMPL_IF -->
-	
-</table></div>
-
-<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-<!-- TMPL_IF NAME="abstract -->
-<table>
-<caption>Abstract</caption>
-<tr>
-<td><!-- TMPL_VAR NAME="abstact" --></td>
-</tr>
-</table>
-<!-- /TMPL_IF -->
-<!-- /TMPL_LOOP -->
-
-<!-- TMPL_IF NAME="SITE_RESULTS" -->
-<table>
-<caption>Links to Associated Web Sites</caption>
-<!-- TMPL_LOOP NAME="SITE_RESULTS" -->
-<tr>
-<td><b>Title:</b> <!-- TMPL_VAR name="title" --><br>
-<b>Description:</b> <!-- TMPL_VAR name="description" --><br>
-<b>URL:</b><a href="http://<!-- TMPL_VAR name="url" -->">http://<!--TMPL_VAR name="url"></a><br>
-</td>
-</tr>
-<!-- /TMPL_LOOP -->
-</table>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/catalogue/detailprint.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/catalogue/detailprint.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/catalogue/detailprint.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/catalogue/detailprint.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,43 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Print View for <!-- TMPL_LOOP NAME="BIBLIO_RESULTS" --><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --><!-- /TMPL_LOOP --><!-- TMPL_INCLUDE NAME="doc-head-close-print.inc" -->
-
-<!-- main site -->
-<div id="main">
-<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-	<table class="list">
-	<caption><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></caption>
-	<tr><th>Biblio Record Number: </th><td> <!-- TMPL_VAR NAME="biblionumber" -->	</td></tr>
-<!-- TMPL_IF NAME="author" --><tr><th>Author: </th><td><!-- TMPL_VAR NAME="author" --></td></tr><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="additional" --><tr><th>Additional Author: </th><td><!-- TMPL_VAR NAME="additional" --></td></tr><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
-<!-- TMPL_IF name="publishercode" --><tr><th>Publisher: </th><td><!-- TMPL_VAR NAME="publishercode" --></td></tr><!-- /TMPL_IF -->
-<tr><th>Publication Details: </th><td>			<!-- TMPL_IF name="publicationyear" --><!-- TMPL_VAR NAME="publicationyear" --><!-- /TMPL_IF -->
-			<!-- TMPL_IF name="pages" -->, <!-- /TMPL_IF --><!-- TMPL_VAR name="pages" -->
-			<!-- TMPL_IF name="size" -->, <!-- /TMPL_IF --><!-- TMPL_VAR name="size" --></td></tr>
-			<!-- TMPL_IF name="collection" --><tr><th>Collection:</th><td> <!-- TMPL_VAR NAME="seriestitle" --></td></tr><!-- /TMPL_IF -->
-			<!-- TMPL_IF name="subject" --><tr><th>Subject: </th><td><!-- TMPL_VAR NAME="subject" --></td></tr><!-- /TMPL_IF -->
-			<!-- TMPL_IF name="copyrightdate" --><tr><th>Copyright Date: </th><td> <!-- TMPL_VAR NAME="copyrightdate" --></td></tr><!-- /TMPL_IF -->
-			<!-- TMPL_IF name="notes" --><tr><th>Notes: </th><td><!-- TMPL_VAR NAME="notes" --></td></tr><!-- /TMPL_IF -->
-			<!-- TMPL_IF name="unititle" --><tr><th>Unititle: </th><td><!-- TMPL_VAR NAME="unititle" --></td></tr><!-- /TMPL_IF --> 
-			<!-- TMPL_IF name="dewey" --><tr><th>Dewey: </th><td><!-- TMPL_VAR name="dewey" --></td></tr><!-- /TMPL_IF -->
-			<!-- TMPL_IF name="classification" --><tr><th>Classification: </th><td> <!-- TMPL_VAR name="classification" --></td></tr><!-- /TMPL_IF -->
-			<!-- TMPL_IF name="lccn" --><tr><th>LCCN: </th><td><!-- TMPL_VAR name="lccn" --></td></tr><!-- /TMPL_IF -->
-			<!-- TMPL_IF name="url" --><tr><th>URL: </th><td><a href="<!-- TMPL_VAR name="url" -->"><!-- TMPL_VAR NAME="url" --></a></td></tr><!-- /TMPL_IF -->
-			<!-- TMPL_IF name="ISBN" --><tr><th>ISBN: </th><td><!-- TMPL_VAR NAME="ISBN" --></td></tr><!-- /TMPL_IF -->
-	</table>
-<!-- /TMPL_LOOP -->
-
-<table>
-	<tr><th>Item Type</th><th>Call Number</th><th>Location</th><th>Date Due</th><th>Last Seen</th><th>Barcode</th></tr>
-	<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
-		<tr>
-			<td><!-- TMPL_VAR NAME="description" --></td>
-			<td><!-- TMPL_VAR NAME="classification" --></td>
-			<td><!-- TMPL_VAR NAME="branchname" --><!-- TMPL_IF NAME="bulk" -->, <!-- TMPL_VAR NAME="bulk" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
-			<td><!-- TMPL_VAR NAME="datedue" --></td>
-			<td><!-- TMPL_VAR NAME="datelastseen" --></td>
-			<td><!-- TMPL_VAR NAME="barcode" --></td>
-		</tr>
-	<!-- /TMPL_LOOP -->
-</table>
-
-</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/catalogue/moredetail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/catalogue/moredetail.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/catalogue/moredetail.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/catalogue/moredetail.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,87 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Item Details for <!-- TMPL_LOOP NAME="BIBITEM_DATA" --><!-- TMPL_VAR NAME="title" --><!-- /TMPL_LOOP --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="masthead.inc" -->
-<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
-<div id="main">
-
-<!-- TMPL_LOOP NAME="BIBITEM_DATA" -->
-<!-- TMPL_IF NAME="error" --><div id="error" class="error"><!-- TMPL_VAR NAME="error" -->
-<form class="inline" method="get" action="moredetail.pl">
-<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR name="itemnumber" -->" />
-<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
-<input type="hidden" name="lost" value="<!-- TMPL_VAR name="lost" -->" />
-<input type="hidden" name="withdrawn" value="<!-- TMPL_VAR name="withdrawn" -->" />
-<input type="hidden" name="override" value="yes" />
-<input type="hidden" name="op" value="update" />
-<input type="submit" value="Confirm Change" class="submit" accesskey="y" /></form><form class="inline" method="get" action="moredetail.pl"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="cancel" value="Don't Change" accesskey="n" /></form>
-</div><!--/TMPL_IF-->
-
-<!-- BIBLIO ITEM  -->
-<h1><!-- TMPL_VAR NAME="title" -->
-<!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --></h1>
-<div class="tabitem"><form action="/cgi-bin/koha/reserve/request.pl" method="post"><input type="hidden" value="<!-- TMPL_VAR NAME="biblionumber" -->" name="biblionumber" /><input type="submit" class="submit" value="Reserves" /></form> <form action="detail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="hidden" value="intra" name="type" /><input type="submit" class="submit" value="Return to Brief Display" /></form><form action="MARCdetail.pl" method="get">
-<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
-<input type="submit" class="submit" value="View MARC" /></form></div>
-<div class="data-main"><table>
-	<caption>Bibliographic Details</caption>
-	<!-- TMPL_IF NAME="biblionumber" --><tr><th>Biblionumber:</th><td><!-- TMPL_VAR NAME="biblionumber" --></td></tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="itemtype" --><tr><th>Item Type:</th><td><!-- TMPL_VAR NAME="itemtype" --></td></tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="url" --><tr><th>URL:</th><td><!-- <!-- TMPL_VAR NAME="url" --> --></td></tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="loanlength" --><tr><th>Loan Length:</th><td><!-- TMPL_VAR NAME="loanlength" --> days</td></tr><!-- /TMPL_IF -->
-	<!-- <tr><th>Rental Charge:</th><td><!-- TMPL_VAR NAME="rentalcharge" --></td></tr> -->
-	<!-- TMPL_IF NAME="dewey" --><tr><th>Classification:</th><td><!-- TMPL_VAR NAME="classification" --><!-- TMPL_VAR NAME="subclass" --></td></tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="isbn" --><tr><th>ISBN:</th><td> <!-- TMPL_VAR NAME="isbn" --></td></tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="publishercode" --><tr><th>Publisher:</th><td><!-- TMPL_VAR NAME="publishercode" --></td> </tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="place" --><tr><th>Place:</th><td><!-- TMPL_VAR NAME="place" --></td></tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="publicationyear" --><tr><th>Date:</th><td><!-- TMPL_VAR NAME="publicationyear" --></td></tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="volumedesc" --><tr><th>Volume:</th><td><!-- TMPL_VAR NAME="volumeddesc" --></td></tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="pages" --><tr><th>Pages:</th><td><!-- TMPL_VAR NAME="pages" --></td></tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="illus" --><tr><th>Illus:</th><td><!-- TMPL_VAR NAME="illus" --></td></tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="size" --><tr><th>Size:</th><td><!-- TMPL_VAR NAME="size" --></td></tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="bnotes" --><tr><th>Notes:</th><td><!-- TMPL_VAR NAME="bnotes" --></td></tr><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="count" --><tr><th>No. of Items:</th><td><!-- TMPL_VAR NAME="count" --></td></tr><!-- /TMPL_IF -->
-</table></div>
-
-
-<!-- /TMPL_LOOP -->
-
-<!-- TMPL_LOOP NAME="ITEM_DATA" -->
-<div class="data">
-<table>
-<caption><a name="<!-- TMPL_VAR NAME="barcode" -->" id="<!-- TMPL_VAR NAME="barcode" -->">Barcode: <!-- TMPL_VAR NAME="barcode" --></a></caption>
-<!-- TMPL_IF NAME="homebranch" --><tr><th>Home Branch:</th><td> <!-- TMPL_VAR NAME="homebranch" --></td></tr><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="holdingbranch" --><tr><th>Current Branch:</th><td> <!-- TMPL_VAR NAME="holdingbranch" --></td></tr><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="datelastseen" --><tr><th>Last seen:</th><td> <!-- TMPL_VAR NAME="datelastseen" --></td></tr><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="issue" --><tr><th>Item Status:</th><td> Due <!-- TMPL_VAR NAME="date_due" --> (Issued to <a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="cardnumber" --></a>)</td></tr><!-- TMPL_ELSE --><tr><th>Item Status</th><td>Available</td></tr><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="datelastborrowed" --><tr><th>Last borrowed:</th><td> <!-- TMPL_VAR NAME="datelastborrowed" --></td></tr><!-- /TMPL_IF -->
-<!-- on issue bit -->
-<!-- TMPL_IF NAME="card0" --><tr><th>Last Borrower 1:</th><td> <a href="/cgi-bin/koha/circ/circulation.pl?findborrower=<!-- TMPL_VAR NAME="card0" -->"><!-- TMPL_VAR NAME="card0" --></a></td></tr><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="card1" --><tr><th>Last Borrower 2:</th><td> <a href="/cgi-bin/koha/circ/circulation.pl?findborrower=<!-- TMPL_VAR NAME="card1" -->"><!-- TMPL_VAR NAME="card1" --></a></td></tr><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="replacementprice" --><tr><th>Replacement Price:</th><td> $<!-- TMPL_VAR NAME="replacementprice" --></td></tr><!-- /TMPL_IF -->
-<tr><th>Lost Status:</th><td><!-- TMPL_IF NAME="itemlost" -->Lost<!-- TMPL_ELSE -->Not Lost<!-- /TMPL_IF -->
-<form class="inline" action="moredetail.pl" method="post"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR Name="biblionumber" -->" />
-<input type="hidden" name="op" value="update">
-<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR Name="itemnumber" -->" />
-<!-- TMPL_IF NAME="itemlost" --><input type="hidden" value="0" name="lost" /><!-- TMPL_ELSE --><input type="hidden" value="1" name="lost" /><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="wthdrawn" --><input type="hidden" name="withdrawn" value="1" /><!-- TMPL_ELSE --><input type="hidden" name="withdrawn" value="0" /><!-- /TMPL_IF -->
-<input type="submit" name="submit" class="submit" value="<!-- TMPL_IF NAME="itemlost" -->Make Found<!-- TMPL_ELSE -->Make Lost<!-- /TMPL_IF -->" /></form></td></tr>
-<tr><th>Withdrawn: </th><td><!-- TMPL_IF NAME="wthdrawn" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --> 
-<form class="inline" action="moredetail.pl" method="post"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR Name="biblionumber" -->" />
-<input type="hidden" name="op" value="update">
-<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR Name="itemnumber" -->" />
-<!-- TMPL_IF NAME="itemlost" --><input type="hidden" value="1" name="lost" /><!-- TMPL_ELSE --><input type="hidden" value="0" name="lost" /><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="wthdrawn" --><input type="hidden" name="withdrawn" value="0" /><!-- TMPL_ELSE --><input type="hidden" name="withdrawn" value="1" /><!-- /TMPL_IF -->
-
-<input type="submit" name="submit" class="submit" value="<!-- TMPL_IF NAME="wthdrawn" -->Restore<!-- TMPL_ELSE -->Make Withdrawn<!-- /TMPL_IF -->" /></form></td></tr>
-<!-- TMPL_IF NAME="paidfor" --><tr><th>Paid for:</th><td> <!-- TMPL_VAR NAME="paidfor" --></td></tr><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="itemnotes" --><tr><th>Notes:</th><td> <!-- TMPL_VAR NAME="itemnotes" --></td></tr><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="renewals" --><tr><th>Renewals:</th><td> <!-- TMPL_VAR NAME="renewals" --></td></tr><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="dateaccessioned" --><tr><th>Accession Date:</th><td><!-- TMPL_VAR NAME="dateaccessioned" --> (<a href="/cgi-bin/koha/acqui/acquire.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;invoice=<!-- TMPL_VAR NAME="booksellerinvoicenumber" -->&amp;catview=yes">View Receipt Summary</a>)</td></tr><!-- /TMPL_IF -->
-
-<tr><th>Total Issues:</th><td><!-- TMPL_VAR NAME="issues" --> (<a href="bookcount.pl?&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->">View Circulation History</a>)</td></tr>
-</table></div>
-
-<!-- /TMPL_LOOP -->
-
-
-</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/cataloguing/addbiblio.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/cataloguing/addbiblio.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/cataloguing/addbiblio.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/cataloguing/addbiblio.tmpl	22 Sep 2006 00:11:37 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,420 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Cataloging: <!-- TMPL_IF NAME="oldbiblionumtagfield" -->Edit MARC Record Number <!-- TMPL_VAR name="biblionumber" --><!-- TMPL_ELSE -->Add MARC Record<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!--TMPL_UNLESS NAME="fromserials" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
-<!--/TMPL_UNLESS-->
-
-
-<!-- TMPL_IF name="error" -->
-			<div class="error">
-				<!--TMPL_IF NAME="onloan"-->
-				<ul>
-					<li>Item currenly onloan you can not DELETE!</li>
-					<li><a href="/cgi-bin/koha/mainpage.pl">Return to home page</a></li>
-				</ul>
-				<!--/TMPL_IF-->
-				<!--TMPL_IF NAME="xmlerror"-->
-				<ul>
-					<li>Non UTF-8 characters present or malformed XML</li>
-					<li>Please correct and save.</li>
-				</ul>
-				<!--/TMPL_IF-->
-			</div>
-<!-- /TMPL_IF -->
-<!--TMPL_UNLESS NAME="onloan"-->
-	<form method="post" name="f" id="f" action="addbiblio.pl">
-<h1><!-- TMPL_IF NAME="oldbiblionumtagfield" -->Edit MARC Record Number <!-- TMPL_VAR name="oldbiblionumber" --><!-- TMPL_ELSE -->Add MARC Record<!-- /TMPL_IF --> With Framework : <!--TMPL_VAR Name="framework" --></h1>
-
-<div class="tabitem">
-		<input type="hidden" name="fromserials" value="<!-- TMPL_VAR NAME="fromserials" -->" />
-		<input type="hidden" name="op" value="addbiblio" />
-		<input type="hidden" name="addfield_field" /><input type="hidden" name="duplicateok" value="<!-- TMPL_VAR NAME="duplicateok" -->" />
-		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
-		<input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="oldbiblionumber" -->" />
-		<!-- TMPL_IF name="biblionumber" -->
-			<input type="button" value="Save Bibliographic Record and go to Items" onclick="Check(this.form);" accesskey="w" class="submit" />
-		<!-- TMPL_ELSE -->
-			<!--TMPL_UNLESS NAME="fromserials" -->
-			<input type="button" value="Add Bibliographic Record and go to Items" onclick="Check(this.form);" accesskey="w" class="submit" />
-			<!-- TMPL_ELSE -->
-			<input type="button" value="Add Bibliographic Record" onclick="Check(this.form);" accesskey="w" class="submit" />
-			<!--/TMPL_UNLESS-->
-		<!-- /TMPL_IF -->
-	<input type="button" value="z39.50 Search" class="submit" onclick="PopupZ3950(); return false;" / >
-</div>
-
-<br>
-	<div class="tabs">
-        <!-- TMPL_LOOP name="BIG_LOOP" -->
-            <a href="#" onclick="active(<!-- TMPL_VAR name="number"-->); return false;" id="link<!-- TMPL_VAR name="number"-->"><!-- TMPL_VAR name="number"--></a>
-        <!--  /TMPL_LOOP -->
-	</div>
-
-<! -- RESET PAGINATION -->
-<!-- TMPL_LOOP name="BIG_LOOP" -->
-<!-- hide every tab except the 1st -->
-<!-- TMPL_IF name="number" -->
-    <div name="<!-- TMPL_VAR name="number" -->XX" id="<!-- TMPL_VAR name="number" -->XX" class="tab" style="visibility:hidden">
-<!-- TMPL_ELSE -->
-    <div name="<!-- TMPL_VAR name="number" -->XX" id="<!-- TMPL_VAR name="number" -->XX" class="tab" style="visibility:visible">
-<!-- /TMPL_IF -->
-<!-- TMPL_UNLESS name="number" -->
-    <!-- show duplicate warning on tab 0 only -->
-        <!-- TMPL_IF name="duplicatebiblionumber" -->
-                    <div class="error">
-                        <p>Is this a duplicate of <a href="../catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->" onclick="openWindow('../catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->&popup=1', 'Duplicate_biblio'; return false;)"><!-- TMPL_VAR name="duplicatetitle" --></a>?</p>
-                        <p>You must either :</p>
-                        <ul>
-                            <li>If it <em>is</em> a duplicate, <a href="additem.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->">Edit Items</a> of the existing record.</li>
-                            <li>If not, click to <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" /> <a href="#" onclick="confirmnotdup(); return false;">Confirm it's not a duplicate</a></li>
-                        </ul>
-                    </div>
-        <!-- /TMPL_IF -->
-    <!-- /TMPL_UNLESS -->
-    <!-- TMPL_LOOP NAME="innerloop" -->
-		<div style=";" id="tag<!-- TMPL_VAR name="tag"-->">
-        <!-- TMPL_IF name="tag" -->
-        <p class="MARCtag">
-            <input type="hidden" name="ind_tag" value="<!-- TMPL_VAR NAME="tag" -->">
-            <!-- TMPL_UNLESS name="hide_marc" -->
-                <a title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --></a>
-                <input tabindex="1" onblur="this.style.backgroundColor='#ffffff';" onfocus="this.style.backgroundColor='#ffff00;'" type="text" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> name="indicator" size="2" maxlength="2" value="<!-- TMPL_VAR NAME="indicator" -->"  class="flat"> -
-            <!-- TMPL_ELSE -->
-                <input tabindex="1" type="hidden" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> name="indicator" value="<!-- TMPL_VAR NAME="indicator" -->">
-            <!-- /TMPL_UNLESS -->
-            <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
-            <!-- TMPL_VAR NAME="tag_lib" -->
-            <!-- /TMPL_UNLESS -->
-            <!-- TMPL_IF name="repeatable" --><a href="javascript:AddField('<!-- TMPL_VAR NAME="tag" -->')">+</a><!-- /TMPL_IF -->
-        </p>
-        <!-- /TMPL_IF -->
-        <!-- TMPL_LOOP NAME="subfield_loop" -->
-            <!-- TMPL_IF NAME="visibility" -->
-                <a tabindex="1" style="color: grey; font-size: 80%; cursor: se-resize;" id="label<!-- TMPL_VAR name="index" -->" onclick="unHideSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->','label<!-- TMPL_VAR name="index" -->')">
-                    <!-- TMPL_VAR NAME="subfield" -->
-                </a>
-            <!-- /TMPL_IF -->
-            <div style="<!-- TMPL_VAR NAME='visibility' -->;" id="subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='index' -->">
-                <p>
-                <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
-                    <label <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> class="labelsubfield">
-                <!-- /TMPL_UNLESS -->
-                <!-- TMPL_UNLESS name="hide_marc" -->
-                    <img style="cursor: crosshair; color: grey; font-size: 80%;" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> src="<!-- TMPL_VAR NAME="themelang" -->/images/up.png" onclick="upSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->')"/>
-                        <input title="<!-- TMPL_VAR NAME="marc_lib_plain" -->" style=" <!-- TMPL_IF NAME="fixedfield" -->display:none; <!-- /TMPL_IF -->border:0;" type="text" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->"  value="<!-- TMPL_VAR NAME="subfield" -->" size="1" maxlength="1" class="flat" DISABLE READONLY tabindex=-1 />
-                <!-- TMPL_ELSE -->
-                    <input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="subfield" -->"/>
-                <!-- /TMPL_UNLESS -->
-                <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
-                    <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF -->
-                    <!-- TMPL_VAR NAME="marc_lib" -->
-                    <!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF -->
-                    </label>
-                <!-- /TMPL_UNLESS -->
-                <!-- TMPL_VAR NAME="marc_value" -->
-                <!-- TMPL_IF NAME="repeatable" -->
-                    <a style="cursor: crosshair; color: grey; font-size: 80%;" onclick="cloneSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->')">+</a>
-                <!-- /TMPL_IF -->
-	<input type="hidden" name="tagindex" value="<!-- TMPL_VAR NAME="id" -->"/>
-                <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->"/>
-                <input type="hidden" name="subfieldYYY" value="<!-- TMPL_VAR NAME="subfield" -->" size="2" maxlength="1"/>
-                <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->"/>
-                <input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->"/>
-                </p>
-            </div>
-        <!-- /TMPL_LOOP -->
-        </div>
-    <!-- /TMPL_LOOP -->
-    </div>
-<!-- /TMPL_LOOP -->
-		<div name="hidden" id="hidden" class="tab">
-		<!-- TMPL_LOOP NAME="hidden_loop" -->
-				<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->">
-				<input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="subfield" -->">
-				<input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->">
-				<input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->">
-		<!-- /TMPL_LOOP -->
-		</div>
-		<!-- TMPL_IF name="oldbiblionumtagfield" -->
-			<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="oldbiblionumtagfield" -->">
-			<input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="oldbiblionumtagsubfield" -->">
-			<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="oldbiblionumber" -->">
-			<input type="hidden" name="mandatory" value="0">
-				<input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->">
-		<!-- /TMPL_IF -->
-	</form>
-
-
-
-<script language="JavaScript" type="text/javascript">
-	<!--TMPL_IF name="exit"-->
-
-var	finished=CloseMe(<!--TMPL_VAR NAME="biblionumber"-->,'<!--TMPL_VAR NAME="title"-->');
-
-	<!--/TMPL_IF-->
-
-function loading(){
-	document.getElementById("loading").style.display = "none";
-}
-function _(s) { return s } // dummy function for gettext
-function confirmnotdup(){
-	document.getElementById("confirm_not_duplicate").value = 1;
-	var checkform =	document.getElementById("f");
-	Check(checkform);
-}
-function active(numlayer)
-{
-	for (i=0; i <= 9 ; i++ ) {
-		ong = i+"XX";
-		link = "link"+i;
-		if (numlayer==i) {
-			with(document){
-			if (document.getElementById(ong)){
-				document.getElementById(ong).style.visibility="visible";
-			}
-			if(document.getElementById(link)){
-				document.getElementById(link).style.color="#000066";
-				document.getElementById(link).style.backgroundColor="#FFFFCC";
-			}
-			}
-		} else {
-			with(document){
-			if (document.getElementById(ong)){
-				document.getElementById(ong).style.visibility="hidden";
-			}
-			if (document.getElementById(link)) {
-				document.getElementById(link).style.color="#669999";
-				document.getElementById(link).style.backgroundColor="#D8DEB8";
-			}
-			}
-		}
-	}
-}
-active(0);
-function Check(f) {
-	document.body.style.cursor ="wait";
-	// Scan for nonempty fields
-	var field_is_nonempty_p = new Array();
-	for (i=0 ; i<f.field_value.length ; i++) {
-	    field_is_nonempty_p[f.tag[i].value] = 0;
-	}
-	for (i=0 ; i<f.field_value.length ; i++) {
-	    if (f.field_value[i].value.length != 0) {
-		field_is_nonempty_p[f.tag[i].value] += 1;
-	    }
-	}
-
-	// Scan for missing mandatory subfields
-	var total_missing_mandatory_subfields = 0;
-	var missing_mandatory_subfields = new Array();
-	for (i=0 ; i<f.field_value.length-2 ; i++) {
-		if (f.field_value[i].value.length==0 && f.mandatory[i].value==1) {
-		    // We should not flag an error unless the tag is also
-		    // mandatory, or if something else in the tag is entered
-
-		    if (f.tag_mandatory[i].value == 1 || field_is_nonempty_p[f.tag[i].value]) {
-				f.field_value[i].style.backgroundColor="#FF0000";
-				total_missing_mandatory_subfields++;
-			if (f.field_value[i].parentNode.tagName == "B")
-			{
-				missing_mandatory_subfields.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.parentNode.id.substr(0,1) + ")");
-			}
-			else
-			{
-				missing_mandatory_subfields.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.id.substr(0,1) + ")");
-			}
-
-			}
-		} else {
-			f.field_value[i].style.backgroundColor="#FFFFFF";
-		}
-	}
-
-	// Scan for missing mandatory tags
-	var total_missing_mandatory_tags = 0;
-	var seen_mandatory_tag_p = new Array();
-	var missing_mandatory_tags = new Array();
-	for (i=0 ; i<f.field_value.length ; i++) {
-	    var j = f.tag[i].value;
-	    if (!field_is_nonempty_p[j] && f.tag_mandatory[i].value == 1) {
-		if (seen_mandatory_tag_p[j] != 1) {
-		    seen_mandatory_tag_p[j] = 1;
-		    total_missing_mandatory_tags++;
- 		    if (f.field_value[i].parentNode.tagName == "B")
-		    {
-				missing_mandatory_tags.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.parentNode.id.substr(0,1) + ")");
-		    }
-		    else
-		    {
-				missing_mandatory_tags.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.id.substr(0,1) + ")");
-			}
-		}
-		f.field_value[i].style.backgroundColor="#FFFF00";
-	    }
-	}
-
-	var total_errors = total_missing_mandatory_tags + total_missing_mandatory_subfields;
-	var alertString2;
-	if (total_errors!=0) {
-		alertString2  = _("Form not submitted because of the following problem(s)");
-		alertString2 += "\n------------------------------------------------------------------------------------\n";
-		alertString2 += "\n- "+ total_missing_mandatory_tags +_(" mandatory tags empty");
-		for (i=0; i<missing_mandatory_tags.length; i++)
-		{
-			alertString2 += "\n--->"+ missing_mandatory_tags[i];
-		}
-  		alertString2 += "\n- "+ total_missing_mandatory_subfields +_(" mandatory fields empty (see bold subfields)");
-		for (i=0; i<missing_mandatory_subfields.length; i++)
-		{
-			alertString2 += "\n--->"+ missing_mandatory_subfields[i];
-		}
-		alert(alertString2);
-	} else {
-		document.forms['f'].submit();
-	}
-}
-function Dopop(link,id) {
- var subf=document.getElementsByName('subfield'+id);
-var fields=document.getElementsByName('field_value'+id);
-var defaultvalue="";
-	for (var s=0; s<fields.length; s++){
-		if (subf.item(s).value == 'a'){
-		defaultvalue=fields.item(s).value;
-		}
-	}
-
-	newin=window.open(link+"&result="+defaultvalue,"",'width=550,height=550,toolbar=false,scrollbars=yes');
-
-}
-
-function PopupZ3950() {
-    var strQuery="";
-	var error = 0;
-	for (i=0 ; i<document.forms['f'].field_value.length ; i++) {
-		if (document.forms['f'].tag[i].value == "<!--TMPL_VAR NAME="isbntag"-->"){
-		     if (document.forms['f'].subfieldYYY[i].value =="<!--TMPL_VAR NAME="isbnsub"-->"){
-			if(document.forms['f'].field_value[i].value.length>0) {
-		    	strQuery += "&isbn="+document.forms['f'].field_value[i].value;			
-			} else {
-			error++;
-			}
-		    }
-		}
-		if (document.forms['f'].tag[i].value == "<!--TMPL_VAR NAME="titletag"-->"){
-		    if (document.forms['f'].subfieldYYY[i].value == "<!--TMPL_VAR NAME="titlesub"-->"){
-			if(document.forms['f'].field_value[i].value.length>0) {
-		 	   strQuery += "&title="+document.forms['f'].field_value[i].value;
-			} else {
-			error++;
-			}
-		    }
-		}
-		if (document.forms['f'].tag[i].value == "<!--TMPL_VAR NAME="authortag"-->"){
-		   if (document.forms['f'].subfieldYYY[i].value == "<!--TMPL_VAR NAME="authorsub"-->"){
-			if(document.forms['f'].field_value[i].value.length>0) {
-		  	  strQuery += "&author="+document.forms['f'].field_value[i].value;
-			} else { 
-			error++;
-			}
-		    }
-		}
-		if (document.forms['f'].tag[i].value == "<!--TMPL_VAR NAME="issntag"-->"){
-		     if (document.forms['f'].subfieldYYY[i].value == "<!--TMPL_VAR NAME="issnsub"-->"){
-		             if(document.forms['f'].field_value[i].value.length>0) {
-		   	 strQuery += "&issn="+document.forms['f'].field_value[i].value;
-			} else {
-			error++;
-			}
-		      }
-		}
-	}
-	if(error < 4){
-	newin=window.open("../z3950/search.pl?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"+strQuery,"z3950search",'width=640,height=400,location=yes,toolbar=no,scrollbars=yes');
-	} else {
-		alert("To perform a z39.50 search, you must enter at least one of the following: \n\n ISBN\n ISSN\n Title\n Author\n");
-	}
-}
-
-
-function Changefwk(FwkList) {
-  var fwk = FwkList.options[FwkList.selectedIndex].value;
-  window.location = "addbiblio.pl?oldbiblionumber=<!--TMPL_VAR Name="oldbiblionumber"-->&frameworkcode="+fwk;
-}
-
-
-
-function AddField(field) {
-	document.forms['f'].op.value = "addfield";
-	document.forms['f'].addfield_field.value=field;
-	document.f.submit();
-}
-
-function cloneSubfield(index) {
- var original = document.getElementById(index);
- var clone = original.cloneNode(true);
- clone.setAttribute("id", index + index); 
-// orginput : the value of the original field (in [0] if hide_marc=1, otherwise in [1]
-// image : the up button. don't exist is hide_marc=1
- <!-- TMPL_IF name="hide_marc" -->
-	var orginput = original.getElementsByTagName('input')[0];
- <!-- TMPL_ELSE -->
- 	var orginput = original.getElementsByTagName('input')[1];
-	image = clone.getElementsByTagName('img')[0];
-	image.setAttribute("onclick","upSubfield('" + index + index + "')");
- <!-- /TMPL_IF -->
- trigger = original.getElementsByTagName('a')[0];
- if (trigger) {
-// 	trigger.parentNode.removeChild(trigger);
- }
- clonetrigger = clone.getElementsByTagName('a')[0];
- clonetrigger.setAttribute("onclick","cloneSubfield('" + index + index + "')");
- clone.setAttribute("tabindex","1");
- orginput.value = '';
- original.parentNode.insertBefore( clone, original); 
-}
-
-function upSubfield(index) {
-	try{
-		var line = document.getElementById(index); // get the line where the user has clicked.
-	} catch(e) {
-		return;
-	}
-	var tag = line.parentNode; // get the dad of this line. (should be "<div tag=XXX>")
-	
-	// getting all subfields for this tag
-	var subfields = tag.getElementsByTagName('div');
-	var subfieldsLength = subfields.length;
-	if(subfieldsLength<=1) return; // nothing to do if there is just one subfield.
-	// among all subfields 
-	for(var i=0;i<subfieldsLength;i++){ 
-		if(subfields[i].getAttribute('id') == index){ //looking for the subfield which is clicked :
-			if(i==0){ // if the clicked subfield is on the top
-				tag.appendChild(subfields[0]);
-				return;
-			}else{
-				var lineAbove = subfields[i-1];
-				tag.insertBefore(line,lineAbove);
-				return;
-			}
-		}
-	}
-}
-
-function unHideSubfield(index,labelindex) {
-	subfield = document.getElementById(index);
-	subfield.style.display = 'block';
-	label = document.getElementById(labelindex);
-	label.style.display='none';	
-}
-function CloseMe(biblionumber,title) {
-	var myfield = opener.document.getElementById('biblionumber');
-	 myfield.value = biblionumber;
-	var myfield = opener.document.getElementById('title');
-	 myfield.value = title;
-	self.close();
-return false;
-	}
-</script>
-<!--/TMPL_UNLESS-->
-</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/cataloguing/addbooks.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/cataloguing/addbooks.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/cataloguing/addbooks.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/cataloguing/addbooks.tmpl	11 Sep 2006 17:13:58 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Cataloging Home<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
-	<h1>Catalog Maintenance</h1>
-	<!-- TMPL_IF name="noitemsfound" -->
-		<font color="red" size="4">No items found</font>
-	<!-- /TMPL_IF -->
-	
-	<div class="data">
-		<form action="isbnsearch.pl">
-		<table>
-		<caption>Search Existing Records</caption>
-		<tr><th><label for="title">Title</label></th>
-		<td>		<input type="text" name="title" id="title"size="35" /></td></tr>
-		<tr><th><label for="isbn">ISBN</label></th>
-		<td><input type="text" name="isbn" id="isbn"size="35" /></td></tr>		
-		</table></div>
-				<p><input type="submit" value="Search" class="submit" /></p>
-				<div class="help"><ul class="notes"><li>If the ISBN is found into the database, that record will be retrieved and can be modified.</li>
-	<li>If the ISBN is found in the reservoir, it will be retrieved and a full record added.</li>
-	<li>Otherwise, a record can be added from scratch.</li></ul></div>
-		</form>
-
-		<!-- TMPL_IF name="noitemsfound" -->
-				<form action="addbiblio.pl" method="post">
-		<div class="data"><table>
-		<caption>Create a Blank Bibliographic Record</caption>
-		<tr><th><label for="frameworkcode">Choose a Framework:</label></th><td><select name="frameworkcode" id="frameworkcode">
-						<option value="">Default</option>
-						<!-- TMPL_LOOP NAME="frameworkcodeloop" -->
-							<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="frameworktext" --></option>
-						<!-- /TMPL_LOOP -->
-					</select> <input type="submit" value="Add Record Without Search" class="submit" /></td></tr>
-		</table></div></form>
-			
-		<!-- /TMPL_IF -->
-
-
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/cataloguing/additem.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/cataloguing/additem.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/cataloguing/additem.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/cataloguing/additem.tmpl	22 Sep 2006 00:11:37 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,161 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Cataloging: Items for Bibliographic Record <!-- TMPL_VAR name="biblionumber" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!--TMPL_UNLESS NAME="fromserials"-->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
-<!--/TMPL_UNLESS-->
-<h1>Items for Record <!-- TMPL_VAR name="biblionumber" -->:</h1><h2><!-- TMPL_VAR name="title" -->, <!-- TMPL_VAR name="author" --></h2>
-	
-<!--TMPL_UNLESS NAME="fromserials"-->	
-<div class="tabitem">
-<form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR name="biblionumber" -->"><input type="submit" class="submit" value="Edit Bibliographic Record"></form> <form action="addbiblio.pl" method="get"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="hidden" name="op" value="duplicate" /><input type="submit" class="submit" value="Duplicate this Record" /></form></div> <div class="tabitem"><form action="/cgi-bin/koha/catalogue/detail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->"> <input type="submit" class="submit" value="View in Catalog"></form> <form action="/cgi-bin/koha/catalogue/MARCdetail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->"> <input type="submit" class="submit" value="View MARC in Catalog"></form>  <form action="/cgi-bin/koha/catalogue/ISBDdetail.pl" method="get"><input type="hidden" name="bib" value="<!-- TMPL_VAR name="biblionumber" -->"> <input type="submit" class="submit" value="View ISBD in Catalog"></form></div>
-<!--/TMPL_UNLESS-->
-<!-- TMPL_IF name="book_on_loan" -->
- 	         <div class="error">ERROR: This book is on LOAN DO NOT DELETE!</div>
- 	 <!-- /TMPL_IF -->
-<!-- TMPL_IF name="non_utf8" -->
- 	         <div class="error">ERROR: This record contains non UTF-8 chatacters correct and resave!!</div>
- 	 <!-- /TMPL_IF -->
- <!-- TMPL_IF name="barcode_not_unique" -->
- 	         <div class="error">ERROR: Barcode already exists!</div>
- 	 <!-- /TMPL_IF -->
-<!--TMPL_UNLESS NAME="fromserials"-->
-	<!-- TMPL_IF name="item_loop" -->
-			<div name="10XX" id="10XX">
-			<table class="editing">
-			<caption>Existing Items</caption>
-				<tr>
-					<!-- TMPL_LOOP NAME="item_header_loop" -->
-						<th><!-- TMPL_VAR NAME="header_value" --></th>
-					<!-- /TMPL_LOOP -->
-					<th colspan="2">&nbsp;</th>
-				</tr>
-					<!-- TMPL_LOOP NAME="item_loop" -->
-					<tr>
-						<!-- TMPL_VAR NAME="item_value" -->
-						<td><a href="additem.pl?op=edititem&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->">Edit</a></td>
-						<td><a href="javascript:confirm_deletion(<!-- TMPL_VAR NAME="biblionumber" -->,<!-- TMPL_VAR NAME="itemnumber" -->)">Delete</a></td>
-					</tr>
-					<!-- /TMPL_LOOP -->
-			</table>
-			</div>
-
-	<!-- /TMPL_IF -->
-<!--/TMPL_UNLESS-->
-	<form method="post" action="additem.pl" name="f">
-	<input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->">
-	<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->">	
-	<input type="hidden" name="fromserials" value="<!--TMPL_VAR NAME="fromserials"-->">
-	<input type="hidden" name="serialid" value="<!--TMPL_VAR NAME="serialid"-->">
-	<input type="hidden" name="itemnumber" value="<!--TMPL_VAR NAME="itemnumber"-->">
-	<div class="data">
-	<table>
-		<caption><!-- TMPL_IF name="opisadd" -->Add New Item<!-- TMPL_ELSE -->Update Item<!-- /TMPL_IF --></caption>
-	<!-- TMPL_LOOP NAME="item" -->
-			<tr style="<!-- TMPL_VAR NAME='hidden' -->;">
-					<th><label><!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR NAME="subfield" --> - <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF --><!-- TMPL_VAR NAME="marc_lib" --><!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF --></label></th>
-					<td><!-- TMPL_VAR NAME="marc_value" -->
-					<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->">
-					<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->">
-					<input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->"></td>
-			</tr>		
-<!-- /TMPL_LOOP -->
-		</table>
-	<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->">
-	 <!-- TMPL_IF name="barcode_not_unique" -->
- 	         <div class="error">ERROR: Barcode already exists!</div>
- 	 <!-- /TMPL_IF -->
-	
-	<!-- TMPL_IF name="opisadd" -->
-	<input type="button" value="Add item" onClick="Check(this.form)" accesskey="w" class="submit">
-	<!-- TMPL_ELSE -->
-	<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="itemtagfield" -->">
-	<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="itemtagsubfield" -->">
-	<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="itemnumber" -->">
-	<input type="button" value="Save Changes" onClick="Check(this.form)" accesskey="w" class="submit">
-	<!-- /TMPL_IF -->
-	</form>
-</div>
-
-<script language="JavaScript" type="text/javascript">
-
-	
-	<!--TMPL_IF name="exit"-->
-var	finished=CloseMe(<!--TMPL_VAR NAME="serialid"-->,<!--TMPL_VAR NAME="itemnumber"-->,"<!--TMPL_VAR NAME="holdingbranch"-->");
-	<!--/TMPL_IF-->
-
-function _(s) { return s } // dummy function for gettext
-function active(numlayer)
-{
-	for (i=10; i < 11 ; i++ ) {
-		ong = i+"XX";
-			link = "link"+i;
-		if (numlayer==i) {
-			document.getElementById(ong).style.visibility="visible";
-			document.getElementById(link).style.backgroundColor="#11AA11";
-			document.getElementById(link).style.backgroundImage="url(<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif)";
-		} else {
-			document.getElementById(ong).style.visibility="hidden";
-			document.getElementById(link).style.backgroundColor="#FFFFFF";
-			document.getElementById(link).style.backgroundImage="";
-		}
-	}
-}
-function Check(f) {
-	var total_errors=0;
-//	alert(f.field_value.length);
-	for (i=0 ; i<f.field_value.length ; i++) {
-//	alert (f.field_value[i].value);
-		if (f.field_value[i].value.length==0 && f.mandatory[i].value==1) {
-			document.getElementById("error"+i).style.backgroundColor="#FF0000";
-			total_errors++;
-		} else {
-//			document.getElementById("error"+i).style.backgroundColor="#FFFFFF";
-		}
-	}
-	var alertString2;
-	if (total_errors==0) {
-		document.f.submit();
-	} else {
-		alertString2  = _("Form not submitted because of the following problem(s)");
-		alertString2 += "\n------------------------------------------------------------------------------------\n";
-		alertString2 += "\n- "+ total_errors+_(" mandatory fields empty (see bold subfields)");
-		alert(alertString2);
-	}
-}
-function Dopop(link,i) {
-	defaultvalue=document.forms[0].field_value[i].value;
-	newin=window.open(link+"&result="+defaultvalue,"value builder",'width=500,height=400,toolbar=false,scrollbars=yes');
-}
-function confirm_deletion(biblionumber,itemnumber) {
-	var is_confirmed = confirm(_('Do you confirm item deletion?'));
-	if (is_confirmed) {
-	window.location = "additem.pl?op=delitem&biblionumber="+biblionumber+"&itemnumber="+itemnumber;
-	}
-}
-function CloseMe(serialid,itemnumber,holdingbranch) {
-	if( serialid==000){
-	 itemcount = opener.document.getElementsByName('itemcount');
-	bibliocount=opener.document.getElementsByName('bibliocount');
-	addcount=opener.document.getElementById(<!--TMPL_VAR NAME="biblionumber"-->);
-	      for (var s=0; s<itemcount.length; s++){
-		 if  (bibliocount.item(s).value==<!--TMPL_VAR NAME="biblionumber"-->){
-		 itemcount.item(s).value=itemcount.item(s).value -1;
-			if ( itemcount.item(s).value==0){
-			addcount.style.display= "none";
-			self.close();
-			return false;
-			}
-		}
-	     }
-	return true;
-	}
-	var myfield = opener.document.getElementById('serial'+serialid);
-	 myfield.value = itemnumber;
-	var myfield = opener.document.getElementById('holdingbranch'+serialid);
-	 myfield.value = holdingbranch;
-	self.close();
-return false;
-	}
-</script>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/cataloguing/isbnsearch.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/cataloguing/isbnsearch.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/cataloguing/isbnsearch.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/cataloguing/isbnsearch.tmpl	11 Sep 2006 17:13:58 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,103 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Cataloging: Search Results for <!-- TMPL_IF name="isbn" -->ISBN <!-- TMPL_VAR name="isbn" --><!-- /TMPL_IF --><!-- TMPL_IF name="title" -->title <!-- TMPL_VAR name="title" --><!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
-	<h1 class="acquisition">Search Results</h1>
-	<div id="bloc25">
-		<h2 class="acquisition">Results for <b><!-- TMPL_IF name="isbn" -->ISBN <!-- TMPL_VAR NAME="isbn" --><!-- /TMPL_IF --><!-- TMPL_IF name="title" -->title <!-- TMPL_VAR NAME="title" --><!-- /TMPL_IF --></b></h2>
-		<!-- TMPL_IF name="total" -->
-			<p><!-- TMPL_VAR NAME="grandtotal" --> total results</p>
-			<p>Results <i><!-- TMPL_VAR NAME="showoffset" --></i> to <i><!-- TMPL_VAR NAME="total" --></i> displayed</p>
-		<!-- /TMPL_IF -->
-	</div>
-	<div id="bloc100">
-		<h2 class="acquisition">Exists in Koha</h2>
-		<table>
-			<tr>
-				<th class="acquisition">Title</th>
-				<th class="acquisition">Author</th>
-				<th class="acquisition">copyright</th>
-				<th class="acquisition">LC</th>
-				<th class="acquisition">&nbsp;</th>
-<th class="acquisition">&nbsp;</th>
-<th class="acquisition">&nbsp;</th>
-			</tr>
-			<!-- TMPL_IF name="results_loop" -->
-			<!-- TMPL_LOOP NAME="results_loop" -->
-				<tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
-					<td><!-- TMPL_VAR NAME="title" --></a>
-					<td><!-- TMPL_VAR NAME="author" --></td>
-					<td><!-- TMPL_VAR NAME="copyrightdate" --></td>
-					<td><!-- TMPL_VAR NAME="classification" -->&nbsp;<!-- TMPL_VAR NAME="subclass" --></td>
-					
-					<td><a href="addbiblio.pl?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" class="button acquisition">Edit Book</a></td>
-					<td><a href="additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit Items</a></td>
-						
-						
-						<td><a href="addbiblio.pl?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;op=duplicate">Duplicate</a></td></tr>
-				</tr>
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_ELSE -->
-			<tr><td colspan="4">Nothing found</td></tr>
-			<!-- /TMPL_IF -->
-		</table>
-		<p class="center">
-			<!-- Row of numbers corresponding to search result pages -->
-			<!-- TMPL_IF name="displayprev" -->
-				<a href="isbnsearch.pl?offset=<!-- TMPL_VAR NAME="prevstartfrom" -->&amp;<!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="value" ESCAPE=URL -->">
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border="0">
-				</a>
-			<!-- TMPL_ELSE -->
-				<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/placeholder.gif" border="0">
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP NAME="numbers" -->
-				<!-- TMPL_IF name="highlight" -->
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
-				<!-- TMPL_ELSE -->
-					<a href="isbnsearch.pl?offset=<!-- TMPL_VAR NAME="startfrom" -->&amp;<!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="value" ESCAPE=URL -->">
-						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0">
-					</a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF name="displaynext" -->
-				<a href="isbnsearch.pl?offset=<!-- TMPL_VAR NAME="nextstartfrom" -->&amp;<!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="value" ESCAPE=URL -->">
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0">
-				</a>
-			<!-- TMPL_ELSE -->
-				<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/placeholder.gif" border="0">
-			<!-- /TMPL_IF -->
-		</p>
-		<h2 class="acquisition">Books in breeding farm</h2>
-		<!-- TMPL_IF name="breeding_loop" -->
-			<table>
-				<tr>
-					<th>Title</th>
-					<th>Author</th>
-					<th>ISBN</th>
-					<th>LC</th>
-					<th>coming from</th>
-					<th>&nbsp;</th>
-					
-					<!-- TMPL_LOOP NAME="breeding_loop" -->
-						<tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
-							<td><!-- TMPL_VAR NAME="title" --></a>
-							<td><!-- TMPL_VAR NAME="author" --></td>
-							<td><!-- TMPL_VAR NAME="isbn" --></td>
-							<td><!-- TMPL_VAR NAME="classification" -->&nbsp;<!-- TMPL_VAR NAME="subclass" --></td>
-							<td><!-- TMPL_VAR NAME="file" --></td>
-							<td><a href="addbiblio.pl?breedingid=<!-- TMPL_VAR NAME="id" -->">Add biblio</a></td>
-							
-						</tr>
-					<!-- /TMPL_LOOP -->
-			</table>
-		<!-- TMPL_ELSE -->
-			<p class="center">Nothing found</p>
-		<!-- /TMPL_IF -->
-		<p class="center">
-		
-			<a href="addbiblio.pl" class="button acquisition">Add new record</a>
-		
-		</p>
-	</div>
-	
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/circ/branchreserves.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/circ/branchreserves.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/circ/branchreserves.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/circ/branchreserves.tmpl	6 Jun 2006 12:30:43 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,82 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-circ.inc" -->
-
-<h1>Circulation: Branch Reserves</h1>
-
-<div id="mainbloc">
-	<h1 class="circulation">Reserves of your library the : <!-- TMPL_VAR NAME="show_date" --></h1>
-	<!-- TMPL_IF NAME="messagetransfert" -->
-		<div>
-				<h2>Reserve find for the document(<!-- TMPL_VAR NAME="nextreservtitle" -->)must transfered</h2>
-			<p>This documen is reserved by : <b> <!-- TMPL_VAR NAME="nextreservsurname" --> <!-- TMPL_VAR NAME="nextreservfirstname" --></b> at the library : <b> <!-- TMPL_VAR NAME="branchname" --> </b>, Please put this document in transfer .
-			</p>
-			<form name="cancelReservewithtransfert" action="branchreserves.pl" method="post">
-				<input type="submit" class="button circulation">
-			</form>
-		</div>
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="waiting" -->
-		<div id="bloc25">
-				<h2 class="circulation">This document is in Waiting status</h2>
-			<p>This document (<!-- TMPL_VAR NAME="nextreservtitle" -->) is reserved by <b> : <!-- TMPL_VAR NAME="nextreservsurname" --> <!-- TMPL_VAR NAME="nextreservfirstname" --></b>,
-			Please keep this document for the next reserve .
-			</p>
-			<form name="cancelReservewithwaiting" action="branchreserves.pl" method="post">
-				<input type="submit">
-			</form>
-		</div>
-	<!-- /TMPL_IF -->
-	<!-- TMPL_UNLESS NAME="message" -->
-	<div id="resultlist">
-		<table>
-		<tr>
-			<th class="circulation" colspan="5">Reserves of your library</th>
-		</tr>
-		<tr>
-			<th class="circulation">Available since</th>
-			<th class="circulation">Title</th>
-			<th class="circulation">Borrower</th>
-			<th class="circulation">Localisation</th>
-			<th class="circulation">Action</th>
-		</tr>
-			<!-- TMPL_LOOP NAME="reserveloop" -->
-				<tr <!-- TMPL_IF NAME="messcompa" --> class="problem" <!-- /TMPL_IF -->>
-					<td><p><!-- TMPL_VAR NAME="waitingdate" --></p> <!-- TMPL_IF NAME="messcompa" --> Reserve Over <!-- /TMPL_IF --></td>
-					<td>
-						<p>
-							<a href="/cgi-bin/koha/MARCdetail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>
-							&nbsp; (<b><!-- TMPL_VAR NAME="itemtype" --></b>)
-							<br />Barcode : <!-- TMPL_VAR NAME="barcode" -->
-						</p>
-					</td>
-					<td>
-						<p><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!--TMPL_VAR Name="borrowernum"-->"><!-- TMPL_VAR NAME="borrowername" --> &nbsp; <!-- TMPL_VAR NAME="borrowerfirstname" --></a><br /><!-- TMPL_VAR NAME="borrowerphone" --><br />
-					<!-- TMPL_IF NAME="borrowermail" --><a href="mailto:<!-- TMPL_VAR NAME="email" -->?subject=Reservation: <!-- TMPL_VAR NAME="title" -->">
-		<!-- TMPL_VAR NAME="borrowermail" --></a><!--/TMPL_IF-->
-						</p>
-					</td>
-					<td><p><!-- TMPL_VAR NAME="homebranch" --> <!-- TMPL_VAR NAME="itemcallnumber" --></p></td>
-					<td>
-						<form name="cancelReserve -->" action="branchreserves.pl" method="post">
-							<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernum" -->">
-							<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->">
-							<input type="hidden" name="fbr" value="<!-- TMPL_VAR NAME="holdingbranch" -->">
-							<input type="hidden" name="tbr" value="<!-- TMPL_VAR NAME="homebranch" -->">
-							<input type="submit" 
-								<!-- TMPL_IF NAME="dotransfer" -->
-							value="Cancel reserve and return this document" 
-							<!-- TMPL_ELSE -->
-							value="Cancel reserve" 
-						<!-- /TMPL_IF -->
-						>
-						</form>
-					</td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-	</div>
-	<!-- /TMPL_UNLESS -->
-</div>
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/circ/branchtransfers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/circ/branchtransfers.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/circ/branchtransfers.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/circ/branchtransfers.tmpl	11 Sep 2006 17:41:55 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,138 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation: Transfers<!-- TMPL_INCLUDE NAME="doc-head-circ-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-circ.inc" -->
-<h1>Circulation: Transfers</h1>
-
-<!-- TMPL_IF Name="found" -->
-	<h3 class="alert">Reserve Found</h3>
-		
-	<div class="form">
-		<table>
-		<caption><!-- TMPL_IF Name="reserved" -->Reserve found for <!-- TMPL_VAR Name="name" --> (<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a>).<!-- /TMPL_IF -->
-		<!-- TMPL_IF Name="waiting" -->
-    Item is marked waiting at <!-- TMPL_VAR Name="branchname" --> for <!-- TMPL_VAR Name="name" --> (<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a>).<!-- /TMPL_IF --></caption>
-		<tr><th>
-			<!-- TMPL_IF Name="reserved" -->Set reserve to waiting and transfer book to <b><!-- TMPL_VAR Name="branchname" --> </b>: <!-- /TMPL_IF -->
-			<!-- TMPL_IF Name="waiting" -->Cancel reservation and then attempt transfer: <!-- /TMPL_IF -->
-		</th>
-		<td>
-			<form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
-				<!-- TMPL_LOOP Name="trsfitemloop" -->
-					<input type="hidden" name="bc-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
-					<input type="hidden" name="fb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="frombrcd" -->" />
-					<input type="hidden" name="tb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="tobrcd" -->" />
-				<!-- /TMPL_LOOP -->
-				<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR Name="itemnumber" -->" />
-				<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR Name="bornum" -->" />
-				<!-- TMPL_IF Name="waiting" --><input type="hidden" name="barcode" value="<!-- TMPL_VAR Name="barcode" -->" />
-					<input type="hidden" name="request" value="KillWaiting" />
-					<input type="submit" value="Cancel" class="cancel" />
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF Name="reserved" --><input type="hidden" name="request" value="SetWaiting" />
-					<input type="submit" value="Waiting" class="submit" /><!-- /TMPL_IF -->
-			</form>
-		</td></tr>
-		<!-- TMPL_IF Name="reserved" --><tr><th>Cancel reservation and then attempt transfer:</th>
-			<td>
-			<form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
-
-			<!-- TMPL_LOOP Name="trsfitemloop" -->
-				<input type="hidden" name="bc-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
-				<input type="hidden" name="fb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="frombrcd" -->" />
-				<input type="hidden" name="tb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="tobrcd" -->" />
-			<!-- /TMPL_LOOP -->
-
-			<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR Name="biblionumber" -->" />
-			<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR Name="bornum" -->" />
-			<input type="hidden" name="tobranchcd" value="<!-- TMPL_VAR Name="tobranchcd" -->" />
-			<input type="hidden" name="barcode" value=<!-- TMPL_VAR Name="barcode" --> />
-			<input type="hidden" name="loggedinuser" value=<!-- TMPL_VAR Name="loggedinusername" --> />
-			<input type="hidden" name="request" value="KillReserved" />
-			<input type="submit" class="cancel" value="Cancel" />
-			</form>
-		<!-- /TMPL_IF -->
-		</td></tr>
-		<tr><th>Ignore and return to transfers: </th>
-			<td>
-			<form method="post" name="mainform" id="mainform" action="branchtransfers.pl" />
-			<input type="hidden" name="tobranchcd" value=<!-- TMPL_VAR Name="tobranchcd" --> />
-			<input type="hidden" name="barcode" />
-			<!-- TMPL_LOOP Name="trsfitemloop" -->
-				<input type="hidden" name="bc-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
-				<input type="hidden" name="fb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="frombrcd" -->" />
-				<input type="hidden" name="tb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="tobrcd" -->" />
-			<!-- /TMPL_LOOP -->
-			<input type="submit" value="Ignore" class="submit" />
-			</form>
-			</td>
-		</tr></table></div>
-
-<!-- TMPL_ELSE -->
-	<div class="table"><table>
-	<caption>Messages</caption>
-	<tr><td>
-	<!-- TMPL_IF Name="reqmessage" -->
-		<!-- TMPL_IF Name="cancelled" -->
-			Reserve Cancelled<br>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF Name="setwaiting" -->
-			Item should now be waiting at branch: <!-- TMPL_VAR Name="reqbrchname" --><br>
-		<!-- /TMPL_IF -->
-	<!-- /TMPL_IF -->
-	<!-- TMPL_LOOP Name="errmsgloop" -->
-		<font color='red' size='+2'>
-		<!-- TMPL_IF Name="errbadcode" -->
-			No Item with barcode: <!-- TMPL_VAR Name="msg" -->
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF Name="errispermanent" -->
-			Please return item to home branch: <!-- TMPL_VAR Name="msg" -->
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF Name="errdesteqholding" -->
-			Item is already at destination branch.
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF Name="errwasreturned" -->
-			Item was on loan to <a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a>
-<!-- TMPL_VAR Name="name" --> and has been returned.
-		<!-- /TMPL_IF -->
-		</font>
-		<br />
-	<!-- /TMPL_LOOP -->
-	</td></tr></table></div>
-	<form method="post" name="mainform" id="mainform" action="/cgi-bin/koha/circ/branchtransfers.pl">
-	<h3>Transfer</h3><div class="form">
-	<input type="hidden" name="loggedinuser" value=<!-- TMPL_VAR Name="loggedinusername" --> />
-	<table><tr><th>Destination Branch:</th><td><select name="tobranchcd">
-			<!-- TMPL_LOOP Name="branchoptionloop" -->
-				<option value="<!-- TMPL_VAR Name="code" -->" <!-- TMPL_VAR Name="selected" -->><!-- TMPL_VAR Name="name" --></option>
-			<!-- /TMPL_LOOP -->
-		</select></td></tr>
-<tr><th>Enter Book Barcode</th><td><input name="barcode" size="15" /></td></tr>
-</table>
-	<input type="hidden" name="tobranchcd" value="<!-- TMPL_VAR Name="tobrancd" -->" />
-	<!-- TMPL_LOOP Name="trsfitemloop" -->
-		<input type="hidden" name="bc-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
-		<input type="hidden" name="fb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="frombrcd" -->" />
-		<input type="hidden" name="tb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="tobrcd" -->" />
-	<!-- /TMPL_LOOP -->
-	<input type="submit" class="submit" value="Transfer" />
-
-	<div class="form"><table>
-		<caption>Transfered Items</caption>
-		<tr><th >Bar Code</th><th>Title</th><th>From</th><th>To</th></tr>
-		<!-- TMPL_LOOP Name="trsfitemloop" -->
-			<tr><td align="left" width="20">
-			<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR Name="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR Name="barcode" --></a></td>
-			<td align="center"  width="200"><!-- TMPL_VAR Name="title" --></td>
-			
-		
-			<td align="left"  width="100"><!-- TMPL_VAR Name="frbrname" --></td>
-			<td align="left"  width="100"><!-- TMPL_VAR Name="tobrname" --></td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		</table></div>
-	</div>
-	</form>
-		
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/circ/circulation.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/circ/circulation.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/circ/circulation.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/circ/circulation.tmpl	27 Sep 2006 21:40:47 -0000	1.8
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,283 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation<!-- TMPL_IF Name="borrowernumber" -->: Issuing to <!-- TMPL_VAR name="surname" -->, <!-- TMPL_VAR name="firstname" -->  (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-circ.inc" -->
-<h1>Circulation: Issues  <!-- TMPL_VAR NAME="today" --></h1>
-
-
-	
-<!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
-	
-	
-	<!-- RESULT OF ISSUING REQUEST -->
-	
-		<!-- TMPL_IF NAME="IMPOSSIBLE" -->
-		<div class="error">
-		<h3>Error Issuing:</h3>
-			<ul>
-			<!-- TMPL_IF NAME="INVALID_DATE" -->
-				<li>Invalid date</li>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="TOO_EARLY" -->
-				
-				<li>Too early to renew. <!-- TMPL_VAR NAME="barcode" --> </li>				
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="UNKNOWN_BARCODE" -->
-				
-				<li>Barcode Unkown</li>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="NOT_FOR_LOAN" -->
-				
-				<li>NOT FOR LOAN</li>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="WTHDRAWN" -->
-				<li>Item is cancelled</li>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="GNA" -->
-				<li>Patron's address is in doubt</li>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="CARD_LOST" -->
-				<li>Patron's card is lost</li>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="DEBARRED" -->
-				<li>Patron is debarred</li>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="NO_MORE_RENEWALS" -->
-				<li>No more renewals possible</li>
-			<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="EXPIRED" -->
-				<li>Borrower card expired</li>
-			<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="IN_RESERVE" -->
-				<li>This is a Reserve Section book. Use Reserve issue</li>
-			<!-- /TMPL_IF -->
-			</ul>
-		</div>
-		<!-- TMPL_ELSE -->
-		
-		<!-- TMPL_IF NAME="NEEDSCONFIRMATION" -->
-		
-		<div class="error">
-		<h3>Please Confirm Issue:</h3>
-		
-			<!-- TMPL_IF NAME="DEBT" -->
-				<p>The patron has a debt of <!-- TMPL_VAR name="DEBT" --> YTL</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="RENEW_ISSUE" -->
-				<p>You are trying RE-ISSUE.  USE RENEW</p>
-			<!-- /TMPL_IF -->	
-			<!-- TMPL_IF NAME="SUCCESFUL_RENEW" -->
-				<p>Succesfully renewd items</p>
-			<!-- /TMPL_IF -->	
-			<!-- TMPL_IF NAME="RESERVE_WAITING" -->
-				<p>Item is consigned for <!-- TMPL_VAR NAME="RESERVE_WAITING" --></p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="RESERVED" -->
-				<p>Item is on reserve for <!-- TMPL_VAR NAME="RESERVED" --></p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="ISSUED_TO_ANOTHER" -->
-				<p>Item issued to <!-- TMPL_VAR NAME="ISSUED_TO_ANOTHER" -->. Return and issue?</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="TOO_MANY" -->
-				<p>Too many issues (already issued / max : <!-- TMPL_VAR name="TOO_MANY" -->)</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_UNLESS name="IMPOSSIBLE" -->
-			<div class="action"><form class="inline" method="post" action="/cgi-bin/koha/circ/circulation.pl">
-				<!-- TMPL_IF NAME="RESERVED" -->
-					<p><input type="checkbox" id="cancelreserve" name="cancelreserve" value="1" /><label for="cancelreserve">Cancel Reserve</label></p>
-				<!-- /TMPL_IF -->
-				
-			
-				
-				<!-- TMPL_IF NAME="RESERVE_WAITING" -->
-					<p><input type="checkbox" id="cancelreserve" name="cancelreserve" value="1" /><label for="cancelreserve">Cancel Reserve</label></p>
-				<!-- /TMPL_IF -->
-				<input type="hidden" name="barcode" value="<!-- TMPL_VAR NAME="barcode" -->" />
-				
-		
-				<input type="hidden" name="borrnumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
-				<input type="hidden" name="issueconfirmed" value="1" />
-				<input type="hidden" name="day" value="<!-- TMPL_VAR name="day" -->" />
-				<input type="hidden" name="month" value="<!-- TMPL_VAR name="month" -->" />
-				<input type="hidden" name="year" value="<!-- TMPL_VAR name="year" -->" />
-			 	<!-- TMPL_UNLESS name="RENEW_ISSUE" --><input type="submit" value="Confirm Issue" class="submit" accesskey="y" /></form><form class="inline" method="get" action="/cgi-bin/koha/circ/circulation.pl"><input type="hidden" name="borrnumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /><input type="submit" class="cancel" value="Don't Issue" accesskey="n" /><!--/TMPL_UNLESS--></form></div>
-			</div>
-			<!-- /TMPL_UNLESS -->
-		<!-- /TMPL_IF -->
-		<!-- /TMPL_IF -->
-		
-		<!-- TMPL_IF NAME="issued" -->
-			<div class="error"><p>Item issued</p></div>
-		<!-- /TMPL_IF -->
-	
-	<div class="details">
-	<!-- TMPL_IF NAME="message" -->
-	<div class="details">
-	No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> <a href="/cgi-bin/koha/members/memberentry.pl?actionType=Add">Add a new patron</a>
-	</div>
-	<!-- /TMPL_IF -->
-	
-	<!-- TMPL_IF NAME="CGIselectborrower" -->
-	<form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform">
-		<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
-		<input type="hidden" name="printer" value="<!-- TMPL_VAR NAME="printer" -->" />
-	<label for="borrnumber">Select a borrower: </label>
-		<style type="text/css">
-		option:hover {
-			background-color : #f0f0f0;
-			color : #000099;
-		}
-	</style>
-	<p><!-- TMPL_VAR name="CGIselectborrower" --></p>
-	<p><input type="submit" class="submit" value="Select" /></p>
-	<p>Patron not found? <a href="/cgi-bin/koha/members/memberentry.pl?actionType=Add">Add a new patron</a></p>
-	</form>
-	<!-- TMPL_ELSE -->
-		<!-- TMPL_IF NAME="borrowernumber" -->
-	<div id="notes">                                							
-	<ul>
-	<li><!-- TMPL_VAR NAME="streetaddress" -->, <!-- TMPL_VAR NAME="city" --></li>
-	<!-- TMPL_IF NAME="phone" --><li><!-- TMPL_VAR NAME="phone" --></li><!--/TMPL_IF-->
-	<!-- TMPL_IF NAME="emailaddress" --><li><a href="mailto:<!-- TMPL_VAR NAME="emailaddress" -->"><!-- TMPL_VAR NAME="emailaddress" --></a></li><!-- /TMPL_IF -->
-	<li>Category: <!-- TMPL_VAR name="categorycode" --></li>
-	<li>(<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">details</a> / <a href="/cgi-bin/koha/members/memberentry.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->&amp;modify=edit&amp;destination=circ">edit</a>)</li>
-	</ul>
-	</div><table width= "70%"><tr><td>
-
-	<h3><!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h3>
-	<h4> &nbsp; &nbsp; <!-- TMPL_VAR NAME="issuecount" --> out<!-- TMPL_IF NAME="overduecount" -->, <span class="error"><!-- TMPL_VAR name="overduecount" --> overdue</span><!-- /TMPL_IF --></h4><br clear="right" />
-	</td><td><img src="<!-- TMPL_VAR NAME="borrowerphoto" -->" alt="Photo" hspace="0" vspace="0" border="0" width="100px" heigth="100px" style="clear:both;float:right;position:relative;">
-	</td></tr></table>
-									
-						
-
-
-<!-- TMPL_IF NAME="flagged" -->
-</div><div class="details">
-<ul>
-<!-- TMPL_IF NAME="gna" -->
-<li><span class="error">Address:</span> Patron's address in doubt</li>
-<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="lost" -->
-<li><span class="error">Lost:</span> Patron's card is lost</li>
-<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="dbarred" -->
-<li><span class="error">Debarred:</span> Patron is debarred <form class="inline compact" action="/cgi-bin/koha/members/setdebar.pl" method="post"><input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /><input type="hidden" name="cardnumber" value="<!-- TMPL_VAR NAME="cardnumber" -->" /><input type="hidden" value="circ" name="destination" /><input type="hidden" name="status" value="0" /><input type="submit" class="submit" value="Lift Debarment" /></form></li>
-<!-- /TMPL_IF -->
-<!-- TMPL_IF name="odues" -->	<li><!-- TMPL_IF name="nonreturns" -->
-					<span class="error">Overdues:</span> Patron has <span class="error">ITEMS OVERDUE</span> See highlighted items <a href="#previous">below</a>
-				<!-- /TMPL_IF --></li><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="noissues" -->
-<!-- TMPL_IF NAME="charges" --><li><span class="error">Fines:</span> Patron has <a href="/cgi-bin/koha/members/boraccount.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">outstanding fines</a>. Make <a href="/cgi-bin/koha/members/pay.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">Payment</a></li><!-- /TMPL_IF -->
-<!-- TMPL_ELSE -->
-	<!-- TMPL_IF name="charges" --><li>Fines: Patron has <a href="/cgi-bin/koha/members/boraccount.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">outstanding fines</a>. Make <a href="/cgi-bin/koha/members/pay.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">Payment</a></li><!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-</ul>
-
-<dl>
-		
-<!-- TMPL_IF name="waiting" -->
-		<dt>Reserves waiting:</dt>
-			<dd><ul><!-- TMPL_LOOP name="itemswaiting" -->
-				<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR name="title" --></a> (<!-- TMPL_VAR name="barcode" --> -- <!-- TMPL_VAR name="branchname" -->)</li>
-			<!-- /TMPL_LOOP -->
-			</ul></dd>
-		<!-- /TMPL_IF -->
-
-		<!-- TMPL_IF name="notes" -->
-					<dt>Notes:</dt> <dd class="error"><!-- TMPL_VAR name="notesmsg" --></dd>
-				<!-- /TMPL_IF -->
-</dl>
-<!-- /TMPL_IF -->
-	<!-- TMPL_ELSE -->
-	<!-- No card entered yet -->
-	<form method="post" action="/cgi-bin/koha/circ/circulation.pl" name="mainform" id="mainform">
-<label for="findborrower">Enter borrower card number or partial last name: </label>
-				<input name="findborrower" type="text" size="40" />
-					<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
-					<input type="hidden" name="printer" value="<!-- TMPL_VAR NAME="printer" -->" />
-				<input type="submit" class="submit" value="Submit" />
-				</form>
-		<!-- /TMPL_IF -->
-	<!-- /TMPL_IF -->
-	</div>
-
-<!-- BARCODE ENTRY -->
-
-<!-- TMPL_IF NAME="borrowernumber" -->
-	<div class="details">
-	<form method="post" action="/cgi-bin/koha/circ/circulation.pl" name="mainform">
-<label for="barcode">Enter Item Barcode: </label><input name="barcode" size="14" maxlength="14"class="unfocus" onfocus="this.className='focus'" onblur="this.className='unfocus'" /> <input type="submit" value="Issue" class="submit" /><!-- Display for NPL <input type="hidden" name="day" value="0" /><input type="hidden" name="month" value="0" /><input type="hidden" name="year" value="0" /> /Display for NPL -->
-	<p><input type="hidden" name="day" value="0" /><input type="hidden" name="month" value="0" /><input type="hidden" name="year" value="0" />
-	<!--/TMPL_IF-->		
-		<input type="hidden" name="borrnumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
-		<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
-		<input type="hidden" name="printer" value="<!-- TMPL_VAR NAME="printer" -->" />
-		<input type="hidden" name="print" value="maybe" />
-		<!-- TMPL_IF NAME="CHARGES" -->
-			<input type="hidden" name="charges" value="yes" />
-			<input type="hidden" name="oldamount" value="<!-- TMPL_VAR NAME="amountold" -->" />
-		<!-- /TMPL_IF -->
-		</p>
-	</form>
-	</div>
-
-
-
-
-
-
-<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
-<!-- TMPL_IF NAME="borrowernumber" -->
-<div class="table"><form class="inline" action="/cgi-bin/koha/circ/renewscript.pl" method="post"><input type="hidden" value="circ" name="destination" /><input type="hidden" name="cardnumber" value="<!-- TMPL_VAR NAME="cardnumber" -->" /><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
-	<table>
-		<caption>Issues <span class="print"><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=page">(Print Page)</a> <a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=slip">(Print Slip)</a></span></caption>
-		<tr><th>Format</th>
-			<th>Due Date</th>
-			<th>Title</th>
-			<th>Author</th>
-			<th>Call No</th>
-			<th>Barcode</th>
-			<th>Renew?</th>
-		</tr>
-	<!-- TMPL_IF NAME="todayissues" -->
-		<!-- TMPL_LOOP NAME="todayissues" -->
-		<!-- TMPL_IF NAME="tcolor" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
-			
-			<td><!-- TMPL_VAR NAME="itemtype" --></td>
-			<td><!-- TMPL_VAR NAME="dd" --></td>
-			<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR NAME="title" --></a><br/><i><!-- TMPL_VAR name="itemnotes" --></i></td>
-			<td><!-- TMPL_IF NAME="author" --><!-- TMPL_VAR NAME="author" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="additionalauthor" --><!-- /TMPL_IF --></td>
-			<td><!-- TMPL_VAR NAME="classification" --></td>
-			<td><!-- TMPL_VAR NAME="barcode" --></td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-	
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="previssues" -->
-		<tr><th colspan="7"><a name="previous" id="previous">Previous Issues</a></th></tr>
-		<!-- TMPL_LOOP NAME="previssues" -->
-			<!-- TMPL_IF NAME="tcolor" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
-			
-			<td><!-- TMPL_VAR NAME="itemtype" --></td>
-			<td><!-- TMPL_IF NAME="od" --><span class="error"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="dd" --><!-- TMPL_IF NAME="od" --></span><!-- /TMPL_IF --></td>
-			<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR NAME="title" --></a><br/><i><!-- TMPL_VAR name="itemnotes" --></i></td>
-			<td><!-- TMPL_VAR NAME="author" --></td>
-			<td><!-- TMPL_VAR NAME="classification" --></td>
-			<td><!-- TMPL_VAR NAME="barcode" --></td>
-			<td><input type="checkbox" name="renew_item_<!-- TMPL_VAR NAME="itemnumber" -->" value="y"<!-- TMPL_IF NAME="od" --> checked="checked"<!-- /TMPL_IF --> /></td></tr>
-		<!-- /TMPL_LOOP -->
-	</table>
-	
-	<p><input type="submit" class="submit" value="Renew Checked Items" /></p>
-<!-- /TMPL_IF -->
-</form>
-
-	
-</div>
-
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/circ/currenttransfers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/circ/currenttransfers.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/circ/currenttransfers.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/circ/currenttransfers.tmpl	19 May 2006 17:01:03 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,59 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-circ.inc" -->
-
-<div id="mainbloc">
-	<h1 class="circulation">Transfers in wait for your library the : <!-- TMPL_VAR NAME="show_date" --></h1>
-	<div id="resultlist">
-	<!-- TMPL_LOOP NAME="branchesloop" -->
-		<!-- TMPL_IF NAME="branchcode" -->
-		<table>
-		<tr>
-			<th class="circulation" colspan="5">current transfers from the library : <!-- TMPL_VAR NAME="branchname" --> </th>
-		</tr>
-		<tr>
-			<th class="circulation">Date of transfer</th>
-			<th class="circulation">Title</th>
-			<th class="circulation">Borrower</th>
-			<th class="circulation">Localisation</th>
-			<th class="circulation">Action</th>
-		</tr>
-		<!-- TMPL_LOOP NAME="reserv" -->
-			<tr <!-- TMPL_IF NAME="messcompa" --> class="problem" <!-- /TMPL_IF -->>
-				<td><p><!-- TMPL_VAR NAME="datetransfer" --></p> <!-- TMPL_IF NAME="messcompa" --> check this transfer<!-- /TMPL_IF --></td>
-				<td>
-					<p>
-						<a href="/cgi-bin/koha/catalogue/MARCdetail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>
-						&nbsp; (<b><!-- TMPL_VAR NAME="itemtype" --> </b>)
-						<br />Barcode : <!-- TMPL_VAR NAME="barcode" -->
-					</p>
-				</td>
-				<td>
-				<!-- TMPL_IF NAME="borrowername" -->
-					<p><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!--TMPL_VAR Name="borrowernum"-->"><!-- TMPL_VAR NAME="borrowername" --> &nbsp; <!-- TMPL_VAR NAME="borrowerfirstname" --></a><br /><!-- TMPL_VAR NAME="borrowerphone" --><br />
-				<!-- TMPL_IF NAME="borrowermail" --><a href="mailto:<!-- TMPL_VAR NAME="email" -->?subject=Reservation: <!-- TMPL_VAR NAME="title" -->">
-	<!-- TMPL_VAR NAME="borrowermail" --></a><!--/TMPL_IF-->
-					</p>
-				<!-- TMPL_ELSE -->
-					<P>
-					Transfer without reserv linked
-					</P>
-				<!-- /TMPL_IF -->
-				</td>
-				<td><p><!-- TMPL_VAR NAME="homebranch" --> <!-- TMPL_VAR NAME="itemcallnumber" --></p></td>
-				<td>
-				<form name="dotransfer" action="currenttransfers.pl" method="post">
-						<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->">
-				<input type="submit" value="Cancel this transfer">
-				</form>
-				</td>	
-			</tr>
-		<!-- /TMPL_LOOP -->	
-		</table>
-		<br><br>
-		<!-- /TMPL_IF -->
-	<!-- /TMPL_LOOP -->
-	</div>
-</div>
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/circ/returns.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/circ/returns.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/circ/returns.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/circ/returns.tmpl	27 Sep 2006 21:40:47 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,161 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation: Returns<!-- TMPL_IF Name="returned" -->: <!-- TMPL_VAR Name="itemtitle" --><!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-circ.inc" -->
-<!-- TMPL_IF Name="found" -->
-		<h3 class="alert">Reserve Found<!-- TMPL_IF Name="waiting" --> (item is already <em>consigned</em>) <!-- /TMPL_IF --></h3>
-		<!-- TMPL_IF Name="waiting" -->
-		<div class="items">
-		<table>
-		<caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=<!-- TMPL_VAR NAME="itembiblionumber" -->"><!-- TMPL_VAR Name="itemtitle" --></a></caption>
-		<tr><th>Patron: </th><td>
-			<ul>
-						<li><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a></li>
-			<li><!-- TMPL_VAR Name="borsurname" -->, <!-- TMPL_VAR Name="borfirstname" --> </li>
-			<li><!-- TMPL_VAR Name="borstraddress" --><br />
-			<!-- TMPL_VAR Name="borcity" -->  <!-- TMPL_VAR NAME="borzip" --></li>
-			<li><!-- TMPL_VAR Name="borphone" --></li>
-			
-			</ul></td></tr>
-	<tr><th>Transfer to:</th><td><!-- TMPL_VAR Name="branchname" --></td></tr>
-		</table></div><form method="post" action="returns.pl" name="mainform" id="mainform">
-			<input type="submit" value="Confirm" class="submit" /><!-- TMPL_LOOP Name="inputloop" -->
-				<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
-				<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
-				<input type="hidden" name="bn-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="bornum" -->" />
-			<!-- /TMPL_LOOP -->
-			<input type="hidden" name="barcode" value="0" />
-			</form>
-		
-			
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF Name="diffbranch" -->
-			<h3>Item Consigned:</h3><br>
-    	<div class="item">
-		<table>
-		<caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR Name="itemtitle" --></a></caption>
-		<tr><th>Patron:</th><td><!-- TMPL_VAR Name="name" --></td></tr>
-		</table></div><form method="post" action="returns.pl" name="mainform" id="mainform"><input type="submit" value="OK" />
-			<!-- TMPL_LOOP Name="inputloop" -->
-				<!-- TMPL_UNLESS Name="first" -->
-					<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
-					<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
-					<input type="hidden" name="bn-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="bornum" -->" />
-				<!-- /TMPL_UNLESS -->
-			<!-- /TMPL_LOOP -->
-			<input type="hidden" name="barcode" value="0" />
-			
-			</form>
-		
-
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF Name="reserved" -->
-			<div class="items">
-			<table>
-			<caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=<!-- TMPL_VAR NAME="itembiblionumber" -->"><!-- TMPL_VAR Name="itemtitle" --></a></caption>
-			<tr><th>Patron: </th><td>
-			<ul>
-						<li><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a></li>
-			<li><!-- TMPL_VAR Name="borfirstname" --> <!-- TMPL_VAR Name="borsurname" --></li>
-			<li><!-- TMPL_VAR Name="borstraddress" --><br />
-			<!-- TMPL_VAR Name="borcity" --> <!-- TMPL_VAR NAME="borzip" --></li>
-			<li><!-- TMPL_VAR Name="borphone" --></li>
-			<!-- Display for NPL // <!-- TMPL_IF NAME="boremail" --><li><a href="/intranet-reserve-notify.php?bornum=<!-- TMPL_VAR NAME="bornum" -->&amp;biblionum=<!-- TMPL_VAR NAME="itembiblionumber" -->" onclick="window.open('/intranet-reserve-notify.php?bornum=<!-- TMPL_VAR NAME="bornum" -->&amp;biblionum=<!-- TMPL_VAR NAME="itembiblionumber" -->','notify','width=650,height=450,location=no,menubar=no,toolbar=no,scrollbars=yes'); return false;"><!-- TMPL_VAR Name="boremail" --></a></li><!-- /TMPL_IF --> // Display for NPL -->
-			</ul></td></tr>
-			<tr><th>Transfer to: </th><td><!-- TMPL_VAR Name="branchname" --></td></tr></table>
-			</div> <form method="post" action="returns.pl" name="mainform" id="mainform">
-			<input type="submit" class="submit" value="Confirm" />
-			<!-- TMPL_LOOP Name="inputloop" -->
-				<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
-				<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
-				<input type="hidden" name="bn-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="bornum" -->" />
-			<!-- /TMPL_LOOP -->
-			<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR Name="itemnumber" -->" />
-			<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR Name="bornum" -->" />
-			<input type="hidden" name="resbarcode" value="<!-- TMPL_VAR Name="barcode" -->" /></form>
-		<!-- /TMPL_IF -->
-	
-<!-- TMPL_ELSE -->
-<h1>Circulation: Returns</h1>
-	<div class="details">
-	<form method="post" action="/cgi-bin/koha/circ/returns.pl"  name="mainform" id="mainform">
-			<label for="barcode">Enter Item Barcode</label>
-			<input name="barcode" id="barcode" size="14" maxlength="14" class="unfocus" onfocus="this.className='focus'" onblur="this.className='unfocus'" />
-			<input type="submit" class="submit" value="Submit" />
-			<!-- TMPL_LOOP Name="inputloop" -->
-				<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
-				<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
-				<input type="hidden" name="bn-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="bornum" -->" />
-			<!-- /TMPL_LOOP -->
-		</form><!-- TMPL_IF NAME="errmsgloop" --><!-- TMPL_LOOP Name="errmsgloop" -->
-				<div class="error">
-				<!-- TMPL_IF Name="badbarcode" -->
-					No Item with barcode: <!-- TMPL_VAR Name="msg" -->
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF Name="ispermanent" -->
-					Please return to  <!-- TMPL_VAR Name="msg" -->
-				<!-- /TMPL_IF -->
-				
-				<!-- TMPL_IF Name="reserveissued" -->
-					Issued from RESERVE Section-  Use RESERVE return.
-				<!-- TMPL_ELSE -->
-				<!-- TMPL_IF Name="notissued" -->
-					Not On Issue.
-				<!-- /TMPL_IF --><!-- /TMPL_IF -->
-				<!-- TMPL_IF Name="waslost" -->
-					Item was lost, now found.
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF Name="withdrawn" -->
-					Item Cancelled
-				<!-- /TMPL_IF -->
-				</div>
-			<!-- /TMPL_LOOP --><!-- /TMPL_IF -->
-</div>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF Name="returned" -->
-<div class="table"><table>
-		<tr><th>Item Information</th><th>Patron Information</th></tr>
-		<tr><td><!-- TMPL_VAR Name="itemtitle" -->
-		</td><td><div class="flags">
-<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="ribornum" -->"><!-- TMPL_VAR Name="riborcnum" --></a>
-		<!-- TMPL_VAR Name="riborsurname" -->, <!-- TMPL_VAR Name="ribortitle" --> <!-- TMPL_VAR Name="riborfirstname" -->
-
-<!-- removed: removed-from-returns.tmpl -->
-<!-- TMPL_IF Name="flagset" -->
- (<!-- TMPL_LOOP Name="flagloop" -->
-<span class="error"><!-- TMPL_VAR Name="flag" -->, </span>
-<!-- /TMPL_LOOP -->)<!-- /TMPL_IF --></div>
-</td></tr></table>
-</div>
-<!-- /TMPL_IF -->
-
-
-
-<!-- TMPL_IF Name="riloop" -->
-<div class="table">
-		<table>
-		<caption>Returned Items</caption>
-		<tr><th>Due Date</th><th>Bar Code</th><th>Title</th><th>Author</th><th>Type</th><th>Patron</th></tr>
-		<!-- TMPL_LOOP Name="riloop" -->
-			<tr><td><!-- TMPL_IF Name="duedate" --><!-- TMPL_IF Name="early" --><span class="error"><!-- /TMPL_IF --><!-- TMPL_VAR Name="day" -->/<!-- TMPL_VAR Name="month" -->/<!-- TMPL_VAR Name="year" --><!-- TMPL_IF Name="early" --></span><!-- /TMPL_IF --><!-- TMPL_ELSE -->Not on Issue.<!-- /TMPL_IF --></td>
-			<td>
-			<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR Name="itembiblionumber" -->&type=intra"><!-- TMPL_VAR Name="barcode" --></a></td>
-			<td><!-- TMPL_VAR Name="itemtitle" --></td>
-			<td><!-- TMPL_VAR Name="itemauthor" --></td>
-			<td><!-- TMPL_VAR Name="itemtype" --></td>
-			<td>
-			<!-- TMPL_IF Name="duedate" -->
-				<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="bornum" -->">
-					<!-- TMPL_VAR Name="borcnum" -->
-				</a> <!-- TMPL_VAR Name="borfirstname" --> <!-- TMPL_VAR Name="borsurname" -->
-			<!-- TMPL_ELSE -->
-								<a href="/cgi-bin/koha/moremember.pl?bornum=<!-- TMPL_VAR Name="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a> <!-- TMPL_VAR Name="borfirstname" --> <!-- TMPL_VAR Name="borsurname" -->
-			<!-- /TMPL_IF -->
-			</td></tr>
-		<!-- /TMPL_LOOP -->
-		</table>
-	</div>
-<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/circ/selectbranchprinter.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/circ/selectbranchprinter.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/circ/selectbranchprinter.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/circ/selectbranchprinter.tmpl	22 Jun 2006 08:43:07 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Circulation: Select Your Home Branch<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-circ.inc" -->
-
-
-<h1>Circulation: Select Your Home Branch</h1>
-
-<form method="post" action="/cgi-bin/koha/circ/circulation.pl">
-<!-- TMPL_VAR NAME="branch" -->
-
-<label for="branch">Choose your Branch:</label>
-<!--branchselection-->
-	<select name="branch" id="branch">
-	<!-- TMPL_LOOP Name="branchloop" -->
-		<option value="<!-- TMPL_VAR Name="value" -->"<!-- TMPL_IF Name="selected" --> selected="selected"<!-- /TMPL_IF -->><!-- TMPL_VAR Name="name" --></option>
-	<!-- /TMPL_LOOP -->
-	</select>
-
-
-<label for="printer">Choose a Network Printer:</label>
-<!--printerselection-->
-<select name="printer" id="printer">
-	<!-- TMPL_LOOP Name="printerloop" -->
-		<option value="<!-- TMPL_VAR Name="value" -->"<!-- TMPL_IF Name="selected" --> selected="selected"<!-- /TMPL_IF -->><!-- TMPL_VAR Name="name" -->
-	<!-- /TMPL_LOOP -->
-	</select>
-<input type="hidden" name="setcookies" value="1" />
-<input type="submit" value="Submit" name="changesettings" />
-</form>
-
-
-
-<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/circ/waitingreservestransfers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/circ/waitingreservestransfers.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/circ/waitingreservestransfers.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/circ/waitingreservestransfers.tmpl	6 Jun 2006 12:30:43 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,62 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation
-<!-- TMPL_IF Name="borrowernumber" -->
-: Issuing to <!-- TMPL_VAR name="surname" -->, <!-- TMPL_VAR name="firstname" -->
-(<!-- TMPL_VAR NAME="cardnumber" -->)
-<!-- /TMPL_IF -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-circ.inc" -->
-
-
-<h1>Circulation: Transfers To do</h1>
-
-<div id="mainbloc">
-	<h1>Transfers to do <!-- TMPL_VAR NAME="show_date" --></h1>
-	<div id="resultlist">
-	<!-- TMPL_LOOP NAME="branchesloop" -->
-		<!-- TMPL_IF NAME="branchcode" -->
-		<table>
-		<tr>
-			<th class="circulation" colspan="5">Reserves in wait to the library : <!-- TMPL_VAR NAME="branchname" --> </th>
-		</tr>
-		<tr>
-			<th class="circulation">Date of reserve</th>
-			<th class="circulation">Title</th>
-			<th class="circulation">Borrower</th>
-			<th class="circulation">Localisation</th>
-			<th class="circulation">Action</th>
-		</tr>
-		<!-- TMPL_LOOP NAME="reserv" -->
-			<tr <!-- TMPL_IF NAME="messcompa" --> class="problem" <!-- /TMPL_IF -->>
-				<td><p><!-- TMPL_VAR NAME="reservedate" --></p> <!-- TMPL_IF NAME="messcompa" --> Reserve over <!-- /TMPL_IF --></td>
-				<td>
-					<p>
-						<a href="/cgi-bin/koha/MARCdetail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>
-						&nbsp; (<b><!-- TMPL_VAR NAME="itemtype" --> </b>)
-						<br />Barcode : <!-- TMPL_VAR NAME="barcode" -->
-					</p>
-				</td>
-				<td>
-					<p><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!--TMPL_VAR Name="borrowernum"-->"><!-- TMPL_VAR NAME="borrowername" --> &nbsp; <!-- TMPL_VAR NAME="borrowerfirstname" --></a><br /><!-- TMPL_VAR NAME="borrowerphone" --><br />
-				<!-- TMPL_IF NAME="borrowermail" --><a href="mailto:<!-- TMPL_VAR NAME="email" -->?subject=Reservation: <!-- TMPL_VAR NAME="title" -->">
-	<!-- TMPL_VAR NAME="borrowermail" --></a><!--/TMPL_IF-->
-					</p>
-				</td>
-				<td><p><!-- TMPL_VAR NAME="holdingbranch" --> <!-- TMPL_VAR NAME="itemcallnumber" --></p></td>
-				<td>
-				<form name="dotransfer" action="waitingreservestransfers.pl" method="post">
-						<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->">
-						<input type="hidden" name="fbr" value="<!-- TMPL_VAR NAME="holdingbranch" -->">
-						<input type="hidden" name="tbr" value="<!-- TMPL_VAR NAME="branchcode" -->">
-				<input type="submit" value="Transfer this document">
-				</form>
-				</td>	
-			</tr>
-		<!-- /TMPL_LOOP -->	
-		</table>
-		<br><br>
-		<!-- /TMPL_IF -->
-	<!-- /TMPL_LOOP -->
-	</div>
-</div>
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/acqui/newbiblio.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/acqui/newbiblio.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/acqui/newbiblio.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/acqui/newbiblio.tmpl	4 Aug 2005 21:17:04 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,8 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: Add Bibliographic Record<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-<h1>Add Bibliographic Record</h1>
-
-<p>Sorting Field 1 and Sorting Field 2 may now be related to a list of Authorized Values. All you have to do is define an Asort1 or Asort2 category of authorised values and enter the desired values into these categories. You will then be able to use them through Add/Modify Bibliographic Record page</p>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/aqbookfund.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/aqbookfund.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/aqbookfund.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/aqbookfund.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Book Fund Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-
-<h1>Book Fund Administration</h1>
-
-<p>The first time you access this page, you will be asked to add your first book fund -- thereafter you will also have the option of editing and deleting book funds.</p>
-
-<p>Book Funds may be ignored if you are setting your System Preferences to "simple" acquisitions: the funds are only useful when using "normal" acquisitions.</p>
-
-<p>"Book Funds" are accounts that you establish to keep track of your expenditures for library materials. They may be used for any kind of material, not just books, and should match the lines in your materials budget. For instance, if your library establishes a budget line for books, another for audiovisual materials, a third line for magazines, and a fourth budget line for electronic databases, then you would have four Book Funds.</p>
-
-<p>Each Book Fund has a unique fund code, limited to no more than five characters, that identifies it. You should decide on your fund codes (e.g. something like BOOKS, AV, MAGS, DATA for the four book funds described above) and enter the code in the "Book fund" box, then a full name in the "Name" box.</p>
-
-<p>Once you have set up a fund, you will see a link to a page for setting up the fund budget. Here you will enter the beginning and ending dates of your budget year and the amount of money in that particular budget line. Do not use any kind of currency notation (like "$") or commas when entering the number. (Commas will be converted to decimal points.) NOTE: Your dates will not saved correctly unless you have set your date format in the System Preferences section of the Parameters page -- DO THIS BEFORE setting budgets.)</p>
-
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/auth_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/auth_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/auth_subfields_structure.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/auth_subfields_structure.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Authorities MARC tag structure administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>MARC tag structure administration</h1>
-<p>Koha allows you to specify which MARC tags you want to use and which you want to ignore. When you downloaded and installed Koha, you also got the entire list of MARC21 tags and subfields in current use. Now you need to use the administration page to edit this list and tell Koha which tags you want to use and how you want to use them.</p>
-<p>You can define as the marc tag structure for each biblio framework you have defined</p>
-
-<p>If you are CERTAIN that you will never use a MARC tag, then you can delete it, but since this will not result in any appreciable improvement in performance, it is probably better to leave it. There will be tags you want to add, however. If you are using older MARC tags that are not in the list of tags supplied with Koha, then use the MARC tag structure administration page to add them. Similarly, you will probably need to add the holdings tag you currently use, or at least check the subfield structure of the 852 tag if you use it for holdings.</p>
-
-<p>Editing the SubFields from the MARC tag structure page is very time-consuming, but also very important; be sure to click the subfield link for each tag in your MARC tag structure.</p>
-<p>For each subfield you can set :</p>
-<ul>
-<li>repeatable : wether it can be repeated or not. If it can be repeated, separate the values by a | in the MARC editor when you want to have the subfield twice</li>
-<li>Mandatory : wether the field is mandatory or not. If mandatory, the cataloger can't validate the biblio if the subfield is empty.</li>
-<li>Search also : a list of field that Koha will also search on when the user do a search on the subfield</li>
-<li>Koha link : <b>very important</b>. Koha is multi-MARC compliant. So, it does not know what the 245$a means, neither what 200$f (those 2 fields being both the title in MARC21 and UNIMARC !). So, in this list you can "map" a MARC subfield to it's meaning. Koha constantly maintains consistency between a subfield and it's meaning. When the user want to search on "title", this link is used to find what is searched (245 if you're MARC21, 200 if you're UNIMARC).</li>
-<li>Text for librarian : what appears before the subfield in the librarian interface</li>
-<li>Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead</li>
-<li>Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed. </li>
-<li>hidden : allows you to select possible visibility conditions. Each section OPAC INTRANET or Editor can be set separately:</li>
-<li><b>Is a linking field : Select this if you want to use this field for linking other authorities to this authority. The kohafield should be set to auth_header.linkid in this subfield(preferred) or any other subfield in this field :</b>
-<li>URL : if checked, the subfield is an URL, and can be clicked</li>
-<li>Auth value : means the value is not free, but in the authorised value list of the selected type</li>
-<li>thesaurus : shows the authority type</li>
-<li>plugin : means the value is calculated or managed by a plugin. Plugins can do almost anything. For example, in UNIMARC there are plugins for every 1xx fields that are coded fields. The plugin is a huge help for cataloger ! There are also two plugins (unimarc_plugin_210c and unimarc_plugin_225a that can "magically" find the editor from an ISBN, and the collection list for the editor)</li>
-<li>
-<li><b>An Example MARC21 Subject Headings Authority</b>
-<ul>Use field 035$a for your auth_header.authid and 035$8 for auth_header.authtypecode. Make sure your zebra authorities index these fields</ul>
-<ul>Use field 150 for your subject headings</ul>
-<ul>Use field 750$9 (add subfield if not present) for auth_header.linkid . Select <b>Is a linking field</b>. You may use any subfield for linking as $9 is not hardcoded
-<ul>Make sure you defined these fields using Link MARC-ZEBRA in System Admin as well
-<ul>When you add or modify an authority clicking on ... that will appear next to 750$9 will let you search any authority and link it to this record. You may repeat tag 750 and add as many linkages as you like</u>
-</li>
-</ul>
-
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/authorised_values.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/authorised_values.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/authorised_values.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/authorised_values.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Authorised values management<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>Authorised values management</h1>
-<p>Koha allows you to restrict the values that catalogers can place in some MARC subfields to certain pre-defined "authorised" values. These authorised values are defined here.</p>
-
-<p>For example, if your Koha installation is used by several libraries, and you use MARC21, you might want to restrict the 850a MARC subfield to the instition codes for just those libraries. In that case, you could define a new authorised values category (perhaps called "INST") and enter the institution codes as the authorised values for that category. Once the 850a subfield is linked to the INST authorised values category in your MARC tag structure, catalogers must choose a value from the list you define here, and may not type in any other value.</p>
-<ul>
-<li>HINT : if a subfield is non mandatory, Koha automatically adds an empty value to the authorised value list, that is selected by default. If the subfield is mandatory, no empty value is added (and you should NOT add it in the list, as it's an illegal value !)</li>
-<li>HINT2 : in the MARC editor, the list is ordered by Text, NOT by value. So you can define a default value by putting a space before the value you want to see first. For example, if your list is related to language, you can set "ENG" as authorised value and " English" as text. The space will order "ENG" as first default value, and the space won't be shown (because HTML automatically discard useless spaces). Super hint : you can put a value 1st with N spaces, then another one 2nd with N-1 space,..., a value in Nth position with 1 space. Don't abuse of this feature, it's easier to find a value in an alphabetical order. It should be used only to have a default value</li>
-</ul>
-<p>Koha automatically sets up authorised value categories for your item types and branch codes, and you can link these authorised values to MARC subfields when you set up your MARC tag structure.</p>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/authtypes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/authtypes.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/authtypes.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/authtypes.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Authority types<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-	<h1>Authority types</h1>
-	<p>You can define as many Authority types as you want.</p>
-	<ul>
-		<li>with the MARC structure button, you can define the MARC structure of a given authority type</li>
-		<li>The tag reported must contain a MARC tag number. Every subfield in the selected tag will be copied to the "destination tag" in the biblio. for example, in UNIMARC, the tag 200 ot personal authority will be reported to 600, 700, 701, depending on what is cliqued in the biblio MARC editor.</li>
-		<li>The summary contains an "ISBD" like description to explain how the entry must be shown in the result list. The syntax is : 
-		<ul>
-			<li>[xxxFFFSyyy] where xxx are up to 3 digits BEFORE the field, FFF the field number, S the subfield code, yyy up to 3 digits AFTER the field.</li>
-			<li>things outside [] are kept as is (including HTML)</li>
-			<li>repeatable fields are manages.</li>
-		<ul>
-	</ul>
-	<p>IMPORTANT</p>
-	<p>
-		In the biblio framework, the reported tag <b>MUST</b> contain a $9 subfield, activated in the tab where the tag is, and hidden (hidden maybe omitted, but the field has no reason to appear anywhere). The $9 subfield in the biblio will contain the Authority number (the internal Koha number)
-	</p>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/biblios_framework.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/biblios_framework.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/biblios_framework.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/biblios_framework.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Biblio framework<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-	<h1>Biblio framework</h1>
-	<p>biblio frameworks are used to catalogue your biblios.</p>
-	<p>Unlike Koha 2.0, in this version you can have more than 1 framework to catalogate differently various materials. You can, for example, define 1 framework for monographies, 1 framework for serials, 1 framework for URL...</p>
-	<p>Once a framework type is created, you can clic on "MARC structure" to define the exact MARC structure. The first time, Koha will ask you to select an existing framework to copy into the new one. Thus, you don't have to define all the MARC structure</p>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/branches.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/branches.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/branches.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/branches.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Branches<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<div id="main-compact">
-<h1>Help: Library Branches</h1>
-
-<p>Fill in information about your library service outlets on this page.</p>
-
-<p>Begin by defining your branch categories. If, for example, you have one main library and several branch libraries, you might set up an "M" (Main) category and a "B" (Branch) category, with descriptions "Main Library" and "Branch Library."</p>
-
-<p>Now add the names and addresses, phone numbers, etc of your libraries in the "Branches" section. (All of your libraries should be described here, not just the branch libraries.) Give each library a unique and easily-remembered code (maximum of four characters). This code will be used in Koha's database to identify each library. When libraries are listed in Koha, they will be listed in alphabetical order by code. (Note that until you set your branch the first time you use a computer to circulate items in Koha, the branch will default to the first library in the alphabetical code list -- be careful to set the branch the first time you use Koha or whenever you add a new computer!)</p>
-
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/categorie.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/categorie.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/categorie.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/categorie.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Borrower Categories<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>Borrower Categories</h1>
-
-<p>Here is where you define the types of users of your library and how they will be handled.</p>
-
-<h2>Category Code and Description</h2>
-<p>Start by assigning a Category Code and a Description to each borrower type. The code is limited on no more than two characters and may be anything you choose. Four codes, however, have special meaning for Koha :</p>
-<ul>
-	<li>"I" can be used for institutional members, like other libraries that borrow from you, in which case Koha expects slightly different information about the institution;</li>
-	<li>"A" (Adult) and "W" can be linked as "guarantors" to other borrowers who are their dependents.</li>
-	<li>"C" (Children) is a borrower category that has a "guarantor"</li>
-</ul>
-
-<h2>Enrollment Period</h2>
-<p>Enrollment period is a number indicating how many years a user's enrollment is valid. If you consider enrollments to expire after four years for example (as in a school, perhaps), then set this number to 4. If enrollments never expire, set this to an impossibly high number (99).</p>
-
-<h2>Upper Age Limit and Age Required</h2>
-<p>Upper Age Limit and Age Required set the age parameters for this type of user. If you issue children's cards to users between the ages of 2 and 18, for example, then Age Required would be "2" and Upper Age Limit would be "18." If there is no upper age limit, set this value to 99 (the highest allowed).</p>
-
-<h2>Enrollment Fee and Reserve Fee</h2>
-<p>Enrollment Fee and Reserve Fee (if any) should be entered either as whole numbers or with six decimal places, with no currency notation (e.g. "1.250000" instead of "$1.25").</p>
-
-<h2>Overdue Notice Required</h2>
-<p>Overdue Notice Required lets you bypass generating overdue notices for this user type.</p>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/checkmarc.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/checkmarc.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/checkmarc.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/checkmarc.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- MARC Check<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>MARC Check</h1>
-<p>Once you have completed the process of setting up your MARC tag structure (MarcTagstruct) and checked your MARC to Koha mapping (Koha2MarcLinks), click on this link to activate a small program that checks for major errors in your MARC setup.</p>
-
-<p>This MARC check does not guarantee that you will like the first results of your efforts to set up your MARC displays, etc. -- it simply checks for major errors. You will probably revise your MARC setup several times before you are completely pleased with it. Be sure to run checkmarc after every revision.</p>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/currency.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/currency.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/currency.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/currency.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Currencies administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>Currencies administration</h1>
-<p>Define the currencies you deal with here.</p>
-
-<p>You should at least define your local currency here, giving it a name (like US DOLLAR or EURO) and setting the "rate" at 1. If you do business with vendors who charge in a different currency, enter a name for that currency (e.g. PESO) and set the approximate exchange rate compared to your currency. (Note: names are limited to 10 characters or less.) The exchange rate is used to calculate the remain balances in your materials budgets when you purchase materials using "normal" acquisitions.</p>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/holdings_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/holdings_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/holdings_subfields_structure.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/holdings_subfields_structure.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- MARC tag structure administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>MARC tag structure administration</h1>
-<p>Koha allows you to specify which MARC tags you want to use and which you want to ignore. When you downloaded and installed Koha, you also got the entire list of MARC21 tags and subfields in current use. Now you need to use the administration page to edit this list and tell Koha which tags you want to use and how you want to use them.</p>
-<p>You can define as the marc tag structure for each biblio framework you have defined</p>
-
-<p>If you are CERTAIN that you will never use a MARC tag, then you can delete it, but since this will not result in any appreciable improvement in performance, it is probably better to leave it. There will be tags you want to add, however. If you are using older MARC tags that are not in the list of tags supplied with Koha, then use the MARC tag structure administration page to add them. Similarly, you will probably need to add the holdings tag you currently use, or at least check the subfield structure of the 852 tag if you use it for holdings.</p>
-
-<p>Editing the SubFields from the MARC tag structure page is very time-consuming, but also very important; be sure to click the subfield link for each tag in your MARC tag structure.</p>
-<p>For each subfield you can set :</p>
-<ul>
-<li>repeatable : wether it can be repeated or not. If it can be repeated, separate the values by a | in the MARC editor when you want to have the subfield twice</li>
-<li>Mandatory : wether the field is mandatory or not. If mandatory, the cataloger can't validate the biblio if the subfield is empty.</li>
-<li>Search also : This section is not implemented anymore-- will  be depreceated --- Zebra indexing sets these fields</li>
-<li>Koha link : <b>very important</b>. Koha is multi-MARC compliant. So, it does not know what the 245$a means, neither what 200$f (those 2 fields being both the title in MARC21 and UNIMARC !). So, in this list you can "map" a MARC subfield to it's meaning. Koha constantly maintains consistency between a subfield and it's meaning. When the user want to search on "title", this link is used to find what is searched (245 if you're MARC21, 200 if you're UNIMARC).</li>
-<li>Text for librarian : what appears before the subfield in the librarian interface</li>
-<li>Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead</li>
-<li>Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed. All subfields of a given field must be in the same tab or ignored : 1st it's more logic, 2nd, Koha would be confused to repeat repeatable fields otherwise !!!</li>
-<li>hidden : You can choose whether this field will show in opac, intranet or editor separately. For editor an extra choice is to display the field collapsed.</li>
-
-<li>URL : if checked, the subfield is an URL, and can be clicked</li>
-<li>Auth value : means the value is not free, but in the authorised value list of the selected type</li>
-<li>thesaurus : means that the value is not free, but can be searched in authority/thesaurus of the selected category</li>
-<li>plugin : means the value is calculated or managed by a plugin. Plugins can do almost anything. For example, in UNIMARC there are plugins for every 1xx fields that are coded fields. The plugin is a huge help for cataloger ! There are also two plugins (unimarc_plugin_210c and unimarc_plugin_225a that can "magically" find the editor from an ISBN, and the collection list for the editor)</li>
-<li>link : If you enter a field/subfield here (200b), a little glass appears after the subfield. If the user clic on the glass, a search is done on the DB for the field/subfield with the same value. Can be used for 2 main topic : 
-	<ul>
-		<li>on a field like author (200f in UNIMARC), put 200f here, you will be able to see all biblios with the same author</li>
-		<li>on a field that is a link (4xx) to reach another biblio. For example, put 011a in 464$x, will find the serial that was previously with this issn. With the 4xx pligin, you get a powerful tool to manage biblios connected to biblios</li>
-	</ul>
-</li>
-</ul>
-
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/holdingstagstructure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/holdingstagstructure.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/holdingstagstructure.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/holdingstagstructure.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- MARC tag structure administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>MARC tag structure administration</h1>
-<p>Koha allows you to specify which MARC tags you want to use and which you want to ignore. When you downloaded and installed Koha, you also got the entire list of MARC21 tags and subfields in current use. Now you need to use the administration page to edit this list and tell Koha which tags you want to use and how you want to use them.</p>
-<p>You can define as the marc tag structure for each biblio framework you have defined</p>
-
-<p>If you are CERTAIN that you will never use a MARC tag, then you can delete it, but since this will not result in any appreciable improvement in performance, it is probably better to leave it. There will be tags you want to add, however. If you are using older MARC tags that are not in the list of tags supplied with Koha, then use the MARC tag structure administration page to add them. Similarly, you will probably need to add the holdings tag you currently use, or at least check the subfield structure of the 852 tag if you use it for holdings.</p>
-
-<p>Editing the SubFields from the MARC tag structure page is very time-consuming, but also very important; be sure to click the subfield link for each tag in your MARC tag structure.</p>
-<p>For each subfield you can set :</p>
-<ul>
-<li>repeatable : wether it can be repeated or not. If it can be repeated, separate the values by a | in the MARC editor when you want to have the subfield twice</li>
-<li>Mandatory : wether the field is mandatory or not. If mandatory, the cataloger can't validate the biblio if the subfield is empty.</li>
-<li>Search also : a list of field that Koha will also search on when the user do a search on the subfield</li>
-<li>Koha link : <b>very important</b>. Koha is multi-MARC compliant. So, it does not know what the 245$a means, neither what 200$f (those 2 fields being both the title in MARC21 and UNIMARC !). So, in this list you can "map" a MARC subfield to it's meaning. Koha constantly maintains consistency between a subfield and it's meaning. When the user want to search on "title", this link is used to find what is searched (245 if you're MARC21, 200 if you're UNIMARC).</li>
-<li>Text for librarian : what appears before the subfield in the librarian interface</li>
-<li>Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead</li>
-<li>Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed. All subfields of a given field must be in the same tab or ignored : 1st it's more logic, 2nd, Koha would be confused to repeat repeatable fields otherwise !!!</li>
-<li>hidden : means that the field is managed, but NOT shown in opac. It's usually for internal fields</li>
-<li>URL : if checked, the subfield is an URL, and can be clicked</li>
-<li>Auth value : means the value is not free, but in the authorised value list of the selected type</li>
-<li>thesaurus : means that the value is not free, but can be searched in authority/thesaurus of the selected category</li>
-<li>plugin : means the value is calculated or managed by a plugin. Plugins can do almost anything. For example, in UNIMARC there are plugins for every 1xx fields that are coded fields. The plugin is a huge help for cataloger ! There are also two plugins (unimarc_plugin_210c and unimarc_plugin_225a that can "magically" find the editor from an ISBN, and the collection list for the editor)</li>
-<li>link : useless for instance</li>
-</ul>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/issuingrules.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/issuingrules.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/issuingrules.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/issuingrules.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Issuing rules<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>Issuing rules</h1>
-<p>Issuing rules deals with 2 topics :</p>
-<ul>
-	<li>Issuing length and quantity : they say how many items and how long a borrower category can issue for an itemtype </li>
-	<li>Overdue charges : they are based on the item type and borrower type. These charges are defined on this page.</li>
-</ul>
-<p>Itemtypes and borrower categories must be defined before issuing rules are defined. Your defined items types and borrower categories are then displayed in a grid on this page.</p>
-
-<h2>Issuing length and quantity</h2>
-<p>Each box in the grid contains 2 numbers, separated by commas, defining how many days a given borrower type can issue how many material. For example : 21,5 means the borrower can issue up to 5 books for up to 21 days</p>
-<p>The <b>*</b> have a specific meaning. They mean "any". If you set 21,5 for itemtype=*, borrower category=student, branch=main, then a student can't issue more than 5 items of ANY item type. This "any" box is cumulative with other boxes. It means that 21,5 as itemtype=book, 14,2 as itemtype=CD and 30,6 as itemtype=* (with category=student) means a student can issue up to 5 books, up to 2 CD but a maximum of 6 items (books or CD). In this case the "30 days" in itemtype=* is discarded and the issuing length is calculated on the exact itemtype</p>
-
-<h2>Overdue charges</h2>
-<p>Each box in the grid contains three numbers separated by commas, defining the fine, how many days overdue the item must be before the fine is assessed and a first notice prepared (the "grace period"), and how many days after that the fine is assessed again and a second notice sent. For example, if you charge adults 1 dollar (or euro, or whatever currency) for overdue videos after three days and add another dollar charge after another five days, put "1,3,5" in the box in the grid that aligns with "Adult" and "Video." If you charge adults 25 cents for overdue fiction books after a grace period of seven days and repeat the charge seven days later, then the entry in the corresponding box in the grid would be ".25,7,7". After the first and second notice are given, Koha prepares a "final notice" after the number of days set by the final number in the grid and sets the charge to the maximum, which is 5.</p>
-
-<p>(Note : fines are calculated by the fines2.pl script, located in misc directory. Ask your system administrator to put this script in crontab, after midnight, to have fines calculated every night.)</p>
-
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/itemtypes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/itemtypes.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/itemtypes.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/itemtypes.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Item types management<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>Item types management</h1>
-<p>You can define as many itemtypes as you want.</p>
-
-<p>The item types are the "categories" into which your library items fall. For instance, you probably want to have videocassettes in a different category from non-fiction books, and mysteries in a different category from children's picture books. If you already are using a commercial ILS, you almost certainly already have all of your materials divided up into such categories. Now you need to tell Koha what your categories are.</p>
-
-<p>The itemtype code is limited to four characters. This code is rarely displayed by Koha; instead the description of the type will be what users see.</p>
-
-<p>"Rental charge" is any amount you might charge to users for borrowing items of a certain type (like videos).</p>
-
-<p>"Renewals allowed" says how many times an items of this type may be renewed.</p>
-
-<p>Item types are useful for many things, and <b>very</b> important in controlling how Koha works :</p>
-<ul>
-    <li>Borrowers can search on itemtypes</li>
-    <li>Issuing rules are set for item types (and for borrower types / branches)</li>
-</ul>
-<p>Setting up item types is one of the first things you should do after installing the Koha software.</p>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/koha2marclinks.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/koha2marclinks.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/koha2marclinks.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/koha2marclinks.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Koha 2 MARC links<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>Koha 2 MARC links</h1>
-<p>This page provides a simplified way to map your MARC tags and subfields to the non-MARC Koha database tables <b>for default biblio framework</b>. This can also be done while setting the MARC tag structure, but it is easier to see the relationship between the MARC database and the Koha database here.</p>
-
-<p>The pull-down menu lists all the Koha tables that can receive values from the MARC records. The columns from each table are listed below the pull-down menu.</p>
-
-<p>Do not expect to have every Koha table.column mapped to a MARC subfield. Some (such as biblionumber, biblioitemnumber, and itemnumber) are values generated by Koha and will probably be automatically mapped. Others are flags which are set in the course of normal circulation activities and will contain information that is not part of your MARC record.</p>
-
-<p>This is a one-to-one mapping. In other words, a MARC tag/subfield can be mapped to one, and only one, Koha table.column.</p>
-
-<p>MARC data that is not mapped to a Koha table does not disappear -- it is simply not available for display on circulation screens and on some search results screens.</p>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/marc_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/marc_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/marc_subfields_structure.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/marc_subfields_structure.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,57 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- MARC tag structure administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>MARC tag structure administration</h1>
-<p>Koha allows you to specify which MARC tags you want to use and which you want to ignore. When you downloaded and installed Koha, you also got the entire list of MARC21 tags and subfields in current use. Now you need to use the administration page to edit this list and tell Koha which tags you want to use and how you want to use them.</p>
-<p>You can define as the marc tag structure for each biblio framework you have defined</p>
-
-<p>If you are CERTAIN that you will never use a MARC tag, then you can delete it, but since this will not result in any appreciable improvement in performance, it is probably better to leave it. There will be tags you want to add, however. If you are using older MARC tags that are not in the list of tags supplied with Koha, then use the MARC tag structure administration page to add them. Similarly, you will probably need to add the holdings tag you currently use, or at least check the subfield structure of the 852 tag if you use it for holdings.</p>
-
-<p>Editing the SubFields from the MARC tag structure page is very time-consuming, but also very important; be sure to click the subfield link for each tag in your MARC tag structure.</p>
-<p>For each subfield you can set :</p>
-<ul>
-<li>repeatable : wether it can be repeated or not. If it can be repeated, separate the values by a | in the MARC editor when you want to have the subfield twice</li>
-<li>Mandatory : wether the field is mandatory or not. If mandatory, the cataloger can't validate the biblio if the subfield is empty.</li>
-<li>Search also : a list of field that Koha will also search on when the user do a search on the subfield</li>
-<li>Koha link : <b>very important</b>. Koha is multi-MARC compliant. So, it does not know what the 245$a means, neither what 200$f (those 2 fields being both the title in MARC21 and UNIMARC !). So, in this list you can "map" a MARC subfield to it's meaning. Koha constantly maintains consistency between a subfield and it's meaning. When the user want to search on "title", this link is used to find what is searched (245 if you're MARC21, 200 if you're UNIMARC).</li>
-<li>Text for librarian : what appears before the subfield in the librarian interface</li>
-<li>Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead</li>
-<li>Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed. All subfields of a given field must be in the same tab or ignored : 1st it's more logic, 2nd, Koha would be confused to repeat repeatable fields otherwise !!!</li>
-<li>hidden : allows you to select from 19 possible visibility conditions, 17 of which are implemented. They are the following:</li>
-<code><br />
-( ! means 'not visible' or in the case of Collapsed 'not
-Collapsed')
-<br /><br />
-  -9 => Future use<br/>
-  -8 =>  Flag<br/>
-  -7 =>  OPAC !Intranet !Editor  Collapsed<br/>
-  -6 =>  OPAC  Intranet !Editor !Collapsed<br/>
-  -5 =>  OPAC  Intranet !Editor  Collapsed<br/>
-  -4 =>  OPAC !Intranet !Editor !Collapsed<br/>
-  -3 =>  OPAC !Intranet  Editor  Collapsed<br/>
-  -2 =>  OPAC !Intranet  Editor !Collapsed<br/>
-  -1 =>  OPAC  Intranet  Editor  Collapsed<br/>
-   0 =>  OPAC  Intranet  Editor !Collapsed<br/>
-   1 => !OPAC  Intranet  Editor  Collapsed<br/>
-   2 => !OPAC !Intranet  Editor !Collapsed<br/>
-   3 => !OPAC !Intranet  Editor  Collapsed<br/>
-   4 => !OPAC  Intranet  Editor !Collapsed<br/>
-   5 => !OPAC !Intranet !Editor  Collapsed<br/>
-   6 => !OPAC  Intranet !Editor !Collapsed<br/>
-   7 => !OPAC  Intranet !Editor  Collapsed<br/>
-   8 => !OPAC !Intranet !Editor !Collapsed<br/>
-   9 => Future use<br/>
-</code>
-
-<li>URL : if checked, the subfield is an URL, and can be clicked</li>
-<li>Auth value : means the value is not free, but in the authorised value list of the selected type</li>
-<li>thesaurus : means that the value is not free, but can be searched in authority/thesaurus of the selected category</li>
-<li>plugin : means the value is calculated or managed by a plugin. Plugins can do almost anything. For example, in UNIMARC there are plugins for every 1xx fields that are coded fields. The plugin is a huge help for cataloger ! There are also two plugins (unimarc_plugin_210c and unimarc_plugin_225a that can "magically" find the editor from an ISBN, and the collection list for the editor)</li>
-<li>link : If you enter a field/subfield here (200b), a little glass appears after the subfield. If the user clic on the glass, a search is done on the DB for the field/subfield with the same value. Can be used for 2 main topic : 
-	<ul>
-		<li>on a field like author (200f in UNIMARC), put 200f here, you will be able to see all biblios with the same author</li>
-		<li>on a field that is a link (4xx) to reach another biblio. For example, put 011a in 464$x, will find the serial that was previously with this issn. With the 4xx pligin, you get a powerful tool to manage biblios connected to biblios</li>
-	</ul>
-</li>
-</ul>
-
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/marctagstructure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/marctagstructure.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/marctagstructure.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/marctagstructure.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- MARC tag structure administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>MARC tag structure administration</h1>
-<p>Koha allows you to specify which MARC tags you want to use and which you want to ignore. When you downloaded and installed Koha, you also got the entire list of MARC21 tags and subfields in current use. Now you need to use the administration page to edit this list and tell Koha which tags you want to use and how you want to use them.</p>
-<p>You can define as the marc tag structure for each biblio framework you have defined</p>
-
-<p>If you are CERTAIN that you will never use a MARC tag, then you can delete it, but since this will not result in any appreciable improvement in performance, it is probably better to leave it. There will be tags you want to add, however. If you are using older MARC tags that are not in the list of tags supplied with Koha, then use the MARC tag structure administration page to add them. Similarly, you will probably need to add the holdings tag you currently use, or at least check the subfield structure of the 852 tag if you use it for holdings.</p>
-
-<p>Editing the SubFields from the MARC tag structure page is very time-consuming, but also very important; be sure to click the subfield link for each tag in your MARC tag structure.</p>
-<p>For each subfield you can set :</p>
-<ul>
-<li>repeatable : wether it can be repeated or not. If it can be repeated, separate the values by a | in the MARC editor when you want to have the subfield twice</li>
-<li>Mandatory : wether the field is mandatory or not. If mandatory, the cataloger can't validate the biblio if the subfield is empty.</li>
-<li>Search also : a list of field that Koha will also search on when the user do a search on the subfield</li>
-<li>Koha link : <b>very important</b>. Koha is multi-MARC compliant. So, it does not know what the 245$a means, neither what 200$f (those 2 fields being both the title in MARC21 and UNIMARC !). So, in this list you can "map" a MARC subfield to it's meaning. Koha constantly maintains consistency between a subfield and it's meaning. When the user want to search on "title", this link is used to find what is searched (245 if you're MARC21, 200 if you're UNIMARC).</li>
-<li>Text for librarian : what appears before the subfield in the librarian interface</li>
-<li>Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead</li>
-<li>Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed. All subfields of a given field must be in the same tab or ignored : 1st it's more logic, 2nd, Koha would be confused to repeat repeatable fields otherwise !!!</li>
-<li>hidden : means that the field is managed, but NOT shown in opac. It's usually for internal fields</li>
-<li>URL : if checked, the subfield is an URL, and can be clicked</li>
-<li>Auth value : means the value is not free, but in the authorised value list of the selected type</li>
-<li>thesaurus : means that the value is not free, but can be searched in authority/thesaurus of the selected category</li>
-<li>plugin : means the value is calculated or managed by a plugin. Plugins can do almost anything. For example, in UNIMARC there are plugins for every 1xx fields that are coded fields. The plugin is a huge help for cataloger ! There are also two plugins (unimarc_plugin_210c and unimarc_plugin_225a that can "magically" find the editor from an ISBN, and the collection list for the editor)</li>
-<li>link : useless for instance</li>
-</ul>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/printers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/printers.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/printers.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/printers.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Printer Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>Printer Administration</h1>
-<p>If you are going to be using a printer (or several printers) that are attached to your Koha server for producing statistical and operations reports, then you need to give each printer a name and tell Koha how to access it. You do this by telling Koha which print queue to use.</p>
-
-<p>(In linux, each printer configuration in your printcap file defines a print queue. The default print queue is "lp," but if you use more than one printer you will have other queues, probably with names like "text" or "postscript." Tell Koha which printer queue(s) you want to use for printing reports directly from the server.)</p>
-
-<p>Note that you can always print Koha screens directly to a printer attached to your workstation just by using your web browser's Print function.</p>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/stopwords.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/stopwords.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/stopwords.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/stopwords.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Stop word administration page<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>Stop word administration page</h1>
-<p>Here you should list all of the words you wish Koha to ignore when performing catalog searches or building the keyword index.</p>
-
-<p>Normally, you will not want Koha to save keyword references to articles like "The" and "A" and other very common words. Saving keyword references to these words does not help to limit a search and will make the keyword index very large and "cluttered" with words that are not really useful. The "stopwords" list defines these unnecessary words for your installation.</p>
-
-<p>(Hint: If you are proficient at MySQL, it is often faster and easier to find an existing stopwords list, edit it, put it in the correct format, and use the MySQL "Load Data Infile" command to import the list into the stopwords table. Many academic libraries publish their stopwords list on the Internet, or you can ask other Koha libraries if they would share their stopword list.)</p>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/systempreferences.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/systempreferences.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/systempreferences.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/systempreferences.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,71 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- System preferences administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>System preferences administration</h1>
-<p>This page allows you to set the system preferences that control much of the basic behavior of Koha. These parameters should be set before any other parameters.</p>
-<ul>
-<li><b>acquisitions --</b> The choices are either "normal" or "simple." "Normal" sets the system to track orders and update budgeting and vendor information as you add materials to your collection. "Simple" tells Koha that you are going to add materials to the collection without tracking orders.</li>
-
-<li><b>authoritysep --</b> The separator used in authority/thesaurus. Usually " -- ". Deprecated and useless in Koha 2.2</li>
-
-<li><b>autoBarcode --</b> The barcode number to be assigned to items is automatically assigned (sequentially) by Koha if this is set to "yes" ("1" = "yes").</li>
-
-<li><b>autoMemberNum --</b> The membership number (patron card number) to be assigned to new library users is automatically assigned by Koha if this is set to "yes" ("1" = "yes").</li>
-
-<li><b>checkdigit --</b> Validity checks on membership number (patron card number): none or "Katipo" style checks. In most cases, you will choose "none" because you will be using pre-printed barcodes.</li>
-
-<li><b>dateformat --</b> Choose "metric," "us," or "iso" date format (us = mm/dd/yyyy, metric = dd/mm/yyy, ISO = yyyy/mm/dd). This controls how dates are displayed, not how they are stored in the database.</li>
-
-<li><b>gist --</b> "gist" is "GST" (Good and Sales Tax) rate. If your local tax laws require you to pay taxes on purchases from your suppliers, enter the tax rate here. Set to "0" if you are not required to pay tax.</li>
-
-<li><b>insecure --</b> The best choice is "no." If you choose "yes," users do not have to login and all information is open to anyone. Be careful if you set this to "yes!"</li>
-
-<li>
-	<p><b>ISBD --</b> Koha can display records in International Standard Bibliographic Description format. the syntax of this field is quite complex : </p>
-	<p>it's divided into blocks, that can contain a text before, X fields, each having -or not- a string before, a string after, and a text after :</p>
-	<p><b>#995|&lt;br&gt;Items :|{\n995b}{ - 995j}{/995k}|</b></p>
-	<p>means the "block" 995 has &lt;br&gt;Items : BEFORE, then fields 995b, 995j and 995k, repeated for each item (995 is an UNIMARC standard), then nothing after the block.</p>
-	<p> The # means "beginning of a block", the | is the separator of each part, the {} being used for each subfield. A subfield can have up to 3 digits BEFORE and up to 3 digits AFTER each subfield</p>
-	<p>The UNIMARC (partial) definition for ISBD is </p><i>
-	<p>#700|<label>Titre/auteur</label>|{700a}{701a}{702a}| ;
-		#200||{200a}{ [200b] }{. 200c}{ : 200e}{. 200h}{. 200i}{ / 200f}{ ; 200g}|<br/>
-		#230||{ ; 230a}|<br/>
-		#205||{ ; 205a}{ , 205b}{ = 205d}{ / 205f}{ ; 205g}|<br/>
-		#210|&lt;br/&gt;&lt;label&gt;Editeur&lt;/label&gt;|{ ; 210a}{ (210b) }{ : 210c}{, 210d}|<br/>
-		#210|(|{210e}{(210f)}{ : 210g}{, 210h}|)<br/>
-		#215|&lt;br/&gt;&lt;label&gt;&nbsp;&lt;/label&gt;|{ ; 215a}{ : 215c}{ ; 215d}{ + 215e}|<br/>
-		#225|&lt;br/&gt;&lt;label&gt;Description&lt;/label&gt;|{ (225a}{ = 225d}{ : 225e}{. 225h}{. 225i}{ / 225f}{, I225x}{ ; 225v}|)<br/>
-		#606|&lt;br/&gt;&lt;label&gt;Sujets&lt;/label&gt;|{ 606a - }|&lt;br/&gt;&lt;br/&gt;<br/>
-		#995|&lt;br&gt;Exemplaires :|{\n995b}{ - 995j}{/995k}|<br/>
-	</i></p>
-</li>
-
-<li><b>KohaAdminEmailAddress --</b> The email address that will receive requests from borrowers for modification of their records.</li>
-
-<li><b>ldapserver and ldapinfos --</b> Koha 2.0 can use Perl LDAP (Lightweight Directory Access Protocol, see http://search.cpan.org/~gbarr/perl-ldap-0.3202/lib/Net/LDAP.pod) to manage user access and privileges. To avoid a useless Perl package for libraries without ldap, all what is related to LDAP has been moved to KohaInstall/modules/C4/Auth_with_ldap.pm. Ask your system administrator to set up LDAP with Auth_with_ldap.pm (perldoc Auth_with_ldap.pm for help). Those 2 parameters are useless in 2.2 and have should not appear on a new install.</li>
-
-<li><b>LibraryName --</b> The library name or message that will be shown on the main OPAC page. You may use HTML tags to format the name. Example: Welcome to <i>Koha<br/>Free Software ILS</i></li>
-
-<li><b>marc --</b> Turn on MARC support. Set to "no" if you do not intend to use MARC records.</li>
-
-<li><b>marcflavour --</b> Your MARC flavor (MARC21 or UNIMARC). This choice tells Koha how to interpret your MARC records.</li>
-
-<li><b>maxoutstanding --</b> The maximum amount of outstanding charges a borrower may have before he/she is barred from making reserve requests. The number represents units of your local currency (e.g. "5" means $5.00, if the dollar is your local currency.)</li>
-
-<li><b>maxreserves --</b> The maximum number of reserves a member can make.</li>
-
-<li><b>noissuescharge --</b> The maximum amount of outstanding charges a borrower may have before he/she is barred from checking out items. The number represents units of your local currency (e.g. "5" means $5.00, if the dollar is your local currency.)</li>
-
-<li><b>opaclanguages --</b> Set your language preference. (Despite the name, this choice controls the language used for all Koha screens, not just the OPAC). The top language in your list will be tried first.</li>
-
-<li><b>opacthemes --</b> Set the preferred order for themes. The top theme will be tried first.</li>
-
-<li><b>printcirculationslips --</b> if set to 1, circulation "slips" are printed on your receipt printer. If set to 0, no slips are printed.</li>
-
-<li><b>suggestion --</b> If set to 1, the Suggestions feature is activated in the OPAC. This feature allows OPAC users to suggest book purchases. When a suggestion is made in the OPAC, it is assigned the status "ASKED." A librarian then manages the suggestion and can set the status to "REJECTED" or "ORDERED." When a book is ordered and has arrived in the library, the status becomes "AVAILABLE." Suggestions that are not yet "AVAILABLE" are visible to all users of the OPAC.</li>
-
-<li><b>template --</b> Preference order for screen templates. Koha comes with several different options for templates that control the look and feel of your Koha screens, and you can also write your own templates.</li>
-
-<li><b>timeout --</b> Inactivity timeout period (in seconds). If a workstation is idle for longer than this period, the user will have to login again.</li>
-
-<li><b>virtualshelves --</b> Set virtual shelves management on or off ("1" or "0"). Users can set up and manage their own "virtual bookshelves" of favorite library items if this feature is turned on.</li></ul>
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/admin/z3950servers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/admin/z3950servers.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/admin/z3950servers.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/admin/z3950servers.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Z39.50 servers administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-<h1>Z39.50 servers administration</h1>
-<p>Defines the Z39.50 servers you want Koha to search.</p>
-
-<p>Koha comes with one Z39.50 server site defined (the U.S. Library of Congress) for finding catalog records to import directly into your catalog. In this area, you can define other servers for searching.</p>
-
-<p>To add servers, you will need to know the domain name or IP address of the server, the port number to use, and the name of the database to access. This information is available for many servers worldwide by acessing the Index Data website at http://www.indexdata.dk/targettest/. All of the servers listed there accept anonymous connections. (Be sure to choose servers which deliver records in the proper MARC format for your Koha installation.)</p>
-
-<p>If you have a login name and password for other Z39.50 servers, Koha will save your user ID and password in addition to the other information it needs to make a connection. (For anonymous servers, leave the userid and password fields blank.) The other fields on the form control whether or not the server is automatically searched when you request a Z39.50 search (put a "1" in the "Checked" field) and the order in which it is checked.</p>
-
-<p>It is a good idea to be selective in choosing servers. Defining more than five or six checked servers may slow down your Z39.50 search results, even if they are queried all together.</p>
-
-<p>IMPORTANT NOTE : the z3950search will NOT work until your system administrator has not activated the z3950 client daemon on your server. The daemon is in KohaDirectory/script/z3950daemon. It should be added to rc.d to be launched during server boot.</p>
-
-<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/authorities/authorities.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/authorities/authorities.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/authorities/authorities.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/authorities/authorities.tmpl	4 Aug 2005 21:17:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1 +0,0 @@
-authority help
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/bull-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/bull-home.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/bull-home.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/bull-home.tmpl	4 Aug 2005 21:17:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: Serials Subscriptions<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-	<h1>Serials subscription help</h1>
-	<p>Search for a subscription by using the filter button (with a ISSN or a title). If you enter a title, you can use the wildcard % : entering <b>%Times%</b> returns every subscription containing Times in the title. Entering <b>New York%</b> returns every subscription with title starting with New York</p>
-		<p>If you want to create a new subscription, click the "Add subscription" button.</p>
-		<p>Once you have found the subscription you need, you can: </p>
-			<ul>
-				<li>View subscription details</li>
-				<li>Recieve any item and/or manage what appears in subscription summary (in OPAC and librarian interface)</li>
-	</ul>
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/nohelp.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/nohelp.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/nohelp.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/nohelp.tmpl	4 Aug 2005 21:17:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: No help for this topic!<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-	
-	<h1>Online Help</h1>
-	<p>Sorry, there is no help available for this topic</p>
-	</div>
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/bull/bull-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/bull/bull-home.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/bull/bull-home.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/bull/bull-home.tmpl	4 Aug 2005 21:17:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: Serials Subscriptions<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-	<h1>Serials subscription help</h1>
-	<p>Search for a subscription by using the filter button (with a ISSN or a title). If you enter a title, you can use the wildcard % : entering <b>%Times%</b> returns every subscription containing Times in the title. Entering <b>New York%</b> returns every subscription with title starting with New York</p>
-	<p>If you want to create a new subscription, click on "Add subscription"</p>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/bull/statecollection.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/bull/statecollection.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/bull/statecollection.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/bull/statecollection.tmpl	4 Aug 2005 21:17:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: Serials -- Issues and Summary<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-	<h1>Serials issues and summary</h1>
-	<p>This screen is divided in 2 parts</p>
-	<h2>The right part</h2>
-	<p>The right part deals with issues. When you create a new subscription, the 1st issue is automatically calculated. When you want/need, you can define issues that have a new status:</p>
-	<ul>
-		<li>Arrived : when an book arrives, you can set it's status to "arrived". Then, the issue disappear from this list, and the number of the issue is added to the "arrived list" (on the left box)</li>
-		<li>Late : means that the book is late and should be arrived. A books changed to "late" status stays on the issue list, and the next waited number is generated</li>
-		<li>Missing : means the book will never arrive. The issue disappear from the list, and the number of the issue is added to the "missing list" (on the left box)</li>
-	</ul>
-	<h2>The left part</h2>
-	<p>the left part contains 6 differents informations, that are automatically calculated for some of them, but that you can change<p>
-	<ul>
-		<li>Subscription beginning date : the date of the beginning of the 1st subscription. Should not be modified and is not modified automatically by subscriptions renewals</li>
-		<li>Subscription enddate : must be entered manually when the subscription is definetly closed</li>
-		<li>Arrived numbers : the list of issues you have in your library. Automatically filled when a new number is marked "arrived". You can manually change this field if you want, for example, to change a long list (1,2,3,4,...,51) to a shorter one (1-51)</li>
-		<li>Missing numbers : the list of issues you don't have in your library, and that will never arrive (or have been lost). Automatically filled when a new number is marked "missing". You can manually change this field if you want, for example, to change a long list (1,2,3,4,...,51) to a shorter one (1-51)</li>
-		<li>opac note : the field that appears in the OPAC (with some other subscription information like beginning date and end date. This field must be filled manually. Nothing is put here automatically</li>
-		<li>opac note : the field that appears in the librarian interface (with some other subscription information like beginning date and end date. This field must be filled manually. Nothing is put here automatically.</li>
-	</ul>
-	<h2>Subscription renewals</h2>
-	<p>Koha calculates automatically the end of the subscription (based on the start date and the number of issues recieved). when a subscription has ended, you can't change the status of the last "waited number" (as it's not waited in fact). To be able to "recieve" this number, you must renew your subscription.</p>
-	<p>Renewing a subscription means that you define some informations for the renewal. When those informations have been filled, a suggestion is automatically created in Koha. This suggestion can be managed by the librarian that orders books, as any other order (= budget and bookseller are defined here).</p>
-	<p><i>Note that the subscription renewal done by the "serials librarian" is supposed to be immediate. We have decided to keep Koha as simple as possible. In fact, the subscription renewal won't be immediate, but we didn't wanted to add too much complexity.</i></p>
-	</p>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/bull/subscription-add.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/bull/subscription-add.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/bull/subscription-add.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/bull/subscription-add.tmpl	4 Aug 2005 21:17:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: Serials -- Adding Subscriptions<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-	<h1>Serials subscription add and modify help</h1>
-	<ul>
-		<h2>Subscription information bloc</h2>
-		<p>it contains the name of the librarian that created the subscription, the name of the supplier providing the subscription, the cost and the budget affected. It also contains the title of the biblio managed by the subscription.</p>
-		<h2>Planning information bloc</h2>
-		<p>it contains various information to calculate arrival dates.</p>
-		<h2>Subscription length</h2>
-		<p>one field in this bloc should be filled : the subscription length can be calculated in weeks, months or number of issues to recieve</p>
-		<h2>Numbering calculation</h2>
-		<p>The numbering of issues recieved can be a complex formulas. The "numbering formula" can be filled with any text and/or numbers. 3 special tokens <b>{X} {Y}</b> and <b>{Z}</b> can be user to define the calculation formula. XYZ values are calculated with the following method:</p>
-			<ul>
-				<li>Add : the number here is added to XYZ</li>
-				<li>once every : the number before can be added on every issue or less often</li>
-				<li>When more than : if the calculated number is more than the value here</li>
-				<li>Set back to : if the previous condition is valid, the calculated number is set to this one instead</li>
-				<li>Last value / begins with : the last value calculated or the 1st value (when adding a subscription</li>
-			</ul>
-		<h2>Sample</h2>
-		Consider the formula <b>N°{X}/{Y}</b>. The following XYZ settings :
-		<ul>
-			<li> <b>X</b> add <b>1</b> once every <b>4</b> times. When more than <b>9999999</b> set back to <b>empty</b>. Begins with <b>2004</b></li>
-			<li> <b>Y</b> add <b>1</b> once every <b>1</b> times. When more than <b>4</b> set back to <b>4</b>. Begins with <b>1</b></li>
-		</ul>
-		will result in the following issues numbers :
-		<p>N°2004/1, N°2004/2, N°2004/3, N°2004/4, N°2005/1, N°2005/2, N°2005/3, N°2005/4, N°2006/1</p>
-		<p>
-			<b>Note:</b> when you add a subscription, Koha consider you already have done the order, or that you will do it soon. So, NO information is sent to the acquisition module. This is not the case when the subscription expires. In this case, a subscription renewal creates a "suggestion" that is sent to the acquisition module.
-		</p>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/bull/subscription-detail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/bull/subscription-detail.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/bull/subscription-detail.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/bull/subscription-detail.tmpl	4 Aug 2005 21:17:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: Serials Subscription Detail<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-	<h1>Serials subscription detail help</h1>
-	In this screen, you can see subscription detail, and modify it if you need.
-	<ul>
-		<h2>Subscription information bloc</h2>
-		<p>it contains the name of the librarian that created the subscription, the name of the supplier providing the subscription, the cost and the budget affected. It also contains the title of the biblio managed by the subscription.</p>
-		<h2>Planning information bloc</h2>
-		<p>it contains various information to calculate arrival dates.</p>
-		<h2>Subscription length</h2>
-		<p>one field in this bloc should be filled : the subscription length can be calculated in weeks, months or number of issues to recieve</p>
-		<h2>Numbering calculation</h2>
-		<p>The numbering of items recieved can contain complex formulas. The "numbering formula" can be filled with any text and/or numbers. 3 special tokens <b>{X} {Y}</b> and <b>{Z}</b> can be user to define the calculation formula. XYZ values are calculated with the following method:</p>
-			<ul>
-				<li>Add : the number here is added to XYZ</li>
-				<li>once every : the number before can be added on every issue or less often</li>
-				<li>When more than : if the calculated number is more than the value here</li>
-				<li>Set back to : if the previous condition is valid, the calculated number is set to this one instead</li>
-				<li>Last value / begins with : the last value calculated or the 1st value (when adding a subscription</li>
-			</ul>
-		<h2>Sample</h2>
-			Consider the formula <b>N°{X}/{Y}</b>. The following XYZ settings :
-			<li> <b>X</b> add <b>1</b> once every <b>4</b> times. When more than <b>9999999</b> set back to <b>empty</b>. Begins with <b>2004</b></li>
-			<li> <b>Y</b> add <b>1</b> once every <b>1</b> times. When more than <b>4</b> set back to <b>4</b>. Begins with <b>1</b></li>
-			will result in the following issues numbers :
-			<b>N°2004/1,N°2004/2,N°2004/3,N°2004/4,N°2005/1,N°2005/2,N°2005/3,N°2005/4,N°2006/1
-		<p>
-		</p>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/circ/circulation.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/circ/circulation.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/circ/circulation.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/circ/circulation.tmpl	4 Aug 2005 21:17:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: Circulation -- Issues<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-<h1>Circulation -- Issues</h1>
-
-<p>Before you begin, it is very important that you take note of the branch and printer settings and change them if necessary. This should only have to be done the first time you do circulations from a workstation, after which a browser cookie will remember the correct settings. If you do circulations under the wrong branch settings (for example, your branch setting is "Suburb," but you are actually working at the "Downtown" branch), then Koha will reset the location of all items scanned to the incorrect branch (Suburb) and the statistical reports will credit all circulations to the wrong branch.</p>
-
-<p>Now start by scanning the patron's barcode or type in their name to find their account. Once Koha has found the patron, you will see a new form for scanning or typing the item's identifying number (usually a barcode).</p>
-
-<p>If you wish to have this item and all subsequent items in this transaction to have a date due other than the default date due defined for the item type, use the "Sticky Due Date" to set the date due before scanning the first item.</p>
-
-<p>If the item can be issued without problems, it will be done immediatly and shown (with other patron issues) at bottom.</p>
-
-<p>If the issuing is problematic, then another box will appear and ask for confirmation if possible. If the issuing is really impossible (for example, the barcode does not exist), then you can't confirm the issue. If it is possible but has something that needs confirmation (like item being issued to another patron, or patron having issued too many items), then you must confirm the issuing. If the confirmation means another operation (if item is issued to another patron, then issuing also means make the return), then it's also done</p>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/circ/returns.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/circ/returns.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/circ/returns.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/circ/returns.tmpl	4 Aug 2005 21:17:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: Circulation -- Returns<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-<h1>Circulation -- Returns</h1>
-
-<p>Before you begin, it is very important that you take note of the branch and printer settings and change them if necessary. This should only have to be done the first time you do circulations (or returns) from a workstation, after which a browser cookie will remember the correct settings. If you do returns under the wrong branch settings (for example, your branch setting is "Suburb," but you are actually working at the "Downtown" branch), then Koha will reset the location of all items scanned to the incorrect branch (Suburb).</p>
-
-<p>Now simply scan or type the returned item's identifying number (usually a barcode) in the box provided.</p>
-
-<p>The return is done and if there is something specific for the item or the patron (like patron having debts), a red box will warn you</p>
-<p>If the item has been requested by someone else, you also are asked to validate the request. If you confirm it, item is changed to a "waiting" status and you should warn the patron that the item is available</p>
-<p>If the item is requested by someone in another branch, then you must validate the transfer too</p>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/export/marc.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/export/marc.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/export/marc.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/export/marc.tmpl	4 Aug 2005 21:17:06 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: MARC Export<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-<h1>MARC Export</h1>
-
-<p>This is a tool to export your bibliographic records in standard MARC communications format (ISO 2709). It exports only the basic bibliographic information with no holdings information other than any holdings information originally loaded into Koha using the bulkmarcimport tool.</p>
-
-<p>You are asked to provide a starting bibliographic record number and an ending number for the export. If you want to export all of your records, leave the start and end numbers blank.</p>
-
-<p>Records are downloaded to the workstation that requests the export and are saved in a file called "marc.pl."</p>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/import/breeding.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/import/breeding.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/import/breeding.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/import/breeding.tmpl	4 Aug 2005 21:17:06 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: MARC Import<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-<h1>MARC Import</h1>
-<p>This is one of the screens you will see frequently if you are starting from scratch.</p>
-
-<p>It is useful to import a bunch of ISO 2709 biblios that can be used later for a quick cataloguing</p>
-
-<p>First, you need to browse your computer to find the MARC record that you grabbed for your item. Click on</p>
-
-<p>Choose File to browse.</p>
-
-<p>If you aren't sure if you've already imported a record, keep the radio button set to</p>
-
-<p>Ignore this one, keep the existing one.</p>
-
-<p>You can "name" the import to help you when you need to choose between more than 1 imported biblio (or just want to keep trace on where the biblios comes from)</p>
-
-<p>You can also change char encoding between MARC21 and UNIMARC</p>
-
-<p>You don't need to actually name every import, so you don't need to fill in this box if you don't want to. It is useful for telling imports apart if you've more than one of the same record.</p>
-
-<p><b>IMPORTANT : This tool is NOT intended to import ISO 2709 in your ACTIVE database. If you need to migrate data from another ILS, then you must consider $kohaInstall/scripts/misc/bulkmarcimport.pl</b></p>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/members/memberentry.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/members/memberentry.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/members/memberentry.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/members/memberentry.tmpl	4 Aug 2005 21:17:06 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: Adding a New Patron<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<h1>Add member help</h1>
-<h2>Add Member, person</h2>
-<p>This is the form for adding a new single member to the database. There is also a form for organisations, such as other libraries and non profit organisations you might lend to. You should use the Add Organisation tab at the top of the Member page for that.</p>
-<p>Every field with an asterisk must be filled out, or you will get an error, and the record will not be added to the database.</p>
-<p>If you accidentally have two members with the same card number, the second duplicate will show up as just commas after you confirm the record.</p>
-<p>When you are done with the record, click the Save button at the bottom.</p>
-<p>The clear all Fields button will reset the page to a blank form in case you made a mistake.</p>
-
-<h2>Add Member, Institutional</h2>
-<p>This is the form for adding a group of members. Suppose you had a YMCA group, or lend books to other Libraries. This would be the form to use for that purpose.</p>
-<p>Every field with an asterisk must be filled out, or you will get an error, and the record will not be added to the database.</p>
-<p>If you accidentally have two members with the same card number, the second duplicate will show up as just commas after you confirm the record.</p>
-<p>When you are done with the record, click the Save button at the bottom.</p>
-<p>The clear all Fields button will reset the page to a blank form in case you made a mistake.</p>
-<p>You can always come back and edit what you enter in the Add Member screen by searching for the borrower by using their last name or card number, selecting a user by clicking on the entry in the search list, and then clicking the Modify button on the member information screen.</p>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/members/members-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/members/members-home.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/members/members-home.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/members/members-home.tmpl	4 Aug 2005 21:17:06 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: Members<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<h1>Members help</h1>
-<p>This is the Members portion of Koha.</p>
-<p>The Members portion stores the information you add about your patrons.</p>
-<p>To add a patron, type their name into the search box on the left, and
-click the OK button.</p>
-<p>If there is already a borrower matching the name you searched, it will show
-after you click OK. This can be particularly useful when people have lost
-their cards or when children forget their cards. That way, you can avoid having
-multiple numbers for the same patron.</p>
-<p>Alternatively, you can browse a section of borrowers by selecting the first
-letter of the Patron's last name from the list on the right.</p>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/help/members/moremember.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/members/moremember.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/members/moremember.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/members/moremember.tmpl	4 Aug 2005 21:17:06 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: Member Information<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<h1>Member Information Screen</h1>
-<p>This screen shows the information associated with a given patron.</p>
-<p>On the top left is their address and card number.</p>
-<p>A patron's annual membership fee payment status also shows on this screen.</p>
-<p>Any fines a patron has will show up in the top middle of this screen.</p>
-<p>Any materials a patron has requested will show up on the top right of this screen.</p>
-<p>You can get information on what a patron has read in the past by clicking on the Reading Record button.</p>
-<p>Any items a patron currently has out will show up under "Items currently on issue".</p>
-<p>If you would like to edit a patron's information, click the modify button on the lower left.</p>
-<p>If you would like to PERMANENTLY delete a user, click the delete button on the lower left. A confirmation box will
-appear, so don't worry about accidentally deleting a record. Just be absolutely sure before you delete!</p>
-<p>The change password button allows a user to either set a new password or change their current password. This is useful to patrons that wish to place reserves online from home. You cannot see a password again once you change it, but you can reset a password.</p>
-<p>Modify user flags allows an administrator to set which clerks, librarians, patrons, technical support people or trustees have access to certain parts of the database. Right now, one can either have permission to access everything on the Intranet side, or just have access to the OPAC.</p>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/help/search.marc/search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/help/search.marc/search.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/help/search.marc/search.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/help/search.marc/search.tmpl	4 Aug 2005 21:17:06 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-	<h1>Search</h1>
-	<p>The search id divided in 2 differents parts :</p>
-	<h2>Usual fields</h2>
-	<p>The usual fields are in the top part of the screen. They contains :</p>
-		<ul>
-			<li>Keyword : search on anything</li>
-			<li>Title</li>
-			<li>Author</li>
-			<li>Barcode : the library barcode of the book</li>
-			<li>Illustrator</li>
-			<li>Dewey</li>
-			<li>Item type : select here an item type. If none is selected, the search is done on every item type</li>
-			<li>Branch : select here a specific branch. If none selected, the search is done on every branch</li>
-		</ul>
-	<p>Search method</p>
-		<ul>
-			<li>If you enter values in more than 1 field, the search is "and-ed" (biblios that contains <b>title</b> AND <b>author</b>)</li>
-			<li>A biblio is selected if it's field <b>contains</b> the term you entered</li>
-			<li>If you enter a * (or a %) at the end of a term, Koha search for words starting with your term (entering <b>lower*</b> means : find biblio that have a <b>title containing a word starting by lower</b></li>
-		</ul>
-	<h2 class="catalogue">Complete MARC search</h2>
-	<p>In the lower part of the search screen, the <b>More fields</b> box let you enter whatever you want : and, or, exclusions (not), search on any MARC field/subfield</p>
-	
-	<p><b>IMPORTANT NOTE : </b>for performance reasons, the * is valid only if you enter a word more than 3 letters long. for words of 3 letters or less, the * is <b>ignored</b></p>
-	<br/>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/images/info.gif
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/images/info.gif
diff -N koha-tmpl/intranet-tmpl/prog/en/images/info.gif
Binary files /tmp/cvsBX1pvq and /dev/null differ

Index: koha-tmpl/intranet-tmpl/prog/en/images/regularDay.jpg
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/images/regularDay.jpg
diff -N koha-tmpl/intranet-tmpl/prog/en/images/regularDay.jpg
Binary files /tmp/cvsKLohns and /dev/null differ

Index: koha-tmpl/intranet-tmpl/prog/en/images/regularHoliday.jpg
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/images/regularHoliday.jpg
diff -N koha-tmpl/intranet-tmpl/prog/en/images/regularHoliday.jpg
Binary files /tmp/cvsjvyOju and /dev/null differ

Index: koha-tmpl/intranet-tmpl/prog/en/images/repeatable.jpg
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/images/repeatable.jpg
diff -N koha-tmpl/intranet-tmpl/prog/en/images/repeatable.jpg
Binary files /tmp/cvsmOofOx and /dev/null differ

Index: koha-tmpl/intranet-tmpl/prog/en/images/signClose.gif
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/images/signClose.gif
diff -N koha-tmpl/intranet-tmpl/prog/en/images/signClose.gif
Binary files /tmp/cvs3dzVLy and /dev/null differ

Index: koha-tmpl/intranet-tmpl/prog/en/includes/alt_menu-serials.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/alt_menu-serials.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/alt_menu-serials.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/alt_menu-serials.inc	20 Jul 2006 05:43:25 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,6 +0,0 @@
-    <p>
-         <a href="/cgi-bin/koha/serials/serials-home.pl">Search/Add Subscription</a>
-         <a href="/cgi-bin/koha/serials/serials-home.pl?routing=1">Create/Edit Routing List</a>
-         <a href="/cgi-bin/koha/serials/lateissues.pl">Outstanding Issues</a>
-	 <a href="/cgi-bin/koha/serials/claims.pl">Claims</a>
-    </p>

Index: koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close-calendar.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close-calendar.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close-calendar.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close-calendar.inc	13 Feb 2006 16:39:33 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
-<style type="text/css"> 
-	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);
-</style>
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css" />
-<script type="text/javascript" src="<!-- TMPL_VAR name='themelang' -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang"-->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-</head>
-
-<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc	13 Feb 2006 16:39:33 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
-<style type="text/css"> 
-	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);
-</style>
-</head>
-
-<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc	19 Jul 2005 20:49:44 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,5 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes/favicon.ico
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/favicon.ico
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/favicon.ico
Binary files /tmp/cvs24HmJB and /dev/null differ

Index: koha-tmpl/intranet-tmpl/prog/en/includes/holidays-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/holidays-bottom.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/holidays-bottom.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/holidays-bottom.inc	14 Apr 2006 09:36:51 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
-
-
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/includes/holidays-top.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/holidays-top.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/holidays-top.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/holidays-top.inc	14 Apr 2006 09:36:51 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,164 +0,0 @@
-</title>
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-
-<!-- Estos scripts permiten manejar calendario de fechas. -->
-<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- **************************************************** -->
-
-<script language="JavaScript" type="text/javascript">
-	// Captura el evento onmousemove para cualquier navegador
-	if (document.layers) { // Netscape
-		document.captureEvents(Event.MOUSEMOVE);
-	    document.onmousemove = captureMousePosition;
-	} else if (document.all) { // Internet Explorer
-	    document.onmousemove = captureMousePosition;
-	} else if (document.getElementById) { // Netcsape 6
-	    document.onmousemove = captureMousePosition;
-	}
-
-	var mouseXMax = 0;
-	var mouseYMax = 0;
-	var mouseX = 0;
-	var mouseY = 0;
-
-	function captureMousePosition(e) {
-	    if (document.layers) {
-		    mouseX = e.pageX;
-			mouseY = e.pageY;
-	        mouseXMax = window.innerWidth + window.pageXOffset;
-		    mouseYMax = window.innerHeight + window.pageYOffset;
-	    } else if (document.all) {
-		    mouseX = window.event.x + document.body.scrollLeft;
-	        mouseY = window.event.y + document.body.scrollTop;
-	        mouseXMax = document.body.clientWidth + document.body.scrollLeft;
-	        mouseYMax = document.body.clientHeight + document.body.scrollTop;
-	    } else if (document.getElementById) {
-	        mouseX = e.pageX;
-		    mouseY = e.pageY;
-	        mouseXMax = window.innerWidth + window.pageXOffset;
-	        mouseYMax = window.innerHeight + window.pageYOffset;
-	    }
-	}
-
-	function holidayOperation(formObject, opType) {
-		var op = document.getElementsByName('operation');
-		op[0].value = opType;
-		formObject.submit();
-	}
-
-	// This function shows the "Show Holiday" panel //
-	function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description) {
-		var panel = document.getElementById('showHoliday');
-		panel.style.display = 'inline';
-		document.getElementById('newHoliday').style.display = 'none';
-		panel.style.top = mouseYMax/2;
-		panel.style.left = (mouseXMax/2) - 250;
-		document.getElementById('showDayname').value = dayName;
-		document.getElementById('showBranchName').value = document.getElementById('branch').value;
-		document.getElementById('showDay').value = day;
-		document.getElementById('showMonth').value = month;
-		document.getElementById('showYear').value = year;
-		document.getElementById('showTitle').value = title;
-		document.getElementById('showDescription').value = description;
-		document.getElementsByName('showWeekday')[0].value = weekDay;
-		if (exceptionPosibility == 1) {
-			document.getElementById('exceptionPosibility').style.display = 'inline';
-		} else {
-			document.getElementById('exceptionPosibility').style.display = 'none';
-		}
-	}
-
-	// This function shows the "Add Holiday" panel //
-	function newHoliday (dayName, day, month, year, weekDay) {
-		var panel = document.getElementById('newHoliday');
-		panel.style.display = 'inline';
-		document.getElementById('showHoliday').style.display = 'none';
-		panel.style.top = mouseYMax/2;
-		panel.style.left = (mouseXMax/2)  - 250;
-		document.getElementById('newDayname').value = dayName;
-		document.getElementById('newBranchName').value = document.getElementById('branch').value;
-		document.getElementById('newDay').value = day;
-		document.getElementById('newMonth').value = month;
-		document.getElementById('newYear').value = year;
-		document.getElementsByName('newWeekday')[0].value = weekDay;
-	}
-
-	function hidePanel(aPanelName) {
-		document.getElementById(aPanelName).style.display = 'none';
-	}
-
-	function changeBranch () {
-		var branch = document.getElementById('branch').options[document.getElementById('branch').selectedIndex].value;
-		location.href='/cgi-bin/koha/tools/holidays.pl?branch=' + branch;
-	}
-
-	function additionalInformation (anExplanation) {
-		var panel = document.getElementById('information');
-		var paragraph = document.getElementById('explanation');
-		panel.style.display = 'inline'
-		panel.style.top = mouseY;
-		panel.style.left = mouseX;
-		var info = document.createTextNode(anExplanation);
-		if (paragraph.hasChildNodes()) {
-			paragraph.removeChild(paragraph.lastChild);
-		}
-		paragraph.appendChild(info);
-	}
-
-	function Help() {
-		newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
-	}
-</script>
-
-<style type="text/css">
-.normalday { 
-	background-color: #EDEDED;
-	color: Black; 
-	border:1px solid #000000;
-}
-
-.exception {
-	background-color: #EDEDED;
-	color: Black; 		
-	border:1px solid #000000;
-}
-
-.holiday { 
-	background-color: red;
-	color: Black; 
-	border:1px solid #000000;
-}
-
-.repeatableday { 
-	background-color: yellow;
-	color: Black; 
-	border:1px solid #000000;
-}
-
-.information {
-	z-index:1;
-	background-color: #DCD2F1;
-	width:300px;
-	display:none;
-	border:1px solid #000000;
-	color: #000000;
-	font-size: 8pt;
-	font-weight: bold;
-    background-color: #FFD700;
-	cursor: pointer;
-	padding:2px;
-}
-
-.panel {
-	z-index:1;
-	width:500px;
-	display:none;
-	border:1px solid #000000;
-	padding:0px;
-}
-
-</style>
-
-

Index: koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc	12 Oct 2005 15:04:45 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-</body>
-</html>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes/intranet-facets.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/intranet-facets.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/intranet-facets.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/intranet-facets.inc	27 Sep 2006 19:40:43 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-<div id="facetsmenu">
-<a href="/cgi-bin/koha/mainpage.pl">KOHA Home</a>
-<h6>Refine Your Search</h6>
-
-<!-- TMPL_LOOP NAME="facets_loop" -->
-<ul><!-- TMPL_VAR NAME="type_label" -->
-	<!-- TMPL_LOOP NAME="facets" -->
-		<li><a href="/cgi-bin/koha/catalogue/catalogue-search.pl?op=do_search&and_or=@and&<!-- TMPL_VAR NAME="type_link_value" ESCAPE="URL"-->&value=<!-- TMPL_VAR NAME="facet_link_value" -->&zoom=1<!-- TMPL_VAR NAME="facetsdesc" ESCAPE="URL"-->"  title="<!-- TMPL_VAR NAME="facet_title_value" -->"><!-- TMPL_VAR NAME="facet_label_value" --> (<!-- TMPL_VAR NAME="facet_count" -->)</a></li>
-	<!-- /TMPL_LOOP -->
-<!-- TMPL_IF NAME="expandable" -->
-	<li class="showmore"><a href="/cgi-bin/koha/catalogue/catalogue-search.pl?q=<!-- TMPL_VAR NAME="forminputs" -->&amp;expand=<!-- TMPL_VAR NAME="expand" -->#<!-- TMPL_VAR NAME="type_id" -->">Show More</a></li>
-<!-- /TMPL_IF -->
-</li></ul>
-<!-- /TMPL_LOOP -->
-
-
-
-</div>

Index: koha-tmpl/intranet-tmpl/prog/en/includes/intranet.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/intranet.css
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/intranet.css
--- koha-tmpl/intranet-tmpl/prog/en/includes/intranet.css	27 Sep 2006 19:40:43 -0000	1.8
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,176 +0,0 @@
-body {
-	font-family : Verdana, Geneva, Arial, sans-serif;
-	font-size : .9em;
-}
-
-table {
-	border-collapse : collapse;
-	border-top : 1px solid #CCCCCC;
-	border-right : 1px solid #CCCCCC;
-	margin : 1em 0;
-}
-
-caption {
-	font-size : 140%;
-	text-align : left;
-	font-weight : bold;
-}
-
-td,th {
-	border-left : 1px solid #CCCCCC;
-	border-bottom : 1px solid #CCCCCC;
-	padding : 5px;
-}
-
-th {
-	background-color : #CCCCCC;
-	border-left : 1px solid #999999;
-	border-bottom : 1px solid #999999;
-}
-
-th[scope=row] {
-	background-color : #EEEEEE;
-	text-align : right;
-}
-
-input {
-	font-size:0.9em;
-}
-
-select {
-	font-size:0.9em;
-}
-
-input[type=submit], input[type=button], input[type=reset] {
-	background-color : #6699cc;
-	color : #FFFFFF;
-	font-size : 1em;
-	font-weight : bold;
-}
-
-tr.highlight td, tr.highlight th {
-	background-color : #EEEEEE;
-}
-
-#admin_stopwords_select UL {
-   width: 600px;
-}
-
-#admin_stopwords_select UL LI {
-   white-space: nowrap;
-}
-
-legend {
-	font-size:120%;
-	font-weight:bold;
-}
-
-.problem {
-	color: white;
-	background-color:red;
-}
-
-/* css styles for reserves color alerts */
-.onloan {
-	background-color: #FFED3D;
-}
-
-.reserved {
-	background-color: #8EBAFF;
-}
-
-.transfered {
-	background-color: #F9FF9A;
-}
-
-.inwait {
-	background-color: #33CC99;
-}
-
-.other {
-	background-color: #FF0000;
-}
-
-/* end of css styles for reserves color alerts */
-
-/* MAIN MENU STYLES */
-#mainmenu {
-    display:block;
-    float:left;
-    margin-right:2px;
-    border-right:1px solid black;
-}
-
-#mainmenu a {
-    display:block;
-    margin:5px;
-    text-decoration:none;
-    color:black;
-}
-#mainmenu a:hover {
-    display:block;
-    margin:5px;
-    background-color:#6699cc;
-    color:white;
-}
-
-/* submenus styles */
-#submenu {
-    margin-left:10%;
-}
-#submenu a {
-    margin:5px;
-    text-decoration:none;
-    color:black;
-}
-#submenu a:hover {
-    margin:5px;
-    background-color:#6699cc;
-    color:white;
-}
-
-/* the USER information block */
-#librarian_information {
-/*     position:absolute; */
-    float:right;
-    font-size:10pt;
-}
-
-#main {
-	background-color : #C2CED3;
-	border-left : 1px solid #000000;
-	margin-left : 20%;
-	margin-right : 1%;
-	margin-top : 2%;
-	padding : 10px;
-}
-
-#facetsmenu {
-position : absolute;
-left : 1px;
-width : 15%;
-    display:block;
-    float:left;
-    margin-right:2px;
-    margin-top:2%;
-    border-right:1px solid black;
-}
-#facetsmenu ul {
-	background-color : #C4C6C7;
-	border-bottom : 1px solid #FFFFCC;
-	border-left : 0px solid #FFFFCC;
-	border-right : 0px solid #006699;
-	border-top : 0px solid #FFFFCC;
-	font-size : .8em;
-	list-style : none;
-	padding : 2px;
-	text-align : left;
-	width : 100%;
-}
-#facetsmenu ul li {
-	
-	list-style : none;
-	padding : 1px;
-	text-align : right;
-	
-}

Index: koha-tmpl/intranet-tmpl/prog/en/includes/menu-acqui.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/menu-acqui.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/menu-acqui.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/menu-acqui.inc	11 Aug 2006 09:51:45 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,8 +0,0 @@
-<div id="submenu">
-    <a href="/cgi-bin/koha/acqui/acqui-home.pl">Main page</a>
-    <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=0">Add supplier</a>
-    <a href="/cgi-bin/koha/acqui/lateorders.pl">Late orders</a>
-    <a href="/cgi-bin/koha/acqui/histsearch.pl">History search</a>
-    <a href="/cgi-bin/koha/suggestion/acceptorreject.pl">Manage suggestions</a>
-    <a href="/cgi-bin/koha/admin/aqbookfund.pl">Parameters</a>
-</div>

Index: koha-tmpl/intranet-tmpl/prog/en/includes/menu-admin.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/menu-admin.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/menu-admin.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/menu-admin.inc	11 Aug 2006 09:51:45 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-<div id="submenu">
-	<a href="/cgi-bin/koha/admin/systempreferences.pl">System pref</a>
-	<a href="/cgi-bin/koha/admin/branches.pl">Branches</a>
-	<a href="/cgi-bin/koha/admin/aqbookfund.pl">Funds</a>
-	<a href="/cgi-bin/koha/admin/currency.pl">Currencies</a>
-	<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a>
-	<a href="/cgi-bin/koha/admin/categorie.pl">Borrower categories</a>
-	<a href="/cgi-bin/koha/admin/issuingrules.pl">Issuing rules</a>
-	<a href="/cgi-bin/koha/admin/authorised_values.pl">Authorised values</a>
-	<a href="/cgi-bin/koha/admin/authtypes.pl">Thesaurus</a>
-	<a href="/cgi-bin/koha/admin/biblio_framework.pl">Biblio Framework</a>
-	<a href="/cgi-bin/koha/admin/koha2marclinks.pl">Links Koha-MARC DB</a>
-	<a href="/cgi-bin/koha/admin/checkmarc.pl">MARC Check</a>
-	<a href="/cgi-bin/koha/admin/printers.pl">Printers</a>
-	<a href="/cgi-bin/koha/admin/stopwords.pl">Stop words</a>
-	<a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a>
-	<a href="/cgi-bin/koha/import/breeding.pl">Reservoir</a>
-</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes/menu-authorities.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/menu-authorities.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/menu-authorities.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/menu-authorities.inc	4 Apr 2006 10:05:48 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-<script language="JavaScript" type="text/javascript">
-function Help() {
-	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
-}
-
-function addauthority() {
-	X = document.forms[0].authtype.value;
-	window.location="/cgi-bin/koha/authorities/authorities.pl?authtypecode="+X;
-}
-function searchauthority() {
-	X = document.forms[0].authtype2.value;
-	Y = document.forms[0].value.value;
-	window.location="/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&authtypecode="+X+"&value="+Y+"&marclist=&and_or=and&excluding=&operator=contains";
-}
-</script>

Index: koha-tmpl/intranet-tmpl/prog/en/includes/menu-catalogue.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/menu-catalogue.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/menu-catalogue.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/menu-catalogue.inc	11 Aug 2006 09:51:45 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-<div id="submenu">
-	<a href="/cgi-bin/koha/loadmodules.pl?module=search&amp;marc=1&amp;type=intranet">Search</a>
-	<a href="/cgi-bin/koha/loadmodules.pl?module=addbiblio&amp;type=intranet">Add biblio</a>
-	<a class="submenu serial" href="/cgi-bin/koha/serials/serials-home.pl">Subscriptions</a>
-	<a href="/cgi-bin/koha/serials/lateissues.pl">Late issues</a>
-	<a href="/cgi-bin/koha/bookshelves/shelves.pl">Virtual shelves</a>
-</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes/menu-circ.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/menu-circ.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/menu-circ.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/menu-circ.inc	11 Aug 2006 09:51:45 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
-<div id="submenu">
-    <a href="/cgi-bin/koha/circ/circulation.pl">Circulation</a>
-    <a href="/cgi-bin/koha/circ/circulation.pl">Issues</a>
-    <a href="/cgi-bin/koha/circ/returns.pl">Returns</a>
-    <a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfers</a>
-    <a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set branch</a>
-    <a href="/cgi-bin/koha/circ/branchreserves.pl">Waiting reserves</a>
-    <a href="/cgi-bin/koha/circ/waitingreservestransfers.pl">Transfers to do</a>
-    <a href="/cgi-bin/koha/circ/currenttransfers.pl">Transfers to recieve</a>
-</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes/menu-members.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/menu-members.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/menu-members.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/menu-members.inc	11 Aug 2006 09:51:45 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-<div id="submenu">
- 	<a href="/cgi-bin/koha/members/members-home.pl">Search</a>
- 	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=A"/>Add adult</a>
- 	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=C"/>Add child</a>
- 	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=P"/>Add prof</a>
- 	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=I"/>Add org</a>
-</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes/menu-serials.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/menu-serials.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/menu-serials.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/menu-serials.inc	11 Aug 2006 09:51:45 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
-<div id="submenu">
-        <a href="/cgi-bin/koha/serials/serials-home.pl">home</a>
-        <a href="/cgi-bin/koha/serials/serial-issues.pl">Serials issues</a>
-        <a href="/cgi-bin/koha/serials/acqui-search.pl">Supplier search</a>
-        <a href="/cgi-bin/koha/serials/subscription-bib-search.pl">Subscription search</a>
-        <a href="/cgi-bin/koha/serials/subscription-bib-search.pl">Search subscription</a>
-        <a href="/cgi-bin/koha/serials/lateissues.pl">Late issue</a>
-        <a href="/cgi-bin/koha/serials/subscription-add.pl">Add a subscription</a>
-        <a href="/cgi-bin/koha/serials/viewalerts.pl">View alerts</a>
-</div>

Index: koha-tmpl/intranet-tmpl/prog/en/includes/menu-tools.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/menu-tools.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/menu-tools.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/menu-tools.inc	11 Aug 2006 16:33:01 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-<div id="submenu">
-    <a href="/cgi-bin/koha/tools/cities.pl">Cities</a>
-    <a href="/cgi-bin/koha/tools/holidays.pl">Holidays</a>
-    <a href="/cgi-bin/koha/tools/marc.pl">Export</a>
-    <a href="/cgi-bin/koha/import/breeding.pl">Reservoir</a>
-    <a href="/cgi-bin/koha/tools/barcodes.pl">Barcodes</a>
-</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes/menus.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/menus.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/menus.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/menus.inc	11 Aug 2006 09:51:45 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-<script language="JavaScript" type="text/javascript">
-function _(s) { return s } // dummy function for gettext
-function Help() {
-	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
-}
-</script>
-<div id="mainmenu">
-	<a href="/cgi-bin/koha/mainpage.pl">Koha</a>
-	<a href="/cgi-bin/koha/loadmodules.pl?module=acquisitions">Acquisitions</a>
-	<a href="/cgi-bin/koha/loadmodules.pl?module=search&amp;type=intranet">Catalogue</a>
-	<a href="/cgi-bin/koha/circ/circulation.pl">Circulation</a>
-	<a href="/cgi-bin/koha/members/members-home.pl">Members</a>
-	<a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a>
-	<a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
-	<a href="/cgi-bin/koha/admin/admin-home.pl">Parameters</a>
-	<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
-	<a href="/cgi-bin/koha/about.pl">About</a>
-	<a href="/cgi-bin/koha/help.pl" onclick="Help(); return false;">Help</a>
-</div>
-
-<div id="librarian_information">
-<p><!-- TMPL_VAR name="loggedinusername" -->, from <!-- TMPL_VAR name="branchname" --></p>
-</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes/popup-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/popup-bottom.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/popup-bottom.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/popup-bottom.inc	12 Jul 2006 10:58:28 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/includes/popup-top.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/popup-top.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/popup-top.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes/popup-top.inc	12 Jul 2006 10:58:28 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<title>popup</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf8">
-
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
-
-</head>
-
-<body>
-<!-- NO MENUS for popup-top -->

Index: koha-tmpl/intranet-tmpl/prog/en/includes/calendar/cal.gif
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/calendar/cal.gif
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/calendar/cal.gif
Binary files /tmp/cvsnmSKDG and /dev/null differ

Index: koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-en.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-en.js
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-en.js
--- koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-en.js	19 Jul 2005 20:52:44 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,127 +0,0 @@
-// ** I18N
-
-// Calendar EN language
-// Author: Mihai Bazon, <mishoo at infoiasi.ro>
-// Encoding: any
-// Distributed under the same terms as the calendar itself.
-
-// For translators: please use UTF-8 if possible.  We strongly believe that
-// Unicode is the answer to a real internationalized world.  Also please
-// include your contact information in the header, as can be seen above.
-
-// full day names
-Calendar._DN = new Array
-("Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- "Sunday");
-
-// Please note that the following array of short day names (and the same goes
-// for short month names, _SMN) isn't absolutely necessary.  We give it here
-// for exemplification on how one can customize the short day names, but if
-// they are simply the first N letters of the full name you can simply say:
-//
-//   Calendar._SDN_len = N; // short day name length
-//   Calendar._SMN_len = N; // short month name length
-//
-// If N = 3 then this is not needed either since we assume a value of 3 if not
-// present, to be compatible with translation files that were written before
-// this feature.
-
-// short day names
-Calendar._SDN = new Array
-("Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat",
- "Sun");
-
-// First day of the week. "0" means display Sunday first, "1" means display
-// Monday first, etc.
-Calendar._FD = 0;
-
-// full month names
-Calendar._MN = new Array
-("January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December");
-
-// short month names
-Calendar._SMN = new Array
-("Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec");
-
-// tooltips
-Calendar._TT = {};
-Calendar._TT["INFO"] = "About the calendar";
-
-Calendar._TT["ABOUT"] =
-"DHTML Date/Time Selector\n" +
-"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
-"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" +
-"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
-"\n\n" +
-"Date selection:\n" +
-"- Use the \xab, \xbb buttons to select year\n" +
-"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
-"- Hold mouse button on any of the above buttons for faster selection.";
-Calendar._TT["ABOUT_TIME"] = "\n\n" +
-"Time selection:\n" +
-"- Click on any of the time parts to increase it\n" +
-"- or Shift-click to decrease it\n" +
-"- or click and drag for faster selection.";
-
-Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
-Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
-Calendar._TT["GO_TODAY"] = "Go Today";
-Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
-Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
-Calendar._TT["SEL_DATE"] = "Select date";
-Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
-Calendar._TT["PART_TODAY"] = " (today)";
-
-// the following is to inform that "%s" is to be the first day of week
-// %s will be replaced with the day name.
-Calendar._TT["DAY_FIRST"] = "Display %s first";
-
-// This may be locale-dependent.  It specifies the week-end days, as an array
-// of comma-separated numbers.  The numbers are from 0 to 6: 0 means Sunday, 1
-// means Monday, etc.
-Calendar._TT["WEEKEND"] = "0,6";
-
-Calendar._TT["CLOSE"] = "Close";
-Calendar._TT["TODAY"] = "Today";
-Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
-
-// date formats
-Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
-Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
-
-Calendar._TT["WK"] = "wk";
-Calendar._TT["TIME"] = "Time:";

Index: koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-setup.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-setup.js
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-setup.js
--- koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-setup.js	19 Jul 2005 20:52:44 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,181 +0,0 @@
-/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
- * ---------------------------------------------------------------------------
- *
- * The DHTML Calendar
- *
- * Details and latest version at:
- * http://dynarch.com/mishoo/calendar.epl
- *
- * This script is distributed under the GNU Lesser General Public License.
- * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
- *
- * This file defines helper functions for setting up the calendar.  They are
- * intended to help non-programmers get a working calendar on their site
- * quickly.  This script should not be seen as part of the calendar.  It just
- * shows you what one can do with the calendar, while in the same time
- * providing a quick and simple method for setting it up.  If you need
- * exhaustive customization of the calendar creation process feel free to
- * modify this code to suit your needs (this is recommended and much better
- * than modifying calendar.js itself).
- */
-
-// $Id: calendar-setup.js,v 1.1 2005/07/19 20:52:44 oleonard Exp $
-
-/**
- *  This function "patches" an input field (or other element) to use a calendar
- *  widget for date selection.
- *
- *  The "params" is a single object that can have the following properties:
- *
- *    prop. name   | description
- *  -------------------------------------------------------------------------------------------------
- *   inputField    | the ID of an input field to store the date
- *   displayArea   | the ID of a DIV or other element to show the date
- *   button        | ID of a button or other element that will trigger the calendar
- *   eventName     | event that will trigger the calendar, without the "on" prefix (default: "click")
- *   ifFormat      | date format that will be stored in the input field
- *   daFormat      | the date format that will be used to display the date in displayArea
- *   singleClick   | (true/false) wether the calendar is in single click mode or not (default: true)
- *   firstDay      | numeric: 0 to 6.  "0" means display Sunday first, "1" means display Monday first, etc.
- *   align         | alignment (default: "Br"); if you don't know what's this see the calendar documentation
- *   range         | array with 2 elements.  Default: [1900, 2999] -- the range of years available
- *   weekNumbers   | (true/false) if it's true (default) the calendar will display week numbers
- *   flat          | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
- *   flatCallback  | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
- *   disableFunc   | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
- *   onSelect      | function that gets called when a date is selected.  You don't _have_ to supply this (the default is generally okay)
- *   onClose       | function that gets called when the calendar is closed.  [default]
- *   onUpdate      | function that gets called after the date is updated in the input field.  Receives a reference to the calendar.
- *   date          | the date that the calendar will be initially displayed to
- *   showsTime     | default: false; if true the calendar will include a time selector
- *   timeFormat    | the time format; can be "12" or "24", default is "12"
- *   electric      | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
- *   step          | configures the step of the years in drop-down boxes; default: 2
- *   position      | configures the calendar absolute position; default: null
- *   cache         | if "true" (but default: "false") it will reuse the same calendar object, where possible
- *   showOthers    | if "true" (but default: "false") it will show days from other months too
- *
- *  None of them is required, they all have default values.  However, if you
- *  pass none of "inputField", "displayArea" or "button" you'll get a warning
- *  saying "nothing to setup".
- */
-Calendar.setup = function (params) {
-	function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } };
-
-	param_default("inputField",     null);
-	param_default("displayArea",    null);
-	param_default("button",         null);
-	param_default("eventName",      "click");
-	param_default("ifFormat",       "%Y/%m/%d");
-	param_default("daFormat",       "%Y/%m/%d");
-	param_default("singleClick",    true);
-	param_default("disableFunc",    'dateStatusHandler');
-	param_default("dateStatusFunc", params["disableFunc"]);	// takes precedence if both are defined
-	param_default("firstDay",       0); // defaults to "Sunday" first
-	param_default("align",          "Br");
-	param_default("range",          [1900, 2999]);
-	param_default("weekNumbers",    true);
-	param_default("flat",           null);
-	param_default("flatCallback",   null);
-	param_default("onSelect",       null);
-	param_default("onClose",        null);
-	param_default("onUpdate",       null);
-	param_default("date",           null);
-	param_default("showsTime",      false);
-	param_default("timeFormat",     "24");
-	param_default("electric",       true);
-	param_default("step",           2);
-	param_default("position",       null);
-	param_default("cache",          false);
-	param_default("showOthers",     false);
-
-	var tmp = ["inputField", "displayArea", "button"];
-	for (var i in tmp) {
-		if (typeof params[tmp[i]] == "string") {
-			params[tmp[i]] = document.getElementById(params[tmp[i]]);
-		}
-	}
-	if (!(params.flat || params.inputField || params.displayArea || params.button)) {
-		alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");
-		return false;
-	}
-
-	function onSelect(cal) {
-		var p = cal.params;
-		var update = (cal.dateClicked || p.electric);
-		if (update && p.flat) {
-			if (typeof p.flatCallback == "function")
-				p.flatCallback(cal);
-			else
-				alert("No flatCallback given -- doing nothing.");
-			return false;
-		}
-		if (update && p.inputField) {
-			p.inputField.value = cal.date.print(p.ifFormat);
-			if (typeof p.inputField.onchange == "function")
-				p.inputField.onchange();
-		}
-		if (update && p.displayArea)
-			p.displayArea.innerHTML = cal.date.print(p.daFormat);
-		if (update && p.singleClick && cal.dateClicked)
-			cal.callCloseHandler();
-		if (update && typeof p.onUpdate == "function")
-			p.onUpdate(cal);
-	};
-
-	if (params.flat != null) {
-		if (typeof params.flat == "string")
-			params.flat = document.getElementById(params.flat);
-		if (!params.flat) {
-			alert("Calendar.setup:\n  Flat specified but can't find parent.");
-			return false;
-		}
-		var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect);
-		cal.showsTime = params.showsTime;
-		cal.time24 = (params.timeFormat == "24");
-		cal.params = params;
-		cal.weekNumbers = params.weekNumbers;
-		cal.setRange(params.range[0], params.range[1]);
-		cal.setDateStatusHandler(params.dateStatusFunc);
-		cal.create(params.flat);
-		cal.show();
-		return false;
-	}
-
-	var triggerEl = params.button || params.displayArea || params.inputField;
-	triggerEl["on" + params.eventName] = function() {
-		var dateEl = params.inputField || params.displayArea;
-		var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
-		var mustCreate = false;
-		var cal = window.calendar;
-		if (!(cal && params.cache)) {
-			window.calendar = cal = new Calendar(params.firstDay,
-							     params.date,
-							     params.onSelect || onSelect,
-							     params.onClose || function(cal) { cal.hide(); });
-			cal.showsTime = params.showsTime;
-			cal.time24 = (params.timeFormat == "24");
-			cal.weekNumbers = params.weekNumbers;
-			mustCreate = true;
-		} else {
-			if (params.date)
-				cal.setDate(params.date);
-			cal.hide();
-		}
-		cal.showsOtherMonths = params.showOthers;
-		cal.yearStep = params.step;
-		cal.setRange(params.range[0], params.range[1]);
-		cal.params = params;
-		cal.setDateStatusHandler(params.dateStatusFunc);
-		cal.setDateFormat(dateFmt);
-		if (mustCreate)
-			cal.create();
-		cal.parseDate(dateEl.value || dateEl.innerHTML);
-		cal.refresh();
-		if (!params.position)
-			cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
-		else
-			cal.showAt(params.position[0], params.position[1]);
-		return false;
-	};
-};

Index: koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-system.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-system.css
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-system.css
--- koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar-system.css	19 Jul 2005 20:52:44 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,254 +0,0 @@
-/* The main calendar widget.  DIV containing a table. */
-
-.calendar {
-  position: relative;
-  display: none;
-  border: 1px solid;
-  border-color: #fff #000 #000 #fff;
-  font-size: 11px;
-  cursor: default;
-  background: Window;
-  color: WindowText;
-  font-family: tahoma,verdana,sans-serif;
-  width:250px;
-}
-
-.calendar table {
-  border: 1px solid;
-  border-color: #fff #000 #000 #fff;
-  font-size: 11px;
-  cursor: default;
-  background: Window;
-  color: WindowText;
-  font-family: tahoma,verdana,sans-serif;
-  border-collapse:separate;
-}
-
-/* Header part -- contains navigation buttons and day names. */
-
-.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
-  text-align: center;
-  padding: 1px;
-  border: 1px solid;
-  display: table-cell;
-  -moz-border-radius: 0px;
-  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
-  background: ButtonFace;
-}
-
-.calendar .nav {
-  background: ButtonFace url('menuarrow.gif') no-repeat 100% 100%;
-}
-
-.calendar thead .title { /* This holds the current "month, year" */
-  font-weight: bold;
-  padding: 1px;
-  border: 1px solid #000;
-  background: ActiveCaption;
-  color: CaptionText;
-  text-align: center;
-}
-
-.calendar thead .headrow { /* Row <TR> containing navigation buttons */
-}
-
-.calendar thead .daynames { /* Row <TR> containing the day names */
-}
-
-.calendar thead .name { /* Cells <TD> containing the day names */
-  border-bottom: 1px solid ButtonShadow;
-  padding: 2px;
-  text-align: center;
-  background: ButtonFace;
-  color: ButtonText;
-}
-
-.calendar thead .weekend { /* How a weekend day name shows in header */
-//  color: #f00;
-}
-
-.calendar thead .hilite { /* How do the buttons in header appear when hover */
-  border: 2px solid;
-  padding: 0px;
-  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
-}
-
-.calendar thead .active { /* Active (pressed) buttons in header */
-  border-width: 1px;
-  padding: 2px 0px 0px 2px;
-  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
-}
-
-/* The body part -- contains all the days in month. */
-
-.calendar tbody .day { /* Cells <TD> containing month days dates */
-  width: 2em;
-  text-align: right;
-  padding: 2px 4px 2px 2px;
-}
-.calendar tbody .day.othermonth {
-  font-size: 80%;
-  color: #aaa;
-}
-.calendar tbody .day.othermonth.oweekend {
-  color: #faa;
-}
-
-.calendar table .wn {
-  padding: 2px 3px 2px 2px;
-  border-right: 1px solid ButtonShadow;
-  background: ButtonFace;
-  color: ButtonText;
-}
-
-.calendar tbody .rowhilite td {
-//  background: Highlight;
-//  color: HighlightText;
-}
-
-.calendar tbody td.hilite { /* Hovered cells <TD> */
-  padding: 1px 3px 1px 1px;
-  border-top: 1px solid #fff;
-  border-right: 1px solid #000;
-  border-bottom: 1px solid #000;
-  border-left: 1px solid #fff;
-}
-
-.calendar tbody td.active { /* Active (pressed) cells <TD> */
-//  padding: 2px 2px 0px 2px;
-//  border: 1px solid;
-//  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
-}
-
-.calendar tbody td.selected { /* Cell showing selected date */
-  font-weight: bold;
-  border: 1px solid;
-  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
-  padding: 2px 2px 0px 2px;
-  background: ButtonFace;
-  color: ButtonText;
-}
-
-.calendar tbody td.weekend { /* Cells showing weekend days */
-//  color: #f00;
-}
-
-.calendar tbody td.today { /* Cell showing today date */
-  font-weight: bold;
-  color: #00f;
-}
-
-.calendar tbody td.disabled { color: GrayText; }
-
-.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
-  visibility: hidden;
-}
-
-.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
-  display: none;
-}
-
-/* The footer part -- status bar and "Close" button */
-
-.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
-}
-
-.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
-  background: ButtonFace;
-  padding: 1px;
-  border: 1px solid;
-  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
-  color: ButtonText;
-  text-align: center;
-}
-
-.calendar tfoot .hilite { /* Hover style for buttons in footer */
-  border-top: 1px solid #fff;
-  border-right: 1px solid #000;
-  border-bottom: 1px solid #000;
-  border-left: 1px solid #fff;
-  padding: 1px;
-  background: #e4e0d8;
-}
-
-.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
-  padding: 2px 0px 0px 2px;
-  border-top: 1px solid #000;
-  border-right: 1px solid #fff;
-  border-bottom: 1px solid #fff;
-  border-left: 1px solid #000;
-}
-
-/* Combo boxes (menus that display months/years for direct selection) */
-
-.calendar .combo {
-  position: absolute;
-  display: none;
-  width: 4em;
-  top: 0px;
-  left: 0px;
-  cursor: default;
-  border: 1px solid;
-  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
-  background: Menu;
-  color: MenuText;
-  font-size: 90%;
-  padding: 1px;
-}
-
-.calendar .combo .label,
-.calendar .combo .label-IEfix {
-  text-align: center;
-  padding: 1px;
-}
-
-.calendar .combo .label-IEfix {
-  width: 4em;
-}
-
-.calendar .combo .active {
-  padding: 0px;
-  border: 1px solid #000;
-}
-
-.calendar .combo .hilite {
-  background: Highlight;
-  color: HighlightText;
-}
-
-.calendar td.time {
-  border-top: 1px solid ButtonShadow;
-  padding: 1px 0px;
-  text-align: center;
-  background-color: ButtonFace;
-}
-
-.calendar td.time .hour,
-.calendar td.time .minute,
-.calendar td.time .ampm {
-  padding: 0px 3px 0px 4px;
-  border: 1px solid #889;
-  font-weight: bold;
-  background-color: Menu;
-}
-
-.calendar td.time .ampm {
-  text-align: center;
-}
-
-.calendar td.time .colon {
-  padding: 0px 2px 0px 3px;
-  font-weight: bold;
-}
-
-.calendar td.time span.hilite {
-  border-color: #000;
-  background-color: Highlight;
-  color: HighlightText;
-}
-
-.calendar td.time span.active {
-  border-color: #f00;
-  background-color: #000;
-  color: #0f0;
-}
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar.js
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar.js
--- koha-tmpl/intranet-tmpl/prog/en/includes/calendar/calendar.js	19 Jul 2005 20:52:44 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,1715 +0,0 @@
-/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
- * ------------------------------------------------------------------
- *
- * The DHTML Calendar, version 0.9.6 "Keep cool but don't freeze"
- *
- * Details and latest version at:
- * http://dynarch.com/mishoo/calendar.epl
- *
- * This script is distributed under the GNU Lesser General Public License.
- * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
- */
-
-// $Id: calendar.js,v 1.1 2005/07/19 20:52:44 oleonard Exp $
-
-/** The Calendar object constructor. */
-Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) {
-	// member variables
-	this.activeDiv = null;
-	this.currentDateEl = null;
-	this.getDateStatus = null;
-	this.timeout = null;
-	this.onSelected = onSelected || null;
-	this.onClose = onClose || null;
-	this.dragging = false;
-	this.hidden = false;
-	this.minYear = 1970;
-	this.maxYear = 2050;
-	this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"];
-	this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"];
-	this.isPopup = true;
-	this.weekNumbers = true;
-	this.firstDayOfWeek = firstDayOfWeek; // 0 for Sunday, 1 for Monday, etc.
-	this.showsOtherMonths = false;
-	this.dateStr = dateStr;
-	this.ar_days = null;
-	this.showsTime = false;
-	this.time24 = true;
-	this.yearStep = 2;
-	// HTML elements
-	this.table = null;
-	this.element = null;
-	this.tbody = null;
-	this.firstdayname = null;
-	// Combo boxes
-	this.monthsCombo = null;
-	this.yearsCombo = null;
-	this.hilitedMonth = null;
-	this.activeMonth = null;
-	this.hilitedYear = null;
-	this.activeYear = null;
-	// Information
-	this.dateClicked = false;
-
-	// one-time initializations
-	if (typeof Calendar._SDN == "undefined") {
-		// table of short day names
-		if (typeof Calendar._SDN_len == "undefined")
-			Calendar._SDN_len = 3;
-		var ar = new Array();
-		for (var i = 8; i > 0;) {
-			ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len);
-		}
-		Calendar._SDN = ar;
-		// table of short month names
-		if (typeof Calendar._SMN_len == "undefined")
-			Calendar._SMN_len = 3;
-		ar = new Array();
-		for (var i = 12; i > 0;) {
-			ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len);
-		}
-		Calendar._SMN = ar;
-	}
-};
-
-// ** constants
-
-/// "static", needed for event handlers.
-Calendar._C = null;
-
-/// detect a special case of "web browser"
-Calendar.is_ie = ( /msie/i.test(navigator.userAgent) &&
-		   !/opera/i.test(navigator.userAgent) );
-
-Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) );
-
-/// detect Opera browser
-Calendar.is_opera = /opera/i.test(navigator.userAgent);
-
-/// detect KHTML-based browsers
-Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);
-
-// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate
-//        library, at some point.
-
-Calendar.getAbsolutePos = function(el) {
-	var SL = 0, ST = 0;
-	var is_div = /^div$/i.test(el.tagName);
-	if (is_div && el.scrollLeft)
-		SL = el.scrollLeft;
-	if (is_div && el.scrollTop)
-		ST = el.scrollTop;
-	var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
-	if (el.offsetParent) {
-		var tmp = this.getAbsolutePos(el.offsetParent);
-		r.x += tmp.x;
-		r.y += tmp.y;
-	}
-	return r;
-};
-
-Calendar.isRelated = function (el, evt) {
-	var related = evt.relatedTarget;
-	if (!related) {
-		var type = evt.type;
-		if (type == "mouseover") {
-			related = evt.fromElement;
-		} else if (type == "mouseout") {
-			related = evt.toElement;
-		}
-	}
-	while (related) {
-		if (related == el) {
-			return true;
-		}
-		related = related.parentNode;
-	}
-	return false;
-};
-
-Calendar.removeClass = function(el, className) {
-	if (!(el && el.className)) {
-		return;
-	}
-	var cls = el.className.split(" ");
-	var ar = new Array();
-	for (var i = cls.length; i > 0;) {
-		if (cls[--i] != className) {
-			ar[ar.length] = cls[i];
-		}
-	}
-	el.className = ar.join(" ");
-};
-
-Calendar.addClass = function(el, className) {
-	Calendar.removeClass(el, className);
-	el.className += " " + className;
-};
-
-Calendar.getElement = function(ev) {
-	if (Calendar.is_ie) {
-		return window.event.srcElement;
-	} else {
-		return ev.currentTarget;
-	}
-};
-
-Calendar.getTargetElement = function(ev) {
-	if (Calendar.is_ie) {
-		return window.event.srcElement;
-	} else {
-		return ev.target;
-	}
-};
-
-Calendar.stopEvent = function(ev) {
-	ev || (ev = window.event);
-	if (Calendar.is_ie) {
-		ev.cancelBubble = true;
-		ev.returnValue = false;
-	} else {
-		ev.preventDefault();
-		ev.stopPropagation();
-	}
-	return false;
-};
-
-Calendar.addEvent = function(el, evname, func) {
-	if (el.attachEvent) { // IE
-		el.attachEvent("on" + evname, func);
-	} else if (el.addEventListener) { // Gecko / W3C
-		el.addEventListener(evname, func, true);
-	} else {
-		el["on" + evname] = func;
-	}
-};
-
-Calendar.removeEvent = function(el, evname, func) {
-	if (el.detachEvent) { // IE
-		el.detachEvent("on" + evname, func);
-	} else if (el.removeEventListener) { // Gecko / W3C
-		el.removeEventListener(evname, func, true);
-	} else {
-		el["on" + evname] = null;
-	}
-};
-
-Calendar.createElement = function(type, parent) {
-	var el = null;
-	if (document.createElementNS) {
-		// use the XHTML namespace; IE won't normally get here unless
-		// _they_ "fix" the DOM2 implementation.
-		el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
-	} else {
-		el = document.createElement(type);
-	}
-	if (typeof parent != "undefined") {
-		parent.appendChild(el);
-	}
-	return el;
-};
-
-// END: UTILITY FUNCTIONS
-
-// BEGIN: CALENDAR STATIC FUNCTIONS
-
-/** Internal -- adds a set of events to make some element behave like a button. */
-Calendar._add_evs = function(el) {
-	with (Calendar) {
-		addEvent(el, "mouseover", dayMouseOver);
-		addEvent(el, "mousedown", dayMouseDown);
-		addEvent(el, "mouseout", dayMouseOut);
-		if (is_ie) {
-			addEvent(el, "dblclick", dayMouseDblClick);
-			el.setAttribute("unselectable", true);
-		}
-	}
-};
-
-Calendar.findMonth = function(el) {
-	if (typeof el.month != "undefined") {
-		return el;
-	} else if (typeof el.parentNode.month != "undefined") {
-		return el.parentNode;
-	}
-	return null;
-};
-
-Calendar.findYear = function(el) {
-	if (typeof el.year != "undefined") {
-		return el;
-	} else if (typeof el.parentNode.year != "undefined") {
-		return el.parentNode;
-	}
-	return null;
-};
-
-Calendar.showMonthsCombo = function () {
-	var cal = Calendar._C;
-	if (!cal) {
-		return false;
-	}
-	var cal = cal;
-	var cd = cal.activeDiv;
-	var mc = cal.monthsCombo;
-	if (cal.hilitedMonth) {
-		Calendar.removeClass(cal.hilitedMonth, "hilite");
-	}
-	if (cal.activeMonth) {
-		Calendar.removeClass(cal.activeMonth, "active");
-	}
-	var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
-	Calendar.addClass(mon, "active");
-	cal.activeMonth = mon;
-	var s = mc.style;
-	s.display = "block";
-	if (cd.navtype < 0)
-		s.left = cd.offsetLeft + "px";
-	else {
-		var mcw = mc.offsetWidth;
-		if (typeof mcw == "undefined")
-			// Konqueror brain-dead techniques
-			mcw = 50;
-		s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px";
-	}
-	s.top = (cd.offsetTop + cd.offsetHeight) + "px";
-};
-
-Calendar.showYearsCombo = function (fwd) {
-	var cal = Calendar._C;
-	if (!cal) {
-		return false;
-	}
-	var cal = cal;
-	var cd = cal.activeDiv;
-	var yc = cal.yearsCombo;
-	if (cal.hilitedYear) {
-		Calendar.removeClass(cal.hilitedYear, "hilite");
-	}
-	if (cal.activeYear) {
-		Calendar.removeClass(cal.activeYear, "active");
-	}
-	cal.activeYear = null;
-	var Y = cal.date.getFullYear() + (fwd ? 1 : -1);
-	var yr = yc.firstChild;
-	var show = false;
-	for (var i = 12; i > 0; --i) {
-		if (Y >= cal.minYear && Y <= cal.maxYear) {
-			yr.firstChild.data = Y;
-			yr.year = Y;
-			yr.style.display = "block";
-			show = true;
-		} else {
-			yr.style.display = "none";
-		}
-		yr = yr.nextSibling;
-		Y += fwd ? cal.yearStep : -cal.yearStep;
-	}
-	if (show) {
-		var s = yc.style;
-		s.display = "block";
-		if (cd.navtype < 0)
-			s.left = cd.offsetLeft + "px";
-		else {
-			var ycw = yc.offsetWidth;
-			if (typeof ycw == "undefined")
-				// Konqueror brain-dead techniques
-				ycw = 50;
-			s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px";
-		}
-		s.top = (cd.offsetTop + cd.offsetHeight) + "px";
-	}
-};
-
-// event handlers
-
-Calendar.tableMouseUp = function(ev) {
-	var cal = Calendar._C;
-	if (!cal) {
-		return false;
-	}
-	if (cal.timeout) {
-		clearTimeout(cal.timeout);
-	}
-	var el = cal.activeDiv;
-	if (!el) {
-		return false;
-	}
-	var target = Calendar.getTargetElement(ev);
-	ev || (ev = window.event);
-	Calendar.removeClass(el, "active");
-	if (target == el || target.parentNode == el) {
-		Calendar.cellClick(el, ev);
-	}
-	var mon = Calendar.findMonth(target);
-	var date = null;
-	if (mon) {
-		date = new Date(cal.date);
-		if (mon.month != date.getMonth()) {
-			date.setMonth(mon.month);
-			cal.setDate(date);
-			cal.dateClicked = false;
-			cal.callHandler();
-		}
-	} else {
-		var year = Calendar.findYear(target);
-		if (year) {
-			date = new Date(cal.date);
-			if (year.year != date.getFullYear()) {
-				date.setFullYear(year.year);
-				cal.setDate(date);
-				cal.dateClicked = false;
-				cal.callHandler();
-			}
-		}
-	}
-	with (Calendar) {
-		removeEvent(document, "mouseup", tableMouseUp);
-		removeEvent(document, "mouseover", tableMouseOver);
-		removeEvent(document, "mousemove", tableMouseOver);
-		cal._hideCombos();
-		_C = null;
-		return stopEvent(ev);
-	}
-};
-
-Calendar.tableMouseOver = function (ev) {
-	var cal = Calendar._C;
-	if (!cal) {
-		return;
-	}
-	var el = cal.activeDiv;
-	var target = Calendar.getTargetElement(ev);
-	if (target == el || target.parentNode == el) {
-		Calendar.addClass(el, "hilite active");
-		Calendar.addClass(el.parentNode, "rowhilite");
-	} else {
-		if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2)))
-			Calendar.removeClass(el, "active");
-		Calendar.removeClass(el, "hilite");
-		Calendar.removeClass(el.parentNode, "rowhilite");
-	}
-	ev || (ev = window.event);
-	if (el.navtype == 50 && target != el) {
-		var pos = Calendar.getAbsolutePos(el);
-		var w = el.offsetWidth;
-		var x = ev.clientX;
-		var dx;
-		var decrease = true;
-		if (x > pos.x + w) {
-			dx = x - pos.x - w;
-			decrease = false;
-		} else
-			dx = pos.x - x;
-
-		if (dx < 0) dx = 0;
-		var range = el._range;
-		var current = el._current;
-		var count = Math.floor(dx / 10) % range.length;
-		for (var i = range.length; --i >= 0;)
-			if (range[i] == current)
-				break;
-		while (count-- > 0)
-			if (decrease) {
-				if (--i < 0)
-					i = range.length - 1;
-			} else if ( ++i >= range.length )
-				i = 0;
-		var newval = range[i];
-		el.firstChild.data = newval;
-
-		cal.onUpdateTime();
-	}
-	var mon = Calendar.findMonth(target);
-	if (mon) {
-		if (mon.month != cal.date.getMonth()) {
-			if (cal.hilitedMonth) {
-				Calendar.removeClass(cal.hilitedMonth, "hilite");
-			}
-			Calendar.addClass(mon, "hilite");
-			cal.hilitedMonth = mon;
-		} else if (cal.hilitedMonth) {
-			Calendar.removeClass(cal.hilitedMonth, "hilite");
-		}
-	} else {
-		if (cal.hilitedMonth) {
-			Calendar.removeClass(cal.hilitedMonth, "hilite");
-		}
-		var year = Calendar.findYear(target);
-		if (year) {
-			if (year.year != cal.date.getFullYear()) {
-				if (cal.hilitedYear) {
-					Calendar.removeClass(cal.hilitedYear, "hilite");
-				}
-				Calendar.addClass(year, "hilite");
-				cal.hilitedYear = year;
-			} else if (cal.hilitedYear) {
-				Calendar.removeClass(cal.hilitedYear, "hilite");
-			}
-		} else if (cal.hilitedYear) {
-			Calendar.removeClass(cal.hilitedYear, "hilite");
-		}
-	}
-	return Calendar.stopEvent(ev);
-};
-
-Calendar.tableMouseDown = function (ev) {
-	if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) {
-		return Calendar.stopEvent(ev);
-	}
-};
-
-Calendar.calDragIt = function (ev) {
-	var cal = Calendar._C;
-	if (!(cal && cal.dragging)) {
-		return false;
-	}
-	var posX;
-	var posY;
-	if (Calendar.is_ie) {
-		posY = window.event.clientY + document.body.scrollTop;
-		posX = window.event.clientX + document.body.scrollLeft;
-	} else {
-		posX = ev.pageX;
-		posY = ev.pageY;
-	}
-	cal.hideShowCovered();
-	var st = cal.element.style;
-	st.left = (posX - cal.xOffs) + "px";
-	st.top = (posY - cal.yOffs) + "px";
-	return Calendar.stopEvent(ev);
-};
-
-Calendar.calDragEnd = function (ev) {
-	var cal = Calendar._C;
-	if (!cal) {
-		return false;
-	}
-	cal.dragging = false;
-	with (Calendar) {
-		removeEvent(document, "mousemove", calDragIt);
-		removeEvent(document, "mouseup", calDragEnd);
-		tableMouseUp(ev);
-	}
-	cal.hideShowCovered();
-};
-
-Calendar.dayMouseDown = function(ev) {
-	var el = Calendar.getElement(ev);
-	if (el.disabled) {
-		return false;
-	}
-	var cal = el.calendar;
-	cal.activeDiv = el;
-	Calendar._C = cal;
-	if (el.navtype != 300) with (Calendar) {
-		if (el.navtype == 50) {
-			el._current = el.firstChild.data;
-			addEvent(document, "mousemove", tableMouseOver);
-		} else
-			addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver);
-		addClass(el, "hilite active");
-		addEvent(document, "mouseup", tableMouseUp);
-	} else if (cal.isPopup) {
-		cal._dragStart(ev);
-	}
-	if (el.navtype == -1 || el.navtype == 1) {
-		if (cal.timeout) clearTimeout(cal.timeout);
-		cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250);
-	} else if (el.navtype == -2 || el.navtype == 2) {
-		if (cal.timeout) clearTimeout(cal.timeout);
-		cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250);
-	} else {
-		cal.timeout = null;
-	}
-	return Calendar.stopEvent(ev);
-};
-
-Calendar.dayMouseDblClick = function(ev) {
-	Calendar.cellClick(Calendar.getElement(ev), ev || window.event);
-	if (Calendar.is_ie) {
-		document.selection.empty();
-	}
-};
-
-Calendar.dayMouseOver = function(ev) {
-	var el = Calendar.getElement(ev);
-	if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
-		return false;
-	}
-	if (el.ttip) {
-		if (el.ttip.substr(0, 1) == "_") {
-			el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1);
-		}
-		el.calendar.tooltips.firstChild.data = el.ttip;
-	}
-	if (el.navtype != 300) {
-		Calendar.addClass(el, "hilite");
-		if (el.caldate) {
-			Calendar.addClass(el.parentNode, "rowhilite");
-		}
-	}
-	return Calendar.stopEvent(ev);
-};
-
-Calendar.dayMouseOut = function(ev) {
-	with (Calendar) {
-		var el = getElement(ev);
-		if (isRelated(el, ev) || _C || el.disabled) {
-			return false;
-		}
-		removeClass(el, "hilite");
-		if (el.caldate) {
-			removeClass(el.parentNode, "rowhilite");
-		}
-		el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"];
-		return stopEvent(ev);
-	}
-};
-
-/**
- *  A generic "click" handler :) handles all types of buttons defined in this
- *  calendar.
- */
-Calendar.cellClick = function(el, ev) {
-	var cal = el.calendar;
-	var closing = false;
-	var newdate = false;
-	var date = null;
-	if (typeof el.navtype == "undefined") {
-		Calendar.removeClass(cal.currentDateEl, "selected");
-		Calendar.addClass(el, "selected");
-		closing = (cal.currentDateEl == el);
-		if (!closing) {
-			cal.currentDateEl = el;
-		}
-		cal.date = new Date(el.caldate);
-		date = cal.date;
-		newdate = true;
-		// a date was clicked
-		if (!(cal.dateClicked = !el.otherMonth))
-			cal._init(cal.firstDayOfWeek, date);
-	} else {
-		if (el.navtype == 200) {
-			Calendar.removeClass(el, "hilite");
-			cal.callCloseHandler();
-			return;
-		}
-		date = (el.navtype == 0) ? new Date() : new Date(cal.date);
-		// unless "today" was clicked, we assume no date was clicked so
-		// the selected handler will know not to close the calenar when
-		// in single-click mode.
-		// cal.dateClicked = (el.navtype == 0);
-		cal.dateClicked = false;
-		var year = date.getFullYear();
-		var mon = date.getMonth();
-		function setMonth(m) {
-			var day = date.getDate();
-			var max = date.getMonthDays(m);
-			if (day > max) {
-				date.setDate(max);
-			}
-			date.setMonth(m);
-		};
-		switch (el.navtype) {
-		    case 400:
-			Calendar.removeClass(el, "hilite");
-			var text = Calendar._TT["ABOUT"];
-			if (typeof text != "undefined") {
-				text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : "";
-			} else {
-				// FIXME: this should be removed as soon as lang files get updated!
-				text = "Help and about box text is not translated into this language.\n" +
-					"If you know this language and you feel generous please update\n" +
-					"the corresponding file in \"lang\" subdir to match calendar-en.js\n" +
-					"and send it back to <mishoo at infoiasi.ro> to get it into the distribution  ;-)\n\n" +
-					"Thank you!\n" +
-					"http://dynarch.com/mishoo/calendar.epl\n";
-			}
-			alert(text);
-			return;
-		    case -2:
-			if (year > cal.minYear) {
-				date.setFullYear(year - 1);
-			}
-			break;
-		    case -1:
-			if (mon > 0) {
-				setMonth(mon - 1);
-			} else if (year-- > cal.minYear) {
-				date.setFullYear(year);
-				setMonth(11);
-			}
-			break;
-		    case 1:
-			if (mon < 11) {
-				setMonth(mon + 1);
-			} else if (year < cal.maxYear) {
-				date.setFullYear(year + 1);
-				setMonth(0);
-			}
-			break;
-		    case 2:
-			if (year < cal.maxYear) {
-				date.setFullYear(year + 1);
-			}
-			break;
-		    case 100:
-			cal.setFirstDayOfWeek(el.fdow);
-			return;
-		    case 50:
-			var range = el._range;
-			var current = el.firstChild.data;
-			for (var i = range.length; --i >= 0;)
-				if (range[i] == current)
-					break;
-			if (ev && ev.shiftKey) {
-				if (--i < 0)
-					i = range.length - 1;
-			} else if ( ++i >= range.length )
-				i = 0;
-			var newval = range[i];
-			el.firstChild.data = newval;
-			cal.onUpdateTime();
-			return;
-		    case 0:
-			// TODAY will bring us here
-			if ((typeof cal.getDateStatus == "function") && cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) {
-				// remember, "date" was previously set to new
-				// Date() if TODAY was clicked; thus, it
-				// contains today date.
-				return false;
-			}
-			break;
-		}
-		if (!date.equalsTo(cal.date)) {
-			cal.setDate(date);
-			newdate = true;
-		}
-	}
-	if (newdate) {
-		cal.callHandler();
-	}
-	if (closing) {
-		Calendar.removeClass(el, "hilite");
-		cal.callCloseHandler();
-	}
-};
-
-// END: CALENDAR STATIC FUNCTIONS
-
-// BEGIN: CALENDAR OBJECT FUNCTIONS
-
-/**
- *  This function creates the calendar inside the given parent.  If _par is
- *  null than it creates a popup calendar inside the BODY element.  If _par is
- *  an element, be it BODY, then it creates a non-popup calendar (still
- *  hidden).  Some properties need to be set before calling this function.
- */
-Calendar.prototype.create = function (_par) {
-	var parent = null;
-	if (! _par) {
-		// default parent is the document body, in which case we create
-		// a popup calendar.
-		parent = document.getElementsByTagName("body")[0];
-		this.isPopup = true;
-	} else {
-		parent = _par;
-		this.isPopup = false;
-	}
-	this.date = this.dateStr ? new Date(this.dateStr) : new Date();
-
-	var table = Calendar.createElement("table");
-	this.table = table;
-	table.cellSpacing = 0;
-	table.cellPadding = 0;
-	table.calendar = this;
-	Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown);
-
-	var div = Calendar.createElement("div");
-	this.element = div;
-	div.className = "calendar";
-	if (this.isPopup) {
-		div.style.position = "absolute";
-		div.style.display = "none";
-	}
-	div.appendChild(table);
-
-	var thead = Calendar.createElement("thead", table);
-	var cell = null;
-	var row = null;
-
-	var cal = this;
-	var hh = function (text, cs, navtype) {
-		cell = Calendar.createElement("td", row);
-		cell.colSpan = cs;
-		cell.className = "button";
-		if (navtype != 0 && Math.abs(navtype) <= 2)
-			cell.className += " nav";
-		Calendar._add_evs(cell);
-		cell.calendar = cal;
-		cell.navtype = navtype;
-		if (text.substr(0, 1) != "&") {
-			cell.appendChild(document.createTextNode(text));
-		}
-		else {
-			// FIXME: dirty hack for entities
-			cell.innerHTML = text;
-		}
-		return cell;
-	};
-
-	row = Calendar.createElement("tr", thead);
-	var title_length = 6;
-	(this.isPopup) && --title_length;
-	(this.weekNumbers) && ++title_length;
-
-	hh("?", 1, 400).ttip = Calendar._TT["INFO"];
-	this.title = hh("", title_length, 300);
-	this.title.className = "title";
-	if (this.isPopup) {
-		this.title.ttip = Calendar._TT["DRAG_TO_MOVE"];
-		this.title.style.cursor = "move";
-		hh("&#x00d7;", 1, 200).ttip = Calendar._TT["CLOSE"];
-	}
-
-	row = Calendar.createElement("tr", thead);
-	row.className = "headrow";
-
-	this._nav_py = hh("&#x00ab;", 1, -2);
-	this._nav_py.ttip = Calendar._TT["PREV_YEAR"];
-
-	this._nav_pm = hh("&#x2039;", 1, -1);
-	this._nav_pm.ttip = Calendar._TT["PREV_MONTH"];
-
-	this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0);
-	this._nav_now.ttip = Calendar._TT["GO_TODAY"];
-
-	this._nav_nm = hh("&#x203a;", 1, 1);
-	this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"];
-
-	this._nav_ny = hh("&#x00bb;", 1, 2);
-	this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"];
-
-	// day names
-	row = Calendar.createElement("tr", thead);
-	row.className = "daynames";
-	if (this.weekNumbers) {
-		cell = Calendar.createElement("td", row);
-		cell.className = "name wn";
-		cell.appendChild(document.createTextNode(Calendar._TT["WK"]));
-	}
-	for (var i = 7; i > 0; --i) {
-		cell = Calendar.createElement("td", row);
-		cell.appendChild(document.createTextNode(""));
-		if (!i) {
-			cell.navtype = 100;
-			cell.calendar = this;
-			Calendar._add_evs(cell);
-		}
-	}
-	this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild;
-	this._displayWeekdays();
-
-	var tbody = Calendar.createElement("tbody", table);
-	this.tbody = tbody;
-
-	for (i = 6; i > 0; --i) {
-		row = Calendar.createElement("tr", tbody);
-		if (this.weekNumbers) {
-			cell = Calendar.createElement("td", row);
-			cell.appendChild(document.createTextNode(""));
-		}
-		for (var j = 7; j > 0; --j) {
-			cell = Calendar.createElement("td", row);
-			cell.appendChild(document.createTextNode(""));
-			cell.calendar = this;
-			Calendar._add_evs(cell);
-		}
-	}
-
-	if (this.showsTime) {
-		row = Calendar.createElement("tr", tbody);
-		row.className = "time";
-
-		cell = Calendar.createElement("td", row);
-		cell.className = "time";
-		cell.colSpan = 2;
-		cell.innerHTML = Calendar._TT["TIME"] || "&nbsp;";
-
-		cell = Calendar.createElement("td", row);
-		cell.className = "time";
-		cell.colSpan = this.weekNumbers ? 4 : 3;
-
-		(function(){
-			function makeTimePart(className, init, range_start, range_end) {
-				var part = Calendar.createElement("span", cell);
-				part.className = className;
-				part.appendChild(document.createTextNode(init));
-				part.calendar = cal;
-				part.ttip = Calendar._TT["TIME_PART"];
-				part.navtype = 50;
-				part._range = [];
-				if (typeof range_start != "number")
-					part._range = range_start;
-				else {
-					for (var i = range_start; i <= range_end; ++i) {
-						var txt;
-						if (i < 10 && range_end >= 10) txt = '0' + i;
-						else txt = '' + i;
-						part._range[part._range.length] = txt;
-					}
-				}
-				Calendar._add_evs(part);
-				return part;
-			};
-			var hrs = cal.date.getHours();
-			var mins = cal.date.getMinutes();
-			var t12 = !cal.time24;
-			var pm = (hrs > 12);
-			if (t12 && pm) hrs -= 12;
-			var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23);
-			var span = Calendar.createElement("span", cell);
-			span.appendChild(document.createTextNode(":"));
-			span.className = "colon";
-			var M = makeTimePart("minute", mins, 0, 59);
-			var AP = null;
-			cell = Calendar.createElement("td", row);
-			cell.className = "time";
-			cell.colSpan = 2;
-			if (t12)
-				AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]);
-			else
-				cell.innerHTML = "&nbsp;";
-
-			cal.onSetTime = function() {
-				var hrs = this.date.getHours();
-				var mins = this.date.getMinutes();
-				var pm = (hrs > 12);
-				if (pm && t12) hrs -= 12;
-				H.firstChild.data = (hrs < 10) ? ("0" + hrs) : hrs;
-				M.firstChild.data = (mins < 10) ? ("0" + mins) : mins;
-				if (t12)
-					AP.firstChild.data = pm ? "pm" : "am";
-			};
-
-			cal.onUpdateTime = function() {
-				var date = this.date;
-				var h = parseInt(H.firstChild.data, 10);
-				if (t12) {
-					if (/pm/i.test(AP.firstChild.data) && h < 12)
-						h += 12;
-					else if (/am/i.test(AP.firstChild.data) && h == 12)
-						h = 0;
-				}
-				var d = date.getDate();
-				var m = date.getMonth();
-				var y = date.getFullYear();
-				date.setHours(h);
-				date.setMinutes(parseInt(M.firstChild.data, 10));
-				date.setFullYear(y);
-				date.setMonth(m);
-				date.setDate(d);
-				this.dateClicked = false;
-				this.callHandler();
-			};
-		})();
-	} else {
-		this.onSetTime = this.onUpdateTime = function() {};
-	}
-
-	var tfoot = Calendar.createElement("tfoot", table);
-
-	row = Calendar.createElement("tr", tfoot);
-	row.className = "footrow";
-
-	cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300);
-	cell.className = "ttip";
-	if (this.isPopup) {
-		cell.ttip = Calendar._TT["DRAG_TO_MOVE"];
-		cell.style.cursor = "move";
-	}
-	this.tooltips = cell;
-
-	div = Calendar.createElement("div", this.element);
-	this.monthsCombo = div;
-	div.className = "combo";
-	for (i = 0; i < Calendar._MN.length; ++i) {
-		var mn = Calendar.createElement("div");
-		mn.className = Calendar.is_ie ? "label-IEfix" : "label";
-		mn.month = i;
-		mn.appendChild(document.createTextNode(Calendar._SMN[i]));
-		div.appendChild(mn);
-	}
-
-	div = Calendar.createElement("div", this.element);
-	this.yearsCombo = div;
-	div.className = "combo";
-	for (i = 12; i > 0; --i) {
-		var yr = Calendar.createElement("div");
-		yr.className = Calendar.is_ie ? "label-IEfix" : "label";
-		yr.appendChild(document.createTextNode(""));
-		div.appendChild(yr);
-	}
-
-	this._init(this.firstDayOfWeek, this.date);
-	parent.appendChild(this.element);
-};
-
-/** keyboard navigation, only for popup calendars */
-Calendar._keyEvent = function(ev) {
-	if (!window.calendar) {
-		return false;
-	}
-	(Calendar.is_ie) && (ev = window.event);
-	var cal = window.calendar;
-	var act = (Calendar.is_ie || ev.type == "keypress");
-	if (ev.ctrlKey) {
-		switch (ev.keyCode) {
-		    case 37: // KEY left
-			act && Calendar.cellClick(cal._nav_pm);
-			break;
-		    case 38: // KEY up
-			act && Calendar.cellClick(cal._nav_py);
-			break;
-		    case 39: // KEY right
-			act && Calendar.cellClick(cal._nav_nm);
-			break;
-		    case 40: // KEY down
-			act && Calendar.cellClick(cal._nav_ny);
-			break;
-		    default:
-			return false;
-		}
-	} else switch (ev.keyCode) {
-	    case 32: // KEY space (now)
-		Calendar.cellClick(cal._nav_now);
-		break;
-	    case 27: // KEY esc
-		act && cal.callCloseHandler();
-		break;
-	    case 37: // KEY left
-	    case 38: // KEY up
-	    case 39: // KEY right
-	    case 40: // KEY down
-		if (act) {
-			var date = cal.date.getDate() - 1;
-			var el = cal.currentDateEl;
-			var ne = null;
-			var prev = (ev.keyCode == 37) || (ev.keyCode == 38);
-			switch (ev.keyCode) {
-			    case 37: // KEY left
-				(--date >= 0) && (ne = cal.ar_days[date]);
-				break;
-			    case 38: // KEY up
-				date -= 7;
-				(date >= 0) && (ne = cal.ar_days[date]);
-				break;
-			    case 39: // KEY right
-				(++date < cal.ar_days.length) && (ne = cal.ar_days[date]);
-				break;
-			    case 40: // KEY down
-				date += 7;
-				(date < cal.ar_days.length) && (ne = cal.ar_days[date]);
-				break;
-			}
-			if (!ne) {
-				if (prev) {
-					Calendar.cellClick(cal._nav_pm);
-				} else {
-					Calendar.cellClick(cal._nav_nm);
-				}
-				date = (prev) ? cal.date.getMonthDays() : 1;
-				el = cal.currentDateEl;
-				ne = cal.ar_days[date - 1];
-			}
-			Calendar.removeClass(el, "selected");
-			Calendar.addClass(ne, "selected");
-			cal.date = new Date(ne.caldate);
-			cal.callHandler();
-			cal.currentDateEl = ne;
-		}
-		break;
-	    case 13: // KEY enter
-		if (act) {
-			cal.callHandler();
-			cal.hide();
-		}
-		break;
-	    default:
-		return false;
-	}
-	return Calendar.stopEvent(ev);
-};
-
-/**
- *  (RE)Initializes the calendar to the given date and firstDayOfWeek
- */
-Calendar.prototype._init = function (firstDayOfWeek, date) {
-	var today = new Date();
-	this.table.style.visibility = "hidden";
-	var year = date.getFullYear();
-	if (year < this.minYear) {
-		year = this.minYear;
-		date.setFullYear(year);
-	} else if (year > this.maxYear) {
-		year = this.maxYear;
-		date.setFullYear(year);
-	}
-	this.firstDayOfWeek = firstDayOfWeek;
-	this.date = new Date(date);
-	var month = date.getMonth();
-	var mday = date.getDate();
-	var no_days = date.getMonthDays();
-
-	// calendar voodoo for computing the first day that would actually be
-	// displayed in the calendar, even if it's from the previous month.
-	// WARNING: this is magic. ;-)
-	date.setDate(1);
-	var day1 = (date.getDay() - this.firstDayOfWeek) % 7;
-	if (day1 < 0)
-		day1 += 7;
-	date.setDate(-day1);
-	date.setDate(date.getDate() + 1);
-
-	var row = this.tbody.firstChild;
-	var MN = Calendar._SMN[month];
-	var ar_days = new Array();
-	var weekend = Calendar._TT["WEEKEND"];
-	for (var i = 0; i < 6; ++i, row = row.nextSibling) {
-		var cell = row.firstChild;
-		if (this.weekNumbers) {
-			cell.className = "day wn";
-			cell.firstChild.data = date.getWeekNumber();
-			cell = cell.nextSibling;
-		}
-		row.className = "daysrow";
-		var hasdays = false;
-		for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(date.getDate() + 1)) {
-			var iday = date.getDate();
-			var wday = date.getDay();
-			cell.className = "day";
-			var current_month = (date.getMonth() == month);
-			if (!current_month) {
-				if (this.showsOtherMonths) {
-					cell.className += " othermonth";
-					cell.otherMonth = true;
-				} else {
-					cell.className = "emptycell";
-					cell.innerHTML = "&nbsp;";
-					cell.disabled = true;
-					continue;
-				}
-			} else {
-				cell.otherMonth = false;
-				hasdays = true;
-			}
-			cell.disabled = false;
-			cell.firstChild.data = iday;
-			if (typeof this.getDateStatus == "function") {
-				var status = this.getDateStatus(date, year, month, iday);
-				if (status === true) {
-					cell.className += " disabled";
-					cell.disabled = true;
-				} else {
-					if (/disabled/i.test(status))
-						cell.disabled = true;
-					cell.className += " " + status;
-				}
-			}
-			if (!cell.disabled) {
-				ar_days[ar_days.length] = cell;
-				cell.caldate = new Date(date);
-				cell.ttip = "_";
-				if (current_month && iday == mday) {
-					cell.className += " selected";
-					this.currentDateEl = cell;
-				}
-				if (date.getFullYear() == today.getFullYear() &&
-				    date.getMonth() == today.getMonth() &&
-				    iday == today.getDate()) {
-					cell.className += " today";
-					cell.ttip += Calendar._TT["PART_TODAY"];
-				}
-				if (weekend.indexOf(wday.toString()) != -1) {
-					cell.className += cell.otherMonth ? " oweekend" : " weekend";
-				}
-			}
-		}
-		if (!(hasdays || this.showsOtherMonths))
-			row.className = "emptyrow";
-	}
-	this.ar_days = ar_days;
-	this.title.firstChild.data = Calendar._MN[month] + ", " + year;
-	this.onSetTime();
-	this.table.style.visibility = "visible";
-	// PROFILE
-	// this.tooltips.firstChild.data = "Generated in " + ((new Date()) - today) + " ms";
-};
-
-/**
- *  Calls _init function above for going to a certain date (but only if the
- *  date is different than the currently selected one).
- */
-Calendar.prototype.setDate = function (date) {
-	if (!date.equalsTo(this.date)) {
-		this._init(this.firstDayOfWeek, date);
-	}
-};
-
-/**
- *  Refreshes the calendar.  Useful if the "disabledHandler" function is
- *  dynamic, meaning that the list of disabled date can change at runtime.
- *  Just * call this function if you think that the list of disabled dates
- *  should * change.
- */
-Calendar.prototype.refresh = function () {
-	this._init(this.firstDayOfWeek, this.date);
-};
-
-/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */
-Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) {
-	this._init(firstDayOfWeek, this.date);
-	this._displayWeekdays();
-};
-
-/**
- *  Allows customization of what dates are enabled.  The "unaryFunction"
- *  parameter must be a function object that receives the date (as a JS Date
- *  object) and returns a boolean value.  If the returned value is true then
- *  the passed date will be marked as disabled.
- */
-Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) {
-	this.getDateStatus = unaryFunction;
-};
-
-/** Customization of allowed year range for the calendar. */
-Calendar.prototype.setRange = function (a, z) {
-	this.minYear = a;
-	this.maxYear = z;
-};
-
-/** Calls the first user handler (selectedHandler). */
-Calendar.prototype.callHandler = function () {
-	if (this.onSelected) {
-		this.onSelected(this, this.date.print(this.dateFormat));
-	}
-};
-
-/** Calls the second user handler (closeHandler). */
-Calendar.prototype.callCloseHandler = function () {
-	if (this.onClose) {
-		this.onClose(this);
-	}
-	this.hideShowCovered();
-};
-
-/** Removes the calendar object from the DOM tree and destroys it. */
-Calendar.prototype.destroy = function () {
-	var el = this.element.parentNode;
-	el.removeChild(this.element);
-	Calendar._C = null;
-	window.calendar = null;
-};
-
-/**
- *  Moves the calendar element to a different section in the DOM tree (changes
- *  its parent).
- */
-Calendar.prototype.reparent = function (new_parent) {
-	var el = this.element;
-	el.parentNode.removeChild(el);
-	new_parent.appendChild(el);
-};
-
-// This gets called when the user presses a mouse button anywhere in the
-// document, if the calendar is shown.  If the click was outside the open
-// calendar this function closes it.
-Calendar._checkCalendar = function(ev) {
-	if (!window.calendar) {
-		return false;
-	}
-	var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
-	for (; el != null && el != calendar.element; el = el.parentNode);
-	if (el == null) {
-		// calls closeHandler which should hide the calendar.
-		window.calendar.callCloseHandler();
-		return Calendar.stopEvent(ev);
-	}
-};
-
-/** Shows the calendar. */
-Calendar.prototype.show = function () {
-	var rows = this.table.getElementsByTagName("tr");
-	for (var i = rows.length; i > 0;) {
-		var row = rows[--i];
-		Calendar.removeClass(row, "rowhilite");
-		var cells = row.getElementsByTagName("td");
-		for (var j = cells.length; j > 0;) {
-			var cell = cells[--j];
-			Calendar.removeClass(cell, "hilite");
-			Calendar.removeClass(cell, "active");
-		}
-	}
-	this.element.style.display = "block";
-	this.hidden = false;
-	if (this.isPopup) {
-		window.calendar = this;
-		Calendar.addEvent(document, "keydown", Calendar._keyEvent);
-		Calendar.addEvent(document, "keypress", Calendar._keyEvent);
-		Calendar.addEvent(document, "mousedown", Calendar._checkCalendar);
-	}
-	this.hideShowCovered();
-};
-
-/**
- *  Hides the calendar.  Also removes any "hilite" from the class of any TD
- *  element.
- */
-Calendar.prototype.hide = function () {
-	if (this.isPopup) {
-		Calendar.removeEvent(document, "keydown", Calendar._keyEvent);
-		Calendar.removeEvent(document, "keypress", Calendar._keyEvent);
-		Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar);
-	}
-	this.element.style.display = "none";
-	this.hidden = true;
-	this.hideShowCovered();
-};
-
-/**
- *  Shows the calendar at a given absolute position (beware that, depending on
- *  the calendar element style -- position property -- this might be relative
- *  to the parent's containing rectangle).
- */
-Calendar.prototype.showAt = function (x, y) {
-	var s = this.element.style;
-	s.left = x + "px";
-	s.top = y + "px";
-	this.show();
-};
-
-/** Shows the calendar near a given element. */
-Calendar.prototype.showAtElement = function (el, opts) {
-	var self = this;
-	var p = Calendar.getAbsolutePos(el);
-	if (!opts || typeof opts != "string") {
-		this.showAt(p.x, p.y + el.offsetHeight);
-		return true;
-	}
-	function fixPosition(box) {
-		if (box.x < 0)
-			box.x = 0;
-		if (box.y < 0)
-			box.y = 0;
-		var cp = document.createElement("div");
-		var s = cp.style;
-		s.position = "absolute";
-		s.right = s.bottom = s.width = s.height = "0px";
-		document.body.appendChild(cp);
-		var br = Calendar.getAbsolutePos(cp);
-		document.body.removeChild(cp);
-		if (Calendar.is_ie) {
-			br.y += document.body.scrollTop;
-			br.x += document.body.scrollLeft;
-		} else {
-			br.y += window.scrollY;
-			br.x += window.scrollX;
-		}
-		var tmp = box.x + box.width - br.x;
-		if (tmp > 0) box.x -= tmp;
-		tmp = box.y + box.height - br.y;
-		if (tmp > 0) box.y -= tmp;
-	};
-	this.element.style.display = "block";
-	Calendar.continuation_for_the_fucking_khtml_browser = function() {
-		var w = self.element.offsetWidth;
-		var h = self.element.offsetHeight;
-		self.element.style.display = "none";
-		var valign = opts.substr(0, 1);
-		var halign = "l";
-		if (opts.length > 1) {
-			halign = opts.substr(1, 1);
-		}
-		// vertical alignment
-		switch (valign) {
-		    case "T": p.y -= h; break;
-		    case "B": p.y += el.offsetHeight; break;
-		    case "C": p.y += (el.offsetHeight - h) / 2; break;
-		    case "t": p.y += el.offsetHeight - h; break;
-		    case "b": break; // already there
-		}
-		// horizontal alignment
-		switch (halign) {
-		    case "L": p.x -= w; break;
-		    case "R": p.x += el.offsetWidth; break;
-		    case "C": p.x += (el.offsetWidth - w) / 2; break;
-		    case "r": p.x += el.offsetWidth - w; break;
-		    case "l": break; // already there
-		}
-		p.width = w;
-		p.height = h + 40;
-		self.monthsCombo.style.display = "none";
-		fixPosition(p);
-		self.showAt(p.x, p.y);
-	};
-	if (Calendar.is_khtml)
-		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
-	else
-		Calendar.continuation_for_the_fucking_khtml_browser();
-};
-
-/** Customizes the date format. */
-Calendar.prototype.setDateFormat = function (str) {
-	this.dateFormat = str;
-};
-
-/** Customizes the tooltip date format. */
-Calendar.prototype.setTtDateFormat = function (str) {
-	this.ttDateFormat = str;
-};
-
-/**
- *  Tries to identify the date represented in a string.  If successful it also
- *  calls this.setDate which moves the calendar to the given date.
- */
-Calendar.prototype.parseDate = function (str, fmt) {
-	var y = 0;
-	var m = -1;
-	var d = 0;
-	var a = str.split(/\W+/);
-	if (!fmt) {
-		fmt = this.dateFormat;
-	}
-	var b = fmt.match(/%./g);
-	var i = 0, j = 0;
-	var hr = 0;
-	var min = 0;
-	for (i = 0; i < a.length; ++i) {
-		if (!a[i])
-			continue;
-		switch (b[i]) {
-		    case "%d":
-		    case "%e":
-			d = parseInt(a[i], 10);
-			break;
-
-		    case "%m":
-			m = parseInt(a[i], 10) - 1;
-			break;
-
-		    case "%Y":
-		    case "%y":
-			y = parseInt(a[i], 10);
-			(y < 100) && (y += (y > 29) ? 1900 : 2000);
-			break;
-
-		    case "%b":
-		    case "%B":
-			for (j = 0; j < 12; ++j) {
-				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; }
-			}
-			break;
-
-		    case "%H":
-		    case "%I":
-		    case "%k":
-		    case "%l":
-			hr = parseInt(a[i], 10);
-			break;
-
-		    case "%P":
-		    case "%p":
-			if (/pm/i.test(a[i]) && hr < 12)
-				hr += 12;
-			break;
-
-		    case "%M":
-			min = parseInt(a[i], 10);
-			break;
-		}
-	}
-	if (y != 0 && m != -1 && d != 0) {
-		this.setDate(new Date(y, m, d, hr, min, 0));
-		return;
-	}
-	y = 0; m = -1; d = 0;
-	for (i = 0; i < a.length; ++i) {
-		if (a[i].search(/[a-zA-Z]+/) != -1) {
-			var t = -1;
-			for (j = 0; j < 12; ++j) {
-				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; }
-			}
-			if (t != -1) {
-				if (m != -1) {
-					d = m+1;
-				}
-				m = t;
-			}
-		} else if (parseInt(a[i], 10) <= 12 && m == -1) {
-			m = a[i]-1;
-		} else if (parseInt(a[i], 10) > 31 && y == 0) {
-			y = parseInt(a[i], 10);
-			(y < 100) && (y += (y > 29) ? 1900 : 2000);
-		} else if (d == 0) {
-			d = a[i];
-		}
-	}
-	if (y == 0) {
-		var today = new Date();
-		y = today.getFullYear();
-	}
-	if (m != -1 && d != 0) {
-		this.setDate(new Date(y, m, d, hr, min, 0));
-	}
-};
-
-Calendar.prototype.hideShowCovered = function () {
-	var self = this;
-	Calendar.continuation_for_the_fucking_khtml_browser = function() {
-		function getVisib(obj){
-			var value = obj.style.visibility;
-			if (!value) {
-				if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C
-					if (!Calendar.is_khtml)
-						value = document.defaultView.
-							getComputedStyle(obj, "").getPropertyValue("visibility");
-					else
-						value = '';
-				} else if (obj.currentStyle) { // IE
-					value = obj.currentStyle.visibility;
-				} else
-					value = '';
-			}
-			return value;
-		};
-
-		var tags = new Array("applet", "iframe", "select");
-		var el = self.element;
-
-		var p = Calendar.getAbsolutePos(el);
-		var EX1 = p.x;
-		var EX2 = el.offsetWidth + EX1;
-		var EY1 = p.y;
-		var EY2 = el.offsetHeight + EY1;
-
-		for (var k = tags.length; k > 0; ) {
-			var ar = document.getElementsByTagName(tags[--k]);
-			var cc = null;
-
-			for (var i = ar.length; i > 0;) {
-				cc = ar[--i];
-
-				p = Calendar.getAbsolutePos(cc);
-				var CX1 = p.x;
-				var CX2 = cc.offsetWidth + CX1;
-				var CY1 = p.y;
-				var CY2 = cc.offsetHeight + CY1;
-
-				if (self.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
-					if (!cc.__msh_save_visibility) {
-						cc.__msh_save_visibility = getVisib(cc);
-					}
-					cc.style.visibility = cc.__msh_save_visibility;
-				} else {
-					if (!cc.__msh_save_visibility) {
-						cc.__msh_save_visibility = getVisib(cc);
-					}
-					cc.style.visibility = "hidden";
-				}
-			}
-		}
-	};
-	if (Calendar.is_khtml)
-		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
-	else
-		Calendar.continuation_for_the_fucking_khtml_browser();
-};
-
-/** Internal function; it displays the bar with the names of the weekday. */
-Calendar.prototype._displayWeekdays = function () {
-	var fdow = this.firstDayOfWeek;
-	var cell = this.firstdayname;
-	var weekend = Calendar._TT["WEEKEND"];
-	for (var i = 0; i < 7; ++i) {
-		cell.className = "day name";
-		var realday = (i + fdow) % 7;
-		if (i) {
-			cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]);
-			cell.navtype = 100;
-			cell.calendar = this;
-			cell.fdow = realday;
-			Calendar._add_evs(cell);
-		}
-		if (weekend.indexOf(realday.toString()) != -1) {
-			Calendar.addClass(cell, "weekend");
-		}
-		cell.firstChild.data = Calendar._SDN[(i + fdow) % 7];
-		cell = cell.nextSibling;
-	}
-};
-
-/** Internal function.  Hides all combo boxes that might be displayed. */
-Calendar.prototype._hideCombos = function () {
-	this.monthsCombo.style.display = "none";
-	this.yearsCombo.style.display = "none";
-};
-
-/** Internal function.  Starts dragging the element. */
-Calendar.prototype._dragStart = function (ev) {
-	if (this.dragging) {
-		return;
-	}
-	this.dragging = true;
-	var posX;
-	var posY;
-	if (Calendar.is_ie) {
-		posY = window.event.clientY + document.body.scrollTop;
-		posX = window.event.clientX + document.body.scrollLeft;
-	} else {
-		posY = ev.clientY + window.scrollY;
-		posX = ev.clientX + window.scrollX;
-	}
-	var st = this.element.style;
-	this.xOffs = posX - parseInt(st.left);
-	this.yOffs = posY - parseInt(st.top);
-	with (Calendar) {
-		addEvent(document, "mousemove", calDragIt);
-		addEvent(document, "mouseup", calDragEnd);
-	}
-};
-
-// BEGIN: DATE OBJECT PATCHES
-
-/** Adds the number of days array to the Date object. */
-Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
-
-/** Constants used for time computations */
-Date.SECOND = 1000 /* milliseconds */;
-Date.MINUTE = 60 * Date.SECOND;
-Date.HOUR   = 60 * Date.MINUTE;
-Date.DAY    = 24 * Date.HOUR;
-Date.WEEK   =  7 * Date.DAY;
-
-/** Returns the number of days in the current month */
-Date.prototype.getMonthDays = function(month) {
-	var year = this.getFullYear();
-	if (typeof month == "undefined") {
-		month = this.getMonth();
-	}
-	if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) {
-		return 29;
-	} else {
-		return Date._MD[month];
-	}
-};
-
-/** Returns the number of day in the year. */
-Date.prototype.getDayOfYear = function() {
-	var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
-	var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
-	var time = now - then;
-	return Math.floor(time / Date.DAY);
-};
-
-/** Returns the number of the week in year, as defined in ISO 8601. */
-Date.prototype.getWeekNumber = function() {
-	var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
-	var DoW = d.getDay();
-	d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu
-	var ms = d.valueOf(); // GMT
-	d.setMonth(0);
-	d.setDate(4); // Thu in Week 1
-	return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
-};
-
-/** Checks dates equality (ignores time) */
-Date.prototype.equalsTo = function(date) {
-	return ((this.getFullYear() == date.getFullYear()) &&
-		(this.getMonth() == date.getMonth()) &&
-		(this.getDate() == date.getDate()) &&
-		(this.getHours() == date.getHours()) &&
-		(this.getMinutes() == date.getMinutes()));
-};
-
-/** Prints the date in a string according to the given format. */
-Date.prototype.print = function (str) {
-	var m = this.getMonth();
-	var d = this.getDate();
-	var y = this.getFullYear();
-	var wn = this.getWeekNumber();
-	var w = this.getDay();
-	var s = {};
-	var hr = this.getHours();
-	var pm = (hr >= 12);
-	var ir = (pm) ? (hr - 12) : hr;
-	var dy = this.getDayOfYear();
-	if (ir == 0)
-		ir = 12;
-	var min = this.getMinutes();
-	var sec = this.getSeconds();
-	s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N]
-	s["%A"] = Calendar._DN[w]; // full weekday name
-	s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N]
-	s["%B"] = Calendar._MN[m]; // full month name
-	// FIXME: %c : preferred date and time representation for the current locale
-	s["%C"] = 1 + Math.floor(y / 100); // the century number
-	s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31)
-	s["%e"] = d; // the day of the month (range 1 to 31)
-	// FIXME: %D : american date style: %m/%d/%y
-	// FIXME: %E, %F, %G, %g, %h (man strftime)
-	s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format)
-	s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format)
-	s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366)
-	s["%k"] = hr;		// hour, range 0 to 23 (24h format)
-	s["%l"] = ir;		// hour, range 1 to 12 (12h format)
-	s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12
-	s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59
-	s["%n"] = "\n";		// a newline character
-	s["%p"] = pm ? "PM" : "AM";
-	s["%P"] = pm ? "pm" : "am";
-	// FIXME: %r : the time in am/pm notation %I:%M:%S %p
-	// FIXME: %R : the time in 24-hour notation %H:%M
-	s["%s"] = Math.floor(this.getTime() / 1000);
-	s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59
-	s["%t"] = "\t";		// a tab character
-	// FIXME: %T : the time in 24-hour notation (%H:%M:%S)
-	s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn;
-	s["%u"] = w + 1;	// the day of the week (range 1 to 7, 1 = MON)
-	s["%w"] = w;		// the day of the week (range 0 to 6, 0 = SUN)
-	// FIXME: %x : preferred date representation for the current locale without the time
-	// FIXME: %X : preferred time representation for the current locale without the date
-	s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
-	s["%Y"] = y;		// year with the century
-	s["%%"] = "%";		// a literal '%' character
-
-	var re = /%./g;
-	if (!Calendar.is_ie5)
-		return str.replace(re, function (par) { return s[par] || par; });
-
-	var a = str.match(re);
-	for (var i = 0; i < a.length; i++) {
-		var tmp = s[a[i]];
-		if (tmp) {
-			re = new RegExp(a[i], 'g');
-			str = str.replace(re, tmp);
-		}
-	}
-
-	return str;
-};
-
-Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
-Date.prototype.setFullYear = function(y) {
-	var d = new Date(this);
-	d.__msh_oldSetFullYear(y);
-	if (d.getMonth() != this.getMonth())
-		this.setDate(28);
-	this.__msh_oldSetFullYear(y);
-};
-
-// END: DATE OBJECT PATCHES
-
-
-// global object that remembers the calendar
-window.calendar = null;

Index: koha-tmpl/intranet-tmpl/prog/en/includes/countryCodes/countryCodes.dat
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/countryCodes/countryCodes.dat
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/countryCodes/countryCodes.dat
--- koha-tmpl/intranet-tmpl/prog/en/includes/countryCodes/countryCodes.dat	19 Jul 2005 20:52:45 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-00 = USA I
-93 = Australia
-94 = New Zealand
-779 = Argentina
-773 = Uruguay
-30 = France I
-84 = Spain
-45 = Japan
-777 = Bolivia
-80 = Italy I
-73 = Sweden
-40 = Germany
-31 = France II
-254 = Ucrania

Index: koha-tmpl/intranet-tmpl/prog/en/includes/javascript/members.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/javascript/members.js
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/javascript/members.js
--- koha-tmpl/intranet-tmpl/prog/en/includes/javascript/members.js	24 Aug 2006 08:28:28 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,178 +0,0 @@
-<script language="JavaScript" type="text/javascript">
-function CheckDate(d) {
-	if (d!="")
-{
-      // Cette fonction vérifie le format JJ/MM/AAAA saisi et la validité de la date.
-      // Le séparateur est défini dans la variable separateur
-      var amin=1900; // année mini
-      var amax=2100; // année maxi
-      var separateur="/"; // separateur entre jour/mois/annee
-      var j=(d.substring(0,2));
-      var m=(d.substring(3,5));
-      var a=(d.substring(6));
-      var ok=1;
-	var msg; 
-      if ( ((isNaN(j))||(j<1)||(j>31)) && (ok==1) ) {
-        msg = _("day not correct."); 
-	alert(msg); ok=0;
-      }
-      if ( ((isNaN(m))||(m<1)||(m>12)) && (ok==1) ) {
-        msg = _("month not correct.");
-	 alert(msg); ok=0;
-      }
-      if ( ((isNaN(a))||(a<amin)||(a>amax)) && (ok==1) ) {
-         msg = _("years not correct."); 
-	alert(msg); ok=0;
-      }
-      if ( ((d.substring(2,3)!=separateur)||(d.substring(5,6)!=separateur)) && (ok==1) ) {
-         alert("Separator must be "+separateur); ok=0;
-      }
-      return ok;
-   }
-}   
-   
-
-
-
-//function test if member is unique and if it's right the member is registred
-function unique() {
-var msg1;
-var msg2;
-if (  document.form.check_member.value==1){
-	if (document.form.categorycode.value != "I"){
-		
-		msg1 += _("Warning  !!!! Duplicate borrower!!!!");
-		alert(msg1);
-	check_form_borrowers(0);
-	document.form.submit();
-	
-	}else{
-		msg2 += _("Warning !!!! Duplicate organisation!!!!");
-		alert(msg2);
-	check_form_borrowers(0);
-	}
-}
-else
-{
-	document.form.submit();
-}
-
-}
-//end function
-//function test if date enrooled < date expiry
-function check_manip_date(status) {
-if (status=='verify'){
-// this part of function('verify') is used to check if dateenrolled<date expiry
-var myDate1=document.form.dateenrolled.value.split ('/');
-var myDate2=document.form.dateexpiry.value.split ('/');
-	if ((myDate1[2]>myDate2[2])||(myDate1[2]==myDate2[2] && myDate1[1]>myDate2[1])||(myDate1[2]==myDate2[2] && myDate1[1]>=myDate2[1] && myDate1[0]>=myDate2[0]))
-	
-		{ 
-		var msg = _("Warning !!! check date expiry  > date enrolment");
-		alert(msg);
-		document.form.dateexpiry.value="";
-		document.form.dateexpiry.setfocus;
-		}
-	}
-}
-//end function
-
-
-// function to test all fields in forms and nav in different forms(1 ,2 or 3)
- function check_form_borrowers(nav){
-var statut=0;
-if (nav < document.form.step.value) {
-	document.form.step.value=nav;
-	if ((document.form.step.value==0) && document.form.check_member.value == 1 )
-	{
- 	
-		if (document.form_double.answernodouble)	{
-			if( (!(document.form_double.answernodouble.checked))){
-				document.form.nodouble.value=0;
-			}
-			else {
-			document.form.nodouble.value=1;
-			}
- 		}
- 	} 
-	document.form.submit();
-	
-
-} else {
-	if (document.form.BorrowerMandatoryfield.value==''||document.form.FormFieldList.value=='' )
-	{}
-	else
-	{
-	var champ_verif = document.form.BorrowerMandatoryfield.value.split ('|');
- 	var champ_form= document.form.FormFieldList.value.split('|');
-		var message ="The following fields are mandatory :\n";
-		var message_champ="";
-	for (var j=0; j<champ_form.length; j++){ 
-		if (document.getElementsByName(""+champ_form[j]+"")[0]){
-			for (var i=0; i<champ_verif.length; i++) {
-					if (document.getElementsByName(""+champ_verif[i]+"")[0]) {
-						var val_champ=eval("document.form."+champ_verif[i]+".value");
-						var ref_champ=eval("document.form."+champ_verif[i]);
-						var val_form=eval("document.form."+champ_form[j]+".value");
-						if (champ_verif[i] == champ_form[j]){
-							//check if it's a select
-							if (ref_champ.type=='select-one'){
-								if (ref_champ.options[0].selected ){
-									// action if field is empty
-									message_champ+=champ_verif[i]+"\n";
-									//test to konw if u must show a message with error
-									statut=1;
-								}
-							}else {
-								if ( val_champ == '' ) {
-									// action if the field is not empty
-									message_champ+=champ_verif[i]+"\n";
-									statut=1;
-								}	
-							}
-						}
-					}
-			}
-		}
-	}
-	}
-//borrowers form 2 test if u chcked no to the quetsion of double 
- 	if (document.form.step.value==2 && statut!=1 && document.form.check_member.value > 0 )
-	{
-		
-  		
-			if (!(document.form_double.answernodouble.checked)){
-					
-				message ="";
-					message_champ+=_("Please confirm suspicious duplicate borrower !!! ");
-					statut=1;
-					document.form.nodouble.value=0;
-			}
-			else {
-			document.form.nodouble.value=1;
-			}
- 	}
-		
-			if (statut==1){
-			//alert if at least 1 error
-				alert(message+"\n"+message_champ);
-			}
-			else 
-			{
-			document.form.step=nav;
-			document.form.submit();
-			}
-		}
-
-}
-function Dopop(link) {
-// // 	var searchstring=document.form.value[i].value;
-	newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=no,top');
-}
-
-function Dopopguarantor(link) {
-
-	newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=no,top');
-}
-
-</script>

Index: koha-tmpl/intranet-tmpl/prog/en/includes/labelConfig/itemsLabelConfig.conf
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes/labelConfig/itemsLabelConfig.conf
diff -N koha-tmpl/intranet-tmpl/prog/en/includes/labelConfig/itemsLabelConfig.conf
--- koha-tmpl/intranet-tmpl/prog/en/includes/labelConfig/itemsLabelConfig.conf	19 Jul 2005 20:52:45 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,8 +0,0 @@
-marginBottom = 25
-pageType = A4
-columns = 5
-systemDpi = 96
-labelHeigth = 21
-rows = 13
-marginLeft = 2
-labelWidth = 41

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/alt_menu-serials.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/alt_menu-serials.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/alt_menu-serials.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/alt_menu-serials.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,6 +0,0 @@
-    <p>
-         <a href="/cgi-bin/koha/serials/serials-home.pl">Search/Add Subscription</a>
-         <a href="/cgi-bin/koha/serials/serials-home.pl?routing=1">Create/Edit Routing List</a>
-         <a href="/cgi-bin/koha/serials/lateissues.pl">Outstanding Issues</a>
-	 <a href="/cgi-bin/koha/serials/claims.pl">Claims</a>
-    </p>

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-barcodes.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-barcodes.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-barcodes.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-barcodes.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,5 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-close-calendar.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-close-calendar.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-close-calendar.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-close-calendar.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
-<style type="text/css"> 
-	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);
-</style>
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css" />
-<script type="text/javascript" src="<!-- TMPL_VAR name='themelang' -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang"-->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-</head>
-
-<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-close.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-close.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-close.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-close.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
-<style type="text/css"> 
-	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes_npl/intranet.css);
-</style>
-</head>
-
-<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-open.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-open.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-open.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/doc-head-open.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,5 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/favicon.ico
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/favicon.ico
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/favicon.ico
Binary files /tmp/cvsukqkkY and /dev/null differ

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/holidays-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/holidays-bottom.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/holidays-bottom.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/holidays-bottom.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
-
-
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/holidays-top.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/holidays-top.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/holidays-top.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/holidays-top.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,164 +0,0 @@
-</title>
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-
-<!-- Estos scripts permiten manejar calendario de fechas. -->
-<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- **************************************************** -->
-
-<script language="JavaScript" type="text/javascript">
-	// Captura el evento onmousemove para cualquier navegador
-	if (document.layers) { // Netscape
-		document.captureEvents(Event.MOUSEMOVE);
-	    document.onmousemove = captureMousePosition;
-	} else if (document.all) { // Internet Explorer
-	    document.onmousemove = captureMousePosition;
-	} else if (document.getElementById) { // Netcsape 6
-	    document.onmousemove = captureMousePosition;
-	}
-
-	var mouseXMax = 0;
-	var mouseYMax = 0;
-	var mouseX = 0;
-	var mouseY = 0;
-
-	function captureMousePosition(e) {
-	    if (document.layers) {
-		    mouseX = e.pageX;
-			mouseY = e.pageY;
-	        mouseXMax = window.innerWidth + window.pageXOffset;
-		    mouseYMax = window.innerHeight + window.pageYOffset;
-	    } else if (document.all) {
-		    mouseX = window.event.x + document.body.scrollLeft;
-	        mouseY = window.event.y + document.body.scrollTop;
-	        mouseXMax = document.body.clientWidth + document.body.scrollLeft;
-	        mouseYMax = document.body.clientHeight + document.body.scrollTop;
-	    } else if (document.getElementById) {
-	        mouseX = e.pageX;
-		    mouseY = e.pageY;
-	        mouseXMax = window.innerWidth + window.pageXOffset;
-	        mouseYMax = window.innerHeight + window.pageYOffset;
-	    }
-	}
-
-	function holidayOperation(formObject, opType) {
-		var op = document.getElementsByName('operation');
-		op[0].value = opType;
-		formObject.submit();
-	}
-
-	// This function shows the "Show Holiday" panel //
-	function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description) {
-		var panel = document.getElementById('showHoliday');
-		panel.style.display = 'inline';
-		document.getElementById('newHoliday').style.display = 'none';
-		panel.style.top = mouseYMax/2;
-		panel.style.left = (mouseXMax/2) - 250;
-		document.getElementById('showDayname').value = dayName;
-		document.getElementById('showBranchName').value = document.getElementById('branch').value;
-		document.getElementById('showDay').value = day;
-		document.getElementById('showMonth').value = month;
-		document.getElementById('showYear').value = year;
-		document.getElementById('showTitle').value = title;
-		document.getElementById('showDescription').value = description;
-		document.getElementsByName('showWeekday')[0].value = weekDay;
-		if (exceptionPosibility == 1) {
-			document.getElementById('exceptionPosibility').style.display = 'inline';
-		} else {
-			document.getElementById('exceptionPosibility').style.display = 'none';
-		}
-	}
-
-	// This function shows the "Add Holiday" panel //
-	function newHoliday (dayName, day, month, year, weekDay) {
-		var panel = document.getElementById('newHoliday');
-		panel.style.display = 'inline';
-		document.getElementById('showHoliday').style.display = 'none';
-		panel.style.top = mouseYMax/2;
-		panel.style.left = (mouseXMax/2)  - 250;
-		document.getElementById('newDayname').value = dayName;
-		document.getElementById('newBranchName').value = document.getElementById('branch').value;
-		document.getElementById('newDay').value = day;
-		document.getElementById('newMonth').value = month;
-		document.getElementById('newYear').value = year;
-		document.getElementsByName('newWeekday')[0].value = weekDay;
-	}
-
-	function hidePanel(aPanelName) {
-		document.getElementById(aPanelName).style.display = 'none';
-	}
-
-	function changeBranch () {
-		var branch = document.getElementById('branch').options[document.getElementById('branch').selectedIndex].value;
-		location.href='/cgi-bin/koha/tools/holidays.pl?branch=' + branch;
-	}
-
-	function additionalInformation (anExplanation) {
-		var panel = document.getElementById('information');
-		var paragraph = document.getElementById('explanation');
-		panel.style.display = 'inline'
-		panel.style.top = mouseY;
-		panel.style.left = mouseX;
-		var info = document.createTextNode(anExplanation);
-		if (paragraph.hasChildNodes()) {
-			paragraph.removeChild(paragraph.lastChild);
-		}
-		paragraph.appendChild(info);
-	}
-
-	function Help() {
-		newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
-	}
-</script>
-
-<style type="text/css">
-.normalday { 
-	background-color: #EDEDED;
-	color: Black; 
-	border:1px solid #000000;
-}
-
-.exception {
-	background-color: #EDEDED;
-	color: Black; 		
-	border:1px solid #000000;
-}
-
-.holiday { 
-	background-color: red;
-	color: Black; 
-	border:1px solid #000000;
-}
-
-.repeatableday { 
-	background-color: yellow;
-	color: Black; 
-	border:1px solid #000000;
-}
-
-.information {
-	z-index:1;
-	background-color: #DCD2F1;
-	width:300px;
-	display:none;
-	border:1px solid #000000;
-	color: #000000;
-	font-size: 8pt;
-	font-weight: bold;
-    background-color: #FFD700;
-	cursor: pointer;
-	padding:2px;
-}
-
-.panel {
-	z-index:1;
-	width:500px;
-	display:none;
-	border:1px solid #000000;
-	padding:0px;
-}
-
-</style>
-
-

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/intranet-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/intranet-bottom.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/intranet-bottom.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/intranet-bottom.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-</div> <!-- the main bloc -->
-</body>
-</html>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/intranet.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/intranet.css
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/intranet.css
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/intranet.css	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,204 +0,0 @@
-body {
-	font-family : Verdana, Geneva, Arial, sans-serif;
-	font-size : .9em;
-}
-
-table {
-	border-collapse : collapse;
-	border-top : 1px solid #CCCCCC;
-	border-right : 1px solid #CCCCCC;
-	margin : 1em 0;
-}
-
-caption {
-	font-size : 140%;
-	text-align : left;
-	font-weight : bold;
-}
-
-td,th {
-	border-left : 1px solid #CCCCCC;
-	border-bottom : 1px solid #CCCCCC;
-	padding : 5px;
-}
-
-th {
-	background-color : #CCCCCC;
-	border-left : 1px solid #999999;
-	border-bottom : 1px solid #999999;
-}
-
-th[scope=row] {
-	background-color : #EEEEEE;
-	text-align : right;
-}
-
-input {
-	font-size:0.9em;
-}
-
-select {
-	font-size:0.9em;
-}
-
-input[type=submit], input[type=button], input[type=reset] {
-	background-color : #6699cc;
-	color : #FFFFFF;
-	font-size : 1em;
-	font-weight : bold;
-}
-
-tr.highlight td, tr.highlight th {
-	background-color : #EEEEEE;
-}
-
-#admin_stopwords_select UL {
-   width: 600px;
-}
-
-#admin_stopwords_select UL LI {
-   white-space: nowrap;
-}
-
-legend {
-	font-size:120%;
-	font-weight:bold;
-}
-
-.problem {
-	color: white;
-	background-color:red;
-}
-
-/* css styles for reserves color alerts */
-.onloan {
-	background-color: #FFED3D;
-}
-
-.reserved {
-	background-color: #8EBAFF;
-}
-
-.transfered {
-	background-color: #F9FF9A;
-}
-
-.inwait {
-	background-color: #33CC99;
-}
-
-.other {
-	background-color: #FF0000;
-}
-
-/* end of css styles for reserves color alerts */
-
-/* MAIN MENU STYLES */
-#nav {
-	position: absolute;
-	left: 1px;
-	margin: 0% 0% 0% 5px;
-	padding: 0px;
-	width: 16%;
-}
-
-
-#nav a {
-    display:block;
-    text-decoration:none;
-    color:black;
-}
-#nav a:hover {
-    display:block;
-    background-color:red;
-    color:white;
-}
-
-#nav .submit {
-	font-size: 9px;
-}
-
-#nav a {
-	font-family: Tahoma, arial, geneva, sans-serif;
-	font-weight: bold;
-	text-decoration: none;
-}
-
-#nav h4 {
-	font-size: 12px;
-	font-weight: bold;
-	margin: 0px;
-	padding: 0px;
-	text-align: left;
-}
-
-#nav input {
-	font-size: .8em;
-}
-
-#nav label {
-	font-size: 10px;
-}
-
-#nav ul {
-	margin: 0px;
-	padding: 0px;
-}
-
-#nav ul li {
-	font-size: .8em;
-	list-style: none;
-	padding: 3px 3px 10px 3px;
-	text-align: right;
-	width: 100%;
-}
-
-#nav ul ul {
-	margin: 0px 0px 0px 5px;
-}
-
-#nav ul ul li {
-	font-size: .9em;
-	list-style: none;
-	margin: 0px 0px 0px 0px;
-	padding: 0px 0px 0px 0px;
-	text-align: right;
-	width: 100%;
-}
-
-#nav ul ul li+li {
-	padding: 0px 0px 0px 0px;
-}
-
-
-
-#main {
-	margin-left: 18%;
-	margin-right: 2%;
-	margin-top: 2%;
-	padding: 10px;
-}
-
-
-/* submenus styles */
-#submenu {
-    margin-left:18%;
-}
-#submenu a {
-    margin:5px;
-    text-decoration:none;
-    color:black;
-}
-#submenu a:hover {
-    margin:5px;
-    background-color:#6699cc;
-    color:white;
-}
-
-/* the USER information block */
-#librarian_information {
-/*     position:absolute; */
-    float:right;
-    font-size:10pt;
-}
-

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-acqui.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-acqui.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-acqui.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-acqui.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-<div id="submenu">
-    <a href="/cgi-bin/koha/acqui/acqui-home.pl">Main page</a>
-    <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=0">Add supplier</a>
-    <a href="/cgi-bin/koha/acqui/lateorders.pl">Late orders</a>
-    <a href="/cgi-bin/koha/acqui/histsearch.pl">History search</a>
-    <a href="/cgi-bin/koha/suggestion/acceptorreject.pl">Manage suggestions</a>
-    <a href="/cgi-bin/koha/admin/aqbookfund.pl">Parameters</a>
-</div>
-<div id="main">

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-admin.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-admin.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-admin.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-admin.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-<div id="submenu">
-	<a href="/cgi-bin/koha/admin/systempreferences.pl">System pref</a>
-	<a href="/cgi-bin/koha/admin/branches.pl">Branches</a>
-	<a href="/cgi-bin/koha/admin/aqbookfund.pl">Funds</a>
-	<a href="/cgi-bin/koha/admin/currency.pl">Currencies</a>
-	<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a>
-	<a href="/cgi-bin/koha/admin/categorie.pl">Borrower categories</a>
-	<a href="/cgi-bin/koha/admin/issuingrules.pl">Issuing rules</a>
-	<a href="/cgi-bin/koha/admin/authorised_values.pl">Authorised values</a>
-	<a href="/cgi-bin/koha/admin/authtypes.pl">Thesaurus</a>
-	<a href="/cgi-bin/koha/admin/biblio_framework.pl">Biblio Framework</a>
-	<a href="/cgi-bin/koha/admin/koha2marclinks.pl">Links Koha-MARC DB</a>
-	<a href="/cgi-bin/koha/admin/checkmarc.pl">MARC Check</a>
-	<a href="/cgi-bin/koha/admin/printers.pl">Printers</a>
-	<a href="/cgi-bin/koha/admin/stopwords.pl">Stop words</a>
-	<a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a>
-	<a href="/cgi-bin/koha/import/breeding.pl">Reservoir</a>
-</div>
-<div id="main">
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-authorities.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-authorities.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-authorities.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-authorities.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-<script language="JavaScript" type="text/javascript">
-function Help() {
-	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
-}
-
-function addauthority() {
-	X = document.forms[0].authtype.value;
-	window.location="/cgi-bin/koha/authorities/authorities.pl?authtypecode="+X;
-}
-function searchauthority() {
-	X = document.forms[0].authtype2.value;
-	Y = document.forms[0].value.value;
-	window.location="/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&authtypecode="+X+"&value="+Y+"&marclist=&and_or=and&excluding=&operator=contains";
-}
-</script>

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-catalogue.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-catalogue.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-catalogue.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-catalogue.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,8 +0,0 @@
-<div id="submenu">
-	<a href="/cgi-bin/koha/loadmodules.pl?module=search&amp;marc=1&amp;type=intranet">Search</a>
-	<a href="/cgi-bin/koha/loadmodules.pl?module=addbiblio&amp;type=intranet">Add biblio</a>
-	<a class="submenu serial" href="/cgi-bin/koha/serials/serials-home.pl">Subscriptions</a>
-	<a href="/cgi-bin/koha/serials/lateissues.pl">Late issues</a>
-	<a href="/cgi-bin/koha/bookshelves/shelves.pl">Virtual shelves</a>
-</div>
-<div id="main">
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-circ.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-circ.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-circ.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-circ.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-<div id="submenu">
-    <a href="/cgi-bin/koha/circ/circulation.pl">Circulation</a>
-    <a href="/cgi-bin/koha/circ/circulation.pl">Issues</a>
-    <a href="/cgi-bin/koha/circ/returns.pl">Returns</a>
-    <a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfers</a>
-    <a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set branch</a>
-    <a href="/cgi-bin/koha/circ/branchreserves.pl">Waiting reserves</a>
-    <a href="/cgi-bin/koha/circ/waitingreservestransfers.pl">Transfers to do</a>
-    <a href="/cgi-bin/koha/circ/currenttransfers.pl">Transfers to recieve</a>
-</div>
-<div id="main">
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-members.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-members.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-members.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-members.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,8 +0,0 @@
-<div id="submenu">
- 	<a href="/cgi-bin/koha/members/members-home.pl">Search</a>
- 	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=A"/>Add adult</a>
- 	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=C"/>Add child</a>
- 	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=P"/>Add prof</a>
- 	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=I"/>Add org</a>
-</div>
-<div id="main">
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-serials.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-serials.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-serials.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-serials.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-<div id="submenu">
-        <a href="/cgi-bin/koha/serials/serials-home.pl">home</a>
-        <a href="/cgi-bin/koha/serials/serial-issues.pl">Serials issues</a>
-        <a href="/cgi-bin/koha/serials/acqui-search.pl">Supplier search</a>
-        <a href="/cgi-bin/koha/serials/subscription-bib-search.pl">Subscription search</a>
-        <a href="/cgi-bin/koha/serials/subscription-bib-search.pl">Search subscription</a>
-        <a href="/cgi-bin/koha/serials/lateissues.pl">Late issue</a>
-        <a href="/cgi-bin/koha/serials/subscription-add.pl">Add a subscription</a>
-        <a href="/cgi-bin/koha/serials/viewalerts.pl">View alerts</a>
-</div>
-<div id="main">
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-tools.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-tools.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-tools.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/menu-tools.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,8 +0,0 @@
-<div id="submenu">
-	<a href="/cgi-bin/koha/tools/cities.pl">Cities</a>
-	<a href="/cgi-bin/koha/tools/holidays.pl">Holidays</a>
-		<a href="/cgi-bin/koha/tools/marc.pl">Export</a>
-	<a href="/cgi-bin/koha/import/breeding.pl">Reservoir</a>
-	<a href="/cgi-bin/koha/tools/barcodes.pl">Barcodes</a>
-	<a href="/cgi-bin/koha/tools/viewlog.pl">Log viewer</a>
-</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menus.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/menus.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/menus.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/menus.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,90 +0,0 @@
-<script language="JavaScript" type="text/javascript">
-function _(s) { return s } // dummy function for gettext
-function Help() {
-	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
-}
-</script>
-<div id="nav">
-<ul>
-    <li><h4>Koha</h4></li>
-    <li><a href="/cgi-bin/koha/mainpage.pl">Koha intranet home</a></li>
-    <li><a href="/cgi-bin/koha/circ/circulation.pl">Circulation</a>
-    <ul>
-        <li><a href="/cgi-bin/koha/circ/circulation.pl">Issues</a>
-            <form method="post" action="/cgi-bin/koha/circ/circulation.pl">
-                <label for="navfindborrower">Iss<span class="accesskey">u</span>e to:</label>
-                <input id="navfindborrower" name="findborrower" type="text" size="10" accesskey="u" />
-                <input type="hidden" name="branch" value="<!-- TMPL_VAR name="branch" -->" />
-                <input type="hidden" name="printer" value="<!-- TMPL_VAR name="printer" -->" />
-                <input type="submit" class="submit" value="Submit" />
-            </form>
-        </li>
-        <li>
-            <a accesskey="r" href="/cgi-bin/koha/circ/returns.pl"><span class="accesskey">R</span>eturns</a>
-        </li>
-        <li>
-            <a href="/cgi-bin/koha/circ/reserve.pl">Reserve List</a>
-        </li>
-        <li>
-            <a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfers</a>
-        </li>
-    </ul>
-    </li>
-    <li>
-        <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
-        <ul>
-            <li>
-                <form action="/cgi-bin/koha/members/member.pl" method="post">
-                    <label for="navmember">Search:</label><input id="navmember" type="text" size="10" name="member" />
-                    <input type="submit" value="Search" class="submit" />
-                </form>
-            </li>
-        </ul>
-    </li>
-    <li>
-        <a href="/cgi-bin/koha/loadmodules.pl?module=search&amp;marc=1&amp;type=intranet">Catalog</a>
-        <ul>
-            <li>
-                <form method="post" action="/cgi-bin/koha/search.marc/search.pl">
-                    <input type="hidden" name="op" value="do_search" />
-                    <input type="hidden" name="type" value="intranet" />
-                    <input type="hidden" name="nbstatements" value="3" />
-                    <label for="navkeyword"><span class="accesskey">Q</span>uick Search:</label>
-                    <input type="hidden" name="marclist" value="" />
-                    <input type="hidden" name="and_or" value="and" />
-                    <input type="hidden" name="excluding" value="" />
-                    <input type="hidden" name="operator" value="contains" />
-                    <input type="text" id="navkeyword" name="value" size="10" accesskey="q" />
-                    <input type="submit" value="Start search" class="submit" />
-                </form>
-            </li>
-        </ul>
-    </li>
-    <li><a href="/cgi-bin/koha/acqui.simple/addbooks.pl">Cataloging</a>
-        <ul>
-            <li><a href="/cgi-bin/koha/acqui.simple/addbiblio.pl">Add MARC</a></li>
-            <li><a href="/cgi-bin/koha/loadmodules.pl?module=acquisitions">Acquisitions</a></li>
-            <li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li>
-            <li><a href="/cgi-bin/koha/bull-home.pl">Serials</a></li>
-            <li><a href="/cgi-bin/koha/bookshelves/shelves.pl">Virtual Shelves</a></li>
-        </ul>
-    </li>
-    <li><a href="/cgi-bin/koha/reports-home.pl">Accounts and Reports</a></li>
-    <li><a href="/cgi-bin/koha/admin-home.pl">Koha Administration</a>
-        <ul>
-            <li><a href="/cgi-bin/koha/admin-home.pl">System Administration</a></li>
-            <li><a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a></li>
-        </ul>
-    </li>
-    <li><a href="/cgi-bin/koha/about.pl">About Koha</a></li>
-    <!-- TMPL_IF NAME="loggedinusername" -->
-    <li>Logged in as: <!-- TMPL_VAR NAME="loggedinusername" -->, from <!-- TMPL_VAR name="branchname" -->
-        <ul>
-            <li><a href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log Out</a></li>
-        </ul>
-    </li><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="IntranetNav" -->
-        <!-- TMPL_VAR NAME="IntranetNav" -->
-    <!-- /TMPL_IF -->
-</ul>
-</div>

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/popup-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/popup-bottom.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/popup-bottom.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/popup-bottom.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/popup-top.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/popup-top.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/popup-top.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/popup-top.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<title>popup</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf8">
-
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
-
-</head>
-
-<body>
-<!-- NO MENUS for popup-top -->

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/serials-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/serials-bottom.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/serials-bottom.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/serials-bottom.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-<br clear="all">
-<p> &nbsp; </p>
-
-<div class="center">
-<a href="/cgi-bin/koha/mainpage.pl">Home</a> ||
-<a href="/cgi-bin/koha/loadmodules.pl?module=search&amp;type=intranet">Catalogue</a> ||
-<a href="/cgi-bin/koha/members/members-home.pl">Members</a> ||
-<a href="/cgi-bin/koha/loadmodules.pl?module=acquisitions">Acquisitions</a> ||
-<a href="/cgi-bin/koha/circ/circulation.pl">Circulation</a> ||
-<a href="/cgi-bin/koha/reports-home.pl">Reports</a> ||
-<a href="/cgi-bin/koha/admin-home.pl">Parameters</a> ||
-<a href="/cgi-bin/koha/about.pl">About</a> || 
-Help
-</div>
-
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/serials-top.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/serials-top.inc
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/serials-top.inc
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/serials-top.inc	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<title>KOHA: INTRANET: Serials management</title>
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
-<meta http-equiv="Content-Type" content="text/html; charset=utf8">
-<script language="JavaScript" type="text/javascript">
-function Help() {
-	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
-}
-</script>
-
-<style type="text/css">
-.serial {
-	background-color: #803010;
-	color:#FFFFFF;
-	text-decoration: normal;
-	background-image:none;
-	}
-a.serial:hover {
-	background-color: #803010;
-	color: #FFFFFF;
-	text-decoration: normal;
-	}
-</style>
-</head>
-<body>
-
-<!-- TMPL_INCLUDE name="menus.inc" -->
-<!-- TMPL_IF NAME="loggedinusername" -->
-    <p class="user">Logged in as: <!-- TMPL_VAR NAME="loggedinusername" --> [<a href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log Out</a>]</p>
-<!-- TMPL_ELSE -->
-    <p class="user"><a href="/cgi-bin/koha/opac-user.pl">Log In</a> to Koha</p>
-<!-- /TMPL_IF -->

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/cal.gif
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/cal.gif
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/cal.gif
Binary files /tmp/cvsADXwhi and /dev/null differ

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-en.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-en.js
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-en.js
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-en.js	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,127 +0,0 @@
-// ** I18N
-
-// Calendar EN language
-// Author: Mihai Bazon, <mishoo at infoiasi.ro>
-// Encoding: any
-// Distributed under the same terms as the calendar itself.
-
-// For translators: please use UTF-8 if possible.  We strongly believe that
-// Unicode is the answer to a real internationalized world.  Also please
-// include your contact information in the header, as can be seen above.
-
-// full day names
-Calendar._DN = new Array
-("Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- "Sunday");
-
-// Please note that the following array of short day names (and the same goes
-// for short month names, _SMN) isn't absolutely necessary.  We give it here
-// for exemplification on how one can customize the short day names, but if
-// they are simply the first N letters of the full name you can simply say:
-//
-//   Calendar._SDN_len = N; // short day name length
-//   Calendar._SMN_len = N; // short month name length
-//
-// If N = 3 then this is not needed either since we assume a value of 3 if not
-// present, to be compatible with translation files that were written before
-// this feature.
-
-// short day names
-Calendar._SDN = new Array
-("Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat",
- "Sun");
-
-// First day of the week. "0" means display Sunday first, "1" means display
-// Monday first, etc.
-Calendar._FD = 0;
-
-// full month names
-Calendar._MN = new Array
-("January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December");
-
-// short month names
-Calendar._SMN = new Array
-("Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec");
-
-// tooltips
-Calendar._TT = {};
-Calendar._TT["INFO"] = "About the calendar";
-
-Calendar._TT["ABOUT"] =
-"DHTML Date/Time Selector\n" +
-"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
-"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" +
-"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
-"\n\n" +
-"Date selection:\n" +
-"- Use the \xab, \xbb buttons to select year\n" +
-"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
-"- Hold mouse button on any of the above buttons for faster selection.";
-Calendar._TT["ABOUT_TIME"] = "\n\n" +
-"Time selection:\n" +
-"- Click on any of the time parts to increase it\n" +
-"- or Shift-click to decrease it\n" +
-"- or click and drag for faster selection.";
-
-Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
-Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
-Calendar._TT["GO_TODAY"] = "Go Today";
-Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
-Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
-Calendar._TT["SEL_DATE"] = "Select date";
-Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
-Calendar._TT["PART_TODAY"] = " (today)";
-
-// the following is to inform that "%s" is to be the first day of week
-// %s will be replaced with the day name.
-Calendar._TT["DAY_FIRST"] = "Display %s first";
-
-// This may be locale-dependent.  It specifies the week-end days, as an array
-// of comma-separated numbers.  The numbers are from 0 to 6: 0 means Sunday, 1
-// means Monday, etc.
-Calendar._TT["WEEKEND"] = "0,6";
-
-Calendar._TT["CLOSE"] = "Close";
-Calendar._TT["TODAY"] = "Today";
-Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
-
-// date formats
-Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
-Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
-
-Calendar._TT["WK"] = "wk";
-Calendar._TT["TIME"] = "Time:";

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-setup.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-setup.js
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-setup.js
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-setup.js	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,181 +0,0 @@
-/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
- * ---------------------------------------------------------------------------
- *
- * The DHTML Calendar
- *
- * Details and latest version at:
- * http://dynarch.com/mishoo/calendar.epl
- *
- * This script is distributed under the GNU Lesser General Public License.
- * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
- *
- * This file defines helper functions for setting up the calendar.  They are
- * intended to help non-programmers get a working calendar on their site
- * quickly.  This script should not be seen as part of the calendar.  It just
- * shows you what one can do with the calendar, while in the same time
- * providing a quick and simple method for setting it up.  If you need
- * exhaustive customization of the calendar creation process feel free to
- * modify this code to suit your needs (this is recommended and much better
- * than modifying calendar.js itself).
- */
-
-// $Id: calendar-setup.js,v 1.1 2006/08/11 09:54:30 tipaul Exp $
-
-/**
- *  This function "patches" an input field (or other element) to use a calendar
- *  widget for date selection.
- *
- *  The "params" is a single object that can have the following properties:
- *
- *    prop. name   | description
- *  -------------------------------------------------------------------------------------------------
- *   inputField    | the ID of an input field to store the date
- *   displayArea   | the ID of a DIV or other element to show the date
- *   button        | ID of a button or other element that will trigger the calendar
- *   eventName     | event that will trigger the calendar, without the "on" prefix (default: "click")
- *   ifFormat      | date format that will be stored in the input field
- *   daFormat      | the date format that will be used to display the date in displayArea
- *   singleClick   | (true/false) wether the calendar is in single click mode or not (default: true)
- *   firstDay      | numeric: 0 to 6.  "0" means display Sunday first, "1" means display Monday first, etc.
- *   align         | alignment (default: "Br"); if you don't know what's this see the calendar documentation
- *   range         | array with 2 elements.  Default: [1900, 2999] -- the range of years available
- *   weekNumbers   | (true/false) if it's true (default) the calendar will display week numbers
- *   flat          | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
- *   flatCallback  | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
- *   disableFunc   | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
- *   onSelect      | function that gets called when a date is selected.  You don't _have_ to supply this (the default is generally okay)
- *   onClose       | function that gets called when the calendar is closed.  [default]
- *   onUpdate      | function that gets called after the date is updated in the input field.  Receives a reference to the calendar.
- *   date          | the date that the calendar will be initially displayed to
- *   showsTime     | default: false; if true the calendar will include a time selector
- *   timeFormat    | the time format; can be "12" or "24", default is "12"
- *   electric      | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
- *   step          | configures the step of the years in drop-down boxes; default: 2
- *   position      | configures the calendar absolute position; default: null
- *   cache         | if "true" (but default: "false") it will reuse the same calendar object, where possible
- *   showOthers    | if "true" (but default: "false") it will show days from other months too
- *
- *  None of them is required, they all have default values.  However, if you
- *  pass none of "inputField", "displayArea" or "button" you'll get a warning
- *  saying "nothing to setup".
- */
-Calendar.setup = function (params) {
-	function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } };
-
-	param_default("inputField",     null);
-	param_default("displayArea",    null);
-	param_default("button",         null);
-	param_default("eventName",      "click");
-	param_default("ifFormat",       "%Y/%m/%d");
-	param_default("daFormat",       "%Y/%m/%d");
-	param_default("singleClick",    true);
-	param_default("disableFunc",    'dateStatusHandler');
-	param_default("dateStatusFunc", params["disableFunc"]);	// takes precedence if both are defined
-	param_default("firstDay",       0); // defaults to "Sunday" first
-	param_default("align",          "Br");
-	param_default("range",          [1900, 2999]);
-	param_default("weekNumbers",    true);
-	param_default("flat",           null);
-	param_default("flatCallback",   null);
-	param_default("onSelect",       null);
-	param_default("onClose",        null);
-	param_default("onUpdate",       null);
-	param_default("date",           null);
-	param_default("showsTime",      false);
-	param_default("timeFormat",     "24");
-	param_default("electric",       true);
-	param_default("step",           2);
-	param_default("position",       null);
-	param_default("cache",          false);
-	param_default("showOthers",     false);
-
-	var tmp = ["inputField", "displayArea", "button"];
-	for (var i in tmp) {
-		if (typeof params[tmp[i]] == "string") {
-			params[tmp[i]] = document.getElementById(params[tmp[i]]);
-		}
-	}
-	if (!(params.flat || params.inputField || params.displayArea || params.button)) {
-		alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");
-		return false;
-	}
-
-	function onSelect(cal) {
-		var p = cal.params;
-		var update = (cal.dateClicked || p.electric);
-		if (update && p.flat) {
-			if (typeof p.flatCallback == "function")
-				p.flatCallback(cal);
-			else
-				alert("No flatCallback given -- doing nothing.");
-			return false;
-		}
-		if (update && p.inputField) {
-			p.inputField.value = cal.date.print(p.ifFormat);
-			if (typeof p.inputField.onchange == "function")
-				p.inputField.onchange();
-		}
-		if (update && p.displayArea)
-			p.displayArea.innerHTML = cal.date.print(p.daFormat);
-		if (update && p.singleClick && cal.dateClicked)
-			cal.callCloseHandler();
-		if (update && typeof p.onUpdate == "function")
-			p.onUpdate(cal);
-	};
-
-	if (params.flat != null) {
-		if (typeof params.flat == "string")
-			params.flat = document.getElementById(params.flat);
-		if (!params.flat) {
-			alert("Calendar.setup:\n  Flat specified but can't find parent.");
-			return false;
-		}
-		var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect);
-		cal.showsTime = params.showsTime;
-		cal.time24 = (params.timeFormat == "24");
-		cal.params = params;
-		cal.weekNumbers = params.weekNumbers;
-		cal.setRange(params.range[0], params.range[1]);
-		cal.setDateStatusHandler(params.dateStatusFunc);
-		cal.create(params.flat);
-		cal.show();
-		return false;
-	}
-
-	var triggerEl = params.button || params.displayArea || params.inputField;
-	triggerEl["on" + params.eventName] = function() {
-		var dateEl = params.inputField || params.displayArea;
-		var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
-		var mustCreate = false;
-		var cal = window.calendar;
-		if (!(cal && params.cache)) {
-			window.calendar = cal = new Calendar(params.firstDay,
-							     params.date,
-							     params.onSelect || onSelect,
-							     params.onClose || function(cal) { cal.hide(); });
-			cal.showsTime = params.showsTime;
-			cal.time24 = (params.timeFormat == "24");
-			cal.weekNumbers = params.weekNumbers;
-			mustCreate = true;
-		} else {
-			if (params.date)
-				cal.setDate(params.date);
-			cal.hide();
-		}
-		cal.showsOtherMonths = params.showOthers;
-		cal.yearStep = params.step;
-		cal.setRange(params.range[0], params.range[1]);
-		cal.params = params;
-		cal.setDateStatusHandler(params.dateStatusFunc);
-		cal.setDateFormat(dateFmt);
-		if (mustCreate)
-			cal.create();
-		cal.parseDate(dateEl.value || dateEl.innerHTML);
-		cal.refresh();
-		if (!params.position)
-			cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
-		else
-			cal.showAt(params.position[0], params.position[1]);
-		return false;
-	};
-};

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-system.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-system.css
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-system.css
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar-system.css	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,254 +0,0 @@
-/* The main calendar widget.  DIV containing a table. */
-
-.calendar {
-  position: relative;
-  display: none;
-  border: 1px solid;
-  border-color: #fff #000 #000 #fff;
-  font-size: 11px;
-  cursor: default;
-  background: Window;
-  color: WindowText;
-  font-family: tahoma,verdana,sans-serif;
-  width:250px;
-}
-
-.calendar table {
-  border: 1px solid;
-  border-color: #fff #000 #000 #fff;
-  font-size: 11px;
-  cursor: default;
-  background: Window;
-  color: WindowText;
-  font-family: tahoma,verdana,sans-serif;
-  border-collapse:separate;
-}
-
-/* Header part -- contains navigation buttons and day names. */
-
-.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
-  text-align: center;
-  padding: 1px;
-  border: 1px solid;
-  display: table-cell;
-  -moz-border-radius: 0px;
-  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
-  background: ButtonFace;
-}
-
-.calendar .nav {
-  background: ButtonFace url('menuarrow.gif') no-repeat 100% 100%;
-}
-
-.calendar thead .title { /* This holds the current "month, year" */
-  font-weight: bold;
-  padding: 1px;
-  border: 1px solid #000;
-  background: ActiveCaption;
-  color: CaptionText;
-  text-align: center;
-}
-
-.calendar thead .headrow { /* Row <TR> containing navigation buttons */
-}
-
-.calendar thead .daynames { /* Row <TR> containing the day names */
-}
-
-.calendar thead .name { /* Cells <TD> containing the day names */
-  border-bottom: 1px solid ButtonShadow;
-  padding: 2px;
-  text-align: center;
-  background: ButtonFace;
-  color: ButtonText;
-}
-
-.calendar thead .weekend { /* How a weekend day name shows in header */
-//  color: #f00;
-}
-
-.calendar thead .hilite { /* How do the buttons in header appear when hover */
-  border: 2px solid;
-  padding: 0px;
-  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
-}
-
-.calendar thead .active { /* Active (pressed) buttons in header */
-  border-width: 1px;
-  padding: 2px 0px 0px 2px;
-  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
-}
-
-/* The body part -- contains all the days in month. */
-
-.calendar tbody .day { /* Cells <TD> containing month days dates */
-  width: 2em;
-  text-align: right;
-  padding: 2px 4px 2px 2px;
-}
-.calendar tbody .day.othermonth {
-  font-size: 80%;
-  color: #aaa;
-}
-.calendar tbody .day.othermonth.oweekend {
-  color: #faa;
-}
-
-.calendar table .wn {
-  padding: 2px 3px 2px 2px;
-  border-right: 1px solid ButtonShadow;
-  background: ButtonFace;
-  color: ButtonText;
-}
-
-.calendar tbody .rowhilite td {
-//  background: Highlight;
-//  color: HighlightText;
-}
-
-.calendar tbody td.hilite { /* Hovered cells <TD> */
-  padding: 1px 3px 1px 1px;
-  border-top: 1px solid #fff;
-  border-right: 1px solid #000;
-  border-bottom: 1px solid #000;
-  border-left: 1px solid #fff;
-}
-
-.calendar tbody td.active { /* Active (pressed) cells <TD> */
-//  padding: 2px 2px 0px 2px;
-//  border: 1px solid;
-//  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
-}
-
-.calendar tbody td.selected { /* Cell showing selected date */
-  font-weight: bold;
-  border: 1px solid;
-  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
-  padding: 2px 2px 0px 2px;
-  background: ButtonFace;
-  color: ButtonText;
-}
-
-.calendar tbody td.weekend { /* Cells showing weekend days */
-//  color: #f00;
-}
-
-.calendar tbody td.today { /* Cell showing today date */
-  font-weight: bold;
-  color: #00f;
-}
-
-.calendar tbody td.disabled { color: GrayText; }
-
-.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
-  visibility: hidden;
-}
-
-.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
-  display: none;
-}
-
-/* The footer part -- status bar and "Close" button */
-
-.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
-}
-
-.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
-  background: ButtonFace;
-  padding: 1px;
-  border: 1px solid;
-  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
-  color: ButtonText;
-  text-align: center;
-}
-
-.calendar tfoot .hilite { /* Hover style for buttons in footer */
-  border-top: 1px solid #fff;
-  border-right: 1px solid #000;
-  border-bottom: 1px solid #000;
-  border-left: 1px solid #fff;
-  padding: 1px;
-  background: #e4e0d8;
-}
-
-.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
-  padding: 2px 0px 0px 2px;
-  border-top: 1px solid #000;
-  border-right: 1px solid #fff;
-  border-bottom: 1px solid #fff;
-  border-left: 1px solid #000;
-}
-
-/* Combo boxes (menus that display months/years for direct selection) */
-
-.calendar .combo {
-  position: absolute;
-  display: none;
-  width: 4em;
-  top: 0px;
-  left: 0px;
-  cursor: default;
-  border: 1px solid;
-  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
-  background: Menu;
-  color: MenuText;
-  font-size: 90%;
-  padding: 1px;
-}
-
-.calendar .combo .label,
-.calendar .combo .label-IEfix {
-  text-align: center;
-  padding: 1px;
-}
-
-.calendar .combo .label-IEfix {
-  width: 4em;
-}
-
-.calendar .combo .active {
-  padding: 0px;
-  border: 1px solid #000;
-}
-
-.calendar .combo .hilite {
-  background: Highlight;
-  color: HighlightText;
-}
-
-.calendar td.time {
-  border-top: 1px solid ButtonShadow;
-  padding: 1px 0px;
-  text-align: center;
-  background-color: ButtonFace;
-}
-
-.calendar td.time .hour,
-.calendar td.time .minute,
-.calendar td.time .ampm {
-  padding: 0px 3px 0px 4px;
-  border: 1px solid #889;
-  font-weight: bold;
-  background-color: Menu;
-}
-
-.calendar td.time .ampm {
-  text-align: center;
-}
-
-.calendar td.time .colon {
-  padding: 0px 2px 0px 3px;
-  font-weight: bold;
-}
-
-.calendar td.time span.hilite {
-  border-color: #000;
-  background-color: Highlight;
-  color: HighlightText;
-}
-
-.calendar td.time span.active {
-  border-color: #f00;
-  background-color: #000;
-  color: #0f0;
-}
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar.js
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar.js
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/calendar/calendar.js	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,1715 +0,0 @@
-/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
- * ------------------------------------------------------------------
- *
- * The DHTML Calendar, version 0.9.6 "Keep cool but don't freeze"
- *
- * Details and latest version at:
- * http://dynarch.com/mishoo/calendar.epl
- *
- * This script is distributed under the GNU Lesser General Public License.
- * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
- */
-
-// $Id: calendar.js,v 1.1 2006/08/11 09:54:30 tipaul Exp $
-
-/** The Calendar object constructor. */
-Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) {
-	// member variables
-	this.activeDiv = null;
-	this.currentDateEl = null;
-	this.getDateStatus = null;
-	this.timeout = null;
-	this.onSelected = onSelected || null;
-	this.onClose = onClose || null;
-	this.dragging = false;
-	this.hidden = false;
-	this.minYear = 1970;
-	this.maxYear = 2050;
-	this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"];
-	this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"];
-	this.isPopup = true;
-	this.weekNumbers = true;
-	this.firstDayOfWeek = firstDayOfWeek; // 0 for Sunday, 1 for Monday, etc.
-	this.showsOtherMonths = false;
-	this.dateStr = dateStr;
-	this.ar_days = null;
-	this.showsTime = false;
-	this.time24 = true;
-	this.yearStep = 2;
-	// HTML elements
-	this.table = null;
-	this.element = null;
-	this.tbody = null;
-	this.firstdayname = null;
-	// Combo boxes
-	this.monthsCombo = null;
-	this.yearsCombo = null;
-	this.hilitedMonth = null;
-	this.activeMonth = null;
-	this.hilitedYear = null;
-	this.activeYear = null;
-	// Information
-	this.dateClicked = false;
-
-	// one-time initializations
-	if (typeof Calendar._SDN == "undefined") {
-		// table of short day names
-		if (typeof Calendar._SDN_len == "undefined")
-			Calendar._SDN_len = 3;
-		var ar = new Array();
-		for (var i = 8; i > 0;) {
-			ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len);
-		}
-		Calendar._SDN = ar;
-		// table of short month names
-		if (typeof Calendar._SMN_len == "undefined")
-			Calendar._SMN_len = 3;
-		ar = new Array();
-		for (var i = 12; i > 0;) {
-			ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len);
-		}
-		Calendar._SMN = ar;
-	}
-};
-
-// ** constants
-
-/// "static", needed for event handlers.
-Calendar._C = null;
-
-/// detect a special case of "web browser"
-Calendar.is_ie = ( /msie/i.test(navigator.userAgent) &&
-		   !/opera/i.test(navigator.userAgent) );
-
-Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) );
-
-/// detect Opera browser
-Calendar.is_opera = /opera/i.test(navigator.userAgent);
-
-/// detect KHTML-based browsers
-Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);
-
-// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate
-//        library, at some point.
-
-Calendar.getAbsolutePos = function(el) {
-	var SL = 0, ST = 0;
-	var is_div = /^div$/i.test(el.tagName);
-	if (is_div && el.scrollLeft)
-		SL = el.scrollLeft;
-	if (is_div && el.scrollTop)
-		ST = el.scrollTop;
-	var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
-	if (el.offsetParent) {
-		var tmp = this.getAbsolutePos(el.offsetParent);
-		r.x += tmp.x;
-		r.y += tmp.y;
-	}
-	return r;
-};
-
-Calendar.isRelated = function (el, evt) {
-	var related = evt.relatedTarget;
-	if (!related) {
-		var type = evt.type;
-		if (type == "mouseover") {
-			related = evt.fromElement;
-		} else if (type == "mouseout") {
-			related = evt.toElement;
-		}
-	}
-	while (related) {
-		if (related == el) {
-			return true;
-		}
-		related = related.parentNode;
-	}
-	return false;
-};
-
-Calendar.removeClass = function(el, className) {
-	if (!(el && el.className)) {
-		return;
-	}
-	var cls = el.className.split(" ");
-	var ar = new Array();
-	for (var i = cls.length; i > 0;) {
-		if (cls[--i] != className) {
-			ar[ar.length] = cls[i];
-		}
-	}
-	el.className = ar.join(" ");
-};
-
-Calendar.addClass = function(el, className) {
-	Calendar.removeClass(el, className);
-	el.className += " " + className;
-};
-
-Calendar.getElement = function(ev) {
-	if (Calendar.is_ie) {
-		return window.event.srcElement;
-	} else {
-		return ev.currentTarget;
-	}
-};
-
-Calendar.getTargetElement = function(ev) {
-	if (Calendar.is_ie) {
-		return window.event.srcElement;
-	} else {
-		return ev.target;
-	}
-};
-
-Calendar.stopEvent = function(ev) {
-	ev || (ev = window.event);
-	if (Calendar.is_ie) {
-		ev.cancelBubble = true;
-		ev.returnValue = false;
-	} else {
-		ev.preventDefault();
-		ev.stopPropagation();
-	}
-	return false;
-};
-
-Calendar.addEvent = function(el, evname, func) {
-	if (el.attachEvent) { // IE
-		el.attachEvent("on" + evname, func);
-	} else if (el.addEventListener) { // Gecko / W3C
-		el.addEventListener(evname, func, true);
-	} else {
-		el["on" + evname] = func;
-	}
-};
-
-Calendar.removeEvent = function(el, evname, func) {
-	if (el.detachEvent) { // IE
-		el.detachEvent("on" + evname, func);
-	} else if (el.removeEventListener) { // Gecko / W3C
-		el.removeEventListener(evname, func, true);
-	} else {
-		el["on" + evname] = null;
-	}
-};
-
-Calendar.createElement = function(type, parent) {
-	var el = null;
-	if (document.createElementNS) {
-		// use the XHTML namespace; IE won't normally get here unless
-		// _they_ "fix" the DOM2 implementation.
-		el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
-	} else {
-		el = document.createElement(type);
-	}
-	if (typeof parent != "undefined") {
-		parent.appendChild(el);
-	}
-	return el;
-};
-
-// END: UTILITY FUNCTIONS
-
-// BEGIN: CALENDAR STATIC FUNCTIONS
-
-/** Internal -- adds a set of events to make some element behave like a button. */
-Calendar._add_evs = function(el) {
-	with (Calendar) {
-		addEvent(el, "mouseover", dayMouseOver);
-		addEvent(el, "mousedown", dayMouseDown);
-		addEvent(el, "mouseout", dayMouseOut);
-		if (is_ie) {
-			addEvent(el, "dblclick", dayMouseDblClick);
-			el.setAttribute("unselectable", true);
-		}
-	}
-};
-
-Calendar.findMonth = function(el) {
-	if (typeof el.month != "undefined") {
-		return el;
-	} else if (typeof el.parentNode.month != "undefined") {
-		return el.parentNode;
-	}
-	return null;
-};
-
-Calendar.findYear = function(el) {
-	if (typeof el.year != "undefined") {
-		return el;
-	} else if (typeof el.parentNode.year != "undefined") {
-		return el.parentNode;
-	}
-	return null;
-};
-
-Calendar.showMonthsCombo = function () {
-	var cal = Calendar._C;
-	if (!cal) {
-		return false;
-	}
-	var cal = cal;
-	var cd = cal.activeDiv;
-	var mc = cal.monthsCombo;
-	if (cal.hilitedMonth) {
-		Calendar.removeClass(cal.hilitedMonth, "hilite");
-	}
-	if (cal.activeMonth) {
-		Calendar.removeClass(cal.activeMonth, "active");
-	}
-	var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
-	Calendar.addClass(mon, "active");
-	cal.activeMonth = mon;
-	var s = mc.style;
-	s.display = "block";
-	if (cd.navtype < 0)
-		s.left = cd.offsetLeft + "px";
-	else {
-		var mcw = mc.offsetWidth;
-		if (typeof mcw == "undefined")
-			// Konqueror brain-dead techniques
-			mcw = 50;
-		s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px";
-	}
-	s.top = (cd.offsetTop + cd.offsetHeight) + "px";
-};
-
-Calendar.showYearsCombo = function (fwd) {
-	var cal = Calendar._C;
-	if (!cal) {
-		return false;
-	}
-	var cal = cal;
-	var cd = cal.activeDiv;
-	var yc = cal.yearsCombo;
-	if (cal.hilitedYear) {
-		Calendar.removeClass(cal.hilitedYear, "hilite");
-	}
-	if (cal.activeYear) {
-		Calendar.removeClass(cal.activeYear, "active");
-	}
-	cal.activeYear = null;
-	var Y = cal.date.getFullYear() + (fwd ? 1 : -1);
-	var yr = yc.firstChild;
-	var show = false;
-	for (var i = 12; i > 0; --i) {
-		if (Y >= cal.minYear && Y <= cal.maxYear) {
-			yr.firstChild.data = Y;
-			yr.year = Y;
-			yr.style.display = "block";
-			show = true;
-		} else {
-			yr.style.display = "none";
-		}
-		yr = yr.nextSibling;
-		Y += fwd ? cal.yearStep : -cal.yearStep;
-	}
-	if (show) {
-		var s = yc.style;
-		s.display = "block";
-		if (cd.navtype < 0)
-			s.left = cd.offsetLeft + "px";
-		else {
-			var ycw = yc.offsetWidth;
-			if (typeof ycw == "undefined")
-				// Konqueror brain-dead techniques
-				ycw = 50;
-			s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px";
-		}
-		s.top = (cd.offsetTop + cd.offsetHeight) + "px";
-	}
-};
-
-// event handlers
-
-Calendar.tableMouseUp = function(ev) {
-	var cal = Calendar._C;
-	if (!cal) {
-		return false;
-	}
-	if (cal.timeout) {
-		clearTimeout(cal.timeout);
-	}
-	var el = cal.activeDiv;
-	if (!el) {
-		return false;
-	}
-	var target = Calendar.getTargetElement(ev);
-	ev || (ev = window.event);
-	Calendar.removeClass(el, "active");
-	if (target == el || target.parentNode == el) {
-		Calendar.cellClick(el, ev);
-	}
-	var mon = Calendar.findMonth(target);
-	var date = null;
-	if (mon) {
-		date = new Date(cal.date);
-		if (mon.month != date.getMonth()) {
-			date.setMonth(mon.month);
-			cal.setDate(date);
-			cal.dateClicked = false;
-			cal.callHandler();
-		}
-	} else {
-		var year = Calendar.findYear(target);
-		if (year) {
-			date = new Date(cal.date);
-			if (year.year != date.getFullYear()) {
-				date.setFullYear(year.year);
-				cal.setDate(date);
-				cal.dateClicked = false;
-				cal.callHandler();
-			}
-		}
-	}
-	with (Calendar) {
-		removeEvent(document, "mouseup", tableMouseUp);
-		removeEvent(document, "mouseover", tableMouseOver);
-		removeEvent(document, "mousemove", tableMouseOver);
-		cal._hideCombos();
-		_C = null;
-		return stopEvent(ev);
-	}
-};
-
-Calendar.tableMouseOver = function (ev) {
-	var cal = Calendar._C;
-	if (!cal) {
-		return;
-	}
-	var el = cal.activeDiv;
-	var target = Calendar.getTargetElement(ev);
-	if (target == el || target.parentNode == el) {
-		Calendar.addClass(el, "hilite active");
-		Calendar.addClass(el.parentNode, "rowhilite");
-	} else {
-		if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2)))
-			Calendar.removeClass(el, "active");
-		Calendar.removeClass(el, "hilite");
-		Calendar.removeClass(el.parentNode, "rowhilite");
-	}
-	ev || (ev = window.event);
-	if (el.navtype == 50 && target != el) {
-		var pos = Calendar.getAbsolutePos(el);
-		var w = el.offsetWidth;
-		var x = ev.clientX;
-		var dx;
-		var decrease = true;
-		if (x > pos.x + w) {
-			dx = x - pos.x - w;
-			decrease = false;
-		} else
-			dx = pos.x - x;
-
-		if (dx < 0) dx = 0;
-		var range = el._range;
-		var current = el._current;
-		var count = Math.floor(dx / 10) % range.length;
-		for (var i = range.length; --i >= 0;)
-			if (range[i] == current)
-				break;
-		while (count-- > 0)
-			if (decrease) {
-				if (--i < 0)
-					i = range.length - 1;
-			} else if ( ++i >= range.length )
-				i = 0;
-		var newval = range[i];
-		el.firstChild.data = newval;
-
-		cal.onUpdateTime();
-	}
-	var mon = Calendar.findMonth(target);
-	if (mon) {
-		if (mon.month != cal.date.getMonth()) {
-			if (cal.hilitedMonth) {
-				Calendar.removeClass(cal.hilitedMonth, "hilite");
-			}
-			Calendar.addClass(mon, "hilite");
-			cal.hilitedMonth = mon;
-		} else if (cal.hilitedMonth) {
-			Calendar.removeClass(cal.hilitedMonth, "hilite");
-		}
-	} else {
-		if (cal.hilitedMonth) {
-			Calendar.removeClass(cal.hilitedMonth, "hilite");
-		}
-		var year = Calendar.findYear(target);
-		if (year) {
-			if (year.year != cal.date.getFullYear()) {
-				if (cal.hilitedYear) {
-					Calendar.removeClass(cal.hilitedYear, "hilite");
-				}
-				Calendar.addClass(year, "hilite");
-				cal.hilitedYear = year;
-			} else if (cal.hilitedYear) {
-				Calendar.removeClass(cal.hilitedYear, "hilite");
-			}
-		} else if (cal.hilitedYear) {
-			Calendar.removeClass(cal.hilitedYear, "hilite");
-		}
-	}
-	return Calendar.stopEvent(ev);
-};
-
-Calendar.tableMouseDown = function (ev) {
-	if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) {
-		return Calendar.stopEvent(ev);
-	}
-};
-
-Calendar.calDragIt = function (ev) {
-	var cal = Calendar._C;
-	if (!(cal && cal.dragging)) {
-		return false;
-	}
-	var posX;
-	var posY;
-	if (Calendar.is_ie) {
-		posY = window.event.clientY + document.body.scrollTop;
-		posX = window.event.clientX + document.body.scrollLeft;
-	} else {
-		posX = ev.pageX;
-		posY = ev.pageY;
-	}
-	cal.hideShowCovered();
-	var st = cal.element.style;
-	st.left = (posX - cal.xOffs) + "px";
-	st.top = (posY - cal.yOffs) + "px";
-	return Calendar.stopEvent(ev);
-};
-
-Calendar.calDragEnd = function (ev) {
-	var cal = Calendar._C;
-	if (!cal) {
-		return false;
-	}
-	cal.dragging = false;
-	with (Calendar) {
-		removeEvent(document, "mousemove", calDragIt);
-		removeEvent(document, "mouseup", calDragEnd);
-		tableMouseUp(ev);
-	}
-	cal.hideShowCovered();
-};
-
-Calendar.dayMouseDown = function(ev) {
-	var el = Calendar.getElement(ev);
-	if (el.disabled) {
-		return false;
-	}
-	var cal = el.calendar;
-	cal.activeDiv = el;
-	Calendar._C = cal;
-	if (el.navtype != 300) with (Calendar) {
-		if (el.navtype == 50) {
-			el._current = el.firstChild.data;
-			addEvent(document, "mousemove", tableMouseOver);
-		} else
-			addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver);
-		addClass(el, "hilite active");
-		addEvent(document, "mouseup", tableMouseUp);
-	} else if (cal.isPopup) {
-		cal._dragStart(ev);
-	}
-	if (el.navtype == -1 || el.navtype == 1) {
-		if (cal.timeout) clearTimeout(cal.timeout);
-		cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250);
-	} else if (el.navtype == -2 || el.navtype == 2) {
-		if (cal.timeout) clearTimeout(cal.timeout);
-		cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250);
-	} else {
-		cal.timeout = null;
-	}
-	return Calendar.stopEvent(ev);
-};
-
-Calendar.dayMouseDblClick = function(ev) {
-	Calendar.cellClick(Calendar.getElement(ev), ev || window.event);
-	if (Calendar.is_ie) {
-		document.selection.empty();
-	}
-};
-
-Calendar.dayMouseOver = function(ev) {
-	var el = Calendar.getElement(ev);
-	if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
-		return false;
-	}
-	if (el.ttip) {
-		if (el.ttip.substr(0, 1) == "_") {
-			el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1);
-		}
-		el.calendar.tooltips.firstChild.data = el.ttip;
-	}
-	if (el.navtype != 300) {
-		Calendar.addClass(el, "hilite");
-		if (el.caldate) {
-			Calendar.addClass(el.parentNode, "rowhilite");
-		}
-	}
-	return Calendar.stopEvent(ev);
-};
-
-Calendar.dayMouseOut = function(ev) {
-	with (Calendar) {
-		var el = getElement(ev);
-		if (isRelated(el, ev) || _C || el.disabled) {
-			return false;
-		}
-		removeClass(el, "hilite");
-		if (el.caldate) {
-			removeClass(el.parentNode, "rowhilite");
-		}
-		el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"];
-		return stopEvent(ev);
-	}
-};
-
-/**
- *  A generic "click" handler :) handles all types of buttons defined in this
- *  calendar.
- */
-Calendar.cellClick = function(el, ev) {
-	var cal = el.calendar;
-	var closing = false;
-	var newdate = false;
-	var date = null;
-	if (typeof el.navtype == "undefined") {
-		Calendar.removeClass(cal.currentDateEl, "selected");
-		Calendar.addClass(el, "selected");
-		closing = (cal.currentDateEl == el);
-		if (!closing) {
-			cal.currentDateEl = el;
-		}
-		cal.date = new Date(el.caldate);
-		date = cal.date;
-		newdate = true;
-		// a date was clicked
-		if (!(cal.dateClicked = !el.otherMonth))
-			cal._init(cal.firstDayOfWeek, date);
-	} else {
-		if (el.navtype == 200) {
-			Calendar.removeClass(el, "hilite");
-			cal.callCloseHandler();
-			return;
-		}
-		date = (el.navtype == 0) ? new Date() : new Date(cal.date);
-		// unless "today" was clicked, we assume no date was clicked so
-		// the selected handler will know not to close the calenar when
-		// in single-click mode.
-		// cal.dateClicked = (el.navtype == 0);
-		cal.dateClicked = false;
-		var year = date.getFullYear();
-		var mon = date.getMonth();
-		function setMonth(m) {
-			var day = date.getDate();
-			var max = date.getMonthDays(m);
-			if (day > max) {
-				date.setDate(max);
-			}
-			date.setMonth(m);
-		};
-		switch (el.navtype) {
-		    case 400:
-			Calendar.removeClass(el, "hilite");
-			var text = Calendar._TT["ABOUT"];
-			if (typeof text != "undefined") {
-				text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : "";
-			} else {
-				// FIXME: this should be removed as soon as lang files get updated!
-				text = "Help and about box text is not translated into this language.\n" +
-					"If you know this language and you feel generous please update\n" +
-					"the corresponding file in \"lang\" subdir to match calendar-en.js\n" +
-					"and send it back to <mishoo at infoiasi.ro> to get it into the distribution  ;-)\n\n" +
-					"Thank you!\n" +
-					"http://dynarch.com/mishoo/calendar.epl\n";
-			}
-			alert(text);
-			return;
-		    case -2:
-			if (year > cal.minYear) {
-				date.setFullYear(year - 1);
-			}
-			break;
-		    case -1:
-			if (mon > 0) {
-				setMonth(mon - 1);
-			} else if (year-- > cal.minYear) {
-				date.setFullYear(year);
-				setMonth(11);
-			}
-			break;
-		    case 1:
-			if (mon < 11) {
-				setMonth(mon + 1);
-			} else if (year < cal.maxYear) {
-				date.setFullYear(year + 1);
-				setMonth(0);
-			}
-			break;
-		    case 2:
-			if (year < cal.maxYear) {
-				date.setFullYear(year + 1);
-			}
-			break;
-		    case 100:
-			cal.setFirstDayOfWeek(el.fdow);
-			return;
-		    case 50:
-			var range = el._range;
-			var current = el.firstChild.data;
-			for (var i = range.length; --i >= 0;)
-				if (range[i] == current)
-					break;
-			if (ev && ev.shiftKey) {
-				if (--i < 0)
-					i = range.length - 1;
-			} else if ( ++i >= range.length )
-				i = 0;
-			var newval = range[i];
-			el.firstChild.data = newval;
-			cal.onUpdateTime();
-			return;
-		    case 0:
-			// TODAY will bring us here
-			if ((typeof cal.getDateStatus == "function") && cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) {
-				// remember, "date" was previously set to new
-				// Date() if TODAY was clicked; thus, it
-				// contains today date.
-				return false;
-			}
-			break;
-		}
-		if (!date.equalsTo(cal.date)) {
-			cal.setDate(date);
-			newdate = true;
-		}
-	}
-	if (newdate) {
-		cal.callHandler();
-	}
-	if (closing) {
-		Calendar.removeClass(el, "hilite");
-		cal.callCloseHandler();
-	}
-};
-
-// END: CALENDAR STATIC FUNCTIONS
-
-// BEGIN: CALENDAR OBJECT FUNCTIONS
-
-/**
- *  This function creates the calendar inside the given parent.  If _par is
- *  null than it creates a popup calendar inside the BODY element.  If _par is
- *  an element, be it BODY, then it creates a non-popup calendar (still
- *  hidden).  Some properties need to be set before calling this function.
- */
-Calendar.prototype.create = function (_par) {
-	var parent = null;
-	if (! _par) {
-		// default parent is the document body, in which case we create
-		// a popup calendar.
-		parent = document.getElementsByTagName("body")[0];
-		this.isPopup = true;
-	} else {
-		parent = _par;
-		this.isPopup = false;
-	}
-	this.date = this.dateStr ? new Date(this.dateStr) : new Date();
-
-	var table = Calendar.createElement("table");
-	this.table = table;
-	table.cellSpacing = 0;
-	table.cellPadding = 0;
-	table.calendar = this;
-	Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown);
-
-	var div = Calendar.createElement("div");
-	this.element = div;
-	div.className = "calendar";
-	if (this.isPopup) {
-		div.style.position = "absolute";
-		div.style.display = "none";
-	}
-	div.appendChild(table);
-
-	var thead = Calendar.createElement("thead", table);
-	var cell = null;
-	var row = null;
-
-	var cal = this;
-	var hh = function (text, cs, navtype) {
-		cell = Calendar.createElement("td", row);
-		cell.colSpan = cs;
-		cell.className = "button";
-		if (navtype != 0 && Math.abs(navtype) <= 2)
-			cell.className += " nav";
-		Calendar._add_evs(cell);
-		cell.calendar = cal;
-		cell.navtype = navtype;
-		if (text.substr(0, 1) != "&") {
-			cell.appendChild(document.createTextNode(text));
-		}
-		else {
-			// FIXME: dirty hack for entities
-			cell.innerHTML = text;
-		}
-		return cell;
-	};
-
-	row = Calendar.createElement("tr", thead);
-	var title_length = 6;
-	(this.isPopup) && --title_length;
-	(this.weekNumbers) && ++title_length;
-
-	hh("?", 1, 400).ttip = Calendar._TT["INFO"];
-	this.title = hh("", title_length, 300);
-	this.title.className = "title";
-	if (this.isPopup) {
-		this.title.ttip = Calendar._TT["DRAG_TO_MOVE"];
-		this.title.style.cursor = "move";
-		hh("&#x00d7;", 1, 200).ttip = Calendar._TT["CLOSE"];
-	}
-
-	row = Calendar.createElement("tr", thead);
-	row.className = "headrow";
-
-	this._nav_py = hh("&#x00ab;", 1, -2);
-	this._nav_py.ttip = Calendar._TT["PREV_YEAR"];
-
-	this._nav_pm = hh("&#x2039;", 1, -1);
-	this._nav_pm.ttip = Calendar._TT["PREV_MONTH"];
-
-	this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0);
-	this._nav_now.ttip = Calendar._TT["GO_TODAY"];
-
-	this._nav_nm = hh("&#x203a;", 1, 1);
-	this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"];
-
-	this._nav_ny = hh("&#x00bb;", 1, 2);
-	this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"];
-
-	// day names
-	row = Calendar.createElement("tr", thead);
-	row.className = "daynames";
-	if (this.weekNumbers) {
-		cell = Calendar.createElement("td", row);
-		cell.className = "name wn";
-		cell.appendChild(document.createTextNode(Calendar._TT["WK"]));
-	}
-	for (var i = 7; i > 0; --i) {
-		cell = Calendar.createElement("td", row);
-		cell.appendChild(document.createTextNode(""));
-		if (!i) {
-			cell.navtype = 100;
-			cell.calendar = this;
-			Calendar._add_evs(cell);
-		}
-	}
-	this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild;
-	this._displayWeekdays();
-
-	var tbody = Calendar.createElement("tbody", table);
-	this.tbody = tbody;
-
-	for (i = 6; i > 0; --i) {
-		row = Calendar.createElement("tr", tbody);
-		if (this.weekNumbers) {
-			cell = Calendar.createElement("td", row);
-			cell.appendChild(document.createTextNode(""));
-		}
-		for (var j = 7; j > 0; --j) {
-			cell = Calendar.createElement("td", row);
-			cell.appendChild(document.createTextNode(""));
-			cell.calendar = this;
-			Calendar._add_evs(cell);
-		}
-	}
-
-	if (this.showsTime) {
-		row = Calendar.createElement("tr", tbody);
-		row.className = "time";
-
-		cell = Calendar.createElement("td", row);
-		cell.className = "time";
-		cell.colSpan = 2;
-		cell.innerHTML = Calendar._TT["TIME"] || "&nbsp;";
-
-		cell = Calendar.createElement("td", row);
-		cell.className = "time";
-		cell.colSpan = this.weekNumbers ? 4 : 3;
-
-		(function(){
-			function makeTimePart(className, init, range_start, range_end) {
-				var part = Calendar.createElement("span", cell);
-				part.className = className;
-				part.appendChild(document.createTextNode(init));
-				part.calendar = cal;
-				part.ttip = Calendar._TT["TIME_PART"];
-				part.navtype = 50;
-				part._range = [];
-				if (typeof range_start != "number")
-					part._range = range_start;
-				else {
-					for (var i = range_start; i <= range_end; ++i) {
-						var txt;
-						if (i < 10 && range_end >= 10) txt = '0' + i;
-						else txt = '' + i;
-						part._range[part._range.length] = txt;
-					}
-				}
-				Calendar._add_evs(part);
-				return part;
-			};
-			var hrs = cal.date.getHours();
-			var mins = cal.date.getMinutes();
-			var t12 = !cal.time24;
-			var pm = (hrs > 12);
-			if (t12 && pm) hrs -= 12;
-			var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23);
-			var span = Calendar.createElement("span", cell);
-			span.appendChild(document.createTextNode(":"));
-			span.className = "colon";
-			var M = makeTimePart("minute", mins, 0, 59);
-			var AP = null;
-			cell = Calendar.createElement("td", row);
-			cell.className = "time";
-			cell.colSpan = 2;
-			if (t12)
-				AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]);
-			else
-				cell.innerHTML = "&nbsp;";
-
-			cal.onSetTime = function() {
-				var hrs = this.date.getHours();
-				var mins = this.date.getMinutes();
-				var pm = (hrs > 12);
-				if (pm && t12) hrs -= 12;
-				H.firstChild.data = (hrs < 10) ? ("0" + hrs) : hrs;
-				M.firstChild.data = (mins < 10) ? ("0" + mins) : mins;
-				if (t12)
-					AP.firstChild.data = pm ? "pm" : "am";
-			};
-
-			cal.onUpdateTime = function() {
-				var date = this.date;
-				var h = parseInt(H.firstChild.data, 10);
-				if (t12) {
-					if (/pm/i.test(AP.firstChild.data) && h < 12)
-						h += 12;
-					else if (/am/i.test(AP.firstChild.data) && h == 12)
-						h = 0;
-				}
-				var d = date.getDate();
-				var m = date.getMonth();
-				var y = date.getFullYear();
-				date.setHours(h);
-				date.setMinutes(parseInt(M.firstChild.data, 10));
-				date.setFullYear(y);
-				date.setMonth(m);
-				date.setDate(d);
-				this.dateClicked = false;
-				this.callHandler();
-			};
-		})();
-	} else {
-		this.onSetTime = this.onUpdateTime = function() {};
-	}
-
-	var tfoot = Calendar.createElement("tfoot", table);
-
-	row = Calendar.createElement("tr", tfoot);
-	row.className = "footrow";
-
-	cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300);
-	cell.className = "ttip";
-	if (this.isPopup) {
-		cell.ttip = Calendar._TT["DRAG_TO_MOVE"];
-		cell.style.cursor = "move";
-	}
-	this.tooltips = cell;
-
-	div = Calendar.createElement("div", this.element);
-	this.monthsCombo = div;
-	div.className = "combo";
-	for (i = 0; i < Calendar._MN.length; ++i) {
-		var mn = Calendar.createElement("div");
-		mn.className = Calendar.is_ie ? "label-IEfix" : "label";
-		mn.month = i;
-		mn.appendChild(document.createTextNode(Calendar._SMN[i]));
-		div.appendChild(mn);
-	}
-
-	div = Calendar.createElement("div", this.element);
-	this.yearsCombo = div;
-	div.className = "combo";
-	for (i = 12; i > 0; --i) {
-		var yr = Calendar.createElement("div");
-		yr.className = Calendar.is_ie ? "label-IEfix" : "label";
-		yr.appendChild(document.createTextNode(""));
-		div.appendChild(yr);
-	}
-
-	this._init(this.firstDayOfWeek, this.date);
-	parent.appendChild(this.element);
-};
-
-/** keyboard navigation, only for popup calendars */
-Calendar._keyEvent = function(ev) {
-	if (!window.calendar) {
-		return false;
-	}
-	(Calendar.is_ie) && (ev = window.event);
-	var cal = window.calendar;
-	var act = (Calendar.is_ie || ev.type == "keypress");
-	if (ev.ctrlKey) {
-		switch (ev.keyCode) {
-		    case 37: // KEY left
-			act && Calendar.cellClick(cal._nav_pm);
-			break;
-		    case 38: // KEY up
-			act && Calendar.cellClick(cal._nav_py);
-			break;
-		    case 39: // KEY right
-			act && Calendar.cellClick(cal._nav_nm);
-			break;
-		    case 40: // KEY down
-			act && Calendar.cellClick(cal._nav_ny);
-			break;
-		    default:
-			return false;
-		}
-	} else switch (ev.keyCode) {
-	    case 32: // KEY space (now)
-		Calendar.cellClick(cal._nav_now);
-		break;
-	    case 27: // KEY esc
-		act && cal.callCloseHandler();
-		break;
-	    case 37: // KEY left
-	    case 38: // KEY up
-	    case 39: // KEY right
-	    case 40: // KEY down
-		if (act) {
-			var date = cal.date.getDate() - 1;
-			var el = cal.currentDateEl;
-			var ne = null;
-			var prev = (ev.keyCode == 37) || (ev.keyCode == 38);
-			switch (ev.keyCode) {
-			    case 37: // KEY left
-				(--date >= 0) && (ne = cal.ar_days[date]);
-				break;
-			    case 38: // KEY up
-				date -= 7;
-				(date >= 0) && (ne = cal.ar_days[date]);
-				break;
-			    case 39: // KEY right
-				(++date < cal.ar_days.length) && (ne = cal.ar_days[date]);
-				break;
-			    case 40: // KEY down
-				date += 7;
-				(date < cal.ar_days.length) && (ne = cal.ar_days[date]);
-				break;
-			}
-			if (!ne) {
-				if (prev) {
-					Calendar.cellClick(cal._nav_pm);
-				} else {
-					Calendar.cellClick(cal._nav_nm);
-				}
-				date = (prev) ? cal.date.getMonthDays() : 1;
-				el = cal.currentDateEl;
-				ne = cal.ar_days[date - 1];
-			}
-			Calendar.removeClass(el, "selected");
-			Calendar.addClass(ne, "selected");
-			cal.date = new Date(ne.caldate);
-			cal.callHandler();
-			cal.currentDateEl = ne;
-		}
-		break;
-	    case 13: // KEY enter
-		if (act) {
-			cal.callHandler();
-			cal.hide();
-		}
-		break;
-	    default:
-		return false;
-	}
-	return Calendar.stopEvent(ev);
-};
-
-/**
- *  (RE)Initializes the calendar to the given date and firstDayOfWeek
- */
-Calendar.prototype._init = function (firstDayOfWeek, date) {
-	var today = new Date();
-	this.table.style.visibility = "hidden";
-	var year = date.getFullYear();
-	if (year < this.minYear) {
-		year = this.minYear;
-		date.setFullYear(year);
-	} else if (year > this.maxYear) {
-		year = this.maxYear;
-		date.setFullYear(year);
-	}
-	this.firstDayOfWeek = firstDayOfWeek;
-	this.date = new Date(date);
-	var month = date.getMonth();
-	var mday = date.getDate();
-	var no_days = date.getMonthDays();
-
-	// calendar voodoo for computing the first day that would actually be
-	// displayed in the calendar, even if it's from the previous month.
-	// WARNING: this is magic. ;-)
-	date.setDate(1);
-	var day1 = (date.getDay() - this.firstDayOfWeek) % 7;
-	if (day1 < 0)
-		day1 += 7;
-	date.setDate(-day1);
-	date.setDate(date.getDate() + 1);
-
-	var row = this.tbody.firstChild;
-	var MN = Calendar._SMN[month];
-	var ar_days = new Array();
-	var weekend = Calendar._TT["WEEKEND"];
-	for (var i = 0; i < 6; ++i, row = row.nextSibling) {
-		var cell = row.firstChild;
-		if (this.weekNumbers) {
-			cell.className = "day wn";
-			cell.firstChild.data = date.getWeekNumber();
-			cell = cell.nextSibling;
-		}
-		row.className = "daysrow";
-		var hasdays = false;
-		for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(date.getDate() + 1)) {
-			var iday = date.getDate();
-			var wday = date.getDay();
-			cell.className = "day";
-			var current_month = (date.getMonth() == month);
-			if (!current_month) {
-				if (this.showsOtherMonths) {
-					cell.className += " othermonth";
-					cell.otherMonth = true;
-				} else {
-					cell.className = "emptycell";
-					cell.innerHTML = "&nbsp;";
-					cell.disabled = true;
-					continue;
-				}
-			} else {
-				cell.otherMonth = false;
-				hasdays = true;
-			}
-			cell.disabled = false;
-			cell.firstChild.data = iday;
-			if (typeof this.getDateStatus == "function") {
-				var status = this.getDateStatus(date, year, month, iday);
-				if (status === true) {
-					cell.className += " disabled";
-					cell.disabled = true;
-				} else {
-					if (/disabled/i.test(status))
-						cell.disabled = true;
-					cell.className += " " + status;
-				}
-			}
-			if (!cell.disabled) {
-				ar_days[ar_days.length] = cell;
-				cell.caldate = new Date(date);
-				cell.ttip = "_";
-				if (current_month && iday == mday) {
-					cell.className += " selected";
-					this.currentDateEl = cell;
-				}
-				if (date.getFullYear() == today.getFullYear() &&
-				    date.getMonth() == today.getMonth() &&
-				    iday == today.getDate()) {
-					cell.className += " today";
-					cell.ttip += Calendar._TT["PART_TODAY"];
-				}
-				if (weekend.indexOf(wday.toString()) != -1) {
-					cell.className += cell.otherMonth ? " oweekend" : " weekend";
-				}
-			}
-		}
-		if (!(hasdays || this.showsOtherMonths))
-			row.className = "emptyrow";
-	}
-	this.ar_days = ar_days;
-	this.title.firstChild.data = Calendar._MN[month] + ", " + year;
-	this.onSetTime();
-	this.table.style.visibility = "visible";
-	// PROFILE
-	// this.tooltips.firstChild.data = "Generated in " + ((new Date()) - today) + " ms";
-};
-
-/**
- *  Calls _init function above for going to a certain date (but only if the
- *  date is different than the currently selected one).
- */
-Calendar.prototype.setDate = function (date) {
-	if (!date.equalsTo(this.date)) {
-		this._init(this.firstDayOfWeek, date);
-	}
-};
-
-/**
- *  Refreshes the calendar.  Useful if the "disabledHandler" function is
- *  dynamic, meaning that the list of disabled date can change at runtime.
- *  Just * call this function if you think that the list of disabled dates
- *  should * change.
- */
-Calendar.prototype.refresh = function () {
-	this._init(this.firstDayOfWeek, this.date);
-};
-
-/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */
-Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) {
-	this._init(firstDayOfWeek, this.date);
-	this._displayWeekdays();
-};
-
-/**
- *  Allows customization of what dates are enabled.  The "unaryFunction"
- *  parameter must be a function object that receives the date (as a JS Date
- *  object) and returns a boolean value.  If the returned value is true then
- *  the passed date will be marked as disabled.
- */
-Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) {
-	this.getDateStatus = unaryFunction;
-};
-
-/** Customization of allowed year range for the calendar. */
-Calendar.prototype.setRange = function (a, z) {
-	this.minYear = a;
-	this.maxYear = z;
-};
-
-/** Calls the first user handler (selectedHandler). */
-Calendar.prototype.callHandler = function () {
-	if (this.onSelected) {
-		this.onSelected(this, this.date.print(this.dateFormat));
-	}
-};
-
-/** Calls the second user handler (closeHandler). */
-Calendar.prototype.callCloseHandler = function () {
-	if (this.onClose) {
-		this.onClose(this);
-	}
-	this.hideShowCovered();
-};
-
-/** Removes the calendar object from the DOM tree and destroys it. */
-Calendar.prototype.destroy = function () {
-	var el = this.element.parentNode;
-	el.removeChild(this.element);
-	Calendar._C = null;
-	window.calendar = null;
-};
-
-/**
- *  Moves the calendar element to a different section in the DOM tree (changes
- *  its parent).
- */
-Calendar.prototype.reparent = function (new_parent) {
-	var el = this.element;
-	el.parentNode.removeChild(el);
-	new_parent.appendChild(el);
-};
-
-// This gets called when the user presses a mouse button anywhere in the
-// document, if the calendar is shown.  If the click was outside the open
-// calendar this function closes it.
-Calendar._checkCalendar = function(ev) {
-	if (!window.calendar) {
-		return false;
-	}
-	var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
-	for (; el != null && el != calendar.element; el = el.parentNode);
-	if (el == null) {
-		// calls closeHandler which should hide the calendar.
-		window.calendar.callCloseHandler();
-		return Calendar.stopEvent(ev);
-	}
-};
-
-/** Shows the calendar. */
-Calendar.prototype.show = function () {
-	var rows = this.table.getElementsByTagName("tr");
-	for (var i = rows.length; i > 0;) {
-		var row = rows[--i];
-		Calendar.removeClass(row, "rowhilite");
-		var cells = row.getElementsByTagName("td");
-		for (var j = cells.length; j > 0;) {
-			var cell = cells[--j];
-			Calendar.removeClass(cell, "hilite");
-			Calendar.removeClass(cell, "active");
-		}
-	}
-	this.element.style.display = "block";
-	this.hidden = false;
-	if (this.isPopup) {
-		window.calendar = this;
-		Calendar.addEvent(document, "keydown", Calendar._keyEvent);
-		Calendar.addEvent(document, "keypress", Calendar._keyEvent);
-		Calendar.addEvent(document, "mousedown", Calendar._checkCalendar);
-	}
-	this.hideShowCovered();
-};
-
-/**
- *  Hides the calendar.  Also removes any "hilite" from the class of any TD
- *  element.
- */
-Calendar.prototype.hide = function () {
-	if (this.isPopup) {
-		Calendar.removeEvent(document, "keydown", Calendar._keyEvent);
-		Calendar.removeEvent(document, "keypress", Calendar._keyEvent);
-		Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar);
-	}
-	this.element.style.display = "none";
-	this.hidden = true;
-	this.hideShowCovered();
-};
-
-/**
- *  Shows the calendar at a given absolute position (beware that, depending on
- *  the calendar element style -- position property -- this might be relative
- *  to the parent's containing rectangle).
- */
-Calendar.prototype.showAt = function (x, y) {
-	var s = this.element.style;
-	s.left = x + "px";
-	s.top = y + "px";
-	this.show();
-};
-
-/** Shows the calendar near a given element. */
-Calendar.prototype.showAtElement = function (el, opts) {
-	var self = this;
-	var p = Calendar.getAbsolutePos(el);
-	if (!opts || typeof opts != "string") {
-		this.showAt(p.x, p.y + el.offsetHeight);
-		return true;
-	}
-	function fixPosition(box) {
-		if (box.x < 0)
-			box.x = 0;
-		if (box.y < 0)
-			box.y = 0;
-		var cp = document.createElement("div");
-		var s = cp.style;
-		s.position = "absolute";
-		s.right = s.bottom = s.width = s.height = "0px";
-		document.body.appendChild(cp);
-		var br = Calendar.getAbsolutePos(cp);
-		document.body.removeChild(cp);
-		if (Calendar.is_ie) {
-			br.y += document.body.scrollTop;
-			br.x += document.body.scrollLeft;
-		} else {
-			br.y += window.scrollY;
-			br.x += window.scrollX;
-		}
-		var tmp = box.x + box.width - br.x;
-		if (tmp > 0) box.x -= tmp;
-		tmp = box.y + box.height - br.y;
-		if (tmp > 0) box.y -= tmp;
-	};
-	this.element.style.display = "block";
-	Calendar.continuation_for_the_fucking_khtml_browser = function() {
-		var w = self.element.offsetWidth;
-		var h = self.element.offsetHeight;
-		self.element.style.display = "none";
-		var valign = opts.substr(0, 1);
-		var halign = "l";
-		if (opts.length > 1) {
-			halign = opts.substr(1, 1);
-		}
-		// vertical alignment
-		switch (valign) {
-		    case "T": p.y -= h; break;
-		    case "B": p.y += el.offsetHeight; break;
-		    case "C": p.y += (el.offsetHeight - h) / 2; break;
-		    case "t": p.y += el.offsetHeight - h; break;
-		    case "b": break; // already there
-		}
-		// horizontal alignment
-		switch (halign) {
-		    case "L": p.x -= w; break;
-		    case "R": p.x += el.offsetWidth; break;
-		    case "C": p.x += (el.offsetWidth - w) / 2; break;
-		    case "r": p.x += el.offsetWidth - w; break;
-		    case "l": break; // already there
-		}
-		p.width = w;
-		p.height = h + 40;
-		self.monthsCombo.style.display = "none";
-		fixPosition(p);
-		self.showAt(p.x, p.y);
-	};
-	if (Calendar.is_khtml)
-		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
-	else
-		Calendar.continuation_for_the_fucking_khtml_browser();
-};
-
-/** Customizes the date format. */
-Calendar.prototype.setDateFormat = function (str) {
-	this.dateFormat = str;
-};
-
-/** Customizes the tooltip date format. */
-Calendar.prototype.setTtDateFormat = function (str) {
-	this.ttDateFormat = str;
-};
-
-/**
- *  Tries to identify the date represented in a string.  If successful it also
- *  calls this.setDate which moves the calendar to the given date.
- */
-Calendar.prototype.parseDate = function (str, fmt) {
-	var y = 0;
-	var m = -1;
-	var d = 0;
-	var a = str.split(/\W+/);
-	if (!fmt) {
-		fmt = this.dateFormat;
-	}
-	var b = fmt.match(/%./g);
-	var i = 0, j = 0;
-	var hr = 0;
-	var min = 0;
-	for (i = 0; i < a.length; ++i) {
-		if (!a[i])
-			continue;
-		switch (b[i]) {
-		    case "%d":
-		    case "%e":
-			d = parseInt(a[i], 10);
-			break;
-
-		    case "%m":
-			m = parseInt(a[i], 10) - 1;
-			break;
-
-		    case "%Y":
-		    case "%y":
-			y = parseInt(a[i], 10);
-			(y < 100) && (y += (y > 29) ? 1900 : 2000);
-			break;
-
-		    case "%b":
-		    case "%B":
-			for (j = 0; j < 12; ++j) {
-				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; }
-			}
-			break;
-
-		    case "%H":
-		    case "%I":
-		    case "%k":
-		    case "%l":
-			hr = parseInt(a[i], 10);
-			break;
-
-		    case "%P":
-		    case "%p":
-			if (/pm/i.test(a[i]) && hr < 12)
-				hr += 12;
-			break;
-
-		    case "%M":
-			min = parseInt(a[i], 10);
-			break;
-		}
-	}
-	if (y != 0 && m != -1 && d != 0) {
-		this.setDate(new Date(y, m, d, hr, min, 0));
-		return;
-	}
-	y = 0; m = -1; d = 0;
-	for (i = 0; i < a.length; ++i) {
-		if (a[i].search(/[a-zA-Z]+/) != -1) {
-			var t = -1;
-			for (j = 0; j < 12; ++j) {
-				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; }
-			}
-			if (t != -1) {
-				if (m != -1) {
-					d = m+1;
-				}
-				m = t;
-			}
-		} else if (parseInt(a[i], 10) <= 12 && m == -1) {
-			m = a[i]-1;
-		} else if (parseInt(a[i], 10) > 31 && y == 0) {
-			y = parseInt(a[i], 10);
-			(y < 100) && (y += (y > 29) ? 1900 : 2000);
-		} else if (d == 0) {
-			d = a[i];
-		}
-	}
-	if (y == 0) {
-		var today = new Date();
-		y = today.getFullYear();
-	}
-	if (m != -1 && d != 0) {
-		this.setDate(new Date(y, m, d, hr, min, 0));
-	}
-};
-
-Calendar.prototype.hideShowCovered = function () {
-	var self = this;
-	Calendar.continuation_for_the_fucking_khtml_browser = function() {
-		function getVisib(obj){
-			var value = obj.style.visibility;
-			if (!value) {
-				if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C
-					if (!Calendar.is_khtml)
-						value = document.defaultView.
-							getComputedStyle(obj, "").getPropertyValue("visibility");
-					else
-						value = '';
-				} else if (obj.currentStyle) { // IE
-					value = obj.currentStyle.visibility;
-				} else
-					value = '';
-			}
-			return value;
-		};
-
-		var tags = new Array("applet", "iframe", "select");
-		var el = self.element;
-
-		var p = Calendar.getAbsolutePos(el);
-		var EX1 = p.x;
-		var EX2 = el.offsetWidth + EX1;
-		var EY1 = p.y;
-		var EY2 = el.offsetHeight + EY1;
-
-		for (var k = tags.length; k > 0; ) {
-			var ar = document.getElementsByTagName(tags[--k]);
-			var cc = null;
-
-			for (var i = ar.length; i > 0;) {
-				cc = ar[--i];
-
-				p = Calendar.getAbsolutePos(cc);
-				var CX1 = p.x;
-				var CX2 = cc.offsetWidth + CX1;
-				var CY1 = p.y;
-				var CY2 = cc.offsetHeight + CY1;
-
-				if (self.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
-					if (!cc.__msh_save_visibility) {
-						cc.__msh_save_visibility = getVisib(cc);
-					}
-					cc.style.visibility = cc.__msh_save_visibility;
-				} else {
-					if (!cc.__msh_save_visibility) {
-						cc.__msh_save_visibility = getVisib(cc);
-					}
-					cc.style.visibility = "hidden";
-				}
-			}
-		}
-	};
-	if (Calendar.is_khtml)
-		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
-	else
-		Calendar.continuation_for_the_fucking_khtml_browser();
-};
-
-/** Internal function; it displays the bar with the names of the weekday. */
-Calendar.prototype._displayWeekdays = function () {
-	var fdow = this.firstDayOfWeek;
-	var cell = this.firstdayname;
-	var weekend = Calendar._TT["WEEKEND"];
-	for (var i = 0; i < 7; ++i) {
-		cell.className = "day name";
-		var realday = (i + fdow) % 7;
-		if (i) {
-			cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]);
-			cell.navtype = 100;
-			cell.calendar = this;
-			cell.fdow = realday;
-			Calendar._add_evs(cell);
-		}
-		if (weekend.indexOf(realday.toString()) != -1) {
-			Calendar.addClass(cell, "weekend");
-		}
-		cell.firstChild.data = Calendar._SDN[(i + fdow) % 7];
-		cell = cell.nextSibling;
-	}
-};
-
-/** Internal function.  Hides all combo boxes that might be displayed. */
-Calendar.prototype._hideCombos = function () {
-	this.monthsCombo.style.display = "none";
-	this.yearsCombo.style.display = "none";
-};
-
-/** Internal function.  Starts dragging the element. */
-Calendar.prototype._dragStart = function (ev) {
-	if (this.dragging) {
-		return;
-	}
-	this.dragging = true;
-	var posX;
-	var posY;
-	if (Calendar.is_ie) {
-		posY = window.event.clientY + document.body.scrollTop;
-		posX = window.event.clientX + document.body.scrollLeft;
-	} else {
-		posY = ev.clientY + window.scrollY;
-		posX = ev.clientX + window.scrollX;
-	}
-	var st = this.element.style;
-	this.xOffs = posX - parseInt(st.left);
-	this.yOffs = posY - parseInt(st.top);
-	with (Calendar) {
-		addEvent(document, "mousemove", calDragIt);
-		addEvent(document, "mouseup", calDragEnd);
-	}
-};
-
-// BEGIN: DATE OBJECT PATCHES
-
-/** Adds the number of days array to the Date object. */
-Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
-
-/** Constants used for time computations */
-Date.SECOND = 1000 /* milliseconds */;
-Date.MINUTE = 60 * Date.SECOND;
-Date.HOUR   = 60 * Date.MINUTE;
-Date.DAY    = 24 * Date.HOUR;
-Date.WEEK   =  7 * Date.DAY;
-
-/** Returns the number of days in the current month */
-Date.prototype.getMonthDays = function(month) {
-	var year = this.getFullYear();
-	if (typeof month == "undefined") {
-		month = this.getMonth();
-	}
-	if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) {
-		return 29;
-	} else {
-		return Date._MD[month];
-	}
-};
-
-/** Returns the number of day in the year. */
-Date.prototype.getDayOfYear = function() {
-	var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
-	var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
-	var time = now - then;
-	return Math.floor(time / Date.DAY);
-};
-
-/** Returns the number of the week in year, as defined in ISO 8601. */
-Date.prototype.getWeekNumber = function() {
-	var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
-	var DoW = d.getDay();
-	d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu
-	var ms = d.valueOf(); // GMT
-	d.setMonth(0);
-	d.setDate(4); // Thu in Week 1
-	return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
-};
-
-/** Checks dates equality (ignores time) */
-Date.prototype.equalsTo = function(date) {
-	return ((this.getFullYear() == date.getFullYear()) &&
-		(this.getMonth() == date.getMonth()) &&
-		(this.getDate() == date.getDate()) &&
-		(this.getHours() == date.getHours()) &&
-		(this.getMinutes() == date.getMinutes()));
-};
-
-/** Prints the date in a string according to the given format. */
-Date.prototype.print = function (str) {
-	var m = this.getMonth();
-	var d = this.getDate();
-	var y = this.getFullYear();
-	var wn = this.getWeekNumber();
-	var w = this.getDay();
-	var s = {};
-	var hr = this.getHours();
-	var pm = (hr >= 12);
-	var ir = (pm) ? (hr - 12) : hr;
-	var dy = this.getDayOfYear();
-	if (ir == 0)
-		ir = 12;
-	var min = this.getMinutes();
-	var sec = this.getSeconds();
-	s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N]
-	s["%A"] = Calendar._DN[w]; // full weekday name
-	s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N]
-	s["%B"] = Calendar._MN[m]; // full month name
-	// FIXME: %c : preferred date and time representation for the current locale
-	s["%C"] = 1 + Math.floor(y / 100); // the century number
-	s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31)
-	s["%e"] = d; // the day of the month (range 1 to 31)
-	// FIXME: %D : american date style: %m/%d/%y
-	// FIXME: %E, %F, %G, %g, %h (man strftime)
-	s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format)
-	s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format)
-	s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366)
-	s["%k"] = hr;		// hour, range 0 to 23 (24h format)
-	s["%l"] = ir;		// hour, range 1 to 12 (12h format)
-	s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12
-	s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59
-	s["%n"] = "\n";		// a newline character
-	s["%p"] = pm ? "PM" : "AM";
-	s["%P"] = pm ? "pm" : "am";
-	// FIXME: %r : the time in am/pm notation %I:%M:%S %p
-	// FIXME: %R : the time in 24-hour notation %H:%M
-	s["%s"] = Math.floor(this.getTime() / 1000);
-	s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59
-	s["%t"] = "\t";		// a tab character
-	// FIXME: %T : the time in 24-hour notation (%H:%M:%S)
-	s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn;
-	s["%u"] = w + 1;	// the day of the week (range 1 to 7, 1 = MON)
-	s["%w"] = w;		// the day of the week (range 0 to 6, 0 = SUN)
-	// FIXME: %x : preferred date representation for the current locale without the time
-	// FIXME: %X : preferred time representation for the current locale without the date
-	s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
-	s["%Y"] = y;		// year with the century
-	s["%%"] = "%";		// a literal '%' character
-
-	var re = /%./g;
-	if (!Calendar.is_ie5)
-		return str.replace(re, function (par) { return s[par] || par; });
-
-	var a = str.match(re);
-	for (var i = 0; i < a.length; i++) {
-		var tmp = s[a[i]];
-		if (tmp) {
-			re = new RegExp(a[i], 'g');
-			str = str.replace(re, tmp);
-		}
-	}
-
-	return str;
-};
-
-Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
-Date.prototype.setFullYear = function(y) {
-	var d = new Date(this);
-	d.__msh_oldSetFullYear(y);
-	if (d.getMonth() != this.getMonth())
-		this.setDate(28);
-	this.__msh_oldSetFullYear(y);
-};
-
-// END: DATE OBJECT PATCHES
-
-
-// global object that remembers the calendar
-window.calendar = null;

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/countryCodes/countryCodes.dat
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/countryCodes/countryCodes.dat
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/countryCodes/countryCodes.dat
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/countryCodes/countryCodes.dat	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-00 = USA I
-93 = Australia
-94 = New Zealand
-779 = Argentina
-773 = Uruguay
-30 = France I
-84 = Spain
-45 = Japan
-777 = Bolivia
-80 = Italy I
-73 = Sweden
-40 = Germany
-31 = France II
-254 = Ucrania

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/javascript/members.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/javascript/members.js
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/javascript/members.js
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/javascript/members.js	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,177 +0,0 @@
-<script language="JavaScript" type="text/javascript">
-function CheckDate(d) {
-	if (d!="")
-{
-      // Cette fonction vérifie le format JJ/MM/AAAA saisi et la validité de la date.
-      // Le séparateur est défini dans la variable separateur
-      var amin=1900; // année mini
-      var amax=2100; // année maxi
-      var separateur="/"; // separateur entre jour/mois/annee
-      var j=(d.substring(0,2));
-      var m=(d.substring(3,5));
-      var a=(d.substring(6));
-      var ok=1;
-	var msg; 
-      if ( ((isNaN(j))||(j<1)||(j>31)) && (ok==1) ) {
-        msg = _("day not correct."); 
-	alert(msg); ok=0;
-      }
-      if ( ((isNaN(m))||(m<1)||(m>12)) && (ok==1) ) {
-        msg = _("month not correct.");
-	 alert(msg); ok=0;
-      }
-      if ( ((isNaN(a))||(a<amin)||(a>amax)) && (ok==1) ) {
-         msg = _("years not correct."); 
-	alert(msg); ok=0;
-      }
-      if ( ((d.substring(2,3)!=separateur)||(d.substring(5,6)!=separateur)) && (ok==1) ) {
-         alert("Separator must be "+separateur); ok=0;
-      }
-      return ok;
-   }
-}   
-   
-
-
-
-//function test if member is unique and if it's right the member is registred
-function unique() {
-var msg1;
-var msg2;
-if (  document.form.check_member.value==1){
-	if (document.form.categorycode.value != "I"){
-		
-		msg1 += _("Warning  !!!! Duplicate borrower!!!!");
-		alert(msg1);
-	check_form_borrowers(0);
-	document.form.submit();
-	
-	}else{
-		msg2 += _("Warning !!!! Duplicate organisation!!!!");
-		alert(msg2);
-	check_form_borrowers(0);
-	}
-}
-else
-{
-	document.form.submit();
-}
-
-}
-//end function
-//function test if date enrooled < date expiry
-function check_manip_date(status) {
-if (status=='verify'){
-// this part of function('verify') is used to check if dateenrolled<date expiry
-var myDate1=document.form.dateenrolled.value.split ('/');
-var myDate2=document.form.dateexpiry.value.split ('/');
-	if ((myDate1[2]>myDate2[2])||(myDate1[2]==myDate2[2] && myDate1[1]>myDate2[1])||(myDate1[2]==myDate2[2] && myDate1[1]>=myDate2[1] && myDate1[0]>=myDate2[0]))
-	
-		{ 
-		var msg = _("Warning !!! check date expiry  > date enrolment");
-		alert(msg);
-		document.form.dateexpiry.value="";
-		document.form.dateexpiry.setfocus;
-		}
-	}
-}
-//end function
-
-
-// function to test all fields in forms and nav in different forms(1 ,2 or 3)
- function check_form_borrowers(nav){
-
-var statut=0;
-if (nav < document.form.step.value) {
-	document.form.step.value=nav;
-	if ((document.form.step.value==0) && document.form.check_member.value == 1 )
-	{
- 	
-		if (document.form_double.answernodouble)	{
-			if( (!(document.form_double.answernodouble.checked))){
-				document.form.nodouble.value=0;
-			}
-			else {
-			document.form.nodouble.value=1;
-			}
- 		}
- 	} 
-	document.form.submit();
-	
-
-} else {
-	if (document.form.BorrowerMandatoryfield.value==''||document.form.FormFieldList.value=='' )
-	{}
-	else
-	{
-	var champ_verif = document.form.BorrowerMandatoryfield.value.split ('|');
- 	var champ_form= document.form.FormFieldList.value.split('|');
-		var message ="The following fields are mandatory :\n";
-	var message_champ="";
-		for (var j=0; j<champ_form.length; j++){ 
-			for (var i=0; i<champ_verif.length; i++) {
-				if (eval("document.form.elements['"+champ_verif[i]+"']") && eval("document.form.elements['"+champ_verif[j]+"']")) {
-					var val_champ=eval("document.form."+champ_verif[i]+".value");
-					var ref_champ=eval("document.form."+champ_verif[i]);
-					var val_form=eval("document.form."+champ_form[j]+".value");
-					if (champ_verif[i] == champ_form[j]){
-						//check if it's a select
-						if (ref_champ.type=='select-one'){
-							if (ref_champ.options[0].selected ){
-								// action if field is empty
-								message_champ+=champ_verif[i]+"\n";
-								//test to konw if u must show a message with error
-								statut=1;
-							}
-						}else {
-							if ( val_champ == '' ) {
-								// action if the field is not empty
-								message_champ+=champ_verif[i]+"\n";
-								statut=1;
-							}	
-						}
-					}
-				}
-			}
-		}
-	}
-//borrowers form 2 test if u chcked no to the quetsion of double 
- 	if (document.form.step.value==2 && statut!=1 && document.form.check_member.value > 0 )
-	{
-		
-  		
-			if (!(document.form_double.answernodouble.checked)){
-					
-				message ="";
-					message_champ+=_("Please confirm suspicious duplicate borrower !!! ");
-					statut=1;
-					document.form.nodouble.value=0;
-			}
-			else {
-			document.form.nodouble.value=1;
-			}
- 	}
-		
-			if (statut==1){
-			//alert if at least 1 error
-				alert(message+"\n"+message_champ);
-			}
-			else 
-			{
-			document.form.step=nav;
-			document.form.submit();
-			}
-		}
-
-}
-function Dopop(link) {
-// // 	var searchstring=document.form.value[i].value;
-	newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=no,top');
-}
-
-function Dopopguarantor(link) {
-
-	newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=no,top');
-}
-
-</script>

Index: koha-tmpl/intranet-tmpl/prog/en/includes_npl/labelConfig/itemsLabelConfig.conf
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/includes_npl/labelConfig/itemsLabelConfig.conf
diff -N koha-tmpl/intranet-tmpl/prog/en/includes_npl/labelConfig/itemsLabelConfig.conf
--- koha-tmpl/intranet-tmpl/prog/en/includes_npl/labelConfig/itemsLabelConfig.conf	11 Aug 2006 09:54:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,8 +0,0 @@
-marginBottom = 25
-pageType = A4
-columns = 5
-systemDpi = 96
-labelHeigth = 21
-rows = 13
-marginLeft = 2
-labelWidth = 41

Index: koha-tmpl/intranet-tmpl/prog/en/members/boraccount.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/boraccount.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/boraccount.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/boraccount.tmpl	22 Sep 2006 00:18:00 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,38 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->KOHA -- Account for  <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-
-<div class="table"><table>
-<caption>Account for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></caption>
-  <tr>
-  	<th>Date</th>
-	<th>Click to credit</th>
-    <th>Description of Charges</th>
-    <th>Amount</th>
-    <th>Still Owed</th>
-  </tr>
-
-  <!-- TMPL_LOOP NAME="accounts" -->
-
-   <!-- TMPL_IF NAME="toggle" --> <tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
-      <td><!-- TMPL_VAR NAME="date" --></td>
-   <td>  <!-- TMPL_IF NAME="amountoutstandingcredit" --><!-- TMPL_VAR NAME="itemnum" --><!-- TMPL_ELSE --><a href="mancredit.pl?itemnum=<!-- TMPL_VAR NAME="itemnum" -->&accountid=<!-- TMPL_VAR NAME="accountid" -->&bornum=<!-- TMPL_VAR NAME="bornum" -->&accounttype=<!-- TMPL_VAR NAME="accounttype" -->&amount=<!-- TMPL_VAR NAME="amountoutstanding" -->&user=<!-- TMPL_VAR NAME="firstname" -->%20<!-- TMPL_VAR NAME="surname" -->"><!--TMPL_IF NAME="itemnum"--><!-- TMPL_VAR NAME="itemnum" --><!--TMPL_ELSE-->Click<!--/TMPL_IF--></a><!-- /TMPL_IF --></td>
-      <td><!-- TMPL_VAR NAME="description" --><!-- TMPL_IF NAME="printtitle" --> <!-- TMPL_VAR NAME="title" --><!-- /TMPL_IF --></td>
-      <!-- TMPL_IF NAME="amountcredit" --><td class="credit"><!-- TMPL_ELSE --><td class="debit"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="amount" --> </td>
-      <!-- TMPL_IF NAME="amountoutstandingcredit" --><td class="credit"><!-- TMPL_ELSE --><td class="debit"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="amountoutstanding" --> YTL</td>
-    </tr>
-
-  <!-- /TMPL_LOOP -->
-<tfoot>
-  <tr>
-    <td colspan="4">Total Due</td>
-    <!-- TMPL_IF NAME="totalcredit" --><td class="credit"><!-- TMPL_ELSE --><td class="debit"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="total" --> YTL</td>
-  </tr>
-  </tfoot>
-</table></div>
-<!-- The manual invoice and credit buttons -->
-<div class="tabitem">
-<form action="maninvoice.pl" method="get"><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="bornum" -->" /><input type="submit" class="submit" value="Create Manual Invoice" /></form><form action="moremember.pl" method="get"><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="bornum" -->" /> <input type="submit" value="Return to User Record" class="submit" /></form>
-</div>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/members/borrowers_details.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/borrowers_details.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/borrowers_details.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/borrowers_details.tmpl	12 Jun 2006 08:35:58 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,59 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Borrower Details<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="mainbloc">
-	<h1>BORROWER DETAILS</h1>
-	
-	<form name="form" method="post" action="/cgi-bin/members/borrowers_details.pl">
-	<div >
-	<!-- TMPL_IF NAME="Institution"-->	
-		
-		<p>
-		
-			<label>borrower categorie</label>		
-			<input  type="text" name="description" size="20"  value="<!-- TMPL_VAR NAME="description" -->" >
-		</p>
-		<p>
-			
-			<label>organisation name</label>
-			<input  style="text-transform:uppercase;" type="text" name="surname" size="20"  value="<!-- TMPL_VAR NAME="surname" -->" >
-		</p>
-		
-	<!-- TMPL_ELSE -->	
-
-		<p>
-			<label>borrower categorie</label>
-			<input  type="text" name="description" size="20"  value="<!-- TMPL_VAR NAME="description" -->" >
-			</p>
-		<p>
-			<label>title</label>
-			<input  type="text" name="title" size="20"  value="<!-- TMPL_VAR NAME="title" -->" >
-			
-		</p>
-		<p>
-			<label>surname</label>
-			<input  style="text-transform:uppercase;" type="text" name="surname" size="20"  value="<!-- TMPL_VAR NAME="surname" -->" >
-		</p>
-			
-		<p>	
-			
-			<label>firstname</label>
-			<input  style="text-transform:capitalize;" type="text" name="firstname" size="20"  value="<!-- TMPL_VAR NAME="firstname" -->">
-		</p>
-		<p>
-			<label>Date of birth </label>
-			<input  type="text" name="dateofbirth" size="20"  value="<!-- TMPL_VAR NAME="dateofbirth" -->">
-		</p>		
-		
-		
-			
-		
-	<!-- /TMPL_IF -->
-	<p>
-		<div align="center">
-		<a href="#" onclick="window.close()">Close Window</a>
-		</div>
-	</p>
-	
-	</form>
-
-
-

Index: koha-tmpl/intranet-tmpl/prog/en/members/deletemem.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/deletemem.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/deletemem.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/deletemem.tmpl	19 Jul 2005 20:47:06 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Cannot Delete Member<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-	<h3>Cannot Delete Member</h3>
-		<!-- TMPL_IF name="ItemsOnIssues" -->
-			Member has <!-- TMPL_VAR name="ItemsOnIssues" --> item(s) checked out.
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="charges -->
-			Member has <!-- TMPL_VAR name="charges" --> in fines.
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="guarantees" -->
-			Member's record has child accounts attached.
-		<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/members/guarantor_search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/guarantor_search.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/guarantor_search.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/guarantor_search.tmpl	12 Jun 2006 08:35:58 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,43 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Guarantor search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<h1>Search guarantor</h1>
-	Search on
-	<form action="/cgi-bin/koha/members/guarantor_search.pl" method="post">
-		<input type="text" name="member" value="<!-- TMPL_VAR NAME="member" -->"> Ordered by
-		<select name="orderby">
-			<option value="surname,firstname">Surname</option>
-			<option value="cardnumber">cardnumber</option>
-		</select>
-		<input type="submit" class="button" value="OK">
-	</form>
-</div>
-
-<!--TMPL_IF NAME="results" -->
-	<p>filter on <!-- TMPL_VAR NAME="member" -->, <!-- TMPL_VAR Name ="numresults" --> members found</p>
-	<table>
-		<tr>
-			<th>cardnumber</th>
-			<th>surname</th>
-			<th>firstname</th>
-			<th>Date of birth</th>
-			<th>address</th>
-		</tr>
-		<!-- TMPL_LOOP NAME="resultsloop" -->
-			<!-- TMPL_IF NAME="background" -->
-				<tr bgcolor="#ffffcc">
-			<!-- TMPL_ELSE -->
-				<tr bgcolor="white">
-			<!-- /TMPL_IF -->
-				<td><!-- TMPL_VAR NAME="cardnumber" --></td>
-				<td><p><a href="javascript:window.opener.document.form.guarantorid.value=<!-- TMPL_VAR NAME="borrowernumber" -->;self.close();"><!-- TMPL_VAR NAME="surname" --></a></p>
-				<td><b><!-- TMPL_VAR NAME="firstname" --></b></td> 
-				<td><!-- TMPL_VAR NAME="dateofbirth" --></td>
-				<td><p><!-- TMPL_VAR NAME="address" --> <!-- TMPL_VAR NAME="city" --></p></td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-	</table>
-</div>
-</div>
-<!--/TMPL_IF-->
-
-
-

Index: koha-tmpl/intranet-tmpl/prog/en/members/mancredit.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/mancredit.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/mancredit.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/mancredit.tmpl	22 Sep 2006 00:18:00 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,38 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->KOHA -- Users: Create Manual Credit<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<h3>Manual Credit</h3>
-<!-- TMPL_IF NAME="error" -->
-		<div class="error">
-		<h3>Error Crediting User: Either no such invoice exists or no amount given</h3>
-		
-</div><!--/TMPL_IF-->
-<form class="inline" action="mancredit.pl" method="post" name="manualcredit">
-<input type="hidden" name="bornum" value="<!-- TMPL_VAR Name="bornum" -->" />
-<input type="hidden" name="loggedinuser" value="<!-- TMPL_VAR NAME="loggedinusername" -->">
-<input type="hidden" name="accounttype" value=  "<!-- TMPL_VAR NAME="accounttype" -->"/>
-<input type="hidden" name="itemnum" value=  "<!-- TMPL_VAR NAME="itemnum" -->"/>
-<input type="hidden" name="accountid" value=  "<!-- TMPL_VAR NAME="accountid" -->"/>
-<input type="hidden" name="user" value=  "<!-- TMPL_VAR NAME="user" -->"/>
-<input type="hidden" name="add" value=  "add"/>
-<div class="data">
-<table>
-	<tr><th>Fine Details</th><td><div class="error">User:<!-- TMPL_VAR Name="user" -->&nbsp;&nbsp;&nbsp;Amount:<!-- TMPL_VAR NAME="amount" --> </div></td></tr>
-	<tr><th>Description</th><td><input type="text" name="desc" size="50" /></td></tr>
-	<tr><th>Amount</th><td><input type="text" name="amount" /></td></tr>
-</table>
-</div>
-<input type="button"  onclick="AddCredit(this.form)" value="Add Credit" />
-</form> <form class="inline" action="boraccount.pl" method="get"><input type="hidden" value="<!-- TMPL_VAR Name="bornum" -->" name="bornum" /><input type="submit" class="cancel" value="Cancel" /></form>
-
-<script type="text/javascript">
-function AddCredit(f){
-if (f.amount.value==""){
-alert("No amount given");
-return false;
-}
-document.manualcredit.submit();
-
-
-
-}
-</script>
-<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/members/maninvoice.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/maninvoice.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/maninvoice.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/maninvoice.tmpl	22 Sep 2006 00:18:00 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Users: Create Manual Invoice<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="masthead.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-<form class="inline" action="maninvoice.pl" method="post"><input type="hidden" name="bornum" value="<!-- TMPL_VAR Name="bornum" -->" />
-	<div class="data"><table>
-	<caption>Manual Invoice</caption>
-	<tr><th>User</th><td><!-- TMPL_VAR Name="user" --></td></tr>
-	<tr><th>Type</th><td><select name="type">
-<option value="L">Lost Item</option>
-<option value="F">Fine</option>
-<option value="A">Account Management Fee</option>
-<option value="N">New Card</option>
-<option value="M">Sundry</option>
-<option value="REF">Cash Refund</option>
-</select></td></tr>
-	<tr><th>Description</th><td><input type="text" name="desc" size="50" /></td></tr>
-	<tr><th>Amount</th><td>YTL<input type="text" name="amount" /></td></tr>
-	</table></div>
-<input type="submit" name="add" value="Add Charge" class="submit" />
-</form> <form class="inline" action="boraccount.pl" method="get"><input type="hidden" name="bornum" value="<!-- TMPL_VAR Name="bornum" -->" /><input type="submit" class="cancel" value="Cancel" /></form>
-
-
-
-
-<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/members/member-flags.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/member-flags.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/member-flags.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/member-flags.tmpl	18 Jan 2006 17:23:32 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Set Privileges for <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-
-<form method="post" action="/cgi-bin/koha/members/member-flags.pl">
-	<input type="hidden" name="member" value="<!-- TMPL_VAR NAME="member" -->" />
-	<input type="hidden" name="newflags" value="1" />
-<table>
-	<caption>Set Privileges for <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></caption>
-	<tr><th scope="col">Flag</th><th scope="col">Name</th><th scope="col">Description</th></tr>
-	<!-- TMPL_LOOP NAME="loop" -->
-		<tr>
-			<td>
-				<input type="checkbox" id="flag-<!-- TMPL_VAR NAME="bit" -->" name="flag-<!-- TMPL_VAR NAME="bit" -->" <!-- TMPL_VAR NAME="checked" --> />
-			</td>
-			<td>
-				<label for="flag-<!-- TMPL_VAR NAME="bit" -->"><!-- TMPL_VAR NAME="flag" --></label>
-			</td>
-			<td>
-				<!-- TMPL_VAR NAME="flagdesc" -->
-			</td>
-		</tr>
-	<!-- /TMPL_LOOP -->
-	</table>
-
-<input type="submit" value="Set Flags" />
-
-</form>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/members/member-password.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/member-password.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/member-password.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/member-password.tmpl	18 Jan 2006 17:23:32 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_IF NAME="newpassword" -->Password Updated <!-- TMPL_ELSE -->Update Password for <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --><!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-
-<!-- TMPL_IF NAME="newpassword" -->
-<h1>Password Updated</h1>
-
-<!-- TMPL_ELSE -->
-
-<form method="post" action="/cgi-bin/koha/members/member-password.pl">
-<h1>Change Username and/or Password for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></h1>
-	
-	<!-- TMPL_IF NAME="warn" -->
-		<p>You have entered a User ID that already exists.  Please choose another one.</p>
-	<!-- /TMPL_IF -->
-
-<p>
-	<label>New UserID:</label>
-	<input type="hidden" name="member" value="<!-- TMPL_VAR NAME="member" -->" />
-	<input name="newuserid" size="20" value="<!-- TMPL_VAR NAME=userid -->" />
-</p>
-<p>
-	<label>New Password:</label>
-	<input name="newpassword" type="text" size="20" value="<!-- TMPL_VAR NAME="defaultnewpassword" -->" />
-</p>
-<p><input type="submit" value="Confirm Password" /></p>
-</form><!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/members/member-quicksearch-results.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/member-quicksearch-results.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/member-quicksearch-results.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/member-quicksearch-results.tmpl	19 Jul 2005 20:47:06 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Patron Quick Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<script type="text/javascript">
-  // Set the value of the form field to the passed value and optionally shift
-	// focus and close the popup.
-	function FillForm(val,formname,formfield) {
-	
-		document.forms[formname].elements[formfield].value = val;
-
-		// Uncomment below to shift focus after clicking link in popup.
-		document.forms[formname].elements[formfield].focus();
-		
-		// Uncomment below to close popup after clicking link.
-		newwin.close();
-	}
-</script>
-
-<table>
-  <tr>
-  	<th>&nbsp;</th>
-    <th>Card</th>
-    <th>Name (Cat.)</th>
-    <th>Address</th>
-  </tr>
-  <!-- TMPL_IF NAME="resultsloop" -->
-  <!-- TMPL_LOOP NAME="resultsloop" -->
-    <!-- TMPL_IF NAME="background" -->
-    <tr class="highlight">
-    <!-- TMPL_ELSE -->
-    <tr>
-    <!-- /TMPL_IF -->
-	 <td><form action="member-search-results.pl" method="get"><input type="button" value="Choose" title="Choose this Patron" onclick="window.opener.FillForm('<!-- TMPL_VAR NAME="cardnumber" -->','mainform','member'); return false;" /></form></td>
-      <td><!-- TMPL_VAR NAME="cardnumber" --></td>
-      <td><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></a> (<!-- TMPL_VAR NAME="categorycode" -->)</td>
-      <td><!-- TMPL_VAR NAME="streetaddress" --> <!-- TMPL_VAR NAME=city --></td>
-    </tr>
-  <!-- /TMPL_LOOP --></table>
-  <!-- TMPL_ELSE -->No results found<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/members/member-quicksearch.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/member-quicksearch.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/member-quicksearch.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/member-quicksearch.tmpl	19 Jul 2005 20:47:06 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,8 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Patron Quick Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-	<form action="/cgi-bin/koha/members/member.pl" method="post" id="mainform" class="mainform">
-	<label for="member">Patron Search:</label><input id="member" type="text" size="25" name="member" /><input type="hidden" name="quicksearch" value="1" />
-	<input type="submit" value="Search" />
-	</form>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/members/member.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/member.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/member.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/member.tmpl	18 Jan 2006 17:23:32 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Member search result<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-
-<h1>Member Search Results</h1>
-
-<!-- TMPL_IF NAME="resultsloop" -->
-	<table>
-	<tr>
-		<th>Card</th>
-		<th>Name</th>
-		<th>Cat</th>
-		<th>Address</th>
-		<th>OD/Issues</th>
-		<th>Charges</th>
-		<th>Notes</th>
-	</tr>
-	<!-- TMPL_LOOP NAME="resultsloop" -->
-	<tr>
-		<td><!-- TMPL_VAR NAME="cardnumber" --></td>
-		<td><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></a> </td>
-		<td><!-- TMPL_VAR NAME="categorycode" --></td>
-		<td><!-- TMPL_VAR NAME="streetaddress" --> <!-- TMPL_VAR NAME=city --></td>
-		<td><!-- TMPL_VAR NAME="odissue" --></td>
-		<td><!-- TMPL_VAR NAME="fines" --></td>
-		<td><!-- TMPL_VAR NAME="borrowernotes" --></td>
-	</tr>
-    <!-- /TMPL_LOOP -->
-</table>
-<!-- TMPL_ELSE --><p>No results found</p><!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl	23 Aug 2006 14:40:48 -0000	1.12
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,606 +0,0 @@
-<!-- templates to add/modify an <A>dult -->
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Member, Adult management
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-<!-- TMPL_INCLUDE NAME="javascript/members.js" -->
-
-	<!-- TMPL_IF NAME="opadd" -->
-	<h1>
-		Add adult member (step <!-- TMPL_VAR NAME="step" -->)
-	</h1>
-	<!-- TMPL_ELSE -->
-	<h1 >
-		Modify adult member
-	</h1>
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="check_member" -->
-		<!-- TMPL_IF NAME="step_2" -->
-		<p>
-		<form name="form_double">
-			<div id="problem">
-				Duplicate suspected 
-				<a href="javascript:Dopop('borrowers_details.pl?borrowernumber=<!--TMPL_VAR NAME="check_member"-->');" >Detail</a>
-				Duplicate ?
-				<a href="/cgi-bin/koha/members/memberentry.pl?borrowernumber=<!--TMPL_VAR NAME="check_member"-->&category_type=<!--TMPL_VAR NAME="check_categorytype"-->">Yes</a> 
-				&nbsp;&nbsp;&nbsp; No, it is not
-				<!-- TMPL_IF NAME="checked"-->
-					<input type="checkbox" checked name="answernodouble" >
-				<!-- TMPL_ELSE -->
-					<input type="checkbox" name="answernodouble" >
-				<!-- /TMPL_IF -->
-			</div>
-		</form>
-		</p>
-		<!--/TMPL_IF-->
-	<!--/TMPL_IF-->
-		
-		<!-- TMPL_IF Name="nok" -->
-		<!--<h1>ERREUR</h1>-->
-		<div id="problem">
-			<p>The following fields are wrong. Please fix it/them</p>
-			<!-- TMPL_IF NAME="ERROR_login_exist" -->
-				<p>login/password already exist</p>
-			<!-- /TMPL_IF -->
-                        <!-- TMPL_IF NAME="ERROR_age_limitations" -->
-                                Member is too young or too old for this category
-                        <!-- /TMPL_IF -->
-		</div>
-	<!-- /TMPL_IF -->
-
-	<!-- TMPL_IF NAME="step_1"-->
-<form name="form"  action="/cgi-bin/koha/members/memberentry.pl" method="post"> 
-<!-- 		field always hidden in different form (1,2,3) -->
-	<input type="hidden" name="BorrowerMandatoryfield" value="<!--TMPL_VAR NAME="BorrowerMandatoryfield"-->">
-	<input type="hidden" name="FormFieldList" value="surname|select_city|othernames|initials|title|cardnumber|firstname|dateofbirth|sort1|sort2">
-	<input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->">
-	<input type="hidden" name="type" value="borrowers">
-	<input type="hidden" name="step" value="<!-- TMPL_VAR NAME="step" -->">
-	<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
-	<input type="hidden" name="guarantorid"   value="<!-- TMPL_VAR NAME="guarantorid" -->">
-	<input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->">
-	<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
-	<input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" />
-	<input type="hidden" name="flags" value="<!-- TMPL_VAR NAME="flags" -->" />
-	<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-	<input type="hidden" name="nodouble"  value="<!-- TMPL_VAR NAME="nodouble" -->" />
-	
-<!-- 	from form 2 -->
-	<input type="hidden" name="streetnumber"  value="<!-- TMPL_VAR NAME="streetnumber" -->">
-	<input type="hidden" name="address"  value="<!-- TMPL_VAR NAME="address" -->">
-	<input type="hidden" name="streettype"  value="<!-- TMPL_VAR NAME="streettype" -->">
-	<input type="hidden" name="address2"  value="<!-- TMPL_VAR NAME="address2" -->">	
-	<input type="hidden" name="zipcode"  value="<!-- TMPL_VAR NAME="zipcode" -->">
-	<input type="hidden" name="city"  value="<!-- TMPL_VAR NAME="city" -->">	
-	<input type="hidden" name="branchcode"  value="<!-- TMPL_VAR NAME="branchcode" -->">
-	<input type="hidden" name="B_address"  value="<!-- TMPL_VAR NAME="B_address" -->">
-	<input type="hidden" name="B_zipcode"  value="<!-- TMPL_VAR NAME="B_zipcode" -->">
-	<input type="hidden" name="B_city"  value="<!-- TMPL_VAR NAME="B_city" -->">	
-	<input type="hidden" name="phone"   value="<!-- TMPL_VAR NAME="phone" -->" >
-	<input type="hidden" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" >
-	<input type="hidden" name="mobile"  value="<!-- TMPL_VAR NAME="mobile" -->" >	
-	<input type="hidden" name="fax"  value="<!-- TMPL_VAR NAME="fax" -->"> 
-	<input type="hidden" name="email" value="<!-- TMPL_VAR NAME="email" -->" >
-	<input type="hidden" name="emailpro" value="<!-- TMPL_VAR NAME="emailpro" -->" >
-	
-<!-- 	from form 3	 -->
-	<input type="hidden" name="dateenrolled" size="20" value="<!-- TMPL_VAR NAME="dateenrolled" -->">
-	<input type="hidden" name="dateexpiry" size="20" value="<!-- TMPL_VAR NAME="dateexpiry" -->">
-	<textarea  style="display:none;" name="opacnote" cols="70" rows="3"><!-- TMPL_VAR NAME="opacnote"--></textarea>
-	<textarea style="display:none;" name="borrowernotes" cols="70" rows="3"><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
-	<input type="hidden" name="userid" size="20"  value="<!-- TMPL_VAR NAME="userid" -->">
-	<input type="hidden" name="password" size="20"  value="<!-- TMPL_VAR NAME="password" -->">	
-	<input type="hidden" name="debarred"  value="<!-- TMPL_VAR NAME="debarred" -->" />
-	<input type="hidden" name="lost"  value="<!-- TMPL_VAR NAME="lost" -->" />
-	<input type="hidden" name="gonenoaddress"  value="<!-- TMPL_VAR NAME="gonenoaddress" -->" />
-
-	
-	
-	<!-- / CHECKBOX from form 3 Warning -->
-	<!-- TMPL_IF NAME="opadd" -->
-		<input type="hidden" name="op" value="add">
-	<!-- TMPL_ELSE -->
-		<input type="hidden" name="op" value="modify">
-	<!-- /TMPL_IF -->
-	<fieldset id="memberentry_identity">
-		<legend>Borrower identity</legend>
-		<p>
-		<!-- TMPL_IF NAME="female" -->
-		<input type="radio" name="sex" value="F" checked>Female
-		<input type="radio" name="sex" value="M">Male
-		<!-- TMPL_ELSE -->
-		<input type="radio" name="sex" value="F">Female
-		<input type="radio" name="sex" value="M" checked>Male
-		<!-- /TMPL_IF -->
-		</p>
-		<!-- TMPL_IF NAME="mandatorycardnumber" -->
-			<label style="font-weight:bold">
-		<!--TMPL_ELSE -->
-			<label>
-		<!-- /TMPL_IF--> 
-		Card number</label>
-		<input type="text" name="cardnumber" size="10" value="<!-- TMPL_VAR NAME="cardnumber" -->">
-		<p>
-		<!-- TMPL_IF NAME="mandatorytitle" -->
-			<label style="font-weight:bold">
-		<!-- TMPL_ELSE -->
-			<label>
-		<!-- /TMPL_IF-->
-		Title</label>
-		<select  name="title" >
-			<option <!-- TMPL_VAR NAME="title_selected_ " --> value="" >Select a value</option>
-			<option value="Mlle" <!-- TMPL_VAR NAME="title_Mlle" -->>Mlle</option>
-			<option value="Mme" <!-- TMPL_VAR NAME="title_Mme" -->>Mme</option>
-			<option value="Mr" <!-- TMPL_VAR NAME="title_Mr" --> >M.</option>
-		</select>
-		</p>
-		<p>
-		<!-- TMPL_IF NAME="mandatorysurname" -->
-		<label style="font-weight:bold">
-		<!-- TMPL_ELSE -->
-		<label>
-		<!-- /TMPL_IF-->
-		Surname</label>
-		<input style="text-transform:uppercase;" type="text" name="surname" size="20"  value="<!-- TMPL_VAR NAME="surname" -->" >
-		</p>
-		<p>
-		<!-- TMPL_IF NAME="mandatoryfirstname" -->
-		<label style="font-weight:bold">
-		<!-- TMPL_ELSE -->
-		<label>
-		<!-- /TMPL_IF-->
-		Firstname</label>
-		<input style="text-transform:capitalize;" type="text" name="firstname" size="20"  value="<!-- TMPL_VAR NAME="firstname" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorydateofbirth" -->
-			<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->	
-			<label>
-			<!-- /TMPL_IF-->
-			Date of Birth</label>
-			<input type="text" name="dateofbirth" size="20" onBlur="CheckDate(document.form.dateofbirth.value);" value="<!-- TMPL_VAR NAME="dateofbirth" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryinitials" -->
-				<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Initials</label>
-			<input type="text" name="initials" size="20"  value="<!-- TMPL_VAR NAME="initials" -->">	
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryothernames" -->
-			<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->
-			<label>
-			<!-- /TMPL_IF-->
-			Other name</label>
-			<input style="text-transform:uppercase;" type="text" name="othernames" size="20"  value="<!-- TMPL_VAR NAME="othernames" -->" >
-		</p>
-	</fieldset>
-	<fieldset id="memberentry_identity">
-		<legend>Borrower type</legend>
-		<p>
-		<label>Select a category</label>
-		<!-- TMPL_VAR NAME="catcodepopup" -->
-		</p>
-		<!-- TMPL_IF NAME="city_cgipopup" -->	
-		<p>
-			<!-- TMPL_IF NAME="mandatoryselect_city" -->
-				<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Select a city</label>
-			<!-- TMPL_VAR NAME="citypopup" -->
-		</p>
-		<!-- /TMPL_IF-->
-		<p>
-			<!-- TMPL_IF NAME="mandatorysort1" -->
-				<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Sort 1</label>
-			<!--TMPL_IF NAME="CGIsort1" -->	
-				<!-- TMPL_VAR NAME="CGIsort1" -->
-			<!--TMPL_ELSE-->
-				<input  type="text" name="sort1" size="20"  value="<!-- TMPL_VAR NAME="sort1" -->" >
-			<!-- /TMPL_IF -->		
-		</p>
-		<p>
-		<!-- TMPL_IF NAME="mandatorysort2" -->
-		<label style="font-weight:bold">
-		<!-- TMPL_ELSE -->
-		<label>
-		<!-- /TMPL_IF-->
-		Sort 2</label>
-		<!--TMPL_IF NAME="CGIsort2" -->	
-			<!-- TMPL_VAR NAME="CGIsort2" -->
-		<!--TMPL_ELSE-->
-			<input  type="text" name="sort2" size="20"  value="<!-- TMPL_VAR NAME="sort2" -->" >
-		<!-- /TMPL_IF -->	
-		</p>
-	</fieldset>
-	<div>
-		<input type="button" name="next_step" value="Next Step" onclick="check_form_borrowers(1);">
-	</div>
-</form>
-<!-- ************************ STEP_1 *********************** -->
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="step_2"-->
-<form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post">
-	<!-- 		field always hidden in different form (1,2,3) -->
-	<input type="hidden" name="BorrowerMandatoryfield" value="<!--TMPL_VAR NAME="BorrowerMandatoryfield"-->">
-	<input type="hidden" name="FormFieldList" value="cardnumber|streetnumber|streettype|address|address2|zipcode|city|B_address|B_zipcode|B_city|phone|phonepro|mobile|email|emailpro|fax">
-	<input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->">
-	<input type="hidden" name="type" value="borrowers">
-	<input type="hidden" name="step" value="<!-- TMPL_VAR NAME="step" -->">
-	<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
-	<input type="hidden" name="guarantorid"   value="<!-- TMPL_VAR NAME="guarantorid" -->">
-	<input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->">
-	<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
-	<input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" />
-	<input type="hidden" name="flags" value="<!-- TMPL_VAR NAME="flags" -->" />
-	<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-	<input type="hidden" name="nodouble"  value="<!-- TMPL_VAR NAME="nodouble" -->" />
-
-<!-- 	from form 1	 -->
-	<input type="hidden" name="title" value="<!-- TMPL_VAR NAME="title" -->">
-	<input style="text-transform:capitalize;" type="hidden" name="firstname" size="20" value="<!-- TMPL_VAR NAME="firstname" -->">
-	<input style="text-transform:uppercase;" type="hidden" name="surname" size="20" value="<!-- TMPL_VAR NAME="surname" -->" >
-	<input type="hidden" name="cardnumber"  value="<!-- TMPL_VAR NAME="cardnumber" -->">
-	<input type="hidden" name="dateofbirth"  value="<!-- TMPL_VAR NAME="dateofbirth" -->">
-	<input type="hidden" name="initials" size="20"  value="<!-- TMPL_VAR NAME="initials" -->">
-	<input type="hidden" name="othernames" size="20"  value="<!-- TMPL_VAR NAME="othernames" -->" >
-	<input type="hidden" name="sex" value="<!-- TMPL_VAR NAME="sex" -->" >
-	<input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->" >	
-	<input type="hidden" name="select_city" value="<!-- TMPL_VAR NAME="select_city" -->">
-	<input type="hidden" name="sort1" value="<!-- TMPL_VAR NAME="sort1" -->" >
-	<input type="hidden" name="sort2" value="<!-- TMPL_VAR NAME="sort2" -->" >
-	<!-- 	from form 3	 -->
-	<input type="hidden" name="dateenrolled" size="20" value="<!-- TMPL_VAR NAME="dateenrolled" -->">
-	<input type="hidden" name="dateexpiry" size="20" value="<!-- TMPL_VAR NAME="dateexpiry" -->">
-	<textarea  style="display:none;" name="opacnote" cols="70" rows="3"><!-- TMPL_VAR NAME="opacnote"--></textarea>
-	<textarea style="display:none;" name="borrowernotes" cols="70" rows="3"><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
-	<input type="hidden" name="userid" size="20"  value="<!-- TMPL_VAR NAME="userid" -->">
-	<input type="hidden" name="password" size="20"  value="<!-- TMPL_VAR NAME="password" -->">	
-	<input type="hidden" name="debarred"  value="<!-- TMPL_VAR NAME="debarred" -->" />
-	<input type="hidden" name="lost"  value="<!-- TMPL_VAR NAME="lost" -->" />
-	<input type="hidden" name="gonenoaddress"  value="<!-- TMPL_VAR NAME="gonenoaddress" -->" />	
-	<!-- TMPL_IF NAME="opadd" -->
-		<input type="hidden" name="op" value="add">
-	<!-- TMPL_ELSE -->
-		<input type="hidden" name="op" value="modify">
-	<!-- /TMPL_IF -->
-	<fieldset id="memberentry_address">
-		<legend>Address</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorybranchcode" -->
-				<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Branch</label>
-			<!-- TMPL_VAR NAME="CGIbranch" -->
-		</p>
-		<fieldset>
-		<legend>Main Address</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorystreetnumber" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			street number</label>
-			<input type="text" name="streetnumber" size="5" value="<!-- TMPL_VAR NAME="streetnumber" -->">
-		</p>
-		<!-- TMPL_IF NAME="road_cgipopup" -->
-			<p>
-			<!-- TMPL_IF NAME="mandatorystreettype" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Street type</label>
-			<!-- TMPL_VAR NAME="roadpopup" -->
-			</p>
-		<!--/TMPL_IF-->	
-		<p>
-			<!-- TMPL_IF NAME="mandatoryaddress" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Address</label>
-			<input type="text" name="address" size="35" value="<!-- TMPL_VAR NAME="address" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryaddress2" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Address 2</label>
-			<input type="text" name="address2" size="35" value="<!-- TMPL_VAR NAME="address2" -->">
-		</p>
-		<p>	
-			<!-- TMPL_IF NAME="mandatoryzipcode" -->
-				<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Zipcode</label>
-			<input type="text" maxlength="5" name="zipcode" size="5" value="<!-- TMPL_VAR NAME="zipcode" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorycity" -->
-				<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			City</label>
-			<input style="text-transform:uppercase;" type="text" name="city" size="20" value="<!-- TMPL_VAR NAME="city" -->">
-		</p>
-		</fieldset>
-		<fieldset>
-		<legend>Alt Address</legend>
-			<p>
-				<!-- TMPL_IF NAME="mandatoryB_address" -->
-					<label style="font-weight:bold">
-				<!--TMPL_ELSE-->
-					<label>
-				<!-- /TMPL_IF-->
-				Address</label>
-				<input type="text" name="B_address" size="40" value="<!-- TMPL_VAR NAME="B_address" -->">
-			</p>
-			<p>
-				<!-- TMPL_IF NAME="mandatoryB_zipcode" -->
-					<label style="font-weight:bold">
-				<!--TMPL_ELSE-->
-					<label>
-				<!-- /TMPL_IF-->
-				Zipcode</label>
-				<input type="text" name="B_zipcode" maxlength="5" size="5" value="<!-- TMPL_VAR NAME="B_zipcode" -->">
-			</p>
-			<p>
-				<!-- TMPL_IF NAME="mandatoryB_city" -->
-					<label style="font-weight:bold" >
-				<!--TMPL_ELSE-->
-					<label>
-				<!-- /TMPL_IF-->
-				City</label>
-				<input type="text" style="text-transform:uppercase;" name="B_city" size="20" value="<!-- TMPL_VAR NAME="B_city" -->">
-			</p>
-		</fieldset>
-	</fieldset>
-	<fieldset id="memberentry_contact">
-		<legend>contact</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryphone" --> 
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Phone (home)</label>
-			<input type="text"  name="phone" value="<!-- TMPL_VAR NAME="phone" -->" >
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryphonepro" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Phone (prof)</label>
-			<input type="text" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" >
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorymobile" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Phone (cell)</label>
-			<input type="text" name="mobile" value="<!-- TMPL_VAR NAME="mobile" -->" >
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryemail" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			E-mail (home)</label>
-			<input type="text" name="email" value="<!-- TMPL_VAR NAME="email" -->" >	
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryemailpro" -->	
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			E-mail (prof)</label>
-			<input type="text" name="emailpro" value="<!-- TMPL_VAR NAME="emailpro" -->" >
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryfax" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Fax</label>
-			<input type="text" name="fax" value="<!-- TMPL_VAR NAME="fax" -->" >
-		</p>
-	</fieldset>
-	<!-- TMPL_IF NAME="memberofinstution" -->
-	<fieldset id="memberentry_organisation">
-		<legend>Organisations</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryphone" --> 
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Organisation(s)</label>
-			<!-- TMPL_VAR NAME="CGIorganisations" -->
-		</p>
-	</fieldset>
-	<!-- /TMPL_IF -->
-
-	<div>
-		<input type="button" class="borrowers_button" name="step1" value="Previous step" onclick="check_form_borrowers(0);">	
-		<INPUT type="button" class="borrowers_button" name="step3" onclick="check_form_borrowers(2)" value="Next step">
-	</div>
-</p>
-</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="step_3"-->
-<form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post">
-	<!-- 		field always hidden in different form (1,2,3) -->
-	<input type="hidden" name="BorrowerMandatoryfield" value="<!--TMPL_VAR NAME="BorrowerMandatoryfield"-->">
-	<input type="hidden" name="FormFieldList" value="cardnumber|dateenrolled|dateexpiry|opacnote|borrowernotes|userid|password">
-	<input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->">
-	<input type="hidden" name="type" value="borrowers">
-	<input type="hidden" name="step" value="<!-- TMPL_VAR NAME="step" -->">
-	<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
-	<input type="hidden" name="guarantorid"   value="<!-- TMPL_VAR NAME="guarantorid" -->">
-	<input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->">
-	<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
-	<input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" />
-	<input type="hidden" name="flags" value="<!-- TMPL_VAR NAME="flags" -->" />
-	<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-	<input type="hidden" name="nodouble"  value="<!-- TMPL_VAR NAME="nodouble" -->" />
-
-<!-- 	from form 1	 -->
-	<input type="hidden" name="title" value="<!-- TMPL_VAR NAME="title" -->">
-	<input style="text-transform:capitalize;" type="hidden" name="firstname" size="20" value="<!-- TMPL_VAR NAME="firstname" -->">
-	<input style="text-transform:uppercase;" type="hidden" name="surname" size="20" value="<!-- TMPL_VAR NAME="surname" -->" >
-	<input type="hidden" name="cardnumber"  value="<!-- TMPL_VAR NAME="cardnumber" -->">
-	<input type="hidden" name="dateofbirth"  value="<!-- TMPL_VAR NAME="dateofbirth" -->">
-	<input type="hidden" name="initials" size="20"  value="<!-- TMPL_VAR NAME="initials" -->">
-	<input type="hidden" name="othernames" size="20"  value="<!-- TMPL_VAR NAME="othernames" -->" >
-	<input type="hidden" name="sex" value="<!-- TMPL_VAR NAME="sex" -->" >
-	<input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->" >	
-	<input type="hidden" name="select_city" value="<!-- TMPL_VAR NAME="select_city" -->">
-	<input type="hidden" name="sort1" value="<!-- TMPL_VAR NAME="sort1" -->" >
-	<input type="hidden" name="sort2" value="<!-- TMPL_VAR NAME="sort2" -->" >
-
-<!-- 	from form 2 -->
-	<input type="hidden" name="streetnumber"  value="<!-- TMPL_VAR NAME="streetnumber" -->">
-	<input type="hidden" name="address"  value="<!-- TMPL_VAR NAME="address" -->">
-	<input type="hidden" name="streettype"  value="<!-- TMPL_VAR NAME="streettype" -->">
-	<input type="hidden" name="address2"  value="<!-- TMPL_VAR NAME="address2" -->">	
-	<input type="hidden" name="zipcode"  value="<!-- TMPL_VAR NAME="zipcode" -->">
-	<input type="hidden" name="city"  value="<!-- TMPL_VAR NAME="city" -->">	
-	<input type="hidden" name="branchcode"  value="<!-- TMPL_VAR NAME="branchcode" -->">
-	<input type="hidden" name="B_address"  value="<!-- TMPL_VAR NAME="B_address" -->">
-	<input type="hidden" name="B_zipcode"  value="<!-- TMPL_VAR NAME="B_zipcode" -->">
-	<input type="hidden" name="B_city"  value="<!-- TMPL_VAR NAME="B_city" -->">	
-	<input type="hidden" name="phone"   value="<!-- TMPL_VAR NAME="phone" -->" >
-	<input type="hidden" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" >
-	<input type="hidden" name="mobile"  value="<!-- TMPL_VAR NAME="mobile" -->" >	
-	<input type="hidden" name="fax"  value="<!-- TMPL_VAR NAME="fax" -->"> 
-	<input type="hidden" name="email" value="<!-- TMPL_VAR NAME="email" -->" >
-	<input type="hidden" name="emailpro" value="<!-- TMPL_VAR NAME="emailpro" -->" >
-	<input type="hidden" name="organisations" value="<!-- TMPL_VAR NAME="organisations" -->" >	
-	<!-- TMPL_IF NAME="opadd" -->
-		<input type="hidden" name="op" value="add">
-	<!-- TMPL_ELSE -->
-		<input type="hidden" name="op" value="modify">
-	<!-- /TMPL_IF -->
-	<fieldset id="memberentry_subscription">
-	<legend>Library set-up</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorydateenrolled" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Arrival date</label>
-			<input type="text" name="dateenrolled"  maxlength="10"	  size="10" onblur="CheckDate(document.form.dateenrolled.value);" value="<!-- TMPL_VAR NAME="dateenrolled" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorydateexpiry" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Expiry date</label>
-			<input type="text" name="dateexpiry" maxlength="10"  size="10"
-							onblur="CheckDate(document.form.dateexpiry.value);check_manip_date('verify');" value="<!-- TMPL_VAR NAME="dateexpiry" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryopacnote" -->
-				<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->	
-			OPAC note</label>
-			<textarea  name="opacnote" cols="70" rows="2"   ><!-- TMPL_VAR NAME="opacnote" --></textarea>
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryborrowernotes" -->	
-				<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Library note</label>
-			<textarea name="borrowernotes" cols="70" rows="2"   ><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
-		</p>
-	</fieldset>
-	<fieldset id="memberentry_userid">
-		<legend>OPAC login</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryuserid" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			OPAC Login</label>
-			<input type="text" name="userid" size="20"  value="<!-- TMPL_VAR NAME="userid" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorypassword" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Password</label>
-			<!--TMPL_IF NAME="opadd"-->
-				<input type="text" name="password" size="20"  value="<!-- TMPL_VAR NAME="password" -->">
-			<!--TMPL_ELSE-->
-				<!--TMPL_IF NAME="password"-->
-					<input type="text" name="password" size="20"  value="****">
-				<!--TMPL_ELSE-->
-					<input type="text" name="password" size="20"  value="">
-				<!--/TMPL_IF-->
-			<!--/TMPL_IF-->
-		</p>
-		<!--this zones are not necessary in modif mode -->
-		<!-- TMPL_UNLESS NAME="opadd" -->
-			<h1>Warning</h1>
-			<!-- TMPL_LOOP NAME="flagloop" -->
-			<p>
-				<label class="borrowers_labels_title"><!-- TMPL_VAR NAME="html" --></label>
-				<input type="radio" name="<!-- TMPL_VAR NAME="name" -->" value="1" <!-- TMPL_VAR NAME="yes" -->>Yes
-				<input type="radio" name="<!-- TMPL_VAR NAME="name" -->" value="0" <!-- TMPL_VAR NAME="no" -->>No
-			</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_UNLESS -->	
-		<p>
-		</fieldset>
-		<div>
-			<input type="button" class="borrowers_button" name="step2" value="Previous step" onclick="check_form_borrowers(1);">	
-			<!-- TMPL_IF NAME="opadd" -->
-				<input type="button" name="step4" onclick="unique();" value="Add member">
-			<!-- TMPL_ELSE -->
-				<input type="button" name="step4" onclick="check_form_borrowers();" value="Modify member">
-			<!--/TMPL_IF -->
-		</div>
-		</form>
-	<!-- /TMPL_IF -->
-
-<!--	 TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/members/memberentryC.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/memberentryC.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/memberentryC.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/memberentryC.tmpl	23 Aug 2006 14:40:48 -0000	1.10
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,650 +0,0 @@
-<!-- templates to add/modify a <C>hild -->
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Member, Child management
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-<!-- TMPL_INCLUDE NAME="javascript/members.js" -->
-
-	<!-- TMPL_IF NAME="add" -->
-	<h1>
-		Add children member (step <!-- TMPL_VAR NAME="step" -->)
-	</h1>
-	<!-- TMPL_ELSE -->
-	<h1 >
-		Modify children member
-	</h1>
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="check_member" -->
-		<!-- TMPL_IF NAME="step_2" -->
-	<p>
-	<form name="form_double">
-		<div id="problem">
-			Duplicate suspected 
-			<a href="javascript:Dopop('borrowers_details.pl?borrowernumber=<!--TMPL_VAR NAME="check_member"-->');" class="borrowers_button">Details</a>
-			Duplicate ?	
-			<a href="/cgi-bin/koha/members/memberentry.pl?borrowernumber=<!--TMPL_VAR NAME="check_member"-->&category_type=<!--TMPL_VAR NAME="check_categorytype"-->" class="borrowers_button">Yes</a> 
-			&nbsp;&nbsp;&nbsp; No, it is not
-			<INPUT type="checkbox" <!-- TMPL_IF NAME="checked"--> checked <!--/TMPL_IF--> name="answernodouble" >
-		</div>
-	</form>	
-	
-		</p>	
-		<!--/TMPL_IF-->
-	<!--/TMPL_IF-->
-	<!-- TMPL_IF Name="NOK" -->
-		<h1>ERROR</h1>
-		<div id="problem">
-			<p>The following fields are wrong. Please fix it/them</p>
-			<!-- TMPL_IF NAME="ERROR_login_exist" -->
-				<p>login/password already exist</p>
-			<!-- /TMPL_IF -->
- 			<!-- TMPL_IF NAME="ERROR_age_limitations" -->
-                                Member is too young or too old for this category
-                        <!-- /TMPL_IF -->
-		</div>
-	<!-- /TMPL_IF -->
-
-<!--############################################################FORMULAIRE 1 #######################################-->
-<!-- TMPL_IF NAME="step_1"-->
-		<form name="form"  action="/cgi-bin/koha/members/memberentry.pl" method="post"> 
-		<!-- 		field always hidden in different form (1,2,3) -->		
-			<input type="hidden" name="BorrowerMandatoryfield" value="<!--TMPL_VAR NAME="BorrowerMandatoryfield"-->">
-			<input type="hidden" name="FormFieldList" value="cardnumber|title|surname|firstname|dateofbirth|initials|othernames|select_city|sort1|sort2">
-			<input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->">
-			<input type="hidden" name="type" value="borrowers">
-			<input type="hidden" name="step" value="<!-- TMPL_VAR NAME="step" -->">
-			<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
-			<input type="hidden" name="guarantorid"   value="<!-- TMPL_VAR NAME="guarantorid" -->">
-			<input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->">
-			<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
-			<input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" />
-			<input type="hidden" name="flags" value="<!-- TMPL_VAR NAME="flags" -->" />
-			<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-			<input type="hidden" name="nodouble" "  value="<!-- TMPL_VAR NAME="nodouble" -->"/>
-	
-			<!-- 		input from form 2 -->
-			<input type="hidden" name="contacttitle" size="20" value="<!-- TMPL_VAR NAME="contacttitle" -->">
-			<input type="hidden" name="contactname" value="<!-- TMPL_VAR NAME="contactname" -->">
-			<input type="hidden" name="contactfirstname" value="<!-- TMPL_VAR NAME="contactfirstname" -->">		
-			<input type="hidden" name="branchcode" value="<!-- TMPL_VAR NAME="branchcode" -->">
-			<input type="hidden" name="streetnumber" value="<!-- TMPL_VAR NAME="streetnumber" -->">
-			<input type="hidden" name="streettype" value="<!-- TMPL_VAR NAME="streettype" -->">
-			<input type="hidden" name="address"  value="<!-- TMPL_VAR NAME="address" -->">
-			<input type="hidden" name="address2"  value="<!-- TMPL_VAR NAME="address2" -->">
-			<input type="hidden" name="zipcode" value="<!-- TMPL_VAR NAME="zipcode" -->">
-			<input type="hidden" name="city" value="<!-- TMPL_VAR NAME="city" -->">
-			<input type="hidden" name="relationship" value="<!-- TMPL_VAR NAME="relationship" -->"> 
-			<input type="hidden" name="phone" value="<!-- TMPL_VAR NAME="phone" -->" >
-			<input type="hidden" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" >
-			<input type="hidden" name="mobile" size="10" value="<!-- TMPL_VAR NAME="mobile" -->" >	
-			<input type="hidden" name="email" value="<!-- TMPL_VAR NAME="email" -->" >
-			<input type="hidden" name="emailpro" value="<!-- TMPL_VAR NAME="emailpro" -->" >
-			<input type="hidden" name="B_email" value="<!-- TMPL_VAR NAME="B_email" -->" >	
-			<input type="hidden" name="B_phone" value="<!-- TMPL_VAR NAME="B_phone" -->" >
-			<input type="hidden" name="fax" value="<!-- TMPL_VAR NAME="fax" -->" >	
-
-			<!-- 		input from form3		 -->
-			<input type="hidden" name="dateenrolled" value="<!-- TMPL_VAR NAME="dateenrolled" -->">
-			<input type="hidden" name="dateexpiry"  value="<!-- TMPL_VAR NAME="dateexpiry" -->">
-			<textarea  style="display:none;" name="opacnote" cols="70" rows="3"><!-- TMPL_VAR NAME="opacnote"--></textarea>
-			<textarea style="display:none;" name="borrowernotes" cols="70" rows="3"><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
-			<input type="hidden" name="userid"  value="<!-- TMPL_VAR NAME="userid" -->">
-			<input type="hidden" name="password"  value="<!-- TMPL_VAR NAME="password" -->">	
-			<input type="hidden" name="debarred"  value="<!-- TMPL_VAR NAME="debarred" -->" />
-			<input type="hidden" name="lost"  value="<!-- TMPL_VAR NAME="lost" -->" />
-			<input type="hidden" name="gonenoaddress"  value="<!-- TMPL_VAR NAME="gonenoaddress" -->" />	
-
-	<!-- TMPL_IF NAME="opadd" -->
-		<input type="hidden" name="op" value="add">
-	<!-- TMPL_ELSE -->
-		<input type="hidden" name="op" value="modify">
-	<!-- /TMPL_IF -->
-		<!-- TMPL_VAR NAME="member" -->
-			<p>
-				<!-- TMPL_IF NAME="mandatorycardnumber" -->
-				<label  class="borrowers_mandafield">
-				<!--TMPL_ELSE-->
-				<label>
-				<!-- /TMPL_IF-->
-				Card number</label>
-				 <input type="text" name="cardnumber" size="10" value="<!-- TMPL_VAR NAME="cardnumber" -->">
-			</p>	
-	<fieldset id="memberentry_identity">
-		<legend>Borrower identity</legend>
-		<p>
-		<!-- TMPL_IF NAME="female" -->
-		<input type="radio" name="sex" value="F" checked>Female
-		<input type="radio" name="sex" value="M">Male
-		<!-- TMPL_ELSE -->
-		<input type="radio" name="sex" value="F">Female
-		<input type="radio" name="sex" value="M" checked>Male
-		<!-- /TMPL_IF -->
-		</p>
-		<p>
-		<!-- TMPL_IF NAME="mandatorytitle" -->
-			<label style="font-weight:bold">
-		<!-- TMPL_ELSE -->
-			<label>
-		<!-- /TMPL_IF-->
-		Title</label>
-		<select  name="title" >
-			<option <!-- TMPL_VAR NAME="title_selected_ " --> value="" >Select a value</option>
-			<option value="Mlle" <!-- TMPL_VAR NAME="title_Mlle" -->>Mlle</option>
-			<option value="Mme" <!-- TMPL_VAR NAME="title_Mme" -->>Mme</option>
-			<option value="Mr" <!-- TMPL_VAR NAME="title_Mr" --> >M.</option>
-		</select>
-		</p>
-		<p>
-		<!-- TMPL_IF NAME="mandatorysurname" -->
-		<label  style="font-weight:bold">
-		<!-- TMPL_ELSE -->
-		<label>
-		<!-- /TMPL_IF-->
-		Surname</label>
-		<input style="text-transform:uppercase;" type="text" name="surname" size="20"  value="<!-- TMPL_VAR NAME="surname" -->" >
-		</p>
-		<p>
-		<!-- TMPL_IF NAME="mandatoryfirstname" -->
-		<label  style="font-weight:bold">
-		<!-- TMPL_ELSE -->
-		<label>
-		<!-- /TMPL_IF-->
-		Firstname</label>
-		<input style="text-transform:capitalize;" type="text" name="firstname" size="20"  value="<!-- TMPL_VAR NAME="firstname" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorydateofbirth" -->
-			<label  style="font-weight:bold">
-			<!-- TMPL_ELSE -->	
-			<label>
-			<!-- /TMPL_IF-->
-			Date of Birth</label>
-			<input type="text" name="dateofbirth" size="20" onBlur="CheckDate(document.form.dateofbirth.value);" value="<!-- TMPL_VAR NAME="dateofbirth" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryinitials" -->
-				<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Initials</label>
-			<input type="text" name="initials" size="20"  value="<!-- TMPL_VAR NAME="initials" -->">	
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryothernames" -->
-			<label  style="font-weight:bold">
-			<!-- TMPL_ELSE -->
-			<label>
-			<!-- /TMPL_IF-->
-			Other name</label>
-			<input style="text-transform:uppercase;" type="text" name="othernames" size="20"  value="<!-- TMPL_VAR NAME="othernames" -->" >
-		</p>
-	
-	<!-- TMPL_UNLESS NAME="add"-->	
-	<p><a href="javascript:Dopopguarantor('guarantor_search.pl');">Modify guarantor</a></p>
-	<!-- /TMPL_UNLESS -->
-	<!-- TMPL_IF NAME="add" -->
-	<!-- TMPL_UNLESS NAME="guarantorid"-->	
-	<p><a href="javascript:Dopopguarantor('guarantor_search.pl');">Find guarantor</a></p>
-	<!-- /TMPL_UNLESS -->
-	<!-- /TMPL_IF -->
-	</fieldset>
-	<fieldset id="memberentry_identity">
-		<legend>Borrower type</legend>
-		<p>
-		<label>Select a category</label>
-		<!-- TMPL_VAR NAME="catcodepopup" -->
-		</p>
-		<!-- TMPL_IF NAME="city_cgipopup" -->	
-		<p>
-			<!-- TMPL_IF NAME="mandatoryselect_city" -->
-				<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Select a city</label>
-			<!-- TMPL_VAR NAME="citypopup" -->
-		</p>
-		<!-- /TMPL_IF-->
-		<p>
-			<!-- TMPL_IF NAME="mandatorysort1" -->
-				<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Sort 1</label>
-			<!--TMPL_IF NAME="CGIsort1" -->	
-				<!-- TMPL_VAR NAME="CGIsort1" -->
-			<!--TMPL_ELSE-->
-				<input  type="text" name="sort1" size="20"  value="<!-- TMPL_VAR NAME="sort1" -->" >
-			<!-- /TMPL_IF -->		
-		</p>
-		<p>
-		<!-- TMPL_IF NAME="mandatorysort2" -->
-		<label style="font-weight:bold">
-		<!-- TMPL_ELSE -->
-		<label>
-		<!-- /TMPL_IF-->
-		Sort 2</label>
-		<!--TMPL_IF NAME="CGIsort2" -->	
-			<!-- TMPL_VAR NAME="CGIsort2" -->
-		<!--TMPL_ELSE-->
-			<input  type="text" name="sort2" size="20"  value="<!-- TMPL_VAR NAME="sort2" -->" >
-		<!-- /TMPL_IF -->	
-		</p>
-	</fieldset>
-	<div>
-		<input type="button" name="next_step" value="Next Step" onclick="check_form_borrowers(1);">
-	</div>
-</form>
-<!-- ************************ STEP_1 *********************** -->
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="step_2"-->
-	<form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post">
-<!-- 		field always hidden in different form (1,2,3) -->
-		<input type="hidden" name="BorrowerMandatoryfield" value="<!--TMPL_VAR NAME="BorrowerMandatoryfield"-->">
-		<input type="hidden" name="FormFieldList" value="cardnumber|streetnumber|streettype|address|address2|zipcode|contacttitle|city|contactname|contactfirstname|phone|phonepro|mobile|email|emailpro|B_email|B_phone|relationship|fax">
-		<input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->">
-		<input type="hidden" name="type" value="borrowers">
-		<input type="hidden" name="step" value="<!-- TMPL_VAR NAME="step" -->">
-		<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
-		<input type="hidden" name="guarantorid"   value="<!-- TMPL_VAR NAME="guarantorid" -->">
-		<input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->">
-		<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
-		<input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" />
-		<input type="hidden" name="flags" value="<!-- TMPL_VAR NAME="flags" -->" />
-		<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-		<input type="hidden" name="nodouble" "  value="<!-- TMPL_VAR NAME="nodouble" -->"/>
-
-<!-- 		input from form 1 		-->
-		<input type="hidden" name="title" size="10" value="<!-- TMPL_VAR NAME="title" -->">
-		<input style="text-transform:capitalize;" type="hidden" name="firstname" size="20" value="<!-- TMPL_VAR NAME="firstname" -->">
-		<input style="text-transform:uppercase;" type="hidden" name="surname" size="20" value="<!-- TMPL_VAR NAME="surname" -->" >
-		<input type="hidden" name="dateofbirth" size="20"  value="<!-- TMPL_VAR NAME="dateofbirth" -->">
-		<input type="hidden" name="initials" size="20"  value="<!-- TMPL_VAR NAME="initials" -->">
-		<input type="hidden" name="othernames" size="20"  value="<!-- TMPL_VAR NAME="othernames" -->" >
-		<input type="hidden" name="sex" value="<!-- TMPL_VAR NAME="sex" -->" >
-		<input type="hidden" name="categorycode" size="10" value="<!-- TMPL_VAR NAME="categorycode" -->">
-		<input type="hidden" name="select_city" value="<!-- TMPL_VAR NAME="select_city" -->">	
-		<input type="hidden" name="sort1"  value="<!-- TMPL_VAR NAME="sort1" -->">
-		<input type="hidden" name="sort2"  value="<!-- TMPL_VAR NAME="sort2" -->">
-
-<!-- 		input from form3		 -->
-		<input type="hidden" name="dateenrolled" size="20" value="<!-- TMPL_VAR NAME="dateenrolled" -->">
-		<input type="hidden" name="dateexpiry" size="20" value="<!-- TMPL_VAR NAME="dateexpiry" -->">
-		<textarea  style="display:none;" name="opacnote" cols="70" rows="3"><!-- TMPL_VAR NAME="opacnote"--></textarea>
-		<textarea style="display:none;" name="borrowernotes" cols="70" rows="3"><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
-		<input type="hidden" name="userid" size="20"  value="<!-- TMPL_VAR NAME="userid" -->">
-		<input type="hidden" name="password" size="20"  value="<!-- TMPL_VAR NAME="password" -->">	
-		<input type="hidden" name="debarred"  value="<!-- TMPL_VAR NAME="debarred" -->" />
-		<input type="hidden" name="lost"  value="<!-- TMPL_VAR NAME="lost" -->" />
-		<input type="hidden" name="gonenoaddress"  value="<!-- TMPL_VAR NAME="gonenoaddress" -->" />
-
-		<!-- TMPL_IF NAME="opadd" -->
-			<input type="hidden" name="op" value="add">
-		<!-- TMPL_ELSE -->
-			<input type="hidden" name="op" value="modify">
-		<!-- /TMPL_IF -->
-		
-		<!-- TMPL_VAR NAME="member" -->
-		<p>
-			<!-- TMPL_IF NAME="mandatorycardnumber" -->
-			<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Card number</label>
-			<input type="text" name="cardnumber" size="10" value="<!-- TMPL_VAR NAME="cardnumber" -->">
-		</p>
-		<fieldset>
-		<legend>Guarantor</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorycontacttitle" -->
-				<label  class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Title</label>
-			<select  name="contacttitle" >
-					<option <!-- TMPL_VAR NAME="contacttitle_selected " --> value="" >Select title</option>
-					<option value="Mlle" <!-- TMPL_VAR NAME="contacttitle_Mlle" -->>Mlle</option>
-					<option value="Mme" <!-- TMPL_VAR NAME="contacttitle_Mme" -->>Mme</option>
-					<option value="Mr" <!-- TMPL_VAR NAME="contacttitle_Mr" --> >M.</option>
-			</select>
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorycontactname" -->
-				<label  class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Surname</label>	
-			<input type="text" style="text-transform:uppercase;" name="contactname" size="20" value="<!-- TMPL_VAR NAME="contactname" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorycontactfirstname" -->
-				<label  class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Firstname</label>	
-			<input type="text" style="text-transform:capitalize;" name="contactfirstname" size="20" value="<!-- TMPL_VAR NAME="contactfirstname" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorybranchcode" -->
-				<label  class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Branch</label>	
-			<!-- TMPL_VAR NAME="CGIbranch" -->
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorystreetnumber" -->
-				<label  class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->	
-			Street number</label> 
-			<input type="text" name="streetnumber" size="5" value="<!-- TMPL_VAR NAME="streetnumber" -->">
-		</p>
-			<!-- TMPL_IF NAME="road_cgipopup" -->
-				<p>
-				<!-- TMPL_IF NAME="mandatorystreettype" -->
-					<label  class="borrowers_mandafield">
-				<!--TMPL_ELSE-->
-					<label>
-				<!-- /TMPL_IF-->
-				Road type</label>
-				<!-- TMPL_VAR NAME="roadpopup" -->
-				</p>
-			<!--/TMPL_IF-->
-		<p>
-			<!-- TMPL_IF NAME="mandatoryaddress" -->
-				<label  class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Address</label> 
-			<input type="text" name="address" size="35" value="<!-- TMPL_VAR NAME="address" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryaddress2" -->	
-				<label  class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Address 2</label>
-			<input type="text" name="address2" size="35" value="<!-- TMPL_VAR NAME="address2" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryzipcode" -->
-				<label  class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->	
-			Zipcode</label>
-			<input type="text" maxlength="5" name="zipcode" size="10" value="<!-- TMPL_VAR NAME="zipcode" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorycity" -->
-				<label  class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			City</label>
-			<input style="text-transform:uppercase;" type="text" name="city" size="20" value="<!-- TMPL_VAR NAME="city" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryrelationship" -->
-				<label  class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Relation</label>
-			<select name="relationship" size="1">
-						<!-- TMPL_LOOP NAME="relshiploop" -->
-							<option <!-- TMPL_VAR NAME="selected" -->><!-- TMPL_VAR NAME="relationship" --></option>
-						<!-- /TMPL_LOOP -->
-			</select>
-		</p>
-	</fieldset>
-	<fieldset>
-		<legend>Guarantor contact</legend>
-		<h2>Guarantor</h2>
-	<p>
-		<!-- TMPL_IF NAME="mandatoryphone" -->
-			<label  class="borrowers_mandafield">
-		<!--TMPL_ELSE-->
-			<label>
-		<!-- /TMPL_IF-->
-		Phone (home)</label>
-		<input type="text" name="phone" value="<!-- TMPL_VAR NAME="phone" -->" >
-	</p>
-	<p>
-		<!-- TMPL_IF NAME="mandatoryphonepro" -->
-			<label  class="borrowers_mandafield">
-		<!--TMPL_ELSE-->
-			<label>
-		<!-- /TMPL_IF-->
-		Phone (prof)</label>
-		<input type="text" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" >
-	</p>
-	<p>
-		<!-- TMPL_IF NAME="mandatorymobile" -->
-			<label  class="borrowers_mandafield">
-		<!--TMPL_ELSE-->
-			<label>
-		<!-- /TMPL_IF-->
-		Phone (cell)</label>
-		<input type="text" name="mobile" value="<!-- TMPL_VAR NAME="mobile" -->" >
-	</p>
-	<p>
-		<!-- TMPL_IF NAME="mandatoryemail" -->
-			<label  class="borrowers_mandafield">
-		<!--TMPL_ELSE-->
-			<label>
-		<!-- /TMPL_IF-->
-		E-mail (home)</label>
-		<input type="text" name="email" value="<!-- TMPL_VAR NAME="email" -->" >	
-	</p>
-	<p>
-		<!-- TMPL_IF NAME="mandatoryemailpro" -->
-			<label  class="borrowers_mandafield">
-		<!--TMPL_ELSE-->
-			<label>
-		<!-- /TMPL_IF-->
-		E-mail (prof)</label>
-		<input type="text" name="emailpro" value="<!-- TMPL_VAR NAME="emailpro" -->" >		
-	</p>
-	<p>
-		<!-- TMPL_IF NAME="mandatoryfax" -->
-			<label  class="borrowers_mandafield">
-		<!--TMPL_ELSE-->
-			<label>
-		<!-- /TMPL_IF-->
-		fax</label>
-		<input type="text" name="fax" value="<!-- TMPL_VAR NAME="fax" -->" >	
-	</p>
-	<h2>Member</h2>
-	<p>	
-		<!-- TMPL_IF NAME="mandatoryB_email" -->
-			<label  class="borrowers_mandafield">
-		<!--TMPL_ELSE-->
-			<label>
-		<!-- /TMPL_IF-->
-		E-mail (home)</label>
-		<input type="text" name="B_email" value="<!-- TMPL_VAR NAME="B_email" -->" >	
-		<!-- TMPL_IF NAME="mandatoryB_phone" -->
-			<label  class="borrowers_mandafield">
-		<!--TMPL_ELSE-->
-			<label>
-		<!-- /TMPL_IF-->
-		Phone (cell)</label>	
-		<input type="text" name="B_phone" value="<!-- TMPL_VAR NAME="B_phone" -->" >			
-	</p>
-	</fieldset>
-	<div>
-		<input type="button" name="step1" value="Previous step" onclick="check_form_borrowers(0);">
-		<input type="button" name="step3" onclick="check_form_borrowers(3)" value="Next step">
-	</div>
-</form>
-
-<!--/TMPL_IF-->
-<!-- TMPL_IF NAME="step_3"-->
-	<form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post">
-<!-- 		field always hidden in different form (1,2,3) -->
-		<input type="hidden" name="BorrowerMandatoryfield" value="<!--TMPL_VAR NAME="BorrowerMandatoryfield"-->">
-		<input type="hidden" name="FormFieldList" value="cardnumber|dateenrolled|dateexpiry|opacnote|borrowernotes|userid|password">
-		<input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->">
-		<input type="hidden" name="type" value="borrowers">
-		<input type="hidden" name="step" value="<!-- TMPL_VAR NAME="step" -->">
-		<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
-		<input type="hidden" name="guarantorid"   value="<!-- TMPL_VAR NAME="guarantorid" -->">
-		<input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->">
-		<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
-		<input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" />
-		<input type="hidden" name="flags" value="<!-- TMPL_VAR NAME="flags" -->" />
-		<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-		<input type="hidden" name="nodouble" "  value="<!-- TMPL_VAR NAME="nodouble" -->"/>
-
-<!-- 		input from form 1 		-->
-		<input type="hidden" name="title" size="10" value="<!-- TMPL_VAR NAME="title" -->">
-		<input style="text-transform:capitalize;" type="hidden" name="firstname" size="20" value="<!-- TMPL_VAR NAME="firstname" -->">
-		<input style="text-transform:uppercase;" type="hidden" name="surname" size="20" value="<!-- TMPL_VAR NAME="surname" -->" >
-		<input type="hidden" name="dateofbirth" size="20"  value="<!-- TMPL_VAR NAME="dateofbirth" -->">
-		<input type="hidden" name="initials" size="20"  value="<!-- TMPL_VAR NAME="initials" -->">
-		<input type="hidden" name="othernames" size="20"  value="<!-- TMPL_VAR NAME="othernames" -->" >
-		<input type="hidden" name="sex" value="<!-- TMPL_VAR NAME="sex" -->" >
-		<input type="hidden" name="categorycode" size="10" value="<!-- TMPL_VAR NAME="categorycode" -->">
-		<input type="hidden" name="select_city" value="<!-- TMPL_VAR NAME="select_city" -->">	
-		<input type="hidden" name="sort1"  value="<!-- TMPL_VAR NAME="sort1" -->">
-		<input type="hidden" name="sort2"  value="<!-- TMPL_VAR NAME="sort2" -->">
-<!-- 		input from form 2 -->
-		<input type="hidden" name="contacttitle" size="20" value="<!-- TMPL_VAR NAME="contacttitle" -->">
-		<input type="hidden" name="contactname" size="35" value="<!-- TMPL_VAR NAME="contactname" -->">
-		<input type="hidden" name="contactfirstname" size="5" value="<!-- TMPL_VAR NAME="contactfirstname" -->">		
-		<input type="hidden" name="branchcode" size="20" value="<!-- TMPL_VAR NAME="branchcode" -->">
-		<input type="hidden" name="streetnumber"  value="<!-- TMPL_VAR NAME="streetnumber" -->">
-		<input type="hidden" name="streettype"  value="<!-- TMPL_VAR NAME="streettype" -->">
-		<input type="hidden" name="address"  value="<!-- TMPL_VAR NAME="address" -->">
-		<input type="hidden" name="address2"  value="<!-- TMPL_VAR NAME="address2" -->">
-		<input type="hidden" name="zipcode" size="20" value="<!-- TMPL_VAR NAME="zipcode" -->">
-		<input type="hidden" name="city" size="20" value="<!-- TMPL_VAR NAME="city" -->">
-		<input type="hidden" name="relationship" size="20" value="<!-- TMPL_VAR NAME="relationship" -->"> 
-		<input type="hidden" name="phone" size="10"  value="<!-- TMPL_VAR NAME="phone" -->" >
-		<input type="hidden" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" >
-		<input type="hidden" name="mobile" size="10" value="<!-- TMPL_VAR NAME="mobile" -->" >	
-		<input type="hidden" name="email" value="<!-- TMPL_VAR NAME="email" -->" >
-		<input type="hidden" name="emailpro" value="<!-- TMPL_VAR NAME="emailpro" -->" >
-		<input type="hidden" name="B_email" value="<!-- TMPL_VAR NAME="B_email" -->" >	
-		<input type="hidden" name="B_phone" value="<!-- TMPL_VAR NAME="B_phone" -->" >
-		<input type="hidden" name="fax" value="<!-- TMPL_VAR NAME="fax" -->" >	
-		
-		<!-- TMPL_IF NAME="opadd" -->
-			<input type="hidden" name="op" value="add">
-		<!-- TMPL_ELSE -->
-			<input type="hidden" name="op" value="modify">
-		<!-- /TMPL_IF -->
-		<p>
-			<!-- TMPL_IF NAME="mandatorycardnumber" -->
-			<label  class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			 Card number</label>
-			<input type="text" name="cardnumber" size="10" value="<!-- TMPL_VAR NAME="cardnumber" -->">
-		</p>
-	<fieldset id="memberentry_subscription">
-	<legend>Library set-up</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorydateenrolled" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Arrival date</label>
-			<input type="text" name="dateenrolled"  maxlength="10"	  size="10" onblur="CheckDate(document.form.dateenrolled.value);" value="<!-- TMPL_VAR NAME="dateenrolled" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorydateexpiry" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Expiry date</label>
-			<input type="text" name="dateexpiry" maxlength="10"  size="10"
-							onblur="CheckDate(document.form.dateexpiry.value);check_manip_date('verify');" value="<!-- TMPL_VAR NAME="dateexpiry" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryopacnote" -->
-				<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->	
-			OPAC note</label>
-			<textarea  name="opacnote" cols="70" rows="2"   ><!-- TMPL_VAR NAME="opacnote" --></textarea>
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryborrowernotes" -->	
-				<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Library note</label>
-			<textarea name="borrowernotes" cols="70" rows="2"   ><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
-		</p>
-	</fieldset>
-	<fieldset id="memberentry_userid">
-		<legend>OPAC login</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryuserid" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			OPAC Login</label>
-			<input type="text" name="userid" size="20"  value="<!-- TMPL_VAR NAME="userid" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorypassword" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Password</label>
-			<!--TMPL_IF NAME="opadd"-->
-				<input type="text" name="password" size="20"  value="<!-- TMPL_VAR NAME="password" -->">
-			<!--TMPL_ELSE-->
-				<!--TMPL_IF NAME="password"-->
-					<input type="text" name="password" size="20"  value="****">
-				<!--TMPL_ELSE-->
-					<input type="text" name="password" size="20"  value="">
-				<!--/TMPL_IF-->
-			<!--/TMPL_IF-->
-		</p>
-		<!--this zones are not necessary in modif mode -->
-		<!-- TMPL_UNLESS NAME="opadd" -->
-			<h1>Warning</h1>
-			<!-- TMPL_LOOP NAME="flagloop" -->
-			<p>
-				<label class="borrowers_labels_title"><!-- TMPL_VAR NAME="html" --></label>
-				<input type="radio" name="<!-- TMPL_VAR NAME="name" -->" value="1" <!-- TMPL_VAR NAME="yes" -->>Yes
-				<input type="radio" name="<!-- TMPL_VAR NAME="name" -->" value="0" <!-- TMPL_VAR NAME="no" -->>No
-			</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_UNLESS -->	
-		<p>
-		</fieldset>
-		<div>
-			<input type="button" class="borrowers_button" name="step2" value="Previous step" onclick="check_form_borrowers(1);">	
-			<!-- TMPL_IF NAME="opadd" -->
-				<input type="button" name="step4" onclick="unique();" value="Add member">
-			<!-- TMPL_ELSE -->
-				<input type="button" name="step4" onclick="check_form_borrowers();" value="Modify member">
-			<!--/TMPL_IF -->
-		</div>
-	</form>
-<!-- /TMPL_IF -->
-<!--	 TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/members/memberentryI.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/memberentryI.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/memberentryI.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/memberentryI.tmpl	23 Aug 2006 14:40:48 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,459 +0,0 @@
-<!-- templates to add/modify a <I>nstitution -->
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Member, Organisation management
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-<!-- TMPL_INCLUDE NAME="javascript/members.js" -->
-
-	<!-- TMPL_IF NAME="opadd" -->
-	<h1>
-		Add organisation member (step <!-- TMPL_VAR NAME="step" -->)
-	</h1>
-	<!-- TMPL_ELSE -->
-	<h1 >
-		Modify organisation member
-	</h1>
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="check_member" -->
-		<!-- TMPL_IF NAME="step_2" -->
-			<p>
-			<form name="form_double">
-				<div id="problem">
-					Duplicate suspected 
-					<a href="javascript:Dopop('borrowers_details.pl?borrowernumber=<!--TMPL_VAR NAME="check_member"-->');" class="borrowers_button">Details</a>
-					Duplicate ?	
-					<a href="/cgi-bin/koha/members/memberentry.pl?borrowernumber=<!--TMPL_VAR NAME="check_member"-->&category_type=<!--TMPL_VAR NAME="check_categorytype"-->" class="borrowers_button">Yes</a> 
-					&nbsp;&nbsp;&nbsp; No, it is not
-					<INPUT type="checkbox" <!-- TMPL_IF NAME="checked"--> checked <!--/TMPL_IF--> name="answernodouble" >
-				</div>
-			</form>
-			</p>
-		<!--/TMPL_IF-->
-	<!--/TMPL_IF-->
-
-	<!-- TMPL_IF Name="NOK" -->
-		<h1>ERROR</h1>
-		<div id="problem">
-			<p>The following fields are wrong. Please fix it/them</p>
-			<!-- TMPL_IF NAME="ERROR_login_exist" -->
-				<p>login/password already exist</p>
-			<!-- /TMPL_IF -->
-		</div>
-	<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="step_1"-->
-<form name="form"  action="/cgi-bin/koha/members/memberentry.pl" method="post"> 
-	<!-- 		field always hidden in different form (1,2,3) -->
-		<input type="hidden" name="BorrowerMandatoryfield" value="<!--TMPL_VAR NAME="BorrowerMandatoryfield"-->">
-		<input type="hidden" name="FormFieldList" value="cardnumber|surname|contactname|contactfirstname|select_city">
-		<input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->">
-		<input type="hidden" name="type" value="borrowers">
-		<input type="hidden" name="step" value="<!-- TMPL_VAR NAME="step" -->">
-		<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
-		<input type="hidden" name="actionType" value="<!-- TMPL_VAR NAME="actionType" -->">
-		<input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->">
-		<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
-		<input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" />
-		<input type="hidden" name="flags" value="<!-- TMPL_VAR NAME="flags" -->" />
-		<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-		<input type="hidden" name="nodouble"  value="<!-- TMPL_VAR NAME="nodouble" -->" />
-
-<!-- 		from form 2 -->
-		<input type="hidden" name="streetnumber"  value="<!-- TMPL_VAR NAME="streetnumber" -->">
-		<input type="hidden" name="streettype"  value="<!-- TMPL_VAR NAME="streettype" -->">
-		<input type="hidden" name="address"  value="<!-- TMPL_VAR NAME="address" -->">
-		<input type="hidden" name="address2"  value="<!-- TMPL_VAR NAME="address2" -->">	
-		<input type="hidden" name="zipcode"  value="<!-- TMPL_VAR NAME="zipcode" -->">	
-		<input type="hidden" name="city"  value="<!-- TMPL_VAR NAME="city" -->">
-		<input type="hidden" name="branchcode"  value="<!-- TMPL_VAR NAME="branchcode" -->">
-		<input type="hidden" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" >
-		<input type="hidden" name="emailpro" value="<!-- TMPL_VAR NAME="emailpro" -->" >
-		<textarea style="display:none;" name="contactnotes" cols="70" rows="3"  ><!-- TMPL_VAR NAME="contactnotes" --></textarea>
-		<input type="hidden" name="fax"   value="<!-- TMPL_VAR NAME="fax" -->"	
-
-<!-- 		from form 3	 -->
-		<input type="hidden" name="dateenrolled" size="20" value="<!-- TMPL_VAR NAME="dateenrolled" -->">
-		<input type="hidden" name="dateexpiry" size="20" value="<!-- TMPL_VAR NAME="dateexpiry" -->">
-		<textarea  style="display:none;" name="opacnote" cols="70" rows="3"><!-- TMPL_VAR NAME="opacnote"--></textarea>
-		<textarea style="display:none;" name="borrowernotes" cols="70" rows="3"><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
-		<input type="hidden" name="userid" size="20"  value="<!-- TMPL_VAR NAME="userid" -->">
-		<input type="hidden" name="password" size="20"  value="<!-- TMPL_VAR NAME="password" -->">	
-		<input type="hidden" name="debarred"  value="<!-- TMPL_VAR NAME="debarred" -->" />
-		<input type="hidden" name="lost"  value="<!-- TMPL_VAR NAME="lost" -->" />
-		<input type="hidden" name="gonenoaddress"  value="<!-- TMPL_VAR NAME="gonenoaddress" -->" />
-	<!-- TMPL_IF NAME="opadd" -->
-		<input type="hidden" name="op" value="add">
-	<!-- TMPL_ELSE -->
-		<input type="hidden" name="op" value="modify">
-	<!-- /TMPL_IF -->
-	<p>
-		<!-- TMPL_IF NAME="mandatorycardnumber" -->
-		<label class="borrowers_mandafield">
-		<!--TMPL_ELSE-->
-		<label>
-		<!-- /TMPL_IF-->
-		Card number</label>
-			<input type="text" name="cardnumber" size="10" value="<!-- TMPL_VAR NAME="cardnumber" -->">
-	</p>	
-	<fieldset id="memberentry_identity">
-		<legend>organisation identity</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorysurname" -->
-			<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Organisation name</label>
-			<input style="text-transform:uppercase;" type="text" name="surname" size="20"  value="<!-- TMPL_VAR NAME="surname" -->" >	
-		</p>
-		<p>
-			<label>Select a category</label>
-			<!-- TMPL_VAR NAME="catcodepopup" -->
-			<!-- TMPL_IF NAME="city_cgipopup" -->	
-					<!-- TMPL_IF NAME="mandatoryselect_city" -->
-					<label   class="borrowers_mandafield">
-					<!-- TMPL_ELSE -->
-					<label>
-					<!-- /TMPL_IF-->
-					Select a city</label>
-				<!-- TMPL_VAR NAME="citypopup" -->
-			<!-- /TMPL_IF-->
-	</fieldset>
-	<fieldset>
-		<legend>Personal identity</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorycontactname" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Surname</label>
-			<input style="text-transform:uppercase;" type="text" name="contactname" size="20"  value="<!-- TMPL_VAR NAME="contactname" -->" >
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorycontactfirstname" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Firstname</label>
-			<input style="text-transform:capitalize;" type="text" name="contactfirstname" size="20"  value="<!-- TMPL_VAR NAME="contactfirstname" -->">
-		</p>
-	</fieldset>
-		<div>
-			<input type="button" name="step2" value="Next step" onclick="check_form_borrowers('2');">
-		</div>
-		</p>
-
-		</form>
-	<!-- /TMPL_IF -->
-
-
-<!-- TMPL_IF NAME="step_2"-->
-<form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post">
-		<!-- 		field always hidden in different form (1,2,3) -->
-		<input type="hidden" name="BorrowerMandatoryfield" value="<!--TMPL_VAR NAME="BorrowerMandatoryfield"-->">
-		<input type="hidden" name="FormFieldList" value="cardnumber|streetnumber|streettype|address|address2|zipcode|city|phonepro|emailpro|fax|contactnotes">
-		<input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->">
-		<input type="hidden" name="type" value="borrowers">
-		<input type="hidden" name="step" value="<!-- TMPL_VAR NAME="step" -->">
-		<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
-		<input type="hidden" name="actionType" value="<!-- TMPL_VAR NAME="actionType" -->">
-		<input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->">
-		<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
-		<input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" />
-		<input type="hidden" name="flags" value="<!-- TMPL_VAR NAME="flags" -->" />
-		<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-		<input type="hidden" name="nodouble"  value="<!-- TMPL_VAR NAME="nodouble" -->" />
-
-
-<!-- 		from form 1 -->
-		<input  type="hidden" name="surname" value="<!-- TMPL_VAR NAME="surname" -->" >
-		<input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->">
-		<input type="hidden" name="contactname" value="<!-- TMPL_VAR name="contactname" -->">
-		<input type="hidden" name="select_city" value="<!-- TMPL_VAR NAME="select_city" -->">
-		<input type="hidden" name="contactfirstname" value="<!-- TMPL_VAR name="contactfirstname" -->">
-
-<!-- 		from form 3	 -->
-		<input type="hidden" name="dateenrolled" size="20" value="<!-- TMPL_VAR NAME="dateenrolled" -->">
-		<input type="hidden" name="dateexpiry" size="20" value="<!-- TMPL_VAR NAME="dateexpiry" -->">
-		<textarea  style="display:none;" name="opacnote" cols="70" rows="3"><!-- TMPL_VAR NAME="opacnote"--></textarea>
-		<textarea style="display:none;" name="borrowernotes" cols="70" rows="3"><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
-		<input type="hidden" name="userid" size="20"  value="<!-- TMPL_VAR NAME="userid" -->">
-		<input type="hidden" name="password" size="20"  value="<!-- TMPL_VAR NAME="password" -->">	
-		<input type="hidden" name="debarred"  value="<!-- TMPL_VAR NAME="debarred" -->" />
-		<input type="hidden" name="lost"  value="<!-- TMPL_VAR NAME="lost" -->" />
-		<input type="hidden" name="gonenoaddress"  value="<!-- TMPL_VAR NAME="gonenoaddress" -->" />
-		<!-- TMPL_IF NAME="opadd" -->
-			<input type="hidden" name="op" value="add">
-		<!-- TMPL_ELSE -->
-			<input type="hidden" name="op" value="modify">
-		<!-- /TMPL_IF -->
-	
-	
-	<p>
-		<!-- TMPL_IF NAME="mandatorycardnumber" -->
-		<label class="borrowers_mandafield">
-		<!-- TMPL_ELSE -->
-		<label>
-		<!-- /TMPL_IF-->
-		Card number</label>
-		<input type="text" name="cardnumber" size="10" value="<!-- TMPL_VAR NAME="cardnumber" -->">
-	</p>
-	<fieldset is="memberentry_address">
-		<legend>Organisation address</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorystreetnumber" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Street number</label>
-			<input type="text" name="streetnumber" size="5" value="<!-- TMPL_VAR NAME="streetnumber" -->">
-		</p>
-		<!-- TMPL_IF NAME="road_cgipopup" -->
-			<p>
-			<!-- TMPL_IF NAME="mandatorystreettype" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Street type</label>
-			<!-- TMPL_VAR NAME="roadpopup" -->
-			<p>
-		<!--/TMPL_IF-->
-		<p>
-			<!-- TMPL_IF NAME="mandatoryaddress" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->	
-			Address</label>
-			<input type="text" name="address" size="34" value="<!-- TMPL_VAR NAME="address" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryaddress2" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Address 2</label>
-			<input type="text" name="address2" size="33" value="<!-- TMPL_VAR NAME="address2" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryzipcode" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Zipcode</label>
-			<input type="text" name="zipcode" size="10"  maxlength="10" value="<!-- TMPL_VAR NAME="zipcode" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorycity" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			City</label>
-			<input style="text-transform:uppercase;" type="text" name="city" size="20" value="<!-- TMPL_VAR NAME="city" -->">
-		</p>
-			<!-- TMPL_IF NAME="mandatorybranchcode" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Branch</label>
-			<!-- TMPL_VAR NAME="CGIbranch" -->
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryphonepro" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Phone (prof)</label>
-			<input type="text" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" >
-		<p>
-		</p>
-			<!-- TMPL_IF NAME="mandatoryemailpro" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->	
-			E-mail (prof)</label>
-			<input type="text" name="emailpro" value="<!-- TMPL_VAR NAME="emailpro" -->" >
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryfax" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Fax</label>		
-			<input type="text" name="fax" value="<!-- TMPL_VAR NAME="fax" -->" >	
-		</p>
-	</fieldset>
-	<fieldset>
-		<legend>Member list</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorycontactnotes" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Persons that can issue books</label>
-			<textarea  name="contactnotes" cols="70" rows="2"   ><!-- TMPL_VAR NAME="contactnotes" --></textarea>	
-		</p>
-	<fieldset>
-	<div id="action">
-		<input type="button" name="step1" value="Previous step" onclick="check_form_borrowers(0);">
-		<input type="button" name="step3" onclick="check_form_borrowers('3')" value="Next step">
-	</div>
-</form>
-<!-- ############################END FORM PROFESSIONAL############################################"-->
-<!--/TMPL_IF-->
-
-<!-- TMPL_IF NAME="step_3"-->
-	<form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post">
-		<!-- 		field always hidden in different form (1,2,3) -->
-		<input type="hidden" name="BorrowerMandatoryfield" value="<!--TMPL_VAR NAME="BorrowerMandatoryfield"-->">
-		<input type="hidden" name="FormFieldList" value="cardnumber|dateenrolled|dateexpiry|opacnote|borrowernotes|userid|password">
-		<input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->">
-		<input type="hidden" name="type" value="borrowers">
-		<input type="hidden" name="step" value="<!-- TMPL_VAR NAME="step" -->">
-		<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
-		<input type="hidden" name="actionType" value="<!-- TMPL_VAR NAME="actionType" -->">
-		<input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->">
-		<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
-		<input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" />
-		<input type="hidden" name="flags" value="<!-- TMPL_VAR NAME="flags" -->" />
-		<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-		<input type="hidden" name="nodouble"  value="<!-- TMPL_VAR NAME="nodouble" -->"/>
-
-		<!-- 		from form 1 -->
-		<input  type="hidden" name="surname" value="<!-- TMPL_VAR NAME="surname" -->" >
-		<input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->">
-		<input type="hidden" name="contactname" value="<!-- TMPL_VAR name="contactname" -->">
-		<input type="hidden" name="select_city" value="<!-- TMPL_VAR NAME="select_city" -->">
-		<input type="hidden" name="contactfirstname" value="<!-- TMPL_VAR name="contactfirstname" -->">
-
-		<!-- 		from form 2 -->
-		<input type="hidden" name="streetnumber"  value="<!-- TMPL_VAR NAME="streetnumber" -->">
-		<input type="hidden" name="streettype"  value="<!-- TMPL_VAR NAME="streettype" -->">
-		<input type="hidden" name="address"  value="<!-- TMPL_VAR NAME="address" -->">
-		<input type="hidden" name="address2"  value="<!-- TMPL_VAR NAME="address2" -->">	
-		<input type="hidden" name="zipcode"  value="<!-- TMPL_VAR NAME="zipcode" -->">	
-		<input type="hidden" name="city"  value="<!-- TMPL_VAR NAME="city" -->">
-		<input type="hidden" name="branchcode"  value="<!-- TMPL_VAR NAME="branchcode" -->">
-		<input type="hidden" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" >
-		<input type="hidden" name="emailpro" value="<!-- TMPL_VAR NAME="emailpro" -->" >
-		<textarea style="display:none;" name="contactnotes" cols="70" rows="3"  ><!-- TMPL_VAR NAME="contactnotes" --></textarea>
-		<input type="hidden" name="fax" value="<!-- TMPL_VAR NAME="fax" -->">
-		
-		<!-- TMPL_IF NAME="opadd" -->
-			<input type="hidden" name="op" value="add">
-		<!-- TMPL_ELSE -->
-			<input type="hidden" name="op" value="modify">
-		<!-- /TMPL_IF -->
-	
-	<p>
-		<!-- TMPL_IF NAME="mandatorycardnumber" -->
-		<label class="borrowers_mandafield">
-		<!-- TMPL_ELSE -->
-		<label>
-		<!-- /TMPL_IF-->
-		Cardnumber</label>
-		<input type="text" name="cardnumber" size="10" value="<!-- TMPL_VAR NAME="cardnumber" -->">
-	</p>
-	<fieldset id="memberentry_subscription">
-	<legend>Library set-up</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorydateenrolled" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Arrival date</label>
-			<input type="text" name="dateenrolled"  maxlength="10"	  size="10" onblur="CheckDate(document.form.dateenrolled.value);" value="<!-- TMPL_VAR NAME="dateenrolled" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorydateexpiry" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Expiry date</label>
-			<input type="text" name="dateexpiry" maxlength="10"  size="10"
-							onblur="CheckDate(document.form.dateexpiry.value);check_manip_date('verify');" value="<!-- TMPL_VAR NAME="dateexpiry" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryopacnote" -->
-				<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->	
-			OPAC note</label>
-			<textarea  name="opacnote" cols="70" rows="2"   ><!-- TMPL_VAR NAME="opacnote" --></textarea>
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryborrowernotes" -->	
-				<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Library note</label>
-			<textarea name="borrowernotes" cols="70" rows="2"   ><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
-		</p>
-	</fieldset>
-	<fieldset id="memberentry_userid">
-		<legend>OPAC login</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryuserid" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			OPAC Login</label>
-			<input type="text" name="userid" size="20"  value="<!-- TMPL_VAR NAME="userid" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorypassword" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Password</label>
-			<!--TMPL_IF NAME="opadd"-->
-				<input type="text" name="password" size="20"  value="<!-- TMPL_VAR NAME="password" -->">
-			<!--TMPL_ELSE-->
-				<!--TMPL_IF NAME="password"-->
-					<input type="text" name="password" size="20"  value="****">
-				<!--TMPL_ELSE-->
-					<input type="text" name="password" size="20"  value="">
-				<!--/TMPL_IF-->
-			<!--/TMPL_IF-->
-		</p>
-		<!--this zones are not necessary in modif mode -->
-		<!-- TMPL_UNLESS NAME="opadd" -->
-			<h1>Warning</h1>
-			<!-- TMPL_LOOP NAME="flagloop" -->
-			<p>
-				<label class="borrowers_labels_title"><!-- TMPL_VAR NAME="html" --></label>
-				<input type="radio" name="<!-- TMPL_VAR NAME="name" -->" value="1" <!-- TMPL_VAR NAME="yes" -->>Yes
-				<input type="radio" name="<!-- TMPL_VAR NAME="name" -->" value="0" <!-- TMPL_VAR NAME="no" -->>No
-			</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_UNLESS -->	
-		<p>
-		</fieldset>
-		<div>
-			<input type="button" class="borrowers_button" name="step2" value="Previous step" onclick="check_form_borrowers(1);">	
-			<!-- TMPL_IF NAME="opadd" -->
-				<input type="button" name="step4" onclick="unique();" value="Add member">
-			<!-- TMPL_ELSE -->
-				<input type="button" name="step4" onclick="check_form_borrowers();" value="Modify member">
-			<!--/TMPL_IF -->
-		</div>
-	</form>
-<!-- /TMPL_IF -->
-<!--	 TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/members/memberentryP.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/memberentryP.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/memberentryP.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/memberentryP.tmpl	23 Aug 2006 14:40:48 -0000	1.8
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,656 +0,0 @@
-<!-- templates to add/modify a <P>rofessional -->
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Member, Professional management
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-<!-- TMPL_INCLUDE NAME="javascript/members.js" -->
-
-	<!-- TMPL_IF NAME="opadd" -->
-	<h1>
-		Add professional member (step <!-- TMPL_VAR NAME="step" -->)
-	</h1>
-	<!-- TMPL_ELSE -->
-	<h1 >
-		Modify professional member
-	</h1>
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="check_member" -->
-		<!-- TMPL_IF NAME="step_2" -->
-	<p>
-	<form name="form_double">
-		<div id="problem">
-			Duplicate suspected 
-			<a href="javascript:Dopop('borrowers_details.pl?borrowernumber=<!--TMPL_VAR NAME="check_member"-->');" class="borrowers_button">Details</a>
-			Duplicate ?	
-			<a href="/cgi-bin/koha/members/memberentry.pl?borrowernumber=<!--TMPL_VAR NAME="check_member"-->&category_type=<!--TMPL_VAR NAME="check_categorytype"-->" class="borrowers_button">Yes</a> 
-			&nbsp;&nbsp;&nbsp; No, it is not
-			<INPUT type="checkbox" <!-- TMPL_IF NAME="checked"--> checked <!--/TMPL_IF--> name="answernodouble" >
-		</div>
-	</form>	
-	
-		</p>	
-		<!--/TMPL_IF-->
-	<!--/TMPL_IF-->
-	<!-- TMPL_IF Name="NOK" -->
-		<h1>ERROR</h1>
-		<div id="problem">
-			<p>The following fields are wrong. Please fix it/them</p>
-			<!-- TMPL_IF NAME="ERROR_login_exist" -->
-				<p>login/password already exist</p>
-			<!-- /TMPL_IF -->
-		 <!-- TMPL_IF NAME="ERROR_age_limitations" -->
-                                Member is too young or too old for this category
-                        <!-- /TMPL_IF -->
-		</div>
-	<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="step_1"--><!--BEGIN OF TEST IF NOT collectivity BUT IN 1 STEP-->
-<form name="form"  action="/cgi-bin/koha/members/memberentry.pl" method="post"> 
-		<!-- 		field always hidden in different form (1,2,3) -->
-		<input type="hidden" name="BorrowerMandatoryfield" value="<!--TMPL_VAR NAME="BorrowerMandatoryfield"-->">
-		<input type="hidden" name="FormFieldList" value="surname|select_city|othernames|initials|title|cardnumber|firstname|dateofbirth|sort1|sort2">
-		<input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->">
-		<input type="hidden" name="type" value="borrowers">
-		<input type="hidden" name="step" value="<!-- TMPL_VAR NAME="step" -->">
-		<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
-		<input type="hidden" name="actionType" value="<!-- TMPL_VAR NAME="actionType" -->">
-		<input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->">
-		<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
-		<input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" >
-		<input type="hidden" name="flags" value="<!-- TMPL_VAR NAME="flags" -->" />
-		<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-		<input type="hidden" name="nodouble"  value="<!-- TMPL_VAR NAME="nodouble" -->"/>
-
-<!-- 		from form 2 -->
-		<input type="hidden" name="streetnumber"  value="<!-- TMPL_VAR NAME="streetnumber" -->">
-		<input type="hidden" name="address"  value="<!-- TMPL_VAR NAME="address" -->">
-		<input type="hidden" name="address2"  value="<!-- TMPL_VAR NAME="address2" -->">
-		<input type="hidden" name="streettype"  value="<!-- TMPL_VAR NAME="streettype" -->">	
-		<input type="hidden" name="zipcode"  value="<!-- TMPL_VAR NAME="zipcode" -->">
-		<input type="hidden" name="city"  value="<!-- TMPL_VAR NAME="city" -->"> 
-		<input type="hidden" name="branchcode"  value="<!-- TMPL_VAR NAME="branchcode" -->">
-		<input type="hidden" name="phone"   value="<!-- TMPL_VAR NAME="phone" -->" >
-		<input type="hidden" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" >
-		<input type="hidden" name="mobile"  value="<!-- TMPL_VAR NAME="mobile" -->" >	
-		<input type="hidden" name="email" value="<!-- TMPL_VAR NAME="email" -->" >
-		<input type="hidden" name="emailpro" value="<!-- TMPL_VAR NAME="emailpro" -->" >
-		<input type="hidden" name="contactname"  value="<!-- TMPL_VAR NAME="contactname" -->">
-		<input type="hidden" name="relationship"  value="<!-- TMPL_VAR NAME="relationship" -->">
-		<input type="hidden" name="B_address" value="<!-- TMPL_VAR NAME="B_address" -->">
-		<input type="hidden" name="B_zipcode"  value="<!-- TMPL_VAR NAME="B_zipcode" -->">
-		<input type="hidden" name="B_city"  value="<!-- TMPL_VAR NAME="B_city" -->">
-		<input type="hidden" name="B_phone"  value="<!-- TMPL_VAR NAME="B_phone" -->"> 
-		<input type="hidden" name="fax"  value="<!-- TMPL_VAR NAME="fax" -->"> 	
-		<textarea style="display:none;" name="contactnotes" cols="70" rows="3"  ><!-- TMPL_VAR NAME="contactnotes" --></textarea>
-
-<!-- 		from form 3 -->
-		<input type="hidden" name="dateenrolled"  value="<!-- TMPL_VAR NAME="dateenrolled" -->">
-		<input type="hidden" name="dateexpiry"  value="<!-- TMPL_VAR NAME="dateexpiry" -->">
-		<textarea  style="display:none;" name="opacnote" cols="70" rows="3"><!-- TMPL_VAR NAME="opacnote"--></textarea>
-		<textarea style="display:none;" name="borrowernotes" cols="70" rows="3"><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
-		<input type="hidden" name="userid"   value="<!-- TMPL_VAR NAME="userid" -->">
-		<input type="hidden" name="password"   value="<!-- TMPL_VAR NAME="password" -->">	
-		<input type="hidden" name="debarred"  value="<!-- TMPL_VAR NAME="debarred" -->" />
-		<input type="hidden" name="lost"  value="<!-- TMPL_VAR NAME="lost" -->" />
-		<input type="hidden" name="gonenoaddress"  value="<!-- TMPL_VAR NAME="gonenoaddress" -->" />
-	<!-- TMPL_IF NAME="opadd" -->
-		<input type="hidden" name="op" value="add">
-	<!-- TMPL_ELSE -->
-		<input type="hidden" name="op" value="modify">
-	<!-- /TMPL_IF -->
-	<!-- TMPL_VAR NAME="member" -->
-	<p>
-		<!-- TMPL_IF NAME="mandatorycardnumber" -->
-		<label class="borrowers_mandafield">
-		<!--TMPL_ELSE-->
-		<label>
-		<!-- /TMPL_IF-->
-		Card number</label>
-			<input type="text" name="cardnumber" size="10" value="<!-- TMPL_VAR NAME="cardnumber" -->">
-	</p>	
-	<fieldset id="memberentry_identity">
-		<legend>Borrower identity</legend>
-		<p>
-		<!-- TMPL_IF NAME="female" -->
-		<input type="radio" name="sex" value="F" checked>Female
-		<input type="radio" name="sex" value="M">Male
-		<!-- TMPL_ELSE -->
-		<input type="radio" name="sex" value="F">Female
-		<input type="radio" name="sex" value="M" checked>Male
-		<!-- /TMPL_IF -->
-		</p>
-		<p>
-		<!-- TMPL_IF NAME="mandatorytitle" -->
-			<label style="font-weight:bold">
-		<!-- TMPL_ELSE -->
-			<label>
-		<!-- /TMPL_IF-->
-		Title</label>
-		<select  name="title" >
-			<option <!-- TMPL_VAR NAME="title_selected_ " --> value="" >Select a value</option>
-			<option value="Mlle" <!-- TMPL_VAR NAME="title_Mlle" -->>Mlle</option>
-			<option value="Mme" <!-- TMPL_VAR NAME="title_Mme" -->>Mme</option>
-			<option value="Mr" <!-- TMPL_VAR NAME="title_Mr" --> >M.</option>
-		</select>
-		</p>
-		<p>
-		<!-- TMPL_IF NAME="mandatorysurname" -->
-		<label style="font-weight:bold">
-		<!-- TMPL_ELSE -->
-		<label>
-		<!-- /TMPL_IF-->
-		Surname</label>
-		<input style="text-transform:uppercase;" type="text" name="surname" size="20"  value="<!-- TMPL_VAR NAME="surname" -->" >
-		</p>
-		<p>
-		<!-- TMPL_IF NAME="mandatoryfirstname" -->
-		<label style="font-weight:bold">
-		<!-- TMPL_ELSE -->
-		<label>
-		<!-- /TMPL_IF-->
-		Firstname</label>
-		<input style="text-transform:capitalize;" type="text" name="firstname" size="20"  value="<!-- TMPL_VAR NAME="firstname" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorydateofbirth" -->
-			<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->	
-			<label>
-			<!-- /TMPL_IF-->
-			Date of Birth</label>
-			<input type="text" name="dateofbirth" size="20" onBlur="CheckDate(document.form.dateofbirth.value);" value="<!-- TMPL_VAR NAME="dateofbirth" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryinitials" -->
-				<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Initials</label>
-			<input type="text" name="initials" size="20"  value="<!-- TMPL_VAR NAME="initials" -->">	
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryothernames" -->
-			<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->
-			<label>
-			<!-- /TMPL_IF-->
-			Other name</label>
-			<input style="text-transform:uppercase;" type="text" name="othernames" size="20"  value="<!-- TMPL_VAR NAME="othernames" -->" >
-		</p>
-	</fieldset>
-	<fieldset id="memberentry_identity">
-		<legend>Borrower type</legend>
-		<p>
-		<label>Select a category</label>
-		<!-- TMPL_VAR NAME="catcodepopup" -->
-		</p>
-		<!-- TMPL_IF NAME="city_cgipopup" -->	
-		<p>
-			<!-- TMPL_IF NAME="mandatoryselect_city" -->
-				<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Select a city</label>
-			<!-- TMPL_VAR NAME="citypopup" -->
-		</p>
-		<!-- /TMPL_IF-->
-		<p>
-			<!-- TMPL_IF NAME="mandatorysort1" -->
-				<label style="font-weight:bold">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Sort 1</label>
-			<!--TMPL_IF NAME="CGIsort1" -->	
-				<!-- TMPL_VAR NAME="CGIsort1" -->
-			<!--TMPL_ELSE-->
-				<input type="text" name="sort1" size="20"  value="<!-- TMPL_VAR NAME="sort1" -->" >
-			<!-- /TMPL_IF -->		
-		</p>
-		<p>
-		<!-- TMPL_IF NAME="mandatorysort2" -->
-		<label style="font-weight:bold">
-		<!-- TMPL_ELSE -->
-		<label>
-		<!-- /TMPL_IF-->
-		Sort 2</label>
-		<!--TMPL_IF NAME="CGIsort2" -->	
-			<!-- TMPL_VAR NAME="CGIsort2" -->
-		<!--TMPL_ELSE-->
-			<input type="text" name="sort2" size="20"  value="<!-- TMPL_VAR NAME="sort2" -->" >
-		<!-- /TMPL_IF -->	
-		</p>
-	</fieldset>
-	<div>
-		<input type="button" name="next_step" value="Next Step" onclick="check_form_borrowers(1);">
-	</div>
-</form>
-<!-- /TMPL_IF --><!--STEP_1	-->
-
-
-<!-- TMPL_IF NAME="step_2"-->
-<!-- ############################BEGIN FORM PROFESSIONAL############################################"-->
-	
-<form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post">
-		<!-- 		field always hidden in different form (1,2,3) -->
-		<input type="hidden" name="BorrowerMandatoryfield" value="<!--TMPL_VAR NAME="BorrowerMandatoryfield"-->">
-		<input type="hidden" name="FormFieldList" value="cardnumber|streetnumber|streettype|address|address2|zipcode|city|contactname|phone|phonepro|mobile|email|emailpro|B_zipcode|B_phone|B_address|B_city|relationship|fax|contactnotes">
-		<input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->">
-		<input type="hidden" name="type" value="borrowers">
-		<input type="hidden" name="step" value="<!-- TMPL_VAR NAME="step" -->">
-		<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
-		<input type="hidden" name="actionType" value="<!-- TMPL_VAR NAME="actionType" -->">
-		<input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->">
-		<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
-		<input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" />
-		<input type="hidden" name="flags" value="<!-- TMPL_VAR NAME="flags" -->" />
-		<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-		<input type="hidden" name="nodouble"  value="<!-- TMPL_VAR NAME="nodouble" -->" />
-	
-
-<!-- 		from form 1 -->
-		<input type="hidden" name="title"  value="<!-- TMPL_VAR NAME="title" -->">
-		<input type="hidden" name="surname"  value="<!-- TMPL_VAR NAME="surname" -->" >
-		<input type="hidden" name="firstname"  value="<!-- TMPL_VAR NAME="firstname" -->">
-		<input type="hidden" name="dateofbirth"  value="<!-- TMPL_VAR NAME="dateofbirth" -->">
-		<input type="hidden" name="initials"  value="<!-- TMPL_VAR NAME="initials" -->">
-		<input type="hidden" name="othernames"  value="<!-- TMPL_VAR NAME="othernames" -->" >
-		<input type="hidden" name="sex" value="<!-- TMPL_VAR NAME="sex" -->" >
-		<input type="hidden" name="categorycode"  value="<!-- TMPL_VAR NAME="categorycode" -->">
-		<input type="hidden" name="select_city" value="<!-- TMPL_VAR NAME="select_city" -->">
-		<input type="hidden" name="sort1"   value="<!-- TMPL_VAR NAME="sort1" -->">
-		<input type="hidden" name="sort2"   value="<!-- TMPL_VAR NAME="sort2" -->">
-		
-<!-- 		from form 3 -->
-		<input type="hidden" name="dateenrolled"  value="<!-- TMPL_VAR NAME="dateenrolled" -->">
-		<input type="hidden" name="dateexpiry"  value="<!-- TMPL_VAR NAME="dateexpiry" -->">
-		<textarea  style="display:none;" name="opacnote" cols="70" rows="3"><!-- TMPL_VAR NAME="opacnote"--></textarea>
-		<textarea style="display:none;" name="borrowernotes" cols="70" rows="3"><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
-		<input type="hidden" name="userid"   value="<!-- TMPL_VAR NAME="userid" -->">
-		<input type="hidden" name="password"   value="<!-- TMPL_VAR NAME="password" -->">	
-		<input type="hidden" name="debarred"  value="<!-- TMPL_VAR NAME="debarred" -->" />
-		<input type="hidden" name="lost"  value="<!-- TMPL_VAR NAME="lost" -->" />
-		<input type="hidden" name="gonenoaddress"  value="<!-- TMPL_VAR NAME="gonenoaddress" -->" />
-		
-		<!-- TMPL_IF NAME="opadd" -->
-			<input type="hidden" name="op" value="add">
-		<!-- TMPL_ELSE -->
-			<input type="hidden" name="op" value="modify">
-		<!-- /TMPL_IF -->
-
-		<input type="hidden" name="debarred"  value="<!-- TMPL_VAR NAME="debarred" -->" />
-
-	<p>
-		<!-- TMPL_IF NAME="mandatorycardnumber" -->
-		<label class="borrowers_mandafield">
-		<!-- TMPL_ELSE -->
-		<label>
-		<!-- /TMPL_IF-->
-		Card number</label>
-		<input type="text" name="cardnumber" size="10" value="<!-- TMPL_VAR NAME="cardnumber" -->">
-	</p>
-	<fieldset is="memberentry_address">
-		<legend>Professional address</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorystreetnumber" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->	
-			Street number</label>
-			<input type="text" name="streetnumber" size="5" value="<!-- TMPL_VAR NAME="streetnumber" -->">
-		</p>
-			<!-- TMPL_IF NAME="road_cgipopup" -->
-				<p>
-				<!-- TMPL_IF NAME="mandatorystreettype" -->
-					<label class="borrowers_mandafield">
-				<!--TMPL_ELSE-->
-					<label>
-				<!-- /TMPL_IF-->
-				Road type</label>
-				<!-- TMPL_VAR NAME="roadpopup" -->
-				</p>
-			<!--/TMPL_IF-->	
-		<p>
-			<!-- TMPL_IF NAME="mandatoryaddress" -->
-			<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->	
-			Address</label>
-			<input type="text" name="address" size="34" value="<!-- TMPL_VAR NAME="address" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryaddress2" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Address 2</label>
-			<input type="text" name="address2" size="33" value="<!-- TMPL_VAR NAME="address2" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryzipcode" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-				Zipcode</label>
-			<input type="text" name="zipcode" size="10"  maxlength="10" value="<!-- TMPL_VAR NAME="zipcode" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorycity" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-				City</label>
-			<input style="text-transform:uppercase;" type="text" name="city" size="20" value="<!-- TMPL_VAR NAME="city" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorybranchcode" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-				Branch</label>
-		<!-- TMPL_VAR NAME="CGIbranch" -->
-		</p>
-	</fieldset>
-	<fieldset>
-		<legend>Professional contact</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryphone" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Phone (home)</label>
-			<input type="text" name="phone" value="<!-- TMPL_VAR NAME="phone" -->" >
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryphonepro" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Phone (prof)</label>
-			<input type="text" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" >
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorymobile" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Phone (cell)</label>				
-			<input type="text" name="mobile" value="<!-- TMPL_VAR NAME="mobile" -->" >
-		</p>
-		<p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryemail" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			E-mail (home)</label>
-			<input type="text" name="email" value="<!-- TMPL_VAR NAME="email" -->" >	
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryemailpro" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			E-mail (prof)</label>
-			<input type="text" name="emailpro" value="<!-- TMPL_VAR NAME="emailpro" -->" >
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryefax" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Fax</label>	
-			<input type="text" name="fax" value="<!-- TMPL_VAR NAME="fax" -->">
-		</p>
-	</fieldset>
-	<fieldset>
-		<legend>Structure</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorycontactname" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Name</label>
-			<input style="text-transform:uppercase;" type="text" name="contactname" size="20" value="<!-- TMPL_VAR NAME="contactname" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryrelationship" -->
-				<label class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Relation</label>
-			<select name="relationship" size="1">
-						<!-- TMPL_LOOP NAME="relshiploop" -->
-							<option <!-- TMPL_VAR NAME="selected" -->><!-- TMPL_VAR NAME="relationship" --></option>
-						<!-- /TMPL_LOOP -->
-			</select>
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryB_address" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Adress </label>
-			<input type="text" name="B_address" size="40" value="<!-- TMPL_VAR NAME="B_address" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryB_zipcode" -->
-			<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-			<label>
-			<!-- /TMPL_IF-->	
-			Zipcode</label>
-			<input type="text" maxlength="5" name="B_zipcode" size="5" value="<!-- TMPL_VAR NAME="B_zipcode" -->">
-		</p>
-			<!-- TMPL_IF NAME="mandatoryB_city" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			City</label>
-			<input style="text-transform:uppercase;" type="text" name="B_city" size="20" value="<!-- TMPL_VAR NAME="B_city" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryB_phone" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Phone (home)</label>
-			<input type="text" name="B_phone" size="20" value="<!-- TMPL_VAR NAME="B_phone" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorycontactnotes" -->
-				<label class="borrowers_mandafield">
-			<!-- TMPL_ELSE -->
-				<label>
-			<!-- /TMPL_IF-->
-			Notes</label>
-			<textarea  name="contactnotes" cols="70" rows="2"   ><!-- TMPL_VAR NAME="contactnotes" --></textarea>
-		</p>
-	</fieldset>
-		<div>
-		<input type="button" class="borrowers_button" name="etapeprec1" value="Etape precedente" onclick="check_form_borrowers(0);">
-		<input type="button" class="borrowers_button" name="etapesuiv3" onclick="check_form_borrowers('3')" value="Etape suivante"></div>
-	</p>
-</form>
-<!-- ############################END FORM PROFESSIONAL############################################"-->
-<!--/TMPL_IF-->
-
-<!-- TMPL_IF NAME="step_3"-->
-	<form name="form" action="/cgi-bin/koha/members/memberentry.pl" method="post">
-		<!-- 		field always hidden in different form (1,2,3) -->
-		<input type="hidden" name="BorrowerMandatoryfield" value="<!--TMPL_VAR NAME="BorrowerMandatoryfield"-->">
-		<input type="hidden" name="FormFieldList" value="cardnumber|dateenrolled|dateexpiry|opacnote|borrowernotes|userid|password">
-		<input type="hidden" name="category_type" value="<!-- TMPL_VAR name="category_type" -->">
-		<input type="hidden" name="type" value="borrowers">
-		<input type="hidden" name="step" value="<!-- TMPL_VAR NAME="step" -->">
-		<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
-		<input type="hidden" name="actionType" value="<!-- TMPL_VAR NAME="actionType" -->">
-		<input type="hidden" name="select_roadtype" value="<!-- TMPL_VAR NAME="select_roadtype" -->">
-		<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
-		<input type="hidden" name="check_member" value="<!-- TMPL_VAR NAME="check_member" -->" />
-		<input type="hidden" name="flags" value="<!-- TMPL_VAR NAME="flags" -->" />
-		<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-		<input type="hidden" name="nodouble"  value="<!-- TMPL_VAR NAME="nodouble" -->" />
-		
-	<!-- 		from form 1 -->
-		<input type="hidden" name="title"  value="<!-- TMPL_VAR NAME="title" -->">
-		<input type="hidden" name="surname"  value="<!-- TMPL_VAR NAME="surname" -->" >
-		<input type="hidden" name="firstname"  value="<!-- TMPL_VAR NAME="firstname" -->">
-		<input type="hidden" name="dateofbirth"  value="<!-- TMPL_VAR NAME="dateofbirth" -->">
-		<input type="hidden" name="initials"  value="<!-- TMPL_VAR NAME="initials" -->">
-		<input type="hidden" name="othernames"  value="<!-- TMPL_VAR NAME="othernames" -->" >
-		<input type="hidden" name="sex" value="<!-- TMPL_VAR NAME="sex" -->" >
-		<input type="hidden" name="categorycode"  value="<!-- TMPL_VAR NAME="categorycode" -->">
-		<input type="hidden" name="select_city" value="<!-- TMPL_VAR NAME="select_city" -->">
-		<input type="hidden" name="sort1"   value="<!-- TMPL_VAR NAME="sort1" -->">
-		<input type="hidden" name="sort2"   value="<!-- TMPL_VAR NAME="sort2" -->">
-
-
-	<!-- 		from form 2 -->
-		<input type="hidden" name="streetnumber"  value="<!-- TMPL_VAR NAME="streetnumber" -->">
-		<input type="hidden" name="address"  value="<!-- TMPL_VAR NAME="address" -->">
-		<input type="hidden" name="address2"  value="<!-- TMPL_VAR NAME="address2" -->">
-		<input type="hidden" name="streettype"  value="<!-- TMPL_VAR NAME="streettype" -->">	
-		<input type="hidden" name="zipcode"  value="<!-- TMPL_VAR NAME="zipcode" -->">
-		<input type="hidden" name="city"  value="<!-- TMPL_VAR NAME="city" -->"> 
-		<input type="hidden" name="branchcode"  value="<!-- TMPL_VAR NAME="branchcode" -->">
-		<input type="hidden" name="phone"   value="<!-- TMPL_VAR NAME="phone" -->" >
-		<input type="hidden" name="phonepro" value="<!-- TMPL_VAR NAME="phonepro" -->" >
-		<input type="hidden" name="mobile"  value="<!-- TMPL_VAR NAME="mobile" -->" >	
-		<input type="hidden" name="email" value="<!-- TMPL_VAR NAME="email" -->" >
-		<input type="hidden" name="emailpro" value="<!-- TMPL_VAR NAME="emailpro" -->" >
-		<input type="hidden" name="contactname"  value="<!-- TMPL_VAR NAME="contactname" -->">
-		<input type="hidden" name="relationship"  value="<!-- TMPL_VAR NAME="relationship" -->">
-		<input type="hidden" name="B_address" value="<!-- TMPL_VAR NAME="B_address" -->">
-		<input type="hidden" name="B_zipcode"  value="<!-- TMPL_VAR NAME="B_zipcode" -->">
-		<input type="hidden" name="B_city"  value="<!-- TMPL_VAR NAME="B_city" -->">
-		<input type="hidden" name="B_phone"  value="<!-- TMPL_VAR NAME="B_phone" -->"> 
-		<input type="hidden" name="fax"  value="<!-- TMPL_VAR NAME="fax" -->"> 	
-		<textarea style="display:none;" name="contactnotes" cols="70" rows="3"  ><!-- TMPL_VAR NAME="contactnotes" --></textarea>
-	
-		<!-- TMPL_IF NAME="opadd" -->
-			<input type="hidden" name="op" value="add">
-		<!-- TMPL_ELSE -->
-			<input type="hidden" name="op" value="modify">
-		<!-- /TMPL_IF -->
-		<p>
-			<!-- TMPL_IF NAME="mandatorycardnumber" -->
-			<label  class="borrowers_mandafield">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			 Card number</label>
-			<input type="text" name="cardnumber" size="10" value="<!-- TMPL_VAR NAME="cardnumber" -->">
-		</p>
-	<fieldset id="memberentry_subscription">
-	<legend>Library set-up</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatorydateenrolled" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Arrival date</label>
-			<input type="text" name="dateenrolled"  maxlength="10"	  size="10" onblur="CheckDate(document.form.dateenrolled.value);" value="<!-- TMPL_VAR NAME="dateenrolled" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorydateexpiry" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Expiry date</label>
-			<input type="text" name="dateexpiry" maxlength="10"  size="10"
-							onblur="CheckDate(document.form.dateexpiry.value);check_manip_date('verify');" value="<!-- TMPL_VAR NAME="dateexpiry" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryopacnote" -->
-				<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->	
-			OPAC note</label>
-			<textarea  name="opacnote" cols="70" rows="2"   ><!-- TMPL_VAR NAME="opacnote" --></textarea>
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryborrowernotes" -->	
-				<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-				<label>
-			<!-- /TMPL_IF-->
-			Library note</label>
-			<textarea name="borrowernotes" cols="70" rows="2"   ><!-- TMPL_VAR NAME="borrowernotes" --></textarea>
-		</p>
-	</fieldset>
-	<fieldset id="memberentry_userid">
-		<legend>OPAC login</legend>
-		<p>
-			<!-- TMPL_IF NAME="mandatoryuserid" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			OPAC Login</label>
-			<input type="text" name="userid" size="20"  value="<!-- TMPL_VAR NAME="userid" -->">
-		</p>
-		<p>
-			<!-- TMPL_IF NAME="mandatorypassword" -->
-			<label style="font-weight:bold">
-			<!--TMPL_ELSE-->
-			<label>
-			<!-- /TMPL_IF-->
-			Password</label>
-			<!--TMPL_IF NAME="opadd"-->
-				<input type="text" name="password" size="20"  value="<!-- TMPL_VAR NAME="password" -->">
-			<!--TMPL_ELSE-->
-				<!--TMPL_IF NAME="password"-->
-					<input type="text" name="password" size="20"  value="****">
-				<!--TMPL_ELSE-->
-					<input type="text" name="password" size="20"  value="">
-				<!--/TMPL_IF-->
-			<!--/TMPL_IF-->
-		</p>
-		<!--this zones are not necessary in modif mode -->
-		<!-- TMPL_UNLESS NAME="opadd" -->
-			<h1>Warning</h1>
-			<!-- TMPL_LOOP NAME="flagloop" -->
-			<p>
-				<label class="borrowers_labels_title"><!-- TMPL_VAR NAME="html" --></label>
-				<input type="radio" name="<!-- TMPL_VAR NAME="name" -->" value="1" <!-- TMPL_VAR NAME="yes" -->>Yes
-				<input type="radio" name="<!-- TMPL_VAR NAME="name" -->" value="0" <!-- TMPL_VAR NAME="no" -->>No
-			</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_UNLESS -->	
-		<p>
-		</fieldset>
-		<div>
-			<input type="button" class="borrowers_button" name="step2" value="Previous step" onclick="check_form_borrowers(1);">	
-			<!-- TMPL_IF NAME="opadd" -->
-				<input type="button" name="step4" onclick="unique();" value="Add member">
-			<!-- TMPL_ELSE -->
-				<input type="button" name="step4" onclick="check_form_borrowers();" value="Modify member">
-			<!--/TMPL_IF -->
-		</div>
-	</form>
-<!-- /TMPL_IF -->
-<!--	 TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/members/members-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/members-home.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/members-home.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/members-home.tmpl	18 Jan 2006 17:23:32 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Member Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-
-<h1>Member Search</h1>
-
-	<form action="/cgi-bin/koha/members/member.pl" method="post">
-	<label for="member">Name or Barcode</label><input id="member" type="text" size="25" name="member" />
- <select name="orderby" id="orderby">
-			<option value="surname,firstname">Order by Last Name</option>
-			<option value="cardnumber">Order by Card Number</option>
-		</select>
-	<input type="submit" value="Search" />
-	</form>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/members/moremember-print.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/moremember-print.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/moremember-print.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/moremember-print.tmpl	19 Jul 2005 20:47:06 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,60 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Summary for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- TMPL_INCLUDE NAME="doc-head-close-print.inc" -->
-
-<!-- main site -->
-
-<h3><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=<!-- TMPL_VAR NAME="cardnumber" -->">Account Summary: <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</a></h3>
-
-<ul><li><!-- TMPL_VAR NAME="streetaddress" --></li><li><!-- TMPL_VAR NAME="city" -->, <!-- TMPL_VAR NAME="zipcode" --></li>
-<li><!-- TMPL_IF NAME="phone" --><!-- TMPL_VAR NAME="phone" --><!-- TMPL_ELSE -->(no phone number on file)<!-- /TMPL_IF --></li>
-<li><!-- TMPL_IF NAME="emailaddress" --><!-- TMPL_VAR NAME="emailaddress" --><!-- TMPL_ELSE -->(no email on file)<!-- /TMPL_IF --></li>
-</ul>
-
-<table>
-	<caption>Items Checked Out</caption>
-	<tr>
-		<th>Title</th>
-		<th>Author</th>
-		<th>Format</th>
-		<th>Date Due</th>
-		<th>Status</th>
-	</tr>
-
-	<!-- TMPL_loop name="issueloop" -->
-	<tr<!-- TMPL_IF name="red" --> class="overdue"</TMPL_IF>>
-		<td>
-		<!-- TMPL_VAR NAME="title" -->
-		<a href="/cgi-bin/koha/detail.pl?item=<!-- TMPL_VAR NAME="itemnumber" -->&amp;bib=<!-- TMPL_VAR NAME="biblionumber" -->&amp;bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->">
-		</a>
-		</td>
-		<td><!-- TMPL_VAR NAME="author" --></td>
-		<td><!-- TMPL_VAR NAME="itemtype" --></td>
-		<td><!-- TMPL_VAR NAME="date_due" --></td>
-		<td><!-- TMPL_IF NAME="red" -->Overdue!<!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
-	</tr>
-	<!-- /TMPL_LOOP -->
-	</table>
-	
-<table>
-	<caption>Items on Reserve</caption>
-	<tr>
-		<th>Title</th>
-		<th>Author</th>
-		<th>Format</th>
-		<th>Requested</th>
-	</tr>
-
-<!-- TMPL_loop name="reserveloop" -->
-	<tr>
-		<td><a href="/cgi-bin/koha/request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="btitle" --></a></td>
-		<td><!-- TMPL_VAR NAME="author" --></td>
-		<td><!-- TMPL_VAR NAME="description" --></td>
-		<td><!-- TMPL_VAR NAME="reservedate2" --></td>
-	</tr>
-	<!-- /tmpl_loop -->
-
-</table>
-
-
-<!-- endmenu -->
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/members/moremember-receipt.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/moremember-receipt.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/moremember-receipt.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/moremember-receipt.tmpl	19 Jul 2005 20:47:06 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --><!-- TMPL_INCLUDE NAME="doc-head-close-receipt.inc" -->
-
-<!-- main site -->
-
-<h3>Athens County Library</h3>
-<!-- TMPL_IF NAME="branchname" --><!-- TMPL_VAR NAME="branchname" --><br><!-- /TMPL_IF -->
-Issued To <a href="/cgi-bin/koha/circ/circulation.pl?findborrower=<!-- TMPL_VAR NAME="cardnumber">"><!-- TMPL_VAR NAME="cardnumber" --></a><br>
-<!-- TMPL_VAR NAME="todaysdate" --><br>
-<table>
-	<caption>Issues</caption>
-	<tr>
-		<th>Date Due</th>
-		<th>Title</th>
-	</tr>
-
-	<!-- TMPL_loop name="issueloop" -->
-	<!-- TMPL_IF name="red" --><!-- TMPL_ELSE -->
-		<tr>
-		<td><!-- TMPL_VAR NAME="date_due" --></td>
-		<td><a href="/cgi-bin/koha/detail.pl?item=<!-- TMPL_VAR NAME="itemnumber" -->&amp;bib=<!-- TMPL_VAR NAME="biblionumber" -->&amp;bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->"><!-- TMPL_VAR NAME="title" --></a></td>
-		</tr>
-	<!-- /TMPL_IF -->
-	<!-- /TMPL_LOOP -->
-	</table>
-	
-	<table>
-	<caption>Overdues</caption>
-	<tr>
-	<th>Date Due</th>
-	<th>Title</th>
-	</tr>
-	<!-- TMPL_LOOP NAME="issueloop" -->
-	<!-- TMPL_IF NAME="red" --><tr>
-	<td><!-- TMPL_VAR NAME="date_due" --></td>
-	<td><a href="/cgi-bin/koha/detail.pl?item=<!-- TMPL_VAR NAME="itemnumber" -->&amp;bib=<!-- TMPL_VAR NAME="biblionumber" -->&amp;bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->"><!-- TMPL_VAR NAME="title" --></a></td>
-	</tr>
-	<!-- /TMPL_IF -->
-	<!-- /TMPL_LOOP -->
-	</table>
-
-
-<!-- endmenu -->
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/moremember.tmpl	27 Sep 2006 21:40:47 -0000	1.14
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,245 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Member Details<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-
-<h1><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h1>
-
-<ul>
-	<!-- TMPL_IF name="adultborrower" -->
-	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&guarantorid=<!-- TMPL_VAR NAME="borrowernumber" -->&category_type=C">Add child</a> 
-	<!-- /TMPL_IF -->
-	
-	<a href="/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=<!-- TMPL_VAR NAME="bornum" -->&category_type=<!-- TMPL_VAR NAME="category_type"-->">Edit this Record</a> 
-	<a href="/cgi-bin/koha/members/member-password.pl?member=<!-- TMPL_VAR NAME=bornum -->">
-		Change Member's Password
-	</a> 
-	<a href="/cgi-bin/koha/members/member-flags.pl?member=<!-- TMPL_VAR NAME=bornum -->">
-		Modify Member's Privileges
-	</a> 
-	<a href="javascript:confirm_deletion()">
-		Delete this Member
-	</a> 
-	<a href="/cgi-bin/koha/members/boraccount.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->">
-		View Account
-	</a> 
-	<a href="/cgi-bin/koha/members/pay.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->">
-		Pay Fines
-	</a> 
-	<a href="/cgi-bin/koha/members/readingrec.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->">
-		Member's Reading Record
-	</a>
-</ul>
-
-<!-- TMPL_IF NAME="flagged" -->
-	<ul>
-		<!-- TMPL_IF NAME="debarred" -->
-			<li>Patron is debarred 
-			<form class="inline compact" action="/cgi-bin/koha/members/setdebar.pl" method="post">
-				<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
-				<input type="hidden" name="status" value="0" />
-				<input type="submit" value="Lift Debarment" />
-			</form>
-			</li>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="gonenoaddress" --><li>Patron's address is in doubt.</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="lost" --><li>Patron's card has been reported lost.</li><!-- /TMPL_IF -->
-	</ul>
-
-<!-- /TMPL_IF -->
-
-<fieldset>
-<legend>Borrower Information</legend>
-	<p><label>Title:</label><!-- TMPL_VAR NAME="title" --></p>
-	<p><label>First Name:</label><!-- TMPL_VAR NAME="firstname" --></p>
-	<p><label>Last Name: </label><!-- TMPL_VAR NAME="surname" --></p>
-	<p><label>Othernames: </label><!-- TMPL_VAR NAME="othernames" --></p>
-	<p><label>Initials: </label><!-- TMPL_VAR NAME="initials" --></p>
-	<p><label>Address: </label><!-- TMPL_VAR NAME="address" --></p>
-	<p><label>City: </label><!-- TMPL_VAR NAME="city" --></p>
-	<p><label>Zip Code: </label><!-- TMPL_VAR NAME="zipcode" --></p>
-	<!-- TMPL_UNLESS NAME="I"-->
-	<p><label>alt address: </label><!-- TMPL_VAR NAME="B_address" --></p>
-	<p><label>alt city: </label><!-- TMPL_VAR NAME="B_city" --></p>
-	<p><label>alt zipcode: </label><!-- TMPL_VAR NAME="B_zipcode" --></p>
-	<!-- /TMPL_UNLESS -->
-	<p><label>Home Phone: </label><!-- TMPL_VAR NAME="phone" --></p>
-	<p><label>Cell phone: </label><!-- TMPL_VAR NAME="mobile" --></p>
-	<p><label>Fax: </label><!-- TMPL_VAR NAME="fax" --></p>
-	<p><label>E-mail Address:</label><!-- TMPL_VAR NAME="email" --></p>
-	<!-- TMPL_UNLESS name="I" -->
-	<p><label>Date of Birth:</label><!-- TMPL_VAR NAME="dateofbirth" --></p>
-	<p><label>Sex:</label><!-- TMPL_VAR NAME="sex" --></p>
-	<!-- /TMPL_UNLESS -->
-</fieldset>
-<fieldset>
-	<legend>Library use</legend>
-	<p><label>Member Number:</label><!-- TMPL_VAR NAME="borrowernumber" --></p>
-	<p><label>Category:</label><!-- TMPL_VAR NAME="categorycode" --></p>
-	<p><label>Registration Date:</label><!-- TMPL_VAR NAME="dateenrolled" --></p>
-	<p><label>Expiration Date: </label><!-- TMPL_VAR NAME="dateexpiry" --></p>
-	<p><label>Registration Branch:</label><!-- TMPL_VAR NAME="branchname" --></p>
-
-	<!-- TMPL_IF NAME="printethnicityline" -->
-	<p><label>Ethnicity:</label><!-- TMPL_VAR NAME="ethnicity" --></p>
-	<p><label>Ethnicity Notes: </label><!-- TMPL_VAR NAME="ethnotes" --></p>
-	<!-- /TMPL_IF -->
-
-	<p><label>Sort field 1: </label><!-- TMPL_VAR NAME="sort1" --></p>
-	<p><label>Sort field 2:</label><!-- TMPL_VAR NAME="sort2" --></p>
-	<p><label>OPAC login: </label><!-- TMPL_VAR name="userid" --></p>
-	<p><label>OPAC Password: </label><!-- TMPL_VAR NAME="password" --></p> 
-	<p><label>Circulation Notes:</label><!-- TMPL_VAR name="borrowernotes" --></p>
-	<p><label>Patron Message:</label><!-- TMPL_VAR NAME="opacnote" --></p>
-</fieldset>
-<fieldset>
-	<legend>Alternate contact</legend>
-	<!-- TMPL_UNLESS name="I" -->
-	<p><label>Name:</label><!-- TMPL_VAR NAME="contactname" --></p>
-	<p><label>Phone: </label><!-- TMPL_VAR NAME="B_phone" --></p>
-	<p><label>Relationship:</label><!-- TMPL_VAR NAME="relationship" --></p>
-	<p><label>Notes: </label><!-- TMPL_VAR NAME="contactnote" --></p>
-	<!-- /TMPL_UNLESS -->
-	<!-- TMPL_UNLESS name="I" -->
-		<!-- TMPL_IF name="isguarantee" -->
-			<!-- TMPL_IF NAME="guaranteeloop" -->
-				<p><label>Guarantees:</label><ul><!-- tmpl_loop name="guaranteeloop" --><li><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME=name --> - <!-- TMPL_VAR NAME="cardnumber" --></a></li><!-- /tmpl_loop --></ul></p>
-			<!-- /TMPL_IF -->
-		<!-- TMPL_ELSE -->
-			<!-- TMPL_IF name="guarantorborrowernumber" -->
-				<p><label>Guarantor:</label><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="guarantorborrowernumber" -->"><!-- TMPL_VAR NAME="guarantorcardnumber" --></a></p>
-			<!-- /TMPL_IF -->
-		<!-- /TMPL_IF -->
-	<!-- /TMPL_UNLESS -->
-</fieldset>
-<fieldset>
-	<legend>Fines &amp; Charges</legend>
-	<!-- TMPL_IF name="totaldue" -->
-		<p>Total Due: <!-- TMPL_VAR NAME="totaldue" --></p>
-	<!-- TMPL_ELSE -->
-		<p>No Outstanding Charges</p>
-	<!-- /TMPL_IF -->
-</fieldset>
-<fieldset>
-	<legend>Items On Loan</legend>
-	<form action="/cgi-bin/koha/reserve/renewscript.pl" method="post">
-		<input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="bornum" -->" />
-	<table>
-		<tr>
-			<th scope="col">Title</th>
-			<th scope="col">Due</th>
-			<th scope="col">Itemtype</th>
-			<th scope="col">Charge</th>
-			<th scope="col">Price</th>
-			<th scope="col">Renew</th>
-			<th scope="col">Return</th>
-		</tr>
-	
-		<!-- tmpl_loop name="issueloop" -->
-                  <!-- TMPL_IF NAME="toggle" -->
-		<tr class="highlight">
-                  <!-- TMPL_ELSE -->
-                <tr>
-                  <!-- /TMPL_IF -->
-			<td>
-				<!-- TMPL_IF name="red" --><span class="overdue"><!-- /TMPL_IF -->
-				<!-- TMPL_VAR NAME="title" --><!-- TMPL_IF name="red" --></span><!-- /TMPL_IF -->
-				<a href="/cgi-bin/koha/catalogue/detail.pl?item=<!-- TMPL_VAR NAME="itemnumber" -->&amp;bib=<!-- TMPL_VAR NAME="biblionumber" -->&amp;bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->">
-					<!-- TMPL_VAR NAME="barcode" -->
-				</a>
-			</td>
-			<td><!-- TMPL_VAR NAME="date_due" --></td>
-			<td>
-					<!-- TMPL_VAR NAME="itemtype_description" -->
-					<!-- TMPL_IF NAME="itemtype_image" -->
-					<img src="<!-- TMPL_VAR NAME="itemtype_image" -->" />
-					<!-- /TMPL_IF -->
-					</td>
-			<td><!-- TMPL_VAR NAME="charge" --></td>
-			<td><!-- TMPL_VAR NAME="replacementprice" --></td>
-			<td>
-			<!-- TMPL_IF name="norenew" -->
-				<a href="/cgi-bin/koha/reserve/request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->">Reserved</a>
-			<!-- TMPL_ELSE -->
-			<input type="checkbox"
-							name="items[]"
-							value="<!-- TMPL_VAR NAME="itemnumber" -->"
-					<!-- TMPL_IF NAME="red" -->
-						checked="checked"
-					<!-- /TMPL_IF -->
-			/>
-			<input type="checkbox"
-					name="all_items[]"
-					value="<!-- TMPL_VAR NAME="itemnumber" -->"
-				checked="checked"
-					style="display: none;"
-			/>
-			<!-- /TMPL_IF -->
-			</td>
-			<td><a href="/cgi-bin/koha/circ/returns.pl?barcode=<!-- TMPL_VAR NAME="barcode" -->">Return</a></td>
-		</tr>
-		<!-- /tmpl_loop -->
-		<tr><td colspan="3">Total Replacement Cost:</td><td><!-- TMPL_VAR NAME="totalprice" --></td><td colspan="2">&nbsp;</td></tr>
-		</table>
-			<div id="action">
-			<input type="submit" name="renew_checked" value="Renew Checked Items" />
-			<input type="submit" name="renew_all" value="Renew All" />
-			</div>
-	</form>
-</fieldset>
-<fieldset>
-	<legend>Reserves</legend>
-	<form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
-		<input type="hidden" name="from" value="borrower" />
-		<table>
-		<tr>
-			<th scope="row">Title</th>
-			<th scope="row">Requested</th>
-			<th scope="row">Remove</th>
-		</tr>
-	
-		<!-- TMPL_LOOP name="reserveloop" -->
-                  <!-- TMPL_IF NAME="toggle" -->
-		<tr class="highlight">
-                  <!-- TMPL_ELSE -->
-                <tr>
-                  <!-- /TMPL_IF -->
-			<td>
-				<a href="/cgi-bin/koha/reserve/request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="btitle" --></a>
-				<!-- TMPL_IF name="volumeddesc" -->
-					<!-- TMPL_VAR NAME="volumeddesc" -->
-					<!-- TMPL_VAR NAME="itemtype" -->
-				<!-- /TMPL_IF -->
-			</td>
-			<td><!-- TMPL_VAR NAME="reservedate2" --></td>
-			<td>
-				<select name="rank-request">
-				<option value="n">No</option>
-				<option value="del">Yes</option>
-				</select>
-			</td>
-			<input type="hidden" name="biblio" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
-			<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="bornum" -->" />
-		</tr>
-		<!-- /tmpl_loop -->
-	</table>
-	<!-- TMPL_IF name="reserveloop" -->
-		<input type="submit" class="cancel" name="submit" value="Cancel Marked Requests" />
-	<!-- /TMPL_IF -->
-	</form>
-</fieldset>
-<script language="JavaScript" type="text/javascript">
-function confirm_deletion() {
-	var is_confirmed = confirm('Do you confirm deletion ?');
-	if (is_confirmed) {
-			window.location="/cgi-bin/koha/members/deletemem.pl?member=<!-- TMPL_VAR NAME="bornum" -->";
-	}
-}
-function confirm_reregistration() {
-	var is_confirmed = confirm('Do you confirm re_registration ?');
-	if (is_confirmed) {
-	window.location="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->&reregistration=y";
-	}
-}
-</script>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/members/pay.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/pay.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/pay.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/pay.tmpl	22 Sep 2006 00:18:00 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,54 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->KOHA -- Pay Fines for  <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-	<form class="inline" id="payment" action="/cgi-bin/koha/members/pay.pl" method="post"><input type="hidden" name="bornum" value="<!-- TMPL_VAR name="bornum" -->" />
-<div class="table"><table>
-<input type="hidden" name="loggedinuser" value="<!-- TMPL_VAR NAME="loggedinusername" -->">
-<caption>Pay Fines for <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --></caption>
-<tr>
-	<th>Fines &amp; Charges</th>
-	<th>Description</th>
-	<th>Account Type</th>
-	<th>Amount</th>
-	<th>Amount Outstanding</th>
-	<th>Amount to pay</th></tr>
-	
-<!-- TMPL_LOOP name="loop_pay" -->
-<tr>
-	<td><fieldset><label for="payfine<!-- TMPL_VAR name="i" -->">Unpaid</label><input id="payfine<!-- TMPL_VAR name="i" -->" type="radio" name="payfine<!-- TMPL_VAR name="i" -->" value="no" checked="checked" /><br>
-	<label for="payfine<!-- TMPL_VAR name="i" -->">Pay</label><input type="radio" id="payfine<!-- TMPL_VAR name="i" -->" name="payfine<!-- TMPL_VAR name="i" -->" value="yes" /><br>
-	<!--TMPL_IF NAme="CAN_user_management"--> <label for="payfine<!-- TMPL_VAR name="i" -->">Writeoff</label><input type="radio" id="payfine<!-- TMPL_VAR name="i" -->" name="payfine<!-- TMPL_VAR name="i" -->" value="wo" /><!--/TMPL_IF--> </fieldset>
-	<input type="hidden" name="itemnumber<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="itemnumber" -->" />
-	<input type="hidden" name="accounttype<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="accounttype" -->" />
-	<input type="hidden" name="amount<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="amount" -->" />
-	<input type="hidden" name="out<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="amountoutstanding" -->" />
-	<input type="hidden" name="bornum<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="bornum" -->" />
-	<input type="hidden" name="accountno<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="accountno" -->" />
-	<input type="hidden" name="desc<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="description" --><!-- TMPL_VAR name="title" -->" />
-	<input type="hidden" id="counter" value="">
-	</td>
-	<td><!-- TMPL_VAR name="description" --><!-- TMPL_VAR name="title" --></td>
-	<td><!-- TMPL_VAR name="accounttype" --></td>
-	<td class="debit"><!-- TMPL_VAR name="amount" --></td>
-	<td class="debit"><!-- TMPL_VAR name="amountoutstanding" --></td>
-	<td><input type="text" name="amounttopay<!-- TMPL_VAR name="i" -->" size="5" value="<!-- TMPL_VAR name="amountoutstanding" -->" />
-	</td>
-</tr>
-<!-- /TMPL_LOOP -->
-<tr>
-	<td colspan="4">Total Due</td>
-	<td class="debit"><!-- TMPL_VAR name="total" --></td>
-	</tr>
-</table><div>
-<input type="submit" name="submit"  value="Make Payment" class="submit" /></form> <form class="inline" action="/cgi-bin/koha/members/moremember.pl" method="get"><input type="hidden" value="<!-- TMPL_VAR name="bornum" -->" name="bornum" /> <input type="submit" class="submit" value="Return to Member Record" /></form>
-
-<script language="JavaScript" type="text/javascript">
-function changetotal() {
-mytotal=0;
-for (i=0 ; i<document.forms['payment'].counter.length ; i++) {
- mytotal +=document.getElementById("amounttopay"+i).value;
-}
-document.forms['payment'].totalamountopay.value=mytotal;
-}
-</script>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/members/readingrec.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/members/readingrec.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/members/readingrec.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/members/readingrec.tmpl	13 Jun 2006 09:54:30 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,51 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reading Record for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-members.inc" -->
-
-<!-- TMPL_IF NAME="showfulllink" -->
-<ul>
-	<li>Showing All Items</li>
-	<li><a href="readingrec.pl?bornum=<!-- TMPL_VAR name="bornum" -->&amp;limit=full">Show Last 50 Items Only</a></li>
-</ul>
-<!-- TMPL_ELSE -->
-<ul>
-	<li>Showing Last 50 Items</li>
-	<li><a href="readingrec.pl?bornum=<!-- TMPL_VAR name="bornum" -->&amp;limit=full">Show All Items</a></li>
-</ul>
-<!-- /TMPL_IF -->
-<h1>Reading Record for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></h1>
-<table>
-<tr>
-	<th>
-		<a href="readingrec.pl?bornum=<!-- TMPL_VAR name="bornum" -->&amp;order=title&amp;amp;limit=<!-- TMPL_VAR name="limit" -->">Title</a>
-	</th>
-	<th>
-		<a href="readingrec.pl?bornum=<!-- TMPL_VAR name="bornum" -->&amp;order=author&amp;limit=<!-- TMPL_VAR name="limit" -->">Author</a>
-	</th>
-	<th>Call No.</th>
-	<th>
-		<a href="readingrec.pl?bornum=<!-- TMPL_VAR name="bornum" -->&amp;order=returndate DESC&amp;limit=<!-- TMPL_VAR name="limit" -->">Return Date</a>
-	</th>
-</tr>
-<!-- TMPL_LOOP name="loop_reading" -->
-<!-- TMPL_IF NAME="toggle" -->
-<tr class="highlight">
-<!-- TMPL_ELSE -->
-<tr>
-<!-- /TMPL_IF -->
-	<td<!-- TMPL_IF NAME="returndate" --><!-- TMPL_ELSE --> class="onissue"<!-- /TMPL_IF -->>
- 		<a href="/cgi-bin/koha/detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR name="title" --></a>
-	</td>
-	<td<!-- TMPL_IF NAME="returndate" --><!-- TMPL_ELSE --> class="onissue"<!-- /TMPL_IF -->>
- 		<!-- TMPL_VAR name="author" -->
-	</td>
-	<td<!-- TMPL_IF NAME="returndate" --><!-- TMPL_ELSE --> class="onissue"<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="classification" --></td>
-	<td<!-- TMPL_IF NAME="returndate" --><!-- TMPL_ELSE --> class="onissue"<!-- /TMPL_IF -->><!-- TMPL_IF NAME="returndate" --><!-- TMPL_VAR name="returndate" --><!-- TMPL_ELSE -->Checked Out<!-- /TMPL_IF -->
-	</td>
-</tr>
-<!-- /TMPL_LOOP -->
-</table>
-<form action="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR name="bornum" -->" method="get"><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="bornum" -->" /> <input type="submit" value="Return to Patron Record" /></form>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/acquisitions_stats.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/acquisitions_stats.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/acquisitions_stats.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/acquisitions_stats.tmpl	22 Jul 2005 16:39:56 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,274 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-
-<!-- TMPL_IF NAME="do_it" -->
-	<!-- TMPL_LOOP NAME="mainloop" -->
-		<h1>Koha : Acquisitions statistics </h1>
-		<!-- TMPL_IF NAME="loopfilter"-->
-			<p>Filtered on</p>
-			<!-- TMPL_LOOP NAME="loopfilter" -->
-					<p><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --> <!-- TMPL_VAR NAME="crit"--> =<!-- TMPL_VAR NAME="filter"--><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --></p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_IF NAME="loopfilter"-->
-		
-		<table>
-			<tr >
-				<th><!-- TMPL_VAR name="line" --> / <!-- TMPL_VAR name="column" --></th>
-				<!-- TMPL_LOOP NAME="loopcol" -->
-					<th><!-- TMPL_VAR NAME="coltitle" --></th>
-				<!-- /TMPL_LOOP -->
-				<th>TOTAL</th>
-			</tr>
-				<!-- TMPL_LOOP NAME="looprow" -->
-					<tr>
-						<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-						<!-- TMPL_VAR NAME="rowtitle" --></td>
-						<!-- TMPL_LOOP NAME="loopcell" -->
-							<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-								<!-- TMPL_IF Name="value" --><!-- TMPL_VAR NAME="value" -->
-								<!-- TMPL_ELSE--> &nbsp;
-								<!-- /TMPL_IF -->
-							</td>
-						<!-- /TMPL_LOOP -->
-						<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-							<!-- TMPL_VAR NAME="totalrow" -->
-						</td>
-					</tr>
-				<!-- /TMPL_LOOP NAME="looprow" -->
-				<tr >
-					<th>TOTAL</th>
-					<!-- TMPL_LOOP NAME="loopfooter" -->
-						<th>
-							<!-- TMPL_VAR NAME="totalcol" -->
-						</th>
-					<!-- /TMPL_LOOP -->
-					<th><!-- TMPL_VAR NAME="total" --></th>
-				</tr>
-		</table>
-	<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-	<h1>Koha : Acquisitions statistics </h1>
-	<form method="post">
-	<table>
-		<thead>
-			<tr>
-			<th><div>Title</th>
-			<th>Row</th>
-			<th>Column</th>
-			<th>Filter</th>
-			</tr>
-		</thead>
-		<tbody>
-			<tr class="hilighted">
-				<td>Placed On</td>
-				<td><input type="radio" name="Line" value="aqbasket.closedate" /></td>
-				<td><input type="radio" name="Column" value="aqbasket.closedate" /> </td>
-				<td > From <input type="text" readonly="readonly" size="10" id="from" name="Filter" />
-							<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFrom" style="cursor: pointer;" valign="top">
-								<script language="JavaScript" type="text/javascript">
-									function validate1(date) {
-										var day = date.getDate();
-										var month = date.getMonth() + 1;
-										var year = date.getFullYear();
-										var weekDay = date.getDay();
-										var dayMonth = month + '-' + day;
-										var dateString = year + '-' + month + '-' + day;
-										var dateTo = document.getElementById('to').value.split("-");
-										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-										if (date > limitDate) {
-											return true;
-										} else {
-											return false;
-										}
-									}
-					
-									Calendar.setup(
-										{
-											inputField : "from",
-											ifFormat : "%Y-%m-%d",
-											button : "openCalendarFrom",
-											disableFunc : validate1,
-											dateStatusFunc : validate1
-										}
-									);
-								</script>
-					To <input readonly="readonly" size="10" id="to" name="Filter" value="" type="text" />
-						<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-							<script type="text/javascript">
-								function validate2(date) {
-									var day = date.getDate();
-									var month = date.getMonth() + 1;
-									var year = date.getFullYear();
-									var weekDay = date.getDay();
-									var dayMonth = month + '-' + day;
-									var dateString = year + '-' + month + '-' + day;
-									var dateFrom = document.getElementById('from').value.split("-");
-									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-									if (limitDate > date) {
-										return true;
-									} else {
-										return false;
-									}
-								}
-		
-								Calendar.setup(
-									{
-										inputField : "to",
-										ifFormat : "%Y-%m-%d",
-										button : "openCalendarTo",
-										disableFunc : validate2,
-										dateStatusFunc : validate2
-									}
-								);
-							</script>
-				</td>
-			</tr>
-			<tr class="hilighted"> 
-				<td>&nbsp;</td>
-				<td colspan="2">group by <select name="PlacedOnDisplay">
-					<option value="">None</option>
-					<option value ="1">Day of week</option>
-					<option value ="2">Month</option>
-					<option value ="3">Year</option>
-					</select>
-					
-				</td>
-				<td>&nbsp;</td>
-			</tr>
-			<tr>
-				<td>Received On</td>
-				<td><input type="radio" name="Line" value="aqorderdelivery.deliverydate" /></td>
-				<td><input type="radio" name="Column" value="aqorderdelivery.deliverydate" /></td>
-				<td > From <input type="text" readonly="readonly" size="10" id="fromRO" name="Filter" />
-							<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFromRO" style="cursor: pointer;" valign="top">
-								<script language="JavaScript" type="text/javascript">
-									function validate1(date) {
-										var day = date.getDate();
-										var month = date.getMonth() + 1;
-										var year = date.getFullYear();
-										var weekDay = date.getDay();
-										var dayMonth = month + '-' + day;
-										var dateString = year + '-' + month + '-' + day;
-										var dateTo = document.getElementById('toRO').value.split("-");
-										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-										if (date > limitDate) {
-											return true;
-										} else {
-											return false;
-										}
-									}
-					
-									Calendar.setup(
-										{
-											inputField : "fromRO",
-											ifFormat : "%Y-%m-%d",
-											button : "openCalendarFromRO",
-											disableFunc : validate1,
-											dateStatusFunc : validate1
-										}
-									);
-								</script>
-					To <input type="text" readonly="readonly" size="10" id="toRO" name="Filter" value="" />
-						<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarToRO" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-							<script type="text/javascript">
-								function validate2(date) {
-									var day = date.getDate();
-									var month = date.getMonth() + 1;
-									var year = date.getFullYear();
-									var weekDay = date.getDay();
-									var dayMonth = month + '-' + day;
-									var dateString = year + '-' + month + '-' + day;
-									var dateFrom = document.getElementById('fromRO').value.split("-");
-									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-									if (limitDate > date) {
-										return true;
-									} else {
-										return false;
-									}
-								}
-		
-								Calendar.setup(
-									{
-										inputField : "toRO",
-										ifFormat : "%Y-%m-%d",
-										button : "openCalendarToRO",
-										disableFunc : validate2,
-										dateStatusFunc : validate2
-									}
-								);
-							</script>
-				</td>
-			</tr>
-			<tr> 
-				<td>&nbsp;</td>
-				<td colspan="2">group by <select name="ReceivedOnDisplay">
-					<option value="">None</option>
-					<option value ="1">Day of week</option>
-					<option value ="2">Month</option>
-					<option value ="3">Year</option>
-					</select>
-					
-				</td>
-				<td>&nbsp;</td>
-			</tr>
-			<tr class="hilighted">
-				<td>Book Seller</td>
-				<td><input type="radio" name="Line" value="aqbooksellers.name" /></td>
-				<td><input type="radio" name="Column" value="aqbooksellers.name" /></td>
-				<td ><!-- TMPL_VAR NAME="CGIBookSeller" --></td>
-			</tr>
-			<tr>
-				<td>Budget</td>
-				<td><input type="radio" name="Line" value="aqorderbreakdown.bookfundid" /></td>
-				<td><input type="radio" name="Column" value="aqorderbreakdown.bookfundid" /></td>
-				<td ><!-- TMPL_VAR NAME="CGIBudget" --></td>
-			</tr>
-			<!-- TMPL_IF Name="hassort1" -->
-				<tr class="hilighted"> 
-					<td>Sort1</td>
-					<td><input type="radio" name="Line" value="aqorders.sort1" /></td>
-					<td><input type="radio" name="Column" value="aqorders.sort1" /></td>
-					<td><!-- TMPL_VAR NAME="CGISort1" --> </td>
-				</tr>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF Name="hassort2" -->
-				<!-- TMPL_IF Name="HglghtSort2"--><tr class="hilighted"> <!-- TMPL_ELSE --><tr><!--/TMPL_IF --> 
-					<td>Sort2</td>
-					<td><input type="radio" name="Line" value="aqorders.sort2" /></td>
-					<td><input type="radio" name="Column" value="aqorders.sort2" /></td>
-					<td><!-- TMPL_VAR NAME="CGISort2" --> </td>
-				</tr>
-			<!-- /TMPL_IF -->
-			<tr></tr>
-		</tbody>
-	</table>
-	
-	
-		<h3> Cell value </h3>
-			<input type="radio" name="Cellvalue" value="1" checked /> Count items
-			<input type="radio" name="Cellvalue" value="2" /> Amount
-	
-	
-		<h3> Output </h3>
-		<input type="radio" checked name="output" value="screen" /> To screen into the browser
-		
-		<input type="radio" name="output" value="file" /> To file <input type="text" name="basename" value="Export" /> into an application  
-		<!-- TMPL_VAR NAME="CGIextChoice" -->
-		<!-- TMPL_VAR NAME="CGIsepChoice" -->
-	</p>
-	
-	<p>
-	<input type="submit" value="OK" />
-	<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
-	<input type="hidden" name="do_it" value="1" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/bor_issues_top.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/bor_issues_top.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/bor_issues_top.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/bor_issues_top.tmpl	22 Jul 2005 16:39:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,281 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-
-<!-- TMPL_IF NAME="do_it" -->
-<script language="JavaScript" type="text/javascript">
-function Dopop(link) {
-	newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
-}
-</script>
-	<!-- TMPL_LOOP NAME="mainloop" -->
-		<h1>Koha : Top <!-- TMPL_VAR NAME="limit"--> List borrowers for Issues </h1>
-		<!-- TMPL_IF NAME="loopfilter"-->
-			<p>Filtered on</p>
-			<!-- TMPL_LOOP NAME="loopfilter" -->
-					<p><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --> <!-- TMPL_VAR NAME="crit"--> =<!-- TMPL_VAR NAME="filter"--><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --></p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_IF NAME="loopfilter"-->
-		
-		<table>
-			<tr >
-				<th>Rank/Borrowers</th>
-				<!-- TMPL_LOOP NAME="loopcol" -->
-					<th colspan="2"><!-- TMPL_VAR NAME="coltitle" --></th>
-				<!-- /TMPL_LOOP -->
-			</tr>
-			<tr >
-				<th>&nbsp;</th>
-				<!-- TMPL_LOOP NAME="loopcol" -->
-					<th>Borrower</th>
-					<th>Issues count</th>
-				<!-- /TMPL_LOOP -->
-			</tr>
-				<!-- TMPL_LOOP NAME="looprow" -->
-					<tr>
-						<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-						<!-- TMPL_VAR NAME="rowtitle" --></td>
-						<!-- TMPL_LOOP NAME="loopcell" -->
-							<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td ><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="reference" --><a href="javascript:Dopop('../members/moremember.pl?bornum=<!-- TMPL_VAR NAME="reference" -->')" ><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="reference" --></a><!-- /TMPL_IF -->
-							</td>
-							<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td ><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="count" --><!-- TMPL_VAR NAME="count" --><!-- /TMPL_IF -->
-							</td>
-						<!-- /TMPL_LOOP -->
-					</tr>
-				<!-- /TMPL_LOOP NAME="looprow" -->
-		</table>
-	<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-	<h1>Koha : Top List borrowers for Issues  </h1>
-	<form method="post">
-	
-	<table>
-		<thead>
-			<tr>
-			<th>Limit to </th>
-			<th>By </th>
-			<th colspan="2">Filters</th>
-			</tr>
-		</thead>
-		<tbody>
-			<tr>
-				<td>
-					<select name="Limit">
-						<option value ="5" checked> 5</option>
-						<option value ="10">10</option>
-						<option value ="15">15</option>
-						<option value ="20">20</option>
-	<!--					<option value ="25">25</option>
-						<option value ="40">40</option>
-						<option value ="50">50</option>
-						<option value ="100">100</option>-->
-					</select>
-				</td>
-				<td>
-					<select name="Criteria">
-						<option value ="" checked>None</option>
-						<option value ="issuingbranch">Branch</option>
-						<option value ="categorycode">Categorycode</option>
-						<option value ="itemtype">Itemtype</option>
-						<option value ="Day">Day</option>
-						<option value ="Week">Week</option>
-						<option value ="Month">Month</option>
-						<option value ="Year">Year</option>
-					</select>
-				</td>
-			</tr>
-			
-			<tr class="hilighted">
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Issue date</td>
-				<td> From <input type="text" readonly="readonly" size="10" id="from" name="Filter" />
-							<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFrom" style="cursor: pointer;" valign="top">
-								<script language="JavaScript" type="text/javascript">
-									function validate1(date) {
-										var day = date.getDate();
-										var month = date.getMonth() + 1;
-										var year = date.getFullYear();
-										var weekDay = date.getDay();
-										var dayMonth = month + '-' + day;
-										var dateString = year + '-' + month + '-' + day;
-										var dateTo = document.getElementById('to').value.split("-");
-										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-										if (date > limitDate) {
-											return true;
-										} else {
-											return false;
-										}
-									}
-					
-									Calendar.setup(
-										{
-											inputField : "from",
-											ifFormat : "%Y-%m-%d",
-											button : "openCalendarFrom",
-											disableFunc : validate1,
-											dateStatusFunc : validate1
-										}
-									);
-								</script>
-					To <input readonly="readonly" size="10" id="to" name="Filter" value="" type="text" />
-						<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-							<script type="text/javascript">
-								function validate2(date) {
-									var day = date.getDate();
-									var month = date.getMonth() + 1;
-									var year = date.getFullYear();
-									var weekDay = date.getDay();
-									var dayMonth = month + '-' + day;
-									var dateString = year + '-' + month + '-' + day;
-									var dateFrom = document.getElementById('from').value.split("-");
-									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-									if (limitDate > date) {
-										return true;
-									} else {
-										return false;
-									}
-								}
-		
-								Calendar.setup(
-									{
-										inputField : "to",
-										ifFormat : "%Y-%m-%d",
-										button : "openCalendarTo",
-										disableFunc : validate2,
-										dateStatusFunc : validate2
-									}
-								);
-							</script>
-				</td>
-			</tr>
-			<tr>
-				<td> &nbsp;</td>
-				<td> &nbsp;</td>
-				<td>Returns</td>
-				<td > From <input type="text" readonly="readonly" size="10" id="fromRO" name="Filter" />
-							<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFromRO" style="cursor: pointer;" valign="top">
-								<script language="JavaScript" type="text/javascript">
-									function validate1(date) {
-										var day = date.getDate();
-										var month = date.getMonth() + 1;
-										var year = date.getFullYear();
-										var weekDay = date.getDay();
-										var dayMonth = month + '-' + day;
-										var dateString = year + '-' + month + '-' + day;
-										var dateTo = document.getElementById('toRO').value.split("-");
-										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-										if (date > limitDate) {
-											return true;
-										} else {
-											return false;
-										}
-									}
-					
-									Calendar.setup(
-										{
-											inputField : "fromRO",
-											ifFormat : "%Y-%m-%d",
-											button : "openCalendarFromRO",
-											disableFunc : validate1,
-											dateStatusFunc : validate1
-										}
-									);
-								</script>
-					To <input type="text" readonly="readonly" size="10" id="toRO" name="Filter" value="" />
-						<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarToRO" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-							<script type="text/javascript">
-								function validate2(date) {
-									var day = date.getDate();
-									var month = date.getMonth() + 1;
-									var year = date.getFullYear();
-									var weekDay = date.getDay();
-									var dayMonth = month + '-' + day;
-									var dateString = year + '-' + month + '-' + day;
-									var dateFrom = document.getElementById('fromRO').value.split("-");
-									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-									if (limitDate > date) {
-										return true;
-									} else {
-										return false;
-									}
-								}
-		
-								Calendar.setup(
-									{
-										inputField : "toRO",
-										ifFormat : "%Y-%m-%d",
-										button : "openCalendarToRO",
-										disableFunc : validate2,
-										dateStatusFunc : validate2
-									}
-								);
-							</script>
-				</td>
-			</tr>
-			<tr class="hilighted">
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Branch</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-			<tr>
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Document Type</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-			<tr class="hilighted">
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Borrower Category</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-			<tr>
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Day</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-			<tr class="hilighted">
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Month</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-			<tr>
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Year</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-		</tbody>
-	</table>
-	
-	
-		<h3> Output </h3>
-		<input type="radio" checked name="output" value="screen" /> To screen into the browser
-		
-		<input type="radio" name="output" value="file" /> To file <input type="text" name="basename" value="Export" /> into an application  
-		<!-- TMPL_VAR NAME="CGIextChoice" -->
-		<!-- TMPL_VAR NAME="CGIsepChoice" -->
-	</p>
-	
-	<p>
-	<input type="submit" value="OK" />
-	<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
-	<input type="hidden" name="do_it" value="1" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/borrowers_out.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/borrowers_out.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/borrowers_out.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/borrowers_out.tmpl	22 Jul 2005 16:39:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,117 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-
-<!-- TMPL_IF NAME="do_it" -->
-	<!-- TMPL_LOOP NAME="mainloop" -->
-		<h1>Koha : Borrowers with No Issues </h1>
-		<!-- TMPL_IF NAME="loopfilter"-->
-			<p>Filtered on</p>
-			<!-- TMPL_LOOP NAME="loopfilter" -->
-					<p><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --> <!-- TMPL_VAR NAME="crit"--> =<!-- TMPL_VAR NAME="filter"--><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --></p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_IF NAME="loopfilter"-->
-		
-		<table>
-			<tr >
-				<th>Num/Borrowers</th>
-				<!-- TMPL_LOOP NAME="loopcol" -->
-					<th><!-- TMPL_VAR NAME="coltitle" --></th>
-				<!-- /TMPL_LOOP -->
-			</tr>
-				<!-- TMPL_LOOP NAME="looprow" -->
-					<tr>
-						<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-						<!-- TMPL_VAR NAME="rowtitle" --></td>
-						<!-- TMPL_LOOP NAME="loopcell" -->
-							<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td ><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
-							</td>
-						<!-- /TMPL_LOOP -->
-					</tr>
-				<!-- /TMPL_LOOP NAME="looprow" -->
-		</table>
-	<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-	<h1>Koha : Borrowers with no Issues  </h1>
-	<form method="post">
-	
-	<table>
-		<thead>
-			<tr>
-			<th>Limit to </th>
-			<th>By </th>
-			<th colspan="2">Filters</th>
-			</tr>
-		</thead>
-		<tbody>
-			<tr>
-				<td>
-					<select name="Limit">
-						<option value ="" checked>None</option>
-						<option value ="5"> 5</option>
-						<option value ="10">10</option>
-						<option value ="15">15</option>
-						<option value ="20">20</option>
-						<option value ="25">25</option>
-						<option value ="40">40</option>
-						<option value ="50">50</option>
-						<option value ="100">100</option>
-					</select>
-				</td>
-				<td>
-					<select name="Criteria">
-						<option value ="" checked>None</option>
-						<option value ="categorycode">Categorycode</option>
-						<option value ="itemtype">Itemtype</option>
-					</select>
-				</td>
-			</tr>
-			<tr class="hilighted">
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Borrower Category</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-			<tr class="hilighted">
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Without issues since</td>
-				<td><input size="10" id="to" name="Filter" value="" type="text" />
-						<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-							<script type="text/javascript">
-								Calendar.setup(
-									{
-										inputField : "to",
-										ifFormat : "%Y-%m-%d",
-										button : "openCalendarTo",
-									}
-								);
-							</script></td>
-			</tr>
-		</tbody>
-	</table>
-	
-	
-		<h3> Output </h3>
-		<input type="radio" checked name="output" value="screen" /> To screen into the browser
-		
-		<input type="radio" name="output" value="file" /> To file <input type="text" name="basename" value="Export" /> into an application  
-		<!-- TMPL_VAR NAME="CGIextChoice" -->
-		<!-- TMPL_VAR NAME="CGIsepChoice" -->
-	</p>
-	
-	<p>
-	<input type="submit" value="OK" />
-	<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
-	<input type="hidden" name="do_it" value="1" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/borrowers_stats.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/borrowers_stats.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/borrowers_stats.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/borrowers_stats.tmpl	22 Jul 2005 16:39:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,143 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-
-<!-- TMPL_IF NAME="do_it" -->
-	<!-- TMPL_LOOP NAME="mainloop" -->
-		<h1>Koha : Borrowers statistics </h1>
-		<!-- TMPL_IF NAME="loopfilter"-->
-			<p>Filtered on</p>
-			<!-- TMPL_LOOP NAME="loopfilter" -->
-					<p> <!-- TMPL_VAR NAME="crit"--> =<!-- TMPL_VAR NAME="filter"--></p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_IF NAME="loopfilter"-->
-		<table>
-			<tr >
-				<th><!-- TMPL_VAR name="line" --> / <!-- TMPL_VAR name="column" --></th>
-				<!-- TMPL_LOOP NAME="loopcol" -->
-					<th><!-- TMPL_VAR NAME="coltitle" --></th>
-				<!-- /TMPL_LOOP -->
-				<th>TOTAL</th>
-			</tr>
-				<!-- TMPL_LOOP NAME="looprow" -->
-					<tr>
-						<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-						<!-- TMPL_VAR NAME="rowtitle" --></td>
-						<!-- TMPL_LOOP NAME="loopcell" -->
-							<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-								<!--TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" -->
-								<!--TMPL_ELSE-->
-									&nbsp;
-								<!--/TMPL_IF-->
-								</td>
-						<!-- /TMPL_LOOP -->
-						<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-							<!-- TMPL_VAR NAME="totalrow" -->
-						</td>
-					</tr>
-				<!-- /TMPL_LOOP NAME="looprow" -->
-				<tr >
-					<th>TOTAL</th>
-					<!-- TMPL_LOOP NAME="loopfooter" -->
-						<th>
-							<!-- TMPL_VAR NAME="totalcol" -->
-						</th>
-					<!-- /TMPL_LOOP -->
-					<th><!-- TMPL_VAR NAME="total" --></th>
-				</tr>
-		</table>
-	<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-	<h1>Borrowers statistics</h1>
-	<form method="post">
-	<table>
-		<thead>
-			<tr>
-			<th>Title</th>
-			<th>Row</th>
-			<th>Column</th>
-			<th>Filter</th>
-			</tr>
-		</thead>
-		<tbody>
-			<tr class="hilighted">
-			<td>Borrower category</td>
-			<td><input type="radio" name="Line" value="categorycode" /></td>
-			<td><input type="radio" name="Column" value="categorycode" /></td>
-			<td ><!-- TMPL_VAR NAME="CGICatCode" --></td>
-			</tr>
-			<tr>
-			<td>Borrower status</td>
-			<td></td>
-			<td></td>
-			<td ><select name="status"><option value=""> </option><option value="debarred">debarred</option><option value="gonenoadress">gone no adress</option><option value="lost">lost</option></td>
-			</tr>
-			<tr class="hilighted">
-			<td>
-			Zip Code
-			</td>
-			<td><input type="radio" name="Line" value="zipcode" /></td>
-			<td><input type="radio" name="Column" value="zipcode" /></td>
-			<td><input type="text"  name="Filter" /></td>
-			</tr>
-			<tr class="hilighted">
-			<td>&nbsp;</td>
-			<td colspan="2"><select name="digits">
-			<option value=""> </option>
-			<option value ="1">1</option>
-			<option value ="2">2</option>
-			<option value ="3">3</option>
-			<option value ="4">4</option>
-			<option value ="5">5</option>
-			<option value ="6">6</option>
-			<option value ="7">7</option>
-			<option value ="8">8</option>
-			<option value ="9">9</option>
-			<option value ="10">10</option>
-			</select>
-			digits 
-			</td>
-			<td>&nbsp;</td>
-			</tr>
-			<!-- TMPL_IF name="hassort1" -->
-				<tr>
-				<td>Sort1</td>
-				<td><input type="radio" name="Line" value="sort1" /></td>
-				<td><input type="radio" name="Column" value="sort1" /></td>
-				<td ><!-- TMPL_VAR NAME="CGISort1" --></td>
-				</tr>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="hassort2" -->
-				<tr class="hilighted" >
-				<td>Sort2</td>
-				<td><input type="radio" name="Line" value="sort2" /></td>
-				<td><input type="radio" name="Column" value="sort2" /></td>
-				<td><!-- TMPL_VAR NAME="CGISort2" --></td>
-				</tr>
-			<!-- /TMPL_IF -->
-		</tbody>
-	</table>
-	
-	
-		<h3> Output </h3>
-		<input type="radio" checked name="output" value="screen" /> To screen into the browser
-		
-		<input type="radio" name="output" value="file"> To file <input type="text" name="basename" value="Export" /> into an application  
-		<!-- TMPL_VAR NAME="CGIextChoice" -->
-		<!-- TMPL_VAR NAME="CGIsepChoice" -->
-	</p>
-	
-	<p>
-	<input type="submit" value="OK" />
-	<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
-	<input type="hidden" name="do_it" value="1" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/cat_issues_top.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/cat_issues_top.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/cat_issues_top.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/cat_issues_top.tmpl	22 Jul 2005 16:39:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,281 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-
-<!-- TMPL_IF NAME="do_it" -->
-<script language="JavaScript" type="text/javascript">
-function Dopop(link) {
-	newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
-}
-</script>
-	<!-- TMPL_LOOP NAME="mainloop" -->
-		<h1>Koha : Top <!-- TMPL_VAR NAME="limit"--> List On Catalogue Issues </h1>
-		<!-- TMPL_IF NAME="loopfilter"-->
-			<p>Filtered on</p>
-			<!-- TMPL_LOOP NAME="loopfilter" -->
-					<p><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --> <!-- TMPL_VAR NAME="crit"--> =<!-- TMPL_VAR NAME="filter"--><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --></p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_IF NAME="loopfilter"-->
-		
-		<table>
-			<tr >
-				<th>Rank/Biblioitemnumbers</th>
-				<!-- TMPL_LOOP NAME="loopcol" -->
-					<th colspan="2"><!-- TMPL_VAR NAME="coltitle" --></th>
-				<!-- /TMPL_LOOP -->
-			</tr>
-			<tr >
-				<th>&nbsp;</th>
-				<!-- TMPL_LOOP NAME="loopcol" -->
-					<th>Item</th>
-					<th>Issues count</th>
-				<!-- /TMPL_LOOP -->
-			</tr>
-				<!-- TMPL_LOOP NAME="looprow" -->
-					<tr>
-						<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-						<!-- TMPL_VAR NAME="rowtitle" --></td>
-						<!-- TMPL_LOOP NAME="loopcell" -->
-							<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td ><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="reference" --><a href="javascript:Dopop('../MARCdetail.pl?bib=<!-- TMPL_VAR NAME="reference" -->')" ><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- TMPL_ELSE -->Item<!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="reference" --></a><!-- /TMPL_IF -->
-							</td>
-							<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td ><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="count" --><!-- TMPL_VAR NAME="count" --><!-- /TMPL_IF -->
-							</td>
-						<!-- /TMPL_LOOP -->
-					</tr>
-				<!-- /TMPL_LOOP NAME="looprow" -->
-		</table>
-	<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-	<h1>Koha : Top List On Catalogue Issues  </h1>
-	<form method="post">
-	
-	<table>
-		<thead>
-			<tr>
-			<th>Limit to </th>
-			<th>By </th>
-			<th colspan="2">Filters</th>
-			</tr>
-		</thead>
-		<tbody>
-			<tr>
-				<td>
-					<select name="Limit">
-						<option value ="5" checked> 5</option>
-						<option value ="10">10</option>
-						<option value ="15">15</option>
-						<option value ="20">20</option>
-						<option value ="25">25</option>
-						<option value ="40">40</option>
-						<option value ="50">50</option>
-						<option value ="100">100</option>
-					</select>
-				</td>
-				<td>
-					<select name="Criteria">
-						<option value ="" checked>None</option>
-						<option value ="issuingbranch">Branch</option>
-						<option value ="categorycode">Categorycode</option>
-						<option value ="itemtype">Itemtype</option>
-						<option value ="Day">Day</option>
-						<option value ="Week">Week</option>
-						<option value ="Month">Month</option>
-						<option value ="Year">Year</option>
-					</select>
-				</td>
-			</tr>
-			
-			<tr class="hilighted">
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Issue date</td>
-				<td> From <input type="text" readonly="readonly" size="10" id="from" name="Filter" />
-							<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFrom" style="cursor: pointer;" valign="top">
-								<script language="JavaScript" type="text/javascript">
-									function validate1(date) {
-										var day = date.getDate();
-										var month = date.getMonth() + 1;
-										var year = date.getFullYear();
-										var weekDay = date.getDay();
-										var dayMonth = month + '-' + day;
-										var dateString = year + '-' + month + '-' + day;
-										var dateTo = document.getElementById('to').value.split("-");
-										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-										if (date > limitDate) {
-											return true;
-										} else {
-											return false;
-										}
-									}
-					
-									Calendar.setup(
-										{
-											inputField : "from",
-											ifFormat : "%Y-%m-%d",
-											button : "openCalendarFrom",
-											disableFunc : validate1,
-											dateStatusFunc : validate1
-										}
-									);
-								</script>
-					To <input readonly="readonly" size="10" id="to" name="Filter" value="" type="text" />
-						<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-							<script type="text/javascript">
-								function validate2(date) {
-									var day = date.getDate();
-									var month = date.getMonth() + 1;
-									var year = date.getFullYear();
-									var weekDay = date.getDay();
-									var dayMonth = month + '-' + day;
-									var dateString = year + '-' + month + '-' + day;
-									var dateFrom = document.getElementById('from').value.split("-");
-									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-									if (limitDate > date) {
-										return true;
-									} else {
-										return false;
-									}
-								}
-		
-								Calendar.setup(
-									{
-										inputField : "to",
-										ifFormat : "%Y-%m-%d",
-										button : "openCalendarTo",
-										disableFunc : validate2,
-										dateStatusFunc : validate2
-									}
-								);
-							</script>
-				</td>
-			</tr>
-			<tr>
-				<td> &nbsp;</td>
-				<td> &nbsp;</td>
-				<td>Returns</td>
-				<td > From <input type="text" readonly="readonly" size="10" id="fromRO" name="Filter" />
-							<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFromRO" style="cursor: pointer;" valign="top">
-								<script language="JavaScript" type="text/javascript">
-									function validate1(date) {
-										var day = date.getDate();
-										var month = date.getMonth() + 1;
-										var year = date.getFullYear();
-										var weekDay = date.getDay();
-										var dayMonth = month + '-' + day;
-										var dateString = year + '-' + month + '-' + day;
-										var dateTo = document.getElementById('toRO').value.split("-");
-										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-										if (date > limitDate) {
-											return true;
-										} else {
-											return false;
-										}
-									}
-					
-									Calendar.setup(
-										{
-											inputField : "fromRO",
-											ifFormat : "%Y-%m-%d",
-											button : "openCalendarFromRO",
-											disableFunc : validate1,
-											dateStatusFunc : validate1
-										}
-									);
-								</script>
-					To <input type="text" readonly="readonly" size="10" id="toRO" name="Filter" value="" />
-						<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarToRO" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-							<script type="text/javascript">
-								function validate2(date) {
-									var day = date.getDate();
-									var month = date.getMonth() + 1;
-									var year = date.getFullYear();
-									var weekDay = date.getDay();
-									var dayMonth = month + '-' + day;
-									var dateString = year + '-' + month + '-' + day;
-									var dateFrom = document.getElementById('fromRO').value.split("-");
-									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-									if (limitDate > date) {
-										return true;
-									} else {
-										return false;
-									}
-								}
-		
-								Calendar.setup(
-									{
-										inputField : "toRO",
-										ifFormat : "%Y-%m-%d",
-										button : "openCalendarToRO",
-										disableFunc : validate2,
-										dateStatusFunc : validate2
-									}
-								);
-							</script>
-				</td>
-			</tr>
-			<tr class="hilighted">
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Branch</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-			<tr>
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Document Type</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-			<tr class="hilighted">
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Borrower Category</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-			<tr>
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Day</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-			<tr class="hilighted">
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Month</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-			<tr>
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Year</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-		</tbody>
-	</table>
-	
-	
-		<h3> Output </h3>
-		<input type="radio" checked name="output" value="screen" /> To screen into the browser
-		
-		<input type="radio" name="output" value="file" /> To file <input type="text" name="basename" value="Export" /> into an application  
-		<!-- TMPL_VAR NAME="CGIextChoice" -->
-		<!-- TMPL_VAR NAME="CGIsepChoice" -->
-	</p>
-	
-	<p>
-	<input type="submit" value="OK" />
-	<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
-	<input type="hidden" name="do_it" value="1" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/catalogue_out.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/catalogue_out.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/catalogue_out.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/catalogue_out.tmpl	22 Jul 2005 16:39:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,106 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-
-<!-- TMPL_IF NAME="do_it" -->
-	<!-- TMPL_LOOP NAME="mainloop" -->
-		<h1>Koha : Items with no Issues </h1>
-		<!-- TMPL_IF NAME="loopfilter"-->
-			<p>Filtered on</p>
-			<!-- TMPL_LOOP NAME="loopfilter" -->
-					<p><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --><!-- TMPL_VAR NAME="crit"--> =<!-- TMPL_VAR NAME="filter"--><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --></p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_IF NAME="loopfilter"-->
-		
-		<table>
-			<tr >
-				<th>Num/Items</th>
-				<!-- TMPL_LOOP NAME="loopcol" -->
-					<th><!-- TMPL_VAR NAME="coltitle" --></th>
-				<!-- /TMPL_LOOP -->
-			</tr>
-				<!-- TMPL_LOOP NAME="looprow" -->
-					<tr>
-						<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-						<!-- TMPL_VAR NAME="rowtitle" --></td>
-						<!-- TMPL_LOOP NAME="loopcell" -->
-							<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td ><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
-							</td>
-						<!-- /TMPL_LOOP -->
-					</tr>
-				<!-- /TMPL_LOOP NAME="looprow" -->
-		</table>
-	<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-	<h1>Koha : Items with no Issues </h1>
-	<form method="post">
-	
-	<table>
-		<thead>
-			<tr>
-			<th>Limit to </th>
-			<th>By </th>
-			<th colspan="2">Filters</th>
-			</tr>
-		</thead>
-		<tbody>
-			<tr>
-				<td>
-					<select name="Limit">
-						<option value ="" checked>None</option>
-						<option value ="5"> 5</option>
-						<option value ="10">10</option>
-						<option value ="15">15</option>
-						<option value ="20">20</option>
-						<option value ="25">25</option>
-						<option value ="40">40</option>
-						<option value ="50">50</option>
-						<option value ="100">100</option>
-					</select>
-				</td>
-				<td>
-					<select name="Criteria">
-						<option value ="" checked>None</option>
-						<option value ="homebranch">Branch</option>
-						<option value ="itemtype">Itemtype</option>
-					</select>
-				</td>
-			</tr>
-			<tr class="hilighted">
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Branch</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-			<tr>
-				<td>&nbsp;</td>
-				<td>&nbsp;</td>
-				<td>Document Type</td>
-				<td><input type="text" name="Filter" value="" /></td>
-			</tr>
-		</tbody>
-	</table>
-	
-	
-		<h3> Output </h3>
-		<input type="radio" checked name="output" value="screen" /> To screen into the browser
-		
-		<input type="radio" name="output" value="file"> To file <input type="text" name="basename" value="Export" /> into an application  
-		<!-- TMPL_VAR NAME="CGIextChoice" -->
-		<!-- TMPL_VAR NAME="CGIsepChoice" -->
-	
-	<p>
-	<input type="submit" value="OK" />
-	<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
-	<input type="hidden" name="do_it" value="1" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="reports-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/catalogue_stats.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/catalogue_stats.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/catalogue_stats.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/catalogue_stats.tmpl	22 Jul 2005 16:39:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,190 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-
-<!-- TMPL_IF NAME="do_it" -->
-	<!-- TMPL_LOOP NAME="mainloop" -->
-		<h1>Koha : Catalogue statistics </h1>
-		<!-- TMPL_IF NAME="loopfilter"-->
-			<p>Filtered on</p>
-			<!-- TMPL_LOOP NAME="loopfilter" -->
-					<p><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --> <!-- TMPL_VAR NAME="crit"--> =<!-- TMPL_VAR NAME="filter"--><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --></p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_IF NAME="loopfilter"-->
-		
-		<table>
-			<tr >
-				<th><!-- TMPL_VAR name="line" --> / <!-- TMPL_VAR name="column" --></th>
-				<!-- TMPL_LOOP NAME="loopcol" -->
-					<th><!-- TMPL_VAR NAME="coltitle" --></th>
-				<!-- /TMPL_LOOP -->
-				<th>TOTAL</th>
-			</tr>
-				<!-- TMPL_LOOP NAME="looprow" -->
-					<tr>
-						<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-						<!-- TMPL_VAR NAME="rowtitle" --></td>
-						<!-- TMPL_LOOP NAME="loopcell" -->
-							<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-								<!--TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" -->
-								<!--TMPL_ELSE-->&nbsp;
-								<!--/TMPL_IF-->
-							</td>
-						<!-- /TMPL_LOOP -->
-						<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-							<!-- TMPL_VAR NAME="totalrow" -->
-						</td>
-					</tr>
-				<!-- /TMPL_LOOP NAME="looprow" -->
-				<tr >
-					<th>TOTAL</th>
-					<!-- TMPL_LOOP NAME="loopfooter" -->
-						<th>
-							<!-- TMPL_VAR NAME="totalcol" -->
-						</th>
-					<!-- /TMPL_LOOP -->
-					<th><!-- TMPL_VAR NAME="total" --></th>
-				</tr>
-		</table>
-	<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-	<h1>Koha : Catalogue statistics</h1>
-	<form method="post">
-	<table>
-		<thead>
-			<tr>
-			<th><div>Title</th>
-			<th>Row</th>
-			<th>Column</th>
-			<th>Filter</th>
-			</tr>
-		</thead>
-		<tbody>
-			<!-- TMPL_IF Name="hasdewey" -->
-				<tr class="hilighted">
-					<td>Dewey Classification</td>
-					<td><input type="radio" name="Line" value="dewey" /></td>
-					<td><input type="radio" name="Column" value="dewey" /></td>
-					<td > From <input type="text" name="Filter" /> To <input type="text" name="Filter" /></td>
-				</tr>
-				<tr class="hilighted">
-					<td>&nbsp;</td>
-					<td colspan="2"><select name="deweydigits">
-						<option value=""> </option>
-						<option value ="1">1</option>
-						<option value ="2">2</option>
-						<option value ="3">3</option>
-						<option value ="4">4</option>
-						<option value ="5">5</option>
-						</select>
-						digits 
-					</td>
-					<td>&nbsp;</td>
-				</tr>
-				<!-- TMPL_ELSE -->
-				<tr><input type="hidden" name="Filter" > <input type="hidden" name="Filter" /></tr>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF Name="haslccn" -->
-				<!--TMPL_IF Name="hlghtlccn"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
-					<td>LoC Classification</td>
-					<td><input type="radio" name="Line" value="lccn" /></td>
-					<td><input type="radio" name="Column" value="lccn" /></td>
-					<td > From <input type="text" name="Filter" > To <input type="text" name="Filter" /></td>
-				</tr>
-				<!--TMPL_IF Name="hlghtlccn"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
-					<td>&nbsp;</td>
-					<td colspan="2"><select name="lccndigits">
-						<option value=""> </option>
-						<option value ="1">1</option>
-						<option value ="2">2</option>
-						<option value ="3">3</option>
-						<option value ="4">4</option>
-						<option value ="5">5</option>
-						</select>
-						characters
-					</td>
-					<td>&nbsp;</td>
-				</tr>
-				<!-- TMPL_ELSE -->
-				<tr><input type="hidden" name="Filter" > <input type="hidden" name="Filter" /></tr>
-			<!-- /TMPL_IF  -->
-			<!-- TMPL_IF Name="hascote" -->
-				<!--TMPL_IF Name="hlghtcote"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
-					<td>Callnumber</td>
-					<td><input type="radio" name="Line" value="items.itemcallnumber" /></td>
-					<td><input type="radio" name="Column" value="items.itemcallnumber" /></td>
-					<td>From <input type="text" name="Filter" > To <input type="text" name="Filter" /></td>
-				</tr>
-				<!--TMPL_IF Name="hlghtcote"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
-					<td>&nbsp;</td>
-					<td colspan="2"><select name="cotedigits">
-						<option value=""> </option>
-						<option value ="1">1</option>
-						<option value ="2">2</option>
-						<option value ="3">3</option>
-						<option value ="4">4</option>
-						<option value ="5">5</option>
-						</select>
-						characters 
-					</td>
-					<td>&nbsp;</td>
-				</tr>
-				<!-- TMPL_ELSE -->
-				<tr><input type="hidden" name="Filter" > <input type="hidden" name="Filter" /></tr>
-			<!-- /TMPL_IF -->
-			<!--TMPL_IF Name="hglghtDT"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
-				<td>Document Type</td>
-				<td><input type="radio" name="Line" value="itemtype" /></td>
-				<td><input type="radio" name="Column" value="itemtype" /></td>
-				<td ><!-- TMPL_VAR NAME="CGIItemType" --></td>
-			</tr>
-			<!--TMPL_IF Name="hglghtPub"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
-				<td>Publisher</td>
-				<td><input type="radio" name="Line" value="publishercode" /></td>
-				<td><input type="radio" name="Column" value="publishercode" /></td>
-				<td><input type="text" name="Filter" /></td>
-			</tr>
-			<!--TMPL_IF Name="hglghtPY"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
-				<td>Publication Year</td>
-				<td><input type="radio" name="Line" value="publicationyear" /></td>
-				<td><input type="radio" name="Column" value="publicationyear" /></td>
-				<td>From <input type="text" name="Filter" /> To <input type="text" name="Filter" /></td>
-			</tr>
-			<!--TMPL_IF Name="hglghtHB"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
-				<td>Home Branch</td>
-				<td><input type="radio" name="Line" value="items.homebranch" /></td>
-				<td><input type="radio" name="Column" value="items.homebranch" /></td>
-				<td><!-- TMPL_VAR NAME="CGIBranch" --></td>
-			</tr>
-			<!--TMPL_IF Name="hglghtLOC"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
-				<td>Location</td>
-				<td><input type="radio" name="Line" value="items.location" /></td>
-				<td><input type="radio" name="Column" value="items.location" /></td>
-				<td><!-- TMPL_VAR NAME="CGILocation" --> </td>
-			</tr>
-		</tbody>
-	</table>
-	
-	
-		<h3> Output </h3>
-		<input type="radio" checked name="output" value="screen" /> To screen into the browser
-		
-		<input type="radio" name="output" value="file" /> To file <input type="text" name="basename" value="Export" /> into an application  
-		<!-- TMPL_VAR NAME="CGIextChoice" -->
-		<!-- TMPL_VAR NAME="CGIsepChoice" -->
-	</p>
-	
-	<p>
-	<input type="submit" value="OK" />
-	<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
-	<input type="hidden" name="do_it" value="1" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/inventory.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/inventory.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/inventory.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/inventory.tmpl	22 Jul 2005 16:39:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,92 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-	<h1>Inventory/Stocktaking</h1>
-	<form method="post">
-		<h2>Select items you want to check</h2>
-		<p>
-			Item Location (items.itemcallnumber) between 
-				<input type="text" name="minlocation" value="<!-- TMPL_VAR NAME="minlocation" -->" /> 
-			and 
-				<input type="text" name="maxlocation" value="<!-- TMPL_VAR NAME="maxlocation" -->" />
-		</p>
-		<p>not seen since
-			<input type="text" name="datelastseen" value="<!-- TMPL_VAR NAME="datelastseen" -->" />
-		</p>
-		<p>show</label>
-			<input type="text" name="pagesize" value="<!-- TMPL_VAR NAME="pagesize" -->" maxlength="5" size="5" />
-			 items beginning at offset
-			<input type="text" name="offset" value="<!-- TMPL_VAR NAME="offset" -->" size="5" maxlength="5" />
-		</p>
-		<p>
-			<input type="submit" value="OK" />
-		</p>
-	</form>
-	
-	<form method="post">
-	<input type="hidden" name="markseen" value="1" />
-	<input type="hidden" name="minlocation" value="<!-- TMPL_VAR NAME="minlocation" -->" />
-	<input type="hidden" name="maxlocation" value="<!-- TMPL_VAR NAME="maxlocation" -->" />
-	<input type="hidden" name="datelastseen" value="<!-- TMPL_VAR NAME="datelastseen" -->" />
-	<input type="hidden" name="pagesize" value="<!-- TMPL_VAR NAME="pagesize" -->" />
-	<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="offset" -->" />
-	<!-- TMPL_IF NAME="loop" -->
-	<table>
-		<tr>
-			<th>Seen</th>
-			<th>Barcode</th>
-			<th>Call number</th>
-			<th>Title</th>
-			<th>Author</th>
-		</tr>
-	<!-- TMPL_LOOP NAME="loop" -->
-		<tr>
-			<td>
-				<input type="checkbox" name="SEEN-<!-- TMPL_VAR NAME="itemnumber" -->" value="1" />
-			</td>
-			<td>
-				<!-- TMPL_VAR NAME="barcode" -->
-			</td>
-			<td>
-				<!-- TMPL_VAR NAME="itemcallnumber" -->
-			</td>
-			<td>
-				<!-- TMPL_VAR NAME="title" -->
-			</td>
-			<td>
-				<!-- TMPL_VAR NAME="author" -->
-			</td>
-		</tr>
-	<!-- /TMPL_LOOP -->
-	</table>
-	<input type="submit" value="Mark seen" />
-	</form>
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="offset" -->
-	<form method="post">
-		<input type="hidden" name="minlocation" value="<!-- TMPL_VAR NAME="minlocation" -->" />
-		<input type="hidden" name="maxlocation" value="<!-- TMPL_VAR NAME="maxlocation" -->" />
-		<input type="hidden" name="datelastseen" value="<!-- TMPL_VAR NAME="datelastseen" -->" />
-		<input type="hidden" name="pagesize" value="<!-- TMPL_VAR NAME="pagesize" -->" />
-		<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="prevoffset" -->" />
-		<input type="submit" value="&lt;&lt;&lt;" />
-	</form>
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="nextoffset" -->
-	<form method="post">
-		<input type="hidden" name="minlocation" value="<!-- TMPL_VAR NAME="minlocation" -->" />
-		<input type="hidden" name="maxlocation" value="<!-- TMPL_VAR NAME="maxlocation" -->" />
-		<input type="hidden" name="datelastseen" value="<!-- TMPL_VAR NAME="datelastseen" -->" />
-		<input type="hidden" name="pagesize" value="<!-- TMPL_VAR NAME="pagesize" -->" />
-		<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextoffset" -->" />
-		<input type="submit" value="&gt;&gt;&gt;" />
-	</form>
-	<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/issues_avg_stats.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/issues_avg_stats.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/issues_avg_stats.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/issues_avg_stats.tmpl	22 Jul 2005 16:39:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,282 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-
-<!-- TMPL_IF NAME="do_it" -->
-	<!-- TMPL_LOOP NAME="mainloop" -->
-		<h1>Koha : Issues Average Period statistics </h1>
-		<!-- TMPL_IF NAME="loopfilter"-->
-			<p>Filtered on</p>
-			<!-- TMPL_LOOP NAME="loopfilter" -->
-					<p><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --> <!-- TMPL_VAR NAME="crit"--> =<!-- TMPL_VAR NAME="filter"--><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --></p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_IF NAME="loopfilter"-->
-		
-		<table>
-			<tr >
-				<th><!-- TMPL_VAR name="line" --> / <!-- TMPL_VAR name="column" --></th>
-				<!-- TMPL_LOOP NAME="loopcol" -->
-					<th><!-- TMPL_VAR NAME="coltitle" --></th>
-				<!-- /TMPL_LOOP -->
-				<th>TOTAL</th>
-			</tr>
-				<!-- TMPL_LOOP NAME="looprow" -->
-					<tr>
-						<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-						<!-- TMPL_VAR NAME="rowtitle" --></td>
-						<!-- TMPL_LOOP NAME="loopcell" -->
-							<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
-							</td>
-						<!-- /TMPL_LOOP -->
-						<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-							<!-- TMPL_VAR NAME="totalrow" -->
-						</td>
-					</tr>
-				<!-- /TMPL_LOOP NAME="looprow" -->
-				<tr >
-					<th>TOTAL</th>
-					<!-- TMPL_LOOP NAME="loopfooter" -->
-						<th>
-							<!-- TMPL_VAR NAME="totalcol" -->
-						</th>
-					<!-- /TMPL_LOOP -->
-					<th><!-- TMPL_VAR NAME="total" --></th>
-				</tr>
-		</table>
-	<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-	<h1>Koha : Issues Average Period statistics </h1>
-	<form method="post">
-	<table>
-		<thead>
-			<tr>
-			<th><div>Title</th>
-			<th>Row</th>
-			<th>Column</th>
-			<th>Filter</th>
-			</tr>
-		</thead>
-		<tbody>
-			<tr class="hilighted">
-				<td>Issue date</td>
-				<td><input type="radio" name="Line" value="timestamp" /></td>
-				<td><input type="radio" name="Column" value="timestamp" /></td>
-				<td > From <input type="text" readonly="readonly" size="10" id="from" name="Filter" />
-							<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFrom" style="cursor: pointer;" valign="top">
-								<script language="JavaScript" type="text/javascript">
-									function validate1(date) {
-										var day = date.getDate();
-										var month = date.getMonth() + 1;
-										var year = date.getFullYear();
-										var weekDay = date.getDay();
-										var dayMonth = month + '-' + day;
-										var dateString = year + '-' + month + '-' + day;
-										var dateTo = document.getElementById('to').value.split("-");
-										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-										if (date > limitDate) {
-											return true;
-										} else {
-											return false;
-										}
-									}
-					
-									Calendar.setup(
-										{
-											inputField : "from",
-											ifFormat : "%Y-%m-%d",
-											button : "openCalendarFrom",
-											disableFunc : validate1,
-											dateStatusFunc : validate1
-										}
-									);
-								</script>
-					To <input readonly="readonly" size="10" id="to" name="Filter" value="" type="text" />
-						<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-							<script type="text/javascript">
-								function validate2(date) {
-									var day = date.getDate();
-									var month = date.getMonth() + 1;
-									var year = date.getFullYear();
-									var weekDay = date.getDay();
-									var dayMonth = month + '-' + day;
-									var dateString = year + '-' + month + '-' + day;
-									var dateFrom = document.getElementById('from').value.split("-");
-									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-									if (limitDate > date) {
-										return true;
-									} else {
-										return false;
-									}
-								}
-		
-								Calendar.setup(
-									{
-										inputField : "to",
-										ifFormat : "%Y-%m-%d",
-										button : "openCalendarTo",
-										disableFunc : validate2,
-										dateStatusFunc : validate2
-									}
-								);
-							</script>
-				</td>
-			</tr>
-			<tr class="hilighted"> 
-				<td>&nbsp;</td>
-				<td colspan="2">by <select name="IssueDisplay">
-					<option value=""> </option>
-					<option value ="1">Day</option>
-					<option value ="2">Month</option>
-					<option value ="3">Year</option>
-					</select>
-					
-				</td>
-				<td><!--Preparing Month and Day Selection--><input type="hidden" name="Filter" value="" /><input type="hidden" name="Filter" value="" /></td>
-			</tr>
-			<tr>
-				<td>Returns</td>
-				<td><input type="radio" name="Line" value="returndate" /></td>
-				<td><input type="radio" name="Column" value="returndate" /></td>
-				<td > From <input type="text" readonly="readonly" size="10" id="fromRO" name="Filter" />
-							<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFromRO" style="cursor: pointer;" valign="top">
-								<script language="JavaScript" type="text/javascript">
-									function validate1(date) {
-										var day = date.getDate();
-										var month = date.getMonth() + 1;
-										var year = date.getFullYear();
-										var weekDay = date.getDay();
-										var dayMonth = month + '-' + day;
-										var dateString = year + '-' + month + '-' + day;
-										var dateTo = document.getElementById('toRO').value.split("-");
-										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-										if (date > limitDate) {
-											return true;
-										} else {
-											return false;
-										}
-									}
-					
-									Calendar.setup(
-										{
-											inputField : "fromRO",
-											ifFormat : "%Y-%m-%d",
-											button : "openCalendarFromRO",
-											disableFunc : validate1,
-											dateStatusFunc : validate1
-										}
-									);
-								</script>
-					To <input type="text" readonly="readonly" size="10" id="toRO" name="Filter" value="" />
-						<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarToRO" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-							<script type="text/javascript">
-								function validate2(date) {
-									var day = date.getDate();
-									var month = date.getMonth() + 1;
-									var year = date.getFullYear();
-									var weekDay = date.getDay();
-									var dayMonth = month + '-' + day;
-									var dateString = year + '-' + month + '-' + day;
-									var dateFrom = document.getElementById('fromRO').value.split("-");
-									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-									if (limitDate > date) {
-										return true;
-									} else {
-										return false;
-									}
-								}
-		
-								Calendar.setup(
-									{
-										inputField : "toRO",
-										ifFormat : "%Y-%m-%d",
-										button : "openCalendarToRO",
-										disableFunc : validate2,
-										dateStatusFunc : validate2
-									}
-								);
-							</script>
-				</td>
-			</tr>
-			<tr> 
-				<td>&nbsp;</td>
-				<td colspan="2">by <select name="ReturnDisplay">
-					<option value=""> </option>
-					<option value ="1">Day</option>
-					<option value ="2">Month</option>
-					<option value ="3">Year</option>
-					</select>
-					
-				</td>
-				<td><input type="hidden" name="Filter" value=""><input type="hidden" name="Filter" value="" /></td>
-			</tr>
-			<tr class="hilighted">
-				<td>Borrower Category</td>
-				<td><input type="radio" name="Line" value="borrowers.categorycode" /></td>
-				<td><input type="radio" name="Column" value="borrowers.categorycode" /></td>
-				<td><!-- TMPL_VAR NAME="CGIBorCat" --></td>
-			</tr>
-			<tr>
-				<td>Document Type</td>
-				<td><input type="radio" name="Line" value="itemtype" /></td>
-				<td><input type="radio" name="Column" value="itemtype" /></td>
-				<td ><!-- TMPL_VAR NAME="CGIItemType" --></td>
-			</tr>
-			<tr class="hilighted">
-				<td>Branch</td>
-				<td><input type="radio" name="Line" value="branchcode" /></td>
-				<td><input type="radio" name="Column" value="branchcode" /></td>
-				<td><!-- TMPL_VAR NAME="CGIBranch" --></td>
-			</tr>
-<!-- Modified according to statistics table
-			<tr>
-				<td>Issuing Branch</td>
-				<td><input type="radio" name="Line" value="issuingbranch"></td>
-				<td><input type="radio" name="Column" value="issuingbranch"></td>
-				<td ><! TMPL_VAR NAME="CGIBranch" ></td>
-			</tr> -->
-			<input type="hidden" name="Filter" value="" />
-<!--End Modified -->
-			<!-- TMPL_IF Name="hassort1" -->
-				<tr class="hilighted"> 
-					<td>Sort1</td>
-					<td><input type="radio" name="Line" value="borrowers.sort1" /></td>
-					<td><input type="radio" name="Column" value="borrowers.sort1" /></td>
-					<td><!-- TMPL_VAR NAME="CGISort1" --> </td>
-				</tr>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF Name="hassort2" -->
-				<!-- TMPL_IF Name="HglghtSort2"--><tr class="hilighted"> <!-- TMPL_ELSE --><tr><!--/TMPL_IF --> 
-					<td>Sort2</td>
-					<td><input type="radio" name="Line" value="borrowers.sort2" /></td>
-					<td><input type="radio" name="Column" value="borrowers.sort2" /></td>
-					<td><!-- TMPL_VAR NAME="CGISort2" --> </td>
-				</tr>
-			<!-- /TMPL_IF -->
-			<tr></tr>
-		</tbody>
-	</table>
-	
-	
-		<h3> Output </h3>
-		<input type="radio" checked name="output" value="screen" /> To screen into the browser
-		
-		<input type="radio" name="output" value="file" /> To file <input type="text" name="basename" value="Export" /> into an application  
-		<!-- TMPL_VAR NAME="CGIextChoice" -->
-		<!-- TMPL_VAR NAME="CGIsepChoice" -->
-	</p>
-	
-	<p>
-	<input type="submit" value="OK" />
-	<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
-	<input type="hidden" name="do_it" value="1" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/issues_by_borrower_category.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/issues_by_borrower_category.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/issues_by_borrower_category.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/issues_by_borrower_category.tmpl	22 Jul 2005 16:39:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,57 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-<!-- TMPL_IF NAME="do_it" -->
-<!-- TMPL_LOOP NAME="mainloop" -->
-	<h1>Koha : Issues by borrower category <!--TMPL_IF NAME="borrower_category" --> for category = <!-- TMPL_VAR NAME="borrower_category" --><!-- /TMPL_IF --></h1>
-	<table>
-		<tr>
-			<th>&nbsp;</th>
-			<!-- TMPL_LOOP NAME="categorycodeloop" -->
-				<th><!-- TMPL_VAR NAME="categorycode" --></th>
-			<!-- /TMPL_LOOP -->
-			<th>TOTAL</th>
-		</tr>
-			<!-- TMPL_LOOP NAME="loopborrowertype" -->
-				<tr>
-					<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-					<!-- TMPL_VAR NAME="itemtype" --></td>
-					<!-- TMPL_LOOP NAME="loopitemtype" -->
-						<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-							<!-- TMPL_VAR NAME="issues" -->
-						</td>
-					<!-- /TMPL_LOOP -->
-					<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-						<!-- TMPL_VAR NAME="totalitemtype" -->
-					</td>
-				</tr>
-			<!-- /TMPL_LOOP NAME="loopitemtype" -->
-			<tr>
-				<th>TOTAL</th>
-				<!-- TMPL_LOOP NAME="loopborrowertotal" -->
-					<th>
-						<!-- TMPL_VAR NAME="issues" -->
-					</th>
-				<!-- /TMPL_LOOP -->
-				<th><!-- TMPL_VAR NAME="grantotal" --></th>
-			</tr>
-	</table>
-<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-	<h1>Issues by borrower category</h1>
-	<form method="post">
-		<p>Select a borrower category (or don't if you want to see global status) <input type="text" name="value" /></p>
-		<p>Select a branch : <!-- TMPL_VAR NAME="CGIbranch" --></p>
-		<input type="submit" value="OK" />
-		<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
-		<input type="hidden" name="do_it" value="1" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="reports-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/issues_stats.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/issues_stats.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/issues_stats.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/issues_stats.tmpl	22 Jul 2005 16:39:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,233 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-
-<!-- TMPL_IF NAME="do_it" -->
-	<!-- TMPL_LOOP NAME="mainloop" -->
-		<h1>Koha : Issues statistics </h1>
-		<!-- TMPL_IF NAME="loopfilter"-->
-			<p>Filtered on</p>
-			<!-- TMPL_LOOP NAME="loopfilter" -->
-					<p><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --> <!-- TMPL_VAR NAME="crit"--> =<!-- TMPL_VAR NAME="filter"--><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --></p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_IF NAME="loopfilter"-->
-		
-		<table> 
-			<tr >
-				<th><!-- TMPL_VAR name="line" --> / <!-- TMPL_VAR name="column" --></th>
-				<!-- TMPL_LOOP NAME="loopcol" -->
-					<th><!-- TMPL_VAR NAME="coltitle" --></th>
-				<!-- /TMPL_LOOP -->
-				<th>TOTAL</th>
-			</tr>
-				<!-- TMPL_LOOP NAME="looprow" -->
-					<tr>
-						<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-						<!-- TMPL_VAR NAME="rowtitle" --></td>
-						<!-- TMPL_LOOP NAME="loopcell" -->
-							<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-								<!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" -->
-								<!-- TMPL_ELSE --> &nbsp;
-								<!-- /TMPL_IF -->
-							</td>
-						<!-- /TMPL_LOOP -->
-						<!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
-							<!-- TMPL_VAR NAME="totalrow" -->
-						</td>
-					</tr>
-				<!-- /TMPL_LOOP NAME="looprow" -->
-				<tr >
-					<th>TOTAL</th>
-					<!-- TMPL_LOOP NAME="loopfooter" -->
-						<th>
-							<!-- TMPL_VAR NAME="totalcol" -->
-						</th>
-					<!-- /TMPL_LOOP -->
-					<th><!-- TMPL_VAR NAME="total" --></th>
-				</tr>
-		</table>
-	<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-	<h1>Koha : Issues statistics </h1>
-	<form method="post">
-	<table>
-		<thead>
-			<tr>
-			<th><div>Title</th>
-			<th>Row</th>
-			<th>Column</th>
-			<th>Filter</th>
-			</tr>
-		</thead>
-		<tbody>
-			<tr class="hilighted">
-				<td>Period</td>
-				<td><input type="radio" name="Line" value="datetime" /></td>
-				<td><input type="radio" name="Column" value="datetime" /></td>
-				<td > From <input type="text" readonly="readonly" size="10" id="from" name="Filter" />
-							<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFrom" style="cursor: pointer;" valign="top">
-								<script language="JavaScript" type="text/javascript">
-									function validate1(date) {
-										var day = date.getDate();
-										var month = date.getMonth() + 1;
-										var year = date.getFullYear();
-										var weekDay = date.getDay();
-										var dayMonth = month + '-' + day;
-										var dateString = year + '-' + month + '-' + day;
-										var dateTo = document.getElementById('to').value.split("-");
-										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
-										if (date > limitDate) {
-											return true;
-										} else {
-											return false;
-										}
-									}
-					
-									Calendar.setup(
-										{
-											inputField : "from",
-											ifFormat : "%Y-%m-%d",
-											button : "openCalendarFrom",
-											disableFunc : validate1,
-											dateStatusFunc : validate1
-										}
-									);
-								</script>
-					To <input readonly="readonly" size="10" id="to" name="Filter" value="" type="text" />
-						<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
-							<script type="text/javascript">
-								function validate2(date) {
-									var day = date.getDate();
-									var month = date.getMonth() + 1;
-									var year = date.getFullYear();
-									var weekDay = date.getDay();
-									var dayMonth = month + '-' + day;
-									var dateString = year + '-' + month + '-' + day;
-									var dateFrom = document.getElementById('from').value.split("-");
-									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
-									if (limitDate > date) {
-										return true;
-									} else {
-										return false;
-									}
-								}
-		
-								Calendar.setup(
-									{
-										inputField : "to",
-										ifFormat : "%Y-%m-%d",
-										button : "openCalendarTo",
-										disableFunc : validate2,
-										dateStatusFunc : validate2
-									}
-								);
-							</script>
-				</td>
-			</tr>
-			<tr class="hilighted"> 
-				<td>Type :<select name="PeriodTypeSel">
-					<option value ="issue">Issue</option>
-					<option value ="return">Return</option>
-					</select></td>
-				<td colspan="2">group by <select name="DisplayBy">
-					<option value="">None</option>
-					<option value ="1">Day of week</option>
-					<option value ="2">Month</option>
-					<option value ="3">Year</option>
-					</select>
-					
-				</td>
-				<td>
-					Select Day : <select name="PeriodDaySel">
-					<option value =""></option>
-					<option value ="Monday">Monday</option>
-					<option value ="Tuesday">Tuesday</option>
-					<option value ="Wednesday">Wednesday</option>
-					<option value ="Thursday">Thursday</option>
-					<option value ="Friday">Friday</option>
-					<option value ="Saturday">Saturday</option>
-					<option value ="Sunday">Sunday</option>
-					</select>
-					Select Month : <select name="PeriodMonthSel">
-					<option value =""></option>
-					<option value ="January">January</option>
-					<option value ="February">February</option>
-					<option value ="March">March</option>
-					<option value ="April">April</option>
-					<option value ="May">May</option>
-					<option value ="June">June</option>
-					<option value ="July">July</option>
-					<option value ="August">August</option>
-					<option value ="September">September</option>
-					<option value ="October">October</option>
-					<option value ="November">November</option>
-					<option value ="December">December</option>
-					</select>
-				</td>
-			</tr>
-			<tr >
-				<td>Borrower Category</td>
-				<td><input type="radio" name="Line" value="borrowers.categorycode" /></td>
-				<td><input type="radio" name="Column" value="borrowers.categorycode" /></td>
-				<td><!-- TMPL_VAR NAME="CGIBorCat" --></td>
-			</tr>
-			<tr class="hilighted">
-				<td>Document Type</td>
-				<td><input type="radio" name="Line" value="itemtype" /></td>
-				<td><input type="radio" name="Column" value="itemtype" /></td>
-				<td ><!-- TMPL_VAR NAME="CGIItemType" --></td>
-			</tr>
-			<tr>
-				<td>Branch</td>
-				<td><input type="radio" name="Line" value="branch" /></td>
-				<td><input type="radio" name="Column" value="branch" /></td>
-				<td><!-- TMPL_VAR NAME="CGIBranch" --></td>
-			</tr>
-			<!-- TMPL_IF Name="hassort1" -->
-				<tr class="hilighted"> 
-					<td>Sort1</td>
-					<td><input type="radio" name="Line" value="borrowers.sort1" /></td>
-					<td><input type="radio" name="Column" value="borrowers.sort1" /></td>
-					<td><!-- TMPL_VAR NAME="CGISort1" --> </td>
-				</tr>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF Name="hassort2" -->
-				<!-- TMPL_IF Name="HglghtSort2"--><tr class="hilighted"> <!-- TMPL_ELSE --><tr><!--/TMPL_IF --> 
-					<td>Sort2</td>
-					<td><input type="radio" name="Line" value="borrowers.sort2" /></td>
-					<td><input type="radio" name="Column" value="borrowers.sort2" /></td>
-					<td><!-- TMPL_VAR NAME="CGISort2" --> </td>
-				</tr>
-			<!-- /TMPL_IF -->
-			<tr></tr>
-		</tbody>
-	</table>
-	
-	
-		<h3> Cell value </h3>
-			<p><input type="radio" name="Cellvalue" value="1" checked="checked" /> Count issues </p>
-			<p><input type="radio" name="Cellvalue" value="3" /> Circulation rate </p>
-	
-	
-		<h3> Output </h3>
-		<input type="radio" checked name="output" value="screen" /> To screen into the browser
-		
-		<input type="radio" name="output" value="file"> To file <input type="text" name="basename" value="Export" /> into an application  
-		<!-- TMPL_VAR NAME="CGIextChoice" -->
-		<!-- TMPL_VAR NAME="CGIsepChoice" -->
-	</p>
-	
-	<p>
-	<input type="submit" value="OK" />
-	<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
-	<input type="hidden" name="do_it" value="1" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/itemtypes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/itemtypes.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/itemtypes.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/itemtypes.tmpl	22 Jul 2005 16:39:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,39 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-
-<!-- TMPL_IF NAME="do_it" -->
-<!-- TMPL_LOOP NAME="mainloop" -->
-	<h1>Koha : Reports on itemtypes <!--TMPL_IF NAME="branch" --> for branch = <!-- TMPL_VAR NAME="branch" --><!-- /TMPL_IF --></h1>
-	<table>
-		<tr>
-			<th>Item type</th>
-			<th>count</th>
-		</tr>
-			<!-- TMPL_LOOP NAME="loopitemtype" -->
-				<tr>
-					<td><!-- TMPL_VAR NAME="itemtype" --></td>
-					<td><!-- TMPL_VAR NAME="count" --></td>
-				</tr>
-			<!-- /TMPL_LOOP NAME="loopitemtype" -->
-			<tr>
-				<th>TOTAL</th>
-				<th><!-- TMPL_VAR NAME="total" --></th>
-	</table>
-<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-	<h1>View catalogue group by itemtypes</h1>
-	<form method="post">
-		Select a branch (or don't if you want the report for all branches) <!-- TMPL_VAR NAME="CGIbranch" -->
-		<input type="submit" value="OK" />
-		<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
-		<input type="hidden" name="do_it" value="1" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reports/reports-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reports/reports-home.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reports/reports-home.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reports/reports-home.tmpl	7 Jul 2006 08:56:05 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,52 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Reports --<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc"-->
-<!-- Additions to enable Calendar system -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-<!-- End of additions --><!-- Additions to enable Calendar system -->
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- End of additions -->
-<!-- ------------------------MAIN BODY OF PAGE------------------------ -->
-
-<h1>Reports</h1>
-
-	<h2>Stat wizards</h2>
-	<ul>
-		<li><a href="/cgi-bin/koha/reports/acquisitions_stats.pl">Acquisitions</a></li>
-		<li><a href="/cgi-bin/koha/reports/borrowers_stats.pl">Borrowers</a></li>
-		<li><a href="/cgi-bin/koha/reports/catalogue_stats.pl">Catalogue</a></li>
-		<li><a href="/cgi-bin/koha/reports/issues_stats.pl">Circulation</a></li>
-	</ul>
-
-
-	<h2>Top Lists</h2>
-	<ul>
-		<li><a href="/cgi-bin/koha/reports/bor_issues_top.pl">Most issuing Borrowers</a></li>
-		<li><a href="/cgi-bin/koha/reports/cat_issues_top.pl">Most issued items</a></li>
-	</ul>
-	<h2>Outsiders</h2>
-	<ul>
-		<li><a href="/cgi-bin/koha/reports/borrowers_out.pl">Borrowers without issues</a></li>
-		<li><a href="/cgi-bin/koha/reports/catalogue_out.pl">Items not issued</a></li>
-	</ul>
-
-
-	<h2>Other stats</h2>
-	<p>on catalogue</p>
-	<ul>
-		<li><a href="/cgi-bin/koha/reports/inventory.pl">Inventory/Stocktaking</a></li>
-		<li><a href="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">Catalogue by itemtype</a></li>
-	</ul>
-	<p>on issues</p>
-	<ul>
-		<li><a href="/cgi-bin/koha/reports/stats.pl?time=yesterday">Till Reconciliation:</a> Daily Report (yesterday)</li>
-		<li><a href="/cgi-bin/koha/reports/stats.pl?time=today">Till Reconciliation:</a> Daily Report (today)</li>
-		<li><a href="/cgi-bin/koha/reports/overdue.pl">Overdue items</a></li>
-		<li><a href="/cgi-bin/koha/reports/manager.pl?report_name=issues_by_borrower_category">Issues by borrower category</a></li>
-		<li><a href="/cgi-bin/koha/reports/issues_avg_stats.pl">Average loan time</a></li>
-	</ul>
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/reserve/request.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reserve/request.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reserve/request.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reserve/request.tmpl	31 May 2006 14:07:26 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,354 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-Koha -- Circulation
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-
-<script language="JavaScript">
-function check() {
-	var msg = "";
-	var count_reserv = 0;
-	var alreadyreserved = 0;
-
-// check if we have checkitem form
-if (document.form.checkitem){
-	for (i=0;i<document.form.checkitem.length;i++){
-		if (document.form.checkitem[i].checked == true) {
-				count_reserv++ ;
-			}
-	}
-	// for only one item, check the checkitem without consider the loop checkitem
-	if (i==0){
-		if (document.form.checkitem.checked == true) {
-			count_reserv++;
-		}
-	}
-}
-
-if (document.form.request.checked == true){
-		count_reserv++ ;
-}
-
-if (document.form.alreadyreserved.value == "1"){
-		 alreadyreserved++ ;
-}
-
-if (count_reserv == "0"){
-		msg += _("- Please select a document to reserve\n");
-}
-if (count_reserv >= "2"){
-		msg += _("- You can select only one type of document\n by item, or by the first item returned\n");
-}
-
-if (alreadyreserved > "0"){
-		msg += _("- This borrower had already reserved this document\n Please cancel the previous reserve first \n");
-}
-
-	if (msg == "") return(true);
-	else	{
-		alert(msg);
-		return(false);
-	}
-}
-</script>
-
-
-<h1>Request for reserve</h1>
-
-<fieldset>
-  <legend>Biblio informations</legend>
-  <ul>
-    <li>Title: <a href="/cgi-bin/koha/detail.pl?bib=<!-- TMPL_VAR NAME="bib" -->"><!-- TMPL_VAR NAME="title" --></a></li>
-    <li>Author: <!-- TMPL_VAR NAME="author" --></li>
-  </ul>
-</fieldset>
-
-<!-- TMPL_UNLESS NAME="cardnumber"-->
-<form action="request.pl?bib=<!-- TMPL_VAR NAME="bib" -->" method="post" onSubmit="request.pl" name="getborrower">
-  <fieldset>
-    <legend>Member search</legend>
-  <!-- TMPL_UNLESS name="CGIselectborrower" -->
-    <table>
-      <tr>
-        <th>Member (number or name)</th>
-        <td>
-          <input type="text" size="20" name="findborrower">
-        </td>
-      </tr>
-    </table>
-
-    <div id="action">
-    <input type="hidden" name="bib" value="<!-- TMPL_VAR NAME="bib"-->">
-     <input type="submit" value="Search">
-    </div>
-  <!-- TMPL_ELSE -->
-    <!-- TMPL_VAR NAME="CGIselectborrower" -->
-
-    <div id="action">
-    <input type="hidden" name="bib" value="<!-- TMPL_VAR NAME="bib"-->">
-     <input type="submit" value="Select">
-    </div>
-  <!-- /TMPL_UNLESS -->
-
-  </fieldset>
-</form>
-<!-- TMPL_ELSE -->
-    
-  <!-- TMPL_IF NAME="maxreserves" -->
-      <br>
-    <p class="problem">
-      <label class="label100"><u>Too many reserves</u></label>
-      Currently, this member has <!-- TMPL_VAR NAME="borrowerreservs" --> active reserves.
-    </p>
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF NAME="expiry" -->
-    <br>			
-    <p class="problem">
-      <label class="label100"><u>Expired card</u></label>
-      The card of this member is expired
-    </p>
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF NAME="diffbranch" -->			
-    <p class="problem">
-      <label class="label100"><u>Localisation</u></label>
-      The borrower isn't in is own library
-    </p>
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF NAME="alreadyreserved" -->			
-    <p class="problem">
-      <label class="label100"><u>Operation can be make</u></label>
-      This borrower had already make a reserv for this document
-    </p>
-    <!-- /TMPL_IF -->
-
-  <!-- TMPL_IF NAME="messageborrower" -->
-    <div class="problem">Carrefull,there is no borrower with this name, Please, try an other </div> 
-  <!-- /TMPL_IF -->
-<!-- /TMPL_UNLESS -->
-
-<form action="placerequest.pl" method="post" onSubmit="return check();" name="form">
-  <fieldset>
-    <legend>Reservation properties</legend>
-
-    <input type="hidden" size="10" name="member" value="<!--  TMPL_VAR NAME="cardnumber" -->">
-    <input type="hidden" name="biblio" value="<!-- TMPL_VAR NAME="bib" -->">
-    <input type="hidden" name="type" value="str8">
-    <input type="hidden" name="title" value="<!-- TMPL_VAR NAME="title" -->">
-
-    <table>
-      <tr>
-        <th>Member</th>
-        <td>
-<!-- TMPL_IF NAME="cardnumber"-->
-          <!-- TMPL_VAR NAME="borrowersurname" --> <!-- TMPL_VAR NAME="borrowerfirstname" -->
-          (card number: <!--  TMPL_VAR NAME="cardnumber" -->)
-<!-- TMPL_ELSE -->
-          Not defined yet
-<!-- /TMPL_IF -->
-        </td>
-      </tr>
-      
-      <tr>
-        <th><label for="priority">Priority</label></th>
-        <td>
-          <select name="rank-request">
-<!-- TMPL_LOOP Name="optionloop" -->
-  <!-- TMPL_IF Name="selected" -->
-            <option value="<!-- TMPL_VAR NAME="num" -->" selected="selected"><!-- TMPL_VAR NAME="num" --></option>
-  <!-- TMPL_ELSE -->
-            <option value="<!-- TMPL_VAR NAME="num" -->"><!-- TMPL_VAR NAME="num" --></option>
-  <!-- /TMPL_IF -->
-<!-- /TMPL_LOOP -->
-          </select>
-        </td>
-      </tr>
-
-      <tr>
-        <th>
-          <label>Notes</label>
-        </th>
-        <td>
-          <textarea name="notes" cols="40" rows="5"></textarea>
-        </td>
-      </tr>
-
-      <tr>
-        <th>
-          <label>Place of retreat</label>
-        </th>
-        <td>
-          <!-- TMPL_VAR NAME="CGIbranch" -->
-        </td>
-      </tr>
-
-    </table>
-  </fieldset>
-
-  <fieldset>
-    <legend>Items</legend>
-<!-- TMPL_LOOP name="bibitemloop" -->    
-    <ul>
-      <li>Item type: <!-- TMPL_VAR NAME="description" --></li>
-      <li>Publication year: <!-- TMPL_VAR NAME="publicationyear" --></li>
-    </ul>
-    
-    <table>
-      <tr>
-        <th>Item number</th>
-        <th>Home branch</th>
-        <th>Holding branch</th>
-        <th>Information</th>
-      </tr>
-  <!-- TMPL_LOOP Name="itemloop" -->
-      <tr class="<!-- TMPL_VAR NAME="backgroundcolor" -->">
-        <td>
-          <!-- TMPL_VAR NAME="barcode" -->
-        </td>
-        <td>
-          <!-- TMPL_VAR NAME="homebranchname" -->
-        </td>
-        <td>
-    <!-- TMPL_IF NAME="holdingbranchname" -->
-          <!-- TMPL_VAR NAME="holdingbranchname" -->
-    <!-- /TMPL_IF -->
-        </td>
-        <td>
-    <!-- TMPL_IF Name="date_due" -->
-          On loan, Return expected on <!-- TMPL_VAR NAME="date_due" -->
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF NAME="available" -->
-          <label>
-            <input type="checkbox" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->">
-            reserve this item
-          </label>
-    <!-- /TMPL_IF -->
-          
-    <!-- TMPL_IF name="reservedate" -->
-          Item reserved on <!-- TMPL_VAR NAME="reservedate" -->
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF Name="message" -->
-          Cant' be selected (lost or long overdue)
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF Name="notforloan" -->
-          This document is not for loan (<!-- TMPL_VAR NAME="notforloanvalue" -->)
-    <!-- /TMPL_IF -->
-
-    <!-- TMPL_IF Name="transfertwhen" -->
-          Document in transfer from the library : <!-- TMPL_VAR NAME="transfertfrom" -->,
-          to : <!-- TMPL_VAR NAME="transfertto" -->, the : <!-- TMPL_VAR NAME="transfertwhen" -->
-    <!-- /TMPL_IF -->
-        </td>
-      </tr>
-  <!-- /TMPL_LOOP --> <!-- itemloop -->
-    </table>
-<!-- /TMPL_LOOP --> <!-- bibitemloop -->
-
-    <p>
-      <label>
-        If no item is available, reserve next returning item
-        <input type="checkbox" name="request" value="Any">
-      </label>
-    </p>
-    
-    <input type="hidden" name="biblioitem" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->">
-    <input type="hidden" name="alreadyreserved" value="<!-- TMPL_VAR NAME="alreadyreserved" -->">
-  </fieldset>
-
-  <div id="actions">
-<!-- TMPL_IF NAME="cardnumber"-->
-    <input type="submit" value="Reserve">
-<!-- TMPL_ELSE -->
-    <input type="submit" value="Reserve" disabled="disabled" style="background-color: gray;">
-<!-- /TMPL_IF -->
-  </div>
-
-</form>
-
-<!-- TMPL_IF name="reserveloop" -->
-<form name="T<!-- TMPL_VAR NAME="time" -->" action="modrequest.pl" method="post">
-  <fieldset>
-    <legend>Modify existing reserves</legend>
-    
-    <table>
-      <tr>
-        <th>Priority</th>
-        <th>Member</th>
-        <th>Notes</th>
-        <th>Date</th>
-        <th>Pick up location</th>
-        <th>Informations</th>
-      </tr>
-  <!-- TMPL_LOOP Name="reserveloop" -->
-      <tr>
-        <td>
-          <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
-          <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->">
-          <select name="rank-request">
-    <!-- TMPL_IF Name="wait" -->
-            <option value="W" selected>Waiting</option>
-    <!-- /TMPL_IF -->
-              
-    <!-- TMPL_LOOP Name="optionloop" -->
-            <option value="<!-- TMPL_VAR NAME="num" -->" <!-- TMPL_IF Name="selected" --> selected <!-- /TMPL_IF -->>
-              <!-- TMPL_VAR NAME="num" -->
-            </option>
-    <!-- /TMPL_LOOP -->
-            <option value="del">del</option>
-          </select>
-        </td>
-        <td>
-          <a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="borrowernumber" --></a>
-        </td>
-        <td><!-- TMPL_VAR NAME="notes" --></td>
-        <td><!-- TMPL_VAR NAME="date" --></td>
-        <td>
-    <!-- TMPL_IF Name="wait" -->
-          Document waiting at <b> <!-- TMPL_VAR NAME="wbrname" --></b> <input type="hidden" name="pickup" value=<!-- TMPL_VAR NAME="wbrcd" -->>
-    <!-- TMPL_ELSE -->
-          <select name="pickup">
-      <!-- TMPL_LOOP Name="branchloop" -->
-        <!-- TMPL_IF Name="selected" -->
-            <option value="<!-- TMPL_VAR NAME="branch" -->" selected="selected">
-        <!-- TMPL_ELSE -->
-            <option value="<!-- TMPL_VAR NAME="branch" -->">
-        <!-- /TMPL_IF -->
-              <!-- TMPL_VAR NAME="branchname" -->
-            </option>
-      <!-- /TMPL_LOOP -->
-          </select>
-    <!-- /TMPL_IF -->
-        </td>
-        <td>
-    <!-- TMPL_IF Name="wait" -->
-          <a href="/cgi-bin/koha/detail.pl?bib=<!-- TMPL_VAR NAME=''biblionumber" -->&amp;type=intra" onClick="openWindow(this, 'Item', 480, 640); return false;">
-            <!-- TMPL_VAR NAME="barcode" -->
-          </a>
-    <!-- TMPL_ELSE -->
-      <!-- TMPL_IF Name="constrainttypea" -->
-          <i>Next available</i>
-      <!-- TMPL_ELSE -->
-        <!-- TMPL_IF Name="constrainttypeo" -->
-          only this type :<b><!-- TMPL_VAR NAME="volumeddesc" --> <!-- TMPL_VAR NAME="itemtype" --></b>
-        <!-- /TMPL_IF -->
-      <!-- /TMPL_IF -->
-    <!-- /TMPL_IF -->
-        </td>
-      </tr>
-  <!-- /TMPL_LOOP --> <!-- existing reserveloop -->
-      <tr>
-        <td colspan="6" align="right">
-          Cancel a reserve with select
-          <input type="image" name="submit" value="Reserv" border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/2rightarrow.png">
-        </td>
-      </tr>
-    </table>
-  </fieldset>
-</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/reviews/reviewswaiting.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/reviews/reviewswaiting.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/reviews/reviewswaiting.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/reviews/reviewswaiting.tmpl	8 Dec 2006 11:24:58 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,49 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-    Reviews waiting for Approval --
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!--TMPL_INCLUDE NAME="menu-serials.inc" -->
-
-<h1>Reviews</h1>
-
-<!-- TMPL_IF NAME="reviews" -->
-<table>
-    <tr>
-        <th>
-            Authors
-        </th>
-        <th>
-            On biblio
-        </th>
-        <th>
-            Review
-        </th>
-        <th>
-            &nbsp;
-        </th>
-    </tr>
-<!-- TMPL_LOOP NAME="reviews" -->
-    <tr>
-        <td>
-            <!-- TMPL_VAR NAME="surname" --> 
-            <!-- TMPL_VAR NAME="firstname" -->
-        </td>
-        <td>
-            <!-- TMPL_VAR NAME="bibliotitle" -->
-        </td>
-        <td>
-            <!-- TMPL_VAR NAME="review" -->
-        </td>
-        <td>
-            <a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=approve&reviewid=<!-- TMPL_VAR NAME="reviewid" -->">Approve</a> | 
-            <a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=delete&reviewid=<!-- TMPL_VAR NAME="reviewid" -->">Delete</a>
-        </td>
-    </tr>
-<!-- /TMPL_LOOP -->
-</table>
-<!-- TMPL_ELSE -->
-    <b>No reviews has been writed.</b>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/serials/acqui-search-result.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/acqui-search-result.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/acqui-search-result.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/acqui-search-result.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit -- Select supplier<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<h1>Supplier Search Results</h1>
-<h2>You searched on <b>supplier <!-- TMPL_VAR name="supplier" -->,</b> <!-- TMPL_VAR name="count" --> results found</h2>
-<table>
-	<tr>
-		<th>Book seller</th>
-		<th>Select</th>
-	</tr>
-	<!-- TMPL_LOOP name="loop_suppliers" -->
-		<tr>
-			<td><!-- TMPL_VAR name="name" --></td>
-			<td><a href="#" onclick="javascript:GetIt(<!-- TMPL_VAR name="aqbooksellerid" -->,'<!-- TMPL_VAR name="name" -->')">Get It !</td>
-		</tr>
-	<!-- /TMPL_LOOP -->
-</table>
-
-<script language="Javascript">
-
-function GetIt(aqbooksellerid,name)
-{
-  opener.document.f.aqbooksellerid.value = aqbooksellerid;
-  opener.document.f.aqbooksellername.value = name;
-  self.close();
-}
-</script>
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/serials/acqui-search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/acqui-search.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/acqui-search.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/acqui-search.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit -- Search supplier<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-
-<script language="Javascript">
-
-function GetIt(aqbooksellerid,name)
-{
-  opener.document.f.aqbooksellerid.value = aqbooksellerid;
-  opener.document.f.aqbooksellername.value = name;
-  self.close();
-}
-</script>
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
-
-<h1>Search supplier for serial subscription</h1>
-	<form action="/cgi-bin/koha/serials/acqui-search-result.pl" method=post>
-		Supplier name : <input type="text"  size="25"   name="supplier">
-        <input type="submit" class="button serial" value="OK">
-	</form>
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/serials/claims.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/claims.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/claims.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/claims.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,166 +0,0 @@
-<!-- TMPL_UNLESS NAME="preview" -->
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!--
-TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="masthead.inc" -->
-<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
-
-<div id="main">
-<!-- TMPL_ELSE -->
-<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
-<div class="popup-block">
-<!-- /TMPL_UNLESS -->
-
-<!-- TMPL_UNLESS NAME="preview" -->
-	<h1>Claims</h1>
-
-	<p>
-	<form action="claims.pl" method="post">
-	<input type="hidden" name="claimletter" value="<!-- TMPL_VAR NAME="claimletter"-->">
-	<!-- TMPL_VAR name="CGIsupplier" -->
-	<input type="submit" value="Filter by Supplier" class="button">
-	</form>
-	</p>
-<!--
-	<p>
-	<form action="claims.pl" method="post">
-	<input type="hidden" name="supplierid" value="<!-- TMPL_VAR NAME="supplierid"-->">
-	<!-- TMPL_VAR name="CGIletter" -->
-	<input type="submit" value="Choose Claim Form" class="button">
-	</form>
-	</p> -->
-
-<form method="post" action="lateissues-excel.pl">
-<input type="hidden" name="op" value="claims" />
-
-		<!-- TMPL_IF NAME="missingissues" -->
-		<h3>Missing Issues</h3>
-		<table cellpadding="0" cellspacing="0" border="0" class="collapse">
-			<tr>
-				<th class="cell-header">&nbsp;</th>
-				<th class="cell-header">Supplier</th>
-				<th class="cell-header">Title</th>
-				<th class="cell-header">Issue number</th>
-				<th class="cell-header">Missing since</th>
-				<th class="cell-header">Began Claim</th>
-				<th class="cell-header">&nbsp;</th>
-			</tr>
-			<!-- TMPL_LOOP name="missingissues" -->
-				<tr>
-					<td class="cell">
-					<input type="checkbox" name="serialid" value="<!-- TMPL_VAR NAME="serialid"-->">
-					</td>
-					<td class="cell">
-					<!-- TMPL_VAR name="name" -->
-					</td>
-					<td class="cell">
-					<!-- TMPL_VAR name="Title" -->
-					</td>
-					<td class="cell">
-					<!-- TMPL_VAR name="serialseq" -->
-					</td>
-					<td class="cell">
-					<!-- TMPL_VAR name="planneddate" -->
-					</td>
-					<td class="cell">
-					<!-- TMPL_VAR name="claimdate" -->
-					</td>
-					<td class="cell">
-					<a href="lateissues-excel.pl?supplierid=<!--TMPL_VAR NAME="supplierid"-->&amp;serialid=<!-- TMPL_VAR name="serialid" -->&amp;op=claims" class="button">Export Item Data</a>
-					<!--
-					<a href="claims.pl?serialid=<!-- TMPL_VAR name="serialid" -->&amp;supplierid=<!-- TMPL_VAR name="supplierid" -->&amp;op=preview" onclick="popup(<!-- TMPL_VAR name="supplierid" -->,<!-- TMPL_VAR name="serialid" -->); return false">Claim Letter</a> -->
-					</td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-		<!-- TMPL_ELSE -->
-		<p>There are no missing issues to claim</p>
-		<!-- /TMPL_IF -->
-
-	<!-- TMPL_IF Name="singlesupplier"-->
-<input type="hidden" name="supplierid" value="<!--TMPL_VAR NAME="supplierid"-->" />
-
-		<!--
-		<a href="claims.pl?supplierid=<!-- TMPL_VAR
-name="supplierid" -->&amp;op=preview" onclick="popup(<!-- TMPL_VAR
-name="supplierid" -->,''); return false" class="button">Supplier Group Claim Letter</a></p> -->
-	<!-- /TMPL_IF -->
-<p><br/>
-		<input type="submit" name="submit" class="button" value="Export Selected Data" />
-
-</form>
-<!-- TMPL_ELSE -->
-	<!-- TMPL_IF Name="supplierloop"-->
-		<!-- TMPL_LOOP Name="supplierloop"-->
-		<!-- TMPL_IF NAME="name" -->
-		<p><b><!-- TMPL_VAR NAME="name" --></b><br />
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="postal" -->
-		<!-- TMPL_VAR NAME="postal" --><br />
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="contphone" -->
-		Ph: <!-- TMPL_VAR NAME="contphone" --><br />
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="contfax" -->
-		Fax: <!-- TMPL_VAR NAME="contfax" --><br />
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="contemail" -->
-		Email: <!-- TMPL_VAR NAME="contemail" --><br />
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="accountnumber" -->
-		A/C: <!-- TMPL_VAR NAME="accountnumber"></p>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="contact" -->
-		<p>Dear <!-- TMPL_VAR NAME="contact" --></p>
-		<!-- TMPL_ELSE -->
-		<p>To whom it may concern</p>
-		<!-- /TMPL_IF -->
-		<p>The following items have not been received from you and are now considered missing:</p>
-		<!-- /TMPL_LOOP -->
-	<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="missingissues" -->
-		<h3>Missing Issues</h3>
-		<table cellpadding="0" cellspacing="4" border="0" width="550" class="collapse">
-			<tr>
-				<td class="cell"><b>Supplier<b></td>
-				<td class="cell"><b>Title</b></td>
-				<td class="cell"><b>Issue number</b></td>
-				<td class="cell"><b>Missing since</b></td>
-			</tr>
-			<!-- TMPL_LOOP name="missingissues" -->
-				<tr>
-					<td class="cell">
-					<!-- TMPL_VAR name="name" -->
-					</td>
-					<td class="cell">
-					<!-- TMPL_VAR name="Title" -->
-					</td>
-					<td class="cell">
-					<!-- TMPL_VAR name="serialseq" -->
-					</td>
-					<td class="cell">
-					<!-- TMPL_VAR name="planneddate" -->
-					</td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-		<!-- /TMPL_IF -->
-<br />
-<p class="noprint"><a href="javascript:window.print()" class="button">Print</a> &nbsp; <a href="javascript:window.close()" class="button">Close</a></p>
-<!-- /TMPL_UNLESS -->
-
-</div>
-<script type="text/javascript">
-<!--
-
-function popup(supplierid,serialid){
-	window.open('claims.pl?supplierid='+ supplierid +'&amp;serialid='+ serialid +'&amp;op=preview' ,'popup', 'width=600,height=400,toolbar=no,scrollbars=yes');
-}
-//-->
-</script>
-<!-- TMPL_UNLESS NAME="preview" -->
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-<!-- TMPL_ELSE -->
-<!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->
-<!-- /TMPL_UNLESS -->
-
-

Index: koha-tmpl/intranet-tmpl/prog/en/serials/distributedto.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/distributedto.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/distributedto.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/distributedto.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,87 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit -- Select supplier<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
-
-	<h1>Select borrowers or enter manually the names</h1>
-	<p>
-		<form action="/cgi-bin/koha/serials/distributedto.pl" method="post" name="Aform">
-			<table>
-			<tr>
-			<td>
-				<input type="text" name="searchfield" value="<!-- TMPL_VAR name="searchfield" -->">
-				<input type="submit" class="button" value="Filter">
-			</td>
-			<td rowspan="2">
-				<h2>Distributed to</h2>
-				<p>
-					<textarea name="distributedto" rows="15" cols="30"><!-- TMPL_VAR name="distributedto" --></textarea>
-				</p>
-				<p>
-					<!-- TMPL_IF name="save" -->
-						saved</p><p>
-					<!-- /TMPL_IF -->
-					<input type="hidden" name="SaveList" value="0">
-					<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
-					<input type="button" name="save" value="Save" class="button" onClick="FSaveList()">
-					<input type="button" name="clode" value="Close" class="button" onClick="javascript:window.close()">
-			</td>
-			</tr>
-			<tr>
-			<td>
-				<!-- TMPL_VAR NAME="borrowername" -->
-				<select name="borlist" size="15">
-					<!-- TMPL_LOOP name="borlist" -->
-						<option value="<!-- TMPL_VAR name="surname" --><!-- TMPL_VAR name="firstname" -->">
-							<!-- TMPL_VAR name="surname" --> <!-- TMPL_VAR name="firstname" -->
-						</option>
-					<!-- /TMPL_LOOP -->
-				</select>
-				<input type="button" name="insert" value="&gt;&gt;" class="button" onclick="insertValueQuery()" title="Insert" />
-			</td>
-			</tr>
-			</table>
-		</form>
-	</p>
-	<script language="javascript" type="text/javascript">
-		// GPL code coming from PhpMyAdmin
-		function insertValueQuery() {
-			var myQuery = document.Aform.distributedto;
-			var myListBox = document.Aform.borlist;
-		
-			if(myListBox.options.length > 0) {
-				var chaineAj = "";
-				var NbSelect = 0;
-				for(var i=0; i<myListBox.options.length; i++) {
-					if (myListBox.options[i].selected){
-						NbSelect++;
-						if (NbSelect > 1)
-							chaineAj += ", ";
-						chaineAj += myListBox.options[i].value;
-					}
-				}
-		
-				//IE support
-				if (document.selection) {
-					myQuery.focus();
-					sel = document.selection.createRange();
-					sel.text = chaineAj;
-					document.Aform.insert.focus();
-				}
-				//MOZILLA/NETSCAPE support
-				else if (document.Aform.distributedto.selectionStart || document.Aform.distributedto.selectionStart == "0") {
-					var startPos = document.Aform.distributedto.selectionStart;
-					var endPos = document.Aform.distributedto.selectionEnd;
-					var chaineSql = document.Aform.distributedto.value;
-					myQuery.value = chaineSql.substring(0, startPos) +''+ chaineAj+"\n" + chaineSql.substring(endPos, chaineSql.length);
-				} else {
-					myQuery.value += chaineAj;
-				}
-			}
-		}
-		function FSaveList() {
-			document.Aform.SaveList.value=1;
-			document.Aform.submit();
-		}
-	</script>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/serials/lateissues.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/lateissues.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/lateissues.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/lateissues.tmpl	11 Sep 2006 17:41:55 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,89 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
-
-<h1>Late issues</h1>
-<p>
-	<form action="lateissues.pl" method="post">
-		<!-- TMPL_VAR name="CGIsupplier" -->
-			<!-- TMPL_IF name="phone" -->Phone: <!-- TMPL_VAR name="phone" --><!-- /TMPL_IF -->
-			<!-- TMPL_IF name="booksellerfax" -->Fax: <!-- TMPL_VAR name="booksellerfax" --><!-- /TMPL_IF -->
-			<!-- TMPL_IF name="bookselleremail" --></p><p><a href="mailto:<!-- TMPL_VAR name="bookselleremail" -->"><!-- TMPL_VAR name="bookselleremail" --></a><!-- /TMPL_IF -->
-		<input type="submit" value="filter">
-	</form>
-</p>
-        <!-- TMPL_IF NAME="lateissues" -->
-	
-<table>
-	<tr>
-		<th>Title</th>
-		<th>Issue number</th>
-		<th>Late since</th>
-		<th colspan=2>&nbsp;</th>
-	</tr>
-	<!-- TMPL_LOOP name="lateissues" -->
-		<tr>
-			<!-- TMPL_IF name="odd" -->
-				<td class="hilighted"><!-- TMPL_IF name="Title" --><!-- TMPL_VAR name="Title" --><!-- TMPL_ELSE -->|<!-- /TMPL_IF --></td>
-				<td class="hilighted"><!-- TMPL_VAR name="serialseq" --></td>
-				<td class="hilighted"><!-- TMPL_VAR name="planneddate" --></td>
-				<td class="hilighted">
-					<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Detail</a>
-					<a href="serials-recieve.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Recieve</a>
-				</td>
-			<!-- TMPL_ELSE -->
-				<td><!-- TMPL_VAR name="Title" --></td>
-				<td><!-- TMPL_VAR name="serialseq" --></td>
-				<td><!-- TMPL_VAR name="planneddate" --></td>
-				<td>
-					<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Detail</a>
-					<a
-href="statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Receive</a>
-				</td>
-			<!-- /TMPL_IF -->
-		</tr>
-	<!-- /TMPL_LOOP -->
-</table>
-        <!-- TMPL_ELSE -->
-               <p>There are currently no outstanding issues.</p>
-	<!-- /TMPL_IF -->
-	
-        <!-- TMPL_IF NAME="missingissues" -->
-	        <h1 class="bull">Missing Issues</h1>
-		<table cellpadding="0" cellspacing="0" border="0" class="collapse">
-		<tr>
-		<th class="cell-header">Supplier</th>
-		<th class="cell-header">Title</th>
-		<th class="cell-header">Issue number</th>
-		<th class="cell-header">Missing since</th>
-		<th class="cell-header">&nbsp;</th>
-		</tr>
-		<!-- TMPL_LOOP name="missingissues" -->
-		<tr>
-		<td class="cell">
-		<!-- TMPL_VAR name="name" -->
-		</td>
-		<td class="cell">
-		<!-- TMPL_VAR name="Title" -->
-		</td>
-		<td class="cell">
-		<!--TMPL_VAR name="serialseq" -->
-		</td>
-		<td class="cell">
-		<!-- TMPL_VAR name="planneddate" -->
-		</td>
-		<td class="cell">
-		<a
-href="statecollection.pl?op=found&amp;planneddate=<!-- TMPL_VAR
-name="planneddate" -->&amp;missingissue=<!-- TMPL_VAR name="serialseq" -->&amp;subscriptionid=<!-- TMPL_VAR
-name="subscriptionid" -->">Receive</a>
-                </td>
-		</tr>
-		<!--/TMPL_LOOP -->
-		</table>
-	<!-- /TMPL_IF -->
-		
-	       
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/serials/member-search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/member-search.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/member-search.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/member-search.tmpl	20 Jul 2006 03:59:10 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,45 +0,0 @@
-<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
-<script type="text/javascript">
-<!--
-
-function add_member(subscriptionid,bornum){
-     var myurl = "routing.pl?subscriptionid="+subscriptionid+"&bornum="+bornum+"&op=add";
-     window.opener.location.href = myurl;
-}
-
-//-->
-</script>
-
-<div class="popup-block">
-<h1>Member Search</h1>
-
-<p>
-<form name="search" action="/cgi-bin/koha/serials/member-search.pl" method="post">
-<input type="text" name="member" size="30" />
-<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR NAME="subscriptionid" -->">
-<input type="submit" class="button" value="Search" />
-</form>
-</p>
-<!-- TMPL_IF NAME="memberloop" -->
-<table cellspacing="0" cellpadding="0" border="0" width="480" class="collapse">
-<tr><td class="cell-header">Name</td>
-    <td class="cell-header">Location</td>
-    <td class="cell-header">Add</td></tr>
-<!-- TMPL_LOOP NAME="memberloop" -->
-<tr><td class="cell"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></td>
-    <td class="cell"><!-- TMPL_VAR NAME="streetaddress" --></td>
-    <td class="cell"><a onclick="add_member(<!-- TMPL_VAR
-NAME="subscriptionid" -->,<!-- TMPL_VAR NAME="borrowernumber" -->); return false" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;bornum=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;op=add">Add</a></td></tr>
-<!-- /TMPL_LOOP -->
-        </table></td></tr>
-</table>
-<!-- TMPL_ELSE -->
-    <!-- TMPL_IF NAME="member" -->
-        <p>No results found</p>
-    <!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-<br />
-<p><a href="javascript:self.close()" class="button">Close</a></p>
-</div>
-
-<!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/serials/printlist.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/printlist.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/printlist.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/printlist.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-<html>
-
-<!-- TMPL_INCLUDE NAME="serials-topmenu.inc" -->
-
-<body onLoad="window.print();">
-<h1>Distribution list</h1>
-<h2>Title : <!-- TMPL_VAR name="title" -->, <!-- TMPL_VAR name="serialseq" --></h2>
-<div style="border : 1px solid black;">
-	<!-- TMPL_VAR name="distributedto" -->
-</div>
-
-<div style=border-top: 1px solid black;">
-	<p><!-- TMPL_VAR name="branchname" --></p>
-	<p><!-- TMPL_VAR name="branchaddress1" --></p>
-	<p><!-- TMPL_VAR name="branchaddress2" --></p>
-	<p><!-- TMPL_VAR name="branchaddress3" --></p>
-	<p>phone : <!-- TMPL_VAR name="branchphone" --> <i><!-- TMPL_VAR name="branchemail" --></i></p>
-</div>
-
-</body>
-</html>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/serials/receipt-search-result.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/receipt-search-result.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/receipt-search-result.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/receipt-search-result.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,80 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
-
-<div id="mainbloc">
-	<h1 class="authority">Serial search results</h1>
-	<div id="resultnumber">
-		<p>
-			<!-- TMPL_IF NAME=displayprev -->
-				<a href=search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search>
-					<img src="/intranet-tmpl/default/images/numbers/prev.gif" border=0>
-				</a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP NAME=numbers -->
-				<!-- TMPL_IF NAME=highlight -->
-					<img src="/intranet-tmpl/default/images/numbers/<!-- TMPL_VAR NAME=number -->-highlight.gif">
-				<!-- TMPL_ELSE -->
-					<a href=search.pl?startfrom=<!-- TMPL_VAR NAME=startfrom -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="/intranet-tmpl/default/images/numbers/<!-- TMPL_VAR NAME=number -->.gif" border=0></a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF NAME=displaynext -->
-				<a href=search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="/intranet-tmpl/default/images/numbers/next.gif" border=0></a>
-				<!-- /TMPL_IF -->
-		</p>
-
-	</div>
-	<div id="resultlist">
-		<table>
-			<tr>
-				<th class="authority">Serial</th>
-				<th class="authority">View</th>
-				<th class="authority">State of collection</th>
-				<th class="authority">Delete</th>
-			</tr>
-			<!-- TMPL_LOOP name="result" -->
-				<tr>
-					<td><!-- TMPL_VAR name="serial" --></td>
-
-					<td>
-		<div align="center">				<a href="subscription-detail.pl?suscr=<!-- TMPL_VAR name="subscriptionid" -->">
-							<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png"  width="32" hspace="0" vspace="0" border="0" alt="Authority number <!-- TMPL_VAR name="authid" -->" title="Serial number<!-- TMPL_VAR name="subscriptionid" -->">
-						</a> </div>
-					</td>
-	<td><div align="center"><a href="serials-recieve.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&serial=<!-- TMPL_VAR name="serial" -->">
-
-							<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR name="theme" -->/images/Fleche.jpg"  width="32" hspace="0" vspace="0" border="0" alt="Subscribtion serial<!-- TMPL_VAR name="subscriptionid" -->" title="Serial number<!-- TMPL_VAR name="subscriptionid" -->">
-
-
-</a></td></div>
-				</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-	</div>
-	<div id="resultnumber">
-		<p>
-			<!-- TMPL_IF NAME=displayprev -->
-			<a href=search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="/intranet-tmpl/default/images/numbers/prev.gif" border=0></a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP NAME=numbers -->
-				<!-- TMPL_IF NAME=highlight -->
-				<img src="/intranet-tmpl/default/images/numbers/<!-- TMPL_VAR NAME=number -->-highlight.gif">
-				<!-- TMPL_ELSE -->
-				<a href=search.pl?startfrom=<!-- TMPL_VAR NAME=startfrom -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="/intranet-tmpl/default/images/numbers/<!-- TMPL_VAR NAME=number -->.gif" border=0></a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF NAME=displaynext -->
-			<a href=search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="/intranet-tmpl/default/images/numbers/next.gif" border=0></a>
-				<!-- /TMPL_IF -->
-		</p>
-	</div>	
-</div>
-<!-- TMPL_INCLUDE NAME="serials-bottom.inc" -->
-
-
-<script language="JavaScript" type="text/javascript" >
-function do_delete(page)
-{
-window.location = page;
-}
-</script>

Index: koha-tmpl/intranet-tmpl/prog/en/serials/result.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/result.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/result.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/result.tmpl	28 Sep 2006 14:25:22 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,85 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
-
-	<h1 class="catalogue">Search results</h1>
-	<div id="resultnumber">
-		<p>
-			<!-- TMPL_IF NAME=displayprev -->
-				<a href=subscription-bib-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search>
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border=0>
-				</a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP NAME=numbers -->
-				<!-- TMPL_IF NAME=highlight -->
-					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
-				<!-- TMPL_ELSE -->
-					<a href=subscription-bib-search.pl?startfrom=<!-- TMPL_VAR NAME=startfrom -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME=number -->.gif" border=0></a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF NAME=displaynext -->
-				<a href=subscription-bib-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border=0></a>
-				<!-- /TMPL_IF -->
-		</p>
-		<p>
-			<!-- TMPL_IF name=total -->
-			&nbsp<b>Results <!-- TMPL_VAR name="from" --> to <!-- TMPL_VAR name="to" --> of <!-- TMPL_VAR name="total" --></b><br><br>
-			<!-- TMPL_ELSE -->
-			&nbsp No results found.<br>
-			<!-- /TMPL_IF -->
-		</p>
-	</div>
-	<div id="resultlist">
-		<table>
-			<tr>
-			<th class="catalogue">Summary</th>
-			<th class="catalogue">&nbsp;</th>
-			</tr>
-			<!-- TMPL_LOOP name="result" -->
-			<tr>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<p>
-						<p><b><!-- TMPL_VAR NAME="title" --></b></p>
-						<p><!-- TMPL_VAR NAME="author" -->
-						<!-- TMPL_IF name="publishercode" -->- <!-- TMPL_VAR name="publishercode" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="place" --> ; <!-- TMPL_VAR name="place" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="pages" --> - <!-- TMPL_VAR name="pages" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="notes" --> : <!-- TMPL_VAR name="notes" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="size" --> ; <!-- TMPL_VAR name="size" --><!-- /TMPL_IF -->
-					</p>
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-						<a class="transparent" href="#" onclick="GetIt('<!-- TMPL_VAR NAME="biblionumber" -->','<!-- TMPL_VAR name="title" escape="URL" -->') ">Get it!</a>
-				</td>
-			</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-	</div>
-	<div id="resultnumber">
-		<p>
-			<!-- TMPL_IF NAME=displayprev -->
-			<a href=subscription-bib-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border=0></a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP NAME=numbers -->
-				<!-- TMPL_IF NAME=highlight -->
-				<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME=number -->-highlight.gif">
-				<!-- TMPL_ELSE -->
-				<a href=subscription-bib-search.pl?startfrom=<!-- TMPL_VAR NAME=startfrom -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME=number -->.gif" border=0></a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF NAME=displaynext -->
-			<a href=subscription-bib-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border=0></a>
-				<!-- /TMPL_IF -->
-		</p>
-	</div>	
-
-
-
-<script language="Javascript">
-
-function GetIt(bibno,title)
-{
-  opener.document.f.biblionumber.value = bibno;
-  opener.document.f.title.value = title;
-  self.close();
-}
-</script>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/serials/routing-preview-slip.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/routing-preview-slip.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/routing-preview-slip.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/routing-preview-slip.tmpl	20 Jul 2006 03:47:29 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
-
-<div id="slip-block">
-<table cellspacing="0" cellpadding="0" border="0" class="collapse routingslip">
-<tr><td class="cell" colspan="3"><h3>Opus International Consultants - Information Centre</h3></td></tr>
-<tr><td class="cell" colspan="3"><b>Title:</b> <!-- TMPL_VAR NAME="title" --><br />
-<!-- TMPL_VAR NAME="issue" --></td></tr>
-<tr><td class="cell"><b>Name/Location</b></td>
-    <td class="cell"><b>Date Due</b></td></tr>
-<!-- TMPL_LOOP NAME="memberloop" -->
-        <tr><td class="name"><b><!-- TMPL_VAR NAME="name" --></b> <!-- TMPL_VAR NAME="location" --></td>
-            <td class="date">&nbsp;</td></tr>
-<!-- /TMPL_LOOP -->
-</table>
-<p><b>Notes:</b> Please return this journal
-promptly as others are waiting.
-<br /><!-- TMPL_VAR NAME="routingnotes" --></p>
-   <div id="slip-block-links">
-   <a class="button" href="javascript:window.print();self.close()">Print</a> &nbsp; <a class="button" href="javascript:self.close()">Close</a>
-   </div>
-</div>
-
-<!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/serials/routing-preview.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/routing-preview.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/routing-preview.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/routing-preview.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,43 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
-
-<h1 class="bull">Preview Routing List</h1>
-
-<form method="post" action="routing-preview.pl">
-<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR NAME="subscriptionid" -->" />
-<p><b>Serial Title:</b> <!-- TMPL_VAR NAME="title" --></p>
-<p><b>Issue:</b> <!-- TMPL_VAR NAME="issue" --></p>
-
-<table border="0" cellspacing="0" cellpadding="0">
-<tr valign="top"><td style="padding-top: 5px;"><b>List Member:</b>&nbsp;</td>
-    <td><table cellspacing="0" cellpadding="0" border="0" class="collapse">
-        <tr><td class="cell-header">Name</td>
-            <td class="cell-header">Location</td></tr>
-<!-- TMPL_LOOP NAME="memberloop" -->
-        <tr><td class="cell"><!-- TMPL_VAR NAME="name" --></td>
-            <td class="cell"><!-- TMPL_VAR NAME="location" --></td></tr>
-<!-- /TMPL_LOOP -->
-        </table></td></tr>
-<tr valign="top"><td colspan="2">&nbsp;</td></tr>
-<tr valign="top"><td><b>Notes:</b></td>
-    <td><!-- TMPL_VAR NAME="routingnotes" --></td></tr>
-</table>
-<p>
-<input type="submit" name="ok" class="button" value="OK, Preview Routing Slip" onclick="print_slip(<!-- TMPL_VAR NAME="subscriptionid" -->,'<!-- TMPL_VAR NAME="issue" -->'); return false" />
-<input type="submit" name="edit" class="button" value="Edit" />
-<input type="submit" name="delete" class="button" value="Delete" /></p>
-</form>
-</div>
-
-<script type="text/javascript">
-<!--
-
-function print_slip(subscriptionid,issue){
-    var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
-window.open(myurl,'PrintSlip','width=400,height=500,toolbar=no,scrollbars=yes');
-    window.location.href='serials-home.pl';
-}
-//-->
-</script>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/serials/routing.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/routing.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/routing.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/routing.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,82 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
-
-
-
-<script language="javascript" type="text/javascript">
-<!--
-
-function reorder_item(sid,rid,rank){
-    var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank;
-    window.location.href=mylocation; 
-}
-//-->
-</script>
-
-<div id="main">
-<!-- TMPL_IF NAME="op" -->
-<h1>Create Routing List</h1>
-<!-- TMPL_ELSE -->
-<h1>Edit Routing List</h1>
-<!-- /TMPL_IF -->
-
-<form method="post" action="routing.pl">
-<input type="hidden" name="op" value="save" />
-<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR NAME="subscriptionid" -->" />
-<p><b>Serial Title:</b> <!-- TMPL_VAR NAME="title" --></p>
-<p><b>Issue:</b> 
-
-<select name="date_selected">
-<!-- TMPL_LOOP NAME="dates" -->
-<option value="<!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)" <!-- TMPL_IF NAME="selected" --> selected="SELECTED" <!-- /TMPL_IF -->><!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)</option>
-<!-- /TMPL_LOOP -->
-</select>
-
-
-<!-- TMPL_VAR NAME="issue" --></p>
-
-<!-- TMPL_IF NAME="memberloop" -->
-<table border="0" cellspacing="0" cellpadding="0">
-<tr valign="top"><td style="padding-top:5px;"><b>List Member:</b>&nbsp;</td>
-    <td><table cellspacing="0" cellpadding="0" border="0" class="collapse">
-        <tr><td class="cell-header">Name</td>
-            <td class="cell-header">Location</td>
-            <td class="cell-header">Rank</td>
-            <td class="cell-header">Delete</td></tr>
-<!-- TMPL_LOOP NAME="memberloop" -->
-        <tr><td class="cell"><!-- TMPL_VAR NAME="name" --></td>
-            <td class="cell"><!-- TMPL_VAR NAME="location" --></td>
-            <td class="cell"><!-- TMPL_VAR NAME="routingbox" --></td>
-            <td class="cell"><a href="/cgi-bin/koha/serials/routing.pl?routingid=<!-- TMPL_VAR NAME="routingid" -->&amp;subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;op=delete">Delete</a></td></tr>
-<!-- /TMPL_LOOP -->
-        <tr><td colspan="4"><br /><a onclick="search_member(<!-- TMPL_VAR
-NAME="subscriptionid" -->); return false"
-href="/cgi-bin/koha/serials/member-search.pl?subscriptionid=<!-- TMPL_VAR
-NAME="subscriptionid" -->" class="button">Add List Member</a> &nbsp; <a
-href="/cgi-bin/koha/serials/routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;op=delete" class="button">Delete All</a></td></tr>
-        </table></td></tr>
-
-<!-- TMPL_ELSE -->
-<table border="0" cellspacing="0" cellpadding="0">
-<tr><td><b>List Member:&nbsp;</b></td>
-    <td><p><a onclick="search_member(<!-- TMPL_VAR NAME="subscriptionid"
--->); return false" href="/cgi-bin/koha/serials/member-search.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" class="button">Add List Member</a></p></td></tr>
-<!-- /TMPL_IF -->
-<tr><td valign="top" colspan="2">&nbsp;</td></tr>
-<tr><td valign="top"><b>Notes:</b></td>
-    <td><textarea name="notes" rows="3" cols="50"><!-- TMPL_VAR NAME="routingnotes" --></textarea></td></tr>
-<tr><td></td>
-    <td><input type="submit" name="submit" class="button" value="Save" /></td></tr>
-</table>
-</form>
-</div>
-<script type="text/javascript">
-<!--
-
-function search_member(subscriptionid){
-    var myurl = 'member-search.pl?subscriptionid='+subscriptionid; window.open(myurl,'FindAMember','width=500,height=400,toolbar=no,scrollbars=yes');
-}
-//-->
-</script>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/serials/serial-issues-full.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/serial-issues-full.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/serial-issues-full.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/serial-issues-full.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,70 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
-
-<!-- TMPL_UNLESS name="popup" -->
-	<h1 class="serial">Subscription information for biblio #<!-- TMPL_VAR NAME="biblionumber" --> with title : <!-- TMPL_VAR name="bibliotitle" --></h1>
-	<p>
-	<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button serial">Back to biblio</a>
-<!-- /TMPL_UNLESS -->
-	<!-- TMPL_LOOP NAME="years" -->
-		<!-- TMPL_IF NAME="year" -->
-			<a  class="button serial" href="javascript:active(<!-- TMPL_VAR NAME="year" -->)"><!-- TMPL_VAR NAME="year" --></a>
-		<!-- /TMPL_IF -->
-	<!-- /TMPL_LOOP -->
-	<a class=" button serial" href="serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->&selectview=small">Compact view</a>
-	</p>
-	<!-- TMPL_LOOP NAME="years" -->
-	<div name="<!-- TMPL_VAR NAME="year" -->" id="<!-- TMPL_VAR NAME="year" -->" style="position:absolute; visibility:hidden; margin-top:0px; border:4px;" <!--TMPL_IF Name="first" -->style="visibility:visible"<!--/TMPL_IF -->>
-		<table>
-			<tr>
-				<th class="serial">Information
-				</th>
-				<th class="serial">Date
-				</th>
-				<th class="serial">Number
-				</th>
-				<th class="serial">Status
-				</th>
-			</tr>
-			<!-- TMPL_LOOP Name="serials" -->
-			<tr>
-				<td>
-					<!-- TMPL_VAR name="notes" -->
-				</td>
-				<td>
-					<!-- TMPL_VAR Name="planneddate" -->
-				</td>
-				<td>
-					<!-- TMPL_VAR Name="serialseq" -->
-				</td>
-				<td>
-					<!-- TMPL_IF Name="status1" -->Arrived<!-- /TMPL_IF -->
-					<!-- TMPL_IF Name="status2" -->Waited<!-- /TMPL_IF -->
-					<!-- TMPL_IF Name="status3" -->Late<!-- /TMPL_IF -->
-					<!-- TMPL_IF Name="status4" -->Missing<!-- /TMPL_IF -->
-				</td>
-			</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-	</div>
-</div>
-	<!--/TMPL_LOOP -->
-<script language="JavaScript" type="text/javascript">
-active(<!-- TMPL_VAR name="yearmin" -->);
-function active(numlayer)
-{
-	for (i=<!--TMPL_VAR Name="yearmin"-->; i<=<!--TMPL_VAR Name="yearmax"-->; i++ ) {
-		ong = i;
-		link = "link"+i;
-		if (numlayer==i) {
-			document.getElementById(ong).style.visibility="visible";
-		} else {
-			document.getElementById(ong).style.visibility="hidden";
-		}
-	}
-}
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/serials/serial-issues.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/serial-issues.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/serial-issues.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/serial-issues.tmpl	11 Sep 2006 17:41:55 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,106 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
-
-<h1>Issues for a subscription</h1>
-<!-- TMPL_LOOP name="subscription_LOOP" -->
-	<div id="serials_serial_issue_<!-- TMPL_VAR name="subscriptionid" -->">
-		<h2>Subscription information for <!-- TMPL_VAR name="bibliotitle" --></h2>
-		<p>It began on <b><!-- TMPL_VAR name="histstartdate" --></b> and is issued every
-		<b>
-		<!--TMPL_IF name="periodicity1" -->
-				day
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity2" -->
-				week
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity3" -->
-				2 weeks
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity4" -->
-				3 weeks
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity5" -->
-				month
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity6" -->
-				2 months
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity7" -->
-				3 months
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity8" -->
-				quarter
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity9" -->
-				2 quarters
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity10" -->
-				year
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity11" -->
-				2 years
-		<!-- /TMPL_IF -->
-		</b>
-		<!--TMPL_IF name="arrival1" -->
-			on <b>monday</b>
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival2" -->
-			on <b>tuesday</b>
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival3" -->
-			on <b>wednesday</b>
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival4" -->
-			on <b>thursday</b>
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival5" -->
-			on <b>friday</b>
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival6" -->
-			on <b>saturday</b>
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival7" -->
-			on <b>sunday</b>
-		<!-- /TMPL_IF -->
-		for <b>
-			<!-- TMPL_IF name="numberlength" --><!-- TMPL_VAR name="numberlength" --> issues<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="weeklength" --><!-- TMPL_VAR name="weeklength" --> weeks<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="monthlength" --><!-- TMPL_VAR name="monthlength" --> months<!-- /TMPL_IF -->
-			</b>
-		</p>
-		<p>Last renewal of subscription was <b><!-- TMPl_VAR name="startdate" --></b></p>
-		<!-- TMPL_IF name="enddate" --><p><b>This subscription is now ended. The last issue was received on <!-- TMPL_VAR name="enddate" --></b></p><!-- /TMPL_IF name="enddate" -->
-	<!--TMPL_UNLESS Name=fullinfo -->
-		<p><!-- TMPL_VAR name="notes" --></p>
-		<!-- TMPL_IF name="opacnote" -->
-			<h3 class="serial">Issues summary</h2>
-			<p>
-				<!-- TMPL_VAR name="opacnote" -->
-			</p>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="receivedlist" -->
-			<h3 class="serial">received issues</h2>
-			<p>
-				<!-- TMPL_VAR name="receivedlist" -->
-			</p>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="missinglist" -->
-			<h3 class="serial">Missing issues</h2>
-			<p>
-				<!-- TMPL_VAR name="missinglist" -->
-			</p>
-		<!-- /TMPL_IF -->
-	</div>
-	<!-- /TMPL_UNLESS -->
-<!-- /TMPL_LOOP -->
-
-<div id="action">
-	
-	<form action="/cgi-bin/koha/serials/serial-issues.pl">
-		<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->">
-		<input type="hidden" name="selectview" value="full">
-		<input type="submit" value="Complete view">
-	</form>
-</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/serials/serials-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/serials-home.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/serials-home.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/serials-home.tmpl	11 Sep 2006 17:41:55 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,99 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
-
-
-<h1>Serials</h1>
-<div id="serials_home">
-	<h2>Serials subscriptions</h2>
-<!-- TMPL_IF NAME="routing" -->
-        <h3>Search for Serial Routing List</h3>
-<!-- /TMPL_IF -->
-
-    <table>
-        <tr><th>Biblionumber</th>
-            <th>ISSN</th>
-            <th>Title</th>
-            <th>
-                Note
-            </td>
-            <th colspan=2>&nbsp;</th>
-        </tr>
-        <tr>
-            <form action="serials-home.pl" method="post">
-            <!-- TMPL_IF NAME="routing" -->
-                <input type="hidden" name="routing" value="<!-- TMPL_VAR NAME="routing" -->" />
-            <!-- /TMPL_IF -->
-            <input type="hidden" name="searched" value="1" />
-	<td>
-                <input type="text" size=10 maxlength=15 name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" title="type biblionumber here to filter subscription">
-            </td>
-            <td>
-                <input type="text" size=10 maxlength=11 name="ISSN" value="<!-- TMPL_VAR name="ISSN" -->" title="type ISSN here to filter subscription">
-            </td>
-            <td>
-                <input type="text" size=40 maxlength=40 name="title" value="<!-- TMPL_VAR name="title" -->" title="type a title -complete or partial- to filter subscription">
-            </td>
-            <td>
-                &nbsp;
-            </td>
-            <td colspan=2>
-                <input type="submit" value="filter" class="button serial" title="set a filter on ISSN / title">
-            </td>
-        </tr>
-        <!-- TMPL_LOOP name="subscriptions" -->
-	 <!-- TMPL_IF name="toggle" -->
-            <tr class="hilighted">
-                <!-- TMPL_ELSE -->
-	<tr>
-	          <!-- /TMPL_IF -->
-                    
-               <td><a href="/cgi-bin/koha/cataloguing/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button serial" title="Biblio"><!-- TMPL_VAR name="biblionumber" --></a></td>
-       <td>
-                <!-- TMPL_IF name="ISSN" -->
-                   <a href="serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button serial" title="Issues history"><!-- TMPL_VAR name="ISSN" --></a>   
-                <!-- /TMPL_IF -->
-             </td>
-               
-                    <td>
-            
-                <!-- TMPL_IF name="title" -->
-                    <!-- TMPL_VAR name="title" -->
-                <!-- TMPL_ELSE -->
-                    |
-                <!-- /TMPL_IF -->
-                </td>
-                
-                    <td>
-             
-                <!-- TMPL_IF name="notes" -->(<!-- TMPL_VAR name="notes" -->)<!-- /TMPL_IF -->
-                </td>
-                <!-- TMPL_IF NAME="routing" -->
-                        <td>
-                        <a href="routing.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" --><!-- TMPL_UNLESS NAME="routingedit" -->&op=new<!-- /TMPL_UNLESS -->">Routing List</a>
-                    </td>
-                <!-- TMPL_ELSE -->
-                            <td>
-                            <a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial" title="subscription detail">Detail</a>
-                        </td>
-                            <td>
-                            <a href="serials-receive.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial" title="receive issues for this subscription">Receive</a>
-                        </td>
-                <!-- /TMPL_IF -->
-
-            </tr>
-        <!-- /TMPL_LOOP -->
-    </table>
-    
-    <!-- TMPL_IF NAME="routing" -->
-    <!-- TMPL_ELSE -->
-        <!-- TMPL_IF NAME="alt_links" -->
-            <a href="/cgi-bin/koha/serials/alt_subscription-add.pl" class="button serial">Add subscription</a>	      
-        <!-- TMPL_ELSE -->      
-            <a href="/cgi-bin/koha/serials/subscription-add.pl" class="button serial">Add subscription</a>
-        <!-- /TMPL_IF -->
-    <!-- /TMPL_IF -->
-</div>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/serials/serials-receive.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/serials-receive.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/serials-receive.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/serials-receive.tmpl	11 Sep 2006 17:41:55 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,187 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
-
-
-
-
-<!--------------------------MAIN BODY OF PAGE-------------------------->
-
-<h1 class="serial">Subscription for <!-- TMPL_VAR name="bibliotitle" --></h1>
-<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial" title="detail of the subscription">Subscription</a>
-<a href="/cgi-bin/koha/serials/serials-home.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button serial" title="all subscriptions on <!-- TMPL_VAR name="title" -->">Subscriptions</a>
-<a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button serial" title="go to <!-- TMPL_VAR name="title" -->">Back to biblio</a>
-
-<div id="bloc25">
-<h2 class="serial">waited or late numbers</h2>
-    <form method="post" name="f" id="f" action="serials-receive.pl">
-        <input type="hidden" name="op" value="serialchangestatus">
-        <input type="hidden" name="serial" value="<!-- TMPL_VAR name="serial" -->">
-        <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
-        <input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->">
-    <table class="small">
-    <tr>
-        <th class="serial">
-            Numbered
-        </th>
-       <th class="serial">
-            Published on
-        </th>	
-        <th class="serial">
-            Planned for
-        </th>
-        <th class="serial">
-            Status
-        </th>
-        <th class="serial">
-            Notes
-        </th>
-    </tr>
-    <!-- TMPL_LOOP name="serialslist" -->
-        <tr>
-            <td>
-                <input type="text" name="serialseq" value="<!-- TMPL_VAR name="serialseq" -->" size=30 maxlength=100>
-            </td>
-	  <td>
-                <input type="text" name="publisheddate" value="<!-- TMPL_VAR name="publisheddate" -->" size=10 maxlength=15>
-            </td>
-            <td>
-                <input type="text" name="planneddate" value="<!-- TMPL_VAR name="planneddate" -->" size=10 maxlength=15>
-            </td>
-            <td>
-                <input type="hidden" id="serialidnumber" name="serialid" value="<!-- TMPL_VAR name="serialid" -->">
-                <select name="status" size="1"   <!--TMPL_IF name="serialsadditems" -->onChange="javascript:AddItemRefresh();"<!--/TMPL_IF-->>
-                    <!--TMPL_IF name="status1" -->
-                        <option value="1" selected>Waited</option>
-                    <!-- /TMPL_IF -->
-                    <!--TMPL_IF name="status2" -->
-                        <option value="2" selected>Arrived</option>
-                    <!-- TMPL_ELSE -->
-                        <option value="2">Arrived</option>
-                    <!-- /TMPL_IF -->
-                    <!--TMPL_IF name="status3" -->
-                        <option value="3" selected>Late</option>
-                    <!-- TMPL_ELSE -->
-                        <option value="3">Late</option>
-                    <!-- /TMPL_IF -->
-                    <!--TMPL_IF name="status4" -->
-                        <option value="4" selected>Missing</option>
-                    <!-- TMPL_ELSE -->
-                        <option value="4">Missing</option>
-                    <!-- /TMPL_IF -->
-                    <!--TMPL_IF name="status5" -->
-                        <option value="5" selected>Not published</option>
-                    <!-- TMPL_ELSE -->
-                        <option value="5">Not published</option>
-                    <!-- /TMPL_IF -->
-                    <!--TMPL_IF name="status6" -->
-                        <option value="6" selected>Delete</option>
-                    <!-- TMPL_ELSE -->
-                        <option value="6">Delete</option>
-                    <!-- /TMPL_IF -->
-                </select>
-            </td>
-            <td>
-                <input type="text" name="notes" value="<!-- TMPL_VAR name="notes" -->" size=20 maxlength=255>
-            </td>
-<!--TMPL_IF name="serialsadditems" -->
-	<td>    <input type="hidden" id="serial<!-- TMPL_VAR name="serialid" -->" name="itemnumber" value="<!-- TMPL_VAR name="itemnumber" -->" />
-		<input type="hidden" id="holdingbranch<!-- TMPL_VAR name="serialid" -->" name="holdingbranch" value="" />
-	             <a  style="display:none;" href="javascript:AddItem('<!-- TMPL_VAR name="scriptaddserials" -->',<!-- TMPL_VAR name="serialid" -->)" name="addbutton" class="button serial" onblur="javascript:AddItemRefresh();">Add item</a>
-	</td>
-<!--/TMPL_IF-->     
-            <td>
-                <a href="javascript:PrintList(<!-- TMPL_VAR name="subscriptionid" -->,'<!-- TMPL_VAR name="serialseq" -->')" class="button serial">print</a>
-            </td>
-        </tr>
-    <!-- /TMPL_LOOP -->
-    <!-- TMPL_UNLESS name="hassubscriptionexpired" -->
-        <tr>
-            <td>
-                Manual issue <input type="text" name="serialseq" size=30 maxlength=100>
-            </td>
- <td>
-                <input type="text" name="publisheddate" size=10 maxlength=15>
-            </td>
-            <td>
-                <input type="text" name="planneddate" size=10 maxlength=15>
-            </td>
-            <td>
-                <input type="hidden" name="serialid" value="0">
-                <select name="status" size="1" <!--TMPL_IF name="serialsadditems" -->onChange="javascript:AddItemRefresh();"<!--/TMPL_IF-->>
-                        <option value="2">Arrived</option>
-                        <option value="3" selected>Late</option>
-                        <option value="4">Missing</option>
-                </select>
-            </td>
-      <!--TMPL_IF name="serialsadditems" -->
-	<td>    <input type="hidden" id="serial0" name="itemnumber" value="0" />
-		<input type="hidden" id="holdingbranch0" name="holdingbranch" value="" />
-	             <a  style="display:none;" href="javascript:AddItem('<!-- TMPL_VAR name="scriptaddserials" -->',0)" name="addbutton" class="button serial" onblur="javascript:AddItemRefresh();">Add item</a>
-	</td>
-<!--/TMPL_IF-->   
-	
-   </tr>
-	
-    <!-- /TMPL_UNLESS -->
-    </table>
-    <input type="submit" value="Save changes" accesskey="w" class="button serial">
-    <!-- TMPL_IF name="hassubscriptionexpired" -->
-        <p>Subscription has expired. Waited last issue status can't be changed. <a href="#" onClick="popup()" class="button serial">Renew</a> your subscription</p>
-    <!-- /TMPL_IF -->
-    </form>
-</div>
-
-<div id="bloc25">
-    <h2 class="serial">Subscription summary</h2>
-    <form method="post" name="f" action="serials-receive.pl">
-        <input type="hidden" name="op" value="modsubscriptionhistory">
-        <input type="hidden" name="serial" value="<!-- TMPL_VAR name="serial" -->">
-        <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
-        <input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->">
-        <p><label>Librarian</label><!-- TMPL_VAR name="user" --></p>
-        <p><label class="label100">Beginning date (*)</label><input type="text" name="histstartdate" value="<!-- TMPL_VAR name="histstartdate" -->" READONLY></p>
-        <p><label class="label100">End date</label><input type="text" name="enddate" value="<!-- TMPL_VAR name="enddate" -->" READONLY></p>
-        <p>received issues</p>
-        <p>&nbsp;<textarea name="receivedlist" COLS=60 ROWS=5><!-- TMPL_VAR name="receivedlist" --></textarea></p>
-        <p>Missing issues</p>
-        <p>&nbsp;<textarea name="missinglist" COLS=60 ROWS=2><!-- TMPL_VAR name="missinglist" --></textarea></p>
-        <!--TMPL_IF Name="notissuedlist"-->
-        <p>Not issued</p>
-        <p>&nbsp;<textarea name="notissuedlist" COLS=60 ROWS=2><!-- TMPL_VAR name="notissuedlist" --></textarea></p>
-        <!--/TMPL_IF-->
-        <p>Opac's note</p>
-        <p>&nbsp;<textarea name="opacnote" COLS=60 ROWS=5><!-- TMPL_VAR name="opacnote" --></textarea></p>
-        <input type="submit" value="Save changes" class="button serial">
-    </form>
-</div>
-
-</table>
-<script language="JavaScript" type="text/javascript">
-
-function popup() {
-     window.open("subscription-renew.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid">","subscription_renewal",'width=700,height=400,toolbar=false,scrollbars=yes');
-}
-function AddItem(itemscript,serial) {
-     window.open(itemscript+serial,"AddItem",'width=700,height=400,toolbar=no,scrollbars=yes,status=yes');
-
-}
-function PrintList(subscriptionid,serialseq) {
-
-    window.open("printlist.pl?subscriptionid="+subscriptionid+"&serialseq="+serialseq);
-}
-function AddItemRefresh(){
-var subf=document.getElementsByName('status');
-var adder=document.getElementsByName('addbutton');
-var itemnos=document.getElementsByName('itemnumber');
-     for (var s=0; s<subf.length; s++ ){
-	if (subf.item(s).value == 2 && itemnos.item(s).value==0){
-	adder.item(s).style.display = 'block';
-	}else{
-	adder.item(s).style.display = 'none';
-	}
-     }
-}
-
-</script>
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/serials/subscription-add.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/subscription-add.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/subscription-add.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/subscription-add.tmpl	11 Sep 2006 17:41:55 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,1025 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!--TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
-
-
-
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
-
-
-<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar-en.js"></script>
-<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar-setup.js"></script>
-<!-- **************************************************** -->
-
-
-<script type="text/javascript" language="javascript">
-// the english words used in display purposes
-var text = new Array('Number','Volume','Issue','Month','Week','Starting with:','Rollover at:','Choose Hemisphere:','Northern','Southern',
-'Autumn','Winter','Spring','Summer','Fall','Season','Year');
-var is_season = 0;
-var is_hemisphere = 1;
-
-// common pre defined number patterns
-function num_pattern() {
-var patternchoice = document.getElementById("numberpattern").value;
-	switch(patternchoice){
-	case "2":
-	 	document.f.add1.value=1;
-	 	document.f.add2.value=1;
-	 	document.f.add3.value=1;
-		document.f.every1.value=12;
-		document.f.every2.value=1;
-		document.f.every3.value=1;
-		document.f.whenmorethan1.value=9999999;
-		document.f.whenmorethan2.value=12;
-		document.f.whenmorethan3.value=4;
-		document.f.setto1.value=0;
-		document.f.setto2.value=1;
-		document.f.setto3.value=1;
-		document.f.lastvalue1.value=1;
-		document.f.lastvalue2.value=1;
-		document.f.lastvalue3.value=1;
-		document.f.numberingmethod.value='Vol {X}, No {Y}, Issue {Z}';
-		moreoptions(text[1],text[0],text[2]);
-		display_table(0); // toggle info box on (1) or off (0)
-		break;
-	case "3":
-	 	document.f.add1.value=1;
-	 	document.f.add2.value=1;
-	 	document.f.add3.value='';
-		document.f.every1.value=12;
-		document.f.every2.value=1;
-		document.f.every3.value='';
-		document.f.whenmorethan1.value=9999999;
-		document.f.whenmorethan2.value=12;
-		document.f.whenmorethan3.value='';
-		document.f.setto1.value=0;
-		document.f.setto2.value=1;
-		document.f.setto3.value='';
-		document.f.lastvalue1.value=1;
-		document.f.lastvalue2.value=1;
-		document.f.lastvalue3.value='';
-		document.f.numberingmethod.value='Vol {X}, No {Y}';
-		moreoptions(text[1],text[0]);
-		display_table(0);
-		break;
-	case "4":
-	 	document.f.add1.value=1;
-	 	document.f.add2.value=1;
-	 	document.f.add3.value='';
-		document.f.every1.value=12;
-		document.f.every2.value=1;
-		document.f.every3.value='';
-		document.f.whenmorethan1.value=9999999;
-		document.f.whenmorethan2.value=12;
-		document.f.whenmorethan3.value='';
-		document.f.setto1.value=0;
-		document.f.setto2.value=1;
-		document.f.setto3.value='';
-		document.f.lastvalue1.value=1;
-		document.f.lastvalue2.value=1;
-		document.f.lastvalue3.value='';
-		document.f.numberingmethod.value='Vol {X}, Issue {Y}';
-		moreoptions(text[1],text[2]);
-		display_table(0);
-		break;
-	case "5":
-	 	document.f.add1.value=1;
-	 	document.f.add2.value=1;
-	 	document.f.add3.value='';
-		document.f.every1.value=12;
-		document.f.every2.value=1;
-		document.f.every3.value='';
-		document.f.whenmorethan1.value=9999999;
-		document.f.whenmorethan2.value=12;
-		document.f.whenmorethan3.value='';
-		document.f.setto1.value=0;
-		document.f.setto2.value=1;
-		document.f.setto3.value='';
-		document.f.lastvalue1.value=1;
-		document.f.lastvalue2.value=1;
-		document.f.lastvalue3.value='';
-		document.f.numberingmethod.value='No {X}, Issue {Y}';
-		moreoptions(text[0],text[2]);
-		display_table(0);
-		break;
-	case "6":
-		var d = new Date();
-		var sYear = d.getFullYear();
-	 	document.f.add1.value=1;
-	 	document.f.add2.value='1';
-	 	document.f.add3.value='';
-		document.f.every1.value=4;
-		document.f.every2.value='1';
-		document.f.every3.value='';
-		document.f.whenmorethan1.value=9999999;
-		document.f.whenmorethan2.value='4';
-		document.f.whenmorethan3.value='';
-		document.f.setto1.value=0;
-		document.f.setto2.value='1';
-		document.f.setto3.value='';
-		document.f.lastvalue1.value=sYear;
-		document.f.lastvalue2.value='1';
-		document.f.lastvalue3.value='';
-		document.f.periodicity.value='8';
-		document.f.numberingmethod.value='{Y} {X}';
-		moreoptions_seasons(text[15],sYear);
-		display_table(0);
-		is_season = 1;
-		break;
-	case "7":
-		display_table(1);
-		document.f.irreg_check.value=1; 
-		break;
-	default:
-	 	document.f.add1.value=1;
-	 	document.f.add2.value='';
-	 	document.f.add3.value='';
-		document.f.every1.value=1;
-		document.f.every2.value='';
-		document.f.every3.value='';
-		document.f.whenmorethan1.value=9999999;
-		document.f.whenmorethan2.value='';
-		document.f.whenmorethan3.value='';
-		document.f.setto1.value=0;
-		document.f.setto2.value='';
-		document.f.setto3.value='';
-		document.f.lastvalue1.value=1;
-		document.f.lastvalue2.value='';
-		document.f.lastvalue3.value='';
-		document.f.numberingmethod.value='{X}';
-		moreoptions_daily_check(text[0]);
-		document.f.irreg_check.value=1;
-		display_table(0);
-		break;
-	}
-}
-
-function display_table(n) {
-	if(n==1){
-		document.getElementById("basetable").style.display = 'block';
-	} else {
-		document.getElementById("basetable").style.display = 'none';
-	}
-}
-
-function modify_num_pattern() {
-	document.getElementById("numberpattern").value = '<!-- TMPL_VAR NAME="numberpattern" -->';
-	num_pattern();
-	
-	document.f.add1.value='<!-- TMPL_VAR NAME="add1" -->';
-	document.f.add2.value='<!-- TMPL_VAR NAME="add2" -->';
-	document.f.add3.value='<!-- TMPL_VAR NAME="add3" -->';
-	document.f.every1.value='<!-- TMPL_VAR NAME="every1" -->';
-	document.f.every2.value='<!-- TMPL_VAR NAME="every2" -->';
-	document.f.every3.value='<!-- TMPL_VAR NAME="every3" -->';
-	document.f.whenmorethan1.value='<!-- TMPL_VAR NAME="whenmorethan1" -->';
-	document.f.whenmorethan2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
-	document.f.whenmorethan3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
-	document.f.setto1.value='<!-- TMPL_VAR NAME="setto1" -->';
-	document.f.setto2.value='<!-- TMPL_VAR NAME="setto2" -->';
-	document.f.setto3.value='<!-- TMPL_VAR NAME="setto3" -->';
-	document.f.lastvalue1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
-	document.f.lastvalue2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
-	document.f.lastvalue3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
-	document.f.numberingmethod.value='<!-- TMPL_VAR NAME="numberingmethod" -->';
-
-	var more_strY;
-	var more_strZ;
-	<!-- TMPL_IF NAME="add2" -->
-	if(<!-- TMPL_VAR NAME="add2" --> > 0){
-		more_strY="Y";
-	}
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="add3" -->
-	if(<!-- TMPL_VAR NAME="add3" --> > 0){
-		more_strZ="Z";
-	}
-	<!-- /TMPL_IF -->
-
-	document.f.lastvaluetemp1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
-	if(more_strY){
-		document.f.lastvaluetemp2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
-	document.f.whenmorethantemp2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
-	}
-	if(more_strZ){
-		document.f.lastvaluetemp3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
-	document.f.whenmorethantemp3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
-	}
-}
-
-// a pre check with more options to see if 'number' and '1/day' are chosen
-function moreoptions_daily_check(x) {
-	var periodicity = document.f.periodicity.value;
-	var errortext='';
-	if(periodicity == 1){
-		document.getElementById("irregularity").innerHTML = '';
-		document.getElementById("more_options").innerHTML = '';
-		var daynames = new Array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');
-		errortext ="Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>";
-		for(var j=0;j<daynames.length;j++){
-			errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+daynames[j]+" &nbsp; ";
-		}
-	var error = errortext;
-	document.getElementById("irregularity").innerHTML = error;
-	} else {
-		document.getElementById("irregularity").innerHTML = '';
-		document.getElementById("more_options").innerHTML = '';
-		moreoptions(x);
-	}
-}
-
-// to dispaly the more options section
-function moreoptions(x,y,z){
-document.getElementById("irregularity").innerHTML = '';
-document.getElementById("more_options").innerHTML = '';
-var textbox = '';
-	// alert("X: "+x+"Y: "+y+"Z: "+z);
-	if(x){
-		textbox +="<table>\n<tr><td>&nbsp;<\/td><td>"+x+"<\/td>";
-		if(y){
-			textbox +="<td>"+y+"<\/td>";
-			if(z){
-				textbox +="<td>"+z+"<\/td>";
-			}
-		}
-		textbox +="<\/tr>\n";
-		textbox +="<tr><td>"+text[5]+"<\/td><td><input type='text' name='lastvaluetemp1' size='4' onkeyup='moreoptionsupdate(\"lastvalue1\")'><\/td>\n";
-		if(y){
-			textbox +="<td><input type='text' name='lastvaluetemp2' size='4' onkeyup='moreoptionsupdate(\"lastvalue2\")'><\/td>\n";
-			if(z){
-				textbox +="<td><input type='text' name='lastvaluetemp3' size='4' onkeyup='moreoptionsupdate(\"lastvalue3\")'><\/td>\n";
-			}
-		}
-		textbox +="<\/tr>\n";
-		if(y){
-			textbox +="<tr><td>"+text[6]+"<\/td>";
-			textbox +="<td><a href='javascript:irregularity_check()'>Irregularity?<\/a><\/td>\n";
-			textbox +="<td><input type='text' name='whenmorethantemp2' size='4' onkeyup='moreoptionsupdate(\"whenmorethan2\",1)'><\/td>\n";
-			if(z){
-				textbox +="<td><input type='text' name='whenmorethantemp3' size='4' onkeyup='moreoptionsupdate(\"whenmorethan3\",1)'><\/td>\n";
-			}
-			textbox +="<\/tr>";
-		}
-		textbox +="<\/table>\n";
-	}
-	document.getElementById("more_options").innerHTML = textbox;
-}
-
-function hemispheres(chosen){
-var selbox = document.getElementById("season1");
-    if(selbox){
-	var selboxselected = selbox.options[selbox.selectedIndex].value;
-	selbox.options.length = 0;
-
-	if (chosen == "1") {
-		selbox.options[selbox.options.length] = new Option(text[11],'1');
-		selbox.options[selbox.options.length] = new Option(text[12],'2');
-		selbox.options[selbox.options.length] = new Option(text[13],'3');
-		selbox.options[selbox.options.length] = new Option(text[14],'4');
-		is_hemisphere = 1;
-		selbox.options[selboxselected-1].selected = true;
-	}
-
-	if (chosen == "2") {
-		selbox.options[selbox.options.length] = new Option(text[13],'1');
-		selbox.options[selbox.options.length] = new Option(text[10],'2');
-		selbox.options[selbox.options.length] = new Option(text[11],'3');
-		selbox.options[selbox.options.length] = new Option(text[12],'4');
-		is_hemisphere = 2;
-		selbox.options[selboxselected-1].selected = true;
-	}
-    }
-}
-
-// to dispaly the more options section for seasons
-function moreoptions_seasons(x,y){
-document.getElementById("irregularity").innerHTML = '';
-document.getElementById("more_options").innerHTML = '';
-var textbox = '';
-	// alert("X: "+x+"Year: "+y);
-	if(x){
-		var hemi_select = parseInt('<!-- TMPL_VAR NAME="hemisphere" -->');
-		textbox +="<table>\n<tr><td>"+ text[7]  +"<\/td><td colspan='2'><select name='hemisphere' onchange='hemispheres(this.options[this.selectedIndex].value)'>";
-		for(var i = 1; i <= 2; i++){
-			textbox +="<option value='"+i+"'";
-			if(i == hemi_select){
-				textbox += " selected "
-			}
-			textbox +=">"+text[i+7]+"<\/option>";
-		}
-		textbox +="<\/select><\/td><\/tr>\n";
-		textbox +="<tr><td>&nbsp;<\/td><td>"+x+"<\/td>";
-		textbox +="<td>"+text[16]+"<\/td>";
-		textbox +="<\/tr>\n";
-		textbox +="<tr><td>"+text[5]+"<\/td><td><select name='lastvaluetemp2' id='season1' onchange='moreoptionsupdate(\"lastvalue2\")'>";
-		for(var j = 1; j <= 4; j++){
-			textbox +="<option value='"+j+"'>"+text[j+10]+"<\/option>";
-		}
-		textbox +="<\/select><\/td><td><select name='lastvaluetemp1' onchange='moreoptionsupdate(\"lastvalue1\")'>";
-		for(var k = parseInt(y); k <= parseInt(y)+15; k++){
-			textbox +="<option value='"+k+"'>"+k+"<\/option>";
-		}
-		textbox +="<\/select><\/td><\/tr>\n";
-		textbox +="<tr><td>"+text[6]+"<\/td>";
-		textbox +="<td><a href='javascript:irregularity_check()'>Irregularity?<\/a><\/td>\n";
-		textbox +="<td><input type='text' name='whenmorethantemp2' size='4' onkeyup='moreoptionsupdate(\"whenmorethan2\",1)'><\/td>\n";
-    	        textbox +="<\/tr><\/table>\n";
-	}
-	document.getElementById("more_options").innerHTML = textbox;
-}
-
-function irregularity_check(){
-	document.f.irreg_check.value = 1; // Irregularity button now pushed
-	var periodicity = document.f.periodicity.value;
-	var rollover = document.f.whenmorethantemp2.value;
-	if(document.f.whenmorethantemp3){
-		rollover = document.f.whenmorethantemp3.value;
-	}
-	var error='';
-	var toobig;
-	var expected; 
-	var errortext = "<b>Warning irregularity detected<\/b><br \/>";
-	switch(periodicity){
-	case "1":
-		if(rollover < 365) expected =365;
-		if(rollover > 365) {
-			expectedover=365;
-			toobig=1;
-		}
-		break;
-	case "2":
-		if(rollover < 52) expected =52;
-		if(rollover > 52){
-			expectedover=52;
-			toobig=1;
-		}
-		break;
-	case "3":
-		if(rollover < 26) expected =26;
-		if(rollover > 26){
-			expectedover=26;
-			toobig=1;
-		}
-		break;
-	case "4":
-		if(rollover < 17) expected =17;
-		if(rollover > 17){
-			expectedover=17;
-			toobig=1;
-		}
-		break;
-	case "5":
-		if(rollover < 12) expected =12;
-		if(rollover > 12){
-			expectedover=12;
-			toobig=1;
-		}
-		break;
-	case "6":
-		if(rollover < 6) expected =6;
-		if(rollover > 6){
-			expectedover=6;
-			toobig=1;
-		}
-		break;
-	case "7":
-		if(rollover < 4) expected =4;
-		if(rollover > 4){
-			expectedover=4;
-			toobig=1;
-		}
-		break;
-	case "8":
-		if(rollover < 4) expected =4;
-		if(rollover > 4){
-			expectedover=4;
-			toobig=1;
-		}
-		break;
-	case "9":
-		if(rollover < 2) expected =2;
-		if(rollover > 2){
-			expectedover=2;
-			toobig=1;
-		}
-		break;
-	case "10":
-		if(rollover < 1) expected =1;
-		if(rollover > 1){
-			expectedover=1;
-			toobig=1;
-		}
-		break;
-	default:
-		break;
-	}
-	if(expected){
-		if(expected == 365){
-			var daynames = new Array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');
-			errortext +="Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>";
-			for(var j=0;j<daynames.length;j++){
-				errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+daynames[j]+" &nbsp; ";
-			}
-			error=errortext;
-		} else {
-			errortext +=expected+" issues expected "+rollover+" were entered. <br \/>Please indicate which date(s) an issue is not expected<br \/>";
-			var count=0;
-			for(var i=rollover;i<expected;i++){
-				errortext +="<select name='irregular' id='irregular"+count+"' onchange='display_example(expected)'>\n";
-				errortext +=irregular_options(periodicity);
-				errortext +="<\/select>\n";
-				count++;
-			}
-			error=errortext;
-		}
-	}
-	if(toobig){
-		errortext +=expectedover+" issues expected "+rollover+" were entered.<br \/> You seem to have indicated more issues per year than expected.";
-		error=errortext;
-	}
-	if(error.length ==0){
-		error='No irregularities noticed';
-	}
-	display_example(expected);
-	document.getElementById("irregularity").innerHTML = error;
-}
-
-function irregular_options(periodicity){
-	var titles;
-	var count;
-<!-- TMPL_IF NAME="weekarrayjs" -->
-	var weeks = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
-<!-- /TMPL_IF -->
-	var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
-	var seasons = new Array('Autumn','Winter','Spring','Summer','Fall');
-	var errortext='';
-	if(periodicity == 1) {
-		expected = 366;
-		titles = "Day";
-		count = 1;
-	}
-	if(periodicity == 2 || periodicity == 3 || periodicity == 4) { 
-		expected = 52;
-	<!-- TMPL_IF NAME="weekarrayjs" -->
-		titles = weeks;
-		count = <!-- TMPL_VAR NAME="weekno" -->;
-	<!-- TMPL_ELSE -->
-		titles = "Week";
-		count = 1;
-	<!-- /TMPL_IF -->
-	}
-	if(periodicity == 5 || periodicity == 6 || periodicity == 7 || periodicity == 8 || periodicity == 9) {
-		if(periodicity == 8) {
-			is_season = 1; // setting up from edit page
-		} 
-		if(is_season){
-			titles = seasons;
-			expected = 4;
-			if(is_hemisphere == 2){
-				count = 2;
-			} else {
-				count = 1;
-			}
-		} else {
-			titles = months;
-			expected = 12;
-			count = 1;
-		}
-	}
-	for(var j=1;j<=expected;j++){
-		if(isArray(titles)){
-			if(count>expected){
-				count = count-expected;
-			}
-			if(is_season && is_hemisphere == 1){
-				errortext +="<option value='"+((count*3)-2)+"'>"+titles[j]+"<\/option>\n";
-// alert("value: "+((count*3)-2)+" title: "+titles[j]);
-			} else if(is_season && is_hemisphere == 2){
-				errortext +="<option value='"+((count*3)-2)+"'>"+titles[j-1]+"<\/option>\n";
-// alert("value: "+((count*3)-2)+" title: "+titles[j-1]);
-			} else {
-				errortext +="<option value='"+count+"'>"+titles[j-1]+"<\/option>\n";
-			}
-			count++;
-		} else {
-			errortext +="<option value='"+j+"'>"+titles+" "+j+"<\/option>\n";
-		}
-	}
-	return errortext;
-}
-
-function irregular_order(){
-	var irregular = '<!-- TMPL_VAR NAME="irregularity" -->';
-	var periodicity = document.f.periodicity.value;
-	var irregarray = irregular.split('|');
-	if(periodicity ==1){
-		for(j=0;j<irregarray.length;j++){
-		document.getElementById("irregular"+irregarray[j]).checked = true; 
-		}
-	} else {
-		for(i=0;i<irregarray.length;i++){    
-			document.getElementById("irregular"+i).value = irregarray[i];
-		}
-	}
-}
-
-function display_example(expected){
-	var startfrom1 = parseInt(document.f.lastvalue1.value);
-	var startfrom2 = parseInt(document.f.lastvalue2.value);
-	var startfrom3 = parseInt(document.f.lastvalue3.value);
-	var every1 = parseInt(document.f.every1.value);
-	var every2 = parseInt(document.f.every2.value);
-	var every3 = parseInt(document.f.every3.value);
-	var numberpattern = document.f.numberingmethod.value;
-	var whenmorethan2 = parseInt(document.f.whenmorethan2.value);
-	var whenmorethan3 = parseInt(document.f.whenmorethan3.value);
-	var setto2 = parseInt(document.f.setto2.value);
-	var setto3 = parseInt(document.f.setto3.value);
-	var displaytext = 'Based on the information<br \/>entered the Numbering Pattern<br \/>will look like this<br \/>\n';
-	if(startfrom3>0){
-		var count=startfrom3-1;
-		var count2=startfrom2;
-		for(var i=0;i<12;i++){
-			if(count>=whenmorethan3){
-				count=setto3;
-				if(count2>=whenmorethan2){
-					startfrom1++;
-					count2=setto2;
-				} else {
-					count2++;
-				}
-			} else {
-				count++;
-			}
-			displaytext += numberpattern.replace(/{Z}/,count)+'\n';
-			displaytext = displaytext.replace(/{Y}/,count2)+'<br \/>\n';
-			displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
-
-		}
-	}
-	if(startfrom2>0 && !startfrom3){
-		var count=startfrom2-1;
-		for(var i=0;i<12;i++){
-			if(count>=whenmorethan2){
-				startfrom1++;
-				count=setto2;
-			} else {
-				count++;
-			}
-
-			if(is_season){
-				if(is_hemisphere == 2){
-					if(count == 1) {
-						displaytext += numberpattern.replace(/{Y}/,text[count+12])+'\n';
-					} else {
-						displaytext += numberpattern.replace(/{Y}/,text[count+8])+'\n';
-					}
-				} else {
-				displaytext += numberpattern.replace(/{Y}/,text[count+10])+'\n';
-				}
-			} else {
-				displaytext += numberpattern.replace(/{Y}/,count)+'\n';
-			}
-			displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
-		}
-	}
-	if(startfrom1>0 && !startfrom2 && !startfrom3){
-		for(var i=startfrom1;i<(startfrom1+12);i=i+(1*every1)){
-			startfrom1 = i;
-			displaytext += numberpattern.replace(/{X}/,startfrom1)+'<br \/>\n';
-		}
-	}
-	displaytext = "<div style='padding: 5px; background-color: #CCCCCC'>"+displaytext+"<\/div>";
-	document.getElementById("displayexample").innerHTML = displaytext;
-}
-
-function isArray(obj) {
-   if (obj.constructor.toString().indexOf("Array") == -1)
-      return false;
-   else
-      return true;
-}
-
-function moreoptionsupdate(fieldnames,rollover){
-	fieldname = fieldnames;
-	fld = fieldname.length;
-	fld = fld-1;
-	fieldnametempnumber = fieldname.substr(fld);
-	//alert(fieldnametempnumber);
-	fieldnametemp = fieldname.slice(0,-1)+"temp"+fieldnametempnumber;
-	// alert(fieldnametemp);
-	eval("document.f."+fieldname+".value = document.f."+fieldnametemp+".value");
-	if(rollover){
-		eval("document.f.every"+(fieldnametempnumber-1)+".value = document.f."+fieldnametemp+".value");
-	}
-}
-
-
-function check_input(e){
-	var unicode=e.charCode? e.charCode : e.keyCode
-	if (unicode!=8 && unicode !=46){ // if key isn't backspace or delete
-		if (unicode<48||unicode>57) { // if not a number
-			alert("Needs to be entered in digit form -eg 10");
-			return false // disable key press
-		}
-	}
-}
-
-</script>
-
-<div id="main">
-<!-- TMPL_IF name="mod" -->
-	<h1>Modify subscription</h1>
-	<form method="post" name="f" action="subscription-detail.pl">
-		<input type="hidden" name="op" value="modsubscription">
-		<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
-<!-- TMPL_ELSE -->
-	<h1>Add a subscription (Serial Holdings Record)</h1>
-	<form method="post" name="f">
-		<input type="hidden" name="op" value="addsubscription">
-<!-- /TMPL_IF -->
-		<input type="hidden" name="user" value="<!-- TMPL_VAR name="loggedinusername" -->">
-		<input type="hidden" name="irreg_check" value="0">
-
-
-<div id="bloc25">
-	<h2>Subscription information</h2>
-	<table border="0" cellspacing="5" cellpadding="0">
-	<tr><td>Librarian:</td>
-	    <td><!-- TMPL_VAR name="loggedinusername" --></td></tr>
-	<tr><td><label>Supplier:</label></td>
-	    <td><input type="text" name="aqbooksellerid" value="<!-- TMPL_VAR name="aqbooksellerid" -->" size="4"> (<input type="text" name="aqbooksellername" value="<!-- TMPL_VAR name="aqbooksellername" -->" disabled readonly>) <a href="#" onClick="FindAcqui(f)">Search for a Supplier</a></td>
-	<tr><td><label>Biblio</label></td>
-	    <td><input type="text" id="biblionumber"  name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" size="4"> (<input type="text" id="title" name="title" value="<!-- TMPL_VAR name="title" -->" disabled readonly>) <a href="#" onClick="Plugin(f)">Search for Biblio</a> | <a href="#" onClick="AddBiblio()">Create Biblio</a></td>
-	<tr><td><label>Call Number</label></td>
-	    <td><input type="text" name="callnumber" value="<!-- TMPL_VAR name="callnumber" -->" size="20"></td></tr>
-	<tr><td><label>Notes</label></td>
-	    <td><textarea name="notes" cols="30" rows="2"><!-- TMPL_VAR name="notes" --></textarea></td></tr>
-		<!-- TMPL_IF name="letters" -->
-			<tr><td><label>Enable issue alert</label>
-				<select name="letter">
-					<option value=""></option>
-					<!-- TMPL_LOOP name="letters" -->
-						<!-- TMPL_IF name="selected" -->
-							<option value="<!-- TMPL_VAR name="code" -->" selected><!-- TMPL_VAR name="name" --></option>
-						<!-- TMPL_ELSE -->
-							<option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
-						<!-- /TMPL_IF -->
-					<!-- /TMPL_LOOP -->
-				</select>
-			</td>
-		<!-- /TMPL_IF -->
-		<td><label>Distributed to </label><a href="#" onClick="DistributedTo()">...</a></td><tr>
-
-
-
-
-
-
-
-
-
-	<tr><td><b>Warning:</b></td>
-	    <td>
-		<ul>
-			<li>Remember you <b>must</b> have created a biblio <b>before</b> creating a subscription</li>
-			<li>You also must have selected a supplier if you want to ask for late issues</li>
-		</ul></td></tr>
-	</table>
-</div>
-<div id="bloc25">
-	<h2>Planning</h2>
-	<table border="0" cellspacing="5" cellpadding="0">
-	<tr><td><label class="label100">This issue publishes on:</label></td>
-	    <td> <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="button2" style="cursor: pointer;"  />
-
-<input type="text" name="publisheddate" value="<!-- TMPL_VAR name="publisheddate" -->" size=13 maxlength=10 id="acqui_date" style="border-width: 0px;">
-<!-- both scripts for calendar must follow the input field --> 
-                                        <script type="text/javascript">
-                                            Calendar.setup({
-                                                inputField:"acqui_date",
-                                                ifFormat       :   "%d/%m/%Y",
-                                                button         :   "button2",
-                                                align          :   "Tl"
-                                            });
-                                        </script>
-                                        <script type="text/javascript">
-                                            Calendar.setup({
-                                                inputField     :   "acqui_date",
-                                                ifFormat       :   "%d/%m/%Y",
-                                                button         :   "acqui_date",
-                                                align          :   "Tl"
-                                            });
-                                        </script></td>
-	    <td rowspan="5"><div id="displayexample"></div></td></tr>
-	<tr><td><label class="label100">Frequency: (*)</label></td>
-	    <td>	<select name="periodicity" size="1">
-				<option value="" selected>-- please choose --</option>
-				<option value="">Unknown</option>
-
-				<!-- TMPL_IF name="periodicity1" -->
-					<option value="1" selected>1/day</option>
-				<!-- TMPL_ELSE -->
-					<option value="1">1/day</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="periodicity2" -->
-					<option value="2" selected>1/week</option>
-				<!-- TMPL_ELSE -->
-					<option value="2">1/week</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="periodicity3" -->
-					<option value="3" selected>1/2 weeks (2/month)</option>
-				<!-- TMPL_ELSE -->
-					<option value="3">1/2 weeks (2/months)</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="periodicity4" -->
-					<option value="4" selected>1/3 weeks</option>
-				<!-- TMPL_ELSE -->
-					<option value="4">1/3 weeks</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="periodicity5" -->
-					<option value="5" selected>1/month</option>
-				<!-- TMPL_ELSE -->
-					<option value="5">1/month</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="periodicity6" -->
-					<option value="6" selected>1/2 months (6/year)</option>
-				<!-- TMPL_ELSE -->
-					<option value="6">1/2 months (6/year)</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="periodicity7" -->
-					<option value="7" selected>1/3 months (1/quarter)</option>
-				<!-- TMPL_ELSE -->
-					<option value="7">1/3 months (1/quarter)</option>
-				<!-- /TMPL_IF -->
-				<!-- periodicity8 is 1/quarter, exactly like periodicity7 but will use it for seasonal option -->
-				<!-- TMPL_IF name="periodicity8" -->
-					<option value="8" selected>1/quarter (seasonal)</option>
-				<!-- TMPL_ELSE -->
-					<option value="8">1/quarter (seasonal)</option>
-				<!-- /TMPL_IF -->
-
-				<!-- TMPL_IF name="periodicity9" -->
-					<option value="9" selected>2/years</option>
-				<!-- TMPL_ELSE -->
-					<option value="9">2/year</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="periodicity10" -->
-					<option value="10" selected>1/year</option>
-				<!-- TMPL_ELSE -->
-					<option value="10">1/year</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="periodicity11" -->
-					<option value="11" selected>1/2 years</option>
-				<!-- TMPL_ELSE -->
-					<option value="11">1/2 years</option>
-				<!-- /TMPL_IF -->
-			</select>
-	</td></tr>
-	<tr><td><label class="label100">Numbering Pattern:</label></td>
-	    <td><select name="numbering_pattern" size="1" id="numberpattern" onchange="num_pattern()">
-		<option value="" selected>-- please choose --</option>
-		<!-- TMPL_IF name="numberpattern1" -->
-			<option value="1" selected>Number</option>
-		<!-- TMPL_ELSE -->
-			<option value="1">Number</option>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="numberpattern2" -->
-			<option value="2" selected>Volume, Number, Issue</option>
-		<!-- TMPL_ELSE -->
-			<option value="2">Volume, Number, Issue</option>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="numberpattern3" -->
-			<option value="3" selected>Volume, Number</option>
-		<!-- TMPL_ELSE -->
-			<option value="3">Volume, Number</option>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="numberpattern4" -->
-			<option value="4" selected>Volume, Issue</option>
-		<!-- TMPL_ELSE -->
-			<option value="4">Volume, Issue</option>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="numberpattern5" -->
-			<option value="5" selected>Number, Issue</option>
-		<!-- TMPL_ELSE -->
-			<option value="5">Number, Issue</option>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="numberpattern6" -->
-			<option value="6" selected>Seasonal only</option>
-		<!-- TMPL_ELSE -->
-	 		<option value="6">Seasonal only</option>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="numberpattern7" -->
-			<option value="7" selected>None of the above</option>
-		<!-- TMPL_ELSE -->
-	 		<option value="7">None of the above</option>
-		<!-- /TMPL_IF -->
-
-		</select>
-<div id="more_options"></div>
-<div id="irregularity"></div></td></tr>
-	<tr><td><label class="label100">Planned to arrive on: (*)</label></td>
-	    <td><img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="button1" style="cursor: pointer;"  />
-<input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" size=13 maxlength=10 id="beginning_date" style="border-width: 0px;">
-<!-- both scripts for calendar must follow the input field --> 
-                                        <script type="text/javascript">
-                                            Calendar.setup({
-                                                inputField   : "beginning_date",
-                                                ifFormat     : "%d/%m/%Y",
-                                                button       : "button1",
-                                                align        : "Tl"
-                                            });
-                                        </script>
-                                        <script type="text/javascript">
-                                            Calendar.setup({
-                                                inputField   : "beginning_date",
-                                                ifFormat     : "%d/%m/%Y",
-                                                button       : "beginning_date",
-                                                align        : "Tl"
-                                            });
-                                        </script></td></tr>
-</table> 
-</div>
-
-<!--	<tr><td><label class="label100">Arrives on</label></td>
-	    <td>	<select name="dow" size="1">
-				<option value="">None</option>
-				<!-- TMPL_IF name="dow1" -->
-					<option value="1" selected>Monday</option>
-				<!-- TMPL_ELSE -->
-					<option value="1">Monday</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="dow2" -->
-					<option value="2" selected>Tuesday</option>
-				<!-- TMPL_ELSE -->
-					<option value="2">Tuesday</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="dow3" -->
-					<option value="3" selected>Wednesday</option>
-				<!-- TMPL_ELSE -->
-					<option value="3">Wednesday</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="dow4" -->
-					<option value="4" selected>Thursday</option>
-				<!-- TMPL_ELSE -->
-					<option value="4">Thursday</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="dow5" -->
-					<option value="5" selected>Friday</option>
-				<!-- TMPL_ELSE -->
-					<option value="5">Friday</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="dow6" -->
-					<option value="6" selected>Saturday</option>
-				<!-- TMPL_ELSE -->
-					<option value="6">Saturday</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="dow7" -->
-					<option value="7" selected>Sunday</option>
-				<!-- TMPL_ELSE -->
-					<option value="7">Sunday</option>
-				<!-- /TMPL_IF -->
-			</select></td></tr> -->
-
-<div id="bloc25">
-	<h2>Subscription length</h2>
-		<p><select name="subtype">
-<!-- TMPL_LOOP NAME="subtype" -->
-<option value="<!-- TMPL_VAR NAME="name" -->" <!-- TMPL_IF NAME="selected" --> selected="SELECTED" <!-- /TMPL_IF -->><!-- TMPL_VAR NAME="name" --></option>
-<!-- /TMPL_LOOP -->
-</select> <input type="text" name="sublength" value="<!-- TMPL_VAR name="sublength" -->" size="3" onkeypress="return check_input(event)"> (*) (enter amount in numerals)</p>
-
-</div>
-<div id="bloc25">
-	<h2>Numbering calculation</h2>
-	<p>Numbering formula: <input type="text" name="numberingmethod" value="<!-- TMPL_VAR name="numberingmethod" -->"></p>
-	<div id="basetable" style="display: none;">
-		<table class="small">
-			<tr>
-				<th>&nbsp;</th>
-				<th>X</th>
-				<th>Y</th>
-				<th>Z</th>
-			</tr>
-			<tr>
-				<td>Add</td>
-				<td>
-					<input type="text" name="add1" value="<!-- TMPL_VAR name="add1" -->">
-				</td>
-				<td>
-					<input type="text" name="add2" value="<!-- TMPL_VAR name="add2" -->">
-				</td>
-				<td>
-					<input type="text" name="add3" value="<!-- TMPL_VAR name="add3" -->">
-				</td>
-			</tr>
-			<tr>
-				<td>once every</td>
-				<td><input type="text" name="every1" value="<!-- TMPL_VAR name="every1" -->"></td>
-				<td><input type="text" name="every2" value="<!-- TMPL_VAR name="every2" -->"></td>
-				<td><input type="text" name="every3" value="<!-- TMPL_VAR name="every3" -->"></td>
-			</tr>
-			<tr>
-				<td>When more than</td>
-				<td><input type="text" name="whenmorethan1" value="<!-- TMPL_VAR name="whenmorethan1" -->"></td>
-				<td><input type="text" name="whenmorethan2" value="<!-- TMPL_VAR name="whenmorethan2" -->"></td>
-				<td><input type="text" name="whenmorethan3" value="<!-- TMPL_VAR name="whenmorethan3" -->"></td>
-			</tr>
-			<!-- TMPL_IF name="mod" -->
-			<tr>
-				<td>The loop is for instance</td>
-				<td><input type="text" name="innerloop1" value="<!-- TMPL_VAR name="innerloop1" -->"></td>
-				<td><input type="text" name="innerloop2" value="<!-- TMPL_VAR name="innerloop2" -->"></td>
-				<td><input type="text" name="innerloop3" value="<!-- TMPL_VAR name="innerloop3" -->"></td>
-			</tr>
-			<!-- /TMPL_IF -->
-			<tr>
-				<td>Set back to</td>
-				<td><input type="text" name="setto1" value="<!-- TMPL_VAR name="setto1" -->"></td>
-				<td><input type="text" name="setto2" value="<!-- TMPL_VAR name="setto2" -->"></td>
-				<td><input type="text" name="setto3" value="<!-- TMPL_VAR name="setto3" -->"></td>
-			</tr>
-			<tr>
-				<td>
-					<!-- TMPL_IF name="mod" -->
-						Last value
-					<!-- TMPL_ELSE -->
-						Begins with
-					<!-- /TMPL_IF -->
-				</td>
-				<td><input type="text" name="lastvalue1" value="<!-- TMPL_VAR name="lastvalue1" -->"></td>
-				<td><input type="text" name="lastvalue2" value="<!-- TMPL_VAR name="lastvalue2" -->"></td>
-				<td><input type="text" name="lastvalue3" value="<!-- TMPL_VAR name="lastvalue3" -->"></td>
-			</tr>
-		</table> </div>
-</div>
-<!-- TMPL_IF name="mod" -->
-	<input type="button" value="Save subscription" onclick="Check(this.form)" accesskey="w" class="button">
-<!-- TMPL_ELSE -->
-	<input type="button" value="Add subscription" onclick="Check(this.form)" accesskey="w" class="button">
-<!-- /TMPL_IF -->
-</form>
-
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
-
-<script language="JavaScript" type="text/javascript">
-
-function Plugin(f)
-{
-	 window.open('subscription-bib-search.pl','FindABibIndex','width=500,height=400,toolbar=no,scrollbars=yes');
-}
-
-function FindAcqui(f)
-{
-	 window.open('acqui-search.pl','FindASupplier','width=500,height=400,toolbar=no,scrollbars=yes');
-}
-
-function Find_ISSN(f)
-{
-	 window.open('issn-search.pl','FindABibIndex','width=500,height=400,toolbar=no,scrollbars=yes');
-}
-
-
-function Check(f) {
-	if (f.startdate.value.length != 0 && f.sublength.value > 0) {
-		if (f.irreg_check.value == 1) {
-			document.f.submit();
-		} else {
-			if(f.numbering_pattern.value == ''){
-				alert("need to choose a numbering pattern");
-			} else {
-				alert("need to check for irregularity by clicking 'Irregularity?'");
-			}
-		}
-	} else {
-	 	alert('field marked with * are mandatory');
-	}
-	return false;
-}
-function DistributedTo()
-{
-	newwin= window.open('distributedto.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->',"Distributed_to",'width=800,height=600,toolbar=false,scrollbars=yes');
-}
-function AddBiblio() {
-     window.open("/cgi-bin/koha/cataloguing/addbiblio.pl?fromserials=1&popup=1","AddBiblio",'width=700,height=400,toolbar=no,scrollbars=yes,status=yes');
-
-}
-</script>
-<!-- TMPL_IF name="mod" -->
-<script language="JavaScript" type="text/javascript">
-window.onload = modify_num_pattern();
-	<!-- TMPL_IF name="hemisphere" -->
-	window.onload = hemispheres(<!-- TMPL_VAR NAME="hemisphere" -->);
-	<!-- /TMPL_IF -->
-</script>
-<!-- /TMPL_IF -->
-<!-- TMPL_IF name="irregularity" -->
-<script language="JavaScript"  type="text/javascript">
-window.onload = irregularity_check();
-window.onload = irregular_order();
-</script>
-<!-- /TMPL_IF -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/serials/subscription-bib-search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/subscription-bib-search.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/subscription-bib-search.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/subscription-bib-search.tmpl	28 Sep 2006 14:25:22 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,74 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<div id="main-compact">
-
-<h1>Catalogue search</h1>
-
-<form name="f" action="/cgi-bin/koha/serials/subscription-bib-search.pl" method="post">
-	<input type="hidden" name="op" value="do_search" />
-	<input type="hidden" name="type" value="intranet" />
-	<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
-	<div class="data">
-		<table>
-		<caption>Search on</caption>
-		<tr><th scope="row"><label for="keyword">Search</label></th><td>
-			
-			<input type="hidden" name="and_or" value="@and" />
-			<input type="hidden" name="relation" value="@attr 5=1" /> 
-			<input type="text" id="keyword" name="value"> 
-		</td><td><select align="right" id="kohafield" name="kohafield" size="1">
-				<option value="any">Any field</option>
-				<option value="title">Title</option>
-				<option value="Author">Author</option>
-				<option value="ISSN">ISSN</option>
-			</select></td></tr>
-		<tr><th scope="row"><label for="itemtype">Itemtype</label></th><td>
-			<!-- TMPL_VAR name="CGIitemtype" -->
-			<input type="hidden" name="kohafield" value="itemtype" />
-			<input type="hidden" name="value" value="<!-- TMPL_VAR name="category" -->">
-		
-			<input type="hidden" name="and_or" value="@and" />
-			<input type="hidden" name="relation" value="@attr 5=1" />
-
-			<input type="hidden" name="index" value="<!-- TMPL_VAR name="index" -->" />
-		</td></tr>
-	</div>
-	<div class="data">
-		<tr><th scope="row"><label for="resultsperpage">Results per page :</label></th><td>
-			<select align="right" id="resultsperpage" name="resultsperpage" size="1">
-				<option value="10">10</option>
-				<option value="20">20</option>
-				<option value="50">50</option>
-			</select></td><td>
-		<label for="orderby">Ordered by</label>
-			<select id="orderby" name="order" size="1">
-				<option value="title i<">Title</option>
-				<option value="author i<">Author</option>
-					</select>
-		</td></tr>
-		</table>
-		<p>
-			<input type="submit" value="Start search" class="submit" />
-			
-		</p>
-	</div>
-</form>
-
-<script language="Javascript" type="text/javascript">
-function AddStatement() {
-
-	document.forms['f'].op.value="AddStatement";
-	document.f.submit();
-}
-
-function PopupSuggestion() {
-    var strQuery="";
-	for (i=0 ; i<document.f.marclist.length ; i++) {
-		if (document.f.value[i].value.length>0) {
-		    strQuery += " "+document.f.value[i].value;
-		}
-	}
-	newin=window.open("suggest.pl?Q="+strQuery,"Suggestions",'width=500,height=400,toolbar=false,scrollbars=yes');
-}
-
-</script>
-</div>

Index: koha-tmpl/intranet-tmpl/prog/en/serials/subscription-detail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/subscription-detail.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/subscription-detail.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/subscription-detail.tmpl	11 Sep 2006 17:41:55 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,417 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!--
-TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
-
-<script language="Javascript" type="text/javascript">
-<!--
-// the english words used in display purposes
-var text = new Array('Number','Volume','Issue','Month','Week','Starting with:','Rollover at:','Choose Hemisphere:','Northern','Southern',
-'Autumn','Winter','Spring','Summer','Fall','Season','Year');
-
-// common pre defined number patterns
-function num_pattern() {
-var patternchoice = '<!--TMPL_VAR NAME='numberpattern'-->';
-	switch(patternchoice){
-	case "2":
-		options(text[1],text[0],text[2]);
-		irregularity();
-		display_table(0);
-		break;
-	case "3":
-		options(text[1],text[0]);
-		irregularity();
-		display_table(0);
-		break;
-	case "4":
-		options(text[1],text[2]);
-		irregularity();
-		display_table(0);
-		break;
-	case "5":
-		options(text[0],text[2]);
-		irregularity();
-		display_table(0);
-		break;
-	case "6":
-		var d = new Date();
-		var sYear = d.getFullYear();
-		// options_seasons(text[15],sYear);
-		irregularity();
-		is_season = 1;
-		display_table(0);
-		break;
-	case "7":
-		display_table(1);
-		irregularity();
-		break;
-	default:
-		options(text[0]);
-		irregularity();
-		display_table(0);
-		break;
-	}
-}
-
-function display_table(n) {
-	if(n==1){
-		document.getElementById("basetable").style.display = 'block';
-	} else {
-		document.getElementById("basetable").style.display = 'none';
-	}
-}
-
-// to dispaly the options section
-function options(x,y,z){
-var textbox = '';
-	// alert("X: "+x+"Y: "+y+"Z: "+z);
-	if(x){
-		document.f.xfield.value = x;
-		if(y){
-			document.f.yfield.value = y;
-			if(z){
-				document.f.zfield.value = z;
-			}
-		}
-	}
-}
-
-function irregularity(){
-	var periodicity = '<!-- TMPL_VAR NAME="periodicity"-->';
-	switch(periodicity){
-	case "1":
-		var names = new Array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');
-		break;
-	case "2":
-		<!-- TMPL_IF NAME="weekarrayjs" -->
-		var names = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
-		<!-- /TMPL_IF -->
-		break;
-	case "3":
-		<!-- TMPL_IF NAME="weekarrayjs" -->
-		var names = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
-		<!-- /TMPL_IF -->
-		break;
-	case "4":
-		<!-- TMPL_IF NAME="weekarrayjs" -->
-		var names = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
-		<!-- /TMPL_IF -->
-		break;
-	case "5":
-		var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
-		break;
-	case "6":
-		var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
-		break;
-	case "7":
-		var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
-		break;
-	case "8":
-		var names = new Array('Autumn','Winter','Spring','Summer','Fall');
-		break;
-	case "9":
-		var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
-		break;
-	case "10":
-		expected =1;
-		break;
-	default:
-		break;
-	}
-
-	<!-- TMPL_IF NAME="irregularity" -->
-	var irregular = '<!-- TMPL_VAR NAME="irregularity" -->';
-	var irregarray = irregular.split('|');
-	var irregtext = '<p>';
-	for(var i=0;i<irregarray.length;i++){
-		irregtext += names[i]+' &nbsp;';
-	}
-	irregtext += '</p>';
-	document.getElementById("irreg").innerHTML = irregtext;
-	<!-- /TMPL_IF -->
-}
-
--->
-</script>
-
-
-<h1>Subscription Details for biblio :  <!-- TMPL_VAR name="biblionumber" --></h1>
-<form class="inline" method="get" action="subscription-add.pl">
-<input type="hidden" name="op" value="mod" />
-<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
-<input type="submit" class="submit" title="Modify subscription" value="Edit" /></form>
-
-<form class="inline" method="get" action="serials-receive.pl">
-<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
-<input type="submit" class="submit" value="Receive Issues" /></form>
-
-<form class="inline" method="get" action="serial-issues.pl">
-<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
-<input type="submit" class="submit"  title="All issues on this title" value="Issue History" /></form>
-
-<form class="inline" method="get" action="/cgi-bin/koha/serials/serials-home.pl">
-<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
-<input type="submit" class="submit"  title="all subscriptions on <!-- TMPL_VAR name="bibliotitle" -->" value="Subscriptions" /></form>
-
-<form class="inline" method="get" action="/cgi-bin/koha/catalogue/MARCdetail.pl">
-<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
-<input type="submit" class="submit"  title="go to <!-- TMPL_VAR name="bibliotitle" -->" value="View Biblio Record" /></form>
-
-<form class="inline"><input type="submit" class="cancel" value="Delete Subscription" onclick="confirm_deletion(); return false;" /></form>
-<!-- TMPL_IF NAME="routing" -->
-<form class="inline" method="get" action="/cgi-bin/koha/serials/routing.pl">
-<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
-<input type="submit"  class="submit" value="Edit Routing List"/></form>
-<!-- TMPL_ELSE -->
-<form class="inline" method="get" action="/cgi-bin/koha/serials/routing.pl">
-<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
-<input type="hidden" name="op" value="new" />
-<input type="submit"  class="submit" value="Create Routing List"/></form>
-<!-- /TMPL_IF -->
-
-<table>
-<tr valign="top"><td>
-
-<div class="bloc25">
-	<h2>Subscription information</h2>
-	<p><label class="label100">Librarian identity:</label> <!-- TMPL_VAR name="librarian" --></p><br />
-
-	<p><label class="label100">Supplier:</label> <!-- TMPL_VAR name="aqbooksellername" -->&nbsp;</p>
-
-	<p><label class="label100">Cost:</label> <!-- TMPL_VAR name="cost" -->&nbsp;</p>
-
-	<p><label class="label100">Budget:</label> <!-- TMPL_VAR name="bookfundid" -->&nbsp;</p>
-
-	<p><label class="label100">Biblio:</label> <i>(<!-- TMPL_VAR name="biblionumber" -->)</i> <!-- TMPL_VAR name="bibliotitle" --></p><br />
-	<p><label class="label100">Call Number:</label> <!-- TMPL_VAR name="callnumber" -->&nbsp;</p>
-
-	<p><label class="label100">Notes:</label> <!-- TMPL_VAR name="notes" --></p>
-</div>
-
-<div class="bloc25">
-	<form name="f">
-	<h2>Planning</h2>
-	<p><label class="label100">Beginning date:</label> <!-- TMPL_VAR name="publisheddate" -->
-	</p>
-	<p><label class="label100">Frequency (*):</label>
-		<!--TMPL_IF name="periodicity1" -->
-				1/day
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity2" -->
-				1/week
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity3" -->
-				1/2 weeks
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity4" -->
-				1/3 weeks
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity5" -->
-				1/Month
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity6" -->
-				1/2 Months (6/year)
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity7" -->
-				1/quarter
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity8" -->
-				1/quarter
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity9" -->
-				2/year
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity10" -->
-				1/year
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity11" -->
-				1/2 years
-		<!-- /TMPL_IF -->
-	</p>
-	<p><label class="label100">Number Pattern:</label>
-		<!-- TMPL_IF name="numberpattern1" -->
-			Number
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="numberpattern2" -->
-			Volume, Number, Issue
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="numberpattern3" -->
-			Volume, Number
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="numberpattern4" -->
-			Volume, Issue
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="numberpattern5" -->
-			Number, Issue
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="numberpattern6" -->
-			Seasonal only
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="numberpattern7" -->
-			None of the above
-		<!-- /TMPL_IF -->
-	</p>
-	<table cellpadding="0" cellspacing="0">
-	<tr><td>&nbsp;</td>
-	    <td align="right"><input type="text" name="xfield" style="border:0px solid #FFFFFF; text-align:center;"></td>
-	<!--TMPL_IF NAME="lastvalue2"-->
-	    <td align="right"><input type="text" name="yfield" style="border:0px solid #FFFFFF; text-align:center;"></td>
-	<!--/TMPL_IF-->
-	<!--TMPL_IF NAME="lastvalue3"-->
-	    <td align="right"><input type="text" name="zfield" style="border:0px solid #FFFFFF; text-align:center;"></td>
-	<!--/TMPL_IF-->
-	</tr>
-	<tr><td><p><label class="label100">Starting with:</label></p></td>
-	    <td align="center"><!--TMPL_VAR NAME="lastvalue1"--></td>
-	<!--TMPL_IF NAME="lastvalue2"-->
-	    <td align="center">&nbsp; 
-			<!--TMPL_VAR NAME="lastvalue2"-->
-	    </td>
-	<!--/TMPL_IF-->
-	<!--TMPL_IF NAME="lastvalue3"-->
-	    <td align="center">&nbsp; 
-			<!--TMPL_VAR NAME="lastvalue3"-->
-	    </td>
-	<!--/TMPL_IF-->
-	</tr>
-	<tr><td><p><label class="label100">Rollover:</label></p></td>
-	    <td align="center">&nbsp;</td>
-	<!--TMPL_IF NAME="whenmorethan2"-->
-	    <td align="center">&nbsp; 
-			<!--TMPL_VAR NAME="whenmorethan2"-->
-	    </td>
-	<!--/TMPL_IF-->
-	<!--TMPL_IF NAME="whenmorethan3"-->
-	    <td align="center">&nbsp; 
-			<!--TMPL_VAR NAME="whenmorethan3"-->
-	    </td>
-	<!--/TMPL_IF-->
-	</tr>
-	</table>
-	<!-- TMPL_IF NAME="irregularity" -->
-	<p><label class="label100">Irregularity:</label>
-		<div id="irreg"></div>
-	</p>
-	<!-- /TMPL_IF -->
-	<p><label class="label100">Begins on:</label>
-		<!--TMPL_VAR name="startdate" -->
-	</p>
-	</form>
-</div>
-<div class="bloc25">
-	<h2>Subscription length</h2>
-	<!-- TMPL_IF name="numberlength" --><p><label>Number of issues:</label> <!-- TMPL_VAR name="numberlength" --></p><!-- /TMPL_IF -->
-	<!-- TMPL_IF name="weeklength" --><p><label>Number of weeks:</label> <!-- TMPL_VAR name="weeklength" --></p><!-- /TMPL_IF -->
-	<!-- TMPL_IF name="monthlength" --><p><label class="label100">Number of months:</label> <!-- TMPL_VAR name="monthlength" --></p><!-- /TMPL_IF -->
-
-</div>
-<div class="bloc25">
-	<h2>Numbering calculation</h2>
-	<p><label class="label100">Numbering formula:</label> <!-- TMPL_VAR name="numberingmethod" --></p>
-</div>
-<div class="bloc25" id="basetable">
-	<table cellpadding="0" cellspacing="0" border="0" class="collapse">
-		<tr>
-			<th class="cell-header">&nbsp;</th>
-			<th class="cell-header">X</th>
-			<th class="cell-header">Y</th>
-			<th class="cell-header">Z</th>
-			</tr>
-			<tr>
-				<td class="cell">Add</td>
-				<td class="cell">
-					<!-- TMPL_VAR name="add1" -->
-				</td>
-				<td class="cell">
-					<!-- TMPL_VAR name="add2" -->
-				</td>
-				<td class="cell">
-					<!-- TMPL_VAR name="add3" -->
-				</td>
-			</tr>
-			<tr>
-				<td class="cell">once every</td>
-				<td class="cell"><!-- TMPL_VAR name="every1" --></td>
-				<td class="cell"><!-- TMPL_VAR name="every2" --></td>
-				<td class="cell"><!-- TMPL_VAR name="every3" --></td>
-			</tr>
-			<tr>
-				<td class="cell">When more than</td>
-				<td class="cell"><!-- TMPL_VAR name="whenmorethan1" --> <!-- TMPL_IF name="innerloop1" --><br/>
-					<i>(is <!-- TMPL_VAR name="innerloop1" -->)</i><!-- /TMPL_IF --></td>
-				<td class="cell"><!-- TMPL_VAR name="whenmorethan2" --> <!-- TMPL_IF name="innerloop2" --><br/>
-					<i>(is <!-- TMPL_VAR name="innerloop2" -->)</i><!-- /TMPL_IF --></td>
-				<td class="cell"><!-- TMPL_VAR name="whenmorethan3" --> <!-- TMPL_IF name="innerloop3" --><br/>
-					<i>(is <!-- TMPL_VAR name="innerloop3" -->)</i><!-- /TMPL_IF --></td>
-			</tr>
-			<tr>
-				<td class="cell">Set back to</td>
-				<td class="cell"><!-- TMPL_VAR name="setto1" --></td>
-				<td class="cell"><!-- TMPL_VAR name="setto2" --></td>
-				<td class="cell"><!-- TMPL_VAR name="setto3" --></td>
-			</tr>
-			<tr>
-				<td class="cell">
-						Last value
-				</td>
-				<td class="cell"><!-- TMPL_VAR name="lastvalue1" --></td>
-				<td class="cell"><!-- TMPL_VAR name="lastvalue2" --></td>
-				<td class="cell"><!-- TMPL_VAR name="lastvalue3" --></td>
-			</tr>
-		</table>
-</div>
-</td><td>
-<div class="bloc25">
-	<h2>Issues</h2>
-	<table cellpadding="0" cellspacing="0" border="0" class="collapse">
-	<tr>
-		<th class="cell-header">Issue number</th>
-		<th class="cell-header">Planned date</th>
-		<th class="cell-header">Status</th>
-	</tr>
-	<!-- TMPL_LOOP name="serialslist" -->
-		<tr>
-			<td class="cell">
-				<!-- TMPL_VAR name="serialseq" -->
-			</td>
-			<td class="cell">
-				<!-- TMPL_VAR name="planneddate" -->
-			</td>
-			<td class="cell">
-					<!--TMPL_IF name="status1" -->
-						Waited
-					<!-- /TMPL_IF -->
-					<!--TMPL_IF name="status2" -->
-						Arrived
-					<!-- /TMPL_IF -->
-					<!--TMPL_IF name="status3" -->
-						Late
-					<!-- /TMPL_IF -->
-					<!--TMPL_IF name="status4" -->
-						Missing
-					<!-- /TMPL_IF -->
-			</td>
-		</tr>
-	<!-- /TMPL_LOOP -->
-	</table>
-</div>
-</td></tr>
-</table>
-
-
-<script type="text/javascript">
-function _(s) { return s } // dummy function for gettext
-function confirm_deletion() {
-	<!-- TMPL_IF name="totalissues" -->
-		var is_confirmed = confirm(_('You already made <!-- TMPL_VAR name="totalissues"--> receipts. Do you confirm deletion?'));
-	<!-- TMPL_ELSE -->
-		var is_confirmed = confirm(_('Are you sure you want to delete this subscription?'));
-	<!-- /TMPL_IF -->	
-	if (is_confirmed) {
-		window.location="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&op=del";
-	}
-}
-window.onload = num_pattern();
-</script>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/serials/subscription-renew.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/subscription-renew.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/subscription-renew.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/subscription-renew.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
-
-
-<h1 class="serial">subscription renewal for <!-- TMPL_VAR name="bibliotitle" --></h1>
-
-<form name="f" action="/cgi-bin/koha/serials/subscription-renew.pl" method="post">
-	<div id="bloc25">
-		<input type="hidden" name="op" value="renew">
-		<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
-		<p><label class="label100">start date</label><input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->"></p>
-		<p>Subscription length :</p>
-		<p><label class="label100">Number of num</label><input type="text" name="numberlength" value="<!-- TMPL_VAR name="numberlength" -->"></p>
-		<p><label class="label100">Number of weeks</label><input type="text" name="weeklength" value="<!-- TMPL_VAR name="weeklength" -->"></p>
-		<p><label class="label100">Number of months</label><input type="text" name="monthlength" value="<!-- TMPL_VAR name="monthlength" -->"></p>
-		<p>Note for the librarian that will manage your renewal request</p>
-		<ul><textarea name="note" rows="10" cols="60"></textarea></ul>
-		<input type="submit" value="Request a renewal" class="button serial">
-	</div>
-</form>
-</div>
-
-        <!-- TMPL_IF NAME="done" -->
-	<script type="text/javascript">
-	<!--
-	opener.document.location.reload();
-	self.close();
-	//-->
-	</script>
-	<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/serials/viewalerts.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/serials/viewalerts.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/serials/viewalerts.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/serials/viewalerts.tmpl	11 Sep 2006 17:41:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
-<!-- TMPL_INCLUDE NAME="serials-top.inc" -->
-
-<div id="mainbloc">
-		<h1 class="serial">Alert subscribers for <!-- TMPL_VAR name="bibliotitle" --></h1>
-		<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial">subscription</a>
-		<div class="bloc25">
-		<!-- TMPL_IF name="alertloop" -->
-			<table>
-			<tr>
-				<th class="serial">Borrower name</th>
-				<th class="serial">&nbsp;</th>
-			</tr>
-
-			<!-- TMPL_LOOP NAME="alertloop" -->
-				<tr>
-					<td><!-- TMPL_VAR name="name" --></td>
-					<td><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR name="borrowernumber">" class="button serial">View</a></td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-			</table>
-		<!-- TMPL_ELSE -->
-			Nobody
-		<!-- /TMPL_IF -->
-		</div>
-
-	
-</div>
-<!-- TMPL_INCLUDE NAME="serials-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/suggestion/acceptorreject.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/suggestion/acceptorreject.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/suggestion/acceptorreject.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/suggestion/acceptorreject.tmpl	22 Jul 2005 16:46:26 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,40 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Suggestion Management
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_IF name="op_else" -->
-	<h1>Suggestions Management</h1>
-	<form method="post" action="/cgi-bin/koha/suggestion/acceptorreject.pl">
-	<input type="hidden" name="op" value="aorr_confirm">
-	<table>
-		<tr>
-			<th>Status</th>
-			<th>Suggestion</th>
-			<th>Suggested by</th>
-		</tr>
-		<!-- TMPL_LOOP NAME="suggestions_loop" -->
-			<tr<!-- TMPL_IF name="even" --> class="highlight"<!-- /TMPL_IF -->>
-				<td>
-					<select name="aorr">
-						<option value=""> -- Choose Action --</option>
-						<option value="R<!--TMPL_VAR name="suggestionid" -->">Reject</option>
-						<option value="A<!--TMPL_VAR name="suggestionid" -->">Accept</option>
-					</select>
-				</td>
-				<td><!-- TMPL_VAR NAME="title" --><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --><br>
-					<!-- TMPL_IF name="copyrightdate" -->&copy <!-- TMPL_VAR name="copyrightdate" --> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="volumedesc" -->; Volume:<i><!-- TMPL_VAR name="volumedesc" --></i> <!-- /TMPL_IF -->
-						<!-- TMPL_IF name="isbn" -->; ISBN :<i><!-- TMPL_VAR name="isbn" --></i> <!-- /TMPL_IF --><!-- TMPL_IF name="publishercode" -->; Published by <!-- TMPL_VAR name="publishercode" --> <!-- /TMPL_IF --><!-- TMPL_IF name="publicationyear" --> in <i><!-- TMPL_VAR name="publicationyear" --></i> <!-- /TMPL_IF --><!-- TMPL_IF name="place" --> in <i><!-- TMPL_VAR name="place" --></i> <!-- /TMPL_IF --><br><!-- TMPL_IF name="note" --><!-- TMPL VAR NAME="note" --><!-- /TMPL_IF -->
-
-				</td>
-				<td>
-					<!-- TMPL_VAR name="surnamesuggestedby" --><!-- TMPL_IF name="firstnamesuggestedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR name="firstnamesuggestedby" -->
-				</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		</table>
-		<input type="submit" value="Change Status">
-</form>
-	
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_ACCEPTED.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_ACCEPTED.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_ACCEPTED.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_ACCEPTED.tmpl	22 Jul 2005 16:46:27 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-Dear <!-- TMPL_VAR NAME="LibraryName" --> user,
-
-You have suggested that the library acquire <!-- TMPL_VAR name="title" --><!-- TMPL_IF name="author" --> by <!-- TMPL_VAR name="author" --><!-- /TMPL_IF -->.
-
-<!-- TMPL_VAR name="lib.surname" --> <!-- TMPL_VAR lib.firstname --> reviewed your suggestion today, and found it interesting. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the book arrives at the library.
-
-If you have any questions, please email us at <!-- TMPL_VAR name="libemail" -->.
-
-Thank you,
-
-<!-- TMPL_VAR NAME="LibraryName" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_AVAILABLE.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_AVAILABLE.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_AVAILABLE.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_AVAILABLE.tmpl	22 Jul 2005 16:46:27 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-Dear <!-- TMPL_VAR NAME="LibraryName" --> user,
-
-You have suggested that the library acquire <!-- TMPL_VAR name="title" --><!-- TMPL_IF name="author" --> by <!-- TMPL_VAR name="author" --><!-- /TMPL_IF -->.
-
-We are pleased to inform you that the item is now part of the collection of the <!-- TMPL_VAR NAME="LibraryName" -->.
-
-If you have any questions, please email us at <!-- TMPL_VAR name="libemail" -->.
-
-Thank you,
-
-<!-- TMPL_VAR NAME="LibraryName" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_ORDERED.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_ORDERED.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_ORDERED.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_ORDERED.tmpl	22 Jul 2005 16:46:27 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-Dear <!-- TMPL_VAR NAME="LibraryName" --> user,
-
-You have suggested that the library acquire <!-- TMPL_VAR name="title" --><!-- TMPL_IF name="author" --> by <!-- TMPL_VAR name="author" --><!-- /TMPL_IF -->.
-
-We are pleased to inform you that the book has now been ordered. It should arrive soon, at which time it will be processed for addition to the collection.
-
-You will be notified again when the book is available.
-
-If you have any questions, please email us at <!-- TMPL_VAR name="libemail" -->
-
-Thank you,
-
-<!-- TMPL_VAR NAME="LibraryName" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_REJECTED.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_REJECTED.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_REJECTED.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/suggestion/mail_suggestion_REJECTED.tmpl	22 Jul 2005 16:46:27 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-Dear <!-- TMPL_VAR NAME="LibraryName" --> user,
-
-You have suggested that the library acquire <!-- TMPL_VAR name="title" --><!-- TMPL_IF name="author" --> by <!-- TMPL_VAR name="author" --><!-- /TMPL_IF -->.
-
-<!-- TMPL_VAR name="lib.surname" --> <!-- TMPL_VAR lib.firstname --> reviewed your request today, and has decided not to accept the suggestion at this time.
-
-If you have any questions, please email us at <!-- TMPL_VAR name="libemail" -->.
-
-Thank you,
-
-<!-- TMPL_VAR NAME="LibraryName" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/tools/barcodes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/tools/barcodes.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/tools/barcodes.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/tools/barcodes.tmpl	24 Feb 2006 11:52:38 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,80 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-barcodes.inc" -->
-
-<!--   START OF ADD COUNTRY CODE PANEL  -->
-<div class="countryPanel" id="addCountryCode">
- 	<form action="/cgi-bin/koha/barcodes/barcodes.pl" method="post" style="display:inline">
-		<input type="hidden" name="addCode" value="1" />
-<h4>Add a new Country Code</h4>
-<ul>
-	<li><label for="countryName">Country Name:</label> <input type="text" size="10" id="countryName" name="countryName" /></li>
-	<li><label for="countryCode">Country Code:</label> <input type="text" size="3" id="countryCode" name="countryCode" /></li>
-</ul>
-<input type="submit" name="submit" id="submit" value="Save Code"/>
-<input type="button" name="cancel" id="cancel" value="Cancel" onclick="document.getElementById('addCountryCode').style.display = 'none'" />
-	</form>
-</div>
-
-<!--   END OF ADD COUNTRY CODE PANEL  -->
-
-	<h1>Barcodes Generator</h1>
-	<h3>Generate barcodes from inventory codes</h3>
-	<ul>
-		<li>Select a range of inventary codes. You can choose a continuous range or individual inventory codes</li>
-		<li>Select the standard type to generate barcodes.</li>
-		<li>Define the page size for output the PDF.</li>
-		<li>Depending on page size, Koha will show you how the page is arranged
-		    for each barcode. You can define wich point to start printing the page.
-		</li>
-	</ul>
-	
-<!-- TMPL_IF NAME="ERROR" -->Can't find inventory codes in that range. Please try again.<!-- /TMPL_IF -->
-
-	<form id="formulario" method="POST" action="<!-- TMPL_VAR NAME="SCRIPT_NAME" -->" name="form1" onsubmit="return checkFields(this);" target="_blank">
-		<label for="rangeType">Type of Interval: </label><!-- TMPL_VAR NAME="RANGE_TYPE" -->
-
-<div id="continuous" class="panel" style="display:inline">
-	<ul>
-		<li><label for="from">From:</label><input id="from" type="text" name="from" size="20" /></li>
-		<li><label for="to">To:</label><input id="to" type="text" name="to" size="20" /></li>
-	</ul>
-</div>
-
-					 
- <div id="individuals" class="panel" style="display:none; background-color: #ffffff;">
-<label for="inventaryCode">Inventory Code: </label><input id="inventaryCode" type="text" name="inventaryCode" size="20" />
-<a href="#" onclick="addItem(); return false;">[+]</a>	
-<a href="#" onclick="removeItem(); return false;">[-]</a>
-<select id="inventaryList" size="5" style="width:150px">
-</select>
-<input type="hidden" id="individualCodes" name="individualCodes">																						
-</div>						
-
-<p>
-<label for="numbersystem">Country Code: </label><!-- TMPL_VAR NAME="NUMBER_SYSTEM" --><a href="#" onClick="addCountryCode(); return false;">[+]</a></p>
-
-<p>								<label for="pageType">Page Size</label><input type="text" id="pageType" name="pageType" readonly="readonly" disabled="disabled" value="<!-- TMPL_VAR NAME="PAGES" -->"  size="10" /><a href="/cgi-bin/koha/barcodes/printerConfig.pl">[Go to Printer Configuration]</a></p>
-								
-
-<p><label for="text_under_label">Text under label</label>
-					<input type="text" id="text_under_label" name="text_under_label" size="40" value="<!-- TMPL_VAR name="text_under_label -->" /> If this field is empty, author and title will be used instead</p>
-
-			    	<table>
-						<tr>
-							<th colspan="<!-- TMPL_VAR NAME="COL_SPAN" -->">Label number to start printing</th>
-						</tr>
-						<!-- TMPL_LOOP NAME="LABEL_TABLE" -->
-							<tr>
-								<!-- TMPL_LOOP NAME="columns" -->
-									<td>
-										<input type="radio" id="label" value="<!-- TMPL_VAR NAME="tagname" -->" name="label" <!-- TMPL_VAR NAME="check" -->>  Label  <!-- TMPL_VAR NAME="labelname" --></td>
-								<!-- /TMPL_LOOP -->
-							</tr>
-						<!-- /TMPL_LOOP -->  			    
-					</table>
-
-<input type="submit" value="Generate Barcodes" name="B1">
-<input type="reset" value="Clear Fields" name="B2">
-</form>
-
-<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
-

Index: koha-tmpl/intranet-tmpl/prog/en/tools/export.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/tools/export.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/tools/export.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/tools/export.tmpl	11 Sep 2006 17:41:55 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Cataloging: MARC Export<!-- TMPL_INCLUDE NAME="doc-head-close-addbiblio.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-<h1>MARC Export</h1>
-<div class="details"><h4>Export in MARC format the following biblios (bibliographic records only):</h4>
-<form method="post">
-<p>From biblio number: <input type="text" name="start_bib" />
-to biblio number: <input type="text" name="end_bib" /></p>
-<p>(leave blank to export every biblio)</p>
-<input type="hidden" name="op" value="export" />
-<input type="submit" value="Export" class="submit" />
-</form></div>
-<p>Note : Exporting all by this tool may take some time</p>
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/tools/holidays.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/tools/holidays.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/tools/holidays.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/tools/holidays.tmpl	3 Mar 2006 16:35:21 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,214 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-<!-- TMPL_INCLUDE NAME="holidays-top.inc" -->
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<!-- ******************************** FLAT PANELS ******************************************* -->
-<!-- *****           Makes all the flat panel to deal with holidays                     ***** -->
-<!-- **************************************************************************************** -->
-
-<!-- ********************** Panel for showing already loaded holidays *********************** -->
-<div class="panel" style="position:absolute;background-color:#CCCCCC" id="showHoliday">
- 	<form action="/cgi-bin/koha/tools/exceptionHolidays.pl" method="post" style="display:inline">
-		<p onclick="javascript: hidePanel('showHoliday');hidePanel('information')" style="cursor:pointer">
-			Hide Details
-			<img src="<!-- TMPL_VAR NAME="themelang" -->/images/signClose.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle">
-		</p>
-		<p>
-			<label>Day name</label>
-			<input type="text" size="20" id="showDayname" name="showDayname" readonly
-						   style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
-			<input type="hidden" name="showWeekday"/>
-		</p>
-		<p>
-			<label>Library</label>
-			<input type="text" size="20" id="showBranchName" name="showBranchName" readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
-		</p>
-		<div style="display:inline">
-			Day <input type="text" size="2" id="showDay" name="showDay" readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
-			Month <input type="text" size="2" id="showMonth" name="showMonth" readonly
-						        style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
-			Year <input type="text" size="4" id="showYear" name="showYear" readonly
-						       style="background-color:#FFFFFF;color:Black;font-size:10px;"/>		
-		</div>
-	    <p>Add a description to holiday day.</p>
-		<p>
-			<textarea rows="2" cols="40" id="showDescription" name="showDescription"></textarea>	
-		</p>
-		<div id="exceptionPosibility" style="position:static">
-			<input type="radio" name="showOperation" value="exception"> Generate an exception to this holiday
-			<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0"   style="vertical-align:middle;cursor:pointer"
-					onclick="javascript: additionalInformation('You can make an exception for this holiday rule. This means that you will be able to say for a repeatable holiday, that there is one of those days that is going to be an exception.')">
-			<br>
-		</div>
-		<input type="radio" name="showOperation" value="delete" checked> Delete this holiday.
-		<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle;cursor:pointer"
-			onclick="javascript: additionalInformation('This will delete this holiday rule. In case it is a repeatable holiday, this option checks for posible exceptions. In case those exists, this option take care of set this exceptions to regular holidays.')">
-		<p>
-			<input type="submit" name="submit" id="submit" value="Save">
-			<input type="button" name="cancel2" id="cancel2" value="Cancel" onclick="javascript: hidePanel('showHoliday');hidePanel('information')">
-		</p>
-	</form>
-</div>
-
-<!-- ***************************** Panel to deal with new holidays **********************  -->
-<div class="panel" style="position:absolute;background-color:#CCCCCC" id="newHoliday">
- 	<form action="/cgi-bin/koha/tools/newHolidays.pl" method="post" style="display:inline">
-		<h2>
-			Add new holiday
-		</h2>
-		<p>
-			<label>Day name</label>
-			<input type="text" size="20" id="newDayname" name="newDayname" readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
-			<input type="hidden" name="newWeekday"/>
-		</p>
-		<p>
-			<label>Library</label>
-			<input type="text" size="20" id="newBranchName" name="newBranchName" readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
-		</p>
-		<div style="display:inline">
-			Day <input type="text" size="2" id="newDay" name="newDay" readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
-			Month <input type="text" size="2" id="newMonth" name="newMonth"  readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
-			Year <input type="text" size="4" id="newYear" name="newYear" readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
-		</div>
-		<p>
-			<label>Add a description to holiday day</label>
-			<textarea rows="2" cols="40" id="newDescription" name="newDescription"></textarea>
-		</p>
-			<input type="radio" name="newOperation" value="holiday" checked> Holiday only on this day.
-			<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle;cursor:pointer"
-			onclick="javascript: additionalInformation('This will take this date to make it holiday just for this time. Through this option, you can set a single holiday. For example, suppose you are in August 1st, and only for this year you want to make it holiday.')">
-			<br>
-			<input type="radio" name="newOperation" value="weekday"> Holiday repeated every same day of the week
-			<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle;cursor:pointer" onclick="javascript: additionalInformation('This will take this week day and make it holiday. No matter what date it is, this option will repeat this rule for every week. For example, if this date correspond to a saturday, every saturdays will be holidays.')">
-			<br>
-			<input type="radio" name="newOperation" value="repeatable">Holiday repeated yearly on the same date.
-			<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle;cursor:pointer" onclick="javascript: additionalInformation('This will take this day and month as a reference to make it holiday. Through this option, you can repeat this rule for every year. For example, if this date correspond to a August 1st, every August 1st will be holiday, no matter what year you are.')">
-			<p>
-				<input type="submit" name="submit" id="submit" value="Save"/>
-				<input type="button" name="cancel2" id="cancel2" value="Cancel" onclick="javascript: hidePanel('newHoliday');hidePanel('information')">
-			</p>
- 	</form>
-</div>
-
-
-<!-- *************************************************************************************** -->
-<!-- ******                          END OF FLAT PANELS                               ****** -->
-<!-- *************************************************************************************** -->
-
-
-
-<!-- *************************************************************************************** -->
-<!-- ******                     START OF INFORMATION PANEL                            ****** -->
-<!-- *************************************************************************************** -->
-
-<div class="information" style="position:absolute" id="information" onclick="javascript: hidePanel('information')" onblur="javascript: hidePanel('information')">
-	<table>
-		<tr>
-			<td valign="top">
-				<img src="<!-- TMPL_VAR NAME="themelang" -->/images/info.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle">
-			</td>
-			<td valign="top">
-				<p id="explanation" style="display:inline;align:justify"></p>
-			</td>
-		</tr>
-	</table>
-</div>
-
-<!-- ************************************************************************************** -->
-<!-- ******                      END OF INFORMATION PANEL                            ****** -->
-<!-- ************************************************************************************** -->
-
-
-
-<h1>Define the holidays for branch <!-- TMPL_VAR name="BRANCHES" --></h1>
-	<ul>
-		<li>Search in the calendar the day you want to set as holiday.</li>
-		<li>Complete the information in the right area.</li>
-		<li>Once you finish the steps above, click Save.</li>
-	</ul>
-	<p>
-		<span class="normalday">Working day</span>
-		<span class="holiday">Unique holiday</span>
-		<span class="repeatableday">Repetible holiday</span>
-		<span class="exception">Holiday exception</span>
-	</p>
-
-<!-- ************************************************************************************** -->
-<!-- ******                              MAIN SCREEN CODE                            ****** -->
-<!-- ************************************************************************************** -->
-<h2>Calendar information</h2>
-<div id="calendar-container">
-<script type="text/javascript">
-	/* Creates all the structures to deal with all diferents kinds of holidays */
-	var week_days = new Array();
-	var holidays = new Array();
-	var exception_holidays = new Array();
-	var day_month_holidays = new Array();
-	var hola= "<!-- TMPL_VAR NAME="code" -->";
-	<!-- TMPL_LOOP NAME="WEEK_DAYS_LOOP" -->
-	week_days["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
-	<!-- /TMPL_LOOP -->
-	<!-- TMPL_LOOP NAME="HOLIDAYS_LOOP" -->
-	holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
-	<!-- /TMPL_LOOP -->
-	<!-- TMPL_LOOP NAME="EXCEPTION_HOLIDAYS_LOOP" -->
-	exception_holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
-	<!-- /TMPL_LOOP -->
-	<!-- TMPL_LOOP NAME="DAY_MONTH_HOLIDAYS_LOOP" -->
-	day_month_holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
-	<!-- /TMPL_LOOP -->
-
-	/* This function gives css clases to each kind of day */
-	function dateStatusHandler(date) {
-		var day = date.getDate();
-		var month = date.getMonth() + 1;
-		var year = date.getFullYear();
-		var weekDay = date.getDay();
-		var dayMonth = month + '/' + day;
-		var dateString = year + '/' + month + '/' + day;
-		if (exception_holidays[dateString] != null) {
-			return 'exception';
-		} else if ((week_days[weekDay] != null) || (day_month_holidays[dayMonth] != null)) {
-			return 'repeatableday';
-		} else if (holidays[dateString] != null) {
-			return 'holiday';
-		} else {
-			return 'normalday';
-		}
-	}
-
-	/* This function is in charge of showing the correct panel considering the kind of holiday */
-	function dateChanged(calendar) {
-		var day = calendar.date.getDate();
-		var month = calendar.date.getMonth() + 1;
-		var year = calendar.date.getFullYear();
-		var weekDay = calendar.date.getDay();
-		var dayName = calendar.date.print('%A');
-		var dayMonth = month + '/' + day;
-		var dateString = year + '/' + month + '/' + day;
-		if (calendar.dateClicked) {
-			if (holidays[dateString] != null) {
-				showHoliday(0, dayName, day, month, year, weekDay, holidays[dateString].title, 	holidays[dateString].description);
-			} else if (exception_holidays[dateString] != null) {
-				showHoliday(0, dayName, day, month, year, weekDay, exception_holidays[dateString].title, exception_holidays[dateString].description);
-			} else if (week_days[weekDay] != null) {
-				showHoliday(1, dayName, day, month, year, weekDay, week_days[weekDay].title, 	week_days[weekDay].description);
-			} else if (day_month_holidays[dayMonth] != null) {
-				showHoliday(1, dayName, day, month, year, weekDay, day_month_holidays[dayMonth].title, day_month_holidays[dayMonth].description);
-			} else {
-				newHoliday(dayName, day, month, year, weekDay);
-			}
-		}
-	};
-	Calendar.setup(
-		{
-			flat : "calendar-container",
-			flatCallback : dateChanged,
-			dateStatusFunc : dateStatusHandler
-		}
-	);
-</script>
-</div>
-<!-- TMPL_INCLUDE NAME="holidays-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/tools/import.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/tools/import.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/tools/import.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/tools/import.tmpl	24 Feb 2006 11:52:38 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,53 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Cataloging: MARC Import<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<h1>MARC acquisition system</h1>
-<h4>Import into the reservoir</h4>
-
-<!-- TMPL_IF name="uploadmarc" -->
-<p>Import results :</p>
-<ul>
-	<li><!-- TMPL_VAR name="imported" --> imported records</li>
-	<li><!-- TMPL_VAR name="alreadyindb" --> not imported because already in catalog</li>
-	<li><!-- TMPL_VAR name="alreadyinfarm" --> not imported because already in the reservoir</li>
-	<li><!-- TMPL_VAR name="notmarcrecord" --> not imported because they seem not to be in MARC format (or ISBN/ISSN missing) !</li>
-	<li><!-- TMPL_VAR name="total" -->  records parsed</li>
-	<li><a href="/cgi-bin/koha/admin-home.pl">Back</a></li>
-</ul>
-<!-- TMPL_ELSE -->
-<ul>
-	<li>Select a file to import into the reservoir. It will be parsed, and for each ISBN found, a new baby will be created in the reservoir.</li>
-	<li>If an ISBN already exists in the reservoir, you can choose whether to ignore the new one or overwrite the old one.</li>
-	<li>You can enter a name for this import. It may be useful, when creating a biblio, to remember where the suggested MARC data comes from!</li>
-	<li>Of course, if the ISBN already exists in the active DB, the biblio will be ignored.</li>
-</ul>
-<form method="post" action="<!-- TMPL_VAR name="SCRIPT_NAME" -->" enctype="multipart/form-data">
-<table>
-	<tr>
-		<th scope="row"><label for="uploadmarc">Select the file to import: </label></th>
-		<td>
-			<input type="file" id="uploadmarc" name="uploadmarc" /><br />
-		</td>
-	</tr>
-	<tr>
-		<th scope="row"><label for="filename">Name of this import: </label></th>
-		<td>
-			<input type="text" id="filename" name="filename" />
-		</td>
-	</tr>
-	<tr>
-		<th scope="row"><label for="syntax">Character encoding: </label></th>
-		<td>
-			<select name="syntax" id="syntax"><option value="MARC21">MARC21</option><option value="UNIMARC">UNIMARC</option></select>
-		</td>
-	</tr>
-	<tr>
-		<th scope="row" rowspan="2">If ISBN is already in the reservoir: </th>
-		<td><input type="radio" name="overwrite_biblio" value="0" checked="checked" />Ignore this one, keep the existing one</td></tr>
-<tr><td>
-			<input type="radio" name="overwrite_biblio" value="1" />Overwrite the existing one with this</td>
-	</tr>
-</table><input type="submit" value="Import" />
-</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/tools/koha-news.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/tools/koha-news.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/tools/koha-news.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/tools/koha-news.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,103 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menu.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-	<h1> OPAC & KOHA News</h1>
-	<!-- TMPL_IF name="add_form" -->
-
-		<form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
-			<input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->">
-			<input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->">
-			<table style="border:0" cellspacing="0" cellpadding="2">
-			    <tr>
-			        <td>Language</td>
-			        </td>
-			        <td>
-						<select name="lang">
-				<option value="">All news</option>
-				<option value="koha">Librarian interface</option>
-				<!-- TMPL_LOOP name="lang_list" -->
-					
-						<option value="<!-- TMPL_VAR name="language" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="language" -->	</option>
-				<!-- /TMPL_LOOP" -->
-			</select>
-					</td>
-			    </tr>
-				<tr>
-					<td>Title</td>
-					<td><input size="30" type="text" name="title" value="<!-- TMPL_VAR NAME="title" -->"></td>
-				</tr>
-				<tr>
-					<td>News</td>
-					<td><textarea name="new" cols="35" rows="4"><!-- TMPL_VAR NAME="new" --></textarea></td>
-				</tr>
-				<tr>
-					<td  colspan="2">
-						<input class="button" type="submit" value="Save">
-						<input class="button" type="button" value="Cancel" onclick="window.location.href='/cgi-bin/koha/tools/koha-news.pl'">
-					</td>
-				</tr>
-			</table>
-		</form>
-
-
-	<!-- TMPL_ELSE -->
-
-		<!-- TMPL_IF NAME="opac_news_count" -->
-
-            <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
-			Language:
-			
-			<select name="lang">
-				<option value="">All news</option>
-				<option value="koha">Librarian interface</option>
-				<!-- TMPL_LOOP name="lang_list" -->
-					
-						<option value="<!-- TMPL_VAR name="language" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="language" -->	</option>
-				<!-- /TMPL_LOOP" -->
-			</select>
-		
-			<input type="submit" class="button" value="Filter">
-			</form>
-
-			<form name="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" onsubmit="return confirm('¿Are you sure you want to delete the selected news?')">
-				<table border="0" cellspacing="0" cellpadding="3">
-					<tr bgcolor="#99cc33">
-						<th></td>
-						<th style="padding-left:3px;padding-right:3px">Language</th>
-						<th>Date</th>
-						<th  width="20%">Title</th>
-						<th>News</th>
-						<th></th>
-					</tr>
-
-					<!-- TMPL_LOOP NAME="opac_news" -->
-						<tr>
-							<td width="5%"><input type="checkbox" name="ids" value="<!-- TMPL_VAR NAME="idnew" -->"</td>
-							<td align="center"><!-- TMPL_VAR NAME="lang" --></td>
-							<td><!-- TMPL_VAR NAME="newdate" --></td>
-							<td align="center"><!-- TMPL_VAR NAME="title" --></td>
-							<td><!-- TMPL_VAR NAME="new" --></td>
-							<td width="5%">
-								<a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=<!-- TMPL_VAR NAME="idnew" -->">Edit</a>
-							</td>
-						</tr>
-					<!-- /TMPL_LOOP -->
-
-				</table>
-					<input type="hidden" name="op" value="del">
-					<input type="submit" class="button" value="Delete selected">
-			</form>
-		<!-- TMPL_ELSE -->
-			<h5>No news loaded</h5>
-		<!-- /TMPL_IF -->
-
-		<form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl">
-			<input type="hidden" name="op" value="add_form">
-			<input type="submit" class="button" value="Add  news">
-		</form>
-	
-	
-	<!-- /TMPL_IF -->
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/tools/letter.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/tools/letter.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/tools/letter.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/tools/letter.tmpl	11 Aug 2006 16:33:01 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,290 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-	Letters admin
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-tools.inc" -->
-
-	<!-- TMPL_IF NAME="else" -->
-		<form action="/cgi-bin/koha/tools/letter.pl" method="post">
-		<input type="text" name="searchfield" value="">
-		<input type="submit" class="button" value="Filter"></form>
-		<!-- TMPL_IF NAME="search" -->
-		<br>You Searched for <b><!-- TMPL_VAR NAME="searchfield" --></b><p><br>
-		<!-- /TMPL_IF -->
-		<table>
-		<tr>
-			<th>Module</th>
-			<th>Code</th>
-			<th>Name</th>
-			<th>&nbsp;</th>
-			<th>&nbsp;</th>
-		</tr>
-		<!-- TMPL_LOOP NAME="letter" -->
-			<tr bgcolor=<!-- TMPL_VAR NAME="toggle" --> >
-				<td><!-- TMPL_VAR NAME="module" --></td>
-				<td><!-- TMPL_VAR NAME="code" --></td>
-				<td><!-- TMPL_VAR NAME="name" --></td>
-				<td>
-					<a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=<!-- TMPL_VAR name="module" -->&amp;code=<!-- TMPL_VAR NAME="code" -->">
-						<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/fileopen.png"  width="32" hspace="0" vspace="0" border="0">
-					</a>
-				</td>
-				<td>
-					<a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&amp;module=<!-- TMPL_VAR name="module"-->&amp;code=<!-- TMPL_VAR NAME="code" -->">
-						<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/edittrash.png" width="32" hspace="0" vspace="0" border="0">
-					</a>
-				</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		</table>
-		<form action="/cgi-bin/koha/tools/letter.pl" method="post">
-			<input type="hidden" name="op" value="add_form">
-			<br>
-			<input type="submit" class="button" value="Add Letter" title="Add Letter" alt="Add Letter">
-			<br>
-		</form>
-		<br clear="all">
-	<!-- /TMPL_IF -->
-	
-	<!-- TMPL_IF NAME="add_form" -->
-	<script language="javascript" type="text/javascript">
-		function _(s) { return s } // dummy function for gettext
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function isNotNull(f,noalert) {
-			if (f.value.length ==0) {
-	return false;
-			}
-			return true;
-		}
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function toUC(f) {
-			var x=f.value.toUpperCase();
-			f.value=x;
-			return true;
-		}
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function isNum(v,maybenull) {
-		var n = new Number(v.value);
-		if (isNaN(n)) {
-			return false;
-			}
-		if (maybenull==0 && v.value=='') {
-			return false;
-		}
-		return true;
-		}
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function isDate(f) {
-			var t = Date.parse(f.value);
-			if (isNaN(t)) {
-				return false;
-			}
-		}
-		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-		function Check(f) {
-			var ok=1;
-			var _alertString="";
-			var alertString2;
-/*			if (!(isNotNull(window.document.Aform.code))) {
-				_alertString += "\n- " + _("Code missing");
-			}*/
-/*			if (!(isNotNull(window.document.Aform.name))) {
-				_alertString += "\n- " + _("Name missing");
-			}*/
-			if (_alertString.length==0) {
-				document.Aform.submit();
-			} else {
-				alertString2  = _("Form not submitted because of the following problem(s)");
-				alertString2 += "\n------------------------------------------------------------------------------------\n";
-				alertString2 += _alertString;
-				alert(alertString2);
-			}
-		}
-		// GPL code coming from PhpMyAdmin
-		function insertValueQuery() {
-			var myQuery = document.Aform.content;
-			var myListBox = document.Aform.SQLfieldname;
-		
-			if(myListBox.options.length > 0) {
-				var chaineAj = "";
-				var NbSelect = 0;
-				for(var i=0; i<myListBox.options.length; i++) {
-					if (myListBox.options[i].selected){
-						NbSelect++;
-						if (NbSelect > 1)
-							chaineAj += ", ";
-						chaineAj += myListBox.options[i].value;
-					}
-				}
-		
-				//IE support
-				if (document.selection) {
-					myQuery.focus();
-					sel = document.selection.createRange();
-					sel.text = chaineAj;
-					document.Aform.insert.focus();
-				}
-				//MOZILLA/NETSCAPE support
-				else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
-					var startPos = document.Aform.content.selectionStart;
-					var endPos = document.Aform.content.selectionEnd;
-					var chaineSql = document.Aform.content.value;
-					myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
-				} else {
-					myQuery.value += chaineAj;
-				}
-			}
-		}
-		
-		</script>
-	<div id="bloc25">
-		<!-- TMPL_IF name="modify" -->
-			<h2 class="parameters">Modify letter</h2>
-		<!-- TMPL_ELSE -->
-			<h2 class="parameters">Add letter</h2>
-		<!-- /TMPL_IF -->
-		<form action="/cgi-bin/koha/tools/letter.pl" name="Aform" method="post">
-		<input type="hidden" name="op" value="add_validate">
-		<input type="hidden" name="checked" value="0">
-		<!-- TMPL_IF NAME="modify" -->
-			<p>
-				<label class="label100">Koha module:</label>
-				<select name="module">
-					<!-- TMPL_IF name="acquisition" -->
-						<option value="acquisition" selected>Acquisition</option>
-					<!-- TMPL_ELSE -->
-						<option value="acquisition">Acquisition</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="catalogue" -->
-						<option value="catalogue" selected>Catalogue</option>
-					<!-- TMPL_ELSE -->
-						<option value="catalogue">Catalogue</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="serial" -->
-						<option value="serial" selected>Serial</option>
-					<!-- TMPL_ELSE -->
-						<option value="serial">Serial</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="circulation" -->
-						<option value="circulation" selected>Circulation</option>
-					<!-- TMPL_ELSE -->
-						<option value="circulation">Circulation</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="members" -->
-						<option value="members" selected>Members</option>
-					<!-- TMPL_ELSE -->
-						<option value="members">Members</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="authorities" -->
-						<option value="authorities" selected>Authorities</option>
-					<!-- TMPL_ELSE -->
-						<option value="authorities">Authorities</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="reports" -->
-						<option value="reports" selected>Reports</option>
-					<!-- TMPL_ELSE -->
-						<option value="reports">Reports</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="parameters" -->
-						<option value="parameters" selected>Parameters</option>
-					<!-- TMPL_ELSE -->
-						<option value="parameters">Parameters</option>
-					<!-- /TMPL_IF -->
-				</select>
-			</p>
-			<p>
-				<label class="label100">Code:</label><input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->"><!-- TMPL_VAR NAME="code" -->
-			</p>
-		<!-- /TMPL_IF -->
-		
-		<!-- TMPL_IF NAME="adding" -->
-			<p>
-				<label class="label100">Koha module:</label>
-				<select name="module">
-						<option value="acquisition">Acquisition</option>
-						<option value="catalogue">Catalogue</option>
-						<option value="serial">Serial</option>
-						<option value="circulation">Circulation</option>
-						<option value="members">Members</option>
-						<option value="authorities">Authorities</option>
-						<option value="reports">Reports</option>
-						<option value="parameters">Parameters</option>
-				</select>
-			</p>
-			<p>
-				<label class="label100">Code:</label><input type="text" name="code" size="20" maxlength="20">
-			</p>
-		<!-- /TMPL_IF -->
-		
-		<p>
-			<label class="label100">Name:</label><input type="text" name="name" size="100" value="<!-- TMPL_VAR NAME="name" -->">
-		</p>
-		<p>
-			<label class="label100">Title (mail subject):</label><input type="text" name="title" size="100" value="<!-- TMPL_VAR NAME="title" -->">
-		</p>
-		<p>
-			<label class="label100">Content (mail content):</label>
-		</p>
-		<p><textarea name="content" cols="80" rows="10"><!-- TMPL_VAR NAME="content" --></textarea>
-		<input type="button" name="insert" value="&lt;&lt;" onclick="insertValueQuery()" title="Insert" />
-		<select name="SQLfieldname" size=10>
-			<!-- TMPL_LOOP name="SQLfieldname" -->
-				<option value="<!-- TMPL_VAR name="value"-->"><!-- TMPL_VAR name="text"--></option>
-			<!-- /TMPL_LOOP -->
-		</select>
-		</p>
-		<p><input type="button" value="OK" onclick="Check(this.form)" class="button"></p>
-		</form>
-	</div>
-	<!-- /TMPL_IF -->
-	
-	<!-- TMPL_IF NAME="add_validate" -->
-	Data recorded
-	<form action="<!-- TMPL_VAR NAME="action" -->" method="post">
-	<input type="submit" value="OK">
-	</form>
-	<!-- /TMPL_IF -->
-	
-	<!-- TMPL_IF NAME="delete_confirm" -->
-	<table border="0" cellspacing="0" cellpadding="5">
-		<tr valign="top" bgcolor="#99cc33">
-			<td background="<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif">
-				<b>module / Code</b>
-			</td>
-			<td background="<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif">
-				<b><!-- TMPL_VAR name="module"--> / <!-- TMPL_VAR NAME="code" --></b>
-			</td>
-		</tr>
-	
-		<form action="<!-- TMPL_VAR NAME="action" -->" method="post"><input type="hidden" name="op" value="delete_confirmed">
-		<input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->">
-		<input type="hidden" name="module" value="<!-- TMPL_VAR NAME="module" -->">
-		<tr>
-			<td>Name</td>
-			<td><!-- TMPL_VAR NAME="Name" --></td>
-		</tr>
-		<tr>
-			<td colspan="2" align="center">CONFIRM DELETION</td>
-		</tr>
-		<tr>
-			<td>
-				<input type="submit" value="YES">
-				</form>
-			</td>
-			<td>
-				<form action="<!-- TMPL_VAR NAME="action" -->" method="post">
-					<input type="submit" value="NO">
-				</form>
-			</td>
-		</tr>
-	</table>
-	<!-- /TMPL_IF -->
-	
-	<!-- TMPL_IF NAME="delete_confirmed" -->
-	Data deleted
-	<form action="<!-- TMPL_VAR NAME="action" -->" method="post">
-	<input type="submit" value="OK">
-	</form>
-	<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/prog/en/tools/overduerules.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/tools/overduerules.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/tools/overduerules.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/tools/overduerules.tmpl	28 Feb 2006 14:58:32 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,107 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: Overdue Rules<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-	<h1>Defining <!-- TMPL_IF NAME="branch" -->overdue rules for <!-- TMPL_VAR NAME="branch" --><!-- TMPL_ELSE -->default overdue rules<!-- /TMPL_IF --></h1>
-	<div class="help">
-		<p>Overdue will be taken into account provided that you input delays as numbers only.</p>
-		<p>Delay is a number of days for the older issue to be taken into account before doing an action (Sending a letter)</p>
-		<p>If you want Koha to do an action (send a letter or debar member), delay is needed.</p>
-		<p>Column 1 is supposed to be filled in first, then Second one then Third one.</p>
-	</div>
-		<form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
-		<label for="branch">Select a branch :</label>
-			<select id="branch" name="branch">
-				<option value="">Default</option>
-			<!-- TMPL_LOOP NAME="branchloop" -->
-				<option value="<!-- TMPL_VAR NAME="value" -->"<!-- TMPL_IF NAME="selected" --> selected="selected"<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="branchname" --></option><!-- /TMPL_LOOP --></select>
-			<input type="submit" value="Select" />
-		</form>
-		<!--TMPL_IF Name="ERROR"-->
-		<h3>Data error</h3>
-			<p>The following fields have a forbidden value. Correct them and press OK again :</p><ul>
-			<!-- TMPL_IF NAME="ERRORDELAY" -->
-				<li>Delay <!--TMPL_VAR Name="ERRORDELAY"--> for <!--TMPL_VAR Name="bor"--> borrower category have some unexpected characters. There should be only numerical characters. </li>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="ERRORORDER" -->
-				<li>Delay1 should be less than Delay2 which should be less than Delay3 for <!--TMPL_VAR Name="bor"--> borrower category </li>
-			<!-- /TMPL_IF -->
-			</ul>
-		<!--/TMPL_IF -->
-		<form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
-			<input type="hidden" name="op" value="save" />
-			
-			<table>
-			<caption>Defining Overdue rules for <!--TMPL_IF Name="branch"--><!-- TMPL_VAR NAME="branch" --><!--TMPL_ELSE--> default branch <!--/TMPL_IF-->		<!--TMPL_IF Name="datasaved"-->
-		<br /><h3 align="center">INPUT SAVED</h3>
-		<!--/TMPL_IF -->
-			</caption>
-			<tr>
-				<th>&nbsp;</th><th colspan="3" scope="col">First</th><th colspan="3" scope="col">Second</th><th colspan="3" scope="col">Third</th>
-			</tr>
-			<tr>
-				<th>&nbsp;</th><th scope="col">Delay</th><th scope="col">Letter</th><th scope="col">Debarred</th><th scope="col">Delay</th><th scope="col">Letter</th><th scope="col">Debarred</th><th scope="col">Delay</th><th scope="col">Letter</th><th scope="col">Debarred</th>
-			</tr>
-			<!-- TMPL_LOOP NAME="table" -->
-				<tr>
-					<th><!-- TMPL_VAR NAME="line" --></th>
-					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
-						<input name="delay1-<!-- TMPL_VAR NAME="overduename" -->" size="5" value="<!-- TMPL_VAR NAME="delay1" -->" />
-					</td>
-					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
-						<!--TMPL_IF Name="noletter" --><input type="text" name="letter1-<!-- TMPL_VAR NAME="overduename" -->" value="<!--TMPL_VAR Name="letter1"-->"/>
-						<!--TMPL_ELSE -->
-							<select name="letter1-<!-- TMPL_VAR NAME="overduename" -->">
-								<option value="">Default</option>
-								<!-- TMPL_LOOP name="letterloop1" -->
-									<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="lettername" --></option>
-								<!-- /TMPL_LOOP -->
-							</select>
-						<!--/TMPL_IF -->
-					</td>
-					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
-						<input type="checkbox" name="debarred1-<!-- TMPL_VAR NAME="overduename" -->" <!-- TMPL_IF NAME="debarred1" -->checked<!-- /TMPL_IF --> value="1" />
-					</td>
-					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
-						<input name="delay2-<!-- TMPL_VAR NAME="overduename" -->" size="5" value="<!-- TMPL_VAR NAME="delay2" -->" />
-					</td>
-					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
-						<!--TMPL_IF Name="noletter" --><input type="text" name="letter2-<!-- TMPL_VAR NAME="overduename" -->" value="<!--TMPL_VAR Name="letter2"-->"/>
-						<!--TMPL_ELSE -->
-							<select name="letter2-<!-- TMPL_VAR NAME="overduename" -->">
-								<option value="">Default</option>
-								<!-- TMPL_LOOP name="letterloop2" -->
-									<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="lettername" --></option>
-								<!-- /TMPL_LOOP -->
-							</select>
-						<!--/TMPL_IF -->
-					</td>
-					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
-						<input type="checkbox" name="debarred2-<!-- TMPL_VAR NAME="overduename" -->" <!-- TMPL_IF NAME="debarred2" -->checked<!-- /TMPL_IF --> value="1" />
-					</td>
-					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
-						<input name="delay3-<!-- TMPL_VAR NAME="overduename" -->" size="5" value="<!-- TMPL_VAR NAME="delay3" -->" />
-					</td>
-					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
-						<!--TMPL_IF Name="noletter" --><input type="text" name="letter3-<!-- TMPL_VAR NAME="overduename" -->" value="<!--TMPL_VAR Name="letter3"-->"/>
-						<!--TMPL_ELSE -->
-							<select name="letter3-<!-- TMPL_VAR NAME="overduename" -->">
-								<option value="">Default</option>
-								<!-- TMPL_LOOP name="letterloop3" -->
-									<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="lettername" --></option>
-								<!-- /TMPL_LOOP -->
-							</select>
-						<!--/TMPL_IF -->
-					</td>
-					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
-						<input type="checkbox" name="debarred3-<!-- TMPL_VAR NAME="overduename" -->" <!-- TMPL_IF NAME="debarred3" -->checked<!-- /TMPL_IF --> value="1" />
-					</td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-			</table>
-			
-			<input type="submit" value="Save Changes" />
-		</form>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/tools/printerConfig.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/tools/printerConfig.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/tools/printerConfig.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/tools/printerConfig.tmpl	24 Feb 2006 11:52:38 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,83 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-barcodes.inc" -->
-
-	<h1>Printer Configuration</h1>
-	<h3>Set printer configuration corresponding to your environment</h3>
-	<ul>
-		<li>Set width and height of the label that you are going to work with.</li>
-		<li>Set your system's default DPI.</li>
-		<li>Set the page type.</li>
-		<li>Select how many columns and rows are in your page type.</li>
-		<li>Set left- and bottom-margins of the page that you are going to use. This parameter will help to center the barcodes on the labels.</li>
-	</ul>
-	<br>
-	<form id="formulario" method="POST" action="<!-- TMPL_VAR NAME="SCRIPT_NAME" -->" name="form1">
-		<input type="hidden" name="saveSettings" value="1" />
-		<table>
-			<tr>
-				<th scope="row">
-					Label width (Expressed in mm)
-				</th><td> 
-					<input id="labelWidth" type="text" name="labelWidth" size="5"
-					       value="<!-- TMPL_VAR NAME="LABEL_WIDTH" -->">
-				</td></tr>
-				<th scope="row">
-					Label heigth (Expressed in mm)
-				</th><td> 
-					<input id="labelHeigth" type="text" name="labelHeigth" size="5"
-					       value="<!-- TMPL_VAR NAME="LABEL_HEIGTH" -->">
-				</td></tr>
-				<th scope="row">
-					System dpi
-				</th><td>
-					<input id="systemDpi" type="text" name="systemDpi" size="5"
-					       value="<!-- TMPL_VAR NAME="SYSTEM_DPI" -->">
-				</td></tr>
-				<th scope="row">
-					Page Type
-				</th>	<td>
-					<select name="pageType" id="pageType" size="1">
-						<!-- TMPL_IF name="A4" -->
-							<option value="A4" selected>A4</option>
-				        <!-- TMPL_ELSE -->
-							<option value="A4">A4</option>
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF name="Letter" -->
-							<option value="Letter" selected>Letter</option>
-				        <!-- TMPL_ELSE -->
-							<option value="Letter">Letter</option>
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF name="Legal" -->
-							<option value="Legal" selected>Legal</option>
-				        <!-- TMPL_ELSE -->
-							<option value="Legal">Legal</option>
-						<!-- /TMPL_IF -->
-		            </select>
-				</td></tr>
-				<th scope="row">
-					Columns
-				</th>  <td>
-					<input id="columns" type="text" name="columns" size="5"
-					       value="<!-- TMPL_VAR NAME="COLUMNS" -->">
-				</td></tr>
-				<th scope="row">
-					Rows
-				</th>   <td>
-					<input id="rows" type="text" name="rows" size="5"
-					       value="<!-- TMPL_VAR NAME="ROWS" -->">
-				</td></tr>
-				<th scope="row">
-					Margin Bottom (Expressed in mm)
-				</th>   <td>
-					<input id="marginBottom" type="text" name="marginBottom" size="5"
-					       value="<!-- TMPL_VAR NAME="MARGIN_TOP" -->">
-				</td></tr>
-				<th scope="row">
-					Margin Left (Expressed in mm)
-				</th>   <td>
-					<input id="marginLeft" type="text" name="marginLeft" size="5"
-					       value="<!-- TMPL_VAR NAME="MARGIN_LEFT" -->">
-				</td></tr>
-			</table><input type="submit" value="Save Settings" />
-	</form>
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/tools/tools-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/tools/tools-home.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/tools/tools-home.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/tools/tools-home.tmpl	27 Sep 2006 21:40:47 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,48 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-tools.inc" -->
-
-<h1>Koha tools</h1>
-
-<table>
-<caption>Various tools</caption>
-	<tr>
-		<th><a href="/cgi-bin/koha/z3950/zebraqueue_windows_start.pl">ZEBRA queue starter--for Windows</a></th>
-		<td> Starts Zebra queue if stopped or system restarted. ZEBRA queue is required for the system to update ZEBRA</td>
-	</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/tools/barcodes.pl">Barcode generator</a></th>
-	<td>Generate your barcodes</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/tools/holidays.pl">Holidays</a></th>
-	<td>Define holidays (days where the library is closed)</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/tools/export.pl">Export</a></th>
-	<td>Export datas</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/tools/import.pl">Import</a></th>
-	<td>Import datas in the reservoir</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/tools/koha-news.pl">News</a></th>
-	<td>A basic news system for OPAC & librarian interfaces</td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/tools/letter.pl">Letters</a></th>
-	<td>Define letters </td>
-</tr>
-<tr>
-	<th><a href="/cgi-bin/koha/tools/overduerules.pl">overdue rules</a></th>
-	<td>Rules for overdue books</td>
-</tr>
-<th><a href="/cgi-bin/koha/barcodes/cbarcodes.pl">Membership cards</a></th>
-		<td>create membership cards from member cardnumbers
-		</td>
-</table>
-
-
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_008_holdings.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_008_holdings.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_008_holdings.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_008_holdings.tmpl	11 Sep 2006 17:41:56 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,688 +0,0 @@
-<html>
-<head>
-<title>Leader builder</title>
-</head>
-<body>
-<form name="f_pop" onSubmit="javascript:report()">
-<table>
-	<tr>
-		<td>0-5 Date entered on file</td>
-		<td>(auto-filled)</td>
-		<td><input type="text" name="f1" maxlength=6 size=7 value="<!-- TMPL_VAR name="f1" -->"></td>
-	</tr>
-	<tr>
-		
-		<td>06- Receive Status</td>
-		<td>
-			
-			<select name="f6" size="1">
-			<!-- TMPL_IF name="f60" -->
-                                <option value="0" SELECTED>0- Unknown</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="0">0- Unknown</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f61" -->
-				<option value="1" SELECTED>1- Other receipt status</option>
-			<!-- TMPL_ELSE -->
-				<option value="1">1- Other receipt status</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f62" -->
-				<option value="2" SELECTED>2- Complete or ceased</option>
-			<!-- TMPL_ELSE -->
-				<option value="2">2- Complete or ceased</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f63" -->
-				<option value="3" SELECTED>3- On order</option>
-			<!-- TMPL_ELSE -->
-				<option value="3">3- On order</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f64" -->
-				<option value="4" SELECTED>4-Currently Received</option>
-			<!-- TMPL_ELSE -->
-				<option value="4">4- Currently Received</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f65" -->
-				<option value="5" SELECTED>5- Not currently received</option>
-			<!-- TMPL_ELSE -->
-				<option value="5">3- Not currently</option>
-			<!-- /TMPL_IF -->
-
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td>7- Method of acquisition </td>
-		<td>
-			<select name="f7" size="1">
-			<!-- TMPL_IF name="f7c" -->
-                                <option value="c" SELECTED>c- Coop/consotial purch.</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="c">0- Coop/consotial purch.</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f7d" -->
-				<option value="d" SELECTED>d- Deposit</option>
-			<!-- TMPL_ELSE -->
-				<option value="d">1- Deposit</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f7e" -->
-				<option value="e" SELECTED>e-Exchange</option>
-			<!-- TMPL_ELSE -->
-				<option value="e">2- Exchange</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f7f" -->
-				<option value="f" SELECTED>f- Free</option>
-			<!-- TMPL_ELSE -->
-				<option value="f">f- Free</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f7g" -->
-				<option value="g" SELECTED>g- Gift</option>
-			<!-- TMPL_ELSE -->
-				<option value="g">g- Gift</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f7m" -->
-				<option value="m" SELECTED>m- Membership</option>
-			<!-- TMPL_ELSE -->
-				<option value="m">m- Membership</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f7n" -->
-				<option value="n" SELECTED>n- Non library Purchase</option>
-			<!-- TMPL_ELSE -->
-				<option value="n">n-Non library Purchase</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f7p" -->
-				<option value="p" SELECTED>p- Purchase</option>
-			<!-- TMPL_ELSE -->
-				<option value="p">p- Purchase</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f7u" -->
-				<option value="u" SELECTED>u- Unknown</option>
-			<!-- TMPL_ELSE -->
-				<option value="u">u- Unknown</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f7z" -->
-				<option value="z" SELECTED>z- Other method</option>
-			<!-- TMPL_ELSE -->
-				<option value="z">z- Other method</option>
-			<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-	<tr>
-                <td>08-11 Expected acquisition end date (yymm)</td>
-                <td><input type="text" name="f81" size="4"  maxlength="4" value="<!-- TMPL_VAR NAME="f81" -->"/>
- 
-	<select name="f8" size="4">
-			<!-- TMPL_IF name="f8uuuu" -->
-                                <option value="uuuu" SELECTED>uuuu-Intent to cancel</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="uuuu">uuuu- Intent to cancel</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f8||||" -->
-				<option value="||||" SELECTED>N/A</option>
-			<!-- TMPL_ELSE -->
-				<option value="||||">N/A</option>
-			<!-- /TMPL_IF -->
-			</select>                    
-        </td>
-        </tr>
-
-	<tr>
-                <td>12- General retention Policy</td>
-                <td>
-  	<select name="f12" size="1">
-			<!-- TMPL_IF name="f120" -->
-                                <option value="0" SELECTED>0- Unknown</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="0">0- Unknown</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f121" -->
-				<option value="1" SELECTED>1- Other general retention policy</option>
-			<!-- TMPL_ELSE -->
-				<option value="1">1- Other general retention policy</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f122" -->
-				<option value="2" SELECTED>2- Retained except as replaced by updates</option>
-			<!-- TMPL_ELSE -->
-				<option value="2">2- Retained except as replaced by updates</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f123" -->
-				<option value="3" SELECTED>3-  Sample issue retained</option>
-			<!-- TMPL_ELSE -->
-				<option value="3">3-  Sample issue retained</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f124" -->
-				<option value="4" SELECTED>4-Currently Received</option>
-			<!-- TMPL_ELSE -->
-				<option value="4">4- Currently Received</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f125" -->
-				<option value="5" SELECTED>5- Retained until replaced by microform</option>
-			<!-- TMPL_ELSE -->
-				<option value="5">3- Retained until replaced by microform</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f126" -->
-				<option value="6" SELECTED>6 - Retained for a limited period</option>
-			<!-- TMPL_ELSE -->
-				<option value="6">6 - Retained for a limited period</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f127" -->
-				<option value="7" SELECTED>7-Not retained</option>
-			<!-- TMPL_ELSE -->
-				<option value="7">7-Not retained</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f128" -->
-				<option value="8" SELECTED>8- Permanently reatined</option>
-			<!-- TMPL_ELSE -->
-				<option value="8">8-Permanently reatined</option>
-			<!-- /TMPL_IF -->
-			</select>              
-		 </td>
-        </tr>
-	 <tr>
-                <td>18-21 Illustrations </td>
-		<td>(auto-filled from 300)<input type="hidden" name="f1821" size="4"  maxlength="4" value="<!-- TMPL_VAR NAME="f1821" -->"/></td>
-        </tr>
-	<tr>
-                <!-- 22 Target Audience -->
-                <td>22- Target Audience</td>
-                <td>                        
-                <select name="f22" size="1">
-
-                        <!-- TMPL_IF name="f22|" -->
-                        <option value="|" SELECTED>|- Default</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="|">|- Default</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f220" -->
-                        <option value=" " SELECTED>#- Unknown or not specified</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- Unknown or not specified</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f22a" -->
-                         <option value="a" SELECTED>a- Preschool</option>
-	                <!-- TMPL_ELSE -->
-			<option value="a">a- Preschool</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f22b" -->
-                         <option value="b" SELECTED>b- Primary</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="b">b- Primary</option>
-                        <!-- /TMPL_IF -->	
-
-			<!-- TMPL_IF name="f22c" -->
-                         <option value="c" SELECTED>c- Elementary and junior high</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">c- Elementary and junior high</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f22d" -->
-                         <option value="d" SELECTED>d- Secondary (senior high)</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Secondary (senior high)</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f22e" -->
-                         <option value="e" SELECTED>e- Adult</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="e">e- Adult</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f22f" -->
-                         <option value="f" SELECTED>f- Specialized</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="f">f- Specialized</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f22g" -->
-                         <option value="g" SELECTED>g- General</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="g">g- General</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f22j" -->
-                         <option value="j" SELECTED>j- Juvenile</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="j">j- Juvenile</option>
-                        <!-- /TMPL_IF -->
-		</select>
-		</td>
-	<tr>
-	<tr>
-                <!-- 23 Form of an item -->
-                <td>23- Form of an item</td>
-                <td>
-                <select name="f23" size="1">
-
-                        <!-- TMPL_IF name="f230" -->
-                        <option value=" " SELECTED>#- None of the following</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- None of the following</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23a" -->
-                        <option value="a" SELECTED>a- Microfilm</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="a">a- Microfilm</option>
-                        <!-- /TMPL_IF -->
-			
-			<!-- TMPL_IF name="f23b" -->
-                        <option value="b" SELECTED>b- Microfiche</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="b">b- Microfiche</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23c" -->
-                        <option value="c" SELECTED>a- Microopaque</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">a- Microopaque</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23d" -->
-                        <option value="d" SELECTED>d- Large Print</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Large Print</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23f" -->
-                        <option value="f" SELECTED>f- Braille</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="f">f- Braille</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23r" -->
-                        <option value="r" SELECTED>r- Regular print reproduction</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="r">r- Regular print reproduction</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23s" -->
-                        <option value="s" SELECTED>s- Electronic</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="s">s- Electronic</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23!" -->
-                        <option value="!" SELECTED>!- No attempt to code</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="!">!- No attempt to code</option>
-                        <!-- /TMPL_IF -->
-		</select>
-		</td>
-	</tr>
-	<tr>
-                <td>24-27 Nature of contents </td>
-                <td>(Derived value)
-                        <input type="hidden" name="f2427" size="4" maxlength="4" value="<!-- TMPL_VAR NAME="f2427" -->"/>                </td>
-        </tr>
-        <tr>
-                <td>28- Government Publication</td>
-                <td>
-                <select name="f28" size="1">                                    
-                        <!-- TMPL_IF name="f280" -->
-                        <option value=" " SELECTED>#- Not a government publication</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- Not a government publication</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f28a" -->
-                        <option value="a" SELECTED>a- Autonomous or semi-autonomous component</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="a">a- Autonomous or semi-autonomous component</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f28c" -->
-                        <option value="c" SELECTED>c- Multilocal</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">c- Multilocal</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f28f" -->
-                        <option value="f" SELECTED>f- Federal/national</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="f">f- Federal/national</option>
-                        <!-- /TMPL_IF -->
-
-
-                        <!-- TMPL_IF name="f28i" -->
-                        <option value="i" SELECTED>i- International intergovernmental</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="i">i- International intergovernmental</option>
-                        <!-- /TMPL_IF -->
-
-
-                        <!-- TMPL_IF name="f28l" -->
-                        <option value="l" SELECTED>l- Local</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="l">l- Local</option>
-                        <!-- /TMPL_IF -->
-
-			
-                        <!-- TMPL_IF name="f28m" -->
-                        <option value="m" SELECTED>m- Multistate</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="m">m- Multistate</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f28o" -->
-                        <option value="o" SELECTED>o- Government publication - level undetermined</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="o">o- Government publication - level undetermined</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f28s" -->
-                        <option value="s" SELECTED>s- State, provincial,territorial,dependent,etc.</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="s">s- State,provincial,territorial,dependent,etc.</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f28u" -->
-                        <option value="u" SELECTED>u- Unknown if item is government publication</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="u">u- Unknown if item is government publication</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f28z" -->
-                        <option value="z" SELECTED>z- Other</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="z">z- Other</option>
-                        <!-- /TMPL_IF -->
-		</select>
-		</td>
-	</tr>
-        <tr>
-                <td>29- Conference publication</td>
-                <td>
-                <select name="f29" size="1">
-                        <!-- TMPL_IF name="f290" -->
-                        <option value="0" SELECTED>0- Not a conference publication</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="0">0- Not a conference publication</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f291" -->
-                        <option value="1" SELECTED>1- Conference publication</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="1">1- Conference publication</option>
-                        <!-- /TMPL_IF -->
-
-		</select>
-		</td>
-	</tr>
-	<tr>
-                <td>30- Festschrift</td>
-                <td>
-                <select name="f30" size="1">
-                        <!-- TMPL_IF name="f300" -->
-                        <option value="0" SELECTED>0- Not a festschrift</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="0">0- Not a festschrift</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f301" -->
-                        <option value="1" SELECTED>1- Festschrift</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="1">1- Festschrift</option>
-                        <!-- /TMPL_IF -->
-                </select>
-                </td>
-        </tr>
-
-        <tr>
-                <td>31- Index</td>
-                <td>
-                <select name="f31" size="1">
-                        <!-- TMPL_IF name="f31|" -->
-                        <option value="|" SELECTED>|- Default</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="|">|- Default</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f310" -->
-                        <option value="0" SELECTED>0- No Index</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="0">0- No Index</option>
-                        <!-- /TMPL_IF -->
-                        <!-- TMPL_IF name="f311" -->
-                        <option value="1" SELECTED>1- Index present</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="1">1- Index present</option>
-                        <!-- /TMPL_IF -->
-                </select>
-                </td>
-        	</tr>
-		<tr><td>32 Undefined</td><td></td>
-		</tr>
-		<tr>
-                <td>33- Literary form</td>
-                <td>
-                <select name="f33" size="1">
-                        <!-- TMPL_IF name="f330" -->
-                        <option value="0" SELECTED>0- Not fiction</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="0">0- Not fiction</option>
-                        <!-- /TMPL_IF -->
-                        <!-- TMPL_IF name="f331" -->
-                        <option value="1" SELECTED>1- Fiction</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="1">1- Fiction</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f33c" -->
-                        <option value="c" SELECTED>c- Comic strips</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">c- Comic stripts</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f33d" -->
-                        <option value="d" SELECTED>d- Dramas</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Dramas</option>
-                        <!-- /TMPL_IF -->
-
-
-                        <!-- TMPL_IF name="f33e" -->
-                        <option value="e" SELECTED>e- Essays</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="e">e- Essays</option>
-                        <!-- /TMPL_IF -->
-
-			
-                        <!-- TMPL_IF name="f33f" -->
-                        <option value="f" SELECTED>f- Novels</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="f">f- Novels</option>
-                        <!-- /TMPL_IF -->
-
-			
-                        <!-- TMPL_IF name="f33h" -->
-                        <option value="h" SELECTED>h- Humor,satires,etc.</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="h">h- Humor,satires,etc.</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f33i" -->
-                        <option value="i" SELECTED>i- Letters</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="i">i- Letters</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f33j" -->
-                        <option value="j" SELECTED>j- Short stories</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="j">j- Short stories</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f33m" -->
-                        <option value="m" SELECTED>m- Mixed forms</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="m">m- Mixed forms</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f33p" -->
-                        <option value="p" SELECTED>p- Poetry</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="p">p- Poetry</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f33s" -->
-                        <option value="s" SELECTED>s- Speeches</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="s">s- Speeches</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f33u" -->
-                        <option value="u" SELECTED>u- Unknown</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="u">u- Unknown</option>
-                        <!-- /TMPL_IF -->
-
-
-
-                </select>
-                </td>
-        </tr>
-	<tr>
-                <td>34- Biography</td>
-                <td>
-                <select name="f34" size="1">
-                        <!-- TMPL_IF name="f340" -->
-                        <option value=" " SELECTED>#- No biographical material</option>                              <!-- TMPL_ELSE -->
-                        <option value=" ">#- No biographical material</option>
-                        <!-- /TMPL_IF -->
-                        <!-- TMPL_IF name="f34a" -->
-                        <option value="a" SELECTED>a- Autobiography</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="a">a- Autobiography</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f34b" -->
-                        <option value="b" SELECTED>b- Individual biography</option>                              <!-- TMPL_ELSE -->
-                        <option value="b">b- Individual biography</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f34c" -->
-                        <option value="c" SELECTED>c- Collective biography</option>                              <!-- TMPL_ELSE -->
-                        <option value="c">c- Collective biographyl</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f34d" -->
-                        <option value="d" SELECTED>d- Contains bibliographic information</option>                              <!-- TMPL_ELSE -->
-                        <option value="d">d- Contains bibliographic information</option>
-                        <!-- /TMPL_IF -->
-                </select>
-                </td>
-        </tr>
-
-	 <tr>
-
-                <td>35-37 Language see <a href="http://www.itsmarc.com/crs/lang0098.htm">MARC Code List for Languages</a></td>
-                <td>
-                        <input type="text" name="f3537" size="4"  maxlength="4" value="<!-- TMPL_VAR NAME="f3537" -->"/>
-                </td>
-        </tr>
-	<tr>
-                <td>38- Modified Record</td>
-                <td>                
-		<select name="f38" size="1">                        			
-			<!-- TMPL_IF name="f380" -->
-                        <option value=" " SELECTED>#- Not Modified</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- Not Modified</option>
-                        <!-- /TMPL_IF -->
-			
-			<!-- TMPL_IF name="f38s" -->
-                        <option value="s" SELECTED>s- Shortened</option>
-			<!-- TMPL_ELSE -->
-                        <option value="s">s- Shortened</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f38d" -->
-                        <option value="d" SELECTED>d- Dashed-on information omitted</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Dashed-on information omitted</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f38x" -->
-                        <option value="x" SELECTED>x- Missing characters</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="x">x- Missing characters</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f38r" -->
-                        <option value="r" SELECTED>r- Completely romanized/printed cards in script</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="r">r- Completely romanized/printed cards in script</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f38o" -->
-                        <option value="o" SELECTED>o- Completely romainzed/printed cards romanized</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="o">o- Completely romanized/printed cards romanized</option>
-                        <!-- /TMPL_IF -->
-		</select>
-
-                </td>
-        </tr>
-<tr>
-                <td>39- Cataloging source</td>
-                <td>
-                <select name="f39" size="1">                                    
-                        <!-- TMPL_IF name="f390" -->
-                        <option value=" " SELECTED>#- National bibliographic agency</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- National bibliographic agency</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f39c" -->
-                        <option value="c" SELECTED>c- Cooperative cataloging program</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">c- Cooperative cataloging program</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f39d" -->
-                        <option value="d" SELECTED>d- Other</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Other</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f39u" -->
-                        <option value="u" SELECTED>u- Unknown</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="u">u- Unknown</option>
-                        <!-- /TMPL_IF -->
-		</select>
-                </td>
-        </tr>
-
-	<tr><td colspan=2><input type="submit" value="OK"></td></tr>
-</table>
-</form>
-<script>
-function report() {
-		opener.document.f.field_value[<!-- TMPL_VAR name="index" -->].value = 
-			document.f_pop.f1.value+
-			document.f_pop.f6.value+
-			document.f_pop.f710.value+
-			document.f_pop.f1114.value+
-			document.f_pop.f1517.value+
-			document.f_pop.f1821.value+
-			document.f_pop.f22.value+
-			document.f_pop.f23.value+
-			document.f_pop.f2427.value+
-			document.f_pop.f28.value+
-			document.f_pop.f29.value+
-			document.f_pop.f30.value+
-			document.f_pop.f31.value+ ' '+
-			document.f_pop.f33.value+
-			document.f_pop.f34.value+
-			document.f_pop.f3537.value+
-			document.f_pop.f38.value+
-			document.f_pop.f39.value;
-		self.close();
-		return false;
-	}
-</script>
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_006.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_006.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_006.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_006.tmpl	11 Sep 2006 17:41:56 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,449 +0,0 @@
-<html>
-<head>
-<title>Leader builder</title>
-</head>
-<body>
-<form name="f_pop" onSubmit="javascript:report()">
-<table>
-	<tr>
-		<td>0 Form of material</td>
-                <td>
-                        <select name="f0" size="1">
-                        <!-- TMPL_IF name="f0a" -->
-                                <option value="a" SELECTED>a- Language material</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="a">a- Language material</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f0b" -->
-                                <option value="b" SELECTED>b- Manuscript language material</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="b">b- Manuscript language material</option>
-                        <!-- /TMPL_IF -->
-        		</select>
-		</td>
-	</tr>
-	<tr>
-                <td>01-04 Illustrations </td>
-                <td>(auto-filled from 300)<input type="hidden" name="f014" size="4"  maxlength="4" value="<!-- TMPL_VAR NAME="f014" -->"/></td>
-        </tr>
-	        <tr>
-                <!-- 5 Target Audience -->
-                <td>5- Target Audience</td>
-                <td>
-                <select name="f5" size="1">
-
-                        <!-- TMPL_IF name="f5|" -->
-                        <option value="|" SELECTED>|- Default</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="|">|- Default</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f50" -->
-                        <option value=" " SELECTED>#- Unknown or not specified</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- Unknown or not specified</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f5a" -->
-                         <option value="a" SELECTED>a- Preschool</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="a">a- Preschool</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f5b" -->
-                         <option value="b" SELECTED>b- Primary</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="b">b- Primary</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f5c" -->
-                         <option value="c" SELECTED>c- Elementary and junior high</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">c- Elementary and junior high</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f5d" -->
-                         <option value="d" SELECTED>d- Secondary (senior high)</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Secondary (senior high)</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f5e" -->
-                         <option value="e" SELECTED>e- Adult</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="e">e- Adult</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f5f" -->
-                         <option value="f" SELECTED>f- Specialized</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="f">f- Specialized</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f5g" -->
-                         <option value="g" SELECTED>g- General</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="g">g- General</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f5j" -->
-                         <option value="j" SELECTED>j- Juvenile</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="j">j- Juvenile</option>
-                        <!-- /TMPL_IF -->
-                </select>
-                </td>
-        <tr>
-	 <tr>
-                <!-- 06 Form of an item -->
-                <td>06- Form of an item</td>
-                <td>
-                <select name="f6" size="1">
-
-                        <!-- TMPL_IF name="f60" -->
-                        <option value=" " SELECTED>#- None of the following</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- None of the following</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f6a" -->
-                        <option value="a" SELECTED>a- Microfilm</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="a">a- Microfilm</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f6b" -->
-                        <option value="b" SELECTED>b- Microfiche</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="b">b- Microfiche</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f6c" -->
-                        <option value="c" SELECTED>a- Microopaque</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">a- Microopaque</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f6d" -->
-                        <option value="d" SELECTED>d- Large Print</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Large Print</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f6f" -->
-                        <option value="f" SELECTED>f- Braille</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="f">f- Braille</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f6r" -->
-                        <option value="r" SELECTED>r- Regular print reproduction</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="r">r- Regular print reproduction</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f6s" -->
-                        <option value="s" SELECTED>s- Electronic</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="s">s- Electronic</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f6!" -->
-                        <option value="!" SELECTED>!- No attempt to code</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="!">!- No attempt to code</option>
-                        <!-- /TMPL_IF -->
-                </select>
-                </td>
-        </tr>
-       <tr>
-                <td>7-10 Nature of contents </td>
-                <td>(Derived value)
-                        <input type="hidden" name="f710" size="4" maxlength="4" value="<!-- TMPL_VAR NAME="f710" -->"/>                </td>
-        </tr>
-        <tr>
-                <td>11- Government Publication</td>
-                <td>
-                <select name="f11" size="1">
-		
-                        <!-- TMPL_IF name="f11|" -->
-                        <option value="|" SELECTED>|- Default</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="|">|- Default</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f110" -->
-                        <option value=" " SELECTED>#- Not a government publication</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- Not a government publication</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f11a" -->
-                        <option value="a" SELECTED>a- Autonomous or semi-autonomous component</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="a">a- Autonomous or semi-autonomous component</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f11c" -->
-                        <option value="c" SELECTED>c- Multilocal</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">c- Multilocal</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f11f" -->
-                        <option value="f" SELECTED>f- Federal/national</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="f">f- Federal/national</option>
-                        <!-- /TMPL_IF -->
-
-
-                        <!-- TMPL_IF name="f11i" -->
-                        <option value="i" SELECTED>i- International intergovernmental</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="i">i- International intergovernmental</option>
-                        <!-- /TMPL_IF -->
-
-
-                        <!-- TMPL_IF name="f11l" -->
-                        <option value="l" SELECTED>l- Local</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="l">l- Local</option>
-                        <!-- /TMPL_IF -->
-
-
-                        <!-- TMPL_IF name="f11m" -->
-                        <option value="m" SELECTED>m- Multistate</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="m">m- Multistate</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f11o" -->
-                        <option value="o" SELECTED>o- Government publication - level undetermined</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="o">o- Government publication - level undetermined</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f11s" -->
-                        <option value="s" SELECTED>s- State, provincial,territorial,dependent,etc.</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="s">s- State,provincial,territorial,dependent,etc.</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f11u" -->
-                        <option value="u" SELECTED>u- Unknown if item is government publication</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="u">u- Unknown if item is government publication</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f11z" -->
-                        <option value="z" SELECTED>z- Other</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="z">z- Other</option>
-                        <!-- /TMPL_IF -->
-                </select>
-                </td>
-        </tr>
-        <tr>
-                <td>12- Conference publication</td>
-                <td>
-                <select name="f12" size="1">
-                        <!-- TMPL_IF name="f120" -->
-                        <option value="0" SELECTED>0- Not a conference publication</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="0">0- Not a conference publication</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f121" -->
-                        <option value="1" SELECTED>1- Conference publication</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="1">1- Conference publication</option>
-                        <!-- /TMPL_IF -->
-
-		</select>
-		</td>
-	</tr>
-	<tr>
-                <td>13- Festschrift</td>
-                <td>
-                <select name="f13" size="1">
-                        <!-- TMPL_IF name="f130" -->
-                        <option value="0" SELECTED>0- Not a festschrift</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="0">0- Not a festschrift</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f131" -->
-                        <option value="1" SELECTED>1- Festschrift</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="1">1- Festschrift</option>
-                        <!-- /TMPL_IF -->
-                </select>
-                </td>
-        </tr>
-
-        <tr>
-                <td>14- Index</td>
-                <td>
-                <select name="f14" size="1">
-                        <!-- TMPL_IF name="f14|" -->
-                        <option value="|" SELECTED>|- Default</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="|">|- Default</option>
-                        <!-- /TMPL_IF -->
-	
-                        <!-- TMPL_IF name="f140" -->
-                        <option value="0" SELECTED>0- No Index</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="0">0- No Index</option>
-                        <!-- /TMPL_IF -->
-                        <!-- TMPL_IF name="f141" -->
-                        <option value="1" SELECTED>1- Index present</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="1">1- Index present</option>
-                        <!-- /TMPL_IF -->
-                </select>
-                </td>
-        	</tr>
-		<tr><td>15 Undefined</td><td></td>
-		</tr>
-		<tr>
-                <td>16- Literary form</td>
-                <td>
-                <select name="f16" size="1">
-                        <!-- TMPL_IF name="f160" -->
-                        <option value="0" SELECTED>0- Not fiction</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="0">0- Not fiction</option>
-                        <!-- /TMPL_IF -->
-                        <!-- TMPL_IF name="f161" -->
-                        <option value="1" SELECTED>1- Fiction</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="1">1- Fiction</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f16c" -->
-                        <option value="c" SELECTED>c- Comic strips</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">c- Comic stripts</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f16d" -->
-                        <option value="d" SELECTED>d- Dramas</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Dramas</option>
-                        <!-- /TMPL_IF -->
-
-
-                        <!-- TMPL_IF name="f16e" -->
-                        <option value="e" SELECTED>e- Essays</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="e">e- Essays</option>
-                        <!-- /TMPL_IF -->
-
-			
-                        <!-- TMPL_IF name="f16f" -->
-                        <option value="f" SELECTED>f- Novels</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="f">f- Novels</option>
-                        <!-- /TMPL_IF -->
-
-			
-                        <!-- TMPL_IF name="f16h" -->
-                        <option value="h" SELECTED>h- Humor,satires,etc.</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="h">h- Humor,satires,etc.</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f16i" -->
-                        <option value="i" SELECTED>i- Letters</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="i">i- Letters</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f16j" -->
-                        <option value="j" SELECTED>j- Short stories</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="j">j- Short stories</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f16m" -->
-                        <option value="m" SELECTED>m- Mixed forms</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="m">m- Mixed forms</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f16p" -->
-                        <option value="p" SELECTED>p- Poetry</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="p">p- Poetry</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f16s" -->
-                        <option value="s" SELECTED>s- Speeches</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="s">s- Speeches</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f16u" -->
-                        <option value="u" SELECTED>u- Unknown</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="u">u- Unknown</option>
-                        <!-- /TMPL_IF -->
-
-                </select>
-                </td>
-        </tr>
-	<tr>
-                <td>17- Biography</td>
-                <td>
-                <select name="f17" size="1">
-                        <!-- TMPL_IF name="f170" -->
-                        <option value=" " SELECTED>#- No biographical material</option>                              <!-- TMPL_ELSE -->
-                        <option value=" ">#- No biographical material</option>
-                        <!-- /TMPL_IF -->
-                        <!-- TMPL_IF name="f17a" -->
-                        <option value="a" SELECTED>a- Autobiography</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="a">a- Autobiography</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f17b" -->
-                        <option value="b" SELECTED>b- Individual biography</option>                              <!-- TMPL_ELSE -->
-                        <option value="b">b- Individual biography</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f17c" -->
-                        <option value="c" SELECTED>c- Collective biography</option>                              <!-- TMPL_ELSE -->
-                        <option value="c">c- Collective biographyl</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f17d" -->
-                        <option value="d" SELECTED>d- Contains bibliographic information</option>                              <!-- TMPL_ELSE -->
-                        <option value="d">d- Contains bibliographic information</option>
-                        <!-- /TMPL_IF -->
-                </select>
-                </td>
-        </tr>
-
-	<tr><td colspan=2><input type="submit" value="OK"></td></tr>
-</table>
-</form>
-<script>
-function report() {
-		opener.document.f.field_value[<!-- TMPL_VAR name="index" -->].value = 
-			'<!-- TMPL_VAR NAME="dateentered" -->'+
-			document.f_pop.f0.value+
-			document.f_pop.f014.value+
-			document.f_pop.f5.value+
-			document.f_pop.f6.value+
-			document.f_pop.f710.value+
-			document.f_pop.f11.value+
-			document.f_pop.f12.value+
-			document.f_pop.f13.value+
-			document.f_pop.f14.value+ ' '+
-			document.f_pop.f16.value+
-			document.f_pop.f17.value;
-		self.close();
-		return false;
-	}
-</script>
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_007.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_007.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_007.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_007.tmpl	11 Sep 2006 17:41:56 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,79 +0,0 @@
-<html>
-<head>
-<title>Leader builder</title>
-</head>
-<body>
-<form name="f_pop" onSubmit="javascript:report()">
-<table>
-	<tr>
-		<td>00 Category of material</td>
-                <td>
-                        <select name="f0" size="1">
-                        <!-- TMPL_IF name="f0t" -->
-                                <option value="t" SELECTED>t- Text</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="t">t- Text</option>
-                        <!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-	<tr>
-                <td>01 Specific material designation</td>
-                <td>
-                        <select name="f1" size="1">
-                        <!-- TMPL_IF name="f1a" -->
-                                <option value="a" SELECTED>a- Regular print</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="a">a- Regular print</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f1b" -->
-                                <option value="b" SELECTED>b- Large print</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="b">b- Large print </option>
-                        <!-- /TMPL_IF -->
-			
-			<!-- TMPL_IF name="f1c" -->
-                                <option value="c" SELECTED>c- Braille</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="c">c- Braille</option>
-                        <!-- /TMPL_IF -->
-			
-			<!-- TMPL_IF name="f1d" -->
-                                <option value="d" SELECTED>d- Loose-leaf</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="d">d- Loose-leaf</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f1u" -->
-                                <option value="u" SELECTED>u- Unspecified</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="u">u- Unspecified</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f1z" -->
-                                <option value="z" SELECTED>z- Other</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="z">z- Other</option>
-                        <!-- /TMPL_IF -->
-
-                        </select>
-                </td>
-        </tr>
-
-
-
-	<tr><td colspan=2><input type="submit" value="OK"></td></tr>
-</table>
-</form>
-<script>
-function report() {
-		opener.document.f.field_value[<!-- TMPL_VAR name="index" -->].value = 
-			document.f_pop.f0.value+
-			document.f_pop.f1.value;
-		self.close();
-		return false;
-	}
-</script>
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_008.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_008.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_008.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_field_008.tmpl	11 Sep 2006 17:41:56 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,634 +0,0 @@
-<html>
-<head>
-<title>Leader builder</title>
-</head>
-<body>
-<form name="f_pop" onSubmit="javascript:report()">
-<table>
-	<tr>
-		<td>1-5 Date entered on file</td>
-		<td>(auto-filled)</td>
-		<td><input type="text" name="f1" maxlength=6 size=7 value="<!-- TMPL_VAR name="f1" -->"></td>
-	</tr>
-	<tr>
-		<!-- 06 Type of date / Publication status -->
-		<td>06- Type of date / Publication Status</td>
-		<td>
-			<!-- NO DATE; B.C. DATE -->
-
-			<select name="f6" size="1">
-			<!-- TMPL_IF name="f60" -->
-                                <option value=" " SELECTED>#- Blank</option>
-                        <!-- TMPL_ELSE -->
-                                <option value=" ">#- Blank</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f6b" -->
-				<option value="b" SELECTED>b- B.C. Date</option>
-			<!-- TMPL_ELSE -->
-				<option value="b">b- B.C. Date</option>
-			<!-- /TMPL_IF -->
-
-			<!-- SINGLE DATE -->
-			<!-- TMPL_IF name="f6e" -->
-                                <option value="e" SELECTED>e- Detailed date</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="e">e- Detailed date</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6s" -->
-                                <option value="s" SELECTED>s- Single date</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="s">s- Single date</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- MULTIPLE DATES -->
-			<!-- TMPL_IF name="f6i" -->
-                                <option value="i" SELECTED>i- Inclusive dates of collection</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="i">i- Inclusive dates of collection</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6k" -->
-                                <option value="k" SELECTED>k- Range of years of bulk collection</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="k">k- Range of years of bulk collection</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6m" -->
-                                <option value="m" SELECTED>m- Multiple dates</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="m">m- Multiple dates</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6p" -->
-                                <option value="p" SELECTED>p- Distribution/production date</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="p">p- Distribution/production date</option>
-			<!-- /TMPL_IF -->
-	
-			<!-- TMPL_IF name="f6r" -->
-				<option value="r" SELECTED>r- Reprint/original date</option>
-			<!-- TMPL_ELSE -->
-				<option value="r">r- Reprint/original date</option>
-			<!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f6t" -->
-                                <option value="t" SELECTED>t- Publication date and copyright date</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="t">t- Publication date and copyright date</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- UNKNOWN DATES -->
-			<!-- TMPL_IF name="f6n" -->
-                                <option value="n" SELECTED>n- Dates unknown</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="n">n- Dates unknown</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f6q" -->
-                                <option value="q" SELECTED>q- Questionable date</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="q">q- Questionable date</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f6c" -->
-                                <option value="c" SELECTED>c- Serial item currently published</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="c">c- Serial item currently published</option>
-                        <!-- /TMPL_IF -->
-				
-			<!-- TMPL_IF name="f6d" -->
-                                <option value="d" SELECTED>d- Serial item ceased publication (Dead status)</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="d">d- Serial item ceased publication (Dead status)</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6u" -->
-                                <option value="u" SELECTED>u- Serial item status unknown</option>
-                        <!-- TMPL_ELSE -->
-                                <option value="u">u- Serial item status unknown</option>
-                        <!-- /TMPL_IF -->
-
-
-	
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td>7-10 Date1 / Begininning date of publication </td>
-		<td>
-			<input type="text" name="f710" size="4" maxlength="4" value="<!-- TMPL_VAR NAME="f710" -->"/>
-		</td>
-	</tr>
-	<tr>
-                <td>11-14 Date2 / ending date of publication </td>
-                <td>
-                        <input type="text" name="f1114" size="4" maxlength="4" value="<!-- TMPL_VAR NAME="f1114" -->"/>                </td>
-        </tr>
-
-	<tr>
-                <td>15-17 Place of publication, production, or execution </td>
-                <td>
-                        <input type="text" name="f1517" size="3"  maxlength="3" value="<!-- TMPL_VAR NAME="f1517" -->"/>
-                </td>
-        </tr>
-	 <tr>
-                <td>18-21 Illustrations </td>
-		<td>(auto-filled from 300)<input type="hidden" name="f1821" size="4"  maxlength="4" value="<!-- TMPL_VAR NAME="f1821" -->"/></td>
-        </tr>
-	<tr>
-                <!-- 22 Target Audience -->
-                <td>22- Target Audience</td>
-                <td>                        
-                <select name="f22" size="1">
-
-                        <!-- TMPL_IF name="f22|" -->
-                        <option value="|" SELECTED>|- Default</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="|">|- Default</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f220" -->
-                        <option value=" " SELECTED>#- Unknown or not specified</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- Unknown or not specified</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f22a" -->
-                         <option value="a" SELECTED>a- Preschool</option>
-	                <!-- TMPL_ELSE -->
-			<option value="a">a- Preschool</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f22b" -->
-                         <option value="b" SELECTED>b- Primary</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="b">b- Primary</option>
-                        <!-- /TMPL_IF -->	
-
-			<!-- TMPL_IF name="f22c" -->
-                         <option value="c" SELECTED>c- Elementary and junior high</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">c- Elementary and junior high</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f22d" -->
-                         <option value="d" SELECTED>d- Secondary (senior high)</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Secondary (senior high)</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f22e" -->
-                         <option value="e" SELECTED>e- Adult</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="e">e- Adult</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f22f" -->
-                         <option value="f" SELECTED>f- Specialized</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="f">f- Specialized</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f22g" -->
-                         <option value="g" SELECTED>g- General</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="g">g- General</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f22j" -->
-                         <option value="j" SELECTED>j- Juvenile</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="j">j- Juvenile</option>
-                        <!-- /TMPL_IF -->
-		</select>
-		</td>
-	<tr>
-	<tr>
-                <!-- 23 Form of an item -->
-                <td>23- Form of an item</td>
-                <td>
-                <select name="f23" size="1">
-
-                        <!-- TMPL_IF name="f230" -->
-                        <option value=" " SELECTED>#- None of the following</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- None of the following</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23a" -->
-                        <option value="a" SELECTED>a- Microfilm</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="a">a- Microfilm</option>
-                        <!-- /TMPL_IF -->
-			
-			<!-- TMPL_IF name="f23b" -->
-                        <option value="b" SELECTED>b- Microfiche</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="b">b- Microfiche</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23c" -->
-                        <option value="c" SELECTED>a- Microopaque</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">a- Microopaque</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23d" -->
-                        <option value="d" SELECTED>d- Large Print</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Large Print</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23f" -->
-                        <option value="f" SELECTED>f- Braille</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="f">f- Braille</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23r" -->
-                        <option value="r" SELECTED>r- Regular print reproduction</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="r">r- Regular print reproduction</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23s" -->
-                        <option value="s" SELECTED>s- Electronic</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="s">s- Electronic</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f23!" -->
-                        <option value="!" SELECTED>!- No attempt to code</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="!">!- No attempt to code</option>
-                        <!-- /TMPL_IF -->
-		</select>
-		</td>
-	</tr>
-	<tr>
-                <td>24-27 Nature of contents </td>
-                <td>(Derived value)
-                        <input type="hidden" name="f2427" size="4" maxlength="4" value="<!-- TMPL_VAR NAME="f2427" -->"/>                </td>
-        </tr>
-        <tr>
-                <td>28- Government Publication</td>
-                <td>
-                <select name="f28" size="1">                                    
-                        <!-- TMPL_IF name="f280" -->
-                        <option value=" " SELECTED>#- Not a government publication</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- Not a government publication</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f28a" -->
-                        <option value="a" SELECTED>a- Autonomous or semi-autonomous component</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="a">a- Autonomous or semi-autonomous component</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f28c" -->
-                        <option value="c" SELECTED>c- Multilocal</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">c- Multilocal</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f28f" -->
-                        <option value="f" SELECTED>f- Federal/national</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="f">f- Federal/national</option>
-                        <!-- /TMPL_IF -->
-
-
-                        <!-- TMPL_IF name="f28i" -->
-                        <option value="i" SELECTED>i- International intergovernmental</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="i">i- International intergovernmental</option>
-                        <!-- /TMPL_IF -->
-
-
-                        <!-- TMPL_IF name="f28l" -->
-                        <option value="l" SELECTED>l- Local</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="l">l- Local</option>
-                        <!-- /TMPL_IF -->
-
-			
-                        <!-- TMPL_IF name="f28m" -->
-                        <option value="m" SELECTED>m- Multistate</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="m">m- Multistate</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f28o" -->
-                        <option value="o" SELECTED>o- Government publication - level undetermined</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="o">o- Government publication - level undetermined</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f28s" -->
-                        <option value="s" SELECTED>s- State, provincial,territorial,dependent,etc.</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="s">s- State,provincial,territorial,dependent,etc.</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f28u" -->
-                        <option value="u" SELECTED>u- Unknown if item is government publication</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="u">u- Unknown if item is government publication</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f28z" -->
-                        <option value="z" SELECTED>z- Other</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="z">z- Other</option>
-                        <!-- /TMPL_IF -->
-		</select>
-		</td>
-	</tr>
-        <tr>
-                <td>29- Conference publication</td>
-                <td>
-                <select name="f29" size="1">
-                        <!-- TMPL_IF name="f290" -->
-                        <option value="0" SELECTED>0- Not a conference publication</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="0">0- Not a conference publication</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f291" -->
-                        <option value="1" SELECTED>1- Conference publication</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="1">1- Conference publication</option>
-                        <!-- /TMPL_IF -->
-
-		</select>
-		</td>
-	</tr>
-	<tr>
-                <td>30- Festschrift</td>
-                <td>
-                <select name="f30" size="1">
-                        <!-- TMPL_IF name="f300" -->
-                        <option value="0" SELECTED>0- Not a festschrift</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="0">0- Not a festschrift</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f301" -->
-                        <option value="1" SELECTED>1- Festschrift</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="1">1- Festschrift</option>
-                        <!-- /TMPL_IF -->
-                </select>
-                </td>
-        </tr>
-
-        <tr>
-                <td>31- Index</td>
-                <td>
-                <select name="f31" size="1">
-                        <!-- TMPL_IF name="f31|" -->
-                        <option value="|" SELECTED>|- Default</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="|">|- Default</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f310" -->
-                        <option value="0" SELECTED>0- No Index</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="0">0- No Index</option>
-                        <!-- /TMPL_IF -->
-                        <!-- TMPL_IF name="f311" -->
-                        <option value="1" SELECTED>1- Index present</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="1">1- Index present</option>
-                        <!-- /TMPL_IF -->
-                </select>
-                </td>
-        	</tr>
-		<tr><td>32 Undefined</td><td></td>
-		</tr>
-		<tr>
-                <td>33- Literary form</td>
-                <td>
-                <select name="f33" size="1">
-                        <!-- TMPL_IF name="f330" -->
-                        <option value="0" SELECTED>0- Not fiction</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="0">0- Not fiction</option>
-                        <!-- /TMPL_IF -->
-                        <!-- TMPL_IF name="f331" -->
-                        <option value="1" SELECTED>1- Fiction</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="1">1- Fiction</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f33c" -->
-                        <option value="c" SELECTED>c- Comic strips</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">c- Comic stripts</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f33d" -->
-                        <option value="d" SELECTED>d- Dramas</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Dramas</option>
-                        <!-- /TMPL_IF -->
-
-
-                        <!-- TMPL_IF name="f33e" -->
-                        <option value="e" SELECTED>e- Essays</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="e">e- Essays</option>
-                        <!-- /TMPL_IF -->
-
-			
-                        <!-- TMPL_IF name="f33f" -->
-                        <option value="f" SELECTED>f- Novels</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="f">f- Novels</option>
-                        <!-- /TMPL_IF -->
-
-			
-                        <!-- TMPL_IF name="f33h" -->
-                        <option value="h" SELECTED>h- Humor,satires,etc.</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="h">h- Humor,satires,etc.</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f33i" -->
-                        <option value="i" SELECTED>i- Letters</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="i">i- Letters</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f33j" -->
-                        <option value="j" SELECTED>j- Short stories</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="j">j- Short stories</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f33m" -->
-                        <option value="m" SELECTED>m- Mixed forms</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="m">m- Mixed forms</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f33p" -->
-                        <option value="p" SELECTED>p- Poetry</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="p">p- Poetry</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f33s" -->
-                        <option value="s" SELECTED>s- Speeches</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="s">s- Speeches</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f33u" -->
-                        <option value="u" SELECTED>u- Unknown</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="u">u- Unknown</option>
-                        <!-- /TMPL_IF -->
-
-
-
-                </select>
-                </td>
-        </tr>
-	<tr>
-                <td>34- Biography</td>
-                <td>
-                <select name="f34" size="1">
-                        <!-- TMPL_IF name="f340" -->
-                        <option value=" " SELECTED>#- No biographical material</option>                              <!-- TMPL_ELSE -->
-                        <option value=" ">#- No biographical material</option>
-                        <!-- /TMPL_IF -->
-                        <!-- TMPL_IF name="f34a" -->
-                        <option value="a" SELECTED>a- Autobiography</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="a">a- Autobiography</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f34b" -->
-                        <option value="b" SELECTED>b- Individual biography</option>                              <!-- TMPL_ELSE -->
-                        <option value="b">b- Individual biography</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f34c" -->
-                        <option value="c" SELECTED>c- Collective biography</option>                              <!-- TMPL_ELSE -->
-                        <option value="c">c- Collective biographyl</option>
-                        <!-- /TMPL_IF -->
-			
-                        <!-- TMPL_IF name="f34d" -->
-                        <option value="d" SELECTED>d- Contains bibliographic information</option>                              <!-- TMPL_ELSE -->
-                        <option value="d">d- Contains bibliographic information</option>
-                        <!-- /TMPL_IF -->
-                </select>
-                </td>
-        </tr>
-
-	 <tr>
-
-                <td>35-37 Language see <a href="http://www.itsmarc.com/crs/lang0098.htm">MARC Code List for Languages</a></td>
-                <td>
-                        <input type="text" name="f3537" size="4"  maxlength="4" value="<!-- TMPL_VAR NAME="f3537" -->"/>
-                </td>
-        </tr>
-	<tr>
-                <td>38- Modified Record</td>
-                <td>                
-		<select name="f38" size="1">                        			
-			<!-- TMPL_IF name="f380" -->
-                        <option value=" " SELECTED>#- Not Modified</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- Not Modified</option>
-                        <!-- /TMPL_IF -->
-			
-			<!-- TMPL_IF name="f38s" -->
-                        <option value="s" SELECTED>s- Shortened</option>
-			<!-- TMPL_ELSE -->
-                        <option value="s">s- Shortened</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f38d" -->
-                        <option value="d" SELECTED>d- Dashed-on information omitted</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Dashed-on information omitted</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f38x" -->
-                        <option value="x" SELECTED>x- Missing characters</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="x">x- Missing characters</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f38r" -->
-                        <option value="r" SELECTED>r- Completely romanized/printed cards in script</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="r">r- Completely romanized/printed cards in script</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f38o" -->
-                        <option value="o" SELECTED>o- Completely romainzed/printed cards romanized</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="o">o- Completely romanized/printed cards romanized</option>
-                        <!-- /TMPL_IF -->
-		</select>
-
-                </td>
-        </tr>
-<tr>
-                <td>39- Cataloging source</td>
-                <td>
-                <select name="f39" size="1">                                    
-                        <!-- TMPL_IF name="f390" -->
-                        <option value=" " SELECTED>#- National bibliographic agency</option>
-                        <!-- TMPL_ELSE -->
-                        <option value=" ">#- National bibliographic agency</option>
-                        <!-- /TMPL_IF -->
-
-                        <!-- TMPL_IF name="f39c" -->
-                        <option value="c" SELECTED>c- Cooperative cataloging program</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="c">c- Cooperative cataloging program</option>
-                        <!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f39d" -->
-                        <option value="d" SELECTED>d- Other</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="d">d- Other</option>
-                        <!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f39u" -->
-                        <option value="u" SELECTED>u- Unknown</option>
-                        <!-- TMPL_ELSE -->
-                        <option value="u">u- Unknown</option>
-                        <!-- /TMPL_IF -->
-		</select>
-                </td>
-        </tr>
-
-	<tr><td colspan=2><input type="submit" value="OK"></td></tr>
-</table>
-</form>
-<script>
-function report() {
-		opener.document.f.field_value[<!-- TMPL_VAR name="index" -->].value = 
-			document.f_pop.f1.value+
-			document.f_pop.f6.value+
-			document.f_pop.f710.value+
-			document.f_pop.f1114.value+
-			document.f_pop.f1517.value+
-			document.f_pop.f1821.value+
-			document.f_pop.f22.value+
-			document.f_pop.f23.value+
-			document.f_pop.f2427.value+
-			document.f_pop.f28.value+
-			document.f_pop.f29.value+
-			document.f_pop.f30.value+
-			document.f_pop.f31.value+ ' '+
-			document.f_pop.f33.value+
-			document.f_pop.f34.value+
-			document.f_pop.f3537.value+
-			document.f_pop.f38.value+
-			document.f_pop.f39.value;
-		self.close();
-		return false;
-	}
-</script>
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader.tmpl	11 Sep 2006 17:41:56 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,328 +0,0 @@
-<html>
-<head>
-<title>Leader builder</title>
-</head>
-<body>
-<form name="f_pop" onSubmit="javascript:report()">
-<table>
-	<tr>
-		<td>0-4 Record size</td>
-		<td>(auto-filled)</td>
-	</tr>
-	<tr>
-		<td>5- Record status</td>
-		<td>
-			<select name="f5" size="1">
-			<!-- TMPL_IF name="f5a" -->
-				<option value=" " SELECTED>a- Increase in encoding level</option>
-			<!-- TMPL_ELSE -->
-				<option value=" ">a- Increase in encoding level</option>
-			<!-- /TMPL_IF -->
-
-			<!-- TMPL_IF name="f5c" -->
-				<option value="c" SELECTED>c- Corrected or revised</option>
-			<!-- TMPL_ELSE -->
-				<option value="c">c- Corrected or revised</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f5d" -->
-				<option value="d" SELECTED>d- Deleted</option>
-			<!-- TMPL_ELSE -->
-				<option value="d">d- Deleted</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f5n" -->
-				<option value="n" SELECTED>n- New</option>
-			<!-- TMPL_ELSE -->
-				<option value="n">n- New</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f5p" -->
-				<option value="p" SELECTED>p- Increase in encoding level from prepublication</option>
-			<!-- TMPL_ELSE -->
-				<option value="p">p- Increase in encoding level from prepublication</option>
-			<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td>6- Type of record</td>
-		<td>
-			<select name="f6" size="1">
-			<!-- TMPL_IF name="f6a" -->
-				<option value="a" SELECTED>a- Language material (monography)</option>
-			<!-- TMPL_ELSE -->
-				<option value="a">a- Language material (monography)</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6c" -->
-				<option value="c" SELECTED>c- Notated music</option>
-			<!-- TMPL_ELSE -->
-				<option value="c">c- Notated music</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6d" -->
-				<option value="d" SELECTED>d- Manuscript notated music</option>
-			<!-- TMPL_ELSE -->
-				<option value="d">d- Manuscript notated music</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6e" -->
-				<option value="e" SELECTED>e- Cartographic material</option>
-			<!-- TMPL_ELSE -->
-				<option value="e">e- Cartographic material</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6f" -->
-				<option value="f" SELECTED>f - Manuscript cartographic material</option>
-			<!-- TMPL_ELSE -->
-				<option value="f">f - Manuscript cartographic material</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6g" -->
-				<option value="g" SELECTED>g - Projected medium</option>
-			<!-- TMPL_ELSE -->
-				<option value="g">g - Projected medium</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6i" -->
-				<option value="i" SELECTED>i - Nonmusical sound recording</option>
-			<!-- TMPL_ELSE -->
-				<option value="i">i - Nonmusical sound recording</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6j" -->
-				<option value="j" SELECTED>j - Musical sound recording</option>
-			<!-- TMPL_ELSE -->
-				<option value="j">j - Musical sound recording</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6k" -->
-				<option value="k" SELECTED>k - Two-dimensional nonprojectable graphic</option>
-			<!-- TMPL_ELSE -->
-				<option value="k">k - Two-dimensional nonprojectable graphic</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6m" -->
-				<option value="m" SELECTED>m - Computer file</option>
-			<!-- TMPL_ELSE -->
-				<option value="m">m - Computer file</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6o" -->
-				<option value="o" SELECTED>o - Kit</option>
-			<!-- TMPL_ELSE -->
-				<option value="o">o - Kit</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6r" -->
-				<option value="r" SELECTED>r - Three-dimensional artifact or naturally occurring object</option>
-			<!-- TMPL_ELSE -->
-				<option value="r">r - Three-dimensional artifact or naturally occurring object</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f6t" -->
-				<option value="t" SELECTED>t - Manuscript language material</option>
-			<!-- TMPL_ELSE -->
-				<option value="t">t - Manuscript language material</option>
-			<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td>7- Bibliographic level</td>
-		<td>
-			<select name="f7" size="1">
-				<!-- TMPL_IF name="f7a" -->
-					<option value="a" SELECTED>a- Monographic component part</option>
-				<!-- TMPL_ELSE -->
-					<option value="a">a- Monographic component part</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f7b" -->
-					<option value="b" SELECTED>b- Serial component part</option>
-				<!-- TMPL_ELSE -->
-					<option value="b">a- Serial component part</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f7c" -->
-					<option value="c" SELECTED>c- Collection</option>
-				<!-- TMPL_ELSE -->
-					<option value="c">c- Collection</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f7d" -->
-					<option value="d" SELECTED>d- Subunit</option>
-				<!-- TMPL_ELSE -->
-					<option value="d">d- Subunit</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f7i" -->
-					<option value="i" SELECTED>i- Integrating resource</option>
-				<!-- TMPL_ELSE -->
-					<option value="i">i- Integrating resource</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f7m" -->
-					<option value="m" SELECTED>m- Monograph/item</option>
-				<!-- TMPL_ELSE -->
-					<option value="m">m- Monograph/item</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f7s" -->
-					<option value="s" SELECTED>s- Serial</option>
-				<!-- TMPL_ELSE -->
-					<option value="s">s- Serial</option>
-				<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-	
-	<tr>
-		<td>8- Hierarchic level</td>
-		<td>
-			<select name="f8" size="1">
-				<!-- TMPL_IF name="f8 " -->
-					<option value=" " SELECTED>No specific type</option>
-				<!-- TMPL_ELSE -->
-					<option value=" ">No specific type</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f8a" -->
-					<option value="a" SELECTED>a- Archival</option>
-				<!-- TMPL_ELSE -->
-					<option value="a">a- Archival</option>
-				<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-
-	<tr>
-		<td>9- Encoding</td>
-		<td>
-			<select name="f9" size="1">
-				<!-- TMPL_IF name="f9 " -->
-					<option value=" " SELECTED>MARC-8</option>
-				<!-- TMPL_ELSE -->
-					<option value=" ">MARC-8</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f9a" -->
-					<option value="a" SELECTED>a- UCS/Unicode</option>
-				<!-- TMPL_ELSE -->
-					<option value="a">a- UCS/Unicode</option>
-				<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td>10-16 indicator/subfields/size</td>
-		<td>(auto-filled)</td>
-	<tr>
-		<td>17- Encoding</td>
-		<td>
-			<select name="f17" size="1">
-				<!-- TMPL_IF name="f17 " -->
-					<option value=" " SELECTED>full level</option>
-				<!-- TMPL_ELSE -->
-					<option value=" ">Full level</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f171" -->
-					<option value="1" SELECTED>1- Full level, material not examined</option>
-				<!-- TMPL_ELSE -->
-					<option value="1">1- Full level, material not examined</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f172" -->
-					<option value="2" SELECTED>2 - Less-than-full level, material not examined</option>
-				<!-- TMPL_ELSE -->
-					<option value="2">2 - Less-than-full level, material not examined</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f173" -->
-					<option value="3" SELECTED>3- Abbreviated level</option>
-				<!-- TMPL_ELSE -->
-					<option value="3">3- Abbreviated level</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f174" -->
-					<option value="4" SELECTED>4- Core level</option>
-				<!-- TMPL_ELSE -->
-					<option value="4">4- Core level</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f175" -->
-					<option value="5" SELECTED>5- Partial (preliminary) level</option>
-				<!-- TMPL_ELSE -->
-					<option value="5">5- Partial (preliminary) level</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f177" -->
-					<option value="7" SELECTED>7- Minimal level</option>
-				<!-- TMPL_ELSE -->
-					<option value="7">7- Minimal level</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f178" -->
-					<option value="8" SELECTED>8- Prepublication level</option>
-				<!-- TMPL_ELSE -->
-					<option value="8">8- Prepublication level</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f17u" -->
-					<option value="u" SELECTED>u - Unknown</option>
-				<!-- TMPL_ELSE -->
-					<option value="u">u - Unknown</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f17z" -->
-					<option value="z" SELECTED>z- Not applicable</option>
-				<!-- TMPL_ELSE -->
-					<option value="z">z- Not applicableFull level</option>
-				<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-
-	<tr>
-		<td>18 - Descriptive cataloging form</td>
-		<td>
-			<select name="f18" size="1">
-				<!-- TMPL_IF name="f18 " -->
-					<option value=" " SELECTED>Non-ISBD</option>
-				<!-- TMPL_ELSE -->
-					<option value=" ">Non-ISBD</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f18a" -->
-					<option value="a" SELECTED>a- AACR 2</option>
-				<!-- TMPL_ELSE -->
-					<option value="a">a- AACR 2</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f18i" -->
-					<option value="i" SELECTED>i- ISBD</option>
-				<!-- TMPL_ELSE -->
-					<option value="i">i- ISBD</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f18u" -->
-					<option value="u" SELECTED>u- Unknown</option>
-				<!-- TMPL_ELSE -->
-					<option value="u">u- Unknown</option>
-				<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-	
-	<tr>
-		<td>19 - Linked record requirement</td>
-		<td>
-			<select name="f19" size="1">
-				<!-- TMPL_IF name="f19 " -->
-					<option value=" " SELECTED>Related record not required</option>
-				<!-- TMPL_ELSE -->
-					<option value=" ">Related record not required</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f19r" -->
-					<option value="r" SELECTED>r- Related record required</option>
-				<!-- TMPL_ELSE -->
-					<option value="r">r- Related record required</option>
-				<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td>20-23 entry map & lengths</td>
-		<td>(auto-filled)</td>
-	<tr>
-
-	<tr><td colspan=2><input type="submit" value="OK"></td></tr>
-</table>
-</form>
-<script>
-function report() {
-		opener.document.f.field_value[<!-- TMPL_VAR name="index" -->].value = 
-			'     '+
-			document.f_pop.f5.value+
-			document.f_pop.f6.value+
-			document.f_pop.f7.value+
-			document.f_pop.f8.value+
-			document.f_pop.f9.value+ 
-			'22     '+
-			document.f_pop.f17.value+
-			document.f_pop.f18.value+
-			document.f_pop.f19.value+
-			'4500';
-		self.close();
-		return false;
-	}
-</script>
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader_authorities.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader_authorities.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader_authorities.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader_authorities.tmpl	11 Sep 2006 17:41:56 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,117 +0,0 @@
-<html>
-<head>
-<title>Leader builder</title>
-</head>
-<body>
-<form name="f_pop" onSubmit="javascript:report()">
-<table>
-	<tr>
-		<td>0-4 Record size</td>
-		<td>(auto-filled)</td>
-	</tr>
-	<tr>
-		<td>5- Record status</td>
-		<td>
-			<select name="f5" size="1">
-			<!-- TMPL_IF name="f5a" -->
-				<option value="a" SELECTED>a- Increase in encoding</option>
-			<!-- TMPL_ELSE -->
-				<option value="a">a- Corrected or revised</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f5c" -->
-				<option value="c" SELECTED>c- Corrected or revised</option>
-			<!-- TMPL_ELSE -->
-				<option value="c">c- Corrected or revised</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f5d" -->
-				<option value="d" SELECTED>d- Deleted</option>
-			<!-- TMPL_ELSE -->
-				<option value="d">d- Deleted</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f5n" -->
-				<option value="n" SELECTED>n- New</option>
-			<!-- TMPL_ELSE -->
-				<option value="n">n- New</option>
-			<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td>6- Type of record</td>
-		<td>
-			<select name="f6" size="1">
-			<!-- TMPL_IF name="f6z" -->
-				<option value="z" SELECTED>z-Authority data</option>
-			<!-- TMPL_ELSE -->
-				<option value="z">z-Authority data</option>
-			<!-- /TMPL_IF -->
-			
-			</select>
-		</td>
-	</tr>
-	
-
-	<tr>
-		<td>9- Encoding</td>
-		<td>
-			<select name="f9" size="1">
-				<!-- TMPL_IF name="f9 " -->
-					<option value=" " SELECTED>MARC-8</option>
-				<!-- TMPL_ELSE -->
-					<option value=" ">MARC-8</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f9a" -->
-					<option value="a" SELECTED>a- UCS/Unicode</option>
-				<!-- TMPL_ELSE -->
-					<option value="a">a- UCS/Unicode</option>
-				<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-	
-		<td>17- Encoding level</td>
-		<td>
-			<select name="f17" size="1">
-				<!-- TMPL_IF name="f17n" -->
-					<option value="n" SELECTED>Complete authority</option>
-				<!-- TMPL_ELSE -->
-					<option value="n">Complete authority</option>
-				<!-- /TMPL_IF -->
-				
-				<!-- TMPL_IF name="f17o" -->
-					<option value="o" SELECTED>z- Incomplete</option>
-				<!-- TMPL_ELSE -->
-					<option value="o">z- Incomplete</option>
-				<!-- /TMPL_IF -->
-				
-			</select>
-		</td>
-	</tr>
-
-	<tr>
-		
-	</tr>
-	
-	
-	
-
-	<tr><td colspan=2><input type="submit" value="OK"></td></tr>
-</table>
-</form>
-<script>
-function report() {
-		opener.document.f.field_value[<!-- TMPL_VAR name="index" -->].value = 
-			'     '+
-			document.f_pop.f5.value+
-			document.f_pop.f6.value+'||'+
-			document.f_pop.f9.value+ 
-			'22     '+
-			document.f_pop.f17.value+
-			'||4500';
-			
-		self.close();
-		return false;
-	}
-</script>
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader_holdings.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader_holdings.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader_holdings.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/value_builder/marc21_leader_holdings.tmpl	11 Sep 2006 17:41:56 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,177 +0,0 @@
-<html>
-<head>
-<title>Leader builder</title>
-</head>
-<body>
-<form name="f_pop" onSubmit="javascript:report()">
-<table>
-	<tr>
-		<td>0-4 Record size</td>
-		<td>(auto-filled)</td>
-	</tr>
-	<tr>
-		<td>5- Record status</td>
-		<td>
-			<select name="f5" size="1">
-			
-			<!-- TMPL_IF name="f5c" -->
-				<option value="c" SELECTED>c- Corrected or revised</option>
-			<!-- TMPL_ELSE -->
-				<option value="c">c- Corrected or revised</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f5d" -->
-				<option value="d" SELECTED>d- Deleted</option>
-			<!-- TMPL_ELSE -->
-				<option value="d">d- Deleted</option>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="f5n" -->
-				<option value="n" SELECTED>n- New</option>
-			<!-- TMPL_ELSE -->
-				<option value="n">n- New</option>
-			<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td>6- Type of record</td>
-		<td>
-			<select name="f6" size="1">
-
-			<!-- TMPL_IF name="f6u" -->
-				<option value="u" SELECTED>u-Unknown</option>
-			<!-- TMPL_ELSE -->
-				<option value="u">u-Unknown</option>
-			<!-- /TMPL_IF -->
-	
-			<!-- TMPL_IF name="f6v" -->
-				<option value="v" SELECTED>v-Multipart item holdings</option>
-			<!-- TMPL_ELSE -->
-				<option value="v">v-Multipart item holdings</option>
-			<!-- /TMPL_IF -->
-	
-			<!-- TMPL_IF name="f6x" -->
-				<option value="x" SELECTED>xSingle part item holdings</option>
-			<!-- TMPL_ELSE -->
-				<option value="x">x-Single part item holdings</option>
-			<!-- /TMPL_IF -->
-				
-			<!-- TMPL_IF name="f6y" -->
-				<option value="y" SELECTED>y-Serial item holdings</option>
-			<!-- TMPL_ELSE -->
-				<option value="y">y-Serial item holdings</option>
-			<!-- /TMPL_IF -->
-			
-			</select>
-		</td>
-	</tr>
-	
-
-	<tr>
-		<td>9- Encoding</td>
-		<td>
-			<select name="f9" size="1">
-				<!-- TMPL_IF name="f9 " -->
-					<option value=" " SELECTED>MARC-8</option>
-				<!-- TMPL_ELSE -->
-					<option value=" ">MARC-8</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f9a" -->
-					<option value="a" SELECTED>a- UCS/Unicode</option>
-				<!-- TMPL_ELSE -->
-					<option value="a">a- UCS/Unicode</option>
-				<!-- /TMPL_IF -->
-			</select>
-		</td>
-	</tr>
-	
-		<td>17- Encoding level</td>
-		<td>
-			<select name="f17" size="1">
-		<!-- TMPL_IF name="f171" -->
-					<option value="1" SELECTED>1-Level 1</option>
-				<!-- TMPL_ELSE -->
-					<option value="1">1-Level 1</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f172" -->
-					<option value="2" SELECTED>2-Level 2</option>
-				<!-- TMPL_ELSE -->
-					<option value="2">2-Level 2</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f173" -->
-					<option value="3" SELECTED>3-Level 3</option>
-				<!-- TMPL_ELSE -->
-					<option value="3">3-Level 3</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f174" -->
-					<option value="4" SELECTED>4-Level 4</option>
-				<!-- TMPL_ELSE -->
-					<option value="4">4-Level 4</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f175" -->
-					<option value="5" SELECTED>5-Level 4 with piece designtn.</option>
-				<!-- TMPL_ELSE -->
-					<option value="5">5-Level 4 with piece designtn</option>
-				<!-- /TMPL_IF -->
-		
-				<!-- TMPL_IF name="f17m" -->
-					<option value="m" SELECTED>m-Mixed</option>
-				<!-- TMPL_ELSE -->
-					<option value="m">m-Mixed</option>
-				<!-- /TMPL_IF -->
-				
-				<!-- TMPL_IF name="f17u" -->
-					<option value="u" SELECTED>u-Unknown</option>
-				<!-- TMPL_ELSE -->
-					<option value="u">u-Unknown</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f17z" -->
-					<option value="z" SELECTED>z-Other</option>
-				<!-- TMPL_ELSE -->
-					<option value="z">z-Other</option>
-				<!-- /TMPL_IF -->
-				
-			</select>
-		</td>
-	</tr><td>18- Item information in record</td>
-		<td>
-			<select name="f18" size="1">
-		<!-- TMPL_IF name="f18i" -->
-					<option value="i" SELECTED>i-Item information</option>
-				<!-- TMPL_ELSE -->
-					<option value="i">i-Item information</option>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="f18n" -->
-					<option value="n" SELECTED>n-No information</option>
-				<!-- TMPL_ELSE -->
-					<option value="n">n-No information</option>
-				<!-- /TMPL_IF -->
-</td>
-
-	<tr>
-		
-	</tr>
-	
-	
-	
-
-	<tr><td colspan=2><input type="submit" value="OK"></td></tr>
-</table>
-</form>
-<script>
-function report() {
-		opener.document.f.field_value[<!-- TMPL_VAR name="index" -->].value = 
-			'     '+
-			document.f_pop.f5.value+
-			document.f_pop.f6.value+'||'+
-			document.f_pop.f9.value+ 
-			'22     '+
-			document.f_pop.f17.value+
-			document.f_pop.f18.value+
-			'|4500';
-			
-		self.close();
-		return false;
-	}
-</script>
-</body>
-</html>

Index: koha-tmpl/intranet-tmpl/prog/en/z3950/searchresult.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/prog/en/z3950/searchresult.tmpl
diff -N koha-tmpl/intranet-tmpl/prog/en/z3950/searchresult.tmpl
--- koha-tmpl/intranet-tmpl/prog/en/z3950/searchresult.tmpl	11 Sep 2006 17:41:55 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,76 +0,0 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Advanced MARC Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="masthead.inc" -->
-
-
-<!-- TMPL_IF NAME="refresh" -->
-		<meta http-equiv="refresh" content="2; url=<!-- TMPL_VAR NAME="refresh" -->" />
-	<!-- /TMPL_IF -->
-
-<div id="main-compact">
-<table>
-<!-- TMPL_IF name="opsearch" -->
-<h3>Select Search Libraries</h3>
-
-
-<form method="post" action="search.pl" name="f">
-
-<input type="hidden" name="op" id="op" value="do_search" />
-<input type="hidden" name="title" value=<!-- TMPL_VAR NAME="title" --> />
-<input type="hidden" name="author" value=<!-- TMPL_VAR NAME="author" --> />
-<input type="hidden" name="isbn" value=<!-- TMPL_VAR NAME="isbn" --> />
-<input type="hidden" name="issn" value=<!-- TMPL_VAR NAME="issn" --> />
-<input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="oldbiblionumber" -->" />
-
-<tr>
-		<th>Library</th>
-		<th>Select</th>
-</tr>
-<!-- TMPL_LOOP name="serverloop" -->
-		<tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
-			<td><!-- TMPL_VAR NAME="server" --></td>
-			
-			<td> <input type="checkbox" name="id" value=<!-- TMPL_VAR NAME="id" --> <!-- TMPL_IF name="checked" -->checked="1"<!-- /TMPL_IF --> ></td>
-	</tr>
-	<!-- /TMPL_LOOP -->
-	<tr><td><input type="submit"  class="submit" value="Search internet" onclick="cursor :'wait'";
-	 /></td></tr></form>
-<!-- TMPL_ELSE -->
-
-<caption>Bibliographic Records Found</caption>
-	<tr>
-		<th>Title</th>
-		<th>Author</th>
-		<th>ISBN</th>
-		<th>coming from</th>
-		<th>&nbsp;</th>
-		<th>&nbsp;</th>
-	</tr>
-	<!-- TMPL_IF name="breeding_loop" -->
-	<!-- TMPL_LOOP name="breeding_loop" -->
-		<tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
-			<td><!-- TMPL_VAR NAME="title" --></a>
-			<td><!-- TMPL_VAR NAME="author" --></td>
-			<td><!-- TMPL_VAR NAME="isbn" --></td>
-			<td><!-- TMPL_VAR NAME="server" --></td>
-			<td><a href="javascript:Import(<!-- TMPL_VAR NAME="id" -->,<!-- TMPL_VAR NAME="oldbiblionumber" -->)">Import</a></td> 
-		
-		</tr>
-	<!-- /TMPL_LOOP -->
-	<!-- TMPL_ELSE -->
-		<tr><td colspan="6">Nothing found</td></tr>
-	<!-- /TMPL_IF -->
-</table>
-<!-- /TMPL_IF -->
-
-</div>
-<!-- TMPL_IF name="numberpending" --><h3 align="center">Still <!-- TMPL_VAR NAME="numberpending" --> requests to go</h3><!-- /TMPL_IF -->
-<script language="JavaScript" type="text/javascript">
-	function Import(GetThisOne,biblionumber) {
-		opener.document.location= "../cataloguing/addbiblio.pl?oldbiblionumber="+biblionumber+"&z3950=1&breedingid="+GetThisOne;
-		self.close();
-		return false;
-	}
-</script>
-</div>
-<!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->
-

Index: koha-tmpl/opac-tmpl/css/bg2.png
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/bg2.png
diff -N koha-tmpl/opac-tmpl/css/bg2.png
Binary files /tmp/cvs3Jf1tA and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/bg2b.png
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/bg2b.png
diff -N koha-tmpl/opac-tmpl/css/bg2b.png
Binary files /tmp/cvs0N02vB and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/en/images/background-opac.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/images/background-opac.gif
diff -N koha-tmpl/opac-tmpl/css/en/images/background-opac.gif
Binary files /tmp/cvslyLk0E and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/en/images/bar.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/images/bar.gif
diff -N koha-tmpl/opac-tmpl/css/en/images/bar.gif
Binary files /tmp/cvsWxORzD and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/en/images/filefind.png
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/images/filefind.png
diff -N koha-tmpl/opac-tmpl/css/en/images/filefind.png
Binary files /tmp/cvslwOCMG and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/en/images/front-arrow.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/images/front-arrow.gif
diff -N koha-tmpl/opac-tmpl/css/en/images/front-arrow.gif
Binary files /tmp/cvsQT9rsF and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/en/images/front-background-med.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/images/front-background-med.gif
diff -N koha-tmpl/opac-tmpl/css/en/images/front-background-med.gif
Binary files /tmp/cvsLuqFmG and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/en/images/front-background-small.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/images/front-background-small.gif
diff -N koha-tmpl/opac-tmpl/css/en/images/front-background-small.gif
Binary files /tmp/cvsqnyEnJ and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/en/includes/basket.js
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/includes/basket.js
diff -N koha-tmpl/opac-tmpl/css/en/includes/basket.js
--- koha-tmpl/opac-tmpl/css/en/includes/basket.js	4 May 2005 08:58:30 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,357 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// BASIC FUNCTIONS FOR COOKIE MANGEMENT //
-//////////////////////////////////////////////////////////////////////////////
-
-var CGIBIN = "/cgi-bin/koha/";
-
-
-var nameCookie = "bib_list";
-var valCookie = readCookie(nameCookie);
-	
-if(valCookie){
-	var arrayRecords = valCookie.split("/");
-	if(arrayRecords.length > 0){
-		var basketcount = " ("+(arrayRecords.length-1)+")";
-	} else {
-		var basketcount = "";
-	}
-} else {
-		var basketcount = "";
-}
-
-function writeCookie(name, val, wd) {
-	if (wd) {
-		parent.opener.document.cookie = name + "=" + val;
-	}
-	else {
-		parent.document.cookie = name + "=" + val;
-	}
-}
-
-function readCookieValue (str, val_beg) {
-	var val_end = str.indexOf(";", val_end);
-	if (val_end == -1)
-		val_end = str.length;
-	return str.substring(val_beg, val_end);
-}
-
-function readCookie(name, wd) {
-	var str_name = name + "=";
-	var str_len = str_name.length;
-	var str_cookie = "";
-	if (wd) {
-		str_cookie = parent.opener.document.cookie;
-	}
-	else {
-		str_cookie = parent.document.cookie;
-	}
-	var coo_len = str_cookie.length;
-	var i = 0;
-
-	while (i < coo_len) {
-		var j = i + str_len;
-		if (str_cookie.substring(i, j) == str_name)
-			return readCookieValue(str_cookie, j);
-		i = str_cookie.indexOf(" ", i) + 1;
-		if (i == 0)
-			break;
-	}
-
-	return null;
-}
-
-function delCookie(name) {
-	var exp = new Date();
-	exp.setTime(exp.getTime()-1);
-	parent.opener.document.cookie = name + "=null; expires=" + exp.toGMTString();
-}
-
-
-///////////////////////////////////////////////////////////////////
-// SPECIFIC FUNCTIONS USING COOKIES //
-///////////////////////////////////////////////////////////////////
-
-function openBasket() {
-	var strCookie = "";
-
-	var nameCookie = "bib_list";
-	var valCookie = readCookie(nameCookie);
-	if (valCookie) {
-		strCookie = nameCookie + "=" + valCookie;
-	}
-
-	if (strCookie) {
-		var iW = 620;
-		var iH = 450;
-
-		var optWin = "dependant=yes,status=yes,scrollbars=yes,resizable=yes,toolbar=yes,height="+iH+",width="+iW;
-		var loc = CGIBIN + "opac-basket.pl?" + strCookie;
-		var basket = open(loc, "basket", optWin);
-	}
-	else {
-		alert(MSG_BASKET_EMPTY);
-	}
-}
-
-
-function addRecord(val, selection) {
-	var nameCookie = "bib_list";
-	var valCookie = readCookie(nameCookie);
-	var write = 0;
-
-	if ( ! valCookie ) { // empty basket
-		valCookie = val + '/';
-		write = 1;
-		updateBasket(1,document);
-	}
-	else {
-		// is this record already in the basket ?
-		var found = false;
-		var arrayRecords = valCookie.split("/");
-		
-		for (var i = 0; i < valCookie.length - 1; i++) {
-			if (val == arrayRecords[i]) {
-				found = true;
-				break;
-			}
-		}
-
-		if ( found ) {
-			if (selection) {
-				return 0;
-			}
-			alert(MSG_RECORD_IN_BASKET);
-		}
-		else {
-			valCookie += val + '/';
-			write = 1;
-			updateBasket(arrayRecords.length,document);
-		}
-	}
-
-	if (write) {
-		writeCookie(nameCookie, valCookie);
-		if (selection) { // when adding a selection of records
-			return 1;
-		}
-		alert(MSG_RECORD_ADDED);
-	}
-}
-
-
-function addMultiple(){
-	var c_value = "";
-	if(document.myform.bibid.length > 0) {
-		for (var i=0; i < document.myform.bibid.length; i++) {
-			if (document.myform.bibid[i].checked) {
-				c_value = c_value + document.myform.bibid[i].value + "/";
-			}
-		}
-		addSelRecords(c_value);
-	} else {
-		c_value = c_value + document.myform.bibid.value + "/";
-		addSelRecords(c_value);
-	}
-}
-
-
-function addSelRecords(valSel) { // function for adding a selection of biblios to the basket
-												// from the results list
-	var arrayRecords = valSel.split("/");
-	var i = 0;
-	var nbAdd = 0;
-	for (i=0;i<arrayRecords.length;i++) {
-		if (arrayRecords[i]) {
-			nbAdd += addRecord(arrayRecords[i], 1);
-		}
-		else {
-			break;
-		}
-	}
-
-	var msg = "";
-	if (nbAdd) {
-		if (i > nbAdd) {
-			msg = nbAdd+" "+MSG_NRECORDS_ADDED+", "+(i-nbAdd)+" "+MSG_NRECORDS_IN_BASKET;
-		}
-		else {
-			msg = nbAdd+" "+MSG_NRECORDS_ADDED;
-		}
-	}
-	else {
-		if (i < 1) {
-			msg = MSG_NO_RECORD_SELECTED;	
-		}
-		else {
-			msg = MSG_NO_RECORD_ADDED+" ("+MSG_NRECORDS_IN_BASKET+") !";
-		}
-	}
-	alert(msg);
-}
-
-
-function selRecord(num, status) {
-	var str = document.myform.records.value
-	if (status){
-		str += num+"/";
-	}
-	else {
-		str = delRecord(num, str);
-	}
-
-	document.myform.records.value = str;
-}
-
-
-function delSelRecords() {
-	var recordsSel = 0;
-	var end = 0;
-	var nameCookie = "bib_list";
-	var valCookie = readCookie(nameCookie, 1);
-
-	if (valCookie) {
-		var str = document.myform.records.value;
-		if (str.length > 0){
-			recordsSel = 1;
-			var str2 = valCookie;
-			while (!end){
-				s = str.indexOf("/");
-				if (s>0){
-					num = str.substring(0, s)
-					str = delRecord(num,str);
-					str2 = delRecord(num,str2);
-				} else {
-					end = 1;
-				}
-			}
-
-			if (str2.length == 0) { // equivalent to emptying the basket
-				var rep = false;
-				rep = confirm(MSG_CONFIRM_DEL_BASKET);
-				if (rep) { 
-					delCookie(nameCookie);
-					document.location = "about:blank";
-					updateBasket(0,top.opener.document);
-					window.close();
-				} else {
-					return;
-				}
-			} else {
-				writeCookie(nameCookie, str2, 1);
-			}
-		}
-	}
-
-	if (recordsSel) {
-		var strCookie = "";
-		var nameCookie = "bib_list";
-		var valCookie = readCookie(nameCookie, 1);
-		strCookie = nameCookie + "=" + valCookie;
-		var arrayRecords = valCookie.split("/");
-		updateBasket(arrayRecords.length-1,top.opener.document);
-		document.location = CGIBIN + "opac-basket.pl?" + strCookie;
-	}
-	else {
-		alert(MSG_NO_RECORD_SELECTED);
-	}
-}
-
-
-function delRecord (n, s) {
-	var re = /\d/;
-	var aux = s;
-	var found = 0;
-	var pos = -1;
-
-	while (!found) {
-		pos = aux.indexOf(n, pos+1);
-		var charAfter = aux.charAt(pos+n.length); // character right after the researched string
-		if (charAfter.match(re)) { // record number inside another one
-			continue;
-		}
-		else { // good record number
-			aux = s.substring(0, pos)+ s.substring(pos+n.length+1, s.length);
-			s = aux;
-			found = 1;
-		}
-	}
-
-	return s;
-}
-
-
-function delBasket() {
-	var nameCookie = "bib_list";
-
-	var rep = false;
-	rep = confirm(MSG_CONFIRM_DEL_BASKET);
-	if (rep) {
-		delCookie(nameCookie);
-		document.location = "about:blank";
-		updateBasket(0,top.opener.document);
-		window.close();
-	}
-}
-
-
-function quit() {
-	window.close();
-}
-
-function sendBasket() {
-	var nameCookie = "bib_list";
-	var valCookie = readCookie(nameCookie);
-	var strCookie = nameCookie + "=" + valCookie;
-
-	var loc = CGIBIN + "opac-sendbasket.pl?" + strCookie;
-
-	var optWin="dependant=yes,scrollbars=no,resizable=no,height=300,width=600,top=50,left=100";
-	var win_form = open(loc,"win_form",optWin);
-}
-
-function printBasket() {
-	var loc = document.location + "&print=1";
-	document.location = loc;
-}
-
-function showMore() {
-	var strCookie = "";
-
-	var nameCookie = "bib_list";
-	var valCookie = readCookie(nameCookie);
-	if (valCookie) {
-		strCookie = nameCookie + "=" + valCookie;
-	}
-	var loc = CGIBIN + "opac-basket.pl?" + strCookie + "&verbose=1";
-	document.location = loc;
-}
-
-function showLess() {
-	var strCookie = "";
-
-	var nameCookie = "bib_list";
-	var valCookie = readCookie(nameCookie);
-	if (valCookie) {
-		strCookie = nameCookie + "=" + valCookie;
-	}
-	var loc = CGIBIN + "opac-basket.pl?" + strCookie + "&verbose=0";
-	document.location = loc;
-}
-
-function updateBasket(updated_value,target) {
-    if(typeof document.getElementById != "undefined") {
-        target.getElementById('basket').innerHTML = " ("+updated_value+")";
-    } else if (typeof document.layers != "undefined") {
-        target.layers['basket'].open();
-        target.layers['basket'].write(" ("+updated_value+")");
-        target.layers['basket'].close();
-    } else if(typeof document.all != "undefined" &&  typeof
-document.getElementById == "undefined") {
-        target.all['basket'].innerHTML = " ("+updated_value+")";
-    }
-}
-
-function openBiblio(biblionumber) {
-	openerURL="opac-detail.pl?bib="+biblionumber;
-	opener.document.location = openerURL;
-}
\ No newline at end of file

Index: koha-tmpl/opac-tmpl/css/en/includes/opac-basket-bottom.inc
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/includes/opac-basket-bottom.inc
diff -N koha-tmpl/opac-tmpl/css/en/includes/opac-basket-bottom.inc
--- koha-tmpl/opac-tmpl/css/en/includes/opac-basket-bottom.inc	6 Jul 2004 10:07:22 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-</body>
-</html>

Index: koha-tmpl/opac-tmpl/css/en/includes/opac-basket-menu.inc
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/includes/opac-basket-menu.inc
diff -N koha-tmpl/opac-tmpl/css/en/includes/opac-basket-menu.inc
--- koha-tmpl/opac-tmpl/css/en/includes/opac-basket-menu.inc	1 Mar 2005 13:41:06 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-	<!-- MENUS -->
-	<div id="menuline" style="font-size:11pt;margin-top:20px;margin-bottom:20px;">
-		<span class="spacer">&nbsp;</span>
-		<A href='javascript:delBasket()' class="menu">Empty</A>
-		<span class="basketspacer">&nbsp;</span>
-		<A href='javascript:delSelRecords()' class="menu">Remove selection</A>
-		<span class="basketspacer">&nbsp;</span>
-		<A href='javascript:sendBasket()' class="menu">Send</A>
-		<span class="basketspacer">&nbsp;</span>
-		<A href='javascript:printBasket()' class="menu">Print</A>
-		<span class="basketspacer">&nbsp;</span>
-		<A href='javascript:quit()' class="menu">Close</A>
-		<!-- TMPL_IF NAME="verbose" -->
-			<a href="javascript:showLess()" class="menu">Brief Display</a>
-		<!-- TMPL_ELSE -->
-			<a href="javascript:showMore()" class="menu">More Details</a>
-		<!-- /TMPL_IF -->
-
-	</div>

Index: koha-tmpl/opac-tmpl/css/en/includes/opac-basket-top.inc
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/includes/opac-basket-top.inc
diff -N koha-tmpl/opac-tmpl/css/en/includes/opac-basket-top.inc
--- koha-tmpl/opac-tmpl/css/en/includes/opac-basket-top.inc	4 May 2005 08:58:30 -0000	1.8
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<title>OPAC Basket</title>
-	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-	<!-- TMPL_IF name="opacstylesheet" -->
-		<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="opacstylesheet"-->" />
-	<!-- TMPL_ELSE -->
-		<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang"-->/includes/opac.css" />
-	<!-- /TMPL_IF -->
-	<script type="text/javascript" language="javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/basket.js"></script>
-	<script language="JavaScript" type="text/javascript">
-		function _(s) { return s } // dummy function for gettext
-		//
-	</script>
-	<SCRIPT language='javascript'>
-		var MSG_NO_RECORD_SELECTED = _("No biblio selected");
-		var MSG_NO_RECORD_ADDED = _("No biblio added");
-		var MSG_CONFIRM_DEL_BASKET = _("Do you want to empty the basket ?");
-		var MSG_CONFIRM_DEL_RECORDS = _("Do you want to remove selected biblios ?");
-	</SCRIPT>
-</head>

Index: koha-tmpl/opac-tmpl/css/en/includes/opac-bottom.inc
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/includes/opac-bottom.inc
diff -N koha-tmpl/opac-tmpl/css/en/includes/opac-bottom.inc
--- koha-tmpl/opac-tmpl/css/en/includes/opac-bottom.inc	10 May 2004 16:30:58 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-<div id="bottombloc">
-<!-- TMPL_IF NAME="loggedinusername" -->
-	<p>
-		Logged in as <b><!-- TMPL_VAR NAME="loggedinusername" --></b> <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>
-		<a href="/cgi-bin/koha/opac-user.pl">Log In</a> to Koha
-	</p>
-<!-- /TMPL_IF -->
-</div>
-</body>
-</html>

Index: koha-tmpl/opac-tmpl/css/en/includes/opac-top.inc
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/includes/opac-top.inc
diff -N koha-tmpl/opac-tmpl/css/en/includes/opac-top.inc
--- koha-tmpl/opac-tmpl/css/en/includes/opac-top.inc	4 Aug 2005 14:10:52 -0000	1.12
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<!-- TMPL_IF name="opacstylesheet" -->
-		<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="opacstylesheet"-->" />
-	<!-- TMPL_ELSE -->
-		<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang"-->/includes/opac.css" />
-	<!-- /TMPL_IF -->
-	<title><!--TMPL_VAR name="LibraryName"--></title>
-	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-	<script type="text/javascript" language="javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/basket.js"></script>
-	<script language="JavaScript" type="text/javascript">
-		function _(s) { return s } // dummy function for gettext
-		//
-	</script>
-	<script type="text/javascript" language="javascript">
-	var MSG_BASKET_EMPTY = _("Basket is empty");
-	var MSG_RECORD_IN_BASKET = _("This biblio is already in the basket");
-	var MSG_RECORD_ADDED = _("Biblio added to the basket");
-	var MSG_NRECORDS_ADDED = _(" Biblio(s) added");
-	var MSG_NRECORDS_IN_BASKET = _("already in the basket");
-	var MSG_NO_RECORD_SELECTED = _("No biblio selected");
-	var MSG_NO_RECORD_ADDED = _("No biblio added");
-	function Dopop(link) {
-		newin=window.open(link,'popup','width=700,height=500,toolbar=false,scrollbars=yes');
-	}
-	</script>
-</head>
-<body>
-	<!-- MENUS -->
-	<div id="title">
-		<!-- TMPL_IF name="opacsmallimage" -->
-			<img src="<!-- TMPL_VAR name="opacsmallimage"-->" height="65" alt="koha logo"/>
-		<!-- TMPL_ELSE -->
-			<img src="<!-- TMPL_VAR name="themelang" -->/images/front-background-small.gif" height="50" alt="koha logo"/>
-		<!-- /TMPL_IF -->
-		<div class="SmallLibraryName"><!--TMPL_VAR name="LibraryName"--></div>
-	</div>
-	<div id="menuline">
-		<a class="menu" href="/cgi-bin/koha/opac-main.pl" title="Koha home page">Home</a>
-		<a class="menu" href="/cgi-bin/koha/opac-search.pl" title="Advanced search">Advanced search</a>
-		<!-- TMPL_IF NAME="loggedinusername" -->
-			<!-- TMPL_IF name="virtualshelves" -->
-				<a href="/cgi-bin/koha/opac-shelves.pl" class="menu">Virtual shelves</a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="suggestion" -->
-				<a href="opac-suggestions.pl" class="menu">View & manage suggestions</a>
-			<!-- /TMPL_IF -->
-		<!-- /TMPL_IF -->
-		<a class="menu" href="/cgi-bin/koha/opac-user.pl" title="Member Home page" >Personal page</a>
-		<a class="menu" href="javascript:openBasket()" title="Biblio basket">Biblio basket <span id="basket"><script language="javascript" type="text/javascript">if(basketcount){ document.write(basketcount) };</script></span></a>
-	</div>
-	<!-- MAIN BODY OF PAGE -->

Index: koha-tmpl/opac-tmpl/css/en/includes/opac.css
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/includes/opac.css
diff -N koha-tmpl/opac-tmpl/css/en/includes/opac.css
--- koha-tmpl/opac-tmpl/css/en/includes/opac.css	6 Jan 2006 16:39:42 -0000	1.24
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,447 +0,0 @@
-/*
-	blue/green : # 009999
-	light-blue/green : #ACE6E6
-	orange : #FFB380
-	light orange : #FFD9BF
-*/
-body {
-	background-color:#006b6b;
-	font-family:verdana,arial,helvetica,sans-serif;
-	font-size:12pt;
-	margin:0px;
-	padding:0px
-}
-
-/* base tags */
-a {
-	background-color: #FFD9BF;
-	text-decoration:none;
-/* 	padding:2px 2px; */
-	color:#000000;
-}
-
-a.transparent {
-	background-color: transparent;
-	text-decoration:none;
-	color:#000000;
-}
-
-a:hover {
-	background-color: #FFB380;
-}
-
-/* the page result number */
-a.results {
-	background-color : #FFD9BF;
-	padding : 0px 2px 0px 2px;
-	margin : 2px 1px 2px 0px;
-}
-
-a.results:hover {
-	background-color: #FFB380;
-	padding : 0px 2px 0px 2px;
-	margin : 2px 1px 2px 0px;
-}
-
-/* label size & look just before input fields */
-label {
-	float:left;
-	width: 10em;
-}
-
-/* images */
-img {
-	border-width:0px;
-	text-align:left;
-	display:inline;
-	float:left;
-	padding-left:10px;
-	padding-right:10px;
-}
-
-.relative { /* for images in relative position */
-	border-width:5px;
-	text-align:left;
-	position:relative;
-}
-
-/* main title */
-h1 {
-	color:#FFD9BF;
-	background-color:#006b6b;
-	font-weight:bold;
-	font-size: 150%;
-	text-align:center;
-	padding: 5px;
-	margin:0px 25% 10px 25%;
-	border: 1px solid black;
-	width:50%;
-}
-
-/* style for library name, on top of menu (defined in LibraryName systempref) */
-/* in opac-main page */
-.LibraryName {
-	color:#000000;
-	background-color:#FFD9BF;
-	font-weight:bold;
-	font-size: 150%;
-	text-align:center;
-	padding: 2px;
-	border: 1px solid #000000;
-	width:75%;
-}
-
-/* in all other pages */
-.SmallLibraryName {
-	color:#FFD9BF;
-	background-color:transparent;
-	font-weight:bold;
-	font-size: 115%;
-	vertical-align:top;
-	padding: 2px;
-	width:100%;
-}
-
-/* subtitles. headers of blocks */
-h2 {
-	color:#000000;
-	background-color:#009999;
-	font-weight:bold;
-	font-size: 125%;
-	width:100%;
-	margin: 0px 0px 10px 0px;
-}
-
-/* probably useless */
-h3 {
-	color:#000000;
-	font-weight:bold;
-	font-size: 125%;
-	margin: 5px 0px 0px 0px;
-}
-
-/* paragraphs */
-p {
-	padding-left:10px;
-	padding-right:10px;
-	padding-bottom:0pt;
-	margin:0pt;
-	clear:left;
-}
-
-/* centered paragraphs */
-p.center {
-	padding-left:10pt;
-	padding-bottom:0pt;
-	margin:0pt;
-	text-align:center;
-}
-
-/* the copyright (at the end of the main page */
-p.copyright {
-	border-top: 1px solid #000000;
-	margin-top:10px;
-	text-align:center;
-}
-
-/* TABLES */
-table {
-	border:1px solid #000000;
-	margin:10px;
-/* 	margin-right:10px; */
-	border-collapse:collapse;
-	position:static;
-}
-/* header */
-th {
-	background-color: #99cccc;
-	font-weight:bold;
-	text-align:center;
-	font-size:10pt;
-	border-left:1px solid #000000;
-	border-bottom:1px solid #000000;
-	border-top:1px solid #000000;
-}
-/* standard cell */
-
-tr {
-	display:table-row;
-	position:static;
-}
-
-td {
-	font-size:10pt;
-	border-left:1px solid #000000;
-	vertical-align:top;
-	position:static;
-	display:table-cell;
-}
-
-/* hilighted cell */
-td.hilighted {
-	font-size:10pt;
-	border-left:1px solid #000000;
-	background-color:#ffffcc;
-	vertical-align:top;
-}
-
-/* FORMS */
-/* class used in form buttons */
-.button {
-	text-align: center;
-	padding: 2px 2px;
-	border:1px solid #888888;
-	text-decoration: none;
-	color: black;
-	line-height:175%;
-	background-color:#FFD9BF;
-	margin : 3px 3px 3px 0px;
-}
-
-.button:hover {
-	text-align: center;
-	padding: 2px 2px;
-	border:1px solid black;
-	text-decoration: none;
-	color: black;
-	line-height:175%;
-	background-color:#FFB380;
-	margin : 3px 3px 3px 0px;
-}
-
-/* standard input field */
-input {
-	border:1px solid #888888;
-	margin-bottom:2px;
-	background-color:#FFFFFF;
-}
-input:hover {
-	border:1px solid #000000;
-}
-
-/* textarea input field */
-textarea {
-	border:0px;
-	border:1px solid #888888;
-	background-color:#FFFFFF;
-}
-
-textarea:hover {
-	border:1px solid #000000;
-}
-/* select input field */
-select {
-	border:0px;
-	border:1px solid #888888;
-	background-color:#FFFFFF;
-}
-
-/* span classes */
-/* used to show small 1,2,3, to reach other pages when too much results */
-.smallnumber {
-	background-color:#99cccc;
-	font-family:Times,serif;
-	font-size:small;
-	border:1px solid #000000;
-	padding:1pt;
-	vertical-align:top;
-}
-
-.smallnumberactive {
-	background-color:#FFB380;
-	font-family:Times,serif;
-	font-size:small;
-	border:1px solid #000000;
-	padding:1pt;
-	vertical-align:top;
-}
-
-/* BLOCS */
-
-#problem {
-	color: white;
-	font-weight:bold;
-	background-color:red;
-}
-.problem {
-	color: white;
-	font-weight:bold;
-	background-color:red;
-}
-
-/* the mainbloc : everything is in mainbloc, except menu */
-#mainbloc {
-	float:left;
-	width:90%;
-	background-color:#ACE6E6;
-	border:1px solid #000000;
-	margin-left:10px;
-	margin-right:10px;
-	padding-bottom:100px;
-	padding-left:10px;
-	padding-top:10px;
-	padding-right:10px;
-}
-
-#homebloc {
-	float:right;
-	width:65%;
-	margin-right:10px;
-	border:0;
-}
-
-#leftbloc {
-	float:left;
-	width:30%;
-	border:0;
-}
-
-#bottombloc {
-	width:100%;
-	height:200%;
-	margin-top:10px;
-	vertical-align:top;
-	text-align:center;
-	float:left;
-}
-
-/* used in members */
-#bloc20, .bloc20 {
-	float:left;
-	border:1px solid #000000;
-	margin-left:10px;
-	padding-bottom:10px;
-	margin-bottom:10px;
-}
-#bloc60, .bloc60 {
-	float:left;
-	border:1px solid #000000;
-	margin-left:10px;
-	padding-bottom:10px;
-	margin-bottom:10px;
-}
-
-/* used in biblio detail */
-
-#bibliobloc {
-	float:left;
-	width:40%;
-	border:0;
-}
-
-#itembloc {
-	float:left;
-	padding-left:10px;
-/* 	width:50%; */
-	border:0;
-}
-
-/* menu styles */
-.menu {
-	border:1px solid #000000;
-	padding-left:10pt;
-	padding-right:10pt;
-	margin-bottom:10px;
-	display:inline;
-}
-
-#title {
-	display:block;
-	margin-left:0px;
-}
-
-#menuline {
-	display:block;
-	margin-left:100px;
-	margin-bottom:20px;
-}
-
-#bibliomenu {
-	position: relative;
-	float:left;
-	display:block;
-	margin-left:10%;
-	width:100%;
-}
-
-/* a little spacer. should not be used */
-.basketspacer {
-	padding-left:8pt;
-	float:left;
-}
-
-/* for SubscritptionHistory view  */
-div.tabsubs {
-	margin-left:150px;
-	position:inline;
-}
-
-div.tabsubs a {
-	font-size: small;
-	border: thin solid black;
-	margin-right: 2px;
-	padding: 10px 10px;
-	-moz-border-radius: 5px 5px 0px 0px;
-}
-
-div.tabsub {
-	background-color: #ACE6E6;
-	position:absolute;
-	visibility:hidden;
-	margin-left:150px;
-	margin-top:0px;
-border:4px;
-}
-
-/* for MARC view  */
-div.tabs {
-	width:15px;
-	display:block;
-	margin-top:70px;
-	margin-left:40px;
-}
-
-div.tabs a {
-	display:block;
-	font-size: small;
-	border: thin solid black;
-	margin-right: 2px;
-	padding: 10px 10px;
-	-moz-border-radius: 5px 0px 0px 5px;
-}
-
-div.tabbloc {
-	position:absolute;
-	display:block;
-	top:140px;
-	left:62px;
-	margin-right:0px;
-	border: 1px solid black;
-	background-color:none;
-}
-
-div.tab {
-	background-color: #ACE6E6;
-	display: block;
-	visibility:hidden;
-	position:absolute;
-	float:left;
-	margin-right:0px;
-	background-color:none;
-	width:80%;
-}
-
-.MARCtag { /* style for tag definition (700 - Statement of responsability) */
-	font-weight:bold;
-	color:#FFB380;
-	background-color:#FFFFFF;
-	background-image:none;
-	border-bottom: thin solid #FFB380;
-	margin-right:30%;
-}
-
-.labelsubfield { /* style for each subfield (like : a Publication year), just before the biblio subfield */
-	float:left;
-	width: 12em;
-	margin-left:30px;
-}

Index: koha-tmpl/opac-tmpl/css/en/includes/popup-bottom.inc
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/includes/popup-bottom.inc
diff -N koha-tmpl/opac-tmpl/css/en/includes/popup-bottom.inc
--- koha-tmpl/opac-tmpl/css/en/includes/popup-bottom.inc	1 Mar 2005 13:41:06 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-</body>
-</html>

Index: koha-tmpl/opac-tmpl/css/en/includes/popup-top.inc
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/includes/popup-top.inc
diff -N koha-tmpl/opac-tmpl/css/en/includes/popup-top.inc
--- koha-tmpl/opac-tmpl/css/en/includes/popup-top.inc	1 Mar 2005 13:41:06 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-	<title>popup</title>
-	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-	<!-- TMPL_IF name="opacstylesheet" -->
-		<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="opacstylesheet"-->" />
-	<!-- TMPL_ELSE -->
-		<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang"-->/includes/opac.css" />
-	<!-- /TMPL_IF -->
-</head>
-
-<body>
-<!-- NO MENUS for popup-top -->

Index: koha-tmpl/opac-tmpl/css/en/kohaerror.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/kohaerror.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/kohaerror.tmpl
--- koha-tmpl/opac-tmpl/css/en/kohaerror.tmpl	12 Aug 2004 14:39:59 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-
-
-<center>
-<table border=1 cellspacing=5 bgcolor="red">
-<tr><td>
-<table border=0 bgcolor="#dddddd">
-<tr><th>An Error has Occurred</th></tr>
-<tr><td><!-- TMPL_VAR NAME="errormessage" --></td></tr>
-</table>
-</td></tr>
-</table>
-</center>
-
-
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
-

Index: koha-tmpl/opac-tmpl/css/en/opac-ISBDdetail.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-ISBDdetail.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-ISBDdetail.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-ISBDdetail.tmpl	6 Jan 2006 16:39:42 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,80 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/marc-editor.css">
-<div id="bibliomenu">
-	<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue">
-		Simple
-	</a>
-	<a href="opac-MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button">
-		Complete
-	</a>
-	<a href="opac-ISBDdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue">
-		ISBD
-	</a>
-	<a href="javascript:Dopop('opac-addbookbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->')" class="button catalogue">
-		Add to shelf
-	</a>
-	<a href="javascript:Dopop('opac-detailprint.pl?bib=<!-- TMPL_VAR name="biblionumber" -->')" class="button catalogue">
-		Print
-	</a>
-	<!-- TMPL_UNLESS NAME="norequests" -->
-		<a class="button" href="/cgi-bin/koha/opac-reserve.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE=URL -->">
-			Request
-		</a>
-	<!-- /TMPL_UNLESS -->
-	<!-- TMPL_IF name="subscriptionid" -->
-	<a href="opac-serial-issues.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" class="button catalogue" title="Serial issues">
-		Issues
-	</a>
-	<!-- /TMPL_IF -->
-	<a class="button" href="javascript:addRecord('<!-- TMPL_VAR NAME="biblionumber" ESCAPE=URL -->')">Add to basket</a>
-</div>
-
-<div id="mainbloc">
-	<p><!-- TMPL_VAR name="ISBD" --></p>
-	<!-- TMPL_IF name="subscriptionsnumber" -->
-		<br />
-		<div id="bloc20">
-		<h2>We have <!-- TMPL_VAR name="subscriptionsnumber" --> subscription(s) associated with this title.</h2> 
-		<p>Below is a list of the three latest issues :</p>
-		<!-- TMPL_LOOP Name="subscriptions" -->
-				<!-- TMPL_IF name="subscriptionnotes"-->
-					<h2><!--TMPL_VAR Name="subscriptionnotes"--> </h2>
-				<!-- /TMPL_IF -->
-				<!--TMPL_IF Name="latestserials"-->
-				<table>
-				<tr><th>Issue number</th><th>Date</th><th>Status</th></tr>
-				<!--TMPL_LOOP Name="latestserials"-->
-					<tr>
-						<td>
-							<!--TMPL_VAR Name="serialseq"-->
-						</td>
-						<td>
-							<!--TMPL_VAR Name="planneddate"-->
-						</td>
-						<td>
-							<!--TMPL_IF Name="status1"-->Waited
-							<!--TMPL_ELSE -->
-								<!-- TMPL_IF Name="status2"-->Arrived
-								<!--TMPL_ELSE -->
-									<!-- TMPL_IF Name="status3"-->Late
-									<!--TMPL_ELSE -->
-										<!-- TMPL_IF Name="status4"-->Missing
-										<!--TMPL_ELSE -->
-											<!-- TMPL_IF Name="status5"-->Not Issued
-											<!--/TMPL_IF-->
-										<!--/TMPL_IF-->
-									<!--/TMPL_IF-->
-								<!--/TMPL_IF-->
-							<!--/TMPL_IF-->
-						</td>
-					</tr>
-				<!--/TMPL_LOOP -->
-				</table>
-				<!-- /TMPL_IF -->
-		<!-- /TMPL_LOOP -->
-		<p><a href="/cgi-bin/koha/opac-serial-issues.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" title="Serial issues">Click here</a> for more information on subscription(s) history</p>
-		</div>
- 	<!-- /TMPL_IF -->
-</div>
-</body>
-</html>

Index: koha-tmpl/opac-tmpl/css/en/opac-MARCdetail.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-MARCdetail.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-MARCdetail.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-MARCdetail.tmpl	4 Aug 2005 14:10:52 -0000	1.8
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,337 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="bibliomenu">
-	<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue">
-		Simple
-	</a>
-	<a href="opac-MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button">
-		Complete
-	</a>
-	<a href="opac-ISBDdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue">
-		ISBD
-	</a>
-	<a href="javascript:Dopop('opac-addbookbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->')" class="button catalogue">
-		Add to shelf
-	</a>
-	<a href="javascript:Dopop('opac-detailprint.pl?bib=<!-- TMPL_VAR name="biblionumber" -->')" class="button catalogue">
-		Print
-	</a>
-	<!-- TMPL_UNLESS NAME="norequests" -->
-		<a class="button" href="/cgi-bin/koha/opac-reserve.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE=URL -->">
-			Request
-		</a>
-	<!-- /TMPL_UNLESS -->
-	<!-- TMPL_IF name="subscriptionid" -->
-	<a href="opac-serial-issues.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" class="button catalogue" title="Serial issues">
-		Issues
-	</a>
-	<!-- /TMPL_IF -->
-	<a class="button" href="javascript:addRecord('<!-- TMPL_VAR NAME="biblionumber" ESCAPE=URL -->')">Add to basket</a>
-</div>
-	<div class="tabs">
-		<!-- TMPL_IF name="0XX" -->
-			<a href="javascript:active(0)"><div id="link0">0</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="1XX" -->
-			<a href="javascript:active(1)"><div id="link1">1</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="2XX" -->
-			<a href="javascript:active(2)"><div id="link2">2</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="3XX" -->
-			<a href="javascript:active(3)"><div id="link3">3</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="4XX" -->
-			<a href="javascript:active(4)"><div id="link4">4</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="5XX" -->
-			<a href="javascript:active(5)"><div id="link5">5</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="6XX" -->
-			<a href="javascript:active(6)"><div id="link6">6</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="7XX" -->
-			<a href="javascript:active(7)"><div id="link7">7</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="8XX" -->
-			<a href="javascript:active(8)"><div id="link8">8</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="9XX" -->
-			<a href="javascript:active(9)"><div id="link9">9</div></a>
-		<!-- /TMPL_IF -->
-		<a href="javascript:active(10)">I<br/>t<br/>e<br/>m<br/>s</a>
-	</div>
-<div class="tabbloc">
-	<div name="0XX" id="0XX" class="tab" style="visibility:visible">
-		<!-- TMPL_LOOP name="0XX" -->
-			<!-- TMPL_IF name="tag" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-					<!-- TMPL_IF name="link" -->
-						<a href="opac-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;operator==&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/<!-- TMPL_VAR NAME="lang" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="1XX" id="1XX" class="tab">
-		<!-- TMPL_LOOP name="1XX" -->
-			<!-- TMPL_IF name="tag" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-					<!-- TMPL_IF name="link" -->
-						<a href="opac-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;operator==&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/<!-- TMPL_VAR NAME="lang" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="2XX" id="2XX" class="tab">
-		<!-- TMPL_LOOP name="2XX" -->
-			<!-- TMPL_IF name="tag" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-					<!-- TMPL_IF name="link" -->
-						<a href="opac-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;operator==&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/<!-- TMPL_VAR NAME="lang" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="3XX" id="3XX" class="tab">
-		<!-- TMPL_LOOP name="3XX" -->
-			<!-- TMPL_IF name="tag" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-					<!-- TMPL_IF name="link" -->
-						<a href="opac-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;operator==&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/<!-- TMPL_VAR NAME="lang" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="4XX" id="4XX" class="tab">
-		<!-- TMPL_LOOP name="4XX" -->
-			<!-- TMPL_IF name="tag" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-					<!-- TMPL_IF name="link" -->
-						<a href="opac-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;operator==&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/<!-- TMPL_VAR NAME="lang" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="5XX" id="5XX" class="tab">
-		<!-- TMPL_LOOP name="5XX" -->
-			<!-- TMPL_IF name="tag" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-					<!-- TMPL_IF name="link" -->
-						<a href="opac-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;operator==&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/<!-- TMPL_VAR NAME="lang" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="6XX" id="6XX" class="tab">
-		<!-- TMPL_LOOP name="6XX" -->
-			<!-- TMPL_IF name="tag" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-					<!-- TMPL_IF name="link" -->
-						<a href="opac-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;operator==&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/<!-- TMPL_VAR NAME="lang" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="7XX" id="7XX" class="tab">
-		<!-- TMPL_LOOP name="7XX" -->
-			<!-- TMPL_IF name="tag" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-					<!-- TMPL_IF name="link" -->
-						<a href="opac-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;operator==&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/<!-- TMPL_VAR NAME="lang" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="8XX" id="8XX" class="tab">
-		<!-- TMPL_LOOP name="8XX" -->
-			<!-- TMPL_IF name="tag" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-					<!-- TMPL_IF name="link" -->
-						<a href="opac-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;operator==&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/<!-- TMPL_VAR NAME="lang" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="9XX" id="9XX" class="tab">
-		<!-- TMPL_LOOP name="9XX" -->
-			<!-- TMPL_IF name="tag" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-					<!-- TMPL_IF name="link" -->
-						<a href="opac-search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="link" -->&amp;operator==&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
-							<img border="0" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/<!-- TMPL_VAR NAME="lang" -->/images/filefind.png" height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
-						</a>
-					<!-- /TMPL_IF -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="10XX" id="10XX" class="tab">
-		<h2 class="catalogue">Items</h2>
-		<table>
-				<tr>
-					<!-- TMPL_LOOP name="item_header_loop" -->
-						<th class="catalogue">
-							<!-- TMPL_VAR name="header_value" -->
-						</th>
-					<!-- /TMPL_LOOP -->
-				</tr>
-				<!-- TMPL_LOOP name="item_loop" -->
-					<tr>
-						<!-- TMPL_VAR name="item_value" -->
-					</tr>
-				<!-- /TMPL_LOOP -->
-		</table>
-	</div>
-</div>
-<script language="JavaScript" type="text/javascript">
-function active(numlayer)
-{
-	for (i=0; i <= 10 ; i++ ) {
-		ong = i+"XX";
-		link = "link"+i;
-		if (numlayer==i) {
-			document.getElementById(ong).style.visibility="visible";
-		} else {
-			document.getElementById(ong).style.visibility="hidden";
-		}
-	}
-}
-</script>
-</body>
-</html>

Index: koha-tmpl/opac-tmpl/css/en/opac-account.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-account.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-account.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-account.tmpl	11 Feb 2004 08:57:56 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,40 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-
-<div id="mainbloc">
-	<!-- TMPL_LOOP NAME="BORROWER_INFO" -->
-	<h2>Account for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></h2>
-	<!-- /TMPL_LOOP -->
-	<table cellspacing=0>
-		<tr>
-			<th colspan=2>Fines & charges</th>
-			<th>Amount</th>
-			<th>Still owing</th>
-		</tr>
-
-		<!-- TMPL_LOOP NAME="ACCOUNT_LINES" -->
-		<tr>
-			<td>
-				<!-- TMPL_VAR NAME="date" -->
-			</td>
-			<TD>
-				<!-- TMPL_VAR NAME="description" -->
-				<!-- TMPL_IF NAME="print_title" --><!-- TMPL_VAR NAME="title" --><!-- /TMPL_IF -->
-			</td>
-
-			<td align="right">
-				<!-- TMPL_VAR NAME="amount" -->
-			</td>
-			<TD>
-				<!-- TMPL_VAR NAME="amountoutstanding" -->
-			</td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-
-		<tr>
-			<th colspan=2><b>Total Due</th>
-			<th align="right"><!-- TMPL_VAR NAME="total" --></th>
-			<th>&nbsp;</th>
-		</tr>
-	</table>
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-addbookbybiblionumber.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-addbookbybiblionumber.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-addbookbybiblionumber.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-addbookbybiblionumber.tmpl	24 Aug 2005 17:54:51 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-<!-- TMPL_INCLUDE Name="popup-top.inc" -->
-<div id="mainbloc">
-<h1>Add book to bookshelf</h1> 
-<p><label>Title</label><!-- TMPL_VAR NAME="title" --></p>
-<p><label>Author</label><!-- TMPL_VAR NAME="author" --></p>
-<h2>Select bookshelf</h2>
-<form action="/cgi-bin/koha/opac-addbookbybiblionumber.pl" method="get">
-	<p><label>Add to virtual shelf</label><!-- TMPL_VAR NAME="CGIbookshelves" --></p>
-<h2>or add to a new bookshelf</h2>
-	<p><input type="text" name="newbookshelf" maxlength=40 size=40>
-	<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->">
-		<select name="category">
-			<option value="1">Private</option>
-			<option value="2">Public</option>
-			<option value="3">Free</option>
-		</select>
-	</p>
-	<input type="submit" value="Add to virtual shelf" class="button catalogue">
-</form>
-<!-- TMPL_INCLUDE Name="popup-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-alert-subscribe.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-alert-subscribe.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-alert-subscribe.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-alert-subscribe.tmpl	4 Aug 2005 08:55:54 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,36 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-
-<div id="mainbloc">
-	<!-- TMPL_IF name="typeissue" -->
-		<h1 class="catalogue">Subscribe to an alert</h1>
-		<div id="bloc20">
-			<h2>Confirmation</h2>
-			<form action="opac-alert-subscribe.pl" method="post">
-				<p>Do you confirm you want to subscribe to alerts for <!-- TMPL_VAR name="bibliotitle" --> <!-- TMPL_IF name="notes" -->(<!-- TMPL_VAR name="notes" -->)<!-- /TMPL_IF --> ?</p>
-				<input type="hidden" name="externalid" value="<!-- TMPL_VAR name="externalid" -->">
-				<input type="hidden" name="alerttype" value="issue">
-				<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->">
-				<input type="hidden" name="op" value="alert_confirmed">
-				<input type="submit" value="Yes" class="button">
-				<a href="opac-serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button">No</a>
-			</form>
-		</div>
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF name="typeissuecancel" -->
-		<h1 class="catalogue">Unsubscribe to an alert</h1>
-		<div id="bloc20">
-			<h2>Confirmation</h2>
-			<form action="opac-alert-subscribe.pl" method="post">
-				<p>Do you confirm you want to <b>un</b>subscribe to alerts for <!-- TMPL_VAR name="bibliotitle" --> <!-- TMPL_IF name="notes" -->(<!-- TMPL_VAR name="notes" -->)<!-- /TMPL_IF --> ?</p>
-				<input type="hidden" name="externalid" value="<!-- TMPL_VAR name="externalid" -->">
-				<input type="hidden" name="alerttype" value="issue">
-				<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->">
-				<input type="hidden" name="op" value="cancel_confirmed">
-				<input type="submit" value="Yes" class="button">
-				<a href="opac-serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button">No</a>
-			</form>
-		</div>
-	<!-- /TMPL_IF -->
-</div>
-
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-auth.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-auth.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-auth.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-auth.tmpl	20 Jun 2005 14:25:00 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,39 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-	<div id="bloc60">
-		<!-- TMPL_IF NAME="nopermission" -->
-		<!-- This is what is displayed if user doesnt have permission -->
-		<h2>Sorry, KOHA doesnt think you have permission for this page.<h2>
-		<!-- /TMPL_IF -->
-		
-		<!-- TMPL_IF NAME="timed_out" -->
-		<!-- This is what is displayed if login has timed out -->
-		<h2>Sorry, your session has timed out, please login again.<h2>
-		<!-- /TMPL_IF -->
-		
-		<!-- TMPL_IF NAME="different_ip" -->
-		<!-- This is what is displayed if user doesnt have permission -->
-		<h2>You are accessing koha from a different ip address! please login again.<h2>
-		<!-- /TMPL_IF -->
-		
-		<!-- TMPL_IF NAME="invalid_username_or_password" -->
-		<!-- This is what is displayed if user doesnt have permission -->
-		<h2>You entered an incorrect username or password, please try again.<h2>
-		<!-- /TMPL_IF -->
-	</div>
-	<div id="bloc60">
-		<!-- TMPL_IF NAME="loginprompt" -->
-		<!-- login prompt time-->
-		<form action="<!-- TMPL_VAR NAME="url" -->" method="post">
-			<h2>Koha Login</h2>
-			<p><label>Cardnumber</label><input name="userid" /></p>
-			<p><label>Password</label><input type="password" name="password" /></p>
-			<!-- TMPL_LOOP NAME="INPUTS" -->
-				<input type="hidden" name='<!-- TMPL_VAR NAME="name" -->' value='<!-- TMPL_VAR NAME="value" -->' />
-			<!-- /TMPL_LOOP -->
-			<p><label>&nbsp;</label><input type="submit" value="login" class="button" /></p>
-		</form>
-	</div>
-		<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-basket.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-basket.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-basket.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-basket.tmpl	24 Aug 2005 17:54:51 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,192 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-basket-top.inc" -->
-<!-- TMPL_IF NAME="print_basket" -->
-<body onload="print();" style="padding-bottom:20px;">
-<!-- TMPL_ELSE -->
-<body style="padding-bottom:20px;">
-<!-- TMPL_INCLUDE NAME="opac-basket-menu.inc" -->
-<form name="myform"><input type="hidden" name="records"></form>
-<!-- /TMPL_IF -->
-<div id="mainbloc" style="margin-top:10px;margin-bottom:20px;padding-top:10px;padding-bottom:10px;">
-<!-- TMPL_IF NAME="verbose" -->
-	<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-	<h3><!-- TMPL_VAR NAME="title" --><!-- TMPL_IF name="subtitle" --> <!-- TMPL_VAR NAME="subtitle" --><!-- /TMPL_IF --></h3>
-	<table>
-		<!-- TMPL_UNLESS NAME="print_basket" -->
-			<tr><td colspan="2">
-				<form>
-					<label for="bib<!-- TMPL_VAR NAME="biblionumber" -->">
-						<input type="checkbox" value="<!-- TMPL_VAR NAME="biblionumber" -->" name="bib<!-- TMPL_VAR NAME="biblionumber" -->" id="bib<!-- TMPL_VAR NAME="biblionumber" -->" onclick="selRecord(value,checked)"> Select this Item
-					</label>
-				</form>
-			</td></tr>
-		<!-- /TMPL_UNLESS -->
-		<!-- TMPL_IF name="isbn" -->
-			<tr>
-				<th>ISBN:</th>
-				<td><!-- TMPL_VAR NAME="ISBN" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="author" -->
-			<tr>
-				<th>Author:</th>
-				<td> <!-- TMPL_VAR NAME="author" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="additional" -->
-			<tr>
-				<th>Additional authors:</th>
-				<td><!-- TMPL_VAR NAME="additional" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="publishercode" -->
-			<tr>
-				<th>Publisher:</th>
-				<td><!-- TMPL_VAR NAME="place" --> <!-- TMPL_VAR NAME="publishercode" --> <!-- TMPL_VAR NAME="publicationyear" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="pages" -->
-			<tr>
-				<th>Details: </th>
-				<td><!-- TMPL_VAR NAME="pages" --> <!-- TMPL_VAR NAME="illus" --> <!-- TMPL_VAR NAME="size" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="collection" -->
-			<tr>
-				<th>Collection:</th>
-				<td> <!-- TMPL_VAR NAME="seriestitle" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="subject" -->
-			<tr>
-				<th>Subject:</th>
-				<td> <!-- TMPL_VAR NAME="subject" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="copyrightdate" -->
-			<tr>
-				<th>Copyright:</th>
-				<td> <!-- TMPL_VAR NAME="copyrightdate" --></td>
-				</tr>
-			<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="notes" -->
-			<tr>
-				<th>Notes:</th>
-				<td> <!-- TMPL_VAR NAME="notes" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="unititle" -->
-			<tr>
-				<th>Unified title:</th>
-				<td> <!-- TMPL_VAR NAME="unititle" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="serial" -->
-			<tr>
-				<th>Serial:</th>
-				<td><!-- TMPL_VAR NAME="serial" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="dewey" -->
-			<tr>
-				<th>Dewey:</th>
-				<td><!-- TMPL_VAR name="dewey" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="classification" -->
-			<tr>
-				<th>Call Number:</th>
-				<td> <!-- TMPL_VAR name="classification" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="lccn" -->
-			<tr>
-				<th>LCCN:</th>
-				<td> <!-- TMPL_VAR name="lccn" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="url" -->
-			<tr>
-				<th>URL:</th>
-				<td> <!-- TMPL_VAR NAME="url" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-				<tr>
-					<th>Location</th>
-					<th>Barcode</th>
-				</tr>
-				<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
-					<tr>
-						<td>
-							<!-- TMPL_VAR NAME="branchname" --> <!-- TMPL_VAR NAME="location" --> 
-							<!-- TMPL_IF name="itemcallnumber" -->
-								(<!-- TMPL_VAR NAME="itemcallnumber" -->)
-							<!-- /TMPL_IF -->
-						</td>
-						<td><!-- TMPL_VAR NAME="barcode" --></td>
-					</tr>
-				<!-- /TMPL_LOOP -->
-		</table>
-	<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-	<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-	<div width="100%" style="margin-top:0px;margin-bottom:0px;padding-top:10px;padding-bottom:10px;">
-	<table cellspacing="0" style="border:0;width:100%;">
-		<tr align='center'>
-			<!-- TMPL_UNLESS NAME="print_basket" -->
-			<td style="border:0;">
-				<form><input type="checkbox" value="<!-- TMPL_VAR NAME="biblionumber" -->" onClick="selRecord(value,checked);"></form>
-			</td>
-			<!-- /TMPL_UNLESS -->
-			<td style="border:0;width:95%;">
-			<table cellspacing="0">
-				<!-- BIBLIO RECORD TABLE -->
-				<tr>
-					<th colspan="2">
-						<a onClick="javascript:openBiblio(<!-- TMPL_VAR name="biblionumber" -->)"><!-- TMPL_VAR NAME="title" --></a>
-					</th>
-				</tr>
-				<tr valign="top">
-					<td>
-						<!-- TMPL_IF name="isbn" --><b>ISBN:</b><!-- TMPL_VAR NAME="ISBN" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="subtitle" --><b>Subtitle:</b><!-- TMPL_VAR NAME="subtitle" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="author" --><b>Author:</b> <!-- TMPL_VAR NAME="author" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="additional" --><b>Additional authors:</b><!-- TMPL_VAR NAME="additional" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="publishercode" --><b>Published by :</b><!-- TMPL_VAR NAME="publishercode" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="publicationyear" --><b>in </b><!-- TMPL_VAR NAME="publicationyear" --><!-- /TMPL_IF -->
-						<!-- 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_VAR NAME="seriestitle" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="subject" --><b>Subject:</b> <!-- TMPL_VAR NAME="subject" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="copyrightdate" --><b>Copyright year:</b> <!-- TMPL_VAR NAME="copyrightdate" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="notes" --><b>Notes:</b> <!-- TMPL_VAR NAME="notes" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="unititle" --><b>Uniform title:</b> <!-- TMPL_VAR NAME="unititle" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="serial" --><b>Serial:</b><!-- TMPL_VAR NAME="serial" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="dewey" --><b>Dewey:</b><!-- TMPL_VAR name="dewey" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="classification" --><b>Classification:</b> <!-- TMPL_VAR name="classification" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="lccn" --><b>LCCN:</b> <!-- TMPL_VAR name="lccn" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="url" --><b>URL:</b> <!-- TMPL_VAR NAME="url" --><br><!-- /TMPL_IF -->
-					</td>
-				</tr>
-				<tr>
-					<th>Location</th>
-					<th>Barcode</th>
-				</tr>
-				<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
-					<tr>
-						<td>
-							<!-- TMPL_VAR NAME="branchname" --> <!-- TMPL_VAR NAME="location" --> 
-							<!-- TMPL_IF name="itemcallnumber" -->
-								(<!-- TMPL_VAR NAME="itemcallnumber" -->)
-							<!-- /TMPL_IF -->
-						</td>
-						<td><!-- TMPL_VAR NAME="barcode" --></td>
-					</tr>
-				<!-- /TMPL_LOOP -->
-			</table>
-		</td></tr>
-	</table>
-</div>
-	<!-- /TMPL_LOOP -->
-<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE NAME="opac-basket-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-detail.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-detail.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-detail.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-detail.tmpl	6 Jan 2006 16:39:42 -0000	1.25
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,245 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/marc-editor.css"/>
-
-<div id="bibliomenu">
-	<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue">
-		Simple
-	</a>
-	<a href="opac-MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button">
-		Complete
-	</a>
-	<a href="opac-ISBDdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue">
-		ISBD
-	</a>
-	<a href="javascript:Dopop('opac-addbookbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->')" class="button catalogue">
-		Add to shelf
-	</a>
-	<a href="javascript:Dopop('opac-detailprint.pl?bib=<!-- TMPL_VAR name="biblionumber" -->')" class="button catalogue">
-		Print
-	</a>
-	<!-- TMPL_UNLESS NAME="norequests" -->
-		<a class="button" href="/cgi-bin/koha/opac-reserve.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE=URL -->">
-			Request
-		</a>
-	<!-- /TMPL_UNLESS -->
-	<!-- TMPL_IF name="subscriptionid" -->
-	<a href="opac-serial-issues.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" class="button catalogue" title="Serial issues">
-		Issues
-	</a>
-	<!-- /TMPL_IF -->
-	<a class="button" href="javascript:addRecord('<!-- TMPL_VAR NAME="biblionumber" ESCAPE=URL -->')">Add to basket</a>
-</div>
-<div id="homebloc">
-<div id="mainbloc">
-	<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-	<h1><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="class" --></h1>
-
-	<div id="bibliobloc">
-	<table cellspacing="0">
-		<!-- BIBLIO RECORD TABLE -->
-		<tr>
-			<th>
-				<!-- TMPL_VAR NAME="title" -->
-			</th>
-		</tr>
-		<tr>
-			<td>
-				<!-- TMPL_IF name="subtitles" -->
-					<p><label><b>Subtitle(s):</b> </label>
-					<!-- TMPL_LOOP name="subtitles" -->
-						<!-- TMPL_VAR NAME="subtitle" --> ; 
-					<!-- /TMPL_LOOP -->
-					</p>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="author" --><p><label><b>Author:</b> </label><!-- TMPL_VAR NAME="author" --></p><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="additional" --><p><label><b>Additional Author:</b></label><!-- TMPL_VAR NAME="additional" --></p><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="illus" --><p><label><b>Illus:</b></label><!-- TMPL_VAR name="illus" --></p><!-- /TMPL_IF -->
-				<p>
-					<!-- TMPL_IF name="publishercode" --><label><b>Published by :</b></label><!-- /TMPL_IF --> <!-- TMPL_VAR NAME="publishercode" -->
-				</p>
-				<!-- TMPL_IF name="publicationyear" --><p><label><b>in </b></label><!-- TMPL_VAR NAME="publicationyear" --></p><!-- /TMPL_IF -->
-				<p>
-					<label>&nbsp;</label><!-- TMPL_IF name="pages" --> <!-- /TMPL_IF --><!-- TMPL_VAR name="pages" -->
-					<!-- TMPL_IF name="size" -->, <!-- /TMPL_IF --><!-- TMPL_VAR name="size" -->
-				</p>
-				<!-- TMPL_IF name="isbn" --><p><label><b>ISBN:</b> </label><!-- TMPL_VAR NAME="isbn" --></p><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="issn" --><p><label><b>ISSN:</b> </label><!-- TMPL_VAR NAME="issn" --></p><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="seriestitle" --><p><label><b>Collection:</b> </label><!-- TMPL_VAR NAME="seriestitle" --> <!-- TMPL_IF name="volume" -->vol. <!-- TMPL_VAR name="volume" --> <!-- TMPL_VAR name="volumedate" --><!-- /TMPL_IF --><!-- TMPL_VAR name="volumedesc" --></p><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="MARCSUBJCTS" -->
-					<p><label><b>Subjects:</b></label></p>
-					<p>
-						<!-- TMPL_LOOP NAME="MARCSUBJCTS" -->
-							<label>-</label><a href="/cgi-bin/koha/opac-searchresults.pl?subjectitems=<!-- TMPL_VAR NAME="marcsubjct" ESCAPE="URL"-->">
-								<!-- TMPL_VAR NAME="marcsubjct" -->
-							</a><br>
-						<!-- /TMPL_LOOP -->
-					</p>
-				<!-- TMPL_ELSE -->
-					<!-- TMPL_IF name="subjects" --><p><label><b>Subject(s):</b> </label></p>
-						<!-- TMPL_LOOP name="subjects" -->
-							<p><a href="/cgi-bin/koha/opac-search.pl?op=do_search&marclist=bibliosubject.subject&and_or=and&operator==&value=<!-- TMPL_VAR NAME="subject" escape="HTML"-->"><!-- TMPL_VAR NAME="subject" --></a>, </p> <!-- /TMPL_LOOP -->
-					<!-- /TMPL_IF -->
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="copyrightdate" --><p><label><b>Year :</b> </label><!-- TMPL_VAR NAME="copyrightdate" --></p><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="MARCNOTES" -->
-					<p><label><b>Notes:</b> </label></p>
-					<p>
-						<!-- TMPL_LOOP NAME="MARCNOTES" -->
-							<p>- <!-- TMPL_VAR NAME="marcnote" --></p>
-						<!-- /TMPL_LOOP -->
-					</p>
-				<!-- TMPL_ELSE -->
-					<!-- TMPL_IF name="notes" --><p><label><b>Notes:</b> </label><!-- TMPL_VAR NAME="notes" --></p><!-- /TMPL_IF -->
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="unititle" --><p><label><b>Alt title:</b> </label><!-- TMPL_VAR NAME="unititle" --></p><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="classification" --><p><label><b>classification:</b></label><!-- TMPL_VAR name="subclass" --><!-- TMPL_VAR name="classification" --></p><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="dewey" --><p><label><b>Dewey:</b></label><!-- TMPL_VAR name="dewey" --></p><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="URLS" -->
-					<p><label><b>URL:</b> </label>
-						<!-- TMPL_LOOP name="URLS" -->
-							<a href="<!-- TMPL_VAR name="url" -->"><!-- TMPL_VAR NAME="url" --></a>&nbsp;
-						<!-- /TMPL_LOOP -->
-					</p>
-				<!-- /TMPL_IF -->
-				<p><label><b>Item type : </b></label>
-					<!-- TMPL_IF name="description" -->
-						<!-- TMPL_VAR name="description" -->
-					<!-- TMPL_ELSE -->
-						<!-- TMPL_VAR NAME="itemtype" -->
-					<!-- /TMPL_IF -->
-				</p>
-				<!-- TMPL_IF name="count" -->
-					<p><b>Total Number of Items:</b> <!-- TMPL_VAR NAME="count" --></p>
-				<!-- /TMPL_IF -->
-			</td>
-		</tr>
-	</table>
-	<table>
-	</table>
-	</div>
-	<!-- /TMPL_LOOP -->
-
-	<div id="itembloc">
-	<table cellspacing="0">
-		<tr>
-			<th colspan="6">Item</th>
-		</tr>
-		<tr>
-			<th>location</th>
-			<th>status</th>
-			<th>date Due</th>
-			<th>last Seen</th>
-			<th>barcode</th>
-		</tr>
-		<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
-			<tr>
-				<td>
-					<!-- TMPL_VAR NAME="branchname" --> <!-- TMPL_VAR NAME="location" --> 
-					<!-- TMPL_IF name="itemcallnumber" -->
-						(<!-- TMPL_VAR NAME="itemcallnumber" -->)
-					<!-- /TMPL_IF -->
-				</td>
-				<td>
-					<!-- TMPL_IF name="datedue" -->
-						On loan
-					<!-- TMPL_ELSE -->
-						<!-- TMPL_IF name="notforloantext" -->
-							<!-- TMPL_VAR name="notforloantext" -->
-						<!-- TMPL_ELSE -->
-							Available
-						<!-- /TMPL_IF -->
-					<!-- /TMPL_IF -->
-				</td>
-				<td><!-- TMPL_VAR NAME="datedue" --></td>
-				<td><!-- TMPL_VAR NAME="datelastseen" --></td>
-				<td><!-- TMPL_VAR NAME="barcode" --></td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		<!-- TMPL_LOOP NAME="WEB_RESULTS" -->
-			<tr>
-				<td><!-- TMPL_VAR NAME="itemtype" --></td>
-				<td>Website</td>
-				<td>Online</td>
-				<td>Available</td>
-				<td>&nbsp;</td>
-				<td><!-- TMPL_VAR NAME="url" --></td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-	
-	</table>
-	<!-- TMPL_IF name="subscriptionsnumber" -->
-		<div id="bloc25">
-		<p>This is a serial subscription (we have <!-- TMPL_VAR name="subscriptionsnumber" --> subscription(s) associated with this title).</p> 
-		<p>Below is a list of the three latest issues related to those subscription(s) :</p>
-		<!-- TMPL_LOOP Name="subscriptions" -->
-				<h2> Subscription #<!--TMPL_VAR Name="subscriptionid"--> </h2>
-				<p><!--TMPL_VAR Name="subscriptionnotes"--> </p>
-				<!--TMPL_IF Name="latestserials"-->
-				<table>
-				<tr><th>Issue number</th><th>Date</th><th>Status</th></tr>
-				<!--TMPL_LOOP Name="latestserials"-->
-					<tr>
-						<td>
-							<!--TMPL_VAR Name="serialseq"-->
-						</td>
-						<td>
-							<!--TMPL_VAR Name="planneddate"-->
-						</td>
-						<td>
-							<!--TMPL_IF Name="status1"-->Waited
-							<!--TMPL_ELSE -->
-								<!-- TMPL_IF Name="status2"-->Arrived
-								<!--TMPL_ELSE -->
-									<!-- TMPL_IF Name="status3"-->Late
-									<!--TMPL_ELSE -->
-										<!-- TMPL_IF Name="status4"-->Missing
-										<!--TMPL_ELSE -->
-											<!-- TMPL_IF Name="status5"-->Not Issued
-											<!--/TMPL_IF-->
-										<!--/TMPL_IF-->
-									<!--/TMPL_IF-->
-								<!--/TMPL_IF-->
-							<!--/TMPL_IF-->
-						</td>
-					</tr>
-				<!--/TMPL_LOOP -->
-				</table>
-				<!-- /TMPL_IF -->
-		<!-- /TMPL_LOOP -->
-		<p><a href="/cgi-bin/koha/opac-serial-issues.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" title="Serial issues">Click here</a> for more information on subscription(s) history</p>
-		</div>
- 	<!-- /TMPL_IF -->
-	</div>
-</div>
-</div>
-<div id="rightbloc">
-Search Options:<br>
-Select keywords from list<br>
-<br>
-<form name="searchoptions" action="searchoptions.pl" method="get">
-<input type="hidden" name="searchtype" value="NewSearch">
-Titles:<br>
-<!-- TMPL_LOOP NAME="titlewords" -->
-<input type="checkbox" name="keyword" value="<!-- TMPL_VAR NAME="title" -->"><!-- TMPL_VAR NAME="title" --><br>
-<!-- /TMPL_LOOP --><br>
-Authors:<br>
-<!-- TMPL_LOOP NAME="authorwords" -->
-<input type="checkbox" name="keyword" value="<!-- TMPL_VAR NAME="author" -->"><!-- TMPL_VAR NAME="author" --><br>
-<!-- /TMPL_LOOP --><br>
-Subjects:<br>
-<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-<!-- TMPL_LOOP NAME="subjects" -->
-<input type="checkbox" name="keyword" value="<!-- TMPL_VAR NAME="subject" -->"><!-- TMPL_VAR NAME="subject" --><br>
-<!-- /TMPL_LOOP --><br>
-Itemtype:<br>
-<input type="checkbox" name="itemtypeswanted" value="<!-- TMPL_VAR NAME="itemtype" -->">
-<!-- TMPL_IF name="description" -->
-<!-- TMPL_VAR name="description" -->
-<!-- TMPL_ELSE -->
-<!-- TMPL_VAR NAME="itemtype" -->
-<!-- /TMPL_IF -->
-<!-- /TMPL_LOOP --><br>
-<input type="submit" value="Search">
-</form>
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-detailprint.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-detailprint.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-detailprint.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-detailprint.tmpl	12 Nov 2004 16:28:10 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,52 +0,0 @@
-<html>
-<body onLoad="window.print();self.close();">
-<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-	<table cellspacing="0" cellpadding="1" border="1" width=500>
-	<tr valign="top">
-		<td bgcolor="#cccc99" background="/images/background-mem.gif">
-			<b>BIBLIO RECORD <!-- TMPL_VAR NAME="biblionumber" --></b>
-		</td>
-	</tr>
-	<tr valign="top">
-		<td>
-			<!-- TMPL_VAR NAME="author" --><br>
-			<b><!-- TMPL_VAR NAME="title" --></b><!-- TMPL_VAR NAME="subtitle" --><br>
-			<!-- TMPL_VAR NAME="additional" --><br>
-			<!-- TMPL_IF NAME="publishercode" --><b>Published by :</b><!-- TMPL_VAR NAME="publishercode" --><!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="publicationyear" --><b>in </b><!-- TMPL_VAR NAME="publicationyear" --><!-- /TMPL_IF -->
-			<!-- 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_VAR NAME="seriestitle" --><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="subject" --><b>Subject:</b> <!-- TMPL_VAR NAME="subject" --><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="copyrightdate" --><b>Year :</b> <!-- TMPL_VAR NAME="copyrightdate" --><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="notes" --><b>Notes:</b> <!-- TMPL_VAR NAME="notes" --><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="unititle" --><b>Unititle:</b> <!-- TMPL_VAR NAME="unititle" --><!-- /TMPL_IF --> <br>
-			<!-- TMPL_IF NAME="dewey" --><b>Dewey:</b> <a href="/cgi-bin/koha/opac-searchresults.pl?type=opac&amp;dewey=<!-- TMPL_VAR NAME="dewey" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="dewey" --></a><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="classification" --><b>Classification:</b> <!-- TMPL_VAR NAME="classification" --><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="lccn" --><b>LCCN:</b> <!-- TMPL_VAR NAME="lccn" --><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="url" --><b>URL:</b> <a href="<!-- TMPL_VAR NAME="url" -->"><!-- TMPL_VAR NAME="url" --></a><!-- /TMPL_IF --><br>
-			<b>ISBN:</b><!-- TMPL_VAR NAME="ISBN" --><br>
-			</font>
-		</td>
-	</tr>
-	</table>
-<!-- /TMPL_LOOP -->
-
-<table border="0" cellspacing="0" cellpadding="2">
-	<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
-		<tr>
-			<td><!-- TMPL_VAR NAME="description" --></td>
-			<td><!-- TMPL_VAR NAME="branchname" -->, <!-- TMPL_VAR NAME="itemcallnumber" --></td>
-			<td><!-- TMPL_VAR NAME="barcode" --></td>
-			<td><!-- TMPL_VAR NAME="volumeddesc" --></td>
-		</tr>
-	<!-- /TMPL_LOOP -->
-</table>
-<script language="javascript" type="text/javascript">
-function docprint() {
-	window.print();
-	window.close();
-}
-</script>
-</body>
-</html>
\ No newline at end of file

Index: koha-tmpl/opac-tmpl/css/en/opac-dictionary.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-dictionary.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-dictionary.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-dictionary.tmpl	6 Jan 2006 16:39:42 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,166 +0,0 @@
-<!-- TMPL_INCLUDE name="popup-top.inc"-->
-<body>
-<div id="mainbloc">
-	<h1 class="catalogue">Dictionary Search</h1>
-	
-	<form name="f" method="post" action="opac-dictionary.pl">
-		<div class="bloc25">
-			<h2 class="catalogue">Search on</h2>
-			<p>
-				<input type="hidden" name="op" value="do_search">
-				<label class="label100" for="keyword"></label>
-				<input type="hidden" name="marclist" value="<!-- TMPL_VAR Name="marclist" -->">
-				<input type="text" name="search" value="<!-- TMPL_VAR Name="search" -->" size="35">
-				<input type="submit" value="Start search" class="button catalogue">
-				<input type="hidden" name="type" value="<!-- TMPL_VAR Name="type" -->">
-				<input type="hidden" name="index" value="<!-- TMPL_VAR Name="anindex" ESCAPE="URL" -->">
-			</p>
-		</div>
-	</form>
-
-<!-- TMPL_IF Name=search -->
-	<div class="bloc25">
-	<h2 class="catalogue">Dictionary Search results</h2>
-	<!-- TMPL_IF NAME="authresult" -->
-		<div id="resultnumber">
-			<p><!-- TMPL_IF NAME="displayprev" --> 
-					<a class="resultnumber" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL-->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL-->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">&lt;&lt;Previous</a>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_LOOP NAME="numbers" -->
-					<!-- TMPL_IF NAME="highlight" -->
-						<span class="highlight"><!-- TMPL_VAR NAME="number" --></span>
-					<!-- TMPL_ELSE --> 
-						<a class="resultnumber" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL -->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->"><!-- TMPL_VAR NAME="number" --></a>
-					<!-- /TMPL_IF -->
-				<!-- /TMPL_LOOP --> 
-				<!-- TMPL_IF NAME="displaynext" -->
-					<a class="resultnumber" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" -->&amp;search=<!-- TMPL_VAR NAME="search" -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">Next&gt;&gt;</a>
-				<!-- /TMPL_IF -->
-			</p>
-			<p class="resultcount">
-			<!-- TMPL_IF NAME="nbresults" -->
-					Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="nbresults" --><!-- TMPL_ELSE -->No results found.
-			<!-- /TMPL_IF -->
-			</p>
-		</div>
-		<div id="resultlist">
-			<table>
-				<tr>
-					<th colspan="3" class="catalogue">Authorities</th>
-				</tr>
-				<tr>
-					<th class="catalogue">Summary</th>
-					<th class="catalogue">Used in</th>
-					<th class="catalogue">Select</th>
-				</tr>
-				<!-- TMPL_LOOP NAME="authresult" -->
-					<tr>
-						<!-- TMPL_IF NAME="even" -->
-							<td class="hilighted">
-						<!-- TMPL_ELSE -->
-							<td>
-						<!-- /TMPL_IF -->
-							<!-- TMPL_VAR NAME="summary" -->
-						</td>
-						<!-- TMPL_IF NAME="even" -->
-							<td class="hilighted">
-						<!-- TMPL_ELSE -->
-							<td>
-						<!-- /TMPL_IF -->
-							<!-- TMPL_VAR NAME="used" --> biblio(s)
-						</td>
-						<!-- TMPL_IF NAME="even" -->
-							<td class="hilighted">
-						<!-- TMPL_ELSE -->
-							<td>
-						<!-- /TMPL_IF -->
-							<a  href="javascript:SelectEntry('<!-- TMPL_VAR NAME="summary" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL"  -->,0)" class="button catalogue">select</a>
-							<a  href="javascript:SelectEntry('<!-- TMPL_VAR NAME="mainentry" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL"  -->,1)" class="button catalogue">sel&amp;close</a>
-						</td>
-					</tr>
-				<!-- /TMPL_LOOP -->
-			</table>
-		</div>
-		<!-- TMPL_ELSE -->
-			<h3 class="catalogue">No results in Authorities</h3>
-	<!-- /TMPL_IF -->
-		
-		
-	<!-- TMPL_IF Name=catresult -->	
-		<div id="resultnumber">
-			<p class="resultcount">
-			<!-- TMPL_IF NAME="total" -->
-					Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --><!-- TMPL_ELSE -->No results found.
-			<!-- /TMPL_IF -->
-			</p>
-		</div>
-		<div id="resultlist">
-			<table>
-				<tr>
-					<th class="catalogue">Summary</th>
-					<th class="catalogue">Used in</th>
-					<th class="catalogue">Select</th>
-				</tr>
-				<!-- TMPL_LOOP NAME="catresult" -->
-				<tr>
-					<!-- TMPL_IF NAME="even" -->
-					<td class="hilighted">
-					<!-- TMPL_ELSE -->
-					<td>
-					<!-- /TMPL_IF -->
-								<!-- TMPL_IF name="MARC_ON" -->
-									<!-- TMPL_VAR NAME="value" -->
-								<!-- TMPL_ELSE -->
-									<!-- TMPL_VAR NAME="value" -->
-								<!-- /TMPL_IF -->
-					</td>
-					<td align="center" <!-- TMPL_IF NAME="even" --> class="hilighted"<!-- /TMPL_IF -->>
-						<!-- TMPL_VAR NAME="count" --> biblio(s)
-					</td>
-					<td <!-- TMPL_IF NAME="even" -->class="hilighted"<!-- /TMPL_IF -->>
-							<a  href="javascript:SelectEntry('<!-- TMPL_VAR NAME="value" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL"  -->,0)" class="button catalogue">Select</a>
-							<a  href="javascript:SelectEntry('<!-- TMPL_VAR NAME="value" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL"  -->,1)" class="button catalogue">Sel&amp;close</a>
-					</td>
-				</tr>
-				<!-- /TMPL_LOOP -->
-			</table>
-		</div>
-		<div id="resultnumber">
-			<p><!-- TMPL_IF NAME="displayprev" --> 
-					<a class="resultnumber" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL-->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL-->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">&lt;&lt;Previous</a>
-				<!-- /TMPL_IF -->
-				<!-- TMPL_LOOP NAME="numbers" -->
-					<!-- TMPL_IF NAME="highlight" -->
-						<span class="highlight"><!-- TMPL_VAR NAME="number" --></span>
-					<!-- TMPL_ELSE --> 
-						<a class="resultnumber" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL -->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->"><!-- TMPL_VAR NAME="number" --></a>
-					<!-- /TMPL_IF -->
-				<!-- /TMPL_LOOP --> 
-				<!-- TMPL_IF NAME="displaynext" -->
-					<a class="resultnumber" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" -->&amp;search=<!-- TMPL_VAR NAME="search" -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">Next&gt;&gt;</a>
-				<!-- /TMPL_IF -->
-			</p>
-			<p class="resultcount">
-			<!-- TMPL_IF NAME="total" -->
-					Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --><!-- TMPL_ELSE -->No results found.
-			<!-- /TMPL_IF -->
-			</p>
-		</div>
-	<!-- /TMPL_IF -->
-	<script language="JavaScript" type="text/javascript">
-	function SelectEntry(myentry, myindex, wclose){
-		if (opener.document.f.value[myindex].value!=""){ 
-			opener.document.f.value[myindex].value=opener.document.f.value[myindex].value+" "+myentry
-		} else {
-			opener.document.f.value[myindex].value=myentry
-		}
-		if (wclose == 1) {
-	// 	alert("closing")
-			self.close();
-		}
-	}
-	</script>
-	</div>
-<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE name="opac-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/opac-tmpl/css/en/opac-full-serial-issues.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-full-serial-issues.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-full-serial-issues.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-full-serial-issues.tmpl	20 Jun 2005 14:25:00 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,64 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-
-
-<!-- TMPL_UNLESS name="popup" -->
-	<h1 class="catalogue">Subscription information for biblio #<!-- TMPL_VAR NAME="biblionumber" --> with title : <!-- TMPL_VAR name="bibliotitle" --></h1>
-	<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue">Back to biblio</a>
-<!-- /TMPL_UNLESS -->
-	<div class="tabsubs">
-	<!-- TMPL_LOOP NAME="years" -->
-		<!-- TMPL_IF NAME="year" -->
-			<a  class="tabsubs" href="javascript:active(<!-- TMPL_VAR NAME="year" -->)"><!-- TMPL_VAR NAME="year" --></a>
-		<!-- /TMPL_IF -->
-	<!-- /TMPL_LOOP -->
-	<a class="tabsubs" href="opac-serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->&selectview=small">Compact view</a>
-	</div>
-
-	<!-- TMPL_LOOP NAME="years" -->
-	<div name="<!-- TMPL_VAR NAME="year" -->" id="<!-- TMPL_VAR NAME="year" -->" class="tabsub" <!--TMPL_IF Name="first" -->style="visibility:visible"<!--/TMPL_IF -->>
-		<table>
-			<tr>
-				<th> Date
-				</th>
-				<th> Number
-				</th>
-				<th> Status
-				</th>
-			</tr>
-			<!-- TMPL_LOOP Name="serials" -->
-			<tr>
-				<td>
-					<!-- TMPL_VAR Name="planneddate" -->
-				</td>
-				<td>
-					<!-- TMPL_VAR Name="serialseq" -->
-				</td>
-				<td>
-					<!-- TMPL_IF Name="status1" -->Arrived<!-- /TMPL_IF -->
-					<!-- TMPL_IF Name="status2" -->Waited<!-- /TMPL_IF -->
-					<!-- TMPL_IF Name="status3" -->Late<!-- /TMPL_IF -->
-					<!-- TMPL_IF Name="status4" -->Missing<!-- /TMPL_IF -->
-				</td>
-			</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-	</div>
-	<!--/TMPL_LOOP -->
-<script language="JavaScript" type="text/javascript">
-active(<!-- TMPL_VAR name="yearmin" -->);
-function active(numlayer)
-{
-	for (i=<!--TMPL_VAR Name="yearmin"-->; i<=<!--TMPL_VAR Name="yearmax"-->; i++ ) {
-		ong = i;
-		link = "link"+i;
-		if (numlayer==i) {
-			document.getElementById(ong).style.visibility="visible";
-		} else {
-			document.getElementById(ong).style.visibility="hidden";
-		}
-	}
-}
-
-</script>
-</body>
-</html>

Index: koha-tmpl/opac-tmpl/css/en/opac-main.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-main.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-main.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-main.tmpl	6 Jan 2006 16:39:42 -0000	1.21
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<!-- TMPL_IF name="opacstylesheet" -->
-		<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="opacstylesheet"-->" />
-	<!-- TMPL_ELSE -->
-		<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang"-->/includes/opac.css" />
-	<!-- /TMPL_IF -->
-	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-	<title><!--TMPL_VAR name="LibraryName"--></title>
-</head>
-
-<body>
-<div id="leftbloc">
-	<!-- TMPL_IF name="opaclargeimage" -->
-		<img class="relative" src="<!-- TMPL_VAR name="opaclargeimage"-->" title="koha" alt="koha" />
-	<!-- TMPL_ELSE -->
-		<img class="relative" src="<!-- TMPL_VAR NAME='themelang' -->/images/front-background-med.gif" title="koha" alt="koha" />
-	<!-- /TMPL_IF -->
-</div>
-
-<div id="homebloc">
-	<h1 class="LibraryName"><TMPL_VAR name="LibraryName"></h1>
-	<h2>Search the catalogue</h2>
-	<form action="/cgi-bin/koha/opac-search.pl">
-		<p>
-			<input type="hidden" name="op" value="do_search" />
-			<input type="hidden" name="type" value="opac" />
-			<input type="hidden" name="marclist" value="" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			Quick search : <input type="text" size="27" name="value" tabindex="1" /> <input type="submit" value="OK" class="button" /><br />
-		</p>
-		<p>
-			<a href="/cgi-bin/koha/opac-search.pl" class="button">Advanced Search, More Options	</a>
-		</p>
-	</form>
-
-	<h2>Recent acquisitions</h2>
-	<form action="/cgi-bin/koha/opac-search.pl">
-		<p>
-			<!-- TMPL_VAR name="CGIitemtype" --> acquired recently (the most recent being first)
-			<input type="hidden" name="marclist" value="biblioitems.itemtype" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="=" />
-			<input type="hidden" name="op" value="do_search" />
-			<input type="hidden" name="type" value="opac" />
-			acquired in the last
-			<input type="text" name="desc_or_asc" size="3" value="30" />
-			days
-			<input type="hidden" name="orderby" value="biblio.timestamp" />
-			<input type="hidden" name="desc_or_asc" value="desc" />
-			<input type="submit" value="OK" class="button" />
-		</p>
-	</form>
-	<h2>Other options</h2>
-	<!-- TMPL_IF NAME="loggedinusername" -->
-		<p>
-			<!-- TMPL_IF name="virtualshelves" -->
-				<a href="/cgi-bin/koha/opac-shelves.pl" class="button">Virtual shelves</a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="suggestion" -->
-				<a href="opac-suggestions.pl" class="button">Suggestions</a>
-			<!-- /TMPL_IF -->
-			<a href="/cgi-bin/koha/opac-user.pl" class="button">
-				My details
-			</a>
-			<a href="/cgi-bin/koha/opac-readingrecord.pl" class="button">My reading history</a>
-			
-			<a href="/cgi-bin/koha/opac-main.pl?logout.x=1" class="button">
-				Log Out
-			</a>
-			<!-- TMPL_IF name="textmessaging"-->
-				<h2>Message from the library</h2>
-				<!-- TMPL_VAR name="textmessaging" -->
-			<!-- /TMPL_IF -->
-		</p>
-	<!-- TMPL_ELSE -->
-		<p><a href="/cgi-bin/koha/opac-user.pl">Log in to Koha</a> to have personal options.</p>
-	<!-- /TMPL_IF -->
-	<form action="/cgi-bin/koha/changelanguage.pl" method="post">
-		<p>
-			<select name="language">
-				<TMPL_LOOP NAME="languages">
-					<option value="<TMPL_VAR NAME="language">"><TMPL_VAR NAME="language"></option>
-				</TMPL_LOOP>
-			</select>
-			<input type="submit" value="Change Language" class="button" />
-		</p>
-	</form>
-	<p class="copyright">
-		This Library is powered by <a href="http://www.koha.org">Koha</a> free software ILS, and compliant with web standards
-		<a href="http://validator.w3.org/check/referer">
-			<img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="16" width="44" />
-		</a>
-	</p>
-</div>
-
-</body>
-</html>

Index: koha-tmpl/opac-tmpl/css/en/opac-moredetail.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-moredetail.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-moredetail.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-moredetail.tmpl	21 Jul 2006 09:59:06 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,97 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<center>
-
-<br>
-<!-- TMPL_LOOP NAME="BIBITEM_DATA" -->
-<a href="/cgi-bin/koha/request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->">
-	<img src="/images/requests.gif" width=120 height=42 border=0 align=right border=0>
-</a>
-<h1><a href="/cgi-bin/koha/detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->&type=intra"><!-- TMPL_VAR NAME="title" -->
-(<!-- TMPL_VAR NAME="author" -->)</a></h1>
-<p>
-<form action="/cgi-bin/koha/modbibitem.pl">
-<input type=hidden name=bibitem value="<!-- TMPL_VAR NAME="biblioitemnumber" -->">
-<input type=hidden name=biblio value="<!-- TMPL_VAR NAME="biblionumber" -->">
-<table>
-<tr>
-<td><b><!-- TMPL_VAR NAME="biblioitemnumber" --> GROUP - <!-- TMPL_VAR NAME="description" --> </b> </td>
-</tr>
-<tr>
-<td width=210 >
-<input TYPE="image" name="submit"  value="modify" height=42  WIDTH=93
-border=0 src="/images/modify-mem.gif">
-<input TYPE="image" name="delete"  value="delete" height=42  WIDTH=93
-border=0 src="/images/delete-mem.gif">
-<br>
-<b>Biblionumber:</b> <!-- TMPL_VAR NAME="biblionumber" --><br>
-<b>Item Type:</b> <!-- TMPL_VAR NAME="itemtype" --><br>
-<b>URL:</b> <!-- TMPL_VAR NAME="url" --><br>
-<b>Loan Length:</b> <!-- TMPL_VAR NAME="loanlength" --><br>
-<b>Rental Charge:</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>Publisher:</b> <!-- TMPL_VAR NAME="publishercode" --> <br>
-<b>Place:</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>Size:</b> <!-- TMPL_VAR NAME="size" --><br>
-<b>Notes:</b> <!-- TMPL_VAR NAME="bnotes" --><br>
-<b>No. of Items:</b> <!-- TMPL_VAR NAME="count" -->
-</td>
-</tr>
-</table>
-</form>
-<!-- /TMPL_LOOP -->
-<!-- TMPL_LOOP NAME="ITEM_DATA" -->
-<img src="/images/holder.gif" width=16 height=300 align=left>
-<TABLE>
-<tr>
-<td><b>BARCODE
-<!-- TMPL_VAR NAME="barcode" --></b></td>
-</tr>
-<tr>
-<td>
-<form action="/cgi-bin/koha/moditem.pl" method=post>
-<input type=hidden name=bibitem value=<!-- TMPL_VAR NAME="biblionumber" -->>
-<input type=hidden name=item value=<!-- TMPL_VAR NAME="itemnumber" -->>
-<input type=hidden name=type value=<!-- TMPL_VAR NAME="type" -->>
-<input TYPE="image" name="submit"  value="modify" height=42  width=93
-border=0 src="/images/modify-mem.gif">
-<input type="image" name="delete"  value="delete" height=42  width=93
-border=0 src="/images/delete-mem.gif">
-<br>
-<b>Home Branch:</b> <!-- TMPL_VAR NAME="homebranch" --><br>
-<b>Last seen:</b> <!-- TMPL_VAR NAME="datelastseen" --><br>
-<b>Last borrowed:</b> <!-- TMPL_VAR NAME="timestamp0" --><br>
-on issue bit <!-- FIXME - What's this, then? -->
-<b>Last Borrower 1:</b> <!-- TMPL_VAR NAME="card0" --><br>
-<b>Last Borrower 2:</b> <!-- TMPL_VAR NAME="card1" --><br>
-<b>Current Branch:</b> <!-- TMPL_VAR NAME="holdingbranch" --><br>
-<b>Replacement Price:</b> <!-- TMPL_VAR NAME="replacementprice" --><br>
-<b>Item lost:</b> <!-- TMPL_VAR NAME="itemlost" --><br>
-<b>Paid for:</b> <!-- TMPL_VAR NAME="paidfor" --><br>
-<b>Notes:</b> <!-- TMPL_VAR NAME="itemnotes" --><br>
-<b>Renewals:</b> <!-- TMPL_VAR NAME="renewals" --><br>
-<b><a href="/cgi-bin/koha/acqui/orderreceive.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>Cancelled: <!-- 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>Group Number:</b> <!-- TMPL_VAR NAME="biblioitemnumber" --> <br>
-<b>Biblio number:</b> <!-- TMPL_VAR NAME="biblionumber" --> <br>
-
-</td>
-</tr>
-</table>
-</form>
-<!-- /TMPL_LOOP -->
-
-<p>
-</form>
-</center>
-
-<!-- TMPL_INCLUDE NAME="cat-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-passwd.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-passwd.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-passwd.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-passwd.tmpl	4 Aug 2005 14:10:52 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,40 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-
-<!-- TMPL_IF NAME= "Error_messages" -->
-<h3>There was a problem with your submission</h3>
-<p class="error">
-	<!-- TMPL_IF NAME= "PassMismatch" -->
-	Passwords do not match.  Please re-type your new password.
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME= "ShortPass" -->
-	Your new password must be at least 6 characters long
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME= "WrongPass" -->
-	Your current password was entered incorrectly.  If this problem persists, please ask a librarian to re-set your password for you.	
-	<!-- /TMPL_IF --></p>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME= "Ask_data" -->
-<h1>Change your Password</h1>
-<form action="/cgi-bin/koha/opac-passwd.pl" name="mainform" id="mainform" method="get">
-<p><label for="password">Current Password:</label><input type="password" id="Oldkey" size="25"  name="Oldkey" /></p>
-<p><label for="Newkey">New Password:</label><input type="password" id="Newkey"  size="25"  name="Newkey" /></p>
-<p><label for="Confirm">Re-Type New Password:</label><input type="password"  id="Confirm" size="25" name="Confirm" /></p>
-<p><input type="submit" value="Submit Changes" class="button" /></p>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME= "password_updated" -->
-<h1>Password Updated</h1>
-	Your password has been changed
-	<form action="/cgi-bin/koha/opac-user.pl" method="post">
-		<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
-		<p><input type="submit" class="button" value="Return to Your Record" /></p>
-	</form>
-<!-- /TMPL_IF -->
-</form>
-
-
-
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
-

Index: koha-tmpl/opac-tmpl/css/en/opac-readingrecord.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-readingrecord.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-readingrecord.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-readingrecord.tmpl	12 Jul 2005 19:56:17 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-		<h2>Reading History of <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></h2>
-<!-- TMPL_UNLESS NAME="count" -->
-You have never borrowed anything from the library.
-<!-- TMPL_ELSE -->
-<!-- TMPL_IF NAME="showfulllink" -->
-Showing All Items | <a class="button" href="opac-readingrecord.pl?limit=">Show Last 50 Items Only</a> <!-- TMPL_ELSE --> Showing Last 50 Items | <a class="button" href="opac-readingrecord.pl?limit=full">Show All Items</a>
-<!-- /TMPL_IF --><table>
-<tr>
-<tr><th><!-- TMPL_UNLESS NAME="orderbytitle" --><a class="transparent" href="/cgi-bin/koha/opac-readingrecord.pl?order=title">Title</a><!-- TMPL_ELSE -->Title<!-- /TMPL_UNLESS NAME="orderbyauthor"--></th>
-<th><!-- TMPL_UNLESS --><a class="transparent" href="/cgi-bin/koha/opac-readingrecord.pl?order=author">Author</a><!-- TMPL_ELSE -->Author<!-- /TMPL_UNLESS --></th>
-<th><!-- TMPL_UNLESS NAME="orderbydate" --><a class="transparent" href="/cgi-bin/koha/opac-readingrecord.pl">Date</a><!-- TMPL_ELSE -->Date<!-- /TMPL_UNLESS --></th></tr>
-
-<!-- TMPL_LOOP NAME="READING_RECORD" -->
-
-<tr>
-<!-- TMPL_IF NAME="toggle" --><td><!-- TMPL_ELSE --><td class="hilighted"><!-- /TMPL_IF --><a class="transparent" href="/cgi-bin/koha/opac-detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a></td>
-<!-- TMPL_IF NAME="toggle" --><td><!-- TMPL_ELSE --><td class="hilighted"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="author" --></td>
-<!-- TMPL_IF NAME="toggle" --><td><!-- TMPL_ELSE --><td class="hilighted"><!-- /TMPL_IF --><!-- TMPL_IF NAME="returndate" --><!-- TMPL_VAR NAME="returndate" --><!-- TMPL_ELSE --><em>(Checked out)</em><!-- /TMPL_IF --></td>
-</tr>
-
-<!-- /TMPL_LOOP -->
-</table>
-
-<!-- /TMPL_UNLESS -->
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
-

Index: koha-tmpl/opac-tmpl/css/en/opac-reserve.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-reserve.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-reserve.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-reserve.tmpl	6 Jul 2005 21:50:12 -0000	1.8
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,82 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-<h2>Reserve page for <i><!-- TMPL_VAR NAME="title" --></i> (<!-- TMPL_IF NAME="author" --><!-- TMPL_VAR NAME="author" -->,<!-- /TMPL_IF --> N&#176;<!-- TMPL_VAR name="biblionumber" -->)</h2>
-<!-- TMPL_IF NAME="message" -->
-	<h2>Impossible to set reserve because </h2>
-	<ul>
-		<!-- TMPL_IF name="noreserve" --><li>You can't make reserve in this library (feature unactivated)</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="too_much_oweing" --><li>you owe <!-- TMPL_VAR NAME="too_much_oweing" --></li><!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="too_many_reserves" --><li>you cannot make more than <!-- TMPL_VAR NAME="too_many_reserves" --> reserves.</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="already_reserved" --><li>you already have a reserve placed on this item.</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="no_items_selected" --><li>you must select at least on item type!</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="no_branch_selected" --><li>you must select a branch for pickup!</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF name="GNA" --><li>You are gone without address. Reservation is forbidden. Please contact the library</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF name="lost" --><li>This card has been declared lost. Reserve impossible. Please contact the library</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF name="debarred" --><li>Your account is temporarily suspended. Please contact the library</li><!-- /TMPL_IF -->
-	</ul>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="select_item_types" -->
-	<!-- The first time round you select which bibitems you want -->
-	<p> There are <b><!-- TMPL_VAR NAME="reservecount" --></b> reserves already on this item. </p>
-	<p>Please select which item types are ok for you. The first of these item that matches one of these types that becomes available will be set kept for you.</p>
-
-	<form action="/cgi-bin/koha/opac-reserve.pl" method="post">
-		<input type="hidden" name="item_types_selected" value="1" />
-		<input type="hidden" name="bib" value="<!-- TMPL_VAR name="biblionumber" -->" />
-		<table cellspacing="0">
-			<tr>
-				<th>Request</th>
-				<th>Item Type</th>
-				<th>Copies</th>
-			</tr>
-			<!-- TMPL_LOOP NAME="TYPES" -->
-				<tr>
-					<!-- TMPL_UNLESS NAME="notforloan" -->
-						<td><input type="checkbox" name="itemtype" value="<!-- TMPL_VAR NAME="itemtype" -->" checked="checked" /></td>
-					<!-- TMPL_ELSE -->
-						<td>Cannot be Reserved</td>
-					<!-- /TMPL_UNLESS -->
-					<td><!-- TMPL_VAR NAME="description" --></td>
-					<td><!-- TMPL_VAR NAME="copies" --></td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-		<p>Please select the branch from which you want to collect the item: <select name="branch" id="branch">
-		<option>-- Please choose your branch --</option>
-		<!-- TMPL_LOOP NAME="CGIbranch" --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branch" --></option><!-- /TMPL_LOOP -->
-</select></p>
-				
-		<input class="button" type="submit" value="Submit" />
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="item_types_selected" -->
-<!-- if the bibitems have already been selected -->
-	<p>Please confirm that you wish to request an item of these types:</p>
-
-	<form action="/cgi-bin/koha/opac-reserve.pl" method="post">
-		<input type="hidden" name="place_reserve" value="1" />
-		<input type="hidden" name="bib" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
-		<input type="hidden" name="required_date" value="<!-- TMPL_VAR NAME="required_date" -->" />
-		<input type="hidden" name="expires_date" value="<!-- TMPL_VAR NAME="expires_date" -->" />
-		<ul>
-			<!-- TMPL_LOOP NAME="TYPES" -->
-			<li><input type="hidden" name="itemtype" value="<!-- TMPL_VAR NAME="itemtype" -->" /><!-- TMPL_VAR NAME="description" --></li>
-			<!-- /TMPL_LOOP -->
-		</ul>
-		Which is to be picked up from
-		<ul>
-			<li>
-				<!-- TMPL_VAR NAME="branchname" -->
-			</li>
-		</ul>
-		<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
-		<!-- TMPL_IF NAME="istherefee" -->
-			<p>Note there will be a reserve charge of <b>$<!-- TMPL_VAR NAME="fee" --></b></p>
-		<!-- /TMPL_IF -->
-		<input class="button" type="submit" value="Place Reserve" />
-	</form>
-<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/opac-tmpl/css/en/opac-search.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-search.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-search.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-search.tmpl	20 Jun 2005 14:25:00 -0000	1.16
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,179 +0,0 @@
-    <!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-
-<h1 class="catalogue">Catalogue search</h1>
-
-<form name="f" method="post" action="<!-- TMPL_VAR name="SCRIPT_NAME" -->">
-	
-	<div id="bloc60">
-		<h2 class="catalogue">Search on</h2>
-		<p>
-			<input type="hidden" name="op" value="do_search" />
-			<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
-			<label class="label20">Any word</label>
-			<input type="hidden" name="marclist" value="" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			<input type="text" name="value" size="35" />
-		</p>
-		<p>
-			<label class="label20">Title</label>
-			<input type="hidden" name="marclist" value="biblio.title" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			<input type="text" name="value" size="35" />
-			<a href="javascript:Dopop('opac-dictionary.pl?marclist=biblio.title&amp;type=intranet&amp;index=1',1)" class="button catalogue">
-				...
-			</a>
-		</p>
-		<p>
-			<label class="label20">Author</label> <input type="hidden" name="marclist" value="biblio.author" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			<input type="text" name="value" size="35" />
-			<a href="javascript:Dopop('opac-dictionary.pl?marclist=biblio.author&amp;type=intranet&amp;index=2',2)" class="button catalogue">
-				...
-			</a>
-		</p>
-		<p>
-			<label class="label20">Subject</label>
-			<input type="hidden" name="marclist" value="bibliosubject.subject" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />  
-			<input type="text" name="value" size="35" />
-			<a href="javascript:Dopop('opac-dictionary.pl?marclist=bibliosubject.subject&amp;type=intranet&amp;index=3',3)" class="button catalogue">
-				...
-			</a>
-		</p>
-		<p>
-			<label class="label20">Series title</label>
-			<input type="hidden" name="marclist" value="biblio.seriestitle" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			<input type="text" name="value" size="35"/>
-		</p>
-		<p>
-			<label class="label20">Series title</label>
-			<input type="hidden" name="marclist" value="biblio.seriestitle" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			<input type="text" name="value" onchange="sql_update()" size="35"/>
-		</p>
-		<p>
-			<label class="label20">Item Type</label>
-			<input type="hidden" name="marclist" value="biblioitems.itemtype" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="=" />
-			<!-- TMPL_VAR name="CGIitemtype" -->
-		</p>
-		<p>
-				<label class="label20">Branch</label>
-				<input type="hidden" name="marclist" value="items.holdingbranch" />
-				<input type="hidden" name="and_or" value="and" />
-				<input type="hidden" name="excluding" value="" />
-				<input type="hidden" name="operator" value="=" />  
-				<!-- TMPL_VAR name="CGIbranch" -->
-		</p>
-	</div>
-	<div id="bloc20">
-		<h2>Other options</h2>
-		<p>
-				<label class="label20">Item barcode</label>
-				<input type="hidden" name="marclist" value="items.barcode" />
-				<input type="hidden" name="and_or" value="and" />
-				<input type="hidden" name="excluding" value="" />
-				<input type="hidden" name="operator" value="start" />
-				<input type="text" name="value" /> 
-		</p>
-		<p>
-			<label class="label20">Call Number</label>
-			<input type="hidden" name="marclist" value="items.itemcallnumber" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="start" />
-			<input type="text" name="value" />
-		</p>
-		<p>
-			<label class="label20">ISBN</label>
-			<input type="hidden" name="marclist" value="biblioitems.isbn" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="=" />
-			<input type="text" name="value" />
-		</p>
-		<p>
-			<label class="label20">Publisher</label>
-			<input type="hidden" name="marclist" value="biblioitems.publishercode" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			<input type="text" name="value" />
-		</p>
-		<p>
-			<label class="label20">Published between</label>
-			<input type="hidden" name="marclist" value="biblioitems.publicationyear" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value=">=" />
-			<input type="text" name="value" size="6" maxlength="4" />
-			and
-			<input type="hidden" name="marclist" value="biblioitems.publicationyear" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="<=" />
-			<input type="text" name="value" size="6" maxlength="4" />
-		</p>
-		<p>
-			<label class="label20">Results per page</label>
-			<select name="resultsperpage" size="1">
-				<option value="20">20</option>
-				<option value="50">50</option>
-				<option value="100">100</option>
-			</select>
-		</p>
-		<p>
-			<label class="label20">Ordered by</label>
-			<select name="orderby" size="1">
-				<option value="biblio.title">Title</option>
-				<option value="biblio.author">Author</option>
-				<option value="biblioitems.dewey">Dewey</option>
-				<option value="biblioitems.publicationyear">Publication Year</option>
-				<option value="biblioitems.publishercode">Publisher</option>
-				<option value="biblio.timestamp">Acquisition date</option>
-			</select>
-			<select name="desc_or_asc" size="1">
-				<option value="ASC">Ascending</option>
-				<option value="DESC">Descending</option>
-			</select>
-		</p>		
-
-	</div>
-	<p>
-		<input type="submit" value="Start search" class="button catalogue" />
-		<input type="reset" value="Clear all" class="button catalogue" />
-	</p>
-	<div id="bloc60">
-		<h2>Hints</h2>
-		<h3>Title</h3>
-		<p>You can enter a complete or a part of a title. The search will also be done in subtitles and other title related fields</p>
-		<h3>Author</h3>
-		<p>You can enter a name or a surname. The search will also be done in additional authors and other author related fields (translator, illustrator...)</p>
-		<p>Remember that a title can concern a physical author (Victor Hugo) or a company, group, collective author (CNRS, Library of Congress)</p>
-		<h3>Branches</h3>
-		<p>Select a branch if you want to limit your search to items in a specific branch. By default the search is done on every branches of the library</p>
-		<h3>Partial search</h3>
-		<p>A search is done on every words you enter. Empty words are ignored. If you enter, for example "the two towers" in the title, the result list will contain all the books containing two AND tower in the title. The "the" will be discarded.</p>
-		<p>If you want to enter a partial word, add a * or a % at the end of the word. For example "two tower*" will retrieve "the two towers", "two white towers", "a tower and two cities"</p>
-		<h3>Dictionnary search</h3>
-		<p>if you clic on ... on the right of title/author/subject, you can search existing values in the library.</p>
-	</div>
-</form>
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-searchresults.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-searchresults.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-searchresults.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-searchresults.tmpl	6 Jan 2006 16:39:42 -0000	1.28
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,229 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-<!-- TMPL_IF NAME="searchdesc" -->
-    <p class="center">You searched on <b><!-- TMPL_VAR NAME="searchdesc" --></b>. <!-- TMPL_VAR NAME="total" --> results found</p>
-<!-- TMPL_ELSE -->
-	<!-- TMPL_IF name="searchnew" -->
-		<p class="center"><!-- TMPL_VAR name=itemtype --> acquired in the last <i><!-- TMPL_VAR name="duration" --></i> days. <!-- TMPL_VAR NAME="total" --> results found</p>
-	<!-- TMPL_ELSE -->
-		<p class="center">You did not specify any search criteria</p>
-	<!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-<table width="100%">
-<tr>
-<td width="70%">
-<!-- <p class="center"><!-- TMPL_VAR NAME="total" --> results found</p> -->
-	<div id="resultnumber">
-		<p class="center">
-			<!-- TMPL_IF NAME=displayprev -->
-				<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE="URL" -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search
-				<!-- TMPL_IF NAME="itemtypesstring">&itemtypesstring=<!-- TMPL_VAR NAME="itemtypesstring"><!-- /TMPL_IF --><!-- TMPL_IF NAME="avail" -->&avail=1<!-- /TMPL_IF -->">&lt;&lt;Previous</a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP NAME="numbers" -->
-				<!-- TMPL_IF NAME="highlight" --><!-- TMPL_VAR NAME="number" --><!-- TMPL_ELSE -->
-					<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME=startfrom -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search
-					<!-- TMPL_IF NAME="itemtypesstring">&itemtypesstring=<!-- TMPL_VAR NAME="itemtypesstring"><!-- /TMPL_IF --><!-- TMPL_IF NAME="avail" -->&avail=1<!-- /TMPL_IF -->"><!-- TMPL_VAR NAME="number" --></a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF NAME=displaynext -->
-				<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search
-				<!-- TMPL_IF NAME="itemtypesstring">&itemtypesstring=<!-- TMPL_VAR NAME="itemtypesstring"><!-- /TMPL_IF --><!-- TMPL_IF NAME="avail" -->&avail=1<!-- /TMPL_IF -->">Next &gt;&gt;</a>
-				<!-- /TMPL_IF -->
-		</p>
-		<p class="center">
-			<!-- TMPL_IF name=total -->
-				<p class="center">
-					Results <b><i><!-- TMPL_VAR NAME="from" --></i> through <i><!-- TMPL_VAR NAME="to" --></i> of <i><!-- TMPL_VAR NAME="total" --></i></b>
-				</p>
-			<!-- TMPL_ELSE -->
-				&nbsp; No results found.
-			<!-- /TMPL_IF -->
-		</p>
-	</div>
-<!-- Search Results Table -->
-<!-- TMPL_IF NAME="total" -->
-<form action="opac-searchresults.pl" method="get" name="myform">
-<input type="submit" class="button" value="Add Checked Items to Biblio Basket" onclick="addMultiple(); return false;"> <input type="reset" value="Clear All" class="button">
-	<table>
-		<tr>
-			<th colspan="2">Summary</th>
-			<th>Item type</th>
-			<th>Item Count</th>
-			<th>Location</th>
-			<th>&nbsp;</th>
-		</tr>
-		<!-- Actual Search Results -->
-		<!-- TMPL_LOOP NAME="results" -->
-			<tr>
-			<td<!-- TMPL_IF name="even" --> class="hilighted"<!-- /TMPL_IF -->><input type="checkbox" name="bibid" value="<!-- TMPL_VAR NAME="biblionumber" -->"></td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<p>
-						<!-- TMPL_IF name="BiblioDefaultViewmarc" -->
-							<b><a class="transparent" href="/cgi-bin/koha/opac-MARCdetail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" --></a></b>
-						<!-- TMPL_ELSE -->
-							<!-- TMPL_IF name="BiblioDefaultViewisbd" -->
-								<b><a class="transparent" href="/cgi-bin/koha/opac-ISBDdetail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" --></a></b>
-							<!-- TMPL_ELSE -->
-								<b><a class="transparent" href="/cgi-bin/koha/opac-detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" --></a></b>
-							<!-- /TMPL_IF -->
-						<!-- /TMPL_IF -->
-						<!-- TMPL_VAR name="volumeddesc" --><!-- TMPL_VAR name="volume" --> <!-- TMPL_VAR name="number" --> <!-- TMPL_VAR name="unititle" -->
-					</p>
-					<p><!-- TMPL_VAR NAME="author" -->
-						<!-- TMPL_IF name="publicationyear" --> - <!-- TMPL_VAR name="publicationyear" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="publishercode" -->- <!-- TMPL_VAR name="publishercode" --><!-- /TMPL_IF --> <!-- TMPL_IF name="seriestitle" -->(<!-- TMPL_VAR name="seriestitle" -->)<!-- /TMPL_IF name="seriestitle" -->
-						<!-- TMPL_IF name="place" --> ; <!-- TMPL_VAR name="place" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="pages" --> - <!-- TMPL_VAR name="pages" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="size" --> ; <!-- TMPL_VAR name="size" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="timestamp" --> <i>(modified on <!-- TMPL_VAR name="timestamp" -->)</i><!-- /TMPL_IF -->
-					</p>
-				</td>
-				<td align="center" <!-- TMPL_IF name="even" --> class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_IF name="imageurl" -->
-						<img src="/opac-tmpl/<!-- TMPL_VAR name="theme" -->/itemtypeimg/<!-- TMPL_VAR name="imageurl" -->" title="<!-- TMPL_VAR name="description" -->"
-					<!-- TMPL_ELSE -->
-						<!-- TMPL_VAR name="description" -->
-					<!-- /TMPL_IF -->
-				</td>
-				<td align="center" <!-- TMPL_IF name="even" --> class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_VAR name="totitem" -->
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_LOOP name="CN" -->
-						<p>
-							<!-- TMPL_VAR name="holdingbranch" --> <!-- TMPL_VAR name="location" -->
-							<!-- TMPL_IF name="date_due" -->
-								<i>(On Loan until <!-- TMPL_VAR name="date_due" -->)</i>
-							<!-- TMPL_ELSE -->
-								<!-- TMPL_IF name="itemcallnumber" -->
-									(<!-- TMPL_VAR name="itemcallnumber" -->)
-								<!-- /TMPL_IF -->
-							<!-- /TMPL_IF -->
-							<!-- TMPL_IF name="notforloan" -->
-								<i>(<!-- TMPL_VAR name="notforloan" -->)</i>
-							<!-- /TMPL_IF -->
-						</p>
-					<!-- /TMPL_LOOP -->
-					<!-- TMPL_IF name="onorder" --><p>On order</p><!-- /TMPL_IF -->
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_UNLESS NAME="norequests" -->
-						<a class="button" href="/cgi-bin/koha/opac-reserve.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">Request</a>
-					<!-- /TMPL_UNLESS -->
-				</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		<tr>
-			<th>&nbsp;</th>
-			<th colspan="2" align="left">
-				<!-- TMPL_IF NAME="displayprev" -->
-					<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE="URL" -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search">&lt;&lt;&lt;Previous</a>
-				<!-- TMPL_ELSE -->
-					&nbsp;
-				<!-- /TMPL_IF -->
-			</th>
-			<th colspan="3" align="right">
-				<!-- TMPL_IF NAME="displaynext" -->
-					<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search">Next &gt;&gt;&gt;</a>
-				<!-- TMPL_ELSE -->
-					&nbsp;
-				<!-- /TMPL_IF -->
-			</th>
-		</tr>
-	</table>
-</form>
-</td>
-<td width="30%">
-<!-- fancy writing --> Search options<br>
-
-<!-- TMPL_VAR NAME="searchdesc" -->
-<br>
-<!-- TMPL_VAR NAME="total" --> results found.
-<br>
-<form name="searchoptions" action="searchoptions.pl" method="get">
-<input type="hidden" name="nbstatementsori" value="<!-- TMPL_VAR NAME="nbstatements" ESCAPE=HTML-->">
-<input type="hidden" name="itemtypessearched" value="<!-- TMPL_VAR NAME="itemtypesstring" -->">
-<input type="hidden" name="orderbyori" value="<!-- TMPL_VAR NAME="orderby" -->">
-<!-- TMPL_LOOP NAME="searchdata" -->
-<input type="hidden" name="<!-- TMPL_VAR NAME="term" -->" value="<!-- TMPL_VAR NAME="val" ESCAPE=HTML -->">
-<!-- /TMPL_LOOP -->
-<input type="radio" name="searchtype" value="NewSearch"> New Search<br>
-<input type="radio" name="searchtype" value="SearchWithin" checked> Search Within Results<br>
-<br>
-Select a category<br>
-<input type="checkbox" name="allcategories"> All Categories <br>
-<!-- TMPL_VAR NAME="categorylist" -->
-<input type="text" name="keyword"><br>
-Search using keywords or subject.
-<input type="submit" value="Quick Search">
-<br>
-
-Filter by Subcategory<br>
-<input type="checkbox" name="allsubcategories"> All Subcategories <br>
-
-<select name="subcategorieswanted" size="4" multiple>
-
-<!-- TMPL_VAR NAME="subcategorylist" -->
-</select><br>
-
-Filter by Media type<br>
-<input type="checkbox" name="allmediatypes">All Media types<br>
-<select name="mediatypeswanted" size="4" multiple>
-<!-- TMPL_VAR NAME="mediatypelist" -->
-</select><br>
-
-Filter by Item type<br>
-<input type="checkbox" name="allitemtypes"> All Itemtypes <br>
-
-<select name="itemtypeswanted" size="6" multiple>
-
-<!-- TMPL_VAR NAME="itemtypelist" -->
-</select><br>
-
-Filter by Branch<br>
-<input type="checkbox" name="allbranches"> All Branches<br>
-<select name="brancheswanted" size="6" multiple>
-<!-- TMPL_VAR NAME="brancheslist" -->
-</select><br>
-
-<input type="checkbox" name="avail"
-<!-- TMPL_IF NAME="avail" --> checked
-<!-- /TMPL_IF -->
-> Only show titles available (Not on loan)<br>
-<input type="submit" value="Search">
-</form>
-</td>
-</table>
-
-	<p class="center">
-		Results <b><i><!-- TMPL_VAR NAME="from" --></i> through <i><!-- TMPL_VAR NAME="to" --></i> of <i><!-- TMPL_VAR NAME="total" --></i></b>
-	</p>
-
-	<div id="resultnumber">
-		<p class="center">
-			<!-- TMPL_IF NAME="displayprev" -->
-				<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE="URL" -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search
-				<!-- TMPL_IF NAME="itemtypesstring">&itemtypesstring=<!-- TMPL_VAR NAME="itemtypesstring"><!-- /TMPL_IF --><!-- TMPL_IF NAME="avail" -->&avail=1<!-- /TMPL_IF -->">&lt;&lt;Previous</a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP NAME="numbers" -->
-				<!-- TMPL_IF NAME="highlight" --><!-- TMPL_VAR NAME="number" --><!-- TMPL_ELSE -->
-					<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME=startfrom -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search
-					<!-- TMPL_IF NAME="itemtypesstring">&itemtypesstring=<!-- TMPL_VAR NAME="itemtypesstring"><!-- /TMPL_IF --><!-- TMPL_IF NAME="avail" -->&avail=1<!-- /TMPL_IF -->"><!-- TMPL_VAR NAME="number" --></a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF NAME="displaynext" -->
-				<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search
-				<!-- TMPL_IF NAME="itemtypesstring">&itemtypesstring=<!-- TMPL_VAR NAME="itemtypesstring"><!-- /TMPL_IF --><!-- TMPL_IF NAME="avail" -->&avail=1<!-- /TMPL_IF -->">Next &gt;&gt;</a>
-				<!-- /TMPL_IF -->
-		</p>
-	</div>
-
-<!-- TMPL_ELSE -->
-	<p class="center">	Sorry, there were no results </p>
-<!-- /TMPL_IF -->
-
-<p class="center">
-	Try another <a href="/cgi-bin/koha/opac-search.pl" class="button">Advanced search</a>
-</p>
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-sendbasket.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-sendbasket.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-sendbasket.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-sendbasket.tmpl	4 May 2005 08:58:32 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-<SUBJECT>
-Your biblio basket
-<END_SUBJECT>
-
-<HEADER>
-Hi,
-Here is the biblio basket sent by <!-- TMPL_VAR name="email_sender" -->
-<END_HEADER>
-
-<FILENAME>
-basket.txt
-<END_FILENAME>
-
-<MESSAGE>
----------------------------------------------
-<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" --><!-- TMPL_VAR NAME="title" --> <!-- TMPL_IF name="isbn" -->
-ISBN:		<!-- TMPL_VAR NAME="ISBN" --><!-- /TMPL_IF --><!-- TMPL_IF name="subtitle" -->
-Subtitle:		<!-- TMPL_VAR NAME="subtitle" --><!-- /TMPL_IF --><!-- TMPL_IF name="author" -->
-Author:	<!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --><!-- TMPL_IF name="additional" -->
-Additional authors:		<!-- TMPL_VAR NAME="additional" --><!-- /TMPL_IF --><!-- TMPL_IF name="publishercode" -->
-Published by:		<!-- TMPL_VAR NAME="publishercode" --><!-- /TMPL_IF --><!-- TMPL_IF name="publicationyear" --> in <!-- /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" --><!-- TMPL_IF name="collection" -->
-Collection:		<!-- TMPL_VAR NAME="seriestitle" --><!-- /TMPL_IF --><!-- TMPL_IF name="subject" -->
-Subject:		<!-- TMPL_VAR NAME="subject" --><!-- /TMPL_IF --><!-- TMPL_IF name="copyrightdate" -->
-Copyright year:		<!-- TMPL_VAR NAME="copyrightdate" --><!-- /TMPL_IF --><!-- TMPL_IF name="notes" -->
-Notes :		<!-- TMPL_VAR NAME="notes" --><!-- /TMPL_IF --><!-- TMPL_IF name="unititle" -->
-Unified title:		<!-- TMPL_VAR NAME="unititle" --><!-- /TMPL_IF --><!-- TMPL_IF name="serial" -->
-Serial:		<!-- TMPL_VAR NAME="serial" --><!-- /TMPL_IF --><!-- TMPL_IF name="dewey" -->
-Dewey:		<!-- TMPL_VAR name="dewey" --><!-- /TMPL_IF --><!-- TMPL_IF name="classification" -->
-Classification:		<!-- TMPL_VAR name="classification" --><!-- /TMPL_IF --><!-- TMPL_IF name="lccn" -->
-LCCN:		<!-- TMPL_VAR name="lccn" --><!-- /TMPL_IF --><!-- TMPL_IF name="url" -->
-URL :		<!-- TMPL_VAR NAME="url" --><!-- /TMPL_IF -->
-Items :		<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
-				<!-- TMPL_VAR NAME="branchname" --> <!-- TMPL_VAR NAME="location" --> <!-- TMPL_IF name="itemcallnumber" -->(<!-- TMPL_VAR NAME="itemcallnumber" -->)<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="barcode" -->
-<!-- /TMPL_LOOP -->
----------------------------------------------
-<!-- /TMPL_LOOP -->
-<END_MESSAGE>

Index: koha-tmpl/opac-tmpl/css/en/opac-sendbasketform.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-sendbasketform.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-sendbasketform.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-sendbasketform.tmpl	4 May 2005 08:58:32 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-basket-top.inc" -->
-
-<div id="mainbloc" style="padding-bottom:20px;margin-top:10px;margin-bottom:10px;">
-<h1>Sending the basket</h1>
-<!-- TMPL_IF NAME="email_add" -->
-	<!-- TMPL_IF NAME="SENT" -->
-	<p>The basket was sent to: <!-- TMPL_VAR NAME="email_add" --></p>
-	<!-- TMPL_ELSE -->
-	<p>Problem sending the basket...</p>
-	<!-- /TMPL_IF -->
-<!-- TMPL_ELSE -->
-<form action="<!-- TMPL_VAR NAME="url" -->" method="post">
-	<p><label class="label100">mail sent by</label><input name="email_sender" size="25" /></p>
-	<p><label class="label100">E-mail address</label><input name="email_add" size="25" /></p>
-	<p><label>&nbsp;</label><input type="submit" value="Send" class="button" /></p>
-	<input type='hidden' name="bib_list" value="<!-- TMPL_VAR NAME="bib_list" -->" />
-</form>
-<!-- /TMPL_IF -->
-</div>
-<div id="bottombloc">
-	<p><a href="javascript:this.close()" class="button">Close</a></p>
-</div>
-<!-- TMPL_INCLUDE NAME="opac-basket-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-serial-issues.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-serial-issues.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-serial-issues.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-serial-issues.tmpl	4 Aug 2005 08:54:55 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,114 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<!--------------------------MAIN BODY OF PAGE-------------------------->
-<div id="mainbloc">
-	<h1 class="catalogue">Issues for a subscription</h1>
-	<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button">Back to biblio</a>
-	<a class="button" href="opac-serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->&selectview=full">Complete view</a>
-
-	<!-- TMPL_LOOP name="subscription_LOOP" -->
-	<div id="bloc60">
-		<h2 class="catalogue">Subscription information for <!-- TMPL_VAR name="bibliotitle" --></h2>
-		<p>It began on <b><!-- TMPL_VAR name="histstartdate" --></b> and is issued every
-		<b>
-		<!--TMPL_IF name="periodicity1" -->
-				day
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity2" -->
-				week
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity3" -->
-				2 weeks
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity4" -->
-				3 weeks
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity5" -->
-				month
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity6" -->
-				2 months
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity7" -->
-				3 months
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity8" -->
-				quarter
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity9" -->
-				2 quarters
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity10" -->
-				year
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity11" -->
-				2 years
-		<!-- /TMPL_IF -->
-		</b>
-		<!--TMPL_IF name="arrival1" -->
-			on <b>monday</b>
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival2" -->
-			on <b>tuesday</b>
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival3" -->
-			on <b>wednesday</b>
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival4" -->
-			on <b>thursday</b>
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival5" -->
-			on <b>friday</b>
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival6" -->
-			on <b>saturday</b>
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival7" -->
-			on <b>sunday</b>
-		<!-- /TMPL_IF -->
-		for <b>
-			<!-- TMPL_IF name="numberlength" --><!-- TMPL_VAR name="numberlength" --> issues<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="weeklength" --><!-- TMPL_VAR name="weeklength" --> weeks<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="monthlength" --><!-- TMPL_VAR name="monthlength" --> months<!-- /TMPL_IF -->
-			</b>
-		</p>
-		<p>Last renewal of subscription was <b><!-- TMPl_VAR name="startdate" --></b></p>
-		<!-- TMPL_IF name="enddate" --><p><b>This subscription is now ended. The last issue was recieved on <!-- TMPL_VAR name="enddate" --></b></p><!-- /TMPL_IF name="enddate" -->
-	<!--TMPL_UNLESS Name=fullinfo -->
-		<p><!-- TMPL_VAR name="notes" --></p>
-		<p>
-			<!-- TMPL_IF name="letter" -->
-				<!-- TMPL_IF name="hasalert" -->
-					<a href="opac-alert-subscribe.pl?op=cancel&amp;externalid=<!-- TMPL_VAR name="subscriptionid" -->&amp;alerttype=issue&amp;biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button" title="Cancel mail alert when a new issue arrives for this subscription">
-						Cancel alert
-					</a>
-				<!-- TMPL_ELSE -->
-					<a href="opac-alert-subscribe.pl?externalid=<!-- TMPL_VAR name="subscriptionid" -->&amp;alerttype=issue&amp;biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button" title="be warned by mail when a new issue arrives for this subscription">
-						Stay in touch
-					</a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_IF -->
-		</p>
-		<!-- TMPL_IF name="opacnote" -->
-			<h2 class="catalogue">Issues summary</h2>
-			<p>
-				<!-- TMPL_VAR name="opacnote" -->
-			</p>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="recievedlist" -->
-			<h2 class="catalogue">Recieved issues</h2>
-			<p>
-				<!-- TMPL_VAR name="recievedlist" -->
-			</p>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="missinglist" -->
-			<h2 class="catalogue">Missing issues</h2>
-			<p>
-				<!-- TMPL_VAR name="missinglist" -->
-			</p>
-		<!-- /TMPL_IF -->
-	</div>
-	<!-- /TMPL_UNLESS -->
-<!-- /TMPL_LOOP -->
-</div>
-
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-shelves.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-shelves.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-shelves.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-shelves.tmpl	24 Aug 2005 17:54:51 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,189 +0,0 @@
-<!-- TMPL_INCLUDE Name="opac-top.inc" -->
-<div id="mainbloc">
-<!-- TMPL_IF Name="viewshelf" -->
-	<form action="/cgi-bin/koha/opac-shelves.pl" method="get">
-		<h1><!-- TMPL_VAR NAME="shelfname" --></h1>
-
-		<div>
-		<h2>Shelf content</h2>
-			<table class="small">
-				<tr colspan="4">
-					<th><!-- TMPL_IF name="manageshelf" -->Delete<!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></th>
-					<th>Barcode</th>
-					<th>Title</th>
-					<th>Author</th>
-				</tr>
-				<!-- TMPL_LOOP Name="itemsloop" -->
-					<tr>
-						<td><!-- TMPL_IF name="manageshelf" --><input type="checkbox" name="REM-<!-- TMPL_VAR NAME="itemnumber" -->"><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
-						<td><!-- TMPL_VAR NAME="barcode" --></td>
-						<td><a class="transparent" href="opac-MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a></td>
-						<td><!-- TMPL_VAR NAME="author" --></td>
-					</tr>
-				<!-- /TMPL_LOOP -->
-			</table>
-			<input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->">
-			<input type="hidden" name="modifyshelfcontents" value="1">
-			<input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->">
-			<!-- TMPL_IF name="manageshelf" -->
-				<input type="submit" value="Remove Selected Items" class="button">
-			<!-- /TMPL_IF -->
-			<a href="opac-shelves.pl" class="button">Shelf list</a>
-		</div>
-	</form>
-
-	<!-- TMPL_IF name="manageshelf" -->
-	<div class="bloc20">
-		<form action="/cgi-bin/koha/opac-shelves.pl" method="get">
-		<h2>Add a book by barcode</h2>
-			<input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->">
-			<input type="hidden" name="modifyshelfcontents" value="1">
-			<input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->">
-			<input name="addbarcode">
-			<input type="hidden" name="modifyshelfcontents" value="1">
-			<input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->">
-			<input type="submit" value="Save" class="button">
-		</form>
-	</div>
-	<!-- /TMPL_IF -->
-<!-- TMPL_ELSE -->
-	<!-- TMPL_IF Name="shelves" -->
-		<h1>Bookshelves</h1>
-		<!-- TMPL_IF Name="status1" -->
-			<p class="problem"><!-- TMPL_VAR NAME="string1" --><p>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_LOOP Name="paramsloop" -->
-			<!-- TMPL_IF Name="status" -->
-				<p class="problem"><!-- TMPL_VAR NAME="string" --><p>
-			<!-- /TMPL_IF -->
-		<!-- /TMPL_LOOP -->
-		<div class="bloc20">
-					<h2>Select Shelves to Delete</h2>
-					<form action="/cgi-bin/koha/opac-shelves.pl" method="post">
-					<input type="hidden" name="shelves" value="1">
-						<!-- TMPL_LOOP Name="shelvesloop" -->
-						<!-- TMPL_IF name="canmanage" -->
-						<p>
-							<label>
-								<input type="checkbox" name="DEL-<!-- TMPL_VAR NAME="shelf" -->">
-							</label>
-								<a href="opac-shelves.pl?viewshelf=<!-- TMPL_VAR name="shelf" -->"><!-- TMPL_VAR NAME="shelfname" --></a> (<!-- TMPL_VAR NAME="shelfbookcount" --> item(s))
-						</p>
-						<!-- /TMPL_IF -->
-						<!-- /TMPL_LOOP -->
-					<p>
-						<input type="submit" value="Delete Shelves" class="button">
-					</p>
-					</form>
-		</div>
-		<div id="bloc60">
-			<form action="/cgi-bin/koha/opac-shelves.pl" method="post">
-				<input type="hidden" name="shelves" value="1">
-				<h2>Add Shelf</h2>
-				<p><label>Name</label><input type="text" name="addshelf" size="25"></p>
-				<p><label>Owner</label><input type="hidden" name="owner" value="<!-- TMPL_VAR NAME="loggedinuser" -->"><!-- TMPL_VAR NAME="loggedinusername" --></p>
-				<p><label>Category</label>
-					<select name="category">
-						<option value="1">Private</option>
-						<option value="2">Public</option>
-						<option value="3">Free</option>
-					</select>
-				</p>
-				<ul> <li>a private bookshelf is managed by you &amp; can be seen only by you.</li>
-					<li> A public can be seen by everybody, but managed only by you.</li>
-					<li> A free can be managed by any user.</li>
-				</ul>
-				<p>
-					<input type="submit" value="Add New Shelf" class="button">
-					<a href="opac-shelves.pl" class="button">back to shelf list</a>
-				</p>
-
-			</form>
-		</div>
-	<!-- TMPL_ELSE -->
-		<div class="bloc60">
-			<h2>Shelf list</h2>
-			<table class="small">
-				<tr>
-					<th>Shelf name</th>
-					<th>Category</th>
-					<th>Content size</th>
-					<th>Modify</th>
-				</tr>
-				<!-- TMPL_LOOP Name="shelvesloop" -->
-				<!-- TMPL_IF NAME="color" --><tr class="hilighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-					<td>
-						<a class="transparent" href="opac-shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelf" -->">
-							<!-- TMPL_VAR NAME="shelfname" -->
-						</a>
-					</td>
-					<td>
-						<!-- TMPL_IF NAME="category1" -->
-							Private
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF NAME="category2" -->
-							Public
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF NAME="category3" -->
-							Free
-						<!-- /TMPL_IF -->
-					</td>
-					<td>
-						<!-- TMPL_VAR NAME="shelfbookcount" --> item(s)
-					</td>
-					
-						<td>
-							<!-- TMPL_IF name="mine" --><a href="opac-shelves.pl?op=modif&shelf=<!-- TMPL_VAR NAME="shelf" -->" class="button">Modify</a>
-							<!-- TMPL_VAR name="surname" --><!-- TMPL_VAR name="firstname" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
-						</td>
-					
-				</tr>
-				<!-- /TMPL_LOOP -->
-			</table>
-		</div>
-		<div class="bloc20">
-			<a href="opac-shelves.pl?shelves=1" class="button">Add or Remove Book Shelves</a>
-		</div>
-	<!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="edit" -->
-	<div class="bloc20">
-		<form action="/cgi-bin/koha/opac-shelves.pl" method="post">
-			<input type="hidden" name="op" value="modifsave">
-			<h2>Modify shelf</h2>
-			<input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR name="shelfnumber" -->">
-			<p><label>Name</label><input type="text" name="shelfname" size="25" value="<!-- TMPL_VAR name="shelfname"-->"></p>
-			<p><label>Owner</label><input type="hidden" name="owner" value="<!-- TMPL_VAR NAME="loggedinuser" -->"><!-- TMPL_VAR NAME="loggedinusername" --></p>
-			<p><label>Category</label>
-				<select name="category">
-					<!-- TMPL_IF name="category1" -->
-						<option value="1" selected>Private</option>
-					<!-- TMPL_ELSE -->
-						<option value="1">Private</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="category2" -->
-						<option value="2" selected>Public</option>
-					<!-- TMPL_ELSE -->
-						<option value="2">Public</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="category3" -->
-						<option value="3" selected>Free</option>
-					<!-- TMPL_ELSE -->
-						<option value="3">Free</option>
-					<!-- /TMPL_IF -->
-				</select>
-			</p>
-			<p> <li>a private bookshelf is managed by you &amp; can be seen only by you.</li>
-				<li> A public can be seen by everybody, but managed only by you.</li>
-				<li> A free can be managed by any user.</li>
-			</p>
-			<p>
-				<input type="submit" value="Save" class="button">
-			</p>
-
-		</form>
-	</div>
-<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE Name="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-suggestions.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-suggestions.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-suggestions.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-suggestions.tmpl	24 Aug 2005 17:54:51 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,156 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-<!-- TMPL_IF name="op_add" -->
-	<h1>Enter a new suggestion</h1>
-	<p>Fill this form to suggest the library a new acquisition. You will be mailed when the library treats you suggestion</p>
-	<p>No fields are mandatory. Fill whatever you know. The "Note" field can be used for whatever you want</p>
-	<form action="/cgi-bin/koha/opac-suggestions.pl" method="post">
-		<input type="hidden" name="op" value="add_confirm">
-		<p><label for="stitle">Title</label><input type="text" name="title" id="stitle" size="60" maxlength="80"></p>
-		<p><label for="author">Author</label><input type="text" name="author" id="author" size="60" maxlength="80"></p>
-		<p><label for="copyrightdate">Copyright date</label><input type="text" name="copyrightdate" id="copyrightdate" size="5" maxlength="4"></p>
-		<p><label for="publishercode">Publisher</label><input type="text" name="publishercode" id="publishercode" size="60" maxlength="80"></p>
-		<p><label for="volumedesc">Volume</label><input type="text" name="volumedesc" id="volumedesc" size="60" maxlength="80"></p>
-		<p><label for="publicationyear">Publication year</label><input type="text" name="publicationyear" id="publicationyear" size="5" maxlength="4"></p>
-		<p><label for="place">Publication place</label><input type="text" name="place" id="place" size="60" maxlength="80"></p>
-		<p><label for="isbn">ISBN/ISSN</label><input type="text" name="isbn" id="isbn" size="14" maxlength="10"></p>
-		<p><label for="note">Note</label><textarea name="note" id="note" rows="10" cols="60"></textarea></p>
-		<p><label>&nbsp;</label><input type="submit" value="Send suggestion to the library staff" class="button"></p>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="op_else" -->
-	<h1>Suggestions</h1>
-	<table>
-		<tr>
-			<th>&nbsp;</th>
-			<th>Title</th>
-			<th>Author</th>
-			<th>&copy;</th>
-			<th>Publisher</th>
-			<th>Status</th>
-			<th>Suggested by</th>
-			<th>Managed by</th>
-			<th>Note</th>
-		</tr>
-		<tr>
-			<form action="/cgi-bin/koha/opac-suggestions.pl" method="get">
-				<th>
-					Filter on
-				</th>
-				<th>
-					<input type="text" name="title" value="<!-- TMPL_VAR name="title"-->">
-				</th>
-				<th>
-					<input type="text" name="author" value="<!-- TMPL_VAR name="author" -->">
-				</th>
-				<th>
-					&nbsp;
-				</th>
-				<th>
-					<input type="text" name="publishercode" value="<!-- TMPL_VAR name="publishercode"-->">
-				</th>
-				<th>
-					<select name="status">
-						<option value="">Any</option>
-						<!-- TMPL_IF name="ASKED" -->
-							<option value="ASKED" selected>Asked</option>
-						<!-- TMPL_ELSE -->
-							<option value="ASKED">Asked</option>
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF name="ACCEPTED" -->
-							<option value="ACCEPTED" selected>Accepted</option>
-						<!-- TMPL_ELSE -->
-							<option value="ACCEPTED">Accepted</option>
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF name="ORDERED" -->
-							<option value="ORDERED" selected>Ordered</option>
-						<!-- TMPL_ELSE -->
-							<option value="ORDERED">Ordered</option>
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF name="REJECTED" -->
-							<option value="REJECTED" selected>Rejected</option>
-						<!-- TMPL_ELSE -->
-							<option value="REJECTED">Rejected</option>
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF name="AVAILABLE" -->
-							<option value="AVAILABLE" selected>Available</option>
-						<!-- TMPL_ELSE -->
-							<option value="AVAILABLE">Available</option>
-						<!-- /TMPL_IF -->
-					</select>
-				</th>
-				<th>
-					<select name="suggestedbyme">
-						<!-- TMPL_IF NAME="suggestedbyme" --><option value="1" selected="selected"><!-- TMPL_ELSE --><option value="1"><!-- /TMPL_IF -->Me</option>
-						<!-- TMPL_UNLESS name="suggestedbyme" --><option value="0" selected="selected"><!-- TMPL_ELSE --><option value="0"><!-- /TMPL_UNLESS -->Anybody</option>
-					</select>
-				</th>
-				<th>
-					&nbsp;
-				</th>
-				<th>
-					<input type="submit" class="button" value="Set Filter">
-				</th>
-			</form>
-		</tr>
-		<form action="/cgi-bin/koha/opac-suggestions.pl" method="get">
-			<input type="hidden" name="op" value="delete_confirm">
-		<!-- TMPL_LOOP NAME="suggestions_loop" -->
-			<!-- TMPL_IF NAME="even" --><tr class="hilighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-				<td>
-					<input type="checkbox" name="delete_field" value="<!--TMPL_VAR name="suggestionid" -->">
-				</td>
-				<td>
-					<!-- TMPL_VAR NAME="title" -->
-				</td>
-				<td>
-					<!-- TMPL_VAR NAME="author" -->
-				</td>
-				<td align="center">
-					<!-- TMPL_VAR NAME="copyrightdate" -->
-				</td>
-				<td align="center">
-					<!-- TMPL_VAR name="publishercode" -->
-				</td>
-				<td>
-					<!-- TMPL_IF name="ASKED" -->Asked<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="ACCEPTED" -->Accepted, will be ordered soon<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="ORDERED" -->Ordered by the library<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="REJECTED" -->Suggestion rejected : won't be buy<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="AVAILABLE" -->Received by the library<!-- /TMPL_IF -->
-				</td>
-				<td>
-					<!-- TMPL_VAR name="surnamesuggestedby" --><!-- TMPL_IF name="firstnamesuggestedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR name="firstnamesuggestedby" -->
-				</td>
-				<td>
-					<!-- TMPL_VAR name="usermanagedby" --><!-- TMPL_IF name="firstnamemanagedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR name="firstnamemanagedby" -->
-				</td>
-				<td>
-					<!-- TMPL_VAR name="note" -->
-				</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		<tr>
-			<td>
-				<input type="submit" class="button" value="Delete">
-			</td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-		</tr>
-		</form>
-	</table>
-	<form>
-		<input type="hidden" name="op" value="add">
-		<input type="submit" class="button" value="Enter a new suggestion">
-	</form>
-	<p>Note : if you ask suggestion done by anybody, the result will contain only new suggestions. Suggestions treated by a librarian will not be shown.</p>
-<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/opac-user.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-user.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-user.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-user.tmpl	6 Jan 2006 16:39:42 -0000	1.13
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,140 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-<!-- TMPL_LOOP NAME="BORROWER_INFO" -->
-	<div class="bloc20">
-		<h2>Are our records correct?</h2>
-		<p>Library Card: <!-- TMPL_VAR NAME="cardnumber" --> </p>
-		<p><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->
-		<p>Work address: <!-- TMPL_VAR NAME="streetaddress" -->, <!-- TMPL_VAR NAME="city" --></p>
-		<p>Home address: <!-- TMPL_VAR name='physstreet' --></p>
-		<p><!-- TMPL_IF name="phone" -->Home phone: <!-- TMPL_VAR NAME="phone" --><!-- /TMPL_IF --></p>
-		<p><!-- TMPL_IF name="faxnumber" -->Fax: <!-- TMPL_VAR NAME="faxnumber" --><!-- /TMPL_IF --></p>
-		<p><!-- TMPL_VAR NAME="emailaddress" --></p>
-		<p><a href="/cgi-bin/koha/opac-userupdate.pl" class="button">Update Record</a></p>
-		<!-- TMPL_IF name="OpacPasswordChange" -->
-			<p><a href="/cgi-bin/koha/opac-passwd.pl" class="button">Change your password</a></p>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="textmessaging"-->
-			<h2>Message from the library</h2>
-			<!-- TMPL_VAR name="textmessaging" -->
-		<!-- /TMPL_IF -->
-
-	</div>
-	<!-- TMPL_IF NAME="amountoverfive" -->
-	<div class="bloc20">
-		<h2>You have outstanding charges and fines of <!-- TMPL_VAR NAME="amountoutstanding" --></b>
-		<a href="/cgi-bin/koha/opac-account.pl" class="button">View Accounts</a>
-	</div>
-	<!-- /TMPL_IF -->
-
-	<!-- TMPL_IF NAME="amountoverzero" -->
-	<div class="bloc20">
-		<h2>You have outstanding charges and fines of <!-- TMPL_VAR NAME="amountoutstanding" --></h2>
-		<a href="/cgi-bin/koha/opac-account.pl" class="button">View Accounts</a>
-	</div>
-	<!-- /TMPL_IF -->
-
-	<!-- TMPL_IF NAME"amountlessthanzero" -->
-	<div class="bloc20">
-		<p>You have a credit of <!-- TMPL_VAR NAME="amountoutstanding" --></p>
-		<a href="/cgi-bin/koha/opac-account.pl" class="button">View Accounts</a>
-	</div>
-	<!-- /TMPL_IF -->
-
-<!-- /TMPL_LOOP -->
-
-	<!-- TMPL_IF NAME="waiting_count" -->
-	<div class="bloc60">
-		<h2>You have reserved items waiting:</h2>
-		<ul>
-			<!-- TMPL_LOOP NAME="WAITING" -->
-				<li><!-- TMPL_VAR NAME="btitle" -->, pick up at: <b><!-- TMPL_VAR NAME="branch" --></b></li>
-			<!-- /TMPL_LOOP -->
-		</ul>
-	</div>
-	<!-- /TMPL_IF -->
-
-	<div class="bloc60">
-		<!-- TMPL_IF NAME="issues_count" -->
-			<h2>You have <b><!-- TMPL_VAR NAME="issues_count" --></b> items currently issued.</h2>
-			<table>
-				<tr>
-					<th>Title</th>
-					<th>Author</th>
-					<th>Due date</th>
-					<th>Itemtype</th>
-					<th>Barcode</th>
-					<th>Charges</th>
-					<th>Renewable</th>
-				</tr>
-				<!-- TMPL_LOOP NAME="ISSUES" -->
-					<!-- TMPL_IF name="overdue"-->
-						<tr>
-							<td><!-- TMPL_VAR NAME="title" --></td>
-							<td><!-- TMPL_VAR NAME="author" --></td>
-							<td><b>OVERDUE <!-- TMPL_VAR NAME="date_due" --></b></td>
-							<td><!-- TMPL_VAR NAME="itemtype" --></td>
-							<td><!-- TMPL_VAR NAME="barcode" --></td>
-							<td><!-- TMPL_IF NAME="charges" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-							<td><!-- TMPL_IF NAME="status" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-						</tr>
-					<!-- TMPL_ELSE -->
-						<tr>
-							<td><!-- TMPL_VAR NAME="title" --></td>
-							<td><!-- TMPL_VAR NAME="author" --></td>
-							<td><!-- TMPL_VAR NAME="date_due" --></td>
-							<td><!-- TMPL_VAR NAME="itemtype" --></td>
-							<td><!-- TMPL_VAR NAME="barcode" --></td>
-							<td><!-- TMPL_IF NAME="charges" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-							<td><!-- TMPL_IF NAME="status" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
-						</tr>
-					<!-- /TMPL_IF -->
-				<!-- /TMPL_LOOP -->
-			</table>
-		<!-- TMPL_ELSE -->
-			<h2>You have no items on issue.</h2>
-		<!-- /TMPL_IF -->
-	</div>
-
-	<!-- TMPL_IF NAME="reserves_count" -->
-	<div class="bloc60">
-		<h2>You have <b><!-- TMPL_VAR NAME="reserves_count" --></b> items currently reserved.</h2>
-		<table cellspacing="0" align="center">
-			<tr>
-				<th>Title</th>
-				<th>Author</th>
-				<th>Reserve date</th>
-			</tr>
-			<!-- TMPL_LOOP NAME="RESERVES" -->
-				<tr valign="top">
-				<td><!-- TMPL_VAR NAME="btitle" --></td>
-				<td><!-- TMPL_VAR NAME="author" --></td>
-				<td><!-- TMPL_VAR NAME="reservedate" --></td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-		<br />
-	</div>
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF name="alertloop" -->
-		<div class="bloc60">
-		<h2 class="members">Alert subscriptions</h2>
-			<table>
-			<tr>
-				<th>Type</th>
-				<th>on</th>
-			</tr>
-
-			<!-- TMPL_LOOP NAME="alertloop" -->
-				<tr>
-					<td><!-- TMPL_IF name="issue" -->Serial issue<!-- /TMPL_IF --></td>
-					<td><!-- TMPL_VAR name="relatedto" --></td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-			</table>
-		</div>
-	<!-- /TMPL_IF -->
-
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
-

Index: koha-tmpl/opac-tmpl/css/en/opac-userupdate.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/opac-userupdate.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/opac-userupdate.tmpl
--- koha-tmpl/opac-tmpl/css/en/opac-userupdate.tmpl	20 Jun 2005 14:25:01 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-<!-- TMPL_INCLUDE name="opac-top.inc" -->
-
-<div id="mainbloc">
-<h2>Member information change</h2>
-<p><i>Please change what's needed. An email will be sent to the library.<br />
-Your changes won't appear until the library has validated them.</i></p>
-
-<!-- TMPL_LOOP name="BORROWER_INFO" -->
-<form action="/cgi-bin/koha/opac-userupdate.pl" method="get">
-	<p><label>Surname</label><input type="text"  size="35" value="<!-- TMPL_VAR name='surname' -->"  name="surname" /></p>
-	<p><label>First name</label><input type="text"  size="35" value="<!-- TMPL_VAR name='firstname' -->"  name="firstname" /></p>
-	<p><label>Home address</label><input type="text"  size="35" value="<!-- TMPL_VAR name='physstreet' -->"  name="physstreet" /></p>
-	<p><label>Work address</label><input type="text"  size="35" value="<!-- TMPL_VAR name='streetaddress' -->"  name="streetaddress" /></p>
-	<p><label>City</label><input type="text"  size="35" value="<!-- TMPL_VAR name='city' -->"  name="city" /></p>
-	<p><label>Home phone</label><input type="text"  size="35" value="<!-- TMPL_VAR name='phone' -->"  name="phone" /></p>
-	<p><label>Work/Fax phone</label><input type="text"  size="35" value="<!-- TMPL_VAR name='faxnumber' -->"  name="faxnumber" /></p>
-	<p><label>Email</label><input type="text"  size="35" value="<!-- TMPL_VAR name='emailaddress' -->"  name="emailaddress" /></p>
-	<p><label>Notes</label><input type="text"  size="35" value="<!-- TMPL_VAR name='title' -->"  name="title" /></p>
-	<p><input type="submit" value="Submit" class="button" /></p>
-</form>
-</div>
-<!-- /TMPL_LOOP -->
-<!-- TMPL_INCLUDE name="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/en/subject.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/en/subject.tmpl
diff -N koha-tmpl/opac-tmpl/css/en/subject.tmpl
--- koha-tmpl/opac-tmpl/css/en/subject.tmpl	2 Sep 2004 16:30:57 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,42 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-
-<center>
-
-<table border=0 cellspacing=0 cellpadding=2>
-<tr bgcolor="#99cccc" background="<!-- TMPL_VAR NAME="themelang" -->/images/background-opac.gif">
-<th>Subject</th></tr>
-<!-- TMPL_LOOP NAME=SEARCH_RESULTS -->
-  <tr>
-  <td><a href="./dosearch.pl?&subjectitems=<!-- TMPL_VAR NAME=subject2 ESCAPE=URL -->"><!-- TMPL_VAR NAME=subject --></a></td>
-  </tr>
-<!-- /TMPL_LOOP -->
-<tr bgcolor="#99cccc" background="<!-- TMPL_VAR NAME="themelang" -->/images/background-opac.gif"><td colspan=4>
-&nbsp;</td></tr>
-</table>
-<br>
-Results <!-- TMPL_VAR NAME="startfrom" --> through <!-- TMPL_VAR NAME="endat" --> of <!-- TMPL_VAR NAME="numrecords" --> records.
-<br>
-    <!-- TMPL_IF NAME="displayprev" -->
-		<a href="./dosearch.pl?startfrom=<!-- TMPL_VAR NAME="prevstartfrom" --><!-- TMPL_LOOP NAME="FORMINPUTS" -->&<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE=URL --><!-- /TMPL_LOOP -->">
-			<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border=0>
-		</a>
-    <!-- TMPL_ELSE -->
-		<img src=<!-- TMPL_VAR NAME="themelang" -->/images/numbers/placeholder.gif border=0>
-    <!-- /TMPL_IF -->
-    <!-- TMPL_LOOP NAME="numbers" -->
-	<!-- TMPL_IF NAME="highlight" -->
-	    <img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME=number -->-highlight.gif"> 
-	<!-- TMPL_ELSE -->
-	    <a href="./dosearch.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="FORMINPUTS" -->&<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE=URL --><!-- /TMPL_LOOP -->"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME=number -->.gif" border=0></a> 
-	<!-- /TMPL_IF -->
-    <!-- /TMPL_LOOP -->
-    <!-- TMPL_IF NAME="displaynext" -->
-	<a href="./dosearch.pl?startfrom=<!-- TMPL_VAR NAME="nextstartfrom" --><!-- TMPL_LOOP NAME="FORMINPUTS" -->&<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE=URL --><!-- /TMPL_LOOP -->"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border=0></a>
-    <!-- TMPL_ELSE -->
-	<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/placeholder.gif" border=0>
-    <!-- /TMPL_IF -->
-<hr>
-
-
-
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/images/front-arrow.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/images/front-arrow.gif
diff -N koha-tmpl/opac-tmpl/css/fr/images/front-arrow.gif
Binary files /tmp/cvsLaqxXa and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/fr/images/front-background-med.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/images/front-background-med.gif
diff -N koha-tmpl/opac-tmpl/css/fr/images/front-background-med.gif
Binary files /tmp/cvsmXD5ke and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/fr/images/front-background-small.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/images/front-background-small.gif
diff -N koha-tmpl/opac-tmpl/css/fr/images/front-background-small.gif
Binary files /tmp/cvsPRYWRc and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/fr/includes/basket.js
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/includes/basket.js
diff -N koha-tmpl/opac-tmpl/css/fr/includes/basket.js
--- koha-tmpl/opac-tmpl/css/fr/includes/basket.js	1 Mar 2005 13:41:07 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,365 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// BASIC FUNCTIONS FOR COOKIE MANGEMENT //
-//////////////////////////////////////////////////////////////////////////////
-
-var CGIBIN = "/cgi-bin/koha/";
-
-
-var nameCookie = "bib_list";
-var valCookie = readCookie(nameCookie);
-	
-if(valCookie){
-	var arrayRecords = valCookie.split("/");
-	if(arrayRecords.length > 0){
-		var basketcount = " ("+(arrayRecords.length-1)+")";
-	} else {
-		var basketcount = "";
-	}
-} else {
-		var basketcount = "";
-}
-
-function writeCookie(name, val, wd) {
-	if (wd) {
-		parent.opener.document.cookie = name + "=" + val;
-	}
-	else {
-		parent.document.cookie = name + "=" + val;
-	}
-}
-
-function readCookieValue (str, val_beg) {
-	var val_end = str.indexOf(";", val_end);
-	if (val_end == -1)
-		val_end = str.length;
-	return str.substring(val_beg, val_end);
-}
-
-function readCookie(name, wd) {
-	var str_name = name + "=";
-	var str_len = str_name.length;
-	var str_cookie = "";
-	if (wd) {
-		str_cookie = parent.opener.document.cookie;
-	}
-	else {
-		str_cookie = parent.document.cookie;
-	}
-	var coo_len = str_cookie.length;
-	var i = 0;
-
-	while (i < coo_len) {
-		var j = i + str_len;
-		if (str_cookie.substring(i, j) == str_name)
-			return readCookieValue(str_cookie, j);
-		i = str_cookie.indexOf(" ", i) + 1;
-		if (i == 0)
-			break;
-	}
-
-	return null;
-}
-
-function delCookie(name) {
-	var exp = new Date();
-	exp.setTime(exp.getTime()-1);
-	parent.opener.document.cookie = name + "=null; expires=" + exp.toGMTString();
-}
-
-
-///////////////////////////////////////////////////////////////////
-// SPECIFIC FUNCTIONS USING COOKIES //
-///////////////////////////////////////////////////////////////////
-
-function openBasket() {
-	var strCookie = "";
-
-	var nameCookie = "bib_list";
-	var valCookie = readCookie(nameCookie);
-	if (valCookie) {
-		strCookie = nameCookie + "=" + valCookie;
-	}
-
-	if (strCookie) {
-		var iW = 620;
-		var iH = 450;
-
-		var optWin = "dependant=yes,status=yes,scrollbars=yes,resizable=yes,toolbar=yes,height="+iH+",width="+iW;
-		var loc = CGIBIN + "opac-basket.pl?" + strCookie;
-		var basket = open(loc, "basket", optWin);
-	}
-	else {
-		alert(MSG_BASKET_EMPTY);
-	}
-}
-
-
-function addRecord(val, selection) {
-	var nameCookie = "bib_list";
-	var valCookie = readCookie(nameCookie);
-	var write = 0;
-
-	if ( ! valCookie ) { // empty basket
-		valCookie = val + '/';
-		write = 1;
-		updateBasket(1,document);
-	}
-	else {
-		// is this record already in the basket ?
-		var found = false;
-		var arrayRecords = valCookie.split("/");
-		
-		for (var i = 0; i < valCookie.length - 1; i++) {
-			if (val == arrayRecords[i]) {
-				found = true;
-				break;
-			}
-		}
-
-		if ( found ) {
-			if (selection) {
-				return 0;
-			}
-			alert(MSG_RECORD_IN_BASKET);
-		}
-		else {
-			valCookie += val + '/';
-			write = 1;
-			updateBasket(arrayRecords.length,document);
-		}
-	}
-
-	if (write) {
-		writeCookie(nameCookie, valCookie);
-		if (selection) { // when adding a selection of records
-			return 1;
-		}
-		alert(MSG_RECORD_ADDED);
-	}
-}
-
-
-function addMultiple(){
-	var c_value = "";
-	if(document.myform.bibid.length > 0) {
-		for (var i=0; i < document.myform.bibid.length; i++) {
-			if (document.myform.bibid[i].checked) {
-				c_value = c_value + document.myform.bibid[i].value + "/";
-			}
-		}
-		addSelRecords(c_value);
-	} else {
-		c_value = c_value + document.myform.bibid.value + "/";
-		addSelRecords(c_value);
-	}
-}
-
-
-function addSelRecords(valSel) { // function for adding a selection of biblios to the basket
-												// from the results list
-	var arrayRecords = valSel.split("/");
-	var i = 0;
-	var nbAdd = 0;
-	for (i=0;i<arrayRecords.length;i++) {
-		if (arrayRecords[i]) {
-			nbAdd += addRecord(arrayRecords[i], 1);
-		}
-		else {
-			break;
-		}
-	}
-
-	var msg = "";
-	if (nbAdd) {
-		if (i > nbAdd) {
-			msg = nbAdd+" "+MSG_NRECORDS_ADDED+", "+(i-nbAdd)+" "+MSG_NRECORDS_IN_BASKET;
-		}
-		else {
-			msg = nbAdd+" "+MSG_NRECORDS_ADDED;
-		}
-	}
-	else {
-		if (i < 1) {
-			msg = MSG_NO_RECORD_SELECTED;	
-		}
-		else {
-			msg = MSG_NO_RECORD_ADDED+" ("+MSG_NRECORDS_IN_BASKET+") !";
-		}
-	}
-	alert(msg);
-}
-
-
-function selRecord(num, status) {
-	var str = document.myform.records.value
-	if (status){
-		str += num+"/";
-	}
-	else {
-		str = delRecord(num, str);
-	}
-
-	document.myform.records.value = str;
-}
-
-
-function delSelRecords() {
-	var recordsSel = 0;
-	var end = 0;
-	var nameCookie = "bib_list";
-	var valCookie = readCookie(nameCookie, 1);
-
-	if (valCookie) {
-		var str = document.myform.records.value;
-		if (str.length > 0){
-			recordsSel = 1;
-			var str2 = valCookie;
-			while (!end){
-				s = str.indexOf("/");
-				if (s>0){
-					num = str.substring(0, s)
-					str = delRecord(num,str);
-					str2 = delRecord(num,str2);
-				} else {
-					end = 1;
-				}
-			}
-
-			if (str2.length == 0) { // equivalent to emptying the basket
-				var rep = false;
-				rep = confirm(MSG_CONFIRM_DEL_BASKET);
-				if (rep) { 
-					delCookie(nameCookie);
-					document.location = "about:blank";
-					updateBasket(0,top.opener.document);
-					window.close();
-				} else {
-					return;
-				}
-			} else {
-				writeCookie(nameCookie, str2, 1);
-			}
-		}
-	}
-
-	if (recordsSel) {
-		var strCookie = "";
-		var nameCookie = "bib_list";
-		var valCookie = readCookie(nameCookie, 1);
-		strCookie = nameCookie + "=" + valCookie;
-		var arrayRecords = valCookie.split("/");
-		updateBasket(arrayRecords.length-1,top.opener.document);
-		document.location = CGIBIN + "opac-basket.pl?" + strCookie;
-	}
-	else {
-		alert(MSG_NO_RECORD_SELECTED);
-	}
-}
-
-
-function delRecord (n, s) {
-	var re = /\d/;
-	var aux = s;
-	var found = 0;
-	var pos = -1;
-
-	while (!found) {
-		pos = aux.indexOf(n, pos+1);
-		var charAfter = aux.charAt(pos+n.length); // character right after the researched string
-		if (charAfter.match(re)) { // record number inside another one
-			continue;
-		}
-		else { // good record number
-			aux = s.substring(0, pos)+ s.substring(pos+n.length+1, s.length);
-			s = aux;
-			found = 1;
-		}
-	}
-
-	return s;
-}
-
-
-function delBasket() {
-	var nameCookie = "bib_list";
-
-	var rep = false;
-	rep = confirm(MSG_CONFIRM_DEL_BASKET);
-	if (rep) {
-		delCookie(nameCookie);
-		document.location = "about:blank";
-		updateBasket(0,top.opener.document);
-		window.close();
-	}
-}
-
-
-function quit() {
-	if (document.myform.records.value) {
-		var rep = false;
-		rep = confirm(MSG_CONFIRM_DEL_RECORDS);
-		if (rep) {
-			delSelRecords();
-		}
-	}
-	updateBasket(arrayRecords.length-1,top.opener.document);
-	window.close();
-}
-
-function sendBasket() {
-	var nameCookie = "bib_list";
-	var valCookie = readCookie(nameCookie);
-	var strCookie = nameCookie + "=" + valCookie;
-
-	var loc = CGIBIN + "opac-sendbasket.pl?" + strCookie;
-
-	var optWin="dependant=yes,scrollbars=no,resizable=no,height=300,width=400,top=50,left=100";
-	var win_form = open(loc,"win_form",optWin);
-}
-
-function printBasket() {
-	var loc = document.location + "&print=1";
-	document.location = loc;
-}
-
-function showMore() {
-	var strCookie = "";
-
-	var nameCookie = "bib_list";
-	var valCookie = readCookie(nameCookie);
-	if (valCookie) {
-		strCookie = nameCookie + "=" + valCookie;
-	}
-	var loc = CGIBIN + "opac-basket.pl?" + strCookie + "&verbose=1";
-	document.location = loc;
-}
-
-function showLess() {
-	var strCookie = "";
-
-	var nameCookie = "bib_list";
-	var valCookie = readCookie(nameCookie);
-	if (valCookie) {
-		strCookie = nameCookie + "=" + valCookie;
-	}
-	var loc = CGIBIN + "opac-basket.pl?" + strCookie + "&verbose=0";
-	document.location = loc;
-}
-
-function updateBasket(updated_value,target) {
-    if(typeof document.getElementById != "undefined") {
-        target.getElementById('basket').innerHTML = " ("+updated_value+")";
-    } else if (typeof document.layers != "undefined") {
-        target.layers['basket'].open();
-        target.layers['basket'].write(" ("+updated_value+")");
-        target.layers['basket'].close();
-    } else if(typeof document.all != "undefined" &&  typeof
-document.getElementById == "undefined") {
-        target.all['basket'].innerHTML = " ("+updated_value+")";
-    }
-}
-
-function openBiblio(biblionumber) {
-	openerURL="opac-detail.pl?bib="+biblionumber;
-	opener.document.location = openerURL;
-}
\ No newline at end of file

Index: koha-tmpl/opac-tmpl/css/fr/includes/marc-editor.css
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/includes/marc-editor.css
diff -N koha-tmpl/opac-tmpl/css/fr/includes/marc-editor.css
--- koha-tmpl/opac-tmpl/css/fr/includes/marc-editor.css	2 Sep 2004 16:32:18 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
-div.tabs {
-	width:10px;
-	position:absolute;
-	display:block;
-	margin-left:50px;
-	margin-top:150px;
-}
-
-div.tabs a {
-	display:block;
-	font-size: small;
-	border: thin solid black;
-	margin-right: 2px;
-	padding: 10px 10px;
-	-moz-border-radius: 5px 0px 0px 5px;
-}
-
-div.tab {
-	background-color: #ACE6E6;
-	display: block;
-	visibility:hidden;
-	position:absolute;
-	margin-left:72px;
-	margin-top:150px;
-	margin-right:10%;
-}
-td {
-	border:0px;
-}
-
-.MARCtag { /* style for tag definition (700 - Statement of responsability) */
-	font-weight:bold;
-	color:#FF6600;
-	background-color:FFFFFF;
-	background-image:none;
-	border-bottom: thin solid #FF6600;
-	margin-right:30%;
-}
-
-.labelsubfield { /* style for each subfield (like : a Publication year), just before the biblio subfield */
-	float:left;
-	width: 12em;
-	margin-left:30px;
-}

Index: koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-bottom.inc
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-bottom.inc
diff -N koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-bottom.inc
--- koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-bottom.inc	5 Jul 2004 17:08:19 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-</body>
-</html>

Index: koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-menu.inc
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-menu.inc
diff -N koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-menu.inc
--- koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-menu.inc	1 Mar 2005 13:41:07 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-	<!-- MENUS -->
-	<div id="menuline" style="font-size:11pt;margin-top:20px;margin-bottom:20px;">
-		<span class="spacer">&nbsp;</span>
-		<A href='javascript:delBasket()' class="menu">Vider</A>
-		<span class="basketspacer">&nbsp;</span>
-		<A href='javascript:delSelRecords()' class="menu">Supprimer la sélection</A>
-		<span class="basketspacer">&nbsp;</span>
-		<A href='javascript:sendBasket()' class="menu">Envoyer</A>
-		<span class="basketspacer">&nbsp;</span>
-		<A href='javascript:printBasket()' class="menu">Imprimer</A>
-		<span class="basketspacer">&nbsp;</span>
-		<A href='javascript:quit()' class="menu">Fermer</A>
-		<!-- TMPL_IF NAME="verbose" -->
-			<a href="javascript:showLess()" class="menu">Brief Display</a>
-		<!-- TMPL_ELSE -->
-			<a href="javascript:showMore()" class="menu">More Details</a>
-		<!-- /TMPL_IF -->
-
-	</div>

Index: koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-top.inc
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-top.inc
diff -N koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-top.inc
--- koha-tmpl/opac-tmpl/css/fr/includes/opac-basket-top.inc	1 Mar 2005 13:41:07 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<title>Panier</title>
-	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-	<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang">/includes/opac.css">
-	<script type="text/javascript" language="javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/basket.js"></script>
-	<script language="JavaScript" type="text/javascript">
-		function _(s) { return s } // dummy function for gettext
-		//
-	</script>
-	<SCRIPT language='javascript'>
-		var MSG_NO_RECORD_SELECTED = _("Aucune notice sélectionnée");
-		var MSG_NO_RECORD_ADDED = _("Aucune notice ajoutée");
-		var MSG_CONFIRM_DEL_BASKET = _("Voulez vous vider le panier ?");
-		var MSG_CONFIRM_DEL_RECORDS = _("Voulez vous enlever les notices sélectionnées ?");
-	</SCRIPT>
-</head>

Index: koha-tmpl/opac-tmpl/css/fr/includes/opac-bottom.inc
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/includes/opac-bottom.inc
diff -N koha-tmpl/opac-tmpl/css/fr/includes/opac-bottom.inc
--- koha-tmpl/opac-tmpl/css/fr/includes/opac-bottom.inc	1 Mar 2005 13:41:07 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-<div id="bottombloc">
-<!-- TMPL_IF NAME="loggedinusername" -->
-	<p>
-		Connecté en tant que <b><!-- TMPL_VAR NAME="loggedinusername" --></b> <a href="/cgi-bin/koha/opac-user.pl">Accueil Membre</a>
-		|| <a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Déconnexion</a>
-	</p>
-<!-- TMPL_ELSE -->
-	<p>
-		<a href="/cgi-bin/koha/opac-user.pl">Se connecter</a> à  Koha
-	</p>
-<!-- /TMPL_IF -->
-</div>
-</body>
-</html>

Index: koha-tmpl/opac-tmpl/css/fr/includes/opac-top.inc
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/includes/opac-top.inc
diff -N koha-tmpl/opac-tmpl/css/fr/includes/opac-top.inc
--- koha-tmpl/opac-tmpl/css/fr/includes/opac-top.inc	1 Mar 2005 13:41:07 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<!-- TMPL_IF name="opacstylesheet" -->
-		<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="opacstylesheet"-->" />
-	<!-- TMPL_ELSE -->
-		<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang"-->/includes/opac.css" />
-	<!-- /TMPL_IF -->
-	<title><!--TMPL_VAR name="LibraryName"--></title>
-	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-	<script type="text/javascript" language="javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/basket.js"></script>
-	<script language="JavaScript" type="text/javascript">
-		function _(s) { return s } // dummy function for gettext
-		//
-	</script>
-	<script type="text/javascript" language="javascript">
-	var MSG_BASKET_EMPTY = _("Le panier est vide");
-	var MSG_RECORD_IN_BASKET = _("Cette notice est déjà dans le panier");
-	var MSG_RECORD_ADDED = _("Notice ajoutée au panier");
-	var MSG_NRECORDS_ADDED = _("Notice(s) ajoutée(s)");
-	var MSG_NRECORDS_IN_BASKET = _("Envoyer le panier");
-	var MSG_NO_RECORD_SELECTED = _("Aucune notice sélectionnée");
-	var MSG_NO_RECORD_ADDED = _("Aucune notice ajoutée");
-	function Dopop(link) {
-		newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
-	}
-	</script>
-</head>
-<body>
-	<!-- MENUS -->
-	<div id="menuline">
-		<img src="<!-- TMPL_VAR name="themelang" -->/images/front-background-small.gif" height="50" alt="Logo Koha" style="float: left">
-		<div class="SmallLibraryName"><!--TMPL_VAR name="LibraryName"--></div>
-		<span class="spacer">&nbsp;</span>
-		<span class="spacer">&nbsp;</span>
-		<a class="menu" href="/cgi-bin/koha/opac-main.pl" title="Page d'accueil Koha">Accueil</a>
-		<span class="spacer">&nbsp;</span>
-		<a class="menu" href="/cgi-bin/koha/opac-search.pl" title="Recherche avancée">Recherche avancée</a>
-		<span class="spacer">&nbsp;</span>
-		<a class="menu" href="/cgi-bin/koha/opac-user.pl" title="Page d'accueil Membre">Vos informations</a>
-		<span class="spacer">&nbsp;</span>
-		<a class="menu" href="javascript:openBasket()" title="Panier de notices">Panier de notices <span id="basket"><script language="javascript" type="text/javascript">if(basketcount){ document.write(basketcount) };</script></span></a>
-	</div>
-	<!-- MAIN BODY OF PAGE -->

Index: koha-tmpl/opac-tmpl/css/fr/includes/opac.css
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/includes/opac.css
diff -N koha-tmpl/opac-tmpl/css/fr/includes/opac.css
--- koha-tmpl/opac-tmpl/css/fr/includes/opac.css	1 Mar 2005 13:41:07 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,409 +0,0 @@
-body {
-	background-color:#009999;
-	font-family:verdana,arial,helvetica,sans-serif;
-	font-size:12pt;
-	margin:0px;
-	padding:0px
-}
-
-/* base tags */
-a {
-	background-color: #ACE6E6;
-	text-decoration:none;
-	color:#000000;
-}
-
-a.transparent {
-	background-color: transparent;
-	text-decoration:none;
-	color:#000000;
-}
-
-a:hover {
-/* 	background-color: #FF6600; */
-	background-image: url(/opac-tmpl/css/en/images/bar.gif);
-	background-repeat:repeat-y;
-	text-decoration:none;
-	color:#000000;
-}
-
-/* the page result number */
-a.results {
-	background-color : #FFD9BF;
-	padding : 0px 2px 0px 2px;
-	margin : 2px 1px 2px 0px;
-}
-
-a.results:hover {
-	background-color: #FFFFCC;
-	padding : 0px 2px 0px 2px;
-	margin : 2px 1px 2px 0px;
-}
-
-/* label size & look just before input fields */
-label {
-	float:left;
-	width: 10em;
-}
-
-/* images */
-img {
-	border-width:0px;
-	text-align:left;
-	position:absolute;
-}
-
-.relative { /* for images in relative position */
-	border-width:5px;
-	text-align:left;
-	position:relative;
-}
-
-/* main title */
-h1 {
-	color:#FFD9BF;
-	background-color:#FF6600;
-	font-weight:bold;
-	font-size: 150%;
-	text-align:center;
-	padding: 2px;
-	border: 4px inset #FFD9BF;
-	width:60%;
-}
-
-/* style for library name, on top of menu (defined in LibraryName systempref) */
-/* in opac-main page */
-.LibraryName {
-	color:#FFD9BF;
-	background-color:transparent;
-	font-weight:bold;
-	font-size: 150%;
-	text-align:center;
-	padding: 2px;
-	border: 4px inset #FF6600;
-	width:75%;
-}
-
-/* in all other pages */
-.SmallLibraryName {
-	color:#FFD9BF;
-	background-color:transparent;
-	font-weight:bold;
-	font-size: 115%;
-	text-align : center;
-	vertical-align:top;
-	padding: 2px;
-	width:100%;
-	margin-left:70px;
-}
-
-/* subtitles. headers of blocks */
-h2 {
-	color:#000000;
-	background-image: url(/opac-tmpl/css/en/images/bar.gif);
-	background-repeat:repeat-y;
-	font-weight:bold;
-	font-size: 125%;
-	margin: 0px 0px 10px 0px;
-}
-
-/* probably useless */
-h3 {
-	color:#000000;
-	font-weight:bold;
-	font-size: 125%;
-	margin: 5px 0px 0px 0px;
-}
-
-/* paragraphs */
-p {
-	padding-left:10pt;
-	padding-bottom:0pt;
-	margin:0pt;
-	clear:left;
-}
-
-/* centered paragraphs */
-p.center {
-	padding-left:10pt;
-	padding-bottom:0pt;
-	margin:0pt;
-	text-align:center;
-}
-
-/* the copyright (at the end of the main page */
-p.copyright {
-	border-top: 1px solid #000000;
-	margin-top:10px;
-	text-align:center;
-}
-
-/* TABLES */
-table {
-	border:1px solid #000000;
-	border-collapse:collapse;
-	width:90%;
-}
-/* header */
-th {
-	background-color: #99cccc;
-	background-image: url(/opac-tmpl/css/en/images/background-opac.gif);
-	font-weight:bold;
-	text-align:center;
-	font-size:10pt;
-	border-left:1px solid #000000;
-	border-bottom:1px solid #000000;
-	border-top:1px solid #000000;
-	padding:5px;
-}
-/* standard cell */
-td {
-	font-size:10pt;
-	border-left:1px solid #000000;
-	vertical-align:top;
-}
-
-/* hilighted cell */
-td.hilighted {
-	font-size:10pt;
-	border-left:1px solid #000000;
-	background-color:#ffffcc;
-	vertical-align:top;
-}
-
-/* FORMS */
-/* class used in form buttons */
-.button {
-	text-align: center;
-	padding: 2px 2px;
-	border-style: solid;
-	border-width: 1px;
-	border-color: black;
-	text-decoration: none;
-	color: black;
-	line-height:175%;
-	border-radius: 6px;
-	-moz-border-radius: 6px;
-	background-color:#FFD9BF;
-	margin : 3px 3px 3px 0px;
-}
-
-.button:hover {
-	text-align: center;
-	padding: 2px 2px;
-	border-style: solid;
-	border-width: 1px;
-	border-color: black;
-	text-decoration: none;
-	color: black;
-	line-height:175%;
-	border-radius: 6px;
-	-moz-border-radius: 6px;
-	background-color:#FF6600;
-	background-image: url(/opac-tmpl/css/en/images/bar.gif);
-	background-repeat:no-repeat;
-	margin : 3px 3px 3px 0px;
-}
-
-/* standard input field */
-input {
-	border:0px;
-	border-bottom:1px solid #000000;
-	margin-bottom:2px;
-	background-color:#009999;
-}
-
-input:hover {
-	border:0px;
-	border-bottom:1px solid #000000;
-	background-color:#FF6600;
-}
-
-/* textarea input field */
-textarea {
-	border:0px;
-	border-bottom:1px solid #000000;
-	background-color:#009999;
-}
-textarea:hover {
-	border:0px;
-	border-bottom:1px solid #000000;
-	background-color:#FF6600;
-}
-
-/* select input field */
-select {
-	border:0px;
-	border-bottom:1px solid #000000;
-	background-color:#009999;
-}
-
-select:hover {
-	border:0px;
-	border-bottom:1px solid #000000;
-	background-color:#FF6600;
-}
-
-
-/* span classes */
-/* used to show small 1,2,3, to reach other pages when too much results */
-.smallnumber {
-	background-color:#99cccc;
-	font-family:Times,serif;
-	font-size:small;
-	border:1px solid #000000;
-	padding:1pt;
-	vertical-align:top;
-}
-
-.smallnumberactive {
-	background-color:#FF6600;
-	font-family:Times,serif;
-	font-size:small;
-	border:1px solid #000000;
-	padding:1pt;
-	vertical-align:top;
-}
-
-/* BLOCS */
-
-/* the mainbloc : everything is in mainbloc, except menu */
-#mainbloc {
-	float:left;
-	width:90%;
-	background-color:#ACE6E6;
-	border:1px solid #000000;
-	margin-left:10px;
-	margin-right:10px;
-	padding-bottom:100px;
-	padding-left:10px;
-	padding-top:10px;
-	padding-right:10px;
-}
-
-#homebloc {
-	float:left;
-	width:60%;
-	border:0;
-}
-
-#leftbloc {
-	float:left;
-	width:30%;
-	border:0;
-}
-
-#bottombloc {
-	width:100%;
-	height:200%;
-	margin-top:10px;
-	vertical-align:top;
-	text-align:center;
-	float:left;
-}
-
-/* used in members */
-#bloc20, .bloc20 {
-	float:left;
-	border:1px solid #000000;
-	margin-right:20px;
-	margin-bottom:20px;
-	padding-right:20px;
-}
-#bloc60, .bloc60 {
-	float:left;
-	border:1px solid #000000;
-	margin-right:20px;
-	margin-bottom:20px;
-	padding-right:20px;
-}
-
-/* used in biblio detail */
-
-#bibliobloc {
-	float:left;
-	width:40%;
-	border:0;
-}
-
-#itembloc {
-	float:left;
-	width:50%;
-	border:0;
-}
-
-/* menu styles */
-.menu {
-	border:1px solid #000000;
-	padding-left:10pt;
-	padding-right:10pt;
-/* 	float:left; */
-	margin-bottom:10px;
-	-moz-border-radius: 6px;
-}
-
-#menuline {
-	float:left;
-	display:block;
-}
-
-#bibliomenu {
-	position: relative;
-	float:left;
-	display:block;
-	margin-left:10%;
-	width:100%;
-}
-
-/* a little spacer. should not be used */
-.spacer {
-	padding-left:20pt;
-	float:left;
-}
-.basketspacer {
-	padding-left:8pt;
-	float:left;
-}
-
-/* for MARC view  */
-div.tabs {
-	width:10px;
-	position:absolute;
-	display:block;
-	margin-left:50px;
-	margin-top:150px;
-}
-
-div.tabs a {
-	display:block;
-	font-size: small;
-	border: thin solid black;
-	margin-right: 2px;
-	padding: 10px 10px;
-	-moz-border-radius: 5px 0px 0px 5px;
-}
-
-div.tab {
-	background-color: #ACE6E6;
-	display: block;
-	visibility:hidden;
-	position:absolute;
-	margin-left:72px;
-	margin-top:150px;
-	margin-right:10%;
-}
-
-.MARCtag { /* style for tag definition (700 - Statement of responsability) */
-	font-weight:bold;
-	color:#FF6600;
-	background-color:#FFFFFF;
-	background-image:none;
-	border-bottom: thin solid #FF6600;
-	margin-right:30%;
-}
-
-.labelsubfield { /* style for each subfield (like : a Publication year), just before the biblio subfield */
-	float:left;
-	width: 12em;
-	margin-left:30px;
-}

Index: koha-tmpl/opac-tmpl/css/fr/kohaerror.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/kohaerror.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/kohaerror.tmpl
--- koha-tmpl/opac-tmpl/css/fr/kohaerror.tmpl	2 Sep 2004 16:32:18 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-
-
-<center>
-<table border=1 cellspacing=5 bgcolor="red">
-<tr><td>
-<table border=0 bgcolor="#dddddd">
-<tr><th>Une erreur s'est produite</th></tr>
-<tr><td><!-- TMPL_VAR NAME="errormessage" --></td></tr>
-</table>
-</td></tr>
-</table>
-</center>
-
-
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
-

Index: koha-tmpl/opac-tmpl/css/fr/opac-ISBDdetail.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-ISBDdetail.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-ISBDdetail.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-ISBDdetail.tmpl	1 Mar 2005 13:41:06 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/marc-editor.css">
-<div id="bibliomenu">
-	<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue"> Simple </a> <a href="opac-MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button"> Complète </a> <a href="opac-ISBDdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue"> ISBD </a> <a href="javascript:Dopop('opac-addbookbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->')" class="button catalogue"> Ajouter dans l'étagère </a> <a href="javascript:Dopop('opac-detailprint.pl?bib=<!-- TMPL_VAR name="biblionumber" -->')" class="button catalogue"> Imprimer </a>
-	<!-- TMPL_UNLESS NAME="norequests" -->
-		<a class="button" href="/cgi-bin/koha/opac-reserve.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE=URL -->">
-			Réserver
-		</a>
-	<!-- /TMPL_UNLESS -->
-	<!-- TMPL_IF name="subscriptionid" -->
-	<a href="opac-serial-issues.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" class="button catalogue" title="Bulletins">
-		Prêts
-	</a>
-	<!-- /TMPL_IF -->
-	<a class="button" href="javascript:addRecord('<!-- TMPL_VAR NAME="biblionumber" ESCAPE=URL -->')">Ajouter au panier</a>
-</div>
-
-<div id="mainbloc">
-	<p><!-- TMPL_VAR name="ISBD" --></p>
-</div>
-</body>
-</html>

Index: koha-tmpl/opac-tmpl/css/fr/opac-MARCdetail.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-MARCdetail.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-MARCdetail.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-MARCdetail.tmpl	1 Mar 2005 13:41:06 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,253 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="bibliomenu">
-	<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue"> Simple </a> <a href="opac-MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button"> Complète </a> <a href="opac-ISBDdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue"> ISBD </a> <a href="javascript:Dopop('opac-addbookbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->')" class="button catalogue"> Ajouter dans l'étagère </a> <a href="javascript:Dopop('opac-detailprint.pl?bib=<!-- TMPL_VAR name="biblionumber" -->')" class="button catalogue"> Imprimer </a>
-	<!-- TMPL_UNLESS NAME="norequests" -->
-		<a class="button" href="/cgi-bin/koha/opac-reserve.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE=URL -->">
-			Réserver
-		</a>
-	<!-- /TMPL_UNLESS -->
-	<!-- TMPL_IF name="subscriptionid" -->
-	<a href="opac-serial-issues.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" class="button catalogue" title="Bulletins">
-		Prêts
-	</a>
-	<!-- /TMPL_IF -->
-	<a class="button" href="javascript:addRecord('<!-- TMPL_VAR NAME="biblionumber" ESCAPE=URL -->')">Ajouter au panier</a>
-</div>
-
-	<div class="tabs">
-		<!-- TMPL_IF name="0XX" -->
-			<a href="javascript:active(0)"><div id="link0">0</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="1XX" -->
-			<a href="javascript:active(1)"><div id="link1">1</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="2XX" -->
-			<a href="javascript:active(2)"><div id="link2">2</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="3XX" -->
-			<a href="javascript:active(3)"><div id="link3">3</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="4XX" -->
-			<a href="javascript:active(4)"><div id="link4">4</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="5XX" -->
-			<a href="javascript:active(5)"><div id="link5">5</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="6XX" -->
-			<a href="javascript:active(6)"><div id="link6">6</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="7XX" -->
-			<a href="javascript:active(7)"><div id="link7">7</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="8XX" -->
-			<a href="javascript:active(8)"><div id="link8">8</div></a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="9XX" -->
-			<a href="javascript:active(9)"><div id="link9">9</div></a>
-		<!-- /TMPL_IF -->
-		<a href="javascript:active(10)">I<br/>t<br/>e<br/>m<br/>s</a>
-	</div>
-
-	<div name="0XX" id="0XX" class="tab" style="visibility:visible">
-		<!-- TMPL_LOOP name="0XX" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="1XX" id="1XX" class="tab">
-		<!-- TMPL_LOOP name="1XX" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="2XX" id="2XX" class="tab">
-		<!-- TMPL_LOOP name="2XX" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="3XX" id="3XX" class="tab">
-		<!-- TMPL_LOOP name="3XX" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="4XX" id="4XX" class="tab">
-		<!-- TMPL_LOOP name="4XX" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="5XX" id="5XX" class="tab">
-		<!-- TMPL_LOOP name="5XX" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="6XX" id="6XX" class="tab">
-		<!-- TMPL_LOOP name="6XX" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="7XX" id="7XX" class="tab">
-		<!-- TMPL_LOOP name="7XX" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="8XX" id="8XX" class="tab">
-		<!-- TMPL_LOOP name="8XX" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="9XX" id="9XX" class="tab">
-		<!-- TMPL_LOOP name="9XX" -->
-				<p class="MARCtag">
-					<!-- TMPL_VAR name="tag" -->
-				</p>
-			<!-- TMPL_LOOP name="subfield" -->
-				<p>
-					<label class="labelsubfield">
-						<!-- TMPL_VAR name="marc_subfield" -->
-						<!-- TMPL_VAR name="marc_lib" -->
-					</label>
-					<!-- TMPL_VAR name="marc_value" -->
-				</p>
-			<!-- /TMPL_LOOP -->
-		<!-- /TMPL_LOOP -->
-	</div>
-	
-	<div name="10XX" id="10XX" class="tab">
-		<h2 class="catalogue">Exemplaires</h2>
-		<table>
-				<tr>
-					<!-- TMPL_LOOP name="item_header_loop" -->
-						<th class="catalogue">
-							<!-- TMPL_VAR name="header_value" -->
-						</th>
-					<!-- /TMPL_LOOP -->
-				</tr>
-				<!-- TMPL_LOOP name="item_loop" -->
-					<tr>
-						<!-- TMPL_VAR name="item_value" -->
-					</tr>
-				<!-- /TMPL_LOOP -->
-		</table>
-	</div>
-<script language="JavaScript" type="text/javascript">
-function active(numlayer)
-{
-	for (i=0; i <= 10 ; i++ ) {
-		ong = i+"XX";
-		link = "link"+i;
-		if (numlayer==i) {
-			document.getElementById(ong).style.visibility="visible";
-		} else {
-			document.getElementById(ong).style.visibility="hidden";
-		}
-	}
-}
-</script>
-</body>
-</html>

Index: koha-tmpl/opac-tmpl/css/fr/opac-account.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-account.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-account.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-account.tmpl	2 Sep 2004 16:32:18 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,40 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-
-<div id="mainbloc">
-	<!-- TMPL_LOOP NAME="BORROWER_INFO" -->
-	<h2>Compte <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></h2>
-	<!-- /TMPL_LOOP -->
-	<table cellspacing=0>
-		<tr>
-			<th colspan=2>Amendes et charges</th>
-			<th>Montant</th>
-			<th>Dettes</th>
-		</tr>
-
-		<!-- TMPL_LOOP NAME="ACCOUNT_LINES" -->
-		<tr>
-			<td>
-				<!-- TMPL_VAR NAME="date" -->
-			</td>
-			<TD>
-				<!-- TMPL_VAR NAME="description" -->
-				<!-- TMPL_IF NAME="print_title" --><!-- TMPL_VAR NAME="title" --><!-- /TMPL_IF -->
-			</td>
-
-			<td align="right">
-				<!-- TMPL_VAR NAME="amount" -->
-			</td>
-			<TD>
-				<!-- TMPL_VAR NAME="amountoutstanding" -->
-			</td>
-		</tr>
-		<!-- /TMPL_LOOP -->
-
-		<tr>
-			<th colspan=2><b>Somme due</th>
-			<th align="right"><!-- TMPL_VAR NAME="total" --></th>
-			<th>&nbsp;</th>
-		</tr>
-	</table>
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/opac-auth.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-auth.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-auth.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-auth.tmpl	1 Mar 2005 13:41:06 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,38 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-<!-- TMPL_IF NAME="nopermission" -->
-<!-- This is what is displayed if user doesnt have permission -->
-<h2>Désolé, Koha pense que vous ne pouvez pas accéder à cette page.<h2>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="timed_out" -->
-<!-- This is what is displayed if login has timed out -->
-<h2>Désolé, votre session a expiré, merci de vous reconnecter<h2>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="different_ip" -->
-<!-- This is what is displayed if user doesnt have permission -->
-<h2>Vous accédez déjà à Koha à partir d'une autre adresse IP ! Merci de vous reconnecter<h2>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="invalid_username_or_password" -->
-<!-- This is what is displayed if user doesnt have permission -->
-<h2>Vous avez saisi un nom de membre ou mot de passe invalide, merci de réessayer.<h2>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="loginprompt" -->
-<!-- login prompt time-->
-
-<form action="<!-- TMPL_VAR NAME="url" -->" method="post">
-	<h1>Identification</h1>
-	<p><label>Login/identifiant</label><input name="userid" /></p>
-	<p><label>Mot de passe</label><input type="password" name="password" /></p>
-	<!-- TMPL_LOOP NAME="INPUTS" -->
-		<input type="hidden" name='<!-- TMPL_VAR NAME="name" -->' value='<!-- TMPL_VAR NAME="value" -->' />
-	<!-- /TMPL_LOOP -->
-	<p><label>&nbsp;</label><input type="submit" value="S'identifier" class="button"></p>
-</form>
-
-<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/opac-basket.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-basket.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-basket.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-basket.tmpl	1 Mar 2005 13:41:06 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,168 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-basket-top.inc" -->
-<!-- TMPL_IF NAME="print_basket" -->
-<body onload='print()' style="padding-bottom:20px;">
-<!-- TMPL_ELSE -->
-<body style="padding-bottom:20px;">
-<!-- TMPL_INCLUDE NAME="opac-basket-menu.inc" -->
-<!-- /TMPL_IF -->
-<div id="mainbloc" style="margin-top:10px;margin-bottom:20px;padding-top:10px;padding-bottom:10px;">
-<!-- TMPL_IF NAME="verbose" -->
-	<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-	<h3><!-- TMPL_VAR NAME="title" --><!-- TMPL_IF name="subtitle" --> <!-- TMPL_VAR NAME="subtitle" --><!-- /TMPL_IF --></h3>
-	<table>
-		<!-- TMPL_UNLESS NAME="print_basket" -->
-			<tr><td colspan="2">
-				<form>
-					<label for="bib<!-- TMPL_VAR NAME="biblionumber" -->">
-						<input type="checkbox" value="<!-- TMPL_VAR NAME="biblionumber" -->" name="bib<!-- TMPL_VAR NAME="biblionumber" -->" id="bib<!-- TMPL_VAR NAME="biblionumber" -->" onclick="selRecord(value,checked)"> Sélectionner ce document
-					</label>
-				</form>
-			</td></tr>
-		<!-- /TMPL_UNLESS -->
-		<!-- TMPL_IF name="isbn" -->
-			<tr>
-				<th>ISBN :</th>
-				<td><!-- TMPL_VAR NAME="ISBN" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="author" -->
-			<tr>
-				<th>Auteur:</th>
-				<td> <!-- TMPL_VAR NAME="author" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="additional" -->
-			<tr>
-				<th>Autres auteurs :</th>
-				<td><!-- TMPL_VAR NAME="additional" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="publishercode" -->
-			<tr>
-				<th>Editeur</th>
-				<td><!-- TMPL_VAR NAME="place" --> <!-- TMPL_VAR NAME="publishercode" --> <!-- TMPL_VAR NAME="publicationyear" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="pages" -->
-			<tr>
-				<th>Détails </th>
-				<td><!-- TMPL_VAR NAME="pages" --> <!-- TMPL_VAR NAME="illus" --> <!-- TMPL_VAR NAME="size" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="collection" -->
-			<tr>
-				<th>Collection :</th>
-				<td> <!-- TMPL_VAR NAME="seriestitle" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="subject" -->
-			<tr>
-				<th>Mot-clef</th>
-				<td> <!-- TMPL_VAR NAME="subject" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="copyrightdate" -->
-			<tr>
-				<th>Date copyright</th>
-				<td> <!-- TMPL_VAR NAME="copyrightdate" --></td>
-				</tr>
-			<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="notes" -->
-			<tr>
-				<th>Remarques:</th>
-				<td> <!-- TMPL_VAR NAME="notes" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="unititle" -->
-			<tr>
-				<th>Titre uniforme : </th>
-				<td> <!-- TMPL_VAR NAME="unititle" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="serial" -->
-			<tr>
-				<th>Collection</th>
-				<td><!-- TMPL_VAR NAME="serial" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="dewey" -->
-			<tr>
-				<th>code Dewey :</th>
-				<td><!-- TMPL_VAR name="dewey" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="classification" -->
-			<tr>
-				<th>Cote du document</th>
-				<td> <!-- TMPL_VAR name="classification" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="lccn" -->
-			<tr>
-				<th>LCCN</th>
-				<td> <!-- TMPL_VAR name="lccn" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="url" -->
-			<tr>
-				<th>URL :</th>
-				<td> <!-- TMPL_VAR NAME="url" --></td>
-			</tr>
-		<!-- /TMPL_IF -->
-		</table>
-	<!-- /TMPL_LOOP -->
-<!-- TMPL_ELSE -->
-
-	<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-	<div width="100%" style="margin-top:0px;margin-bottom:0px;padding-top:10px;padding-bottom:10px;">
-	<table cellspacing="0" style="border:0;width:100%;">
-		<tr align='center'>
-			<!-- TMPL_UNLESS NAME="print_basket" -->
-			<td style="border:0;">
-				<form>&nbsp;<input type='checkbox' value='<!-- TMPL_VAR NAME="biblionumber" -->' onClick='selRecord(value,checked)'>&nbsp;</form>
-			</td>
-			<!-- /TMPL_UNLESS -->
-			<td style="border:0;width:95%;">
-			<table cellspacing="0">
-				<!-- BIBLIO RECORD TABLE -->
-				<tr>
-					<th>
-						<a onClick="javascript:openBiblio(<!-- TMPL_VAR name="biblionumber" -->)"><!-- TMPL_VAR NAME="title" --></a>
-					</th>
-				</tr>
-				<tr valign="top">
-					<td>
-						<!-- TMPL_IF name="isbn" --><b>ISBN:</b><!-- TMPL_VAR NAME="ISBN" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="subtitle" --><b>sous-titre:</b><!-- TMPL_VAR NAME="subtitle" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="author" --><b>Auteur :</b> <!-- TMPL_VAR NAME="author" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="additional" --><b>Auteurs secondaires:</b><!-- TMPL_VAR NAME="additional" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="publishercode" --><b>publié par :</b><!-- TMPL_VAR NAME="publishercode" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="publicationyear" --><b>en </b><!-- TMPL_VAR NAME="publicationyear" --><!-- /TMPL_IF -->
-						<!-- 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_VAR NAME="seriestitle" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="subject" --><b>Mot-clef :</b> <!-- TMPL_VAR NAME="subject" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="copyrightdate" --><b>Tous droits réservés année:</b><!-- TMPL_VAR NAME="copyrightdate" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="notes" --><b>Remarques:</b> <!-- TMPL_VAR NAME="notes" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="unititle" --><b>titre uniforme</b> <!-- TMPL_VAR NAME="unititle" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="serial" --><b>Colection:</b><!-- TMPL_VAR NAME="serial" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="dewey" --><b>Dewey:</b><!-- TMPL_VAR name="dewey" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="classification" --><b>Cote:</b><!-- TMPL_VAR name="classification" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="lccn" --><b>LCCN:</b> <!-- TMPL_VAR name="lccn" --><br><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="url" --><b>URL:</b> <!-- TMPL_VAR NAME="url" --><br><!-- /TMPL_IF -->
-					</td>
-				</tr>
-			</table>
-			</td>
-		</tr>
-	</table>
-	</div>
-	<!-- /TMPL_LOOP -->
-<!-- /TMPL_IF -->
-</div>
-
-<!-- TMPL_UNLESS NAME="print_basket" -->
-<!-- TMPL_INCLUDE NAME="opac-basket-menu.inc" -->
-<FORM name='myform'><INPUT type='hidden' name='records'></FORM>
-<!-- /TMPL_UNLESS -->
-<!-- TMPL_INCLUDE NAME="opac-basket-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/opac-detail.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-detail.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-detail.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-detail.tmpl	1 Mar 2005 13:41:06 -0000	1.7
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,135 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/marc-editor.css">
-
-<div id="bibliomenu">
-	<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue"> Simple </a> <a href="opac-MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button"> Complète </a> <a href="opac-ISBDdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue"> ISBD </a> <a href="javascript:Dopop('opac-addbookbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->')" class="button catalogue"> Ajouter dans l'étagère </a> <a href="javascript:Dopop('opac-detailprint.pl?bib=<!-- TMPL_VAR name="biblionumber" -->')" class="button catalogue"> Imprimer </a>
-	<!-- TMPL_UNLESS NAME="norequests" -->
-		<a class="button" href="/cgi-bin/koha/opac-reserve.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE=URL -->">
-			Réserver
-		</a>
-	<!-- /TMPL_UNLESS -->
-	<!-- TMPL_IF name="subscriptionid" -->
-	<a href="opac-serial-issues.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" class="button catalogue" title="Bulletins">
-		Prêts
-	</a>
-	<!-- /TMPL_IF -->
-	<a class="button" href="javascript:addRecord('<!-- TMPL_VAR NAME="biblionumber" ESCAPE=URL -->')">Ajouter au panier</a>
-</div>
-
-<div id="mainbloc">
-	<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-	<h1><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="class" --></h1>
-
-	<p>
-	<div id="bibliobloc">
-	<table cellspacing="0">
-		<!-- BIBLIO RECORD TABLE -->
-		<tr>
-			<th>
-				<!-- TMPL_VAR NAME="title" -->
-			</th>
-		</tr>
-		<tr>
-			<td>
-				<!-- TMPL_IF name="subtitles" -->
-					<label><b>Sous-titre:</b> </label>
-					<!-- TMPL_LOOP name="subtitles" -->
-						<!-- TMPL_VAR NAME="subtitle" --> ; 
-					<!-- /TMPL_LOOP -->
-					<br />
-				<!-- /TMPL_IF -->
-				<!-- TMPL_IF name="author" --><label><b>Auteur:</b> </label><!-- TMPL_VAR NAME="author" --><br /><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="additional" --><label><b>Additional Author:</b></label><!-- TMPL_VAR NAME="additional" --><br /><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="publishercode" --><label><b>Publié par :</b></label><!-- /TMPL_IF --> <!-- TMPL_VAR NAME="publishercode" --><br />
-				<!-- TMPL_IF name="publicationyear" --><label><b>en </b></label><!-- /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="isbn" --><label><b>ISBN :</b> </label><!-- TMPL_VAR NAME="isbn" --><br /><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="seriestitle" --><label><b>Collection :</b> </label><!-- TMPL_VAR NAME="seriestitle" --><br /><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="subjects" --><label><b>Mot-clef :</b> </label>
-					<!-- TMPL_LOOP name="subjects" -->
-						<a href="/cgi-bin/koha/opac-search.pl?op=do_search&marclist=bibliosubject.subject&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="subject" escape="HTML"-->"><!-- TMPL_VAR NAME="subject" --></a>, <!-- /TMPL_LOOP -->
-					<br /><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="copyrightdate" --><label><b>Year :</b> </label><!-- TMPL_VAR NAME="copyrightdate" --><br /><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="notes" --><label><b>Remarques:</b> </label><!-- TMPL_VAR NAME="notes" --><br /><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="unititle" --><label><b>Unititle:</b> </label><!-- TMPL_VAR NAME="unititle" --><br /><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="dewey" --><label><b>code Dewey :</b></label><!-- TMPL_VAR name="dewey" --><br /><!-- /TMPL_IF -->
-				<!-- TMPL_IF name="url" --><label><b>URL :</b> </label><a href="<!-- TMPL_VAR name="url" -->"><!-- TMPL_VAR NAME="url" --></a><br /><!-- /TMPL_IF -->
-				<label><b>Type de document </b></label>
-					<!-- TMPL_IF name="description" -->
-						<!-- TMPL_VAR name="description" -->
-					<!-- TMPL_ELSE -->
-						<!-- TMPL_VAR NAME="itemtype" -->
-					<!-- /TMPL_IF -->
-					<br/>
-				<b>Nombre Total de documents <!-- TMPL_VAR NAME="count" -->
-			</td>
-		</tr>
-	</table>
-	<table>
-	<!-- TMPL_IF name="MARCNOTES" -->
-		<tr>
-			<th><i>Notes détaillées</i></th>
-			<td>
-				<ul>
-					<!-- TMPL_LOOP NAME="MARCNOTES" -->
-						<i>- <!-- TMPL_VAR NAME="marcnote" --></i><br>
-					<!-- /TMPL_LOOP -->
-				</ul>
-			</td>
-		</tr>
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF name="MARCSUBJCTS" -->
-		<tr>
-			<th>Liens en relation</th>
-			<td>
-				<ul>
-					<!-- TMPL_LOOP NAME="MARCSUBJCTS" -->
-						- <a href="/cgi-bin/koha/opac-searchresults.pl?subjectitems=<!-- TMPL_VAR NAME="marcsubjct" ESCAPE="URL"-->"> <!-- TMPL_VAR NAME="marcsubjct" --> </a><br>
-					<!-- /TMPL_LOOP -->
-				</ul>
-			</td>
-		</tr>
-	<!-- /TMPL_IF -->
-	</table>
-	</div>
-	<!-- /TMPL_LOOP -->
-
-	<div id="itembloc">
-	<table cellspacing="0">
-		<tr>
-			<th colspan="6">Exemplaire</th>
-		</tr>
-		<tr>
-			<th>Localisation</th>
-			<th>Date de retour</th>
-			<th>Vu pour la dernière fois</th>
-			<th>code à barres</th>
-		</tr>
-		<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
-			<tr>
-				<td><!-- TMPL_VAR NAME="branchname" --> <!-- TMPL_VAR NAME="location" --> <!-- TMPL_IF name="itemcallnumber" -->(<!-- TMPL_VAR NAME="itemcallnumber" -->)<!-- /TMPL_IF --></td>
-				<td><!-- TMPL_VAR NAME="datedue" --></td>
-				<td><!-- TMPL_VAR NAME="datelastseen" --></td>
-				<td><!-- TMPL_VAR NAME="barcode" --></td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		<!-- TMPL_LOOP NAME="WEB_RESULTS" -->
-			<tr>
-				<td><!-- TMPL_VAR NAME="itemtype" --></td>
-				<td>Site Web</td>
-				<td>En ligne</td>
-				<td>Disponible</td>
-				<td>&nbsp;</td>
-				<td><!-- TMPL_VAR NAME="url" --></td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-	</table>
-	<!-- TMPL_IF name="subscriptionsnumber" -->
-		<p>
-			Il s'agit d'un abonnement (nous avons <!-- TMPL_VAR name="subscriptionsnumber" --> abonnements). Vous pouvez voir les <a href="opac-serial-issues.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" class="button catalogue" title="Serial issues">numéros</a> que nous avons et/ou n'avons pas
-		</p>
-	<!-- /TMPL_IF -->
-	</div>
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/opac-detailprint.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-detailprint.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-detailprint.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-detailprint.tmpl	1 Mar 2005 13:41:06 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,52 +0,0 @@
-<html>
-<body onLoad="window.print();self.close();">
-<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-	<table cellspacing="0" cellpadding="1" border="1" width=500>
-	<tr valign="top">
-		<td bgcolor="#cccc99" background="/images/background-mem.gif">
-			<b>NOTICE N° <!-- TMPL_VAR NAME="biblionumber" --></b>
-		</td>
-	</tr>
-	<tr valign="top">
-		<td>
-			<!-- TMPL_VAR NAME="author" --><br>
-			<b><!-- TMPL_VAR NAME="title" --></b><!-- TMPL_VAR NAME="subtitle" --><br>
-			<!-- TMPL_VAR NAME="additional" --><br>
-			<!-- TMPL_IF NAME="publishercode" --><b>publié par :</b><!-- TMPL_VAR NAME="publishercode" --><!-- /TMPL_IF -->
-			<!-- TMPL_IF NAME="publicationyear" --><b>en </b><!-- TMPL_VAR NAME="publicationyear" --><!-- /TMPL_IF -->
-			<!-- 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_VAR NAME="seriestitle" --><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="subject" --><b>Mot-clef :</b> <!-- TMPL_VAR NAME="subject" --><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="copyrightdate" --><b>Année :</b> <!-- TMPL_VAR NAME="copyrightdate" --><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="notes" --><b>Remarques:</b> <!-- TMPL_VAR NAME="notes" --><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="unititle" --><b>titre uniforme</b> <!-- TMPL_VAR NAME="unititle" --><!-- /TMPL_IF --> <br>
-			<!-- TMPL_IF NAME="dewey" --><b>Dewey:</b> <a href="/cgi-bin/koha/opac-searchresults.pl?type=opac&amp;dewey=<!-- TMPL_VAR NAME="dewey" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="dewey" --></a><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="classification" --><b>Cote:</b><!-- TMPL_VAR NAME="classification" --><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="lccn" --><b>LCCN:</b> <!-- TMPL_VAR NAME="lccn" --><!-- /TMPL_IF --><br>
-			<!-- TMPL_IF NAME="url" --><b>URL:</b> <a href="<!-- TMPL_VAR NAME="url" -->"><!-- TMPL_VAR NAME="url" --></a><!-- /TMPL_IF --><br>
-			<b>ISBN:</b><!-- TMPL_VAR NAME="ISBN" --><br>
-			</font>
-		</td>
-	</tr>
-	</table>
-<!-- /TMPL_LOOP -->
-
-<table border="0" cellspacing="0" cellpadding="2">
-	<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
-		<tr>
-			<td><!-- TMPL_VAR NAME="description" --></td>
-			<td><!-- TMPL_VAR NAME="branchname" -->, <!-- TMPL_VAR NAME="itemcallnumber" --></td>
-			<td><!-- TMPL_VAR NAME="barcode" --></td>
-			<td><!-- TMPL_VAR NAME="volumeddesc" --></td>
-		</tr>
-	<!-- /TMPL_LOOP -->
-</table>
-<script language="javascript" type="text/javascript">
-function docprint() {
-	window.print();
-	window.close();
-}
-</script>
-</body>
-</html>
\ No newline at end of file

Index: koha-tmpl/opac-tmpl/css/fr/opac-main.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-main.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-main.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-main.tmpl	1 Mar 2005 13:41:06 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<!-- TMPL_IF name="opacstylesheet" -->
-		<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="opacstylesheet"-->" />
-	<!-- TMPL_ELSE -->
-		<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang"-->/includes/opac.css" />
-	<!-- /TMPL_IF -->
-	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-	<title><!--TMPL_VAR name="LibraryName"--></title>
-</head>
-
-<body>
-<div id="leftbloc">
-	<img class="relative" src="<!-- TMPL_VAR NAME='themelang' -->/images/front-background-med.gif" title="Koha" alt="Koha">
-</div>
-
-<div id="homebloc">
-	<h1 class="LibraryName"><TMPL_VAR name="LibraryName"></h1>
-	<h2>Chercher</h2>
-	<form action="/cgi-bin/koha/opac-search.pl">
-		<p>
-			<input type="hidden" name="op" value="do_search" />
-			<input type="hidden" name="type" value="opac" />
-			<input type="hidden" name="marclist" value="" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			Recherche simple : <input type="text" size="27" name="value" tabindex="1" /> <input type="submit" value="OK" class="button" /><br />
-		</p>
-		<p>
-			<a href="/cgi-bin/koha/opac-search.pl" class="button">Recherche Avancée, Plus d'Options	</a>
-		</p>
-	</form>
-
-	<h2>Acquisitions récentes</h2>
-	<form action="/cgi-bin/koha/opac-search.pl">
-		<p>
-			<!-- TMPL_VAR name="CGIitemtype" --> acquis récemment (les plus récents en premier)
-			<input type="hidden" name="marclist" value="biblioitems.itemtype" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="=" />
-			<input type="hidden" name="op" value="do_search" />
-			<input type="hidden" name="type" value="opac" />
-			<input type="hidden" name="orderby" value="biblio.timestamp desc">
-			<input type="submit" value="OK" class="button" />
-		</p>
-	</form>
-	<h2>Autres options</h2>
-	<!-- TMPL_IF NAME="loggedinusername" -->
-		<!-- TMPL_IF name="virtualshelves" -->
-			<a href="/cgi-bin/koha/opac-shelves.pl" class="button">Etagères virtuelles</a>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_IF name="suggestion" -->
-			<a href="opac-suggestions.pl" class="button">Voir et gérer les suggestions</a>
-		<!-- /TMPL_IF -->
-		<a href="/cgi-bin/koha/opac-user.pl" class="button"> <!-- TMPL_VAR NAME="loggedinusername" --> accueil </a> <a href="/cgi-bin/koha/opac-main.pl?logout.x=1" class="button"> Déconnexion </a>
-		<!-- TMPL_IF name="textmessaging"-->
-			<h2>Commandé par la bibliothèque</h2>
-			<!-- TMPL_VAR name="textmessaging" -->
-		<!-- /TMPL_IF -->
-	<!-- TMPL_ELSE -->
-		<p><a href="/cgi-bin/koha/opac-user.pl">S'identifier</a> pour accéder à votre dossier personnel</p>
-	<!-- /TMPL_IF -->
-	<form action="/cgi-bin/koha/changelanguage.pl" method="post">
-		<select name="language">
-			<TMPL_LOOP NAME="languages">
-				<option value="<TMPL_VAR NAME="language">"><TMPL_VAR NAME="language"></option>
-			</TMPL_LOOP>
-		</select>
-		<input type="submit" value="Changer la langue" class="button">
-	</form>
-	<p class="copyright">
-		Cette bibliothèque est équipée de <a href="http://www.koha.org">Koha</a>, SIGB sous licence libre, respectueuse des standards du web <a href="http://validator.w3.org/check/referer">
-			<img src="http://www.w3.org/Icons/valid-xhtml10" alt="XHTML 1.0 valide !" height="16" width="44">
-		</a>
-	</p>
-</div>
-
-</body>
-</html>

Index: koha-tmpl/opac-tmpl/css/fr/opac-moredetail.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-moredetail.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-moredetail.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-moredetail.tmpl	1 Mar 2005 13:41:06 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,87 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<center>
-
-<br>
-<!-- TMPL_LOOP NAME="BIBITEM_DATA" -->
-<a href="/cgi-bin/koha/request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->">
-	<img src="/images/requests.gif" width=120 height=42 border=0 align=right border=0>
-</a>
-<h1><a href="/cgi-bin/koha/detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->&type=intra"><!-- TMPL_VAR NAME="title" --> (<!-- TMPL_VAR NAME="author" -->)</a></h1>
-<p>
-<form action="/cgi-bin/koha/modbibitem.pl">
-<input type=hidden name=bibitem value="<!-- TMPL_VAR NAME="biblioitemnumber" -->">
-<input type=hidden name=biblio value="<!-- TMPL_VAR NAME="biblionumber" -->">
-<table>
-<tr>
-<td><b><!-- TMPL_VAR NAME="biblioitemnumber" --> GROUPE - <!-- TMPL_VAR NAME="description" --> </b> </td>
-</tr>
-<tr>
-<td width=210 >
-<input type="image" name="submit" value="modifier" height=42 width=93 border=0 src="/images/modify-mem.gif">
-<input type="image" name="delete" value="Supprimer" height=42 width=93 border=0 src="/images/delete-mem.gif">
-<br>
-<b>Numéro de notice :</b> <!-- TMPL_VAR NAME="biblionumber" --><br>
-<b>Type de document : </b><!-- TMPL_VAR NAME="itemtype" --><br>
-<b>URL:</b> <!-- TMPL_VAR NAME="url" --><br>
-<b>Durée du prêt:</b> <!-- TMPL_VAR NAME="loanlength" --><br>
-<b>Frais de location:</b> <!-- TMPL_VAR NAME="rentalcharge" --><br>
-<b>Cote:</b><!-- TMPL_VAR NAME="classification" --><!-- TMPL_VAR NAME="dewey" --><!-- TMPL_VAR NAME="subclass" --><br>
-<b>ISBN:</b><!-- TMPL_VAR NAME="isbn" --><br>
-<b>Editeur:</b> <!-- TMPL_VAR NAME="publishercode" --> <br>
-<b>Emplacement:</b> <!-- TMPL_VAR NAME="place" --><br>
-<b>Date de publication :</b> <!-- TMPL_VAR NAME="publicationyear" --><br>
-<b>Remarques:</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>Remarques:</b> <!-- TMPL_VAR NAME="bnotes" --><br>
-</b> <!-- TMPL_VAR NAME="count" -->'><b>Nbre. d'exemplaires:</b> 
-</td>
-</tr>
-</table>
-</form>
-<!-- /TMPL_LOOP -->
-<!-- TMPL_LOOP NAME="ITEM_DATA" -->
-<img src="/images/holder.gif" width=16 height=300 align=left>
-<TABLE>
-<tr>
-<td><b>CODE A BARRES <!-- TMPL_VAR NAME="barcode" --></b></td>
-</tr>
-<tr>
-<td>
-<form action="/cgi-bin/koha/moditem.pl" method=post>
-<input type=hidden name=bibitem value=<!-- TMPL_VAR NAME="biblionumber" -->>
-<input type=hidden name=item value=<!-- TMPL_VAR NAME="itemnumber" -->>
-<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/modify-mem.gif">
-<input type="image" name="delete" value="Supprimer" height=42 width=93 border=0 src="/images/delete-mem.gif">
-<br>
-</b> <!-- TMPL_VAR NAME="homebranch" -->'><b>Site d'origine:</b> <br>
-<b>Vu le :</b> <!-- TMPL_VAR NAME="datelastseen" --><br>
-<b>Dernier emprunteur :</b> <!-- TMPL_VAR NAME="timestamp0" --><br>
-Indicateur de prêt <!-- 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>Site actuel :</b> <!-- TMPL_VAR NAME="holdingbranch" --><br>
-<b>Prix de Remplacement :</b> <!-- TMPL_VAR NAME="replacementprice" --><br>
-<b> Document perdu :</b> <!-- TMPL_VAR NAME="itemlost" --><br>
-<b>Payé pour:</b> <!-- TMPL_VAR NAME="paidfor" --><br>
-<b>Remarques:</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">vu le</a>:<!-- TMPL_VAR NAME="dateaccessioned" --><br>
-<b>Annulé <!-- TMPL_VAR NAME="wthdrawn" --><br>
-<b>Total des prêts:</b> <!-- TMPL_VAR NAME="issues" --><br>
-<b>Nombre Total de documents <!-- TMPL_VAR NAME="biblioitemnumber" --> <br>
-<b>Numéro de notice :</b> <!-- TMPL_VAR NAME="biblionumber" --> <br>
-
-</td>
-</tr>
-</table>
-</form>
-<!-- /TMPL_LOOP -->
-
-<p>
-</form>
-</center>
-
-<!-- TMPL_INCLUDE NAME="cat-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/opac-reserve.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-reserve.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-reserve.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-reserve.tmpl	1 Mar 2005 13:41:06 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,79 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-<h2>Page des réservations pour <i><!-- TMPL_VAR NAME="title" --></i> (<!-- TMPL_IF NAME="author" --><!-- TMPL_VAR NAME="author" -->,<!-- /TMPL_IF --> N°<!-- TMPL_VAR name="biblionumber" -->)</h2>
-<!-- TMPL_IF NAME="message" -->
-	<h2>Impossible d'établir la réservation parce que </h2>
-	<ul>
-		<!-- TMPL_IF name="noreserve" --><li>You can't make reserve in this library (feature unactivated)</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="too_much_oweing" --><li>vous devez <!-- TMPL_VAR NAME="too_much_oweing" --></li><!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="too_many_reserves" --><li>vous ne pouvez faire plus de <!-- TMPL_VAR NAME="too_many_reserves" --> réservations</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="already_reserved" --><li>Vous avez déjà une réservation en cours pour ce document</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="no_items_selected" --><li>Vous devez sélectionner au moins un type de document !</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF NAME="no_branch_selected" --><li>Vous devez sélectionner une annexe de retrait !</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF name="GNA" --><li>Vous êtes parti sans laisser d'adresse. La réservation est refusée. Contactez votre bibliothèque</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF name="lost" --><li>La carte a été déclarée perdue. La réservation est impossible, contactez la bibliothèque</li><!-- /TMPL_IF -->
-		<!-- TMPL_IF name="debarred" --><li>Votre compte est suspendu temporairement. Contactez la bibliothèque</li><!-- /TMPL_IF -->
-	</ul>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="select_item_types" -->
-	<!-- The first time round you select which bibitems you want -->
-	<p> Il y a déjà <b><!-- TMPL_VAR NAME="reservecount" --></b> réservations pour ce document </p>
-	<p>Sélectionnez les types de documents qui vous conviennent. Le premier qui correspondra à votre souhait sera mis de coté lorsqu'il sera disponible</p>
-
-	<form action="/cgi-bin/koha/opac-reserve.pl" method="post">
-		<input type="hidden" name="item_types_selected" value="1" />
-		<input type="hidden" name="bib" value="<!-- TMPL_VAR name="biblionumber" -->" />
-		<table cellspacing="0">
-			<tr>
-				<th>Réserver</th>
-				<th>Type de document</th>
-				<th>Exemplaires</th>
-			</tr>
-			<!-- TMPL_LOOP NAME="TYPES" -->
-				<tr>
-					<!-- TMPL_UNLESS NAME="notforloan" -->
-						<td><input type="checkbox" name="itemtype" value="<!-- TMPL_VAR NAME="itemtype" -->" checked="checked" /></td>
-					<!-- TMPL_ELSE -->
-						<td>Ne peut être Réservé</td>
-					<!-- /TMPL_UNLESS -->
-					<td><!-- TMPL_VAR NAME="description" --></td>
-					<td><!-- TMPL_VAR NAME="copies" --></td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-		<p>Merci de sélectionner l'annexe où vous souhaitez récupérer le document <!-- TMPL_VAR NAME="CGIbranch" --></p>
-				
-		<input class="button" type="submit" value="Soumettre">
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="item_types_selected" -->
-<!-- if the bibitems have already been selected -->
-	<p>Merci de confirmer que vous souhaitez demander un document de ces types</p>
-
-	<form action="/cgi-bin/koha/opac-reserve.pl" method="post">
-		<input type="hidden" name="place_reserve" value="1" />
-		<input type="hidden" name="bib" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
-		<input type="hidden" name="required_date" value="<!-- TMPL_VAR NAME="required_date" -->" />
-		<input type="hidden" name="expires_date" value="<!-- TMPL_VAR NAME="expires_date" -->" />
-		<ul>
-			<!-- TMPL_LOOP NAME="TYPES" -->
-			<li><input type="hidden" name="itemtype" value="<!-- TMPL_VAR NAME="itemtype" -->" /><!-- TMPL_VAR NAME="description" --></li>
-			<!-- /TMPL_LOOP -->
-		</ul>
-		Qui doit être récupéré à
-		<ul>
-			<li>
-				<!-- TMPL_VAR NAME="branchname" -->
-			</li>
-		</ul>
-		<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
-		<!-- TMPL_IF NAME="istherefee" -->
-			<p>Notez qu'il y aura un coût de <b>$<!-- TMPL_VAR NAME="fee" --></b> pour la réservation</p>
-		<!-- /TMPL_IF -->
-		<input class="button" type="submit" value="Faire une Réservation">
-	</form>
-<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/opac-tmpl/css/fr/opac-search.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-search.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-search.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-search.tmpl	1 Mar 2005 13:41:06 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,185 +0,0 @@
-    <!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-
-<h1 class="catalogue">Recherche dans le Catalogue</h1>
-
-<form name="f" method="post" action="<!-- TMPL_VAR name="SCRIPT_NAME" -->">
-	
-	<div id="bloc60">
-		<h2 class="catalogue">Chercher dans</h2>
-		<p>
-			<input type="hidden" name="op" value="do_search" />
-			<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
-			<label class="label20">N'importe où</label>
-			<input type="hidden" name="marclist" value="" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			<input type="text" name="value" onchange="sql_update()" size="35" />
-		</p>
-		<p>
-			<label class="label20">Titre</label>
-			<input type="hidden" name="marclist" value="biblio.title" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			<input type="text" name="value" onchange="sql_update()" size="35" />
-		</p>
-		<p>
-			<label class="label20">Auteur</label> <input type="hidden" name="marclist" value="biblio.author" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			<input type="text" name="value" onchange="sql_update()" size="35" />
-		</p>
-		<p>
-			<label class="label20">Mot-clef</label>
-			<input type="hidden" name="marclist" value="bibliosubject.subject" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />  
-			<input type="text" name="value" onchange="sql_update()" size="35" />
-		</p>
-		<p>
-			<label class="label20">Titre périodique/collection</label>
-			<input type="hidden" name="marclist" value="biblio.seriestitle" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			<input type="text" name="value" onchange="sql_update()" size="35"/>
-		</p>
-		<p>
-			<label class="label20">Type de document</label>
-			<input type="hidden" name="marclist" value="biblioitems.itemtype" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="=" />
-			<!-- TMPL_VAR name="CGIitemtype" -->
-		</p>
-		<p>
-				<label class="label20">Site</label>
-				<input type="hidden" name="marclist" value="items.holdingbranch" />
-				<input type="hidden" name="and_or" value="and" />
-				<input type="hidden" name="excluding" value="" />
-				<input type="hidden" name="operator" value="=" />  
-				<!-- TMPL_VAR name="CGIbranch" -->
-		</p>
-	</div>
-	<div id="bloc20">
-		<h2>Autres options</h2>
-		<p>
-				<label class="label20">Code à barres</label>
-				<input type="hidden" name="marclist" value="items.barcode" />
-				<input type="hidden" name="and_or" value="and" />
-				<input type="hidden" name="excluding" value="" />
-				<input type="hidden" name="operator" value="start" />
-				<input type="text" name="value" onchange="sql_update()" /> 
-		</p>
-		<p>
-			<label class="label20">Cote du document</label>
-			<input type="hidden" name="marclist" value="items.itemcallnumber" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="start" />
-			<input type="text" name="value" onchange="sql_update()" />
-		</p>
-		<p>
-			<label class="label20">ISBN :</label>
-			<input type="hidden" name="marclist" value="biblioitems.isbn" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="=" />
-			<input type="text" name="value" onchange="sql_update()" />
-		</p>
-		<p>
-			<label class="label20">Editeur</label>
-			<input type="hidden" name="marclist" value="biblioitems.publishercode" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			<input type="text" name="value" onchange="sql_update()" />
-		</p>
-		<p>
-			<label class="label20">Publié entre</label>
-			<input type="hidden" name="marclist" value="biblioitems.publicationyear" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value=">=" />
-			<input type="text" name="value" size="6" maxlength="4" onchange="sql_update()" /> et
-			<input type="hidden" name="marclist" value="biblioitems.publicationyear" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="<=" />
-			<input type="text" name="value" size="6" maxlength="4" onchange="sql_update()" />
-		</p>
-		<p>Réponses par page
-			<select name="resultsperpage" size="1">
-				<option value="20">20</option>
-				<option value="50">50</option>
-				<option value="100">100</option>
-			</select>
-		</p>
-		<p>Trié par
-			<select name="orderby" size="1">
-				<option value="biblio.title">Titre</option>
-				<option value="biblio.author">Auteur</option>
-				<option value="biblioitems.dewey">code Dewey</option>
-				<option value="biblioitems.publicationyear">Année de Publication</option>
-				<option value="biblioitems.publishercode">Editeur</option>
-				<option value="biblio.timestamp desc">date d'acquisition</option>
-			</select>
-		</p>
-	</div>
-	<p>
-		<input type="submit" value="Lancer la recherche" class="button catalogue">
-		<input type="reset" value="Effacer Tout" class="button catalogue">
-	</p>
-	<div id="bloc60">
-		<h2>Conseils</h2>
-		<h3>Titre</h3>
-		<p>Vous pouvez entrer un titre complet ou partiel. La recherche sera faite aussi sur les sous titre et les autres champs relatifs au titre</p>
-		<h3>Auteur</h3>
-		<p>Vous pouvez entrer un nom ou un prénom. La recherche est aussi faite sur les co-auteurs et les autres champs en relation (traducteur, illustrateur...)</p>
-		<p>N'oubliez pas qu'un auteur peut concerner un auteur physique (Victor Hugo) ou moral (CNRS...)</p>
-		<h3>Sites</h3>
-		<p>Sélectionnez une annexe si vous voulez limiter votre recherche à un site ne particulier. Par défaut, la recherche sera faite sur tous les sites de la bibliothèque</p>
-		<h3>Commencer la recherche</h3>
-		<p>Une recherche est faite sur chaque mot que vous entrez. Les mots vides sont ignorés. Si vous entrez, par exemple "les deux tours" dans le titre, le résultat contiendra tous les mots avec deux ET tours dans le titre. "Les" sera ignoré</p>
-		<p>Si vous voulez entrer une partie de mot, mettez une * ou un % à la fin du mot. Par exemple, "deux tours" donnera "Les deux tours" mais aussi "Une tour et deux maisons"</p>
-	</div>
-</form>
-
-<script type="text/javascript">
-function sql_update() {
-document.f.sql.value="";
-	for (i=0 ; i<document.f.marclist.length ; i++) {
-		if (document.f.value[i].value.length>0) {
-			document.f.sql.value = document.f.sql.value+
-										document.f.and_or[i].value + ' (' +
-										document.f.excluding[i].value + ' ' +
-										document.f.marclist[i].value + ' ' +
-										document.f.operator[i].value + ' ' +
-										'\''+document.f.value[i].value + '\') ';
-		}
-	}
-}
-
-function AddStatement() {
-
-	document.forms[0].op.value="AddStatement";
-	document.f.submit();
-}
-
-function PopupSuggestion() {
-    var strQuery="";
-	for (i=0 ; i<document.f.marclist.length ; i++) {
-		if (document.f.value[i].value.length>0) {
-		    strQuery += " "+document.f.value[i].value;
-		}
-	}
-	newin=window.open("suggest.pl?Q="+strQuery,"Suggestions",'width=500,height=400,toolbar=false,scrollbars=yes');
-}
-
-</script>
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/opac-searchresults.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-searchresults.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-searchresults.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-searchresults.tmpl	1 Mar 2005 13:41:06 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,148 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-<!-- TMPL_IF NAME="searchdesc" -->
-    <p class="center">Recherche sur <b><!-- TMPL_VAR NAME="searchdesc" --></b>. <!-- TMPL_VAR NAME="total" --> réponses trouvées</p>
-<!-- TMPL_ELSE -->
-	<!-- TMPL_IF name="searchnew" -->
-		<p class="center"><!-- TMPL_VAR name=itemtype --> acquis dans les <i><!-- TMPL_VAR name="duration" --></i> derniers jours. <!-- TMPL_VAR NAME="total" --> réponses</p>
-	<!-- TMPL_ELSE -->
-		<p class="center">Vous n'avez précisé aucun critère de recherche</p>
-	<!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-
-<!-- <p class="center"><!-- TMPL_VAR NAME="total" --> results found</p> -->
-	<div id="resultnumber">
-		<p class="center">
-			<!-- TMPL_IF NAME=displayprev -->
-				<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE="URL" -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search">Précédent</a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP NAME="numbers" -->
-				<!-- TMPL_IF NAME="highlight" --><!-- TMPL_VAR NAME="number" --><!-- TMPL_ELSE -->
-					<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME=startfrom -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search"><!-- TMPL_VAR NAME="number" --></a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF NAME=displaynext -->
-				<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search">Suivant >></a>
-				<!-- /TMPL_IF -->
-		</p>
-		<p class="center">
-			<!-- TMPL_IF name=total -->
-				<p class="center">
-					Réponses <i><!-- TMPL_VAR NAME="from" --></i> à <i><!-- TMPL_VAR NAME="to" --></i> sur <i><!-- TMPL_VAR NAME="total" --></i> réponses.
-				</p>
-			<!-- TMPL_ELSE -->
-				Pas de résultats
-			<!-- /TMPL_IF -->
-		</p>
-	</div>
-<!-- Search Results Table -->
-<!-- TMPL_IF NAME="total" -->
-<form action="opac-searchresults.pl" method="get" name="myform">
-<input type="submit" class="button" value="Ajouter les éléments cochés au panier" onclick="addMultiple(); return false;"> <input type="reset" value="Effacer Tout" class="button">
-	<table>
-		<tr>
-			<th colspan="2">Sommaire</th>
-			<th>Nombre d'exemplaires</th>
-			<th>Localisation</th>
-			<th>&nbsp;</th>
-		</tr>
-		<!-- Actual Search Results -->
-		<!-- TMPL_LOOP NAME="results" -->
-			<tr>
-			<td<!-- TMPL_IF name="even" --> class="hilighted"<!-- /TMPL_IF -->><input type="checkbox" name="bibid" value="<!-- TMPL_VAR NAME="biblionumber" -->"></td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<p>
-						<p>
-							<!-- TMPL_IF name="BiblioDefaultViewmarc" -->
-								<b><a class="transparent" href="/cgi-bin/koha/opac-MARCdetail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" --></a></b>
-							<!-- TMPL_ELSE -->
-								<!-- TMPL_IF name="BiblioDefaultViewisbd" -->
-									<b><a class="transparent" href="/cgi-bin/koha/opac-ISBDdetail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" --></a></b>
-								<!-- TMPL_ELSE -->
-									<b><a class="transparent" href="/cgi-bin/koha/opac-detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" --></a></b>
-								<!-- /TMPL_IF -->
-							<!-- /TMPL_IF -->
-						</p>
-						<p><!-- TMPL_VAR NAME="author" -->
-						<!-- TMPL_IF name="publicationyear" --> - <!-- TMPL_VAR name="publicationyear" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="publishercode" -->- <!-- TMPL_VAR name="publishercode" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="place" --> ; <!-- TMPL_VAR name="place" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="pages" --> - <!-- TMPL_VAR name="pages" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="notes" --> : <!-- TMPL_VAR name="notes" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="size" --> ; <!-- TMPL_VAR name="size" --><!-- /TMPL_IF -->
-						<!-- TMPL_IF name="timestamp" --> <i>(modifié le <!-- TMPL_VAR name="timestamp" -->)</i><!-- /TMPL_IF -->
-					</p>
-				</td>
-				<td align="center" <!-- TMPL_IF name="even" --> class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_VAR name="totitem" -->
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_LOOP name="CN" -->
-						<p><!-- TMPL_VAR name="holdingbranch" --> <!-- TMPL_VAR name="location" --> 
-						<!-- TMPL_IF name="date_due" -->
-							<i>(prété jusqu'au <!-- TMPL_VAR name="date_due" -->)</i>
-						<!-- TMPL_ELSE -->
-							<!-- TMPL_IF name="itemcallnumber" -->
-								(<!-- TMPL_VAR name="itemcallnumber" -->)
-							<!-- /TMPL_IF -->
-						<!-- /TMPL_IF -->
-						</p>
-					<!-- /TMPL_LOOP -->
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_UNLESS NAME="norequests" -->
-						<a class="transparent" href="/cgi-bin/koha/opac-reserve.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">Réserver</a>
-					<!-- TMPL_ELSE -->
-						Non Réservable
-					<!-- /TMPL_UNLESS -->
-				</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		<tr>
-			<th>&nbsp;</th>
-			<th colspan="2" align="left">
-				<!-- TMPL_IF NAME="displayprev" -->
-					<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE="URL" -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search"><<<Précédent</a>
-				<!-- TMPL_ELSE -->
-					&nbsp;
-				<!-- /TMPL_IF -->
-			</th>
-			<th colspan="2" align="right">
-				<!-- TMPL_IF NAME="displaynext" -->
-					<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search">Suivant >>></a>
-				<!-- TMPL_ELSE -->
-					&nbsp;
-				<!-- /TMPL_IF -->
-			</th>
-		</tr>
-	</table>
-</form>
-	<p class="center">
-		Réponses <i><!-- TMPL_VAR NAME="from" --></i> à <i><!-- TMPL_VAR NAME="to" --></i> sur <i><!-- TMPL_VAR NAME="total" --></i> réponses.
-	</p>
-
-	<div id="resultnumber">
-		<p class="center">
-			<!-- TMPL_IF NAME="displayprev" -->
-				<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE="URL" -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search">Précédent</a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_LOOP NAME="numbers" -->
-				<!-- TMPL_IF NAME="highlight" --><!-- TMPL_VAR NAME="number" --><!-- TMPL_ELSE -->
-					<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME=startfrom -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search"><!-- TMPL_VAR NAME="number" --></a>
-				<!-- /TMPL_IF -->
-			<!-- /TMPL_LOOP -->
-			<!-- TMPL_IF NAME="displaynext" -->
-				<a class="results" href="opac-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;orderby=<!-- TMPL_VAR NAME="orderby" -->&amp;type=intranet&amp;op=do_search">Suivant >></a>
-				<!-- /TMPL_IF -->
-		</p>
-	</div>
-
-<!-- TMPL_ELSE -->
-	<p class="center">	Désolé, il n'y a aucun résultat </p>
-<!-- /TMPL_IF -->
-
-<p class="center">
-	<a href="/cgi-bin/koha/opac-search.pl" class="button">Autre recherche</a>
-</p>
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/opac-sendbasket.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-sendbasket.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-sendbasket.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-sendbasket.tmpl	1 Mar 2005 13:41:06 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-<SUBJECT>
-Votre panier de notices
-<END_SUBJECT>
-
-<HEADER>
-Bonjour, voici le panier de notices transmis par <!-- TMPL_VAR name="email_sender" -->
-<END_HEADER>
-
-<FILENAME>
-basket.txt
-<END_FILENAME>
-
-<MESSAGE>
----------------------------------------------
-<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" --><!-- TMPL_VAR NAME="title" --> <!-- TMPL_IF name="isbn" -->
-ISBN : <!-- TMPL_VAR NAME="ISBN" --><!-- /TMPL_IF --><!-- TMPL_IF name="subtitle" -->
-Sous-titre: <!-- TMPL_VAR NAME="subtitle" --><!-- /TMPL_IF --><!-- TMPL_IF name="author" -->
-Auteur: <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --><!-- TMPL_IF name="additional" -->
-Autres auteurs : <!-- TMPL_VAR NAME="additional" --><!-- /TMPL_IF --><!-- TMPL_IF name="publishercode" -->
-Publié par : <!-- TMPL_VAR NAME="publishercode" --><!-- /TMPL_IF --><!-- TMPL_IF name="publicationyear" --> en <!-- /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" --><!-- TMPL_IF name="collection" -->
-Collection : <!-- TMPL_VAR NAME="seriestitle" --><!-- /TMPL_IF --><!-- TMPL_IF name="subject" -->
-Mot-clef : <!-- TMPL_VAR NAME="subject" --><!-- /TMPL_IF --><!-- TMPL_IF name="copyrightdate" -->
-Date copyright : <!-- TMPL_VAR NAME="copyrightdate" --><!-- /TMPL_IF --><!-- TMPL_IF name="notes" -->
-Remarques : <!-- TMPL_VAR NAME="notes" --><!-- /TMPL_IF --><!-- TMPL_IF name="unititle" -->
-Titre uniforme : <!-- TMPL_VAR NAME="unititle" --><!-- /TMPL_IF --><!-- TMPL_IF name="serial" -->
-Bulletin : <!-- TMPL_VAR NAME="serial" --><!-- /TMPL_IF --><!-- TMPL_IF name="dewey" -->
-Dewey: <!-- TMPL_VAR name="dewey" --><!-- /TMPL_IF --><!-- TMPL_IF name="classification" -->
-Cote : <!-- TMPL_VAR name="classification" --><!-- /TMPL_IF --><!-- TMPL_IF name="lccn" -->
-LCCN : <!-- TMPL_VAR name="lccn" --><!-- /TMPL_IF --><!-- TMPL_IF name="url" -->
-URL : <!-- TMPL_VAR NAME="url" --><!-- /TMPL_IF -->
----------------------------------------------
-<!-- /TMPL_LOOP -->
-<END_MESSAGE>

Index: koha-tmpl/opac-tmpl/css/fr/opac-sendbasketform.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-sendbasketform.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-sendbasketform.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-sendbasketform.tmpl	1 Mar 2005 13:41:06 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-basket-top.inc" -->
-
-<div id="mainbloc" style="padding-bottom:20px;margin-top:10px;margin-bottom:10px;">
-<h1>Envoyer le panier</h1>
-<!-- TMPL_IF NAME="email_add" -->
-	<!-- TMPL_IF NAME="SENT" -->
-	<p>Le panier a été envoyé à : <!-- TMPL_VAR NAME="email_add" --></p>
-	<!-- TMPL_ELSE -->
-	<p>Problème lors de l'envoi du panier</p>
-	<!-- /TMPL_IF -->
-<!-- TMPL_ELSE -->
-<form action="<!-- TMPL_VAR NAME="url" -->" method="post">
-	<p><label>Message envoyé par</label><input name="email_sender" size="25" /></p>
-	<p><label>adresse e-mail</label><input name="email_add" size="25" /></p>
-	<p><label>&nbsp;</label><input type="submit" value="Envoyer" class="button"></p>
-	<input type='hidden' name="bib_list" value="<!-- TMPL_VAR NAME="bib_list" -->" />
-</form>
-<!-- /TMPL_IF -->
-</div>
-<div id="bottombloc">
-	<p><a href="javascript:this.close()">Fermer</a></p>
-</div>
-<!-- TMPL_INCLUDE NAME="opac-basket-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/opac-serial-issues.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-serial-issues.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-serial-issues.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-serial-issues.tmpl	1 Mar 2005 13:41:06 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,87 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<!--------------------------MAIN BODY OF PAGE-------------------------->
-<div id="mainbloc">
-<h1 class="catalogue">Bulletins</h1>
-<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue">Retour à la notice</a>
-<form method="post" name="f">
-<!-- TMPL_LOOP name="subscription_LOOP" -->
-<div id="bloc60">
-	<h2 class="catalogue">Information d'abonnement pour<!-- TMPL_VAR name="bibliotitle" --></h2>
-		<p>Débutant le <b><!-- TMPL_VAR name="startdate" --></b> et paraissant chaque<b>
-		<!--TMPL_IF name="periodicity1" -->
-				jour
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity2" -->
-				semaine
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity3" -->
-				2 semaines
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity4" -->
-				3 semaines
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity5" -->
-				mois
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity6" -->
-				2 mois
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity7" -->
-				3 mois
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity8" -->
-				trimestre
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity9" -->
-				2 trimestres
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity10" -->
-				année
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="periodicity11" -->
-				2 ans
-		<!-- /TMPL_IF -->
-		</b>
-		Le
-		<b>
-		<!--TMPL_IF name="arrival1" -->
-			Lundi
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival2" -->
-				Mardi
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival3" -->
-				Mercredi
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival4" -->
-				Jeudi
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival5" -->
-				Vendredi
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival6" -->
-				Samedi
-		<!-- /TMPL_IF -->
-		<!--TMPL_IF name="arrival7" -->
-				Dimanche
-		<!-- /TMPL_IF -->
-		</b>
-		pour <b>
-			<!-- TMPL_IF name="numberlength" --><!-- TMPL_VAR name="numberlength" --> prêts<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="weeklength" --><!-- TMPL_VAR name="weeklength" --> mois<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="monthlength" --><!-- TMPL_VAR name="monthlength" --> mois<!-- /TMPL_IF -->
-			</b>
-		depuis <b><!-- TMPl_VAR name="startdate" --></b>
-		</p>
-		<p><!-- TMPL_VAR name="notes" --></p>
-	<!-- TMPL_IF name="opacnotes" -->
-		<h2 class="catalogue">Abrégé des numéros</h2>
-		<p>
-			<!-- TMPL_VAR name="opacnote" -->
-		</p>
-	<!-- /TMPL_IF -->
-</div>
-<!-- /TMPL_LOOP -->
-</div>
-
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/opac-shelves.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-shelves.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-shelves.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-shelves.tmpl	1 Mar 2005 13:41:06 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,188 +0,0 @@
-<!-- TMPL_INCLUDE Name="opac-top.inc" -->
-<div id="mainbloc">
-<!-- TMPL_IF Name="viewshelf" -->
-	<form>
-		<h1><!-- TMPL_VAR NAME="shelfname" --></h1>
-
-		<div>
-		<h2>Contenu de l'étagère virtuelle</h2>
-			<table class="small">
-				<tr colspan="4">
-					<th>Supprimer</th>
-					<th>code à barres</th>
-					<th>Titre</th>
-					<th>Auteur</th>
-				</tr>
-				<!-- TMPL_LOOP Name="itemsloop" -->
-					<tr>
-						<td<!-- TMPL_IF NAME="color" --> class="hilighted"<!-- /TMPL_IF -->><input type="checkbox" name="REM-<!-- TMPL_VAR NAME="itemnumber" -->"></td>
-						<td<!-- TMPL_IF NAME="color" --> class="hilighted"<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="barcode" --></td>
-						<td<!-- TMPL_IF NAME="color" --> class="hilighted"<!-- /TMPL_IF -->><a class="transparent" href="opac-MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a></td>
-						<td<!-- TMPL_IF NAME="color" --> class="hilighted"<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="author" --></td>
-					</tr>
-				<!-- /TMPL_LOOP -->
-			</table>
-			<input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->">
-			<input type="hidden" name="modifyshelfcontents" value="1">
-			<input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->">
-			<!-- TMPL_IF name="manageshelf" -->
-				<input type="submit" value="Supprimer les documents sélectionnés" class="button">
-			<!-- /TMPL_IF -->
-			<a href="opac-shelves.pl" class="button">Liste de l'étagère virtuelle</a>
-		</div>
-	</form>
-
-	<!-- TMPL_IF name="manageshelf" -->
-	<div class="bloc20">
-		<form>
-		<h2>Ajouter un livre par saisie du code barre</h2>
-			<input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->">
-			<input type="hidden" name="modifyshelfcontents" value="1">
-			<input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->">
-			<input name="addbarcode">
-			<input type="hidden" name="modifyshelfcontents" value="1">
-			<input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR NAME="shelfnumber" -->">
-			<input type="submit" value="Enregistrer" class="button">
-		</form>
-	</div>
-	<!-- /TMPL_IF -->
-<!-- TMPL_ELSE -->
-	<!-- TMPL_IF Name="shelves" -->
-		<h1>Etagères</h1>
-		<!-- TMPL_IF Name="status1" -->
-			<p class="problem"><!-- TMPL_VAR NAME="string1" --><p>
-		<!-- /TMPL_IF -->
-		<!-- TMPL_LOOP Name="paramsloop" -->
-			<!-- TMPL_IF Name="status" -->
-				<p class="problem"><!-- TMPL_VAR NAME="string" --><p>
-			<!-- /TMPL_IF -->
-		<!-- /TMPL_LOOP -->
-		<div class="bloc20">
-					<h2>Sélectionner les étagères virtuelles à supprimer</h2>
-					<form method="post">
-					<input type="hidden" name="shelves" value="1">
-						<!-- TMPL_LOOP Name="shelvesloop" -->
-						<!-- TMPL_IF name="canmanage" -->
-						<p>
-							<label>
-								<input type="checkbox" name="DEL-<!-- TMPL_VAR NAME="shelf" -->">
-							</label>
-								<a href="opac-shelves.pl?viewshelf=<!-- TMPL_VAR name="shelf" -->"><!-- TMPL_VAR NAME="shelfname" --></a> (<!-- TMPL_VAR NAME="shelfbookcount" --> document(s))
-						</p>
-						<!-- /TMPL_IF -->
-						<!-- /TMPL_LOOP -->
-					<p>
-						<input type="submit" value="Supprimer étagères" class="button">
-					</p>
-					</form>
-		</div>
-		<div id="bloc60">
-			<form method="post">
-				<input type="hidden" name="shelves" value="1">
-				<h2>Créer une étagère</h2>
-				<p><label>Nom</label><input type="text" name="addshelf" size="25"></p>
-				<p><label>Propriétaire</label><input type="hidden" name="owner" value="<!-- TMPL_VAR NAME="loggedinuser" -->"><!-- TMPL_VAR NAME="loggedinusername" --></p>
-				<p><label>Catégorie</label>
-					<select name="category">
-						<option value="1">Privé</option>
-						<option value="2">Public</option>
-						<option value="3">Libre</option>
-					</select>
-				</p>
-				<ul> <li>Une étagère virtuelle privée est gérée par vous seul, et ne peut être vue que de vous.</li>
-					<li> public peut être vu par tous, mais géré uniquement par vous</li>
-					<li> libre peut être géré par n'importe quel utilisateur</li>
-				</ul>
-				<p>
-					<input type="submit" value="Créer une étagère" class="button">
-					<a href="opac-shelves.pl" class="button">Retour à l'étagère virtuelle</a>
-				</p>
-
-			</form>
-		</div>
-	<!-- TMPL_ELSE -->
-		<div class="bloc60">
-			<h2>Liste de l'étagère virtuelle</h2>
-			<table class="small">
-				<tr>
-					<th>Nom de l'étagère virtuelle</th>
-					<th>Catégorie</th>
-					<th>Contenu taille</th>
-					<th>modifier</th>
-				</tr>
-				<!-- TMPL_LOOP Name="shelvesloop" -->
-				<tr>
-					<td<!-- TMPL_IF NAME="color" --> class="hilighted"<!-- /TMPL_IF -->>
-						<a class="transparent" href="opac-shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelf" -->">
-							<!-- TMPL_VAR NAME="shelfname" -->
-						</a>
-					</td>
-					<td<!-- TMPL_IF NAME="color" --> class="hilighted"<!-- /TMPL_IF -->>
-						<!-- TMPL_IF NAME="category1" -->
-							Privé
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF NAME="category2" -->
-							Public
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF NAME="category3" -->
-							Libre
-						<!-- /TMPL_IF -->
-					</td>
-					<td<!-- TMPL_IF NAME="color" --> class="hilighted"<!-- /TMPL_IF -->>
-						<!-- TMPL_VAR NAME="shelfbookcount" --> documents(s)
-					</td>
-					<!-- TMPL_IF name="mine" -->
-						<td<!-- TMPL_IF NAME="color" --> class="hilighted"<!-- /TMPL_IF -->>
-							<a href="opac-shelves.pl?op=modif&shelf=<!-- TMPL_VAR NAME="shelf" -->" class="button">Modifier</a> <!-- TMPL_VAR name="surname" --><!-- TMPL_VAR name="firstname" -->
-						</td>
-					<!-- /TMPL_IF -->
-				</tr>
-				<!-- /TMPL_LOOP -->
-			</table>
-		</div>
-		<div class="bloc20">
-			<a href="opac-shelves.pl?shelves=1" class="button">Créer ou Supprimer une (des) étagère(s)</a>
-		</div>
-	<!-- /TMPL_IF -->
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="edit" -->
-	<div class="bloc20">
-		<form method="post">
-			<input type="hidden" name="op" value="modifsave">
-			<h2>Modifier l'étagère</h2>
-			<input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR name="shelfnumber" -->">
-			<p><label>Nom</label><input type="text" name="shelfname" size="25" value="<!-- TMPL_VAR name="shelfname"-->"></p>
-			<p><label>Propriétaire</label><input type="hidden" name="owner" value="<!-- TMPL_VAR NAME="loggedinuser" -->"><!-- TMPL_VAR NAME="loggedinusername" --></p>
-			<p><label>Catégorie</label>
-				<select name="category">
-					<!-- TMPL_IF name="category1" -->
-						<option value="1" selected>Privé</option>
-					<!-- TMPL_ELSE -->
-						<option value="1">Privé</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="category2" -->
-						<option value="2" selected>Public</option>
-					<!-- TMPL_ELSE -->
-						<option value="2">Public</option>
-					<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="category3" -->
-						<option value="3" selected>Libre</option>
-					<!-- TMPL_ELSE -->
-						<option value="3">Libre</option>
-					<!-- /TMPL_IF -->
-				</select>
-			</p>
-			<p> <li>Une étagère virtuelle privée est gérée par vous seul, et ne peut être vue que de vous.</li>
-				<li> public peut être vu par tous, mais géré uniquement par vous</li>
-				<li> libre peut être géré par n'importe quel utilisateur</li>
-			</p>
-			<p>
-				<input type="submit" value="Enregistrer" class="button">
-			</p>
-
-		</form>
-	</div>
-<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE Name="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/opac-suggestions.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-suggestions.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-suggestions.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-suggestions.tmpl	1 Mar 2005 13:41:06 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,156 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-<!-- TMPL_IF name="op_add" -->
-	<h1>Saisir une nouvelle suggestion</h1>
-	<p>Remplissez ce formulaire pour suggérer une nouvelle acquisition. Vous serez prévenu par messagerie lorsque la bibliothèque traitera votre suggestion</p>
-	<p>Aucun champ obligatoire. Remplissez les champs que vous connaissez. Le champ "Note" peut être utilisé pour ce que vous voulez</p>
-	<form>
-		<input type="hidden" name="op" value="add_confirm">
-		<p><label>Titre</label><input type="text" name="title" size=60 maxlentgh=80></p>
-		<p><label>Auteur</label><input type="text" name="author" size=60 maxlength=80></p>
-		<p><label>Date copyright</label><input type="text" name="copyrightdate" size="5" maxlength="4"></p>
-		<p><label>Editeur</label><input type="text" name="publishercode" size="60" maxlength="80"></p>
-		<p><label>Volume</label><input type="text" name="volumedesc" size="60" maxlength="80"></p>
-		<p><label>Année de Publication</label><input type="text" name="publicationyear" size="5" maxlength="4"></p>
-		<p><label>Lieu de Publication</label><input type="text" name="place" size="60" maxlength="80"></p>
-		<p><label>ISBN/ISSN</label><input type="text" name="isbn" size="14" maxlength="10"></p>
-		<p><label>Remarque</label><textarea name="note" rows="10" cols="60"></textarea></p>
-		<p><label>&nbsp;</label><input type="submit" value="Envoyer la suggestion à l'équipe de la bibliothèque" class="button"></p>
-	</form>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="op_else" -->
-	<h1>Suggestions d'achat</h1>
-	<table>
-		<tr>
-			<th>&nbsp;</th>
-			<th>Titre</th>
-			<th>Auteur</th>
-			<th>©</th>
-			<th>Editeur</th>
-			<th>Etat</th>
-			<th>Suggéré par</th>
-			<th>Géré par</th>
-			<th>Remarque</th>
-		</tr>
-		<tr>
-			<form>
-				<th>
-					Filtrer sur
-				</th>
-				<th>
-					<input type="text" name="title" value="<!-- TMPL_VAR name="title"-->">
-				</th>
-				<th>
-					<input type="text" name="author" value="<!-- TMPL_VAR name="author" -->">
-				</th>
-				<th>
-					&nbsp;
-				</th>
-				<th>
-					<input type="text" name="publishercode" value="<!-- TMPL_VAR name="publishercode"-->">
-				</th>
-				<th>
-					<select name="status">
-						<option value="">Tout</option>
-						<!-- TMPL_IF name="ASKED" -->
-							<option value="ASKED" selected>Demandé</option>
-						<!-- TMPL_ELSE -->
-							<option value="ASKED">Demandé</option>
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF name="ACCEPTED" -->
-							<option value="ACCEPTED" selected>Accepté</option>
-						<!-- TMPL_ELSE -->
-							<option value="ACCEPTED">Accepté</option>
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF name="ORDERED" -->
-							<option value="ORDERED" selected>Commandé</option>
-						<!-- TMPL_ELSE -->
-							<option value="ORDERED">Commandé</option>
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF name="REJECTED" -->
-							<option value="REJECTED" selected>Rejeté</option>
-						<!-- TMPL_ELSE -->
-							<option value="REJECTED">Rejeté</option>
-						<!-- /TMPL_IF -->
-						<!-- TMPL_IF name="AVAILABLE" -->
-							<option value="AVAILABLE" selected>Disponible</option>
-						<!-- TMPL_ELSE -->
-							<option value="AVAILABLE">Disponible</option>
-						<!-- /TMPL_IF -->
-					</select>
-				</th>
-				<th>
-					<select name="suggestedbyme">
-						<option value="1" <!-- TMPL_IF name="suggestedbyme" -->selected<!-- /TMPL_IF -->>Me</option>
-						<option value="0" <!-- TMPL_UNLESS name="suggestedbyme" -->selected<!-- /TMPL_UNLESS -->>Quelqu'un</option>
-					</select>
-				</th>
-				<th>
-					&nbsp;
-				</th>
-				<th>
-					<input type="submit" class="button" value="Etablir un filtre">
-				</th>
-			</form>
-		</tr>
-		<form>
-			<input type="hidden" name="op" value="delete_confirm">
-		<!-- TMPL_LOOP NAME="suggestions_loop" -->
-			<tr>
-				<td>
-					<input type="checkbox" name="delete_field" value="<!--TMPL_VAR name="suggestionid" -->">
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_VAR NAME="title" -->
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_VAR NAME="author" -->
-				</td>
-				<td align="center"<!-- TMPL_IF name="even" --> class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_VAR NAME="copyrightdate" -->
-				</td>
-				<td align="center" <!-- TMPL_IF name="even" --> class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_VAR name="publishercode" -->
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_IF name="ASKED" -->Demandé<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="ACCEPTED" -->Accepté, sera commandé rapidement<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="ORDERED" -->Commandé par la bibliothèque<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="REJECTED" -->Suggestion rejetée : ne sera pas acheté<!-- /TMPL_IF -->
-					<!-- TMPL_IF name="AVAILABLE" -->Reçu par la bibliothèque<!-- /TMPL_IF -->
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_VAR name="surnamesuggestedby" --><!-- TMPL_IF name="firstnamesuggestedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR name="firstnamesuggestedby" -->
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_VAR name="usermanagedby" --><!-- TMPL_IF name="firstnamemanagedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR name="firstnamemanagedby" -->
-				</td>
-				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-					<!-- TMPL_VAR name="note" -->
-				</td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-		<tr>
-			<td>
-				<input type="submit" class="button" value="Supprimer">
-			</td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-			<td> &nbsp; </td>
-		</tr>
-		</form>
-	</table>
-	<form>
-		<input type="hidden" name="op" value="add">
-		<input type="submit" class="button" value="Saisir une nouvelle suggestion">
-	<br />
-	<p>Note : si vous filtrez sur les suggestions faites par n'importe qui, la liste ne contiendra que les suggestions nouvelles. Les suggestions déjà traitées par un bibliothécaire n'apparaitront pas</p>
-<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/opac-user.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-user.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-user.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-user.tmpl	1 Mar 2005 13:41:06 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,100 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-<div id="mainbloc">
-<!-- TMPL_LOOP NAME="BORROWER_INFO" -->
-	<div class="bloc20">
-		<h2>Ces informations sont-elles correctes ?</h2>
-		<p>Identifiant <!-- TMPL_VAR NAME="cardnumber" --> </p>
-		<p><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="title" -->) </p>
-		<p><!-- TMPL_VAR NAME="streetaddress" -->, <!-- TMPL_VAR NAME="city" --></p>
-		<p><!-- TMPL_VAR NAME="phone" -->(domicile)</p>
-		<p><!-- TMPL_VAR NAME="faxnumber" --> (travail)</p>
-		<p><!-- TMPL_VAR NAME="emailaddress" --></p>
-		<p><a href="/cgi-bin/koha/opac-userupdate.pl" class="button">Mettre à jour</a></p>
-	</div>
-	<!-- TMPL_IF NAME="amountoverfive" -->
-	<div class="bloc20">
-		<h2>Vous devez <!-- TMPL_VAR NAME="amountoutstanding" --></b>
-		<a href="/cgi-bin/koha/opac-account.pl" class="button">Voir le compte</a>
-	</div>
-	<!-- /TMPL_IF -->
-
-	<!-- TMPL_IF NAME="amountoverzero" -->
-	<div class="bloc20">
-		<h2>Vous devez <!-- TMPL_VAR NAME="amountoutstanding" --></h2>
-		<a href="/cgi-bin/koha/opac-account.pl" class="button">Voir le compte</a>
-	</div>
-	<!-- /TMPL_IF -->
-
-	<!-- TMPL_IF NAME"amountlessthanzero" -->
-	<div class="bloc20">
-		<p>Vous avez un crédit de <!-- TMPL_VAR NAME="amountoutstanding" --></p>
-		<a href="/cgi-bin/koha/opac-account.pl" class="button">Voir le compte</a>
-	</div>
-	<!-- /TMPL_IF -->
-
-<!-- /TMPL_LOOP -->
-
-<!-- TMPL_IF NAME="waiting_count" -->
-<div class="bloc60">
-	<h2>Des document réservés vous attendent :</h2>
-	<ul>
-		<!-- TMPL_LOOP NAME="WAITING" -->
-			<li><!-- TMPL_VAR NAME="btitle" -->, à récupérer à <b><!-- TMPL_VAR NAME="branch" --></b></li>
-		<!-- /TMPL_LOOP -->
-	</ul>
-</div>
-<!-- /TMPL_IF -->
-
-<div class="bloc60">
-	<!-- TMPL_IF NAME="issues_count" -->
-		<h2>Vous avez <b><!-- TMPL_VAR NAME="issues_count" --></b> document(s) en cours de prêt</h2>
-		<table>
-			<tr>
-				<th>Titre</th>
-				<th>Auteur</th>
-				<th>Date de retour</th>
-				<th>Type de document</th>
-				<th>Code à barres</th>
-				<th>Payant</th>
-				<th>Renouvelable</th>
-			</tr>
-			<!-- TMPL_LOOP NAME="ISSUES" -->
-				<tr>
-					<td><!-- TMPL_VAR NAME="title" --></td>
-					<td><!-- TMPL_VAR NAME="author" --></td>
-					<td><!-- TMPL_VAR NAME="date_due" --></td>
-					<td><!-- TMPL_VAR NAME="itemtype" --></td>
-					<td><!-- TMPL_VAR NAME="barcode" --></td>
-					<td><!-- TMPL_IF NAME="charges" -->Oui<!-- TMPL_ELSE -->Non<!-- /TMPL_IF --></td>
-					<td><!-- TMPL_IF NAME="status" -->Oui<!-- TMPL_ELSE -->Non<!-- /TMPL_IF --></td>
-				</tr>
-			<!-- /TMPL_LOOP -->
-		</table>
-	<!-- TMPL_ELSE -->
-		<h2>Vous n'avez pas de document en prêt</h2>
-	<!-- /TMPL_IF -->
-</div>
-
-<!-- TMPL_IF NAME="reserves_count" -->
-<div class="bloc60">
-	<h2>Vous avez <b><!-- TMPL_VAR NAME="reserves_count" --></b> document(s) actuellement réservés</h2>
-	<table cellspacing="0" align="center">
-		<tr>
-			<th>Titre</th>
-			<th>Auteur</th>
-			<th>Date de réservation</th>
-		</tr>
-		<!-- TMPL_LOOP NAME="RESERVES" -->
-			<tr valign="top">
-			<td><!-- TMPL_VAR NAME="btitle" --></td>
-			<td><!-- TMPL_VAR NAME="author" --></td>
-			<td><!-- TMPL_VAR NAME="reservedate" --></td>
-			</tr>
-		<!-- /TMPL_LOOP -->
-	</table>
-	<br />
-</div>
-<!-- /TMPL_IF -->
-</div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
-

Index: koha-tmpl/opac-tmpl/css/fr/opac-userupdate.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/opac-userupdate.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/opac-userupdate.tmpl
--- koha-tmpl/opac-tmpl/css/fr/opac-userupdate.tmpl	1 Mar 2005 13:41:06 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-<!-- TMPL_INCLUDE name="opac-top.inc" -->
-
-<div id="mainbloc">
-<h2>Modifier vos informations</h2>
-<p><i>Merci de changer ce qui doit l'être. Un message sera envoyé à  la bibliothèque.<br />
-Vos modifications n'apparaîtront pas avant la validation de la bibliothèque</i></p>
-
-<!-- TMPL_LOOP name="BORROWER_INFO" -->
-<form action="/cgi-bin/koha/opac-userupdate.pl" method="get">
-	<p><label>Nom</label><input type="text"  size="25" value="<!-- TMPL_VAR name='surname' -->"  name="surname" /></p>
-	<p><label>Titre</label><input type="text"  size="25" value="<!-- TMPL_VAR name='title' -->"  name="title" /></p>
-	<p><label>Prénom</label><input type="text"  size="25" value="<!-- TMPL_VAR name='firstname' -->"  name="firstname" /></p>
-	<p><label>Adresse postale</label><input type="text"  size="25" value="<!-- TMPL_VAR name='streetaddress' -->"  name="streetaddress" /></p>
-	<p><label>Ville</label><input type="text"  size="25" value="<!-- TMPL_VAR name='city' -->"  name="city" /></p>
-	<p><label>Téléphone domicile</label><input type="text"  size="25" value="<!-- TMPL_VAR name='phone' -->"  name="phone" /></p>
-	<p><label>N° de téléphone/fax bureau</label><input type="text"  size="25" value="<!-- TMPL_VAR name='faxnumber' -->"  name="faxnumber" /></p>
-	<p><label>E-mail</label><input type="text"  size="25" value="<!-- TMPL_VAR name='emailaddress' -->"  name="emailaddress" /></p>
-	<p><input type="submit" value="Soumettre" class="button"></p>
-</form>
-</div>
-<!-- /TMPL_LOOP -->
-<!-- TMPL_INCLUDE name="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/fr/subject.tmpl
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/fr/subject.tmpl
diff -N koha-tmpl/opac-tmpl/css/fr/subject.tmpl
--- koha-tmpl/opac-tmpl/css/fr/subject.tmpl	24 Nov 2004 16:09:45 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,42 +0,0 @@
-<!-- TMPL_INCLUDE NAME="opac-top.inc" -->
-
-<center>
-
-<table border=0 cellspacing=0 cellpadding=2>
-<tr bgcolor="#99cccc" background="<!-- TMPL_VAR NAME="themelang" -->/images/background-opac.gif">
-<th>Mot-clef</th></tr>
-<!-- TMPL_LOOP NAME=SEARCH_RESULTS -->
-  <tr>
-  <td><a href="./dosearch.pl?&subjectitems=<!-- TMPL_VAR NAME=subject2 ESCAPE=URL -->"><!-- TMPL_VAR NAME=subject --></a></td>
-  </tr>
-<!-- /TMPL_LOOP -->
-<tr bgcolor="#99cccc" background="<!-- TMPL_VAR NAME="themelang" -->/images/background-opac.gif"><td colspan=4>
-&nbsp;</td></tr>
-</table>
-<br>
-Résultats <!-- TMPL_VAR NAME="startfrom" --> à <!-- TMPL_VAR NAME="endat" --> sur <!-- TMPL_VAR NAME="numrecords" --> réponses
-<br>
-    <!-- TMPL_IF NAME="displayprev" -->
-		<a href="./dosearch.pl?startfrom=<!-- TMPL_VAR NAME="prevstartfrom" --><!-- TMPL_LOOP NAME="FORMINPUTS" -->&<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE=URL --><!-- /TMPL_LOOP -->">
-			<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border=0>
-		</a>
-    <!-- TMPL_ELSE -->
-		<img src=<!-- TMPL_VAR NAME="themelang" -->/images/numbers/placeholder.gif border=0>
-    <!-- /TMPL_IF -->
-    <!-- TMPL_LOOP NAME="numbers" -->
-	<!-- TMPL_IF NAME="highlight" -->
-	    <img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME=number -->-highlight.gif"> 
-	<!-- TMPL_ELSE -->
-	    <a href="./dosearch.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="FORMINPUTS" -->&<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE=URL --><!-- /TMPL_LOOP -->"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME=number -->.gif" border=0></a> 
-	<!-- /TMPL_IF -->
-    <!-- /TMPL_LOOP -->
-    <!-- TMPL_IF NAME="displaynext" -->
-	<a href="./dosearch.pl?startfrom=<!-- TMPL_VAR NAME="nextstartfrom" --><!-- TMPL_LOOP NAME="FORMINPUTS" -->&<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE=URL --><!-- /TMPL_LOOP -->"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border=0></a>
-    <!-- TMPL_ELSE -->
-	<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/placeholder.gif" border=0>
-    <!-- /TMPL_IF -->
-<hr>
-
-
-
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/AF.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/AF.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/AF.gif
Binary files /tmp/cvspSTtkH and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/AV.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/AV.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/AV.gif
Binary files /tmp/cvseESnNF and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/AVA.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/AVA.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/AVA.gif
Binary files /tmp/cvshhk4PG and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/AVJ.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/AVJ.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/AVJ.gif
Binary files /tmp/cvswMFz6J and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/AVJNF.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/AVJNF.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/AVJNF.gif
Binary files /tmp/cvsd00ZGI and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/AVNF.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/AVNF.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/AVNF.gif
Binary files /tmp/cvswr1y0L and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Audiobook.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Audiobook.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Audiobook.gif
Binary files /tmp/cvs3rLPTM and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Biography.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Biography.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Biography.gif
Binary files /tmp/cvswUuDwL and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Book on CD.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Book on CD.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Book on CD.gif
Binary files /tmp/cvsdgdDHO and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Book on Tape.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Book on Tape.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Book on Tape.gif
Binary files /tmp/cvsmAL2kN and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/CD-ROM software.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/CD-ROM software.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/CD-ROM software.gif
Binary files /tmp/cvszcd0fO and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/CDM.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/CDM.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/CDM.gif
Binary files /tmp/cvsubkOLR and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/DVD.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/DVD.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/DVD.gif
Binary files /tmp/cvsxYbnpT and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/EASY.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/EASY.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/EASY.gif
Binary files /tmp/cvsTom4gL and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/EDLS.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/EDLS.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/EDLS.gif
Binary files /tmp/cvsEqHQ5J and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Ed. Curriculum.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Ed. Curriculum.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Ed. Curriculum.gif
Binary files /tmp/cvsjKtNvN and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/FLAG.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/FLAG.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/FLAG.gif
Binary files /tmp/cvsGGHLxM and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Faculty Course Materials.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Faculty Course Materials.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Faculty Course Materials.gif
Binary files /tmp/cvslWHc9P and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Fiction, large print.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Fiction, large print.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Fiction, large print.gif
Binary files /tmp/cvssDJQRQ and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Fiction.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Fiction.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Fiction.gif
Binary files /tmp/cvsraZesP and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/JB.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/JB.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/JB.gif
Binary files /tmp/cvscUNYES and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/JF.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/JF.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/JF.gif
Binary files /tmp/cvslGOilR and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/JNF.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/JNF.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/JNF.gif
Binary files /tmp/cvsWYu5cS and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/JREF.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/JREF.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/JREF.gif
Binary files /tmp/cvsP4HHuV and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile audiobook.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile audiobook.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile audiobook.gif
Binary files /tmp/cvsMiySRT and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile biography.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile biography.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile biography.gif
Binary files /tmp/cvs9pgr5W and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile book-tape kit.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile book-tape kit.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile book-tape kit.gif
Binary files /tmp/cvsOvm5ZX and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile fiction.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile fiction.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile fiction.gif
Binary files /tmp/cvs7UvJUW and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile non-fiction.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile non-fiction.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile non-fiction.gif
Binary files /tmp/cvsYMzr9Z and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile picture books.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile picture books.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile picture books.gif
Binary files /tmp/cvstzN5WY and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile reference.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile reference.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Juvenile reference.gif
Binary files /tmp/cvsyPs1Y1 and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/KIT.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/KIT.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/KIT.gif
Binary files /tmp/cvslYT7W2 and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/LP.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/LP.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/LP.gif
Binary files /tmp/cvskqYnJ1 and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/LPNF.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/LPNF.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/LPNF.gif
Binary files /tmp/cvs7ASXX4 and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Local history.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Local history.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Local history.gif
Binary files /tmp/cvsS0Unj3 and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/MAG.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/MAG.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/MAG.gif
Binary files /tmp/cvszQLYk4 and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/MFLM.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/MFLM.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/MFLM.gif
Binary files /tmp/cvsmRMpv7 and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/MZ.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/MZ.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/MZ.gif
Binary files /tmp/cvsoD0X45 and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Magazine.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Magazine.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Magazine.gif
Binary files /tmp/cvsXkKRk9 and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Microfiche.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Microfiche.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Microfiche.gif
Binary files /tmp/cvs8jDmga and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Microfilm.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Microfilm.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Microfilm.gif
Binary files /tmp/cvsNmpSM8 and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Music CD.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Music CD.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Music CD.gif
Binary files /tmp/cvsgxTL3b and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Mystery.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Mystery.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Mystery.gif
Binary files /tmp/cvsVP68Da and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Non-fiction, large print.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Non-fiction, large print.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Non-fiction, large print.gif
Binary files /tmp/cvsk0s1Eb and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Non-fiction.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Non-fiction.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Non-fiction.gif
Binary files /tmp/cvs7jvPlf and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/PB.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/PB.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/PB.gif
Binary files /tmp/cvskS0RId and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/PF.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/PF.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/PF.gif
Binary files /tmp/cvsjLayZg and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Pamphlet.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Pamphlet.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Pamphlet.gif
Binary files /tmp/cvsQpGtwf and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Paperback romance.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Paperback romance.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Paperback romance.gif
Binary files /tmp/cvsHqlUug and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Rare Book.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Rare Book.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Rare Book.gif
Binary files /tmp/cvsYIuCAj and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Reference.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Reference.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Reference.gif
Binary files /tmp/cvstUYZci and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/SIRS.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/SIRS.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/SIRS.gif
Binary files /tmp/cvsOOZf9i and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/SS.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/SS.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/SS.gif
Binary files /tmp/cvsBr7gmm and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Science fiction & Fantasy.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Science fiction & Fantasy.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Science fiction & Fantasy.gif
Binary files /tmp/cvs6HhAVk and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Video disc.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Video disc.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Video disc.gif
Binary files /tmp/cvsDqbQbo and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette, juvenile non-fiction.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette, juvenile non-fiction.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette, juvenile non-fiction.gif
Binary files /tmp/cvsQ2489o and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette, juvenile.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette, juvenile.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette, juvenile.gif
Binary files /tmp/cvs1t3GJn and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette, non-fiction.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette, non-fiction.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette, non-fiction.gif
Binary files /tmp/cvsCYrp4q and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Videocassette.gif
Binary files /tmp/cvstBrV6p and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Vinyl Sound Recordings.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Vinyl Sound Recordings.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Vinyl Sound Recordings.gif
Binary files /tmp/cvsMy3oWt and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/WEB.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/WEB.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/WEB.gif
Binary files /tmp/cvsOomcCv and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Western.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Western.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Western.gif
Binary files /tmp/cvsbMY45u and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/YA.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/YA.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/YA.gif
Binary files /tmp/cvsc8UnHw and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/YAC.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/YAC.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/YAC.gif
Binary files /tmp/cvstgwIox and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Young Adult fiction.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Young Adult fiction.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Young Adult fiction.gif
Binary files /tmp/cvsGACdIA and /dev/null differ

Index: koha-tmpl/opac-tmpl/css/itemtypeimg/Young Adult non fiction.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/css/itemtypeimg/Young Adult non fiction.gif
diff -N koha-tmpl/opac-tmpl/css/itemtypeimg/Young Adult non fiction.gif
Binary files /tmp/cvs5Gcdjz and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/background-mem.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/background-mem.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/background-mem.gif
Binary files /tmp/cvsWRIy1z and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/background-opac.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/background-opac.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/background-opac.gif
Binary files /tmp/cvstSSkfD and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/front-arrow.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/front-arrow.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/front-arrow.gif
Binary files /tmp/cvsmefyOB and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/front-background-med.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/front-background-med.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/front-background-med.gif
Binary files /tmp/cvsitdX7E and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/holder.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/holder.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/holder.gif
Binary files /tmp/cvs5REb2F and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/inside-koha-bottom.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/inside-koha-bottom.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/inside-koha-bottom.gif
Binary files /tmp/cvsSi2CCE and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/1-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/1-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/1-highlight.gif
Binary files /tmp/cvsPwXchI and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/1.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/1.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/1.gif
Binary files /tmp/cvsilRLtH and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/10-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/10-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/10-highlight.gif
Binary files /tmp/cvs7ouFRI and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/10.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/10.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/10.gif
Binary files /tmp/cvs0aywNM and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/11-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/11-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/11-highlight.gif
Binary files /tmp/cvs397MSL and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/11.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/11.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/11.gif
Binary files /tmp/cvspWnQPN and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/12-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/12-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/12-highlight.gif
Binary files /tmp/cvsOithrR and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/12.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/12.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/12.gif
Binary files /tmp/cvsjesBoQ and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/13-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/13-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/13-highlight.gif
Binary files /tmp/cvsUCafdU and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/13.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/13.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/13.gif
Binary files /tmp/cvsjBEL5S and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/14-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/14-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/14-highlight.gif
Binary files /tmp/cvsklC0kW and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/14.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/14.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/14.gif
Binary files /tmp/cvsITiPZN and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/15-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/15-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/15-highlight.gif
Binary files /tmp/cvshrxsHO and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/15.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/15.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/15.gif
Binary files /tmp/cvsWLH6EN and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/16-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/16-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/16-highlight.gif
Binary files /tmp/cvsFRuQSQ and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/16.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/16.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/16.gif
Binary files /tmp/cvsksJ4sP and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/17-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/17-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/17-highlight.gif
Binary files /tmp/cvsxX8icQ and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/17.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/17.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/17.gif
Binary files /tmp/cvs2SVUOT and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/18-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/18-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/18-highlight.gif
Binary files /tmp/cvs3RaUuS and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/18.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/18.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/18.gif
Binary files /tmp/cvsIygB4V and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/19-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/19-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/19-highlight.gif
Binary files /tmp/cvsHto7RU and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/19.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/19.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/19.gif
Binary files /tmp/cvsItREtY and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/2-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/2-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/2-highlight.gif
Binary files /tmp/cvs300Y3W and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/2.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/2.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/2.gif
Binary files /tmp/cvsGETyj0 and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/20-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/20-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/20-highlight.gif
Binary files /tmp/cvsjSQsb1 and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/20.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/20.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/20.gif
Binary files /tmp/cvs4idHF2 and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/21-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/21-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/21-highlight.gif
Binary files /tmp/cvsVXLiD3 and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/21.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/21.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/21.gif
Binary files /tmp/cvsWNiLc2 and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/22-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/22-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/22-highlight.gif
Binary files /tmp/cvsBCI0z5 and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/22.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/22.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/22.gif
Binary files /tmp/cvsskasl4 and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/23-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/23-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/23-highlight.gif
Binary files /tmp/cvstGqqJ7 and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/23.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/23.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/23.gif
Binary files /tmp/cvskr84A8 and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/24-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/24-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/24-highlight.gif
Binary files /tmp/cvsfiMm06 and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/24.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/24.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/24.gif
Binary files /tmp/cvse4Tjua and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/25-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/25-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/25-highlight.gif
Binary files /tmp/cvsVq1h18 and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/25.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/25.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/25.gif
Binary files /tmp/cvsO2d6G9 and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/26-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/26-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/26-highlight.gif
Binary files /tmp/cvsv6tRWc and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/26.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/26.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/26.gif
Binary files /tmp/cvsGtOTLb and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/27-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/27-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/27-highlight.gif
Binary files /tmp/cvsp6ugNe and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/27.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/27.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/27.gif
Binary files /tmp/cvscko7If and /dev/null differ

Index: koha-tmpl/opac-tmpl/default/all/images/numbers/28-highlight.gif
===================================================================
RCS file: koha-tmpl/opac-tmpl/default/all/images/numbers/28-highlight.gif
diff -N koha-tmpl/opac-tmpl/default/all/images/numbers/28-highlight.gif
Binary files /tmp/cvsFRJSke and /dev/null differ





More information about the Koha-cvs mailing list