[Koha-cvs] koha ./ISBDdetail.pl ./MARCdetail.pl ./about.pl... [rel_2_2]

Joshua Ferraro jmf at kados.org
Sat Feb 4 22:26:50 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	rel_2_2
Changes by:	Joshua Ferraro <kados at savannah.gnu.org>	06/02/04 21:26:48

Modified files:
	.              : ISBDdetail.pl MARCdetail.pl about.pl 
	                 admin-home.pl bookcount.pl boraccount.pl 
	                 bull-home.pl catalogue-home.pl detail.pl 
	                 help.pl mainpage.pl mancredit.pl modbib.pl 
	                 modbibitem.pl moditem.pl modwebsites.pl 
	                 moredetail.pl overdue.pl pay.pl readingrec.pl 
	                 reports-home.pl reservereport.pl stats.pl 
	                 updatebiblio.pl 
	acqui          : acqui-home.pl acquire.pl basket.pl 
	                 histsearch.pl newbiblio.pl order.pl receive.pl 
	                 recieveorder.pl select-late.pl 
	                 suggestion-select.pl supplier.pl 
	acqui.simple   : addbiblio-nomarc.pl addbiblio.pl addbooks.pl 
	                 additem-nomarc.pl additem.pl 
	admin          : aqbookfund.pl aqbudget.pl 
	                 auth_subfields_structure.pl 
	                 auth_tag_structure.pl authorised_values.pl 
	                 authtypes.pl biblio_framework.pl branches.pl 
	                 categorie.pl categoryitem.pl checkmarc.pl 
	                 currency.pl issuingrules.pl itemtypes.pl 
	                 koha2marclinks.pl marc_subfields_structure.pl 
	                 marctagstructure.pl printers.pl stopwords.pl 
	                 systempreferences.pl thesaurus.pl 
	                 z3950servers.pl 
	authorities    : auth_finder.pl authorities-home.pl 
	                 authorities.pl blinddetail-biblio-search.pl 
	                 detail-biblio-search.pl detail.pl 
	barcodes       : barcodes.pl printerConfig.pl 
	bookshelves    : addbookbybiblionumber.pl shelves.pl 
	bull           : acqui-search.pl lateissues.pl order.pl 
	                 receipt.pl serial-issues.pl statecollection.pl 
	                 subscription-add.pl subscription-bib-search.pl 
	                 subscription-renew.pl 
	circ           : branchtransfers.pl circulation.pl reserve.pl 
	                 returns.pl selectbranchprinter.pl 
	export         : marc.pl 
	import         : breeding.pl 
	maint          : catmaintain.pl 
	members        : deletemem.pl imemberentry.pl jmemberentry.pl 
	                 member-flags.pl member-password.pl member.pl 
	                 memberentry.pl members-home.pl moremember.pl 
	                 newimember.pl newjmember.pl newmember.pl 
	reports        : acquisitions_stats.pl bor_issues_top.pl 
	                 borrowers_out.pl borrowers_stats.pl 
	                 cat_issues_top.pl catalogue_out.pl inventory.pl 
	                 issues_avg_stats.pl issues_stats.pl manager.pl 
	                 manager2.pl reports-home.pl 
	search.marc    : dictionary.pl search.pl suggest.pl 
	suggestion     : acceptorreject.pl 
	z3950          : search.pl 

Log message:
	Adds support for intranetcolorstylesheet

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/ISBDdetail.pl.diff?only_with_tag=rel_2_2&tr1=1.4.2.2&tr2=1.4.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/MARCdetail.pl.diff?only_with_tag=rel_2_2&tr1=1.25.2.16&tr2=1.25.2.17&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/about.pl.diff?only_with_tag=rel_2_2&tr1=1.4.4.1&tr2=1.4.4.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin-home.pl.diff?only_with_tag=rel_2_2&tr1=1.8.4.2&tr2=1.8.4.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bookcount.pl.diff?only_with_tag=rel_2_2&tr1=1.8.2.1&tr2=1.8.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/boraccount.pl.diff?only_with_tag=rel_2_2&tr1=1.8.4.1&tr2=1.8.4.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bull-home.pl.diff?only_with_tag=rel_2_2&tr1=1.2.2.1&tr2=1.2.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/catalogue-home.pl.diff?only_with_tag=rel_2_2&tr1=1.11&tr2=1.11.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/detail.pl.diff?only_with_tag=rel_2_2&tr1=1.24.2.2&tr2=1.24.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/help.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.1&tr2=1.1.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/mainpage.pl.diff?only_with_tag=rel_2_2&tr1=1.9.2.1&tr2=1.9.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/mancredit.pl.diff?only_with_tag=rel_2_2&tr1=1.10&tr2=1.10.4.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/modbib.pl.diff?only_with_tag=rel_2_2&tr1=1.14&tr2=1.14.4.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/modbibitem.pl.diff?only_with_tag=rel_2_2&tr1=1.14&tr2=1.14.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/moditem.pl.diff?only_with_tag=rel_2_2&tr1=1.8&tr2=1.8.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/modwebsites.pl.diff?only_with_tag=rel_2_2&tr1=1.4&tr2=1.4.4.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/moredetail.pl.diff?only_with_tag=rel_2_2&tr1=1.25.2.1&tr2=1.25.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/overdue.pl.diff?only_with_tag=rel_2_2&tr1=1.9.2.5&tr2=1.9.2.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/pay.pl.diff?only_with_tag=rel_2_2&tr1=1.9.2.2&tr2=1.9.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/readingrec.pl.diff?only_with_tag=rel_2_2&tr1=1.12.2.2&tr2=1.12.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports-home.pl.diff?only_with_tag=rel_2_2&tr1=1.6&tr2=1.6.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reservereport.pl.diff?only_with_tag=rel_2_2&tr1=1.3.4.1&tr2=1.3.4.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/stats.pl.diff?only_with_tag=rel_2_2&tr1=1.10&tr2=1.10.4.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/updatebiblio.pl.diff?only_with_tag=rel_2_2&tr1=1.10&tr2=1.10.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/acqui-home.pl.diff?only_with_tag=rel_2_2&tr1=1.3.2.1&tr2=1.3.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/acquire.pl.diff?only_with_tag=rel_2_2&tr1=1.18&tr2=1.18.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/basket.pl.diff?only_with_tag=rel_2_2&tr1=1.24.2.6&tr2=1.24.2.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/histsearch.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.4&tr2=1.1.2.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/newbiblio.pl.diff?only_with_tag=rel_2_2&tr1=1.21.2.3&tr2=1.21.2.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/order.pl.diff?only_with_tag=rel_2_2&tr1=1.14&tr2=1.14.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/receive.pl.diff?only_with_tag=rel_2_2&tr1=1.13&tr2=1.13.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/recieveorder.pl.diff?only_with_tag=rel_2_2&tr1=1.9.2.2&tr2=1.9.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/select-late.pl.diff?only_with_tag=rel_2_2&tr1=1.1&tr2=1.1.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/suggestion-select.pl.diff?only_with_tag=rel_2_2&tr1=1.3.2.2&tr2=1.3.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/supplier.pl.diff?only_with_tag=rel_2_2&tr1=1.9&tr2=1.9.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui.simple/addbiblio-nomarc.pl.diff?only_with_tag=rel_2_2&tr1=1.2.4.1&tr2=1.2.4.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui.simple/addbiblio.pl.diff?only_with_tag=rel_2_2&tr1=1.52.2.15&tr2=1.52.2.16&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui.simple/addbooks.pl.diff?only_with_tag=rel_2_2&tr1=1.22.2.1&tr2=1.22.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui.simple/additem-nomarc.pl.diff?only_with_tag=rel_2_2&tr1=1.4.2.1&tr2=1.4.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui.simple/additem.pl.diff?only_with_tag=rel_2_2&tr1=1.27.2.9&tr2=1.27.2.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/aqbookfund.pl.diff?only_with_tag=rel_2_2&tr1=1.19.2.6&tr2=1.19.2.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/aqbudget.pl.diff?only_with_tag=rel_2_2&tr1=1.16.2.2&tr2=1.16.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/auth_subfields_structure.pl.diff?only_with_tag=rel_2_2&tr1=1.3.2.1&tr2=1.3.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/auth_tag_structure.pl.diff?only_with_tag=rel_2_2&tr1=1.2.2.1&tr2=1.2.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/authorised_values.pl.diff?only_with_tag=rel_2_2&tr1=1.14.2.1&tr2=1.14.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/authtypes.pl.diff?only_with_tag=rel_2_2&tr1=1.3&tr2=1.3.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/biblio_framework.pl.diff?only_with_tag=rel_2_2&tr1=1.2&tr2=1.2.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/branches.pl.diff?only_with_tag=rel_2_2&tr1=1.27.2.3&tr2=1.27.2.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/categorie.pl.diff?only_with_tag=rel_2_2&tr1=1.16.2.2&tr2=1.16.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/categoryitem.pl.diff?only_with_tag=rel_2_2&tr1=1.9&tr2=1.9.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/checkmarc.pl.diff?only_with_tag=rel_2_2&tr1=1.6.2.1&tr2=1.6.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/currency.pl.diff?only_with_tag=rel_2_2&tr1=1.10.2.1&tr2=1.10.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/issuingrules.pl.diff?only_with_tag=rel_2_2&tr1=1.3.2.2&tr2=1.3.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/itemtypes.pl.diff?only_with_tag=rel_2_2&tr1=1.16.2.4&tr2=1.16.2.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/koha2marclinks.pl.diff?only_with_tag=rel_2_2&tr1=1.11&tr2=1.11.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/marc_subfields_structure.pl.diff?only_with_tag=rel_2_2&tr1=1.32.2.5&tr2=1.32.2.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/marctagstructure.pl.diff?only_with_tag=rel_2_2&tr1=1.25.2.3&tr2=1.25.2.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/printers.pl.diff?only_with_tag=rel_2_2&tr1=1.10.2.1&tr2=1.10.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/stopwords.pl.diff?only_with_tag=rel_2_2&tr1=1.12.2.1&tr2=1.12.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/systempreferences.pl.diff?only_with_tag=rel_2_2&tr1=1.22.2.6&tr2=1.22.2.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/thesaurus.pl.diff?only_with_tag=rel_2_2&tr1=1.11&tr2=1.11.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/admin/z3950servers.pl.diff?only_with_tag=rel_2_2&tr1=1.9.2.1&tr2=1.9.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/authorities/auth_finder.pl.diff?only_with_tag=rel_2_2&tr1=1.5.2.3&tr2=1.5.2.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/authorities/authorities-home.pl.diff?only_with_tag=rel_2_2&tr1=1.8.2.3&tr2=1.8.2.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/authorities/authorities.pl.diff?only_with_tag=rel_2_2&tr1=1.8.2.5&tr2=1.8.2.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/authorities/blinddetail-biblio-search.pl.diff?only_with_tag=rel_2_2&tr1=1.4.2.2&tr2=1.4.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/authorities/detail-biblio-search.pl.diff?only_with_tag=rel_2_2&tr1=1.1&tr2=1.1.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/authorities/detail.pl.diff?only_with_tag=rel_2_2&tr1=1.2.2.1&tr2=1.2.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/barcodes/barcodes.pl.diff?only_with_tag=rel_2_2&tr1=1.3.2.1&tr2=1.3.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/barcodes/printerConfig.pl.diff?only_with_tag=rel_2_2&tr1=1.2&tr2=1.2.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bookshelves/addbookbybiblionumber.pl.diff?only_with_tag=rel_2_2&tr1=1.3&tr2=1.3.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bookshelves/shelves.pl.diff?only_with_tag=rel_2_2&tr1=1.5.2.2&tr2=1.5.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bull/acqui-search.pl.diff?only_with_tag=rel_2_2&tr1=1.2&tr2=1.2.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bull/lateissues.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.1&tr2=1.1.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bull/order.pl.diff?only_with_tag=rel_2_2&tr1=1.4&tr2=1.4.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bull/receipt.pl.diff?only_with_tag=rel_2_2&tr1=1.2&tr2=1.2.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bull/serial-issues.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.1&tr2=1.1.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bull/statecollection.pl.diff?only_with_tag=rel_2_2&tr1=1.3.2.7&tr2=1.3.2.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bull/subscription-add.pl.diff?only_with_tag=rel_2_2&tr1=1.5&tr2=1.5.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bull/subscription-bib-search.pl.diff?only_with_tag=rel_2_2&tr1=1.3.2.1&tr2=1.3.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/bull/subscription-renew.pl.diff?only_with_tag=rel_2_2&tr1=1.1&tr2=1.1.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/circ/branchtransfers.pl.diff?only_with_tag=rel_2_2&tr1=1.20.4.3&tr2=1.20.4.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/circ/circulation.pl.diff?only_with_tag=rel_2_2&tr1=1.81.2.7&tr2=1.81.2.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/circ/reserve.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.3&tr2=1.1.2.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/circ/returns.pl.diff?only_with_tag=rel_2_2&tr1=1.37.2.2&tr2=1.37.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/circ/selectbranchprinter.pl.diff?only_with_tag=rel_2_2&tr1=1.13&tr2=1.13.4.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/export/marc.pl.diff?only_with_tag=rel_2_2&tr1=1.4.2.2&tr2=1.4.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/import/breeding.pl.diff?only_with_tag=rel_2_2&tr1=1.2.4.1&tr2=1.2.4.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/maint/catmaintain.pl.diff?only_with_tag=rel_2_2&tr1=1.6&tr2=1.6.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/members/deletemem.pl.diff?only_with_tag=rel_2_2&tr1=1.4.2.4&tr2=1.4.2.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/members/imemberentry.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.1&tr2=1.1.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/members/jmemberentry.pl.diff?only_with_tag=rel_2_2&tr1=1.1&tr2=1.1.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/members/member-flags.pl.diff?only_with_tag=rel_2_2&tr1=1.3.2.1&tr2=1.3.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/members/member-password.pl.diff?only_with_tag=rel_2_2&tr1=1.3&tr2=1.3.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/members/member.pl.diff?only_with_tag=rel_2_2&tr1=1.2.2.6&tr2=1.2.2.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/members/memberentry.pl.diff?only_with_tag=rel_2_2&tr1=1.5.2.10&tr2=1.5.2.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/members/members-home.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.1&tr2=1.1.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/members/moremember.pl.diff?only_with_tag=rel_2_2&tr1=1.5.2.10&tr2=1.5.2.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/members/newimember.pl.diff?only_with_tag=rel_2_2&tr1=1.2&tr2=1.2.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/members/newjmember.pl.diff?only_with_tag=rel_2_2&tr1=1.4&tr2=1.4.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/members/newmember.pl.diff?only_with_tag=rel_2_2&tr1=1.2&tr2=1.2.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/acquisitions_stats.pl.diff?only_with_tag=rel_2_2&tr1=1.4.2.4&tr2=1.4.2.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/bor_issues_top.pl.diff?only_with_tag=rel_2_2&tr1=1.3.2.3&tr2=1.3.2.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/borrowers_out.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.4&tr2=1.1.2.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/borrowers_stats.pl.diff?only_with_tag=rel_2_2&tr1=1.7.2.3&tr2=1.7.2.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/cat_issues_top.pl.diff?only_with_tag=rel_2_2&tr1=1.5.2.3&tr2=1.5.2.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/catalogue_out.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.2&tr2=1.1.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/inventory.pl.diff?only_with_tag=rel_2_2&tr1=1.1.4.1&tr2=1.1.4.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/issues_avg_stats.pl.diff?only_with_tag=rel_2_2&tr1=1.2.2.1&tr2=1.2.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/issues_stats.pl.diff?only_with_tag=rel_2_2&tr1=1.7.2.7&tr2=1.7.2.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/manager.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.1&tr2=1.1.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/manager2.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.1&tr2=1.1.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/reports/reports-home.pl.diff?only_with_tag=rel_2_2&tr1=1.1.2.1&tr2=1.1.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/search.marc/dictionary.pl.diff?only_with_tag=rel_2_2&tr1=1.6.2.4&tr2=1.6.2.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/search.marc/search.pl.diff?only_with_tag=rel_2_2&tr1=1.22.2.4&tr2=1.22.2.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/search.marc/suggest.pl.diff?only_with_tag=rel_2_2&tr1=1.2&tr2=1.2.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/suggestion/acceptorreject.pl.diff?only_with_tag=rel_2_2&tr1=1.1&tr2=1.1.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/z3950/search.pl.diff?only_with_tag=rel_2_2&tr1=1.3.2.2&tr2=1.3.2.3&r1=text&r2=text

Patches:
Index: koha/ISBDdetail.pl
diff -u koha/ISBDdetail.pl:1.4.2.2 koha/ISBDdetail.pl:1.4.2.3
--- koha/ISBDdetail.pl:1.4.2.2	Fri Sep 23 11:09:28 2005
+++ koha/ISBDdetail.pl	Sat Feb  4 21:26:47 2006
@@ -126,7 +126,9 @@
 # remove empty ()
 $res =~ s/\(\)//g;
 $template->param(ISBD => $res,
-				biblionumber => $biblionumber);
+		biblionumber => $biblionumber,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),	
+		);
 
 output_html_with_http_headers $query, $cookie, $template->output;
 
Index: koha/MARCdetail.pl
diff -u koha/MARCdetail.pl:1.25.2.16 koha/MARCdetail.pl:1.25.2.17
--- koha/MARCdetail.pl:1.25.2.16	Thu Jan  5 15:10:16 2006
+++ koha/MARCdetail.pl	Sat Feb  4 21:26:47 2006
@@ -253,6 +253,7 @@
 						subscriptionsnumber => $subscriptionsnumber,
 						popup => $popup,
 						hide_marc => C4::Context->preference('hide_marc'),
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 						);
 output_html_with_http_headers $query, $cookie, $template->output;
 
Index: koha/about.pl
diff -u koha/about.pl:1.4.4.1 koha/about.pl:1.4.4.2
--- koha/about.pl:1.4.4.1	Tue Jan 11 15:35:26 2005
+++ koha/about.pl	Sat Feb  4 21:26:47 2006
@@ -32,6 +32,7 @@
 					perlVersion        => $perlVersion,
 					mysqlVersion       => $mysqlVersion,
 					apacheVersion      => $apacheVersion,
+					intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 		);
 
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/acqui.simple/addbiblio-nomarc.pl
diff -u koha/acqui.simple/addbiblio-nomarc.pl:1.2.4.1 koha/acqui.simple/addbiblio-nomarc.pl:1.2.4.2
--- koha/acqui.simple/addbiblio-nomarc.pl:1.2.4.1	Fri Mar 25 12:52:42 2005
+++ koha/acqui.simple/addbiblio-nomarc.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: addbiblio-nomarc.pl,v 1.2.4.1 2005/03/25 12:52:42 tipaul Exp $
+# $Id: addbiblio-nomarc.pl,v 1.2.4.2 2006/02/04 21:26:47 kados Exp $
 
 #
 # TODO
@@ -26,6 +26,9 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 # $Log: addbiblio-nomarc.pl,v $
+# Revision 1.2.4.2  2006/02/04 21:26:47  kados
+# Adds support for intranetcolorstylesheet
+#
 # Revision 1.2.4.1  2005/03/25 12:52:42  tipaul
 # needs "editcatalogue" flag, not "catalogue"
 #
@@ -57,6 +60,7 @@
 
 $template->param(
     ERROR => $error,
+    intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 );
 
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/acqui.simple/addbiblio.pl
diff -u koha/acqui.simple/addbiblio.pl:1.52.2.15 koha/acqui.simple/addbiblio.pl:1.52.2.16
--- koha/acqui.simple/addbiblio.pl:1.52.2.15	Wed Dec 14 15:01:36 2005
+++ koha/acqui.simple/addbiblio.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: addbiblio.pl,v 1.52.2.15 2005/12/14 15:01:36 tipaul Exp $
+# $Id: addbiblio.pl,v 1.52.2.16 2006/02/04 21:26:47 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -526,5 +526,6 @@
 		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"),
 		);
-output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file
+output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/acqui.simple/addbooks.pl
diff -u koha/acqui.simple/addbooks.pl:1.22.2.1 koha/acqui.simple/addbooks.pl:1.22.2.2
--- koha/acqui.simple/addbooks.pl:1.22.2.1	Fri Mar 25 12:52:43 2005
+++ koha/acqui.simple/addbooks.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: addbooks.pl,v 1.22.2.1 2005/03/25 12:52:43 tipaul Exp $
+# $Id: addbooks.pl,v 1.22.2.2 2006/02/04 21:26:47 kados Exp $
 
 #
 # Modified saas at users.sf.net 12:00 01 April 2001
