Handle hostnames with upper-case letters
[webmin.git] / bacula-backup / treechooser.cgi
1 #!/usr/local/bin/perl
2 # treechooser.cgi
3 # Outputs HTML for a java file-chooser tree
4
5 require './bacula-backup-lib.pl';
6 &PrintHeader();
7 &ReadParse();
8
9 $shortest = "/";
10 if ($main::session_id) {
11         $session = "<param name=session value=\"sid=$main::session_id\">";
12         }
13
14 $in{'job'} =~ s/^(.*)_(\d+)$/$2/g;
15 print <<EOF;
16 <html><head><title>$text{'tree_title'}</title><body>
17
18 <script>
19 function clear_files()
20 {
21 top.ifield.value = "";
22 }
23
24 function add_file(file)
25 {
26 top.ifield.value = top.ifield.value + file + "\\n";
27 }
28
29 function finished()
30 {
31 window.close();
32 }
33 </script>
34
35 <applet code=TreeChooser name=TreeChooser width=100% height=100% MAYSCRIPT>
36 <param name=volume value="$in{'volume'}">
37 <param name=root value="$shortest">
38 <param name=job value="$in{'job'}">
39 $session
40 </applet>
41 </body></html>
42 EOF
43