lilalo
annotate l3-cgi @ 29:b3f5f5560802
l3-cgi: Найти курс по PATH_INFO
HISTORY: Описаны изменения в версии v_0_2_4
l3-frontend: В секции "О программе" убрал разрыв строки
HISTORY: Описаны изменения в версии v_0_2_4
l3-frontend: В секции "О программе" убрал разрыв строки
author | devi |
---|---|
date | Mon Nov 07 13:28:15 2005 +0200 (2005-11-07) |
parents | 098664cf339c |
children | f5f07049bd4f |
rev | line source |
---|---|
devi@27 | 1 #!/usr/bin/perl |
devi@27 | 2 |
devi@27 | 3 use strict; |
devi@27 | 4 use CGI qw(:standard); |
devi@27 | 5 |
devi@27 | 6 my $value = param('PARAM'); |
devi@27 | 7 |
devi@27 | 8 print header( |
devi@27 | 9 -charset => "utf-8", |
devi@27 | 10 ); |
devi@27 | 11 chdir("/home/devi/cvs/lilalo"); |
devi@29 | 12 |
devi@29 | 13 # Вызов производится по URL |
devi@29 | 14 my ($skip, $course, $host, $user) = split /\//,$ENV{PATH_INFO},4; |
devi@29 | 15 |
devi@29 | 16 my @args=( |
devi@29 | 17 "--output" => "-", |
devi@29 | 18 "--show_comments" => "no", |
devi@29 | 19 "--course-center" => "\"Сетевые Технологии\"", |
devi@29 | 20 "--course-trainer" => "\"Игорь Чубин\"", |
devi@29 | 21 "--course-student" => "\"$user\@$host\"", |
devi@29 | 22 "--course-code" => "\"$course\"", |
devi@29 | 23 ); |
devi@29 | 24 |
devi@29 | 25 open (FRONTEND, "./l3-frontend ".join(" ",@args)." |"); |
devi@27 | 26 while (<FRONTEND>) { |
devi@27 | 27 print; |
devi@27 | 28 } |
devi@27 | 29 close(FRONTEND); |
devi@27 | 30 |