@@ -69,6 +69,8 @@
 
 my $marc_p = C4::Context->boolean_preference("marc");
 $template->param( NOTMARC => !$marc_p,
-				frameworkcodeloop => \@frameworkcodeloop );
+				frameworkcodeloop => \@frameworkcodeloop,
+				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+				);
 
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/acqui.simple/additem-nomarc.pl
diff -u koha/acqui.simple/additem-nomarc.pl:1.4.2.1 koha/acqui.simple/additem-nomarc.pl:1.4.2.2
--- koha/acqui.simple/additem-nomarc.pl:1.4.2.1	Fri Mar 25 12:52:44 2005
+++ koha/acqui.simple/additem-nomarc.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: additem-nomarc.pl,v 1.4.2.1 2005/03/25 12:52:44 tipaul Exp $
+# $Id: additem-nomarc.pl,v 1.4.2.2 2006/02/04 21:26:47 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -20,6 +20,9 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 # $Log: additem-nomarc.pl,v $
+# Revision 1.4.2.2  2006/02/04 21:26:47  kados
+# Adds support for intranetcolorstylesheet
+#
 # Revision 1.4.2.1  2005/03/25 12:52:44  tipaul
 # needs "editcatalogue" flag, not "catalogue"
 #
@@ -134,6 +137,7 @@
             BIBITEMS  => \@biblioitems,
             BRANCHES  => \@branches,
             ITEMTYPES => \@itemtypes,
+	    intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 
         );
 
Index: koha/acqui.simple/additem.pl
diff -u koha/acqui.simple/additem.pl:1.27.2.9 koha/acqui.simple/additem.pl:1.27.2.10
--- koha/acqui.simple/additem.pl:1.27.2.9	Tue Oct 25 12:17:02 2005
+++ koha/acqui.simple/additem.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: additem.pl,v 1.27.2.9 2005/10/25 12:17:02 tipaul Exp $
+# $Id: additem.pl,v 1.27.2.10 2006/02/04 21:26:47 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -332,7 +332,9 @@
 						itemtagfield => $itemtagfield,
 						itemtagsubfield =>$itemtagsubfield,
 						op => $nextop,
-						opisadd => ($nextop eq "saveitem")?0:1);
+						opisadd => ($nextop eq "saveitem")?0:1,
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+						);
 foreach my $error (@errors) {
 	$template->param($error => 1);
 }
Index: koha/acqui/acqui-home.pl
diff -u koha/acqui/acqui-home.pl:1.3.2.1 koha/acqui/acqui-home.pl:1.3.2.2
--- koha/acqui/acqui-home.pl:1.3.2.1	Tue Jun  7 13:17:38 2005
+++ koha/acqui/acqui-home.pl	Sat Feb  4 21:26:47 2006
@@ -64,6 +64,8 @@
 						totspent => sprintf("%.2f",$totspent),
 						totcomtd => sprintf("%.2f",$totcomtd),
 						totavail => sprintf("%.2f",$totavail),
-						nobudget => $#results==-1?1:0);
+						nobudget => $#results==-1?1:0,
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+						);
 
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/acqui/acquire.pl
diff -u /dev/null koha/acqui/acquire.pl:1.18.2.1
--- /dev/null	Sat Feb  4 21:26:48 2006
+++ koha/acqui/acquire.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,187 @@
+#!/usr/bin/perl
+
+# $Id: acquire.pl,v 1.18.2.1 2006/02/04 21:26:47 kados 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
+use strict;
+use CGI;
+use C4::Context;
+use C4::Acquisition;
+use C4::Biblio;
+use C4::Output;
+use C4::Search;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Database;
+use HTML::Template;
+use C4::Date;
+
+my $input=new CGI;
+my $supplierid=$input->param('supplierid');
+my $dbh = C4::Context->dbh;
+
+my $search=$input->param('recieve');
+my $invoice=$input->param('invoice');
+my $freight=$input->param('freight');
+my $biblio=$input->param('biblio');
+my $catview=$input->param('catview');
+my $gst=$input->param('gst');
+my ($count, at results)=ordersearch($search,$supplierid,$biblio,$catview);
+# warn "C:$count for ordersearch($search,$supplierid,$biblio,$catview);";
+my ($count2, at booksellers)=bookseller($results[0]->{'booksellerid'});
+my $date = $results[0]->{'entrydate'};
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "acqui/acquire.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {acquisition => 1},
+			     debug => 1,
+			     });
+
+$template->param($count);
+if ($count == 1){
+	my $sth;
+# 	my $sth=$dbh->prepare("Select itemtype,description from itemtypes order by description");
+# 	$sth->execute;
+# 	my  @itemtype;
+# 	my %itemtypes;
+# 	push @itemtype, "";
+# 	$itemtypes{''} = "Please choose";
+# 	while (my ($value,$lib) = $sth->fetchrow_array) {
+# 		push @itemtype, $value;
+# 		$itemtypes{$value}=$lib;
+# 	}
+# 
+# 	my $CGIitemtype=CGI::scrolling_list( -name     => 'format',
+# 				-values   => \@itemtype,
+# 				-default  => $results[0]->{'itemtype'},
+# 				-labels   => \%itemtypes,
+# 				-size     => 1,
+# 				-multiple => 0 );
+# 	$sth->finish;
+
+	my @branches;
+	my @select_branch;
+	my %select_branches;
+	my ($count2, at branches)=branches();
+	for (my $i=0;$i<$count2;$i++){
+		push @select_branch, $branches[$i]->{'branchcode'};#
+		$select_branches{$branches[$i]->{'branchcode'}} = $branches[$i]->{'branchname'};
+	}
+	my $CGIbranch=CGI::scrolling_list( -name     => 'branch',
+				-values   => \@select_branch,
+				-default  => $results[0]->{'branchcode'},
+				-labels   => \%select_branches,
+				-size     => 1,
+				-multiple => 0 );
+
+	my $auto_barcode = C4::Context->boolean_preference("autoBarcode") || 0;
+		# See whether barcodes should be automatically allocated.
+		# Defaults to 0, meaning "no".
+	my $barcode;
+	if ($auto_barcode eq '1') {
+		$sth=$dbh->prepare("Select max(barcode) from items");
+		$sth->execute;
+		my $data=$sth->fetchrow_hashref;
+		$barcode = $results[0]->{'barcode'}+1;
+		$sth->finish;
+	}
+
+# 	my @bookfund;
+# 	my @select_bookfund;
+# 	my %select_bookfunds;
+# 	($count2, at bookfund)=bookfunds();
+# 	for (my $i=0;$i<$count2;$i++){
+# 		push @select_bookfund, $bookfund[$i]->{'bookfundid'};
+# 		$select_bookfunds{$bookfund[$i]->{'bookfundid'}} = $bookfund[$i]->{'bookfundname'}
+# 	}
+# 	my $CGIbookfund=CGI::scrolling_list( -name     => 'bookfund',
+# 				-values   => \@select_bookfund,
+# 				-default  => $results[0]->{'bookfundid'},
+# 				-labels   => \%select_bookfunds,
+# 				-size     => 1,
+# 				-multiple => 0 );
+
+	if ($results[0]->{'quantityreceived'} == 0){
+	$results[0]->{'quantityreceived'}='';
+	}
+	if ($results[0]->{'unitprice'} == 0){
+	$results[0]->{'unitprice'}='';
+	}
+	$template->param(
+		count => 1,
+		biblionumber => $results[0]->{'biblionumber'},
+		ordernumber => $results[0]->{'ordernumber'},
+		biblioitemnumber => $results[0]->{'biblioitemnumber'},
+		supplierid => $results[0]->{'booksellerid'},
+		freight => $freight,
+		gst => $gst,
+		catview => ($catview ne 'yes'?1:0),
+		name => $booksellers[0]->{'name'},
+		date => format_date($date),
+		title => $results[0]->{'title'},
+		author => $results[0]->{'author'},
+		copyrightdate => format_date($results[0]->{'copyrightdate'}),
+		itemtype => $results[0]->{'itemtype'},
+		CGIbranch => $CGIbranch,
+		isbn => $results[0]->{'isbn'},
+		seriestitle => $results[0]->{'seriestitle'},
+		barcode => $barcode,
+		bookfund => $results[0]->{'bookfundid'},
+		quantity => $results[0]->{'quantity'},
+		quantityreceived => $results[0]->{'quantityreceived'},
+		rrp => $results[0]->{'rrp'},
+		ecost => $results[0]->{'ecost'},
+		unitprice => $results[0]->{'unitprice'},
+		invoice => $invoice,
+		notes => $results[0]->{'notes'},
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+	);
+} else {
+	my @loop;
+	for (my $i=0;$i<$count;$i++){
+		my %line;
+		$line{isbn} = $results[$i]->{'isbn'};
+		$line{basketno} = $results[$i]->{'basketno'};
+		$line{quantity} = $results[$i]->{'quantity'};
+		$line{quantityrecieved} = $results[$i]->{'quantityreceived'};
+		$line{ordernumber} = $results[$i]->{'ordernumber'};
+		$line{biblionumber} = $results[$i]->{'biblionumber'};
+		$line{invoice} = $invoice;
+		$line{freight} = $freight;
+		$line{gst} = $gst;
+		$line{title} = $results[$i]->{'title'};
+		$line{author} = $results[$i]->{'author'};
+		$line{supplierid} = $supplierid;
+		push @loop,\%line;
+	}
+	$template->param( loop => \@loop,
+						date => format_date($date),
+						name => $booksellers[0]->{'name'},
+						supplierid => $supplierid,
+						invoice => $invoice,
+);
+
+}
+output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/acqui/basket.pl
diff -u koha/acqui/basket.pl:1.24.2.6 koha/acqui/basket.pl:1.24.2.7
--- koha/acqui/basket.pl:1.24.2.6	Fri Aug 26 12:21:49 2005
+++ koha/acqui/basket.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: basket.pl,v 1.24.2.6 2005/08/26 12:21:49 hdl Exp $
+# $Id: basket.pl,v 1.24.2.7 2006/02/04 21:26:47 kados Exp $
 
 #script to show display basket of orders
 #written by chris at katipo.co.nz 24/2/2000
@@ -145,5 +145,6 @@
 				grand_total_est =>$grand_total_est,
 				currency => $booksellers[0]->{'listprice'},
 				qty_total => $qty_total,
+				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 				);
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/acqui/histsearch.pl
diff -u koha/acqui/histsearch.pl:1.1.2.4 koha/acqui/histsearch.pl:1.1.2.5
--- koha/acqui/histsearch.pl:1.1.2.4	Wed Dec 14 19:55:33 2005
+++ koha/acqui/histsearch.pl	Sat Feb  4 21:26:47 2006
@@ -34,6 +34,7 @@
 				author => $author,
 				name => $name,
 				from_placed_on =>$from_placed_on,
-				to_placed_on =>$to_placed_on
+				to_placed_on =>$to_placed_on,
+				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 );
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/acqui/newbiblio.pl
diff -u koha/acqui/newbiblio.pl:1.21.2.3 koha/acqui/newbiblio.pl:1.21.2.4
--- koha/acqui/newbiblio.pl:1.21.2.3	Wed Dec 14 10:59:24 2005
+++ koha/acqui/newbiblio.pl	Sat Feb  4 21:26:47 2006
@@ -201,6 +201,8 @@
 						invoice => $data->{'booksellerinvoicenumber'},
 						ecost => $data->{'ecost'},
 						notes => $data->{'notes'},
-						publishercode => $data->{'publishercode'});
+						publishercode => $data->{'publishercode'},
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+						);
 
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/acqui/order.pl
diff -u /dev/null koha/acqui/order.pl:1.14.2.1
--- /dev/null	Sat Feb  4 21:26:48 2006
+++ koha/acqui/order.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,94 @@
+#!/usr/bin/perl
+
+# $Id: order.pl,v 1.14.2.1 2006/02/04 21:26:47 kados 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 C4::Output;
+use CGI;
+use C4::Interface::CGI::Output;
+use C4::Database;
+use HTML::Template;
+use C4::Acquisition;
+use C4::Date;
+
+my $query=new CGI;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "acqui/order.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {acquisition => 1},
+			     debug => 1,
+			     });
+
+my $supplier=$query->param('supplier');
+my ($count, at suppliers)=bookseller($supplier);
+
+# check if we have to "close" a basket before building page
+my $op = $query->param('op');
+my $basket = $query->param('basket');
+if ($op eq 'close') {
+	closebasket($basket);
+}
+
+#build result page
+my $toggle=0;
+my @loop_suppliers;
+for (my $i=0; $i<$count; $i++) {
+	my ($ordcount,$orders)=getorders($suppliers[$i]->{'id'});
+	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'};
+	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{surname} = $orders->[$i2]->{'firstname'};
+		$inner_line{firstname} = $orders->[$i2]->{'surname'};
+		$inner_line{creationdate} = format_date($orders->[$i2]->{'creationdate'});
+		$inner_line{closedate} = format_date($orders->[$i2]->{'closedate'});
+		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"),
+						);
+
+output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/acqui/receive.pl
diff -u /dev/null koha/acqui/receive.pl:1.13.2.1
--- /dev/null	Sat Feb  4 21:26:48 2006
+++ koha/acqui/receive.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,115 @@
+#!/usr/bin/perl
+
+# $Id: receive.pl,v 1.13.2.1 2006/02/04 21:26:47 kados 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
+
+use C4::Auth;
+use C4::Acquisition;
+use C4::Biblio;
+use C4::Output;
+use CGI;
+use C4::Interface::CGI::Output;
+use C4::Database;
+use HTML::Template;
+use strict;
+
+my $input=new CGI;
+my $supplierid=$input->param('supplierid');
+my ($count, at booksellers)=bookseller($supplierid);
+my $invoice=$input->param('invoice');
+my $freight=$input->param('freight');
+my $gst=$input->param('gst');
+my $date=localtime(time);
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "acqui/recieve.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {acquisition => 1},
+			     debug => 1,
+			     });
+
+my @results;
+($count, at results)=invoice($invoice);
+if ($invoice eq ''){
+	($count, at results)=getallorders($supplierid);
+}
+my $totalprice=0;
+my $totalfreight=0;
+my $totalquantity=0;
+my $total;
+my $tototal;
+my $toggle;
+my @loop_orders = ();
+for (my$i=0;$i<$count;$i++){
+	$total=($results[$i]->{'unitprice'} + $results[$i]->{'freight'}) * $results[$i]->{'quantityreceived'};   #weird, are the freight fees counted by book? (pierre)
+	$results[$i]->{'unitprice'}+=0;
+	my %line;
+	if ($toggle==0){
+		$line{color}='#EEEEEE';
+		$toggle=1;
+	} else {
+		$line{color}='white';
+		$toggle=0;
+	}
+	$line{basketno} = $results[$i]->{'basketno'};
+	$line{isbn} = $results[$i]->{'isbn'};
+	$line{ordernumber} = $results[$i]->{'ordernumber'};
+	$line{biblionumber} = $results[$i]->{'biblionumber'};
+	$line{invoice} = $invoice;
+	$line{gst} = $gst;
+	$line{title} = $results[$i]->{'title'};
+	$line{author} = $results[$i]->{'author'};
+	$line{unitprice} = $results[$i]->{'unitprice'};
+	$line{quantityrecieved} = $results[$i]->{'quantityreceived'};
+	$line{total} = $total;
+	$line{supplierid} = $supplierid;
+	push @loop_orders, \%line;
+	$totalprice+=$results[$i]->{'unitprice'};
+	$totalfreight+=$results[$i]->{'freight'};
+	$totalquantity+=$results[$i]->{'quantityreceived'};
+	$tototal+=$total;
+}
+
+$totalfreight=$freight;
+$tototal=$tototal+$freight;
+
+$template->param(invoice => $invoice,
+						date => $date,
+						name => $booksellers[0]->{'name'},
+						supplierid => $supplierid,
+						gst => $gst,
+						freight => $freight,
+						invoice => $invoice,
+						count => $count,
+						loop_orders => \@loop_orders,
+						totalprice => $totalprice,
+						totalfreight => $totalfreight,
+						totalquantity => $totalquantity,
+						tototal => $tototal,
+						gst => $gst,
+						grandtot => $tototal+$gst,
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+						);
+output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/acqui/recieveorder.pl
diff -u koha/acqui/recieveorder.pl:1.9.2.2 koha/acqui/recieveorder.pl:1.9.2.3
--- koha/acqui/recieveorder.pl:1.9.2.2	Mon Jun  6 16:32:08 2005
+++ koha/acqui/recieveorder.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: recieveorder.pl,v 1.9.2.2 2005/06/06 16:32:08 tipaul Exp $
+# $Id: recieveorder.pl,v 1.9.2.3 2006/02/04 21:26:47 kados Exp $
 
 #script to show display basket of orders
 #written by chris at katipo.co.nz 24/2/2000
@@ -47,6 +47,7 @@
 $template->param(
 		name => $booksellers[0]->{'name'},
 		supplierid => $supplierid,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 		);
 
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/acqui/select-late.pl
diff -u /dev/null koha/acqui/select-late.pl:1.1.2.1
--- /dev/null	Sat Feb  4 21:26:48 2006
+++ koha/acqui/select-late.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,104 @@
+#!/usr/bin/perl
+
+# $Id: select-late.pl,v 1.1.2.1 2006/02/04 21:26:47 kados 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::Catalogue;
+use C4::Auth;
+use C4::Biblio;
+use C4::Output;
+use CGI;
+use C4::Interface::CGI::Output;
+use C4::Database;
+use HTML::Template;
+use C4::Catalogue;
+use C4::Context;
+use C4::Date;
+
+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 ($count, at suppliers)=bookseller($supplier);
+
+
+
+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 ($ordcount,$orders)=getorders($suppliers[$i]->{'id'});
+	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"),
+						);
+
+output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/acqui/suggestion-select.pl
diff -u koha/acqui/suggestion-select.pl:1.3.2.2 koha/acqui/suggestion-select.pl:1.3.2.3
--- koha/acqui/suggestion-select.pl:1.3.2.2	Fri Mar 25 12:49:58 2005
+++ koha/acqui/suggestion-select.pl	Sat Feb  4 21:26:47 2006
@@ -46,5 +46,6 @@
 				basketno => $basketno,
 				supplierid => $supplierid,
 				"op_$op" => 1,
+				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 );
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/acqui/supplier.pl
diff -u /dev/null koha/acqui/supplier.pl:1.9.2.1
--- /dev/null	Sat Feb  4 21:26:48 2006
+++ koha/acqui/supplier.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,91 @@
+#!/usr/bin/perl
+
+# $Id: supplier.pl,v 1.9.2.1 2006/02/04 21:26:47 kados 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
+
+use C4::Auth;
+use C4::Acquisition;
+use C4::Biblio;
+use C4::Output;
+use CGI;
+use C4::Interface::CGI::Output;
+use C4::Database;
+use HTML::Template;
+use strict;
+
+my $query=new CGI;
+my $id=$query->param('supplierid');
+my ($count, at booksellers)=bookseller($id);
+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  ($count, $currencies) = &getcurrencies();
+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 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 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'},
+					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,
+					intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+					);
+
+output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/admin-home.pl
diff -u koha/admin-home.pl:1.8.4.2 koha/admin-home.pl:1.8.4.3
--- koha/admin-home.pl:1.8.4.2	Mon Aug  1 15:34:58 2005
+++ koha/admin-home.pl	Sat Feb  4 21:26:47 2006
@@ -21,6 +21,8 @@
 my $sth = $dbh->prepare("select count(*) from stopwords");
 $sth->execute;
 my ($total) = $sth->fetchrow;
