Initial add of defaria.com
[clearscm.git] / defaria.com / cvsadm / select_repository.cgi
1 #!/usr/bin/perl
2 ################################################################################
3 #
4 # File:         cvsadm/select_repository.cgi
5 # Description:  Provides repository selection
6 # Author:       Andrew@DeFaria.com
7 # Created:      Thu Jul  7 16:54:07 PDT 2005
8 # Modified:
9 # Language:     Perl
10 #
11 # (c) Copyright 2005, Andrew@DeFaria.com, all rights reserved.
12 #
13 ################################################################################
14 use strict;
15 use warnings;
16
17 use CGI qw (:standard *table start_Tr end_Tr start_td end_td start_div end_div);
18 use CGI::Carp "fatalsToBrowser";
19 use CVSAdm;
20
21 my $cvs_server = param "cvs_server";
22 my $Cvs_server = ucfirst $cvs_server;
23
24 sub Body {
25   print "<center>";
26   print start_form {
27     -action     => "select_server.cgi"
28   };
29   print submit {
30     -name       => "submit",
31     -value      => "<- Select Server"
32   };
33   print end_form;
34   print "</center>";
35
36   my @repositories = CVSRepositories $cvs_server;
37
38   print start_table {
39     -align              => "center",
40     -bgcolor            => "white",
41     -border             => 0,
42     -cellspacing        => 0,
43     -cellpadding        => 2,
44     -width              => "30%"};
45   print start_Tr;
46   print start_td {
47     -valign => "middle",
48     -class  => "label"};
49   print "Repository:";
50   print end_td;
51   print start_form {
52     -action     => "login.cgi"
53   };
54   print hidden {
55     -name       => "cvs_server"
56   };
57   print start_td {
58     -valign     => "middle"
59   };
60   print popup_menu {
61     -name       => "repository",
62     -values     => \@repositories,
63     -class      => "inputfield"
64   };
65   print "&nbsp;";
66   print submit {
67     -name       => "Select"
68   };
69   print end_td;
70   print end_form;
71   print end_table;
72 } # Body
73
74 Heading (
75          "",
76          "",
77          "CVSAdm: Select Repository",
78          "CVS Administration Select $Cvs_server Repository",
79          "Please select a repository to manage"
80 );
81
82 Body;
83 Footing;
84
85 exit;