Checked diff in branchtransfers. datesent and datearrived are given datetime, not...
[koha.git] / modwebsites.pl
1 #!/usr/bin/perl
2
3 use strict;
4
5 use C4::Search;
6 use CGI;
7 use C4::Output;
8
9 my $input = new CGI;
10 my $biblionumber       = $input->param('biblionumber');
11 my ($count, @websites) = &getwebsites($biblionumber);
12
13 if ($biblionumber eq '') {
14   print $input->redirect("/catalogue/");
15 } # if
16
17 print $input->header;
18 print startpage();
19 print startmenu();
20
21 print << "EOF";
22 <p />
23 <a href="detail.pl?type=intra&bib=$biblionumber">Return to Details Page</a>
24 EOF
25
26 for (my $i = 0; $i < $count; $i++) {
27     print << "EOF"
28 <p />
29 <form action="updatewebsite.pl" method="post">
30 <input type="hidden" name="biblionumber" value="$biblionumber">
31 <input type="hidden" name="websitenumber" value="$websites[$i]->{'websitenumber'}">
32 <table>
33 <tr valign="top">
34 <td>Title</td>
35 <td><input type="text" name="title" value="$websites[$i]->{'title'}"></td>
36 </tr>
37 <tr valign="top">
38 <td>Description</td>
39 <td><textarea name="description" cols="40" rows="4">$websites[$i]->{'description'}</textarea></td>
40 </tr>
41 <tr valign="top">
42 <td>URL</td>
43 <td><input type="text" name="url" value="$websites[$i]->{'url'}"></td>
44 </tr>
45 </table>
46 <input type="submit" value="Update this Website Link">   <input type="submit" name="delete" value="Delete this Website link">
47 </form>
48 EOF
49 } # for
50
51 print << "EOF";
52 <p />
53 <h2><b>Add another Website Link</b></h2>
54 <form action="addwebsite.pl" method="post">
55 <input type="hidden" name="biblionumber" value="$biblionumber">
56 <table>
57 <tr valign="top">
58 <td>Title</td>
59 <td><input type="text" name="title"></td>
60 </tr>
61 <tr valign="top">
62 <td>Description</td>
63 <td><textarea name="description" cols="40" rows="4"></textarea></td>
64 </tr>
65 <tr valign="top">
66 <td>URL</td>
67 <td><input type="text" name="url"></td>
68 </tr>
69 </table>
70 <input type="submit" value="Add this Website Link">
71 </form>
72 EOF
73
74 print endmenu();
75 print endpage();