-$template->param(stopwords => $total);
+$template->param(stopwords => $total,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/admin/aqbookfund.pl
diff -u koha/admin/aqbookfund.pl:1.19.2.6 koha/admin/aqbookfund.pl:1.19.2.7
--- koha/admin/aqbookfund.pl:1.19.2.6	Tue Jan 31 11:45:07 2006
+++ koha/admin/aqbookfund.pl	Sat Feb  4 21:26:47 2006
@@ -255,5 +255,6 @@
 	$template->param(Next => ($count>$offset+$pagesize)) if ($count>$offset+$pagesize);
 	$template->param(bookfund => \@loop_data);
 } #---- END $OP eq DEFAULT
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/admin/aqbudget.pl
diff -u koha/admin/aqbudget.pl:1.16.2.2 koha/admin/aqbudget.pl:1.16.2.3
--- koha/admin/aqbudget.pl:1.16.2.2	Tue Sep 27 18:03:39 2005
+++ koha/admin/aqbudget.pl	Sat Feb  4 21:26:47 2006
@@ -250,6 +250,7 @@
        }
        $template->param(budget => \@loop_data);
 } #---- END $OP eq DEFAULT
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
 
Index: koha/admin/auth_subfields_structure.pl
diff -u koha/admin/auth_subfields_structure.pl:1.3.2.1 koha/admin/auth_subfields_structure.pl:1.3.2.2
--- koha/admin/auth_subfields_structure.pl:1.3.2.1	Wed Jan 19 17:17:08 2005
+++ koha/admin/auth_subfields_structure.pl	Sat Feb  4 21:26:47 2006
@@ -298,5 +298,6 @@
 		$template->param(next => "<a href=\"$script_name?offset=$nextpage&amp;tagfield=$tagfield&authtypecode=$authtypecode\">");
 	}
 } #---- END $OP eq DEFAULT
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/admin/auth_tag_structure.pl
diff -u koha/admin/auth_tag_structure.pl:1.2.2.1 koha/admin/auth_tag_structure.pl:1.2.2.2
--- koha/admin/auth_tag_structure.pl:1.2.2.1	Thu Jan 20 15:06:31 2005
+++ koha/admin/auth_tag_structure.pl	Sat Feb  4 21:26:47 2006
@@ -250,7 +250,10 @@
 	}
 } #---- END $OP eq DEFAULT
 
-$template->param(loggeninuser => $loggedinuser);
+$template->param(loggeninuser => $loggedinuser,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+
 output_html_with_http_headers $input, $cookie, $template->output;
 
 
Index: koha/admin/authorised_values.pl
diff -u koha/admin/authorised_values.pl:1.14.2.1 koha/admin/authorised_values.pl:1.14.2.2
--- koha/admin/authorised_values.pl:1.14.2.1	Tue Mar 29 15:41:42 2005
+++ koha/admin/authorised_values.pl	Sat Feb  4 21:26:47 2006
@@ -202,5 +202,6 @@
 		);
 	}
 } #---- END $OP eq DEFAULT
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/admin/authtypes.pl
diff -u /dev/null koha/admin/authtypes.pl:1.3.2.1
--- /dev/null	Sat Feb  4 21:26:48 2006
+++ koha/admin/authtypes.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,180 @@
+#!/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;
+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 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 => "parameters/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
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+output_html_with_http_headers $input, $cookie, $template->output;
+
+# Local Variables:
+# tab-width: 4
+# End:
Index: koha/admin/biblio_framework.pl
diff -u /dev/null koha/admin/biblio_framework.pl:1.2.2.1
--- /dev/null	Sat Feb  4 21:26:48 2006
+++ koha/admin/biblio_framework.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,179 @@
+#!/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;
+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 biblio_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/biblio_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 => "parameters/biblio_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 biblio_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 biblio_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=biblio_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 ('marc_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 biblio_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 marc_tag_structure where frameworkcode=?");
+	$sth->execute($frameworkcode);
+	$sth=$dbh->prepare("delete from marc_subfield_structure where frameworkcode=?");
+	$sth->execute($frameworkcode);
+	$sth=$dbh->prepare("delete from biblio_framework where frameworkcode=?");
+	$sth->execute($frameworkcode);
+	$sth->finish;
+	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=biblio_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
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+output_html_with_http_headers $input, $cookie, $template->output;
+
+# Local Variables:
+# tab-width: 4
+# End:
Index: koha/admin/branches.pl
diff -u koha/admin/branches.pl:1.27.2.3 koha/admin/branches.pl:1.27.2.4
--- koha/admin/branches.pl:1.27.2.3	Wed Aug  3 19:17:51 2005
+++ koha/admin/branches.pl	Sat Feb  4 21:26:47 2006
@@ -525,7 +525,8 @@
     }
     return $message;
 }
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
 
 # Local Variables:
Index: koha/admin/categorie.pl
diff -u koha/admin/categorie.pl:1.16.2.2 koha/admin/categorie.pl:1.16.2.3
--- koha/admin/categorie.pl:1.16.2.2	Tue Mar 29 15:41:42 2005
+++ koha/admin/categorie.pl	Sat Feb  4 21:26:47 2006
@@ -201,6 +201,7 @@
 } #---- END $OP eq DEFAULT
 
 
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
 
Index: koha/admin/categoryitem.pl
diff -u /dev/null koha/admin/categoryitem.pl:1.9.2.1
--- /dev/null	Sat Feb  4 21:26:48 2006
+++ koha/admin/categoryitem.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,201 @@
+#!/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 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 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 => "parameters/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
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+output_html_with_http_headers $input, $cookie, $template->output;
+
+
+
Index: koha/admin/checkmarc.pl
diff -u koha/admin/checkmarc.pl:1.6.2.1 koha/admin/checkmarc.pl:1.6.2.2
--- koha/admin/checkmarc.pl:1.6.2.1	Mon Jun  6 16:10:57 2005
+++ koha/admin/checkmarc.pl	Sat Feb  4 21:26:47 2006
@@ -185,5 +185,7 @@
 	$total++;
 }
 
-$template->param(total => $total);
+$template->param(total => $total,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/admin/currency.pl
diff -u koha/admin/currency.pl:1.10.2.1 koha/admin/currency.pl:1.10.2.2
--- koha/admin/currency.pl:1.10.2.1	Tue Mar 29 15:41:42 2005
+++ koha/admin/currency.pl	Sat Feb  4 21:26:47 2006
@@ -194,6 +194,7 @@
 				 nextpage => $offset+$pagesize);
 	}
 } #---- END $OP eq DEFAULT
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
 
Index: koha/admin/issuingrules.pl
diff -u koha/admin/issuingrules.pl:1.3.2.2 koha/admin/issuingrules.pl:1.3.2.3
--- koha/admin/issuingrules.pl:1.3.2.2	Tue Mar 29 15:41:42 2005
+++ koha/admin/issuingrules.pl	Sat Feb  4 21:26:47 2006
@@ -185,5 +185,7 @@
 $template->param(title => \@title_loop,
 						row => \@row_loop,
 						branchloop => \@branchloop,
-						branch => $branch);
+						branch => $branch,
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+						);
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/admin/itemtypes.pl
diff -u koha/admin/itemtypes.pl:1.16.2.4 koha/admin/itemtypes.pl:1.16.2.5
--- koha/admin/itemtypes.pl:1.16.2.4	Tue Mar 29 15:41:42 2005
+++ koha/admin/itemtypes.pl	Sat Feb  4 21:26:47 2006
@@ -193,6 +193,8 @@
 		$template->param(next => "$script_name?offset=".$nextpage);
 	}
 } #---- END $OP eq DEFAULT
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
 
 # Local Variables:
Index: koha/admin/koha2marclinks.pl
diff -u /dev/null koha/admin/koha2marclinks.pl:1.11.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/admin/koha2marclinks.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,140 @@
+#!/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;
+use HTML::Template;
+
+my $input = new CGI;
+my $tablename=$input->param('tablename');
+$tablename="biblio" unless ($tablename);
+my $kohafield = $input->param('kohafield');
+my $op=$input->param('op');
+my $script_name = 'koha2marclinks.pl';
+
+my ($template, $borrowernumber, $cookie)
+    = get_template_and_user({template_name => "parameters/koha2marclinks.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
+}
+
+my $dbh = C4::Context->dbh;
+
+################## ADD_FORM ##################################
+# called by default. Used to create form to add or  modify a record
+if ($op eq 'add_form') {
+	my $data;
+	my $sth = $dbh->prepare("select tagfield,tagsubfield,liblibrarian as lib,tab from marc_subfield_structure where kohafield=?");
+	$sth->execute($tablename.".".$kohafield);
+	my ($defaulttagfield, $defaulttagsubfield,$defaultliblibrarian) = $sth->fetchrow;
+
+	for (my $i=0;$i<=9;$i++) {
+		my $sth2=$dbh->prepare("select tagfield,tagsubfield,liblibrarian as lib,tab from marc_subfield_structure where tagfield like ?");
+		$sth2->execute("$i%");
+		my @marcarray;
+		push @marcarray," ";
+		while (my ($field, $tagsubfield, $liblibrarian) = $sth2->fetchrow_array) {
+			push @marcarray, "$field $tagsubfield - $liblibrarian";
+		}
+		my $marclist = CGI::scrolling_list(-name=>"marc",
+						-values=> \@marcarray,
+						-default=>"$defaulttagfield $defaulttagsubfield - $defaultliblibrarian",
+						-size=>1,
+						-multiple=>0,
+						);
+		$template->param("marclist$i" => $marclist);
+	}
+	$template->param(	tablename => $tablename,
+							kohafield => $kohafield);
+
+													# END $OP eq ADD_FORM
+################## ADD_VALIDATE ##################################
+# called by add_form, used to insert/modify data in DB
+} elsif ($op eq 'add_validate') {
+	#----- empty koha field :
+	$dbh->do("update marc_subfield_structure set kohafield='' where kohafield='$tablename.$kohafield'");
+	#---- reload if not empty
+	my @temp = split / /,$input->param('marc');
+	$dbh->do("update marc_subfield_structure set kohafield='$tablename.$kohafield' where tagfield='$temp[0]' and tagsubfield='$temp[1]'");
+	print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=koha2marclinks.pl?tablename=$tablename\"></html>";
+	exit;
+
+													# END $OP eq ADD_VALIDATE
+################## DEFAULT ##################################
+} else { # DEFAULT
+	my $env;
+	my $sth=$dbh->prepare("Select tagfield,tagsubfield,liblibrarian,kohafield from marc_subfield_structure");
+	$sth->execute;
+	my %fields;
+	while ((my $tagfield,my $tagsubfield,my $liblibrarian,my $kohafield) = $sth->fetchrow) {
+		$fields{$kohafield}->{tagfield} = $tagfield;
+		$fields{$kohafield}->{tagsubfield} = $tagsubfield;
+		$fields{$kohafield}->{liblibrarian} = $liblibrarian;
+	}
+	#XXX: This might not work. Maybe should use a DBI call instead of SHOW COLUMNS
+	my $sth2=$dbh->prepare("SHOW COLUMNS from $tablename");
+	$sth2->execute;
+
+	my $toggle="white";
+	my @loop_data = ();
+	while ((my $field) = $sth2->fetchrow_array) {
+	  	if ($toggle eq 'white'){
+			$toggle="#ffffcc";
+	  	} else {
+			$toggle="white";
+	  	}
+		my %row_data;  # get a fresh hash for the row data
+		$row_data{tagfield} = $fields{$tablename.".".$field}->{tagfield};
+		$row_data{tagsubfield} = $fields{$tablename.".".$field}->{tagsubfield};
+		$row_data{liblibrarian} = $fields{$tablename.".".$field}->{liblibrarian};
+		$row_data{kohafield} = $field;
+		$row_data{edit} = "$script_name?op=add_form&amp;tablename=$tablename&amp;kohafield=$field";
+		$row_data{bgcolor} = $toggle;
+		push(@loop_data,\%row_data);
+	}
+	$template->param(loop => \@loop_data,
+							tablename => CGI::scrolling_list(-name=>'tablename',
+																	-values=>['biblio','biblioitems','items','bibliosubject','bibliosubtitle','additionalauthors'],
+																	-default=>$tablename,
+																	-size=>1,
+																	-multiple=>0
+																	)
+							);
+} #---- END $OP eq DEFAULT
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/admin/marc_subfields_structure.pl
diff -u koha/admin/marc_subfields_structure.pl:1.32.2.5 koha/admin/marc_subfields_structure.pl:1.32.2.6
--- koha/admin/marc_subfields_structure.pl:1.32.2.5	Mon Feb 14 22:07:41 2005
+++ koha/admin/marc_subfields_structure.pl	Sat Feb  4 21:26:47 2006
@@ -444,5 +444,6 @@
 		$template->param(next => "<a href=\"$script_name?offset=$nextpage\">");
 	}
 } #---- END $OP eq DEFAULT
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/admin/marctagstructure.pl
diff -u koha/admin/marctagstructure.pl:1.25.2.3 koha/admin/marctagstructure.pl:1.25.2.4
--- koha/admin/marctagstructure.pl:1.25.2.3	Wed Jun  1 13:22:07 2005
+++ koha/admin/marctagstructure.pl	Sat Feb  4 21:26:47 2006
@@ -333,7 +333,9 @@
 	}
 } #---- END $OP eq DEFAULT
 
-$template->param(loggeninuser => $loggedinuser);
+$template->param(loggeninuser => $loggedinuser,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
 
 
Index: koha/admin/printers.pl
diff -u koha/admin/printers.pl:1.10.2.1 koha/admin/printers.pl:1.10.2.2
--- koha/admin/printers.pl:1.10.2.1	Wed Apr  6 13:55:30 2005
+++ koha/admin/printers.pl	Sat Feb  4 21:26:47 2006
@@ -181,6 +181,7 @@
 	}
 
 } #---- END $OP eq DEFAULT
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
 
Index: koha/admin/stopwords.pl
diff -u koha/admin/stopwords.pl:1.12.2.1 koha/admin/stopwords.pl:1.12.2.2
--- koha/admin/stopwords.pl:1.12.2.1	Tue Mar 29 15:41:43 2005
+++ koha/admin/stopwords.pl	Sat Feb  4 21:26:47 2006
@@ -167,6 +167,7 @@
 				 nextpage => $offset+$pagesize);
 	}
 }
-                                                              
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
 
Index: koha/admin/systempreferences.pl
diff -u koha/admin/systempreferences.pl:1.22.2.6 koha/admin/systempreferences.pl:1.22.2.7
--- koha/admin/systempreferences.pl:1.22.2.6	Mon Dec  5 09:50:35 2005
+++ koha/admin/systempreferences.pl	Sat Feb  4 21:26:47 2006
@@ -367,5 +367,6 @@
 		$template->param("a href=$script_name?offset=".$nextpage.'Next &gt;&gt;</a>');
 	}
 } #---- END $OP eq DEFAULT
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/admin/thesaurus.pl
diff -u /dev/null koha/admin/thesaurus.pl:1.11.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/admin/thesaurus.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,268 @@
+#!/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 HTML::Template;
+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 => "parameters/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
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/admin/z3950servers.pl
diff -u koha/admin/z3950servers.pl:1.9.2.1 koha/admin/z3950servers.pl:1.9.2.2
--- koha/admin/z3950servers.pl:1.9.2.1	Wed Apr 20 20:13:58 2005
+++ koha/admin/z3950servers.pl	Sat Feb  4 21:26:47 2006
@@ -200,5 +200,6 @@
 				 nextpage => $offset+$pagesize);
 	}
 } #---- END $OP eq DEFAULT
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/authorities/auth_finder.pl
diff -u koha/authorities/auth_finder.pl:1.5.2.3 koha/authorities/auth_finder.pl:1.5.2.4
--- koha/authorities/auth_finder.pl:1.5.2.3	Tue Jun 21 14:50:26 2005
+++ koha/authorities/auth_finder.pl	Sat Feb  4 21:26:47 2006
@@ -157,7 +157,9 @@
 }
 
 $template->param(authtypesloop => \@authtypesloop,
-				authtypecode => $authtypecode);
+		authtypecode => $authtypecode,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 
 # Print the page
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/authorities/authorities-home.pl
diff -u koha/authorities/authorities-home.pl:1.8.2.3 koha/authorities/authorities-home.pl:1.8.2.4
--- koha/authorities/authorities-home.pl:1.8.2.3	Thu Dec  1 14:39:13 2005
+++ koha/authorities/authorities-home.pl	Sat Feb  4 21:26:47 2006
@@ -243,7 +243,9 @@
 
 }
 
-$template->param(authtypesloop => \@authtypesloop);
+$template->param(authtypesloop => \@authtypesloop,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 
 # Print the page
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/authorities/authorities.pl
diff -u koha/authorities/authorities.pl:1.8.2.5 koha/authorities/authorities.pl:1.8.2.6
--- koha/authorities/authorities.pl:1.8.2.5	Tue Oct 25 13:10:29 2005
+++ koha/authorities/authorities.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: authorities.pl,v 1.8.2.5 2005/10/25 13:10:29 tipaul Exp $
+# $Id: authorities.pl,v 1.8.2.6 2006/02/04 21:26:47 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -417,5 +417,6 @@
 $template->param(authtypesloop => \@authtypesloop,
 				authtypetext => $authtypes->{$authtypecode}{'authtypetext'},
 				hide_marc => C4::Context->preference('hide_marc'),
+				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 				);
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/authorities/blinddetail-biblio-search.pl
diff -u koha/authorities/blinddetail-biblio-search.pl:1.4.2.2 koha/authorities/blinddetail-biblio-search.pl:1.4.2.3
--- koha/authorities/blinddetail-biblio-search.pl:1.4.2.2	Tue Oct 25 12:14:32 2005
+++ koha/authorities/blinddetail-biblio-search.pl	Sat Feb  4 21:26:47 2006
@@ -135,6 +135,8 @@
 
 $template->param(authid => $authid?$authid:"",
 # 				authtypesloop => \@authtypesloop,
-				index => $index);
+				index => $index
+				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+				);
 output_html_with_http_headers $query, $cookie, $template->output;
 
Index: koha/authorities/detail-biblio-search.pl
diff -u /dev/null koha/authorities/detail-biblio-search.pl:1.1.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/authorities/detail-biblio-search.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,186 @@
+#!/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;
+require Exporter;
+use C4::AuthoritiesMarc;
+use C4::Auth;
+use C4::Context;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Search;
+use MARC::Record;
+use C4::Koha;
+# use C4::Biblio;
+# use C4::Catalogue;
+use HTML::Template;
+
+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 =AUTHgetauthority($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;
+# loop through each tab 0 through 9
+# for (my $tabloop = 0; $tabloop<=10;$tabloop++) {
+# loop through each tag
+	my @fields = $record->fields();
+	my @loop_data =();
+	foreach my $field (@fields) {
+			my @subfields_data;
+		# if tag <10, there's no subfield, use the "@" trick
+		if ($field->tag()<10) {
+# 			next if ($tagslib->{$field->tag()}->{'@'}->{tab}  ne $tabloop);
+			next if ($tagslib->{$field->tag()}->{'@'}->{hidden});
+			my %subfield_data;
+			$subfield_data{marc_lib}=$tagslib->{$field->tag()}->{'@'}->{lib};
+			$subfield_data{marc_value}=$field->data();
+			$subfield_data{marc_subfield}='@';
+			$subfield_data{marc_tag}=$field->tag();
+			push(@subfields_data, \%subfield_data);
+		} else {
+			my @subf=$field->subfields;
+	# loop through each subfield
+			for my $i (0..$#subf) {
+				$subf[$i][0] = "@" unless $subf[$i][0];
+# 				next if ($tagslib->{$field->tag()}->{$subf[$i][0]}->{tab}  ne $tabloop);
+				next if ($tagslib->{$field->tag()}->{$subf[$i][0]}->{hidden});
+				my %subfield_data;
+				$subfield_data{marc_lib}=$tagslib->{$field->tag()}->{$subf[$i][0]}->{lib};
+				if ($tagslib->{$field->tag()}->{$subf[$i][0]}->{isurl}) {
+					$subfield_data{marc_value}="<a href=\"$subf[$i][1]\">$subf[$i][1]</a>";
+				} else {
+					$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);
+		}
+	}
+	$template->param("0XX" =>\@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 = $record->fields();
+# my %witness; #---- stores the list of subfields used at least once, with the "meaning" of the code
+# my @big_array;
+# foreach my $field (@fields) {
+# 	next if ($field->tag()<10);
+# 	my @subf=$field->subfields;
+# 	my %this_row;
+# # loop through each subfield
+# 	for my $i (0..$#subf) {
+# 		next if ($tagslib->{$field->tag()}->{$subf[$i][0]}->{tab}  ne 10);
+# 		$witness{$subf[$i][0]} = $tagslib->{$field->tag()}->{$subf[$i][0]}->{lib};
+# 		$this_row{$subf[$i][0]} =$subf[$i][1];
+# 	}
+# 	if (%this_row) {
+# 		push(@big_array, \%this_row);
+# 	}
+# }
+# #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 $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,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+output_html_with_http_headers $query, $cookie, $template->output;
+
Index: koha/authorities/detail.pl
diff -u koha/authorities/detail.pl:1.2.2.1 koha/authorities/detail.pl:1.2.2.2
--- koha/authorities/detail.pl:1.2.2.1	Mon May 30 11:53:15 2005
+++ koha/authorities/detail.pl	Sat Feb  4 21:26:47 2006
@@ -141,9 +141,11 @@
 }
 
 $template->param(authid => $authid,
-				count => $count,
-				biblio_fields => $biblio_fields,
-				authtypetext => $authtypes->{$authtypecode}{'authtypetext'},
-				authtypesloop => \@authtypesloop);
+		count => $count,
+		biblio_fields => $biblio_fields,
+		authtypetext => $authtypes->{$authtypecode}{'authtypetext'},
+		authtypesloop => \@authtypesloop,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $query, $cookie, $template->output;
 
Index: koha/barcodes/barcodes.pl
diff -u koha/barcodes/barcodes.pl:1.3.2.1 koha/barcodes/barcodes.pl:1.3.2.2
--- koha/barcodes/barcodes.pl:1.3.2.1	Thu Sep  1 19:31:06 2005
+++ koha/barcodes/barcodes.pl	Sat Feb  4 21:26:47 2006
@@ -139,5 +139,7 @@
 } else {
 	$template->param(ERROR => 0);
 }
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 # Shows the template with the real values replaced
-output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file
+output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/barcodes/printerConfig.pl
diff -u /dev/null koha/barcodes/printerConfig.pl:1.2.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/barcodes/printerConfig.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,118 @@
+#!/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"),
+		);
+output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/bookcount.pl
diff -u koha/bookcount.pl:1.8.2.1 koha/bookcount.pl:1.8.2.2
--- koha/bookcount.pl:1.8.2.1	Tue Jan 17 16:24:41 2006
+++ koha/bookcount.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: bookcount.pl,v 1.8.2.1 2006/01/17 16:24:41 oleonard Exp $
+# $Id: bookcount.pl,v 1.8.2.2 2006/02/04 21:26:47 kados Exp $
 
 #written 7/3/2002 by Finlay
 #script to display reports
