mirror of
https://github.com/webmin/webmin.git
synced 2026-02-09 00:39:57 +00:00
74 lines
1.9 KiB
Perl
74 lines
1.9 KiB
Perl
#!/usr/local/bin/perl
|
|
# index.cgi
|
|
# Display a table of icons for cvs server options
|
|
|
|
require './pserver-lib.pl';
|
|
&ReadParse();
|
|
|
|
if (!$cvs_path) {
|
|
&header($text{'index_title'}, "", undef, 1, 1);
|
|
print "<hr>\n";
|
|
print "<p>",&text('index_ecvs', "<tt>$config{'cvs'}</tt>",
|
|
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
|
print "<hr>\n";
|
|
&footer("/", $text{'index'});
|
|
exit;
|
|
}
|
|
|
|
$out = `$config{'cvs'} -v`;
|
|
if ($out !~ /CVS[^0-9\.]*([0-9\.]+)/) {
|
|
&header($text{'index_title'}, "", undef, 1, 1);
|
|
print "<hr>\n";
|
|
print "<p>",&text('index_eversion', "<tt>$config{'cvs'} -v</tt>",
|
|
"<tt>$out</tt>"),"<p>\n";
|
|
print "<hr>\n";
|
|
&footer("/", $text{'index'});
|
|
exit;
|
|
}
|
|
$ver = $1;
|
|
|
|
&header($text{'index_title'}, "", undef, 1, 1, undef,
|
|
&help_search_link("cvs", "man", "doc"), undef, undef,
|
|
&text('index_version', $ver));
|
|
print "<hr>\n";
|
|
|
|
if (!-d "$config{'cvsroot'}/CVSROOT") {
|
|
print "<p>",&text('index_eroot',
|
|
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
|
print "<hr>\n";
|
|
&footer("/", $text{'index'});
|
|
exit;
|
|
}
|
|
|
|
# Show configuration icons
|
|
|
|
# Check if run from inetd or xinetd
|
|
print "<hr>\n";
|
|
print "<table width=100%><tr>\n";
|
|
$inet = &check_inetd();
|
|
if (!$inet) {
|
|
print "<form action=setup.cgi>\n";
|
|
print "<td><input type=submit value='$text{'index_setup'}'></td>\n";
|
|
print "<td>$text{'index_setupdesc'}</td>\n";
|
|
print "</form>\n";
|
|
}
|
|
elsif (!$inet->{'active'}) {
|
|
print "<form action=setup.cgi>\n";
|
|
print "<td><input type=submit value='$text{'index_act'}'></td>\n";
|
|
print "<td>",&text('index_actdesc',
|
|
"<tt>$inet->{'type'}</tt>"),"</td>\n";
|
|
print "</form>\n";
|
|
}
|
|
else {
|
|
print "<form action=setup.cgi>\n";
|
|
print "<td><input type=submit value='$text{'index_deact'}'></td>\n";
|
|
print "<td>",&text('index_deactdesc',
|
|
"<tt>$inet->{'type'}</tt>"),"</td>\n";
|
|
print "</form>\n";
|
|
}
|
|
print "</tr></table>\n";
|
|
|
|
print "<hr>\n";
|
|
&footer("/", $text{'index'});
|
|
|