lilalo

diff l3-cgi @ 39:aa788e638a9d

l3: Добавил небольшое оформление и строчку "Инструтор" в индекс
lm-install: Убрал ошибочно закомментированный login_from для FreeBSD
author devi
date Tue Nov 22 22:45:45 2005 +0200 (2005-11-22)
parents 219389279acb
children 6452bfe549d1
line diff
     1.1 --- a/l3-cgi	Fri Nov 18 17:46:09 2005 +0200
     1.2 +++ b/l3-cgi	Tue Nov 22 22:45:45 2005 +0200
     1.3 @@ -48,6 +48,11 @@
     1.4  			my $training = load_training($training_file);
     1.5  			$Trainings{$training->{"date"}}=$training;
     1.6  		}
     1.7 +		print "<html>\n";
     1.8 +		print "<head>\n";
     1.9 +		print "<title>Журналы лабораторных работ</title>\n";
    1.10 +		print "</head>\n";
    1.11 +		print "<body>\n";
    1.12  		print "<table>\n";
    1.13  		for my $tdate (reverse sort keys %Trainings) {
    1.14  			my $t = $Trainings{$tdate};
    1.15 @@ -70,6 +75,8 @@
    1.16  			print "</tr>\n";
    1.17  		}
    1.18  		print "</table>\n";
    1.19 +		print "</body>\n";
    1.20 +		print "</html>\n";
    1.21  	}
    1.22  	else {
    1.23  		print "No training-files found<br/>\n";
    1.24 @@ -78,14 +85,41 @@
    1.25  }
    1.26  elsif ($ENV{PATH_INFO} eq "/current/index" || $ENV{PATH_INFO} eq "") {
    1.27  	my $t = load_training();
    1.28 +
    1.29 +	print "<html>\n";
    1.30 +	print "<head>\n";
    1.31 +	print "<title>Журналы лабораторных работ</title>\n";
    1.32 +	print "<link rel='stylesheet' href='".$l3config::Config{frontend_css}."' type='text/css'/>\n";
    1.33 +	print "</head>\n";
    1.34 +	print "<body>\n";
    1.35 +	print "<h1>Журналы лабораторных работ</h1>\n";
    1.36 +	print "<table>\n";
    1.37 +	print "<tr class='table_header'>\n";
    1.38 +	print "<td>"."Имя"."</td>";
    1.39 +	print "<td>Хост</td>";
    1.40 +	print "<td colspan='3'>Пользователь</td>";
    1.41 +	print "</tr>\n";
    1.42  	for my $host (sort keys %{$t->{host}}) {
    1.43 +		print "<tr>\n";
    1.44  		my $h = $t->{host}->{$host};
    1.45 -		print "$host";
    1.46 -		print " ".$h->{firstname}." ".$h->{surname}." ";
    1.47 -		print "<a href='/cgi-bin/l3/current/".$host."/root'>root</a> ";
    1.48 -		print "<a href='/cgi-bin/l3/current/".$host."/".$h->{user}."'>".$h->{user}."</a> ";
    1.49 -		print "<br/>\n";
    1.50 +		print "<td>".$h->{firstname}." ".$h->{surname}."</td>";
    1.51 +		print "<td>$host</td>";
    1.52 +		print "<td><a href='/cgi-bin/l3/current/".$host."/root'>root</a></td>";
    1.53 +		print "<td><a href='/cgi-bin/l3/current/".$host."/".$h->{user}."'>".$h->{user}."</a></td>";
    1.54 +		print "<td><a href='/cgi-bin/l3/current/".$host."'>все</a></td>";
    1.55 +		print "</td>\n";
    1.56 +		print "</tr>\n";
    1.57  	}
    1.58 +	print "<tr>\n";
    1.59 +	print "<td>"."Инструктор"."</td>";
    1.60 +	print "<td>from linux.nt</td>";
    1.61 +	print "<td/>";
    1.62 +	print "<td/>";
    1.63 +	print "<td><a href='/cgi-bin/l3/current"."?login_from=192.168.15.254'>все</a></td>";
    1.64 +	print "</tr>\n";
    1.65 +	print "</table>\n";
    1.66 +	print "</body>\n";
    1.67 +	print "</html>\n";
    1.68  }
    1.69  elsif ($ENV{PATH_INFO} eq "/current") {
    1.70  	open (FRONTEND, "./l3-frontend --output - --show_comments no |");