@@ -96,7 +96,9 @@
 								holdingbranch => $holdingbranch,
 								lastdate =>  format_date($lastdate),
 								count =>  $count,
-								branchloop => \@branchloop);
+								branchloop => \@branchloop
+								intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 
 print "Content-Type: text/html\n\n", $template->output;
 
Index: koha/bookshelves/addbookbybiblionumber.pl
diff -u /dev/null koha/bookshelves/addbookbybiblionumber.pl:1.3.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/bookshelves/addbookbybiblionumber.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,105 @@
+#!/usr/bin/perl
+#script to provide bookshelf management
+# WARNING: This file uses 4-character tabs!
+#
+# $Header: /sources/koha/koha/bookshelves/addbookbybiblionumber.pl,v 1.3.2.1 2006/02/04 21:26:47 kados 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::Output;
+use C4::BookShelves;
+use C4::Circulation::Circ2;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use HTML::Template;
+
+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,
+				-multiple => 0 );
+
+	$template->param(biblionumber => $biblionumber,
+						title => $biblios[0]->{'title'},
+						author => $biblios[0]->{'author'},
+						CGIbookshelves => $CGIbookshelves,
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+						);
+
+	output_html_with_http_headers $query, $cookie, $template->output;
+}
+# $Log: addbookbybiblionumber.pl,v $
+# 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: koha/bookshelves/shelves.pl
diff -u koha/bookshelves/shelves.pl:1.5.2.2 koha/bookshelves/shelves.pl:1.5.2.3
--- koha/bookshelves/shelves.pl:1.5.2.2	Wed Apr 27 18:15:27 2005
+++ koha/bookshelves/shelves.pl	Sat Feb  4 21:26:47 2006
@@ -2,7 +2,7 @@
 #script to provide bookshelf management
 # WARNING: This file uses 4-character tabs!
 #
-# $Header: /sources/koha/koha/bookshelves/shelves.pl,v 1.5.2.2 2005/04/27 18:15:27 oleonard Exp $
+# $Header: /sources/koha/koha/bookshelves/shelves.pl,v 1.5.2.3 2006/02/04 21:26:47 kados Exp $
 #
 # Copyright 2000-2002 Katipo Communications
 #
@@ -108,7 +108,9 @@
 ;
 		push (@shelvesloop, \%line);
 		}
-$template->param(shelvesloop => \@shelvesloop);
+$template->param(shelvesloop => \@shelvesloop,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 
 output_html_with_http_headers $query, $cookie, $template->output;
 
@@ -190,6 +192,9 @@
 
 #
 # $Log: shelves.pl,v $
+# 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
 #
Index: koha/boraccount.pl
diff -u koha/boraccount.pl:1.8.4.1 koha/boraccount.pl:1.8.4.2
--- koha/boraccount.pl:1.8.4.1	Wed Feb 16 19:11:45 2005
+++ koha/boraccount.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: boraccount.pl,v 1.8.4.1 2005/02/16 19:11:45 oleonard Exp $
+# $Id: boraccount.pl,v 1.8.4.2 2006/02/04 21:26:47 kados Exp $
 
 #writen 11/1/2000 by chris at katipo.oc.nz
 #script to display borrowers account details
@@ -98,6 +98,8 @@
 			bornum          => $bornum,
 			total           => sprintf("%.2f",$total),
 			totalcredit => $totalcredit,
-			accounts        => \@accountrows );
+			accounts        => \@accountrows,
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/bull-home.pl
diff -u koha/bull-home.pl:1.2.2.1 koha/bull-home.pl:1.2.2.2
--- koha/bull-home.pl:1.2.2.1	Tue Jan 11 15:36:02 2005
+++ koha/bull-home.pl	Sat Feb  4 21:26:47 2006
@@ -27,5 +27,6 @@
 	subscriptions => \@subscriptions,
 	title => $title,
 	ISSN => $ISSN,
+	intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 	);
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/bull/acqui-search.pl
diff -u /dev/null koha/bull/acqui-search.pl:1.2.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/bull/acqui-search.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,64 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Database;
+use HTML::Template;
+use C4::Acquisition;
+my $query = new CGI;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "bull/search-supply.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {acquisition => 1},
+			     debug => 1,
+			     });
+
+# budget
+my ($count, at results)=&bookfunds;
+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)=bookfundbreakdown($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 ($count,$rates)=getcurrencies();
+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;
+}
+$template->param(classlist => $classlist,
+						type => 'intranet',
+						loop_budget => \@loop_budget,
+						loop_currency => \@loop_currency,
+						total => sprintf("%.2f",$total),
+						totspent => sprintf("%.2f",$totspent),
+						totcomtd => sprintf("%.2f",$totcomtd),
+						totavail => sprintf("%.2f",$totavail),
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+						);
+
+output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/bull/lateissues.pl
diff -u koha/bull/lateissues.pl:1.1.2.1 koha/bull/lateissues.pl:1.1.2.2
--- koha/bull/lateissues.pl:1.1.2.1	Fri Sep 23 09:27:15 2005
+++ koha/bull/lateissues.pl	Sat Feb  4 21:26:47 2006
@@ -50,5 +50,6 @@
 	phone => $supplierinfo[0]->{phone},
 	booksellerfax => $supplierinfo[0]->{booksellerfax},
 	bookselleremail => $supplierinfo[0]->{bookselleremail},
+	intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 	);
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/bull/order.pl
diff -u /dev/null koha/bull/order.pl:1.4.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/bull/order.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,84 @@
+#!/usr/bin/perl
+
+# $Id: order.pl,v 1.4.2.1 2006/02/04 21:26:47 kados 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 C4::Output;
+use CGI;
+use C4::Interface::CGI::Output;
+use C4::Database;
+use HTML::Template;
+use C4::Acquisition;
+use C4::Date;
+
+my $query=new CGI;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "bull/order.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {acquisition => 1},
+			     debug => 1,
+			     });
+
+my $supplier=$query->param('supplier');
+my ($count, at suppliers)=bookseller($supplier);
+
+#build reult page
+my $toggle=0;
+my @loop_suppliers;
+for (my $i=0; $i<$count; $i++) {
+	my ($ordcount,$orders)=getorders($suppliers[$i]->{'id'});
+	my %line;
+	if ($toggle==0){
+		$line{even}=1;
+		$toggle=1;
+	} else {
+		$line{even}=0;
+		$toggle=0;
+	}
+	$line{aqbooksellerid} =$suppliers[$i]->{'id'};
+	$line{name} = $suppliers[$i]->{'name'};
+	$line{active} = $suppliers[$i]->{'active'};
+	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{creationdate} = format_date($orders->[$i2]->{'creationdate'});
+		$inner_line{closedate} = format_date($orders->[$i2]->{'closedate'});
+		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"),
+						);
+output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/bull/receipt.pl
diff -u /dev/null koha/bull/receipt.pl:1.2.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/bull/receipt.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,134 @@
+#!/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 $op = $query->param('op');
+my $search = $query->param('titleorissn');
+my $startfrom=$query->param('startfrom');
+
+if ($op eq 'search')
+{ 
+    my $total;
+    my $results;
+    my $dbh = C4::Context->dbh;
+    	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');
+
+	my $resultsperpage= $query->param('resultsperpage');
+	$resultsperpage = 19 if(!defined $resultsperpage);
+
+    
+
+    my $sth = $dbh->prepare("select subscriptionid, biblionumber from subscription");
+    $sth->execute();
+    my @finalsolution;
+    while (my $first_step = $sth->fetchrow_hashref)
+    {
+	my $sth2 = $dbh->prepare("select b3.title from biblioitems b2, biblio b3 where b3.biblionumber = ? and b2.biblionumber = b3.biblionumber and (b2.issn = ? or b3.title like ?)");
+	$sth2->execute($first_step->{'biblionumber'},$search, "%$search%");
+	my @answear;
+	@answear = $sth2->fetchrow_array;
+	$total = scalar @answear;
+	if ($total >= 1)
+	{
+	    $first_step->{'serial'} = $answear[0];
+	    push @finalsolution ,$first_step;
+	}
+    }
+my ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "bull/receipt-search-result.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+    $template->param(subtable => \@finalsolution, total => $total
+		,);
+
+	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);
+	}
+    $results = \@finalsolution;
+	$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,
+							intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+							);
+output_html_with_http_headers $query, $cookie, $template->output;
+
+}
+else{
+my ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "bull/receipt.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+output_html_with_http_headers $query, $cookie, $template->output;
+}
Index: koha/bull/serial-issues.pl
diff -u koha/bull/serial-issues.pl:1.1.2.1 koha/bull/serial-issues.pl:1.1.2.2
--- koha/bull/serial-issues.pl:1.1.2.1	Tue Aug  2 15:00:36 2005
+++ koha/bull/serial-issues.pl	Sat Feb  4 21:26:47 2006
@@ -70,4 +70,6 @@
 		virtualshelves => C4::Context->preference("virtualshelves"),
 		);
 }
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/bull/statecollection.pl
diff -u koha/bull/statecollection.pl:1.3.2.7 koha/bull/statecollection.pl:1.3.2.8
--- koha/bull/statecollection.pl:1.3.2.7	Fri Sep 23 09:34:17 2005
+++ koha/bull/statecollection.pl	Sat Feb  4 21:26:47 2006
@@ -75,5 +75,6 @@
 			bibliotitle => $subs->{bibliotitle},
 			biblionumber => $subs->{biblionumber},
 			hassubscriptionexpired =>$hassubscriptionexpired,
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 		);
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/bull/subscription-add.pl
diff -u /dev/null koha/bull/subscription-add.pl:1.5.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/bull/subscription-add.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,174 @@
+#!/usr/bin/perl
+
+
+use strict;
+use CGI;
+use C4::Koha;
+use C4::Auth;
+use C4::Date;
+use C4::Output;
+use C4::Bull;
+use C4::Acquisition;
+use C4::Interface::CGI::Output;
+use C4::Context;
+use HTML::Template;
+use C4::Bull;
+
+my $query = new CGI;
+my $op = $query->param('op');
+my $dbh = C4::Context->dbh;
+my ($subscriptionid,$auser,$librarian,$cost,$aqbooksellerid, $aqbooksellername,$aqbudgetid, $bookfundid, $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, 
+	$bibliotitle, $notes);
+
+	my @budgets;
+my ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "bull/subscription-add.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+
+if ($op eq 'mod') {
+	my $subscriptionid = $query->param('subscriptionid');
+	my $subs = &getsubscription($subscriptionid);
+	$auser = $subs->{'user'};
+	$librarian => $subs->{'librarian'},
+	$cost = $subs->{'cost'};
+	$aqbooksellerid = $subs->{'aqbooksellerid'};
+	$aqbooksellername = $subs->{'aqbooksellername'};
+	$bookfundid = $subs->{'bookfundid'};
+	$aqbudgetid = $subs->{'aqbudgetid'};
+	$startdate = $subs->{'startdate'};
+	$periodicity = $subs->{'periodicity'};
+	$dow = $subs->{'dow'};
+	$numberlength = $subs->{'numberlength'};
+	$weeklength = $subs->{'weeklength'};
+	$monthlength = $subs->{'monthlength'};
+	$add1 = $subs->{'add1'};
+	$every1 = $subs->{'every1'};
+	$whenmorethan1 = $subs->{'whenmorethan1'};
+	$setto1 = $subs->{'setto1'};
+	$lastvalue1 = $subs->{'lastvalue1'};
+	$innerloop1 = $subs->{'innerloop1'};
+	$add2 = $subs->{'add2'};
+	$every2 = $subs->{'every2'};
+	$whenmorethan2 = $subs->{'whenmorethan2'};
+	$setto2 = $subs->{'setto2'};
+	$lastvalue2 = $subs->{'lastvalue2'};
+	$innerloop2 = $subs->{'innerloop2'};
+	$add3 = $subs->{'add3'};
+	$every3 = $subs->{'every3'};
+	$whenmorethan3 = $subs->{'whenmorethan3'};
+	$setto3 = $subs->{'setto3'};
+	$lastvalue3 = $subs->{'lastvalue3'};
+	$innerloop3 = $subs->{'innerloop3'};
+	$numberingmethod = $subs->{'numberingmethod'};
+	$status = $subs->{status};
+	$biblionumber = $subs->{'biblionumber'};
+	$bibliotitle = $subs->{'bibliotitle'},
+	$notes = $subs->{'notes'};
+	$template->param(
+		$op => 1,
+		user => $auser,
+		librarian => $librarian,
+		aqbooksellerid => $aqbooksellerid,
+		aqbooksellername => $aqbooksellername,
+		cost => $cost,
+		aqbudgetid => $aqbudgetid,
+		bookfundid => $bookfundid,
+		startdate => format_date($startdate),
+		periodicity => $periodicity,
+		dow => $dow,
+		numberlength => $numberlength,
+		weeklength => $weeklength,
+		monthlength => $monthlength,
+		add1 => $add1,
+		every1 => $every1,
+		whenmorethan1 => $whenmorethan1,
+		setto1 => $setto1,
+		lastvalue1 => $lastvalue1,
+		innerloop1 => $innerloop1,
+		add2 => $add2,
+		every2 => $every2,
+		whenmorethan2 => $whenmorethan2,
+		setto2 => $setto2,
+		lastvalue2 => $lastvalue2,
+		innerloop2 => $innerloop2,
+		add3 => $add3,
+		every3 => $every3,
+		whenmorethan3 => $whenmorethan3,
+		setto3 => $setto3,
+		lastvalue3 => $lastvalue3,
+		innerloop3 => $innerloop3,
+		numberingmethod => $numberingmethod,
+		status => $status,
+		biblionumber => $biblionumber,
+		bibliotitle => $bibliotitle,
+		notes => $notes,
+		subscriptionid => $subscriptionid,
+		);
+	$template->param(
+				"periodicity$periodicity" => 1,
+				"dow$dow" => 1,
+				);
+}
+(my $temp, at budgets) = bookfunds();
+# find default value & set it for the template
+for (my $i=0;$i<=$#budgets;$i++) {
+	if ($budgets[$i]->{'aqbudgetid'} eq $aqbudgetid) {
+		$budgets[$i]->{'selected'}=1;
+	}
+}
+$template->param(budgets => \@budgets,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+
+if ($op eq 'addsubscription') {
+	my $auser = $query->param('user');
+	my $aqbooksellerid = $query->param('aqbooksellerid');
+	my $cost = $query->param('cost');
+	my $aqbudgetid = $query->param('aqbudgetid'); 
+	my $startdate = $query->param('startdate');
+	my $periodicity = $query->param('periodicity');
+	my $dow = $query->param('dow');
+	my $numberlength = $query->param('numberlength');
+	my $weeklength = $query->param('weeklength');
+	my $monthlength = $query->param('monthlength');
+	my $add1 = $query->param('add1');
+	my $every1 = $query->param('every1');
+	my $whenmorethan1 = $query->param('whenmorethan1');
+	my $setto1 = $query->param('setto1');
+	my $lastvalue1 = $query->param('lastvalue1');
+	my $add2 = $query->param('add2');
+	my $every2 = $query->param('every2');
+	my $whenmorethan2 = $query->param('whenmorethan2');
+	my $setto2 = $query->param('setto2');
+	my $lastvalue2 = $query->param('lastvalue2');
+	my $add3 = $query->param('add3');
+	my $every3 = $query->param('every3');
+	my $whenmorethan3 = $query->param('whenmorethan3');
+	my $setto3 = $query->param('setto3');
+	my $lastvalue3 = $query->param('lastvalue3');
+	my $numberingmethod = $query->param('numberingmethod');
+	my $status = 1;
+	my $biblionumber = $query->param('biblionumber');
+	my $notes = $query->param('notes');
+	my $subscriptionid = newsubscription($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
+				);
+	print $query->redirect("/cgi-bin/koha/bull/subscription-detail.pl?subscriptionid=$subscriptionid");
+} else {
+	output_html_with_http_headers $query, $cookie, $template->output;
+}
Index: koha/bull/subscription-bib-search.pl
diff -u koha/bull/subscription-bib-search.pl:1.3.2.1 koha/bull/subscription-bib-search.pl:1.3.2.2
--- koha/bull/subscription-bib-search.pl:1.3.2.1	Thu Dec  1 15:31:57 2005
+++ koha/bull/subscription-bib-search.pl	Sat Feb  4 21:26:47 2006
@@ -182,6 +182,8 @@
 
 
 # Print the page
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $query, $cookie, $template->output;
 
 # Local Variables:
Index: koha/bull/subscription-renew.pl
diff -u /dev/null koha/bull/subscription-renew.pl:1.1.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/bull/subscription-renew.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,70 @@
+#!/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 C4::Date;
+use HTML::Template;
+use C4::Context;
+use C4::Search;
+use C4::Auth;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Bull;
+
+my $query = new CGI;
+my $dbh = C4::Context->dbh;
+
+my $op = $query->param('op');
+my $subscriptionid = $query->param('subscriptionid');
+
+my ($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "bull/subscription-renew.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+if ($op eq "renew") {
+	subscriptionrenew($subscriptionid,$loggedinuser,$query->param('startdate'),$query->param('numberlength'),$query->param('weeklength'),$query->param('monthlength'),$query->param('note'));
+}
+
+my $subscription= getsubscription($subscriptionid);
+
+$template->param(startdate => format_date(subscriptionexpirationdate($subscriptionid)),
+				numberlength => $subscription->{numberlength},
+				weeklength => $subscription->{weeklength},
+				monthlength => $subscription->{monthlength},
+				subscriptionid => $subscriptionid,
+				bibliotitle => $subscription->{bibliotitle},
+				$op => 1,
+				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+			);
+
+# Print the page
+output_html_with_http_headers $query, $cookie, $template->output;
+
+# Local Variables:
+# tab-width: 4
+# End:
Index: koha/catalogue-home.pl
diff -u /dev/null koha/catalogue-home.pl:1.11.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/catalogue-home.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,41 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Database;
+use C4::Acquisition;
+use C4::Biblio;
+use HTML::Template;
+
+my $query = new CGI;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "catalogue/catalogue-home.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {catalogue => 1},
+			     debug => 1,
+			     });
+
+my ($branchcount, at branches)=branches();
+my ($itemtypecount, at itemtypes)=getitemtypes();
+
+my $classlist='';
+my $dbh=C4::Context->dbh;
+my $sth=$dbh->prepare("select description,itemtype from itemtypes order by description");
+$sth->execute;
+while (my ($description,$itemtype) = $sth->fetchrow) {
+    $classlist.="<option value=\"$itemtype\">$description\n";
+}
+
+$template->param(classlist => $classlist,
+		type => 'intranet',
+		branches=>\@branches,
+		itemtypes=>\@itemtypes,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+
+output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/circ/branchtransfers.pl
diff -u koha/circ/branchtransfers.pl:1.20.4.3 koha/circ/branchtransfers.pl:1.20.4.4
--- koha/circ/branchtransfers.pl:1.20.4.3	Wed Dec 14 13:14:02 2005
+++ koha/circ/branchtransfers.pl	Sat Feb  4 21:26:47 2006
@@ -309,7 +309,8 @@
 								wastransferred => $wastransferred,
 								trsfitemloop => \@trsfitemloop,
 								branchoptionloop => \@branchoptionloop,
-								errmsgloop => \@errmsgloop
+								errmsgloop => \@errmsgloop,
+								intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 							);
 output_html_with_http_headers $query, $cookie, $template->output;
 
