Added copyright statement to all .pl and .pm files
[koha.git] / acqui.simple / addbooks.pl
1 #!/usr/bin/perl
2
3 #
4 # Modified saas@users.sf.net 12:00 01 April 2001
5 # The biblioitemnumber was not correctly initialised
6 # The max(barcode) value was broken - koha 'barcode' is a string value!
7 # - If left blank, barcode value now defaults to max(biblionumber) 
8
9 #
10 # TODO
11 #
12 # Add info on biblioitems and items already entered as you enter new ones
13 #
14 # Add info on biblioitems and items already entered as you enter new ones
15
16
17 # Copyright 2000-2002 Katipo Communications
18 #
19 # This file is part of Koha.
20 #
21 # Koha is free software; you can redistribute it and/or modify it under the
22 # terms of the GNU General Public License as published by the Free Software
23 # Foundation; either version 2 of the License, or (at your option) any later
24 # version.
25 #
26 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
27 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
28 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
29 #
30 # You should have received a copy of the GNU General Public License along with
31 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
32 # Suite 330, Boston, MA  02111-1307 USA
33
34 use C4::Database;
35 use CGI;
36 use strict;
37 use C4::Catalogue;
38 use C4::Biblio;
39 use C4::Output;
40 use C4::Circulation::Circ2;
41
42 my $input = new CGI;
43 my $error   = $input->param('error');
44 my $success = $input->param('biblioitem');
45
46 print $input->header;
47 print startpage();
48 print startmenu('acquisitions');
49
50 &searchscreen();
51 print endmenu('acquisitions');
52 print endpage();
53
54
55 sub searchscreen {
56     print << "EOF";
57 <font size="6"><em>Adding new items to the Library Inventory</em></font>
58 <p />
59 EOF
60
61     if ($error eq "notfound") {
62         print << "EOF";
63 <font color="red" size="5">No items found</font>
64 <p />
65 EOF
66     } elsif ($success eq "added") {
67         print << "EOF";
68 <font color="red" size="5">Website Biblioitem Added</font>
69 <p />
70 EOF
71     } # elsif
72
73     print << "EOF";
74 <table bgcolor="#ffcc00" width="80%" cellpadding="5">
75 <tr valign="center">
76 <td><font size="5">To add a new item, scan or type the ISBN number:</font></td>
77 </tr>
78 </table>
79
80 <table>
81 <tr>
82 <form action="keywordsearch.pl">
83 <td>Keyword:</td>
84 <td><input type="text" name="keyword" /></td>
85 <td><input type="submit" value="Go" /></td>
86 </form>
87 </tr>
88 <tr>
89 <form action="isbnsearch.pl">
90 <td>ISBN:</td>
91 <td><input type="text" name="isbn" /></td>
92 <td><input type="submit" value="Go" /></td>
93 </form>
94 </tr>
95 </table>
96 <p />
97 <hr />
98 <p />
99 <table bgcolor="#ffcc00" width="80%" cellpadding"5">
100 <tr valign="center">
101 <td><font size="5">Tools for importing MARC records into Koha</font></td>
102 </tr>
103 </table>
104 <br />
105 <ul>
106 <li><a href=marcimport.pl?menu=z3950>Z39.50 Search Tool</a></li>
107 <li><a href=marcimport.pl?menu=uploadmarc>Upload MARC records</a></li>
108 </ul>
109 <br clear="all">
110 <p />
111 <table bgcolor="#ffcc00" width="80%" cellpadding="5">
112 <tr valign="center">
113 <td><FONT SIZE=5>Add New Website</font></td>
114 </tr>
115 </table>
116 <form action="websitesearch.pl" method="post">
117 <table>
118 <tr>
119 <td>Keyword:</td>
120 <td><input type="text" name="keyword" /></td>
121 <td><input type="submit" value="Go" /></td>
122 </tr>
123 </table>
124 </FORM>
125 <p />
126 <table bgcolor="#ffcc00" width="80%" cellpadding="5">
127 <tr valign="center">
128 <td><FONT SIZE=5>Help</font></td>
129 </tr>
130 </table> 
131 <FONT SIZE=5>Koha stores data in three sections</font>
132 <p />
133 <h2>Biblio</h2>
134 The first section records bibliographic data such as title, author and copyright for a particular work.
135 <p />
136 <h2>Group</h2>      
137 The second records bibliographic data for a particular publication of that work, such as ISBN number, physical description, publisher information, etc      
138 <p />
139 <h2>Item</h2>
140 The third section holds specific item information, such as the bar code number
141 <p />
142 EOF
143 } # sub searchscreen