Документ взят из кэша поисковой машины. Адрес оригинального документа : http://hea.iki.rssi.ru/integral06/perl-bin/confirmation2_test.pl~
Дата изменения: Wed Mar 21 23:31:55 2007
Дата индексирования: Mon Oct 1 23:20:07 2012
Кодировка:

Поисковые слова: universe
#!/usr/bin/perl

# get current time and data
@TIME = localtime(time);
$DATE = @TIME[3].".".(@TIME[4]+1).".".(@TIME[5]+1900);
$time = @TIME[2].":".@TIME[1].":".@TIME[0];

$bibfile="/export/web/data/integral06/pregistration.bib";
require "bp.pl";
&bib'format("auto");

if($ENV{'REQUEST_METHOD'} eq 'GET'){
$query = $ENV{'QUERY_STRING'};
}elsif($ENV{'REQUEST_METHOD'} eq 'POST'){
sysread(STDIN,$query,$ENV{'CONTENT_LENGTH'});
}
$query=urldecode($query);

print "Content-Type: text/html\n\n";
print "The 6th INTEGRAL Workshop \"The Obscured <b style="color:black;background-color:#ffff66">Universe</b>\"";
print "";
print "";
print "";
print "";

print "";
print "";
print "







The 6th INTEGRAL Workshop

The Obscured Universe

Space Research Institute, Moscow, Russia

July 2-8, 2006

";
print "


Workshop Information:




Related Information:


";
print "
";

if($query ne ''){
@fvalues = split(/&/,$query);

foreach $i (0 .. $#fvalues){
$str=$fvalues[$i];
($name,$val) = split(/=/,$fvalues[$i],2);
$name=&urldecode($name);
$val=&urldecode($val);
$field{$name} = $val;
}
}


if($query eq '' || $field{email} eq ''){
&print_form;
print "";
exit 0;
}

exit 0 unless &bib'open($bibfile);
$totrecs = 0;

$is_valid=0;
$print="";
while ($record = &bib'read($bibfile) ) {
%entry = &bib'explode($record);
if($entry{email} eq $field{email}){
#if($entry{presentation_number} eq $field{number}){
$is_valid=1;
$pfirst_name="$entry{first_name}";
$plast_name="$entry{last_name}";
$ptitle="$entry{title}";
$pabstract="$entry{abstract}";
$paddress="$entry{address}";
$pemail="$entry{email}";
$pdate="$entry{date}";
$ptype="$entry{presentation_type}";
$ppersons_number="$entry{persons_number}";
$paffiliation="$entry{affiliation}";
$pnumber="$entry{presentation_number}";


$name="$entry{first_name} $entry{last_name}";
$print.="";
foreach $k (sort keys %entry){
next if($k eq "CITEKEY");
next if($k eq "TYPE");
next if($k eq "date");
next if($k eq "comments" && $entry{'comments'} eq "");
next if($k eq "under35" && $entry{'under35'} eq "no");
$print.="\n";
}
$print.="
$k$entry{$k}
";
$print.="

Record $entry{date}


";
#}
}
}
&bib'close($bibfile);

if($is_valid == 0){
print "ERROR: Entry not found.
";
&print_form;
}else{

print "

Dear Dr. $name,

Please find below the information you have entered during pre-registration,

check and correct it (if necessary) and confirm (or no) your participation.

The scientific program of the Workshop and durations of oral reports

can be found here.

";

print "





   First Name:   

 Last Name:
















































 

Affiliation:



Address:


Presentation: number: $pnumber,    type: $ptype



Title:



All authors:



Abstract:



Number
of accompanying persons:


Date of  

pre-registration: $pdate

  
This final registration means the agreement to pay the workshop fee of
8500 Rbls
(equivalent of 250 Euro) in cash to the LOC at the registration desk at IKI after arrival to the workshop
(see however Note on support)
  

  




";
}
print "
(c) Space Research Institute, Moscow, Russia, 2006
";
print "\n";

sub urldecode{
local($val)=@_;
#$val =~ s/\+/ /g;
$val =~ s/%([0-9a-hA-H]{2})/pack('C',hex($1))/ge;
return $val;
}


sub print_form{
print "Please enter e-mail which you have typed in pre-registration:
";
print "

";
}