Index: koha/circ/circulation.pl
diff -u koha/circ/circulation.pl:1.81.2.7 koha/circ/circulation.pl:1.81.2.8
--- koha/circ/circulation.pl:1.81.2.7	Mon Dec  5 09:41:35 2005
+++ koha/circ/circulation.pl	Sat Feb  4 21:26:47 2006
@@ -323,7 +323,8 @@
 if ($branchcookie) {
     $cookie=[$cookie, $branchcookie, $printercookie];
 }
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $query, $cookie, $template->output;
 
 ####################################################################
Index: koha/circ/reserve.pl
diff -u koha/circ/reserve.pl:1.1.2.3 koha/circ/reserve.pl:1.1.2.4
--- koha/circ/reserve.pl:1.1.2.3	Fri Dec 30 10:54:02 2005
+++ koha/circ/reserve.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: reserve.pl,v 1.1.2.3 2005/12/30 10:54:02 tipaul Exp $
+# $Id: reserve.pl,v 1.1.2.4 2006/02/04 21:26:47 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -107,7 +107,9 @@
 
 $sth->finish;
 
-$template->param(		todaysdate        => format_date($todaysdate),
-		reserveloop       => \@reservedata );
+$template->param(todaysdate        => format_date($todaysdate),
+		reserveloop       => \@reservedata,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 
 print "Content-Type: text/html\n\n", $template->output;
Index: koha/circ/returns.pl
diff -u koha/circ/returns.pl:1.37.2.2 koha/circ/returns.pl:1.37.2.3
--- koha/circ/returns.pl:1.37.2.2	Tue Oct 25 12:39:52 2005
+++ koha/circ/returns.pl	Sat Feb  4 21:26:47 2006
@@ -464,7 +464,8 @@
     genprname  => $printers->{$printer}->{'printername'},
     branch     => $branch,
     printer    => $printer,
-    errmsgloop => \@errmsgloop
+    errmsgloop => \@errmsgloop,
+    intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 );
 
 # actually print the page!
Index: koha/circ/selectbranchprinter.pl
diff -u /dev/null koha/circ/selectbranchprinter.pl:1.13.4.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/circ/selectbranchprinter.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,145 @@
+#!/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(\%env);
+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"),
+							);
+
+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: koha/detail.pl
diff -u koha/detail.pl:1.24.2.2 koha/detail.pl:1.24.2.3
--- koha/detail.pl:1.24.2.2	Mon Aug  1 13:18:51 2005
+++ koha/detail.pl	Sat Feb  4 21:26:47 2006
@@ -20,7 +20,9 @@
 			     });
 
 my $biblionumber=$query->param('bib');
-$template->param(biblionumber => $biblionumber);
+$template->param(biblionumber => $biblionumber,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 
 
 # change back when ive fixed request.pl
Index: koha/export/marc.pl
diff -u koha/export/marc.pl:1.4.2.2 koha/export/marc.pl:1.4.2.3
--- koha/export/marc.pl:1.4.2.2	Fri Dec 16 13:04:03 2005
+++ koha/export/marc.pl	Sat Feb  4 21:26:47 2006
@@ -103,7 +103,10 @@
 					flagsrequired => {parameters => 1, management => 1, tools => 1},
 					debug => 1,
 					});
-	$template->param(branchloop=>\@branchloop,CGIitemtype=>$CGIitemtype);
+	$template->param(branchloop=>\@branchloop,
+			CGIitemtype=>$CGIitemtype,
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+			);
 	output_html_with_http_headers $query, $cookie, $template->output;
 }
 
Index: koha/help.pl
diff -u koha/help.pl:1.1.2.1 koha/help.pl:1.1.2.2
--- koha/help.pl:1.1.2.1	Tue May 31 15:30:45 2005
+++ koha/help.pl	Sat Feb  4 21:26:47 2006
@@ -40,6 +40,8 @@
 	$template->param(themelang => '/intranet-tmpl' . "/$theme/$lang",
 							interface => '/intranet-tmpl',
 							theme => $theme,
-							lang => $lang);
+							lang => $lang
+							intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+			);
 	return $template;
 }
Index: koha/import/breeding.pl
diff -u koha/import/breeding.pl:1.2.4.1 koha/import/breeding.pl:1.2.4.2
--- koha/import/breeding.pl:1.2.4.1	Thu Apr  7 10:10:52 2005
+++ koha/import/breeding.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: breeding.pl,v 1.2.4.1 2005/04/07 10:10:52 tipaul Exp $
+# $Id: breeding.pl,v 1.2.4.2 2006/02/04 21:26:47 kados Exp $
 
 # Script for handling import of MARC data into Koha db
 #   and Z39.50 lookups
@@ -94,7 +94,8 @@
 							);
 
 }
-
+$template-param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
 my $menu;
 my $file;
@@ -103,6 +104,9 @@
 #---------------
 # log cleared, as marcimport is (almost) rewritten from scratch.
 # $Log: breeding.pl,v $
+# Revision 1.2.4.2  2006/02/04 21:26:47  kados
+# Adds support for intranetcolorstylesheet
+#
 # Revision 1.2.4.1  2005/04/07 10:10:52  tipaul
 # copying processz3950queue from 2.0 branch. The 2.2 version misses an important fix
 #
Index: koha/mainpage.pl
diff -u koha/mainpage.pl:1.9.2.1 koha/mainpage.pl:1.9.2.2
--- koha/mainpage.pl:1.9.2.1	Thu Jun 16 15:06:23 2005
+++ koha/mainpage.pl	Sat Feb  4 21:26:47 2006
@@ -35,6 +35,8 @@
 
 my $marc_p = C4::Context->boolean_preference("marc");
 $template->param(NOTMARC => !$marc_p);
-$template->param(authtypesloop => \@authtypesloop);
+$template->param(authtypesloop => \@authtypesloop,
+intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/maint/catmaintain.pl
diff -u /dev/null koha/maint/catmaintain.pl:1.6.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/maint/catmaintain.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,107 @@
+#!/usr/bin/perl
+
+#script to do some serious catalogue maintainance
+#written 22/11/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
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Maintainance;
+use HTML::Template;
+
+my $input = new CGI;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name   => 'maint/catmaintain.tmpl',
+                             query           => $input,
+                             type            => 'intranet',
+                             authnotrequired => 0,
+                             flagsrequired   => {catalogue => 1},
+                             debug           => 1,
+                             });
+
+my %params = ();
+
+
+my $type=$input->param('type');
+my $blah;
+my $num=0;
+my $offset=0;
+if ($type eq 'allsub'){
+  my $sub=$input->param('sub');
+  my ($count,$results)=listsubjects($sub,$num,$offset);
+  my @it = ();
+  for (my $i=0;$i<$count;$i++){
+    my $sub2=$results->[$i]->{'subject'};
+    push @it, {'sub2' => $sub2, 'subject' => $results->[$i]->{'subject'}};
+  }
+  %params = ('sub' => $sub, 'loop' => \@it);
+
+} elsif ($type eq 'modsub'){
+  %params = ('sub' => $input->param('sub'));
+
+} elsif ($type eq 'upsub'){
+  my $sub=$input->param('sub');
+  my $oldsub=$input->param('oldsub');
+  updatesub($sub,$oldsub);
+  %params = ('sub' => $sub, 'oldsub' => $oldsub);
+
+} elsif ($type eq 'undel'){
+  my $title=$input->param('title');
+  my ($count,$results)=deletedbib($title);
+  my @it = ();
+  for (my $i=0;$i<$count;$i++){
+    push @it, {
+	'title'    => $results->[$i]->{'title'},
+	'author'   => $results->[$i]->{'author'},
+	'undelete' => "type=finun&bib=$results->[$i]->{'biblionumber'}",
+      };
+  }
+  %params = ('loop' => \@it);
+
+} elsif ($type eq 'finun'){
+  my $bib=$input->param('bib');
+  undeletebib($bib);
+
+} elsif ($type eq 'fixitemtype'){
+  my $bi=$input->param('bi');
+  my $item=$input->param('item');
+  %params = ('bi' => $bi, 'item' => $item);
+
+} elsif ($type eq 'updatetype'){
+  my $bi=$input->param('bi');
+  my $itemtype=$input->param('itemtype');
+  updatetype($bi,$itemtype);
+
+} else {
+  $type = 'mainmenu'; # NOTE
+
+}
+
+$template->param(type => 'intranet',
+                "$type-p" => 1,
+                 %params,
+		 intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		 );
+
+output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/mancredit.pl
diff -u /dev/null koha/mancredit.pl:1.10.4.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/mancredit.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,64 @@
+#!/usr/bin/perl
+
+#wrriten 11/1/2000 by chris at katipo.oc.nz
+#script to display borrowers account details
+
+
+# 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::Output;
+use C4::Interface::CGI::Output;
+use CGI;
+use HTML::Template;
+use C4::Search;
+use C4::Accounts2;
+my $input=new CGI;
+
+
+my $bornum=$input->param('bornum');
+#get borrower details
+my $data=borrdata('',$bornum);
+my $add=$input->param('add');
+if ($add){
+  my $itemnum=$input->param('itemnum');
+  my $desc=$input->param('desc');
+  my $amount=$input->param('amount');
+  $amount = -$amount;
+  my $type=$input->param('type');
+  manualinvoice($bornum,$itemnum,$desc,$type,$amount);
+  print $input->redirect("/cgi-bin/koha/boraccount.pl?bornum=$bornum");
+} else {
+	my ($template, $loggedinuser, $cookie)
+	= get_template_and_user({template_name => "mancredit.tmpl",
+					query => $input,
+					type => "intranet",
+					authnotrequired => 0,
+					flagsrequired => {borrowers => 1},
+					debug => 1,
+					});
+	$template->param( bornum => $bornum,
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+			);
+	print $input->header(
+	    -type => guesstype($template->output),
+	    -cookie => $cookie
+	),$template->output;
+
+}
Index: koha/members/deletemem.pl
diff -u koha/members/deletemem.pl:1.4.2.4 koha/members/deletemem.pl:1.4.2.5
--- koha/members/deletemem.pl:1.4.2.4	Mon Oct  3 09:51:03 2005
+++ koha/members/deletemem.pl	Sat Feb  4 21:26:48 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: deletemem.pl,v 1.4.2.4 2005/10/03 09:51:03 hdl Exp $
+# $Id: deletemem.pl,v 1.4.2.5 2006/02/04 21:26:48 kados Exp $
 
 #script to delete items
 #written 2/5/00
@@ -102,6 +102,8 @@
 # 		print "<TR><TD>Guarantees</td></tr>";
 # 	}
 # 	print "</table>";
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $input, $cookie, $template->output;
 
 } else {
Index: koha/members/imemberentry.pl
diff -u koha/members/imemberentry.pl:1.1.2.1 koha/members/imemberentry.pl:1.1.2.2
--- koha/members/imemberentry.pl:1.1.2.1	Fri Sep 23 10:07:23 2005
+++ koha/members/imemberentry.pl	Sat Feb  4 21:26:48 2006
@@ -98,7 +98,9 @@
 				dateofbirth	=> $data->{'dateofbirth'},
 				dateformat      => display_date_format(),
 				cardnumber_institution => $cardnumber,
-				CGIbranch => $CGIbranch);
+				CGIbranch => $CGIbranch,
+				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+				);
 
 output_html_with_http_headers $input, $cookie, $template->output;
 
Index: koha/members/jmemberentry.pl
diff -u /dev/null koha/members/jmemberentry.pl:1.1.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/members/jmemberentry.pl	Sat Feb  4 21:26:48 2006
@@ -0,0 +1,103 @@
+#!/usr/bin/perl
+
+#script to set up screen for modification of borrower details
+#written 20/12/99 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
+
+use strict;
+use C4::Auth;
+use C4::Output;
+use CGI;
+use C4::Search;
+use HTML::Template;
+use C4::Interface::CGI::Output;
+use C4::Date;
+use C4::Members;
+
+my $input = new CGI;
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "members/jmemberentry.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {borrowers => 1},
+			     debug => 1,
+			     });
+
+my $member=$input->param('bornum');
+if ($member eq ''){
+  $member=NewBorrowerNumber();
+}
+my $type=$input->param('type');
+
+my $data=borrdata('',$member);
+
+my @titles = ('Miss', 'Mrs', 'Ms', 'Mr', 'Dr', 'Sir');
+	# FIXME - Assumes English. This ought to be made part of i18n.
+my @titledata;
+while (@titles) {
+  my $title = shift @titles;
+  my %row = ('title' => $title);
+  if ($data->{'title'} eq $title) {
+    $row{'selected'}=' selected';
+  } else {
+    $row{'selected'}='';
+  }
+  push(@titledata, \%row);
+}
+
+# get the data for children
+my $cmember1=NewBorrowerNumber();
+my @cmemdata;
+for (my $i=0;$i<1;$i++){
+  my %row;
+  $row{'cmember'}=$cmember1+$i;
+  $row{'i'}=$i;
+  $row{'count'}=$i+1;
+  push(@cmemdata, \%row);
+}
+
+my $jcardnumber=C4::Members::fixup_cardnumber("");
+
+$template->param( member => $member,
+			firstname       => $data->{'firstname'},
+			surname         => $data->{'surname'},
+			cardnumber      => $data->{'cardnumber'},
+			jcardnumber	=> $jcardnumber,
+			area            => $data->{'area'},
+			city            => $data->{'city'},
+			physstreet         => $data->{'physstreet'},
+			streetaddress   => $data->{'streetaddress'},
+			streetcity      => $data->{'streetcity'},
+			phone           => $data->{'phone'},
+			phoneday        => $data->{'phoneday'},
+			faxnumber       => $data->{'faxnumber'},
+			emailaddress    => $data->{'emailaddress'},
+			contactname     => $data->{'contactname'},
+			altphone        => $data->{'altphone'},
+			dateformat      => display_date_format(),
+			titleloop       => \@titledata,
+			cmemloop        => \@cmemdata,
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+			);
+
+
+output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/members/member-flags.pl
diff -u koha/members/member-flags.pl:1.3.2.1 koha/members/member-flags.pl:1.3.2.2
--- koha/members/member-flags.pl:1.3.2.1	Fri Sep  9 16:03:50 2005
+++ koha/members/member-flags.pl	Sat Feb  4 21:26:48 2006
@@ -81,7 +81,9 @@
     $template->param(member => $member,
 			surname => $bor->{'surname'},
 			firstname => $bor->{'firstname'},
-			loop => \@loop);
+			loop => \@loop,
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+			);
 
     output_html_with_http_headers $input, $cookie, $template->output;
 
Index: koha/members/member-password.pl
diff -u /dev/null koha/members/member-password.pl:1.3.2.1
--- /dev/null	Sat Feb  4 21:26:49 2006
+++ koha/members/member-password.pl	Sat Feb  4 21:26:48 2006
@@ -0,0 +1,87 @@
+#!/usr/bin/perl
+#script to set the password, and optionally a userid, for a borrower
+#written 2/5/00
+#by chris at katipo.co.nz
+#converted to using templates 3/16/03 by mwhansen at hmc.edu
+
+use strict;
+use C4::Auth;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Search;
+use C4::Context;
+use C4::Members;
+use C4::Circulation::Circ2;
+use CGI;
+use HTML::Template;
+use Digest::MD5 qw(md5_base64);
+
+my $input = new CGI;
+
+my $theme = $input->param('theme') || "default";
+			# only used if allowthemeoverride is set
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "members/member-password.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {borrowers => 1},
+			     debug => 1,
+			     });
+
+my $flagsrequired;
+$flagsrequired->{borrowers}=1;
+my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired);
+
+my $member=$input->param('member');
+my %env;
+$env{'nottodayissues'}=1;
+my %member2;
+$member2{'borrowernumber'}=$member;
+my $issues=currentissues(\%env,\%member2);
+my $i=0;
+foreach (sort keys %$issues) {
+    $i++;
+}
+
+my ($bor,$flags)=getpatroninformation(\%env, $member,'');
+my $newpassword = $input->param('newpassword');
+
+if ( $newpassword ) {
+	my $digest=md5_base64($input->param('newpassword'));
+	my $uid = $input->param('newuserid');
+	my $dbh=C4::Context->dbh;
+	if (changepassword($uid,$member,$digest)) {
+		$template->param(newpassword => $newpassword);
+		print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$member");
+	} else {
+        $template->param(othernames => $bor->{'othernames'},
+						surname     => $bor->{'surname'},
+						firstname   => $bor->{'firstname'},
+						userid      => $bor->{'userid'},
+						defaultnewpassword => $newpassword );
+	}
+} else {
+    my $userid = $bor->{'userid'};
+
+    my $chars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
+    my $length=int(rand(2))+4;
+    my $defaultnewpassword='';
+    for (my $i=0; $i<$length; $i++) {
+	$defaultnewpassword.=substr($chars, int(rand(length($chars))),1);
+    }
+	$template->param(	othernames => $bor->{'othernames'},
+			surname     => $bor->{'surname'},
+			firstname   => $bor->{'firstname'},
+			userid      => $bor->{'userid'},
+			defaultnewpassword => $defaultnewpassword );
+
+
+}
+
+$template->param( member => $member,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+
+output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/members/member.pl
diff -u koha/members/member.pl:1.2.2.6 koha/members/member.pl:1.2.2.7
--- koha/members/member.pl:1.2.2.6	Wed Dec 14 15:11:41 2005
+++ koha/members/member.pl	Sat Feb  4 21:26:48 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: member.pl,v 1.2.2.6 2005/12/14 15:11:41 tipaul Exp $
+# $Id: member.pl,v 1.2.2.7 2006/02/04 21:26:48 kados Exp $
 
 #script to do a borrower enquiery/brin up borrower details etc
 #written 20/12/99 by chris at katipo.co.nz
@@ -111,6 +111,8 @@
 $template->param( 
 			member          => $member,
 			numresults		=> $count,
-			resultsloop     => \@resultsdata );
+			resultsloop     => \@resultsdata,
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+			);
 
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/members/memberentry.pl
diff -u koha/members/memberentry.pl:1.5.2.10 koha/members/memberentry.pl:1.5.2.11
--- koha/members/memberentry.pl:1.5.2.10	Mon Jan  9 10:33:21 2006
+++ koha/members/memberentry.pl	Sat Feb  4 21:26:48 2006
@@ -2,7 +2,7 @@
 # NOTE: This file uses standard 8-space tabs
 #       DO NOT SET TAB SIZE TO 4
 
-# $Id: memberentry.pl,v 1.5.2.10 2006/01/09 10:33:21 tipaul Exp $
+# $Id: memberentry.pl,v 1.5.2.11 2006/02/04 21:26:48 kados Exp $
 
 #script to set up screen for modification of borrower details
 #written 20/12/99 by chris at katipo.co.nz
@@ -314,6 +314,8 @@
 			        modify          => $modify,
 				CGIbranch => $CGIbranch);
 	$template->param(Institution => 1) if ($categorycode eq "I");
+	$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+			);
 	output_html_with_http_headers $input, $cookie, $template->output;
 
 
