lilalo

diff l3-cgi @ 33:e22df843b512

Поддержка /l3/current/index
author devi
date Mon Nov 14 09:16:28 2005 +0200 (2005-11-14)
parents 4d252e7dd478
children 219389279acb
line diff
     1.1 --- a/l3-cgi	Mon Nov 14 07:42:57 2005 +0200
     1.2 +++ b/l3-cgi	Mon Nov 14 09:16:28 2005 +0200
     1.3 @@ -79,6 +79,17 @@
     1.4  		print "Template to load files: ".$l3config::Config{"path_classes"}."*".$l3config::Config{"class_suffix"}."\n"
     1.5  	}
     1.6  }
     1.7 +elsif ($ENV{PATH_INFO} eq "/current/index" || $ENV{PATH_INFO} eq "") {
     1.8 +	my $t = load_training();
     1.9 +	for my $host (sort keys %{$t->{host}}) {
    1.10 +		my $h = $t->{host}->{$host};
    1.11 +		print "$host";
    1.12 +		print " ".$h->{firstname}." ".$h->{surname}." ";
    1.13 +		print "<a href='/cgi-bin/l3/current/".$host."/root'>root</a> ";
    1.14 +		print "<a href='/cgi-bin/l3/current/".$host."/".$h->{user}."'>".$h->{user}."</a> ";
    1.15 +		print "<br/>\n";
    1.16 +	}
    1.17 +}
    1.18  elsif ($ENV{PATH_INFO} eq "/current") {
    1.19  	open (FRONTEND, "./l3-frontend --output - --show_comments no |");
    1.20  	while (<FRONTEND>) {