Index: koha/members/members-home.pl
diff -u koha/members/members-home.pl:1.1.2.1 koha/members/members-home.pl:1.1.2.2
--- koha/members/members-home.pl:1.1.2.1	Tue Jan 18 21:59:09 2005
+++ koha/members/members-home.pl	Sat Feb  4 21:26:48 2006
@@ -33,5 +33,6 @@
 			     });
 }
 
-
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/members/moremember.pl
diff -u koha/members/moremember.pl:1.5.2.10 koha/members/moremember.pl:1.5.2.11
--- koha/members/moremember.pl:1.5.2.10	Tue Jan 31 18:35:55 2006
+++ koha/members/moremember.pl	Sat Feb  4 21:26:48 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: moremember.pl,v 1.5.2.10 2006/01/31 18:35:55 kados Exp $
+# $Id: moremember.pl,v 1.5.2.11 2006/02/04 21:26:48 kados Exp $
 
 # script to do a borrower enquiry/bring up borrower details etc
 # Displays all the details about a borrower
@@ -200,6 +200,8 @@
 		 totaldue => sprintf("%.2f",$total),
 		 issueloop       => \@issuedata,
 		 unvalidlibrarian => $unvalidlibrarian,
-		 reserveloop     => \@reservedata);
+		 reserveloop     => \@reservedata,
+		 intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		 );
 
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/members/newimember.pl
diff -u /dev/null koha/members/newimember.pl:1.2.2.1
--- /dev/null	Sat Feb  4 21:26:50 2006
+++ koha/members/newimember.pl	Sat Feb  4 21:26:48 2006
@@ -0,0 +1,139 @@
+#!/usr/bin/perl
+# Note: This file now uses standard 8-space tabs
+
+# $Id: newimember.pl,v 1.2.2.1 2006/02/04 21:26:48 kados Exp $
+
+#script to print confirmation screen,
+#then if accepted calls itself to insert data
+#modified 2002/12/16 by hdl at ifrance.com : Templating
+#the "parent" is imemberentry.pl
+
+
+# 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;
+use C4::Output;
+use C4::Input;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Members;
+use CGI;
+use Date::Manip;
+use HTML::Template;
+
+my %env;
+my $input = new CGI;
+#get varibale that tells us whether to show confirmation page
+#or insert data
+my $insert=$input->param('insert');
+
+my ($template, $loggedinuser, $cookie) = get_template_and_user({
+	template_name => "members/newimember.tmpl",
+	query => $input,
+	type => "intranet",
+	authnotrequired => 0,
+	flagsrequired => {borrowers => 1},
+	debug => 1,
+  });
+
+#get rest of data
+my %data;
+my @names=$input->param;
+foreach my $key (@names){
+  $data{$key}=$input->param($key);
+}
+
+my $missing=0;
+
+my $string="The following compulsary fields have been left blank. Please push the back button
+and try again<p>";
+if ($data{'cardnumber_institution'} !~ /\S/){
+  $string.="Cardnumber<br>";
+  $missing=1;
+}
+if ($data{'institution_name'} !~ /\S/){
+  $string.="Institution Name<br>";
+  $missing=1;
+}
+if ($data{'address'} !~ /\S/){
+  $string.="Postal Address<br>";
+  $missing=1;
+}
+if ($data{'city'} !~ /\S/){
+  $string.="City<br>";
+  $missing=1;
+}
+if ($data{'contactname'} !~ /\S/){
+  $string.="Contact Name";
+  $missing=1;
+}
+
+$template->param( missingloop => ($missing==1));
+$template->param( string => $string);
+if ($missing !=1) {
+    $data{'cardnumber_institution'} = C4::Members::fixup_cardnumber
+	    ($data{'cardnumber_institution'});
+
+    #check cardnumber is valid
+    my $nounique;
+    if ( $data{'type'} ne "Add" )    {
+	$nounique = 0;
+    } else {
+	$nounique = 1;
+    }
+    my $valid=checkdigit(\%env,$data{'cardnumber'}, $nounique);
+
+    $template->param( invalid => ($valid !=1));
+
+    if ($valid) {
+	my @inputs;
+	while (my ($key, $value) = each %data) {
+	    push(@inputs, { 'key'	=> $key,
+			    'value'	=> CGI::escapeHTML($value) });
+	}
+    $template->param(institution_name => $data{institution_name},
+		     bornum => $data{'borrowernumber'},
+		     cardnumber_institution => $data{'cardnumber_institution'},
+		     memcat => $data{'categorycode'},
+		     branchcode => $data{'branchcode'},
+		     sex => $data{sex},
+		     postal => $data{postal},
+		     home => $data{home},
+			zipcode => $data{'zipcode'},
+			homezipcode => $data{'homezipcode'},
+		     phone => $data{'phone'},
+		     phoneday => $data{'phoneday'},
+		     faxnumber => $data{'faxnumber'},
+		     emailaddress => $data{'emailaddress'},
+			textmessaging => $data{'textmessaging'},
+		     contactname => $data{'contactname'},
+		     altphone => $data{'altphone'},
+		     altrelationship => $data{'altrelationship'},
+		     altnotes => $data{'altnotes'},
+		     bornotes => $data{'borrowernotes'},
+		     inputsloop => \@inputs);
+    }
+}
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+output_html_with_http_headers $input, $cookie, $template->output;
+
+
+# Local Variables:
+# tab-width: 8
+# End:
Index: koha/members/newjmember.pl
diff -u /dev/null koha/members/newjmember.pl:1.4.2.1
--- /dev/null	Sat Feb  4 21:26:50 2006
+++ koha/members/newjmember.pl	Sat Feb  4 21:26:48 2006
@@ -0,0 +1,153 @@
+#!/usr/bin/perl
+
+# $Id: newjmember.pl,v 1.4.2.1 2006/02/04 21:26:48 kados Exp $
+
+# script to print confirmation screen, then if accepted calls itself to insert data
+# FIXME - Yes, but what does it _do_?
+# 2002/12/18 hdl at ifrance.comTemplating
+
+# 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::Context;
+use C4::Output;
+use C4::Input;
+use C4::Interface::CGI::Output;
+use C4::Interface::CGI::Template;
+use C4::Koha;
+use CGI;
+use Date::Manip;
+use HTML::Template;
+
+my %env;
+my $input = new CGI;
+#get varibale that tells us whether to show confirmation page
+#or insert data
+my $insert=$input->param('insert');
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "members/newjmember.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {borrowers => 1},
+			     debug => 1,
+			     });
+
+#get rest of data
+my %data;
+my @names=$input->param;
+foreach my $key (@names){
+  $data{$key}=$input->param($key);
+}
+my $missing=0;
+
+for (my $i=0;$i<3;$i++){
+  my $number=$data{"cardnumber_child_$i"};
+  my $firstname=$data{"firstname_child_$i"};
+  my $surname=$data{"surname_child_$i"};
+  my $dob=$data{"dateofbirth_child_$i"};
+  my $sex=$data{"sex_child_$i"};
+  if ($number eq ''){
+    if ($i == 0){
+		$template->param(cardnumber_missing => 1);
+		$missing=1;
+		    if ($firstname eq ''){
+		$template->param(firstname_missing => 1);
+		$missing=1;
+    }
+    if ($surname eq ''){
+		$template->param(surname_missing => 1);
+		$missing=1;
+    }
+    if ($dob eq ''){
+		$template->param(dob_missing => 1);
+		$missing=1;
+    }
+    if ($sex eq ''){
+		$template->param(gender_missing => 1);
+		$missing=1;
+    }
+    }
+  } else {
+    if ($firstname eq ''){
+		$template->param(firstname_missing => 1);
+		$missing=1;
+    }
+    if ($surname eq ''){
+		$template->param(surname_missing => 1);
+		$missing=1;
+    }
+    if ($dob eq ''){
+		$template->param(dob_missing => 1);
+		$missing=1;
+    }
+    if ($sex eq ''){
+		$template->param(gender_missing => 1);
+		$missing=1;
+    }
+    #check cardnumber is valid
+    my $nounique;
+    if ( $data{'type'} ne "Add" )    {
+		$nounique = 0;
+    } else {
+		$nounique = 1;
+    }
+    my $valid=checkdigit(\%env,$number, $nounique);
+    if ($valid != 1){
+		$template->param(missing =>1);
+		$template->param(invalid_cardnumber => 1);
+		$missing=1;
+    }
+  }
+}
+	my @identsloop;
+	for (my $i=0;$i<3;$i++){
+		my %ident;
+#		$ident{'main'}=$main;
+#		$ident{'image'}=$image;
+		$ident{'cardchild'}=$data{"cardnumber_child_$i"};
+		if ($data{"cardnumber_child_$i"} ne ''){
+			my $name=$data{"firstname_child_$i"} . " " . $data{"surname_child_$i"};
+			$ident{'name'}=$name;
+			$ident{'bornum'}=$data{"bornumber_child_$i"};
+			$ident{'dob'}=$data{"dateofbirth_child_$i"};
+			($data{"sex_child_$i"} eq 'M') ? ($ident{'sex'}="Male") : ($ident{'sex'}="Female") ;
+			$ident{'school'}=$data{"school_child_$i"};
+			$ident{'notes'}=$data{"altnotes_child_$i"};
+			push(@identsloop, \%ident);
+		}
+	}
+	my @inputsloop;
+	while (my ($key, $value) = each %data) {
+		$value=~ s/\"/%22/g;
+		my %line;
+		$line{'key'}=$key;
+		$line{'value'}=$value;
+		push(@inputsloop, \%line);
+	}
+
+# FIXME IF main and image are not fetched by HTML::TEMPLATE get them into identsloop
+$template->param(NOK => ($missing==1),
+		identsloop => \@identsloop,
+		inputsloop => \@inputsloop,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+
+output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/members/newmember.pl
diff -u /dev/null koha/members/newmember.pl:1.2.2.1
--- /dev/null	Sat Feb  4 21:26:50 2006
+++ koha/members/newmember.pl	Sat Feb  4 21:26:48 2006
@@ -0,0 +1,211 @@
+#!/usr/bin/perl
+
+# $Id: newmember.pl,v 1.2.2.1 2006/02/04 21:26:48 kados Exp $
+
+#script to print confirmation screen, then if accepted calls itself to insert data
+# FIXME - Yes, but what does it _do_?
+# 2002/12/18 hdl at ifrance.com templating
+
+# 2003/01/20 acli at ada.dhs.org XXX it seems to do the following:
+# * "insert" seems to do nothing; in 1.2.2 the script just returns a blank
+#   page (with the headers etc.) if "insert" has anything in it
+# * $ok has the opposite meaning of what one expects; $ok == 1 means "not ok"
+# * if ($ok == 0) considers the "ok" case; it displays a confirmation page
+#   for the user to "click to confirm that everything is entered correctly"
+# * The "else" case for ($ok == 0) handles the "not ok" case; $string is the
+#   error message to display
+
+# FIXME - What is the correct value of "flagsrequired"?
+
+# 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::Input;
+use C4::Interface::CGI::Output;
+use CGI;
+use Date::Manip;
+use HTML::Template;
+use C4::Date;
+my %env;
+my $input = new CGI;
+
+#get rest of data
+my %data;
+my @names=$input->param;
+foreach my $key (@names){
+  $data{$key}=$input->param($key);
+}
+
+my ($template, $borrowernumber, $cookie)
+    = get_template_and_user({template_name => "members/newmember.tmpl",
+			     query => $input,
+                             type => "intranet",
+                             authnotrequired => 0,
+                             flagsrequired => {parameters => 1},
+                         });
+
+#Get the database handle
+my $dbh = C4::Context->dbh;
+
+# Check that all compulsary fields are entered
+# If everything is ok, set $ok = 0
+# Otherwise set $ok = 1 and $string to the error message to display.
+
+my $ok=0;
+my $string = "The following compulsary fields have been left blank. "
+	. "Please push the back button and try again<p>";
+my @errors;
+if ($data{'cardnumber'} eq ''){
+	push @errors,"cardnumber";
+    $ok=1;
+} else {
+    #check cardnumber is valid
+    my $nounique;
+    if ( $data{'type'} eq "Add" )    {
+	$nounique = 0;
+    } else {
+	$nounique = 1;
+    }
+    my $valid=checkdigit(\%env,$data{'cardnumber'}, $nounique);
+    if ($valid != 1){
+        $ok=1;
+    	push @errors, "invalid_cardnumber";
+    }
+}
+if ($data{'sex'} eq ''){
+    push @errors, "gender";
+    $ok=1;
+}
+if ($data{'firstname'} eq ''){
+    push @errors,"firstname";
+    $ok=1;
+}
+if ($data{'surname'} eq ''){
+    push @errors,"surname";
+    $ok=1;
+}
+if ($data{'address'} eq ''){
+    push @errors, "address";
+    $ok=1;
+}
+if ($data{'city'} eq ''){
+    push @errors, "city";
+    $ok=1;
+}
+
+# Pass the ok/not ok status and the error message to the template
+$template->param(	OK=> ($ok==0));
+foreach my $error (@errors) {
+	$template->param( $error => 1);
+}
+
+# If things are ok, display the confirmation page
+if ($ok == 0) {
+    my $name=$data{'title'}." ";
+    if ($data{'othernames'} ne ''){
+	$name.=$data{'othernames'}." ";
+    } else {
+	$name.=$data{'firstname'}." ";
+    }
+    $name.="$data{'surname'} ( $data{'firstname'}, $data{'initials'})";
+    my $sex;
+    if ($data{'sex'} eq 'M'){
+	$sex=1;
+    } else {
+	$sex=0;
+    }
+    if ($data{'joining'} eq ''){
+	$data{'joining'}=ParseDate('today');
+	$data{'joining'}=format_date($data{'joining'});
+    }
+    if ($data{'expiry'} eq ''){
+    	my $get_enrolmentperiod = $dbh->prepare(q{SELECT enrolmentperiod FROM categories WHERE categorycode = ?});
+	$get_enrolmentperiod->execute($data{'categorycode'});
+	my ( $period ) = $get_enrolmentperiod->fetchrow;
+	if ( ($period)  && ($period != 1))
+	{
+		$data{'expiry'}=ParseDate("in $period years");
+		$data{'expiry'}=format_date($data{'expiry'});
+	}
+	else
+	{
+		$data{'expiry'}=ParseDate('in 1 year');
+		$data{'expiry'}=format_date($data{'expiry'});
+	}
+    }
+    my $ethnic=$data{'ethnicity'}." ".$data{'ethnicnotes'};
+    my $postal=$data{'address'}."<br>".$data{'city'};
+    my $home;
+    if ($data{'streetaddress'} ne ''){
+	$home=$data{'streetaddress'}."<br>".$data{'streetcity'};
+    } else {
+	$home=$postal;
+    }
+    my @inputsloop;
+    while (my ($key, $value) = each %data) {
+	$value=~ s/\"/%22/g;
+	my %line;
+	$line{'key'}=$key;
+	$line{'value'}=$value;
+	push(@inputsloop, \%line);
+    }
+
+    #Get the fee
+    my $sth = $dbh->prepare("SELECT enrolmentfee FROM categories WHERE categorycode = ?");
+    $sth->execute($data{'categorycode'});
+    my ($fee) = $sth->fetchrow;
+    $sth->finish;
+
+    $template->param(name => $name,
+		     bornum => $data{'borrowernumber'},
+		     cardnum => $data{'cardnumber'},
+		     memcat => $data{'categorycode'},
+		     fee => $fee,
+		     joindate => format_date($data{'joining'}),
+		     expdate => format_date($data{'expiry'}),
+		     branchcode => $data{'branchcode'},
+		     ethnic => $ethnic,
+		     dob => format_date($data{'dateofbirth'}),
+		     sex => $sex,
+		     postal => $postal,
+		     home => $home,
+			zipcode => $data{'zipcode'},
+			homezipcode => $data{'homezipcode'},
+		     phone => $data{'phone'},
+		     phoneday => $data{'phoneday'},
+		     faxnumber => $data{'faxnumber'},
+		     emailaddress => $data{'emailaddress'},
+			textmessaging => $data{'textmessaging'},
+		     contactname => $data{'contactname'},
+		     altphone => $data{'altphone'},
+		     altrelationship => $data{'altrelationship'},
+		     altnotes => $data{'altnotes'},
+		     bornotes => $data{'borrowernotes'},
+		     inputsloop => \@inputsloop);
+
+# If things are not ok, display the error message
+} else {
+    # Nothing to do; the "OK" and "string" variables have already been set
+    ;
+}
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+output_html_with_http_headers $input, $cookie, $template->output;
+
+
Index: koha/modbib.pl
diff -u /dev/null koha/modbib.pl:1.14.4.1
--- /dev/null	Sat Feb  4 21:26:50 2006
+++ koha/modbib.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,107 @@
+#!/usr/bin/perl
+
+# $Id: modbib.pl,v 1.14.4.1 2006/02/04 21:26:47 kados Exp $
+
+#script to modify/delete biblios
+#written 8/11/99
+# modified 11/11/99 by chris at katipo.co.nz
+# modified 12/16/2002 by hdl at ifrance.com : templating
+
+
+# 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::Output;
+use HTML::Template;
+use C4::Auth;
+use C4::Context;
+use C4::Interface::CGI::Output;
+
+my $input = new CGI;
+
+my $bibnum=$input->param('bibnum');
+my $data=&bibdata($bibnum);
+my ($subjectcount, $subject)     = &subject($bibnum);
+my ($subtitlecount, $subtitle)   = &subtitle($bibnum);
+my ($addauthorcount, $addauthor) = &addauthor($bibnum);
+my $sub        = $subject->[0]->{'subject'};
+my $additional = $addauthor->[0]->{'author'};
+my $dewey;
+my $submit=$input->param('submit.x');
+if ($submit eq '') {
+  print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=$bibnum");
+} # if
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "modbib.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {acquisition => 1},
+			     debug => 1,
+			     });
+
+# have to get all subtitles, subjects and additional authors
+$sub = join("|", map { $_->{'subject'} } @{$subject});
+
+$additional = join("|", map { $_->{'author'} } @{$addauthor});
+
+$dewey = $data->{'dewey'};
+$dewey =~ s/0+$//;
+if ($dewey eq "000.") {
+    $dewey = "";
+} # if
+if ($dewey < 10) {
+    $dewey = '00' . $dewey;
+} # if
+if ($dewey < 100 && $dewey > 10) {
+    $dewey = '0' . $dewey;
+} # if
+if ($dewey <= 0){
+  $dewey='';
+} # if
+$dewey = ~ s/\.$//;
+
+$data->{'title'} = &tidyhtml($data->{'title'});
+
+$template->param ( biblionumber => $bibnum,
+						biblioitemnumber => $data->{'biblioitemnumber'},
+						author => $data->{'author'},
+						title => $data->{'title'},
+						abstract => $data->{'abstract'},
+						subject => $sub,
+						copyrightdate => $data->{'copyrightdate'},
+						seriestitle => $data->{'seriestitle'},
+						additionalauthor => $additional,
+						subtitle => $data->{'subtitle'},
+						unititle => $data->{'unititle'},
+						notes => $data->{'bnotes'},
+						serial => $data->{'serial'},
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+
+output_html_with_http_headers $input, $cookie, $template->output;
+
+sub tidyhtml {
+  my ($inp)=@_;
+  $inp=~ s/\"/\&quot\;/g;
+  return($inp);
+}
Index: koha/modbibitem.pl
diff -u /dev/null koha/modbibitem.pl:1.14.2.1
--- /dev/null	Sat Feb  4 21:26:50 2006
+++ koha/modbibitem.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,156 @@
+#!/usr/bin/perl
+
+# $Id: modbibitem.pl,v 1.14.2.1 2006/02/04 21:26:47 kados Exp $
+
+#script to modify/delete groups
+
+#written 8/11/99
+# modified 11/11/99 by chris at katipo.co.nz
+# modified 18/4/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
+
+use strict;
+require Exporter;
+
+use C4::Search;
+use C4::Output;
+use C4::Koha;
+use CGI;
+use HTML::Template;
+use C4::Date;
+use C4::Biblio;
+use C4::Acquisition;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+
+my $input = new CGI;
+my $bibitemnum=$input->param('bibitem');
+my $data=bibitemdata($bibitemnum);
+my $biblio=$input->param('biblio');
+my $submit=$input->param('submit.x');
+if ($submit eq ''){
+  print $input->redirect("deletebiblioitem.pl?biblioitemnumber=$bibitemnum&biblionumber=$biblio");
+}
+
+my ($template, $loggedinuser, $cookie) = get_template_and_user({
+	template_name   => 'modbibitem.tmpl',
+	query           => $input,
+	type            => "intranet",
+	authnotrequired => 0,
+	flagsrequired   => {catalogue => 1},
+    });
+
+
+my %inputs;
+
+#hash is set up with input name being the key then
+#the value is a tab separated list, the first item being the input type
+#$inputs{'Author'}="text\t$data->{'author'}\t0";
+#$inputs{'Title'}="text\t$data->{'title'}\t1";
+my $dewey = $data->{'dewey'};
+$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/\.$//;
+$inputs{'Class'}="text\t$data->{'classification'}$dewey$data->{'subclass'}\t2";
+$inputs{'Item Type'}="text\t$data->{'itemtype'}\t3";
+$inputs{'URL'}="text\t$data->{'url'}\t4";
+$inputs{'Publisher'}="text\t$data->{'publishercode'}\t5";
+#$inputs{'Copyright date'}="text\t$data->{'copyrightdate'}\t6";
+$inputs{'ISBN'}="text\t$data->{'isbn'}\t7";
+$inputs{'Publication Year'}="text\t$data->{'publicationyear'}\t8";
+$inputs{'Pages'}="text\t$data->{'pages'}\t9";
+$inputs{'Illustrations'}="text\t$data->{'illustration'}\t10";
+#$inputs{'Series Title'}="text\t$data->{'seriestitle'}\t11";
+#$inputs{'Additional Author'}="text\t$additional\t12";
+#$inputs{'Subtitle'}="text\t$subtitle->[0]->{'subtitle'}\t13";
+#$inputs{'Unititle'}="text\t$data->{'unititle'}\t14";
+#$inputs{'Notes'}="textarea\t$data->{'notes'}\t15";
+#$inputs{'Serial'}="text\t$data->{'serial'}\t16";
+$inputs{'Volume'}="text\t$data->{'volumeddesc'}\t17";
+#$inputs{'Analytic author'}="text\t\t18";
+#$inputs{'Analytic title'}="text\t\t19";
+
+$inputs{'bibnum'}="hidden\t$data->{'biblionumber'}\t20";
+$inputs{'bibitemnum'}="hidden\t$data->{'biblioitemnumber'}\t21";
+
+$template->param( biblionumber => $data->{'biblionumber'},
+								title => $data->{'title'},
+								author => $data->{'author'},
+								description => $data->{'description'},
+								loggedinuser => $loggedinuser,
+								intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+								);
+
+my ($count, at bibitems)=bibitems($data->{'biblionumber'});
+
+my @bibitemloop;
+
+for (my $i=0;$i<$count;$i++){
+	my %line;
+	$line{biblioitemnumber} = $bibitems[$i]->{'biblioitemnumber'};
+	$line{description} = $bibitems[$i]->{'description'};
+	$line{isbn} = $bibitems[$i]->{'isbn'};
+	push(@bibitemloop,\%line);
+}
+$template->param(bibitemloop =>\@bibitemloop);
+
+
+#my $notesinput=$input->textfield(-name=>'Notes', -default=>$data->{'bnotes'}, -size=>20);
+$template->param(bnotes=>$data->{'bnotes'});
+
+$template->param(itemtype => $data->{'itemtype'});
+
+$template->param(url => $data->{'url'});
+$template->param(classification => $data->{'classification'},
+								dewey => $dewey,
+								subclass => $data->{'subclass'},
+								publishercode => $data->{'publishercode'},
+								place => $data->{'place'},
+								isbn => $data->{'isbn'},
+								publicationyear => $data->{'publicationyear'},
+								pages => $data->{'pages'},
+								illustration => $data->{'illustration'},
+								volumeddesc => $data->{'volumeddesc'},
+								size => $data->{'size'},
+								biblionumber => $data->{'biblionumber'},
+								biblioitemnumber => $data->{'biblioitemnumber'});
+
+my (@items)=itemissues($data->{'biblioitemnumber'});
+#print @items;
+my @itemloop;
+my $count=@items;
+for (my $i=0;$i<$count;$i++){
+	my %line;
+  	$items[$i]->{'datelastseen'} = format_date($items[$i]->{'datelastseen'});
+	$line{barcode}=$items[$i]->{'barcode'};
+	$line{itemnumber}=$items[$i]->{'itemnumber'};
+	$line{biblionumber}=$data->{'biblionumber'};
+	$line{biblioitemnumber}=$data->{'biblioitemnumber'};
+	$line{holdingbranch}=$items[$i]->{'holdingbranch'};
+	$line{datelastseen}=$items[$i]->{'datelastseen'};
+	push(@itemloop,\%line);
+}
+$template->param(itemloop => \@itemloop);
+print "Content-Type: text/html\n\n", $template->output;
+
Index: koha/moditem.pl
diff -u /dev/null koha/moditem.pl:1.8.2.1
--- /dev/null	Sat Feb  4 21:26:50 2006
+++ koha/moditem.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,137 @@
+#!/usr/bin/perl
+
+# $Id: moditem.pl,v 1.8.2.1 2006/02/04 21:26:47 kados Exp $
+
+
+#script to modify/delete biblios
+#written 8/11/99
+# modified 11/11/99 by chris at katipo.co.nz
+# modified 12/16/02 by hdl at ifrance.com : Templating
+
+# 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 CGI;
+use C4::Output;
+#use C4::Acquisitions;
+use C4::Biblio;
+use HTML::Template;
+use C4::Koha;
+use C4::Acquisition;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+
+my $input = new CGI;
+my $submit=$input->param('delete.x');
+my $itemnum=$input->param('item');
+my $bibitemnum=$input->param('bibitem');
+if ($submit ne ''){
+  print $input->redirect("/cgi-bin/koha/delitem.pl?itemnum=$itemnum&bibitemnum=$bibitemnum");
+}
+
+my $data=bibitemdata($bibitemnum);
+
+my $item=itemnodata('blah','',$itemnum);
+#my ($analytictitle)=analytic($biblionumber,'t');
+#my ($analyticauthor)=analytic($biblionumber,'a');
+
+
+my ($template, $loggedinuser, $cookie) = get_template_and_user({
+	template_name   => 'moditem.tmpl',
+	query           => $input,
+	type            => "intranet",
+	authnotrequired => 0,
+	flagsrequired   => {catalogue => 1},
+    });
+
+my %inputs;
+
+
+
+#hash is set up with input name being the key then
+#the value is a tab separated list, the first item being the input type
+#$inputs{'Author'}="text\t$data->{'author'}\t0";
+#$inputs{'Title'}="text\t$data->{'title'}\t1";
+# FIXME - The Dewey code is a string, not a number. And "000" is a
+# perfectly acceptable value.
+my $dewey = $data->{'dewey'};
+$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/\.$//;
+
+# 12/16/2002 hdl at ifrance.com : all these inputs seem unused !!!
+
+$inputs{'Barcode'}="text\t$item->{'barcode'}\t0";
+$inputs{'Class'}="hidden\t$data->{'classification'}$dewey$data->{'subclass'}\t2";
+#$inputs{'Item Type'}="text\t$data->{'itemtype'}\t3";
+#$inputs{'Subject'}="textarea\t$sub\t4";
+$inputs{'Publisher'}="hidden\t$data->{'publishercode'}\t5";
+#$inputs{'Copyright date'}="text\t$data->{'copyrightdate'}\t6";
+$inputs{'ISBN'}="hidden\t$data->{'isbn'}\t7";
+$inputs{'Publication Year'}="hidden\t$data->{'publicationyear'}\t8";
+$inputs{'Pages'}="hidden\t$data->{'pages'}\t9";
+$inputs{'Illustrations'}="hidden\t$data->{'illustration'}\t10";
+#$inputs{'Series Title'}="text\t$data->{'seriestitle'}\t11";
+#$inputs{'Additional Author'}="text\t$additional\t12";
+#$inputs{'Subtitle'}="text\t$subtitle->[0]->{'subtitle'}\t13";
+#$inputs{'Unititle'}="text\t$data->{'unititle'}\t14";
+$inputs{'ItemNotes'}="textarea\t$item->{'itemnotes'}\t15";
+#$inputs{'Serial'}="text\t$data->{'serial'}\t16";
+$inputs{'Volume'}="hidden\t$data->{'volumeddesc'}\t17";
+$inputs{'Home Branch'}="text\t$item->{'homebranch'}\t18";
+$inputs{'Lost'}="radio\t$item->{'itemlost'}\t19";
+#$inputs{'Analytic author'}="text\t\t18";
+#$inputs{'Analytic title'}="text\t\t19";
+$inputs{'bibnum'}="hidden\t$data->{'biblionumber'}\t20";
+$inputs{'bibitemnum'}="hidden\t$data->{'biblioitemnumber'}\t21";
+$inputs{'itemnumber'}="hidden\t$itemnum\t22";
+
+#12/16/2002 hdl at ifrance.com : end of comment
+
+
+
+#12/16/2002 hdl at ifrance.com : templating
+$template->param(	title => $data->{'title'},
+								author => $data->{'author'},
+								barcode => $item->{'barcode'},
+								classification => "$data->{'classification'}$dewey$data->{'subclass'}",
+								publisher => $data->{'publisher'},
+								publicationyear => $data->{'publicationyear'},
+								pages => $data->{'pages'},
+								illustration => $data->{'illustration'},
+								itemnotes => $item->{'itemnotes'},
+								volumedesc => $data->{'volumedesc'},
+								homebranch => $data->{'homebranch'},
+								itemlost => ($item->{'itemlost'} ==1),
+								itemwithdrawn => ($item->{'wthdrawn'} ==1),
+								biblionumber => $data->{'biblionumber'},
+								biblioitemnumber => $data->{'biblioitemnumber'},
+								itemnumber => $itemnum,
+								intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+
+print "Content-Type: text/html\n\n", $template->output;
+#12/16/2002 hdl at ifrance.com : templating
Index: koha/modwebsites.pl
diff -u /dev/null koha/modwebsites.pl:1.4.4.1
--- /dev/null	Sat Feb  4 21:26:50 2006
+++ koha/modwebsites.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,67 @@
+#!/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
+
+# modified by hdl at ifrance.com 12/16/2002, templating
+
+use strict;
+
+use C4::Search;
+use CGI;
+use C4::Output;
+use HTML::Template;
+use C4::Auth;
+
+my $input = new CGI;
+my $biblionumber       = $input->param('biblionumber');
+my ($count, @websites) = &getwebsites($biblionumber);
+
+if ($biblionumber eq '') {
+  print $input->redirect("/catalogue/");
+} # if
+
+#print $input->header;
+#print startpage();
+#print startmenu();
+my ($template, $loggedinuser, $cookie) = get_template_and_user({
+                            template_name   => "modwebsites.tmpl",
+                              query           => $input,
+                              type            => "intranet",
+                              flagsrequired   => {catalogue => 1},
+                      });
+
+
+
+my @websitesloop;
+for (my $i = 0; $i < $count; $i++) {
+	my %website;
+	$website{'biblionumber'}=$biblionumber;
+	$website{'websitenumber'}=$websites[$i]->{'websitenumber'};
+	$website{'title'}=$websites[$i]->{'title'};
+	$website{'description'}=$websites[$i]->{'description'};
+	$website{'url'}=$websites[$i]->{'url'};
+	push (@websitesloop, \%website);
+} # for
+
+$template->param(	biblionumber => $biblionumber,
+			websitesloop => \@websitesloop,
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+
+print "Content-Type: text/html\n\n", $template->output;
Index: koha/moredetail.pl
diff -u koha/moredetail.pl:1.25.2.1 koha/moredetail.pl:1.25.2.2
--- koha/moredetail.pl:1.25.2.1	Thu Mar 17 21:15:27 2005
+++ koha/moredetail.pl	Sat Feb  4 21:26:47 2006
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # NOTE: Use standard 8-space tabs for this file (indents are 4 spaces)
 
-# $Id: moredetail.pl,v 1.25.2.1 2005/03/17 21:15:27 oleonard Exp $
+# $Id: moredetail.pl,v 1.25.2.2 2006/02/04 21:26:47 kados Exp $
 
 # Copyright 2000-2003 Katipo Communications
 #
@@ -96,9 +96,11 @@
     }
 }
 
-$template->param(BIBITEM_DATA => \@results);
-$template->param(ITEM_DATA => \@items);
-$template->param(loggedinuser => $loggedinuser);
+$template->param(BIBITEM_DATA => \@results,
+		ITEM_DATA => \@items,
+		loggedinuser => $loggedinuser,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 
 output_html_with_http_headers $query, $cookie, $template->output;
 
Index: koha/overdue.pl
diff -u koha/overdue.pl:1.9.2.5 koha/overdue.pl:1.9.2.6
--- koha/overdue.pl:1.9.2.5	Fri Feb  3 16:05:27 2006
+++ koha/overdue.pl	Sat Feb  4 21:26:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: overdue.pl,v 1.9.2.5 2006/02/03 16:05:27 hdl Exp $
+# $Id: overdue.pl,v 1.9.2.6 2006/02/04 21:26:47 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -164,7 +164,9 @@
 }
 
 $sth->finish;
-$template->param(		todaysdate        => $todaysdate,
-		overdueloop       => \@overduedata );
+$template->param(todaysdate        => $todaysdate,
+		overdueloop       => \@overduedata,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 
 print "Content-Type: text/html\n\n", $template->output;
Index: koha/pay.pl
diff -u koha/pay.pl:1.9.2.2 koha/pay.pl:1.9.2.3
--- koha/pay.pl:1.9.2.2	Mon Jun  6 14:15:08 2005
+++ koha/pay.pl	Sat Feb  4 21:26:47 2006
@@ -2,7 +2,7 @@
 # WARNING: Not enough context to figure out the correct tabstop size
 # WARNING: Assume that this file uses 4-character tabs
 
-# $Id: pay.pl,v 1.9.2.2 2005/06/06 14:15:08 tipaul Exp $
+# $Id: pay.pl,v 1.9.2.3 2006/02/04 21:26:47 kados Exp $
 
 #written 11/1/2000 by chris at katipo.oc.nz
 #part of the koha library system, script to facilitate paying off fines
@@ -115,7 +115,9 @@
 							surname => $data->{'surname'},
 							bornum => $bornum,
 							loop_pay => \@loop_pay,
-							total => sprintf("%.2f",$total));
+							total => sprintf("%.2f",$total),
+							intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+							);
 	print "Content-Type: text/html\n\n", $template->output;
 
 } else {
Index: koha/readingrec.pl
diff -u koha/readingrec.pl:1.12.2.2 koha/readingrec.pl:1.12.2.3
--- koha/readingrec.pl:1.12.2.2	Mon Oct 10 09:04:52 2005
+++ koha/readingrec.pl	Sat Feb  4 21:26:47 2006
@@ -92,7 +92,9 @@
 						firstname => $data->{'firstname'},
 						cardnumber => $data->{'cardnumber'},
 						showfulllink => ($count > 50),					
-						loop_reading => \@loop_reading);
+						loop_reading => \@loop_reading,
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+						);
 output_html_with_http_headers $input, $cookie, $template->output;
 
 
Index: koha/reports-home.pl
diff -u /dev/null koha/reports-home.pl:1.6.2.1
--- /dev/null	Sat Feb  4 21:26:50 2006
+++ koha/reports-home.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,21 @@
+#!/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 ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "reports/reports-home.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+				});
+output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/reports/acquisitions_stats.pl
diff -u koha/reports/acquisitions_stats.pl:1.4.2.4 koha/reports/acquisitions_stats.pl:1.4.2.5
--- koha/reports/acquisitions_stats.pl:1.4.2.4	Fri Dec 16 15:58:25 2005
+++ koha/reports/acquisitions_stats.pl	Sat Feb  4 21:26:48 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: acquisitions_stats.pl,v 1.4.2.4 2005/12/16 15:58:25 hdl Exp $
+# $Id: acquisitions_stats.pl,v 1.4.2.5 2006/02/04 21:26:48 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -63,7 +63,9 @@
 				flagsrequired => {editcatalogue => 1},
 				debug => 1,
 				});
-$template->param(do_it => $do_it);
+$template->param(do_it => $do_it,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 if ($do_it) {
 	my $results = calculate($line, $column, $podsp, $rodsp, $calc, \@filters);
 	if ($output eq "screen"){
@@ -516,4 +518,4 @@
 	return \@mainloop;
 }
 
-1;
\ No newline at end of file
+1;
Index: koha/reports/bor_issues_top.pl
diff -u koha/reports/bor_issues_top.pl:1.3.2.3 koha/reports/bor_issues_top.pl:1.3.2.4
--- koha/reports/bor_issues_top.pl:1.3.2.3	Fri Dec 16 15:58:25 2005
+++ koha/reports/bor_issues_top.pl	Sat Feb  4 21:26:48 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: bor_issues_top.pl,v 1.3.2.3 2005/12/16 15:58:25 hdl Exp $
+# $Id: bor_issues_top.pl,v 1.3.2.4 2006/02/04 21:26:48 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -61,7 +61,9 @@
 				flagsrequired => {editcatalogue => 1},
 				debug => 1,
 				});
-$template->param(do_it => $do_it);
+$template->param(do_it => $do_it,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 if ($do_it) {
 # Displaying results
 	my $results = calculate($limit, $column, \@filters);
@@ -409,4 +411,4 @@
 	return \@mainloop;
 }
 
-1;
\ No newline at end of file
+1;
Index: koha/reports/borrowers_out.pl
diff -u koha/reports/borrowers_out.pl:1.1.2.4 koha/reports/borrowers_out.pl:1.1.2.5
--- koha/reports/borrowers_out.pl:1.1.2.4	Mon Dec 19 10:27:48 2005
+++ koha/reports/borrowers_out.pl	Sat Feb  4 21:26:48 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: borrowers_out.pl,v 1.1.2.4 2005/12/19 10:27:48 hdl Exp $
+# $Id: borrowers_out.pl,v 1.1.2.5 2006/02/04 21:26:48 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -61,7 +61,9 @@
 				flagsrequired => {editcatalogue => 1},
 				debug => 1,
 				});
-$template->param(do_it => $do_it);
+$template->param(do_it => $do_it,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 if ($do_it) {
 # Displaying results
 	my $results = calculate($limit, $column, \@filters);
@@ -332,4 +334,4 @@
 	return \@mainloop;
 }
 
-1;
\ No newline at end of file
+1;
Index: koha/reports/borrowers_stats.pl
diff -u koha/reports/borrowers_stats.pl:1.7.2.3 koha/reports/borrowers_stats.pl:1.7.2.4
--- koha/reports/borrowers_stats.pl:1.7.2.3	Tue Sep 27 16:19:37 2005
+++ koha/reports/borrowers_stats.pl	Sat Feb  4 21:26:48 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: borrowers_stats.pl,v 1.7.2.3 2005/09/27 16:19:37 hdl Exp $
+# $Id: borrowers_stats.pl,v 1.7.2.4 2006/02/04 21:26:48 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -63,7 +63,9 @@
 				flagsrequired => {editcatalogue => 1},
 				debug => 1,
 				});
-$template->param(do_it => $do_it);
+$template->param(do_it => $do_it,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 if ($do_it) {
 	my $results = calculate($line, $column, $digits, $borstat, \@filters);
 	if ($output eq "screen"){
@@ -408,4 +410,4 @@
 	return \@mainloop;
 }
 
-1;
\ No newline at end of file
+1;
Index: koha/reports/cat_issues_top.pl
diff -u koha/reports/cat_issues_top.pl:1.5.2.3 koha/reports/cat_issues_top.pl:1.5.2.4
--- koha/reports/cat_issues_top.pl:1.5.2.3	Mon Dec 19 09:23:39 2005
+++ koha/reports/cat_issues_top.pl	Sat Feb  4 21:26:48 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: cat_issues_top.pl,v 1.5.2.3 2005/12/19 09:23:39 hdl Exp $
+# $Id: cat_issues_top.pl,v 1.5.2.4 2006/02/04 21:26:48 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -61,7 +61,9 @@
 				flagsrequired => {editcatalogue => 1},
 				debug => 1,
 				});
-$template->param(do_it => $do_it);
+$template->param(do_it => $do_it,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 if ($do_it) {
 # Displaying results
 	my $results = calculate($limit, $column, \@filters);
@@ -420,4 +422,4 @@
 	return \@mainloop;
 }
 
-1;
\ No newline at end of file
+1;
Index: koha/reports/catalogue_out.pl
diff -u koha/reports/catalogue_out.pl:1.1.2.2 koha/reports/catalogue_out.pl:1.1.2.3
--- koha/reports/catalogue_out.pl:1.1.2.2	Mon Dec 19 13:33:04 2005
+++ koha/reports/catalogue_out.pl	Sat Feb  4 21:26:48 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: catalogue_out.pl,v 1.1.2.2 2005/12/19 13:33:04 hdl Exp $
+# $Id: catalogue_out.pl,v 1.1.2.3 2006/02/04 21:26:48 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -61,7 +61,9 @@
 				flagsrequired => {editcatalogue => 1},
 				debug => 1,
 				});
-$template->param(do_it => $do_it);
+$template->param(do_it => $do_it,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 if ($do_it) {
 # Displaying results
 	my $results = calculate($limit, $column, \@filters);
@@ -346,4 +348,4 @@
 	return \@mainloop;
 }
 
-1;
\ No newline at end of file
+1;
Index: koha/reports/inventory.pl
diff -u koha/reports/inventory.pl:1.1.4.1 koha/reports/inventory.pl:1.1.4.2
--- koha/reports/inventory.pl:1.1.4.1	Tue Jan 31 11:06:42 2006
+++ koha/reports/inventory.pl	Sat Feb  4 21:26:48 2006
@@ -63,6 +63,7 @@
 				offset => $offset,
 				pagesize => $pagesize,
 				datelastseen => $datelastseen,
+				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 				);
 if ($uploadbarcodes && length($uploadbarcodes)>0){
 	my $dbh=C4::Context->dbh;
Index: koha/reports/issues_avg_stats.pl
diff -u koha/reports/issues_avg_stats.pl:1.2.2.1 koha/reports/issues_avg_stats.pl:1.2.2.2
--- koha/reports/issues_avg_stats.pl:1.2.2.1	Thu Apr  7 12:06:05 2005
+++ koha/reports/issues_avg_stats.pl	Sat Feb  4 21:26:48 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: issues_avg_stats.pl,v 1.2.2.1 2005/04/07 12:06:05 tipaul Exp $
+# $Id: issues_avg_stats.pl,v 1.2.2.2 2006/02/04 21:26:48 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -64,7 +64,9 @@
 				flagsrequired => {editcatalogue => 1},
 				debug => 1,
 				});
-$template->param(do_it => $do_it);
+$template->param(do_it => $do_it,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 if ($do_it) {
 # Displaying results
 	my $results = calculate($line, $column, $rodsp, $podsp, $calc, \@filters);
@@ -589,4 +591,4 @@
 	return \@mainloop;
 }
 
-1;
\ No newline at end of file
+1;
Index: koha/reports/issues_stats.pl
diff -u koha/reports/issues_stats.pl:1.7.2.7 koha/reports/issues_stats.pl:1.7.2.8
--- koha/reports/issues_stats.pl:1.7.2.7	Thu Dec  1 14:01:17 2005
+++ koha/reports/issues_stats.pl	Sat Feb  4 21:26:48 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: issues_stats.pl,v 1.7.2.7 2005/12/01 14:01:17 tipaul Exp $
+# $Id: issues_stats.pl,v 1.7.2.8 2006/02/04 21:26:48 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -68,7 +68,9 @@
 				flagsrequired => {editcatalogue => 1},
 				debug => 1,
 				});
-$template->param(do_it => $do_it);
+$template->param(do_it => $do_it,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 if ($do_it) {
 # Displaying results
 	my $results = calculate($line, $column, $podsp, $type, $daysel, $monthsel, $calc, \@filters);
@@ -535,4 +537,4 @@
 	return \@mainloop;
 }
 
-1;
\ No newline at end of file
+1;
Index: koha/reports/manager.pl
diff -u koha/reports/manager.pl:1.1.2.1 koha/reports/manager.pl:1.1.2.2
--- koha/reports/manager.pl:1.1.2.1	Thu Feb  3 16:26:21 2005
+++ koha/reports/manager.pl	Sat Feb  4 21:26:48 2006
@@ -40,7 +40,9 @@
 				debug => 1,
 				});
 $template->param(do_it => $do_it,
-		report_name => $report_name);
+		report_name => $report_name,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 my $cgidir = C4::Context->config('intranetdir')."/cgi-bin/reports/";
 unless (opendir(DIR, "$cgidir")) {
 	$cgidir = C4::Context->intranetdir."/reports/";
Index: koha/reports/manager2.pl
diff -u koha/reports/manager2.pl:1.1.2.1 koha/reports/manager2.pl:1.1.2.2
--- koha/reports/manager2.pl:1.1.2.1	Fri Mar 18 10:00:54 2005
+++ koha/reports/manager2.pl	Sat Feb  4 21:26:48 2006
@@ -42,7 +42,9 @@
 				debug => 1,
 				});
 $template->param(do_it => $do_it,
-		report_name => $report_name);
+		report_name => $report_name,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 my $plugin = "./".$report_name.".plugin";
 require $plugin;
 if ($do_it) {
Index: koha/reports/reports-home.pl
diff -u koha/reports/reports-home.pl:1.1.2.1 koha/reports/reports-home.pl:1.1.2.2
--- koha/reports/reports-home.pl:1.1.2.1	Fri Mar 18 10:00:54 2005
+++ koha/reports/reports-home.pl	Sat Feb  4 21:26:48 2006
@@ -16,5 +16,6 @@
 				authnotrequired => 0,
 				flagsrequired => {catalogue => 1},
 				debug => 1,
+				intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 				});
 output_html_with_http_headers $query, $cookie, $template->output;
Index: koha/reservereport.pl
diff -u koha/reservereport.pl:1.3.4.1 koha/reservereport.pl:1.3.4.2
--- koha/reservereport.pl:1.3.4.1	Fri Feb  3 16:19:12 2006
+++ koha/reservereport.pl	Sat Feb  4 21:26:47 2006
@@ -51,5 +51,7 @@
 }
 
 $template->param(	count => $count,
-								dataloop => \@dataloop);
+			dataloop => \@dataloop,
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+			);
 print "Content-Type: text/html\n\n", $template->output;
Index: koha/search.marc/dictionary.pl
diff -u koha/search.marc/dictionary.pl:1.6.2.4 koha/search.marc/dictionary.pl:1.6.2.5
--- koha/search.marc/dictionary.pl:1.6.2.4	Fri Dec 30 11:12:28 2005
+++ koha/search.marc/dictionary.pl	Sat Feb  4 21:26:48 2006
@@ -252,9 +252,11 @@
  
  }
 $template->param(search => $search[0],
-					marclist =>$field,
-					type=>$type,
-					anindex => $input->param('index'));
+		marclist =>$field,
+		type=>$type,
+		anindex => $input->param('index'),
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 
 # Print the page
 output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/search.marc/search.pl
diff -u koha/search.marc/search.pl:1.22.2.4 koha/search.marc/search.pl:1.22.2.5
--- koha/search.marc/search.pl:1.22.2.4	Fri Dec 30 11:12:28 2005
+++ koha/search.marc/search.pl	Sat Feb  4 21:26:48 2006
@@ -358,6 +358,8 @@
 
 
 # Print the page
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 output_html_with_http_headers $query, $cookie, $template->output;
 
 # Local Variables:
Index: koha/search.marc/suggest.pl
diff -u /dev/null koha/search.marc/suggest.pl:1.2.2.1
--- /dev/null	Sat Feb  4 21:26:50 2006
+++ koha/search.marc/suggest.pl	Sat Feb  4 21:26:48 2006
@@ -0,0 +1,65 @@
+#!/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::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::SearchMarc;
+use C4::Acquisition;
+use C4::Koha; # XXX subfield_is_koha_internal_p
+
+# Creates the list of active tags using the active MARC configuration
+my $query=new CGI;
+my $Q=$query->param('Q');
+my @words = split / /,$Q;
+my $dbh = C4::Context->dbh;
+
+my $suggestions = findsuggestion($dbh,\@words);
+my @loop_suggests;
+foreach my $line (@$suggestions) {
+	my ($word,$suggestion,$count) = split /\|/,$line;
+	push @loop_suggests, { word => $word, suggestion =>$suggestion, count => $count };
+}
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "search.marc/suggest.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {editcatalogue => 1},
+			     debug => 1,
+			     });
+$template->param("loop" => \@loop_suggests,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
+
+output_html_with_http_headers $query, $cookie, $template->output;
+1;
+# Local Variables:
+# tab-width: 4
+# End:
Index: koha/stats.pl
diff -u /dev/null koha/stats.pl:1.10.4.1
--- /dev/null	Sat Feb  4 21:26:50 2006
+++ koha/stats.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,162 @@
+#!/usr/bin/perl
+
+# $Id: stats.pl,v 1.10.4.1 2006/02/04 21:26:47 kados Exp $
+
+#written 14/1/2000
+#script to display reports
+
+
+# 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::Output;
+use HTML::Template;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Context;
+use Date::Manip;
+use C4::Stats;
+
+my $input=new CGI;
+my $time=$input->param('time');
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "stats.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {borrowers => 1},
+			     debug => 1,
+			     });
+
+my $date;
+my $date2;
+if ($time eq 'yesterday'){
+	$date=ParseDate('yesterday');
+	$date2=ParseDate('today');
+}
+if ($time eq 'today'){
+	$date=ParseDate('today');
+	$date2=ParseDate('tomorrow');
+}
+if ($time eq 'daybefore'){
+	$date=ParseDate('2 days ago');
+	$date2=ParseDate('yesterday');
+}
+if ($time eq 'month') {
+	$date = ParseDate('1 month ago');
+	$date2 = ParseDate('today');
+	warn "d : $date // d2 : $date2";
+}
+if ($time=~ /\//){
+	$date=ParseDate($time);
+	$date2=ParseDateDelta('+ 1 day');
+	$date2=DateCalc($date,$date2);
+}
+$date=UnixDate($date,'%Y-%m-%d');
+$date2=UnixDate($date2,'%Y-%m-%d');
+	warn "d : $date // d2 : $date2";
+my @payments=TotalPaid($date,$date2);
+my $count=@payments;
+my $total=0;
+my $oldtime;
+my $totalw=0;
+my @loop;
+my %row;
+my $i=0;
+while ($i<$count){
+	warn " pay : ".$payments[$i]{'timestamp'};
+	my $time=$payments[$i]{'datetime'};
+	my $payments=$payments[$i]{'value'};
+	my $charge=0;
+	my @temp=split(/ /,$payments[$i]{'datetime'});
+	my $date=$temp[0];
+	my @charges=getcharges($payments[$i]{'borrowernumber'},$payments[$i]{'timestamp'});
+	my $count=@charges;
+	my $temptotalf=0;
+	my $temptotalr=0;
+	my $temptotalres=0;
+	my $temptotalren=0;
+	my $temptotalw=0;
+	for (my $i2=0;$i2<$count;$i2++){
+		$charge+=$charges[$i2]->{'amount'};
+		%row = ( name   => $charges[$i2]->{'description'},
+					type   => $charges[$i2]->{'accounttype'},
+					time   => $charges[$i2]->{'timestamp'},
+					amount => $charges[$i2]->{'amount'},
+					branch => $charges[$i2]->{'amountoutstanding'} );
+		push(@loop, \%row);
+		if ($payments[$i]{'accountytpe'} ne 'W'){
+			if ($charges[$i2]->{'accounttype'} eq 'Rent'){
+				$temptotalr+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
+			}
+			if ($charges[$i2]->{'accounttype'} eq 'F' || $charges[$i2]->{'accounttype'} eq 'FU' || $charges[$i2]->{'accounttype'} eq 'FN' ){
+				$temptotalf+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
+			}
+			if ($charges[$i2]->{'accounttype'} eq 'Res'){
+				$temptotalres+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
+			}
+			if ($charges[$i2]->{'accounttype'} eq 'R'){
+			$temptotalren+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
+			}
+		}
+	}
+	my $hour=substr($payments[$i]{'timestamp'},8,2);
+	my  $min=substr($payments[$i]{'timestamp'},10,2);
+	my $sec=substr($payments[$i]{'timestamp'},12,2);
+	my $time="$hour:$min:$sec";
+	my $time2="$payments[$i]{'date'}";
+	my $branch=Getpaidbranch($time2,$payments[$i]{'borrowernumber'});
+	my $bornum=$payments[$i]{'borrowernumber'};
+	my $oldtime=$payments[$i]{'timestamp'};
+	my $oldtype=$payments[$i]{'accounttype'};
+	while ($bornum eq $payments[$i]{'borrowernumber'} && $oldtype == $payments[$i]{'accounttype'}  && $oldtime eq $payments[$i]{'timestamp'}){
+		my $hour=substr($payments[$i]{'timestamp'},8,2);
+		my  $min=substr($payments[$i]{'timestamp'},10,2);
+		my $sec=substr($payments[$i]{'timestamp'},12,2);
+		my $time="$hour:$min:$sec";
+		my $time2="$payments[$i]{'date'}";
+		my $branch=Getpaidbranch($time2,$payments[$i]{'borrowernumber'});
+		if ($payments[$i]{'accounttype'} eq 'W'){
+			$totalw+=$payments[$i]{'amount'};
+		} else {
+			$payments[$i]{'amount'}=$payments[$i]{'amount'}*-1;
+			$total+=$payments[$i]{'amount'};
+		}
+
+		%row = ( name   => "<b>".$payments[$i]{'firstname'}.$payments[$i]{'surname'} . "</b>",
+					type   => $payments[$i]{'accounttype'}, time   => $payments[$i]{'date'},
+					amount => $payments[$i]{'amount'}, branch => $branch );
+		push(@loop, \%row);
+		$oldtype=$payments[$i]{'accounttype'};
+		$oldtime=$payments[$i]{'timestamp'};
+		$bornum=$payments[$i]{'borrowernumber'};
+		$i++;
+	}
+}
+
+$template->param( loop1   => \@loop,
+		  totalw => $totalw,
+		  total  => $total,
+		  intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		  );
+
+output_html_with_http_headers $input, $cookie, $template->output;
+
+
Index: koha/suggestion/acceptorreject.pl
diff -u /dev/null koha/suggestion/acceptorreject.pl:1.1.2.1
--- /dev/null	Sat Feb  4 21:26:50 2006
+++ koha/suggestion/acceptorreject.pl	Sat Feb  4 21:26:48 2006
@@ -0,0 +1,60 @@
+#!/usr/bin/perl
+use strict;
+require Exporter;
+use CGI;
+use HTML::Template;
+
+use C4::Auth;       # get_template_and_user
+use C4::Interface::CGI::Output;
+use C4::Suggestions;
+
+my $input = new CGI;
+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 $status = $input->param('status');
+my $suggestedbyme = $input->param('suggestedbyme');
+my $op = $input->param('op');
+$op = 'else' unless $op;
+
+my $dbh = C4::Context->dbh;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "suggestion/acceptorreject.tmpl",
+			     type => "intranet",
+			     query => $input,
+			     authnotrequired => 1,
+			     flagsrequired => {borrow => 1},
+			 });
+if ($op eq "aorr_confirm") {
+	my @suggestionlist = $input->param("aorr");
+	foreach my $suggestion (@suggestionlist) {
+		if ($suggestion =~ /(A|R)(.*)/) {
+			my ($newstatus,$suggestionid) = ($1,$2);
+			$newstatus="REJECTED" if $newstatus eq "R";
+			$newstatus="ACCEPTED" if $newstatus eq "A";
+			changestatus($suggestionid,$newstatus,$loggedinuser);
+		}
+	}
+	$op="else";
+}
+
+if ($op eq "delete_confirm") {
+	my @delete_field = $input->param("delete_field");
+	foreach my $delete_field (@delete_field) {
+		&delsuggestion($loggedinuser,$delete_field);
+	}
+	$op='else';
+}
+
+my $suggestions_loop= &searchsuggestion("","","","",'ASKED',"");
+$template->param(suggestions_loop => $suggestions_loop,
+		"op_$op" => 1,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+);
+output_html_with_http_headers $input, $cookie, $template->output;
Index: koha/updatebiblio.pl
diff -u /dev/null koha/updatebiblio.pl:1.10.2.1
--- /dev/null	Sat Feb  4 21:26:50 2006
+++ koha/updatebiblio.pl	Sat Feb  4 21:26:47 2006
@@ -0,0 +1,108 @@
+#!/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;
+require Exporter;
+use C4::Context;
+use C4::Output;  # contains gettemplate
+use C4::Search;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Biblio;
+use C4::Output;
+use HTML::Template;
+
+my $input       = new CGI;
+my $bibnum      = checkinp($input->param('biblionumber'));
+my $biblio = {
+	biblionumber => $bibnum,
+	title        => $input->param('title')?$input->param('title'):"",
+	author       => $input->param('author')?$input->param('author'):"",
+	abstract     => $input->param('abstract')?$input->param('abstract'):"",
+	copyrightdate    => $input->param('copyrightdate')?$input->param('copyrightdate'):"",
+	seriestitle  => $input->param('seriestitle')?$input->param('seriestitle'):"",
+	serial       => $input->param('serial')?$input->param('serial'):"",
+	unititle     => $input->param('unititle')?$input->param('unititle'):"",
+	notes        => $input->param('notes')?$input->param('notes'):"",
+}; # my $biblio
+my $subtitle    = checkinp($input->param('subtitle'));
+my $subject     = checkinp($input->param('subject'));
+my $addauthor   = checkinp($input->param('additionalauthor'));
+my $force       = $input->param('Force');
+my %data;
+my @sub;
+my @subs;
+my @names;
+my $count;
+my $error;
+
+&modsubtitle($bibnum, $subtitle);
+&modaddauthor($bibnum, $addauthor);
+
+$subject = uc($subject);
+ at sub     = split(/\||\n/, $subject);
+$count   = @sub;
+
+for (my $i = 0; $i < $count; $i++) {
+	$sub[$i] =~ s/ +$//;
+} # for
+
+$error = &modsubject($bibnum,$force, at sub);
+
+&modbiblio($biblio);
+
+if ($error ne ''){
+		my ($template, $loggedinuser, $cookie) = get_template_and_user({
+			template_name   => "updatebiblio.tmpl",
+			query           => $input,
+			type            => "intranet",
+			flagsrequired   => {catalogue => 1},
+		});
+
+
+	my @subs=split('\n',$error);
+	my @names=$input->param;
+	my $count=@names;
+		my @dataloop;
+	for (my $i=0;$i<$count;$i++) {
+		if ($names[$i] ne 'Force') {
+			my %line;
+		$line{'value'}=$input->param("$names[$i]");
+			$line{'name'}=$names[$i];
+			push(@dataloop, \%line);
+		} # if
+	} # for
+	$template->param(substring =>$subs[0],
+			error =>$error,
+			dataloop => \@dataloop,
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+						);
+		print "Content-Type: text/html\n\n", $template->output;
+} else {
+	print $input->redirect("detail.pl?type=intra&bib=$bibnum");
+} # else
+
+sub checkinp{
+  my ($inp)=@_;
+  $inp=~ s/\'/\\\'/g;
+  $inp=~ s/\"/\\\"/g;
+  return($inp);
+}
Index: koha/z3950/search.pl
diff -u koha/z3950/search.pl:1.3.2.2 koha/z3950/search.pl:1.3.2.3
--- koha/z3950/search.pl:1.3.2.2	Wed Feb  1 09:24:04 2006
+++ koha/z3950/search.pl	Sat Feb  4 21:26:48 2006
@@ -98,14 +98,14 @@
 }
 
 $template->param(isbn => $isbn,
-						title => $title,
-						author => $author,
-						breeding_loop => \@breeding_loop,
-						refresh => ($numberpending eq 0 ? 0 : "search.pl?bibid=$bibid&random=$random"),
-						numberpending => $numberpending,
-						oldbiblionumber => $biblionumber,
-						);
-
+		title => $title,
+		author => $author,
+		breeding_loop => \@breeding_loop,
+		refresh => ($numberpending eq 0 ? 0 : "search.pl?bibid=$bibid&random=$random"),
+		numberpending => $numberpending,
+		oldbiblionumber => $biblionumber,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		);
 print $input->header(
 -type => guesstype($template->output),
 -cookie => $cookie





More information about the Koha-cvs mailing list