#!/usr/bin/perl
#ingresa nuevos eventos a la agenda
$titulo1 = "Informes e Inscripción:";
$titulo2 = "Teléfono:";
if ($ENV{'QUERY_STRING'} =~ /ingles/){
$titulo1 = "Information and Registration:";
$titulo2 = "Phone:";
}
&parse_form;
&ingresa;
sub parse_form {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
}
sub ingresa {
@months = ('01','02','03','04','05','06', '07','08','09','10','11','12');
($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6];
if ($sec < 10) { $sec = "0$sec" ; }
if ($min < 10) { $min = "0$min" ; }
if ($hour < 10) { $hour = "0$hour"; }
if ($mday < 10) { $mday = "0$mday"; }
$year = $year + 1900;
$fecha = "$year$months[$mon]$mday";
open(ARCHI,"/usr/local/www/websites/gbsystems/dw/eventos.txt");
@LINEAS = ;
close(ARCHI);
print "Content-type: text/html\n\n";
print "\n";
foreach $linea (@LINEAS) {
@renglon = split(/\|/, $linea);
#esta es la unica linea distinta al vereven2.pl
if (($renglon[0] gt $fecha) && ($renglon[5] eq "ARGENTINA")) {
print "\n";
print "\n";
print "$renglon[1]\n";
print " | \n";
print "$renglon[2]
\n";
print "$titulo1 \n";
if ($renglon[3]) {print "$renglon[3] \n";}
if ($renglon[4]) {print "$renglon[4] \n";}
if ($renglon[5]) {print "$renglon[5] \n";}
if ($renglon[6]) {
print "$titulo2 \n";
print "$renglon[6] \n";
}
if ($renglon[7]) {
print " $renglon[7] \n";
}
print " | \n";
print " \n";
}
}
print "\n";
}
|
#!/usr/bin/perl
#ingresa nuevos eventos a la agenda
$titulo1 = "Informes e Inscripción:";
$titulo2 = "Teléfono:";
if ($ENV{'QUERY_STRING'} =~ /ingles/){
$titulo1 = "Information and Registration:";
$titulo2 = "Phone:";
}
&parse_form;
&ingresa;
sub parse_form {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
}
sub ingresa {
@months = ('01','02','03','04','05','06', '07','08','09','10','11','12');
($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6];
if ($sec < 10) { $sec = "0$sec" ; }
if ($min < 10) { $min = "0$min" ; }
if ($hour < 10) { $hour = "0$hour"; }
if ($mday < 10) { $mday = "0$mday"; }
$year = $year + 1900;
$fecha = "$year$months[$mon]$mday";
open(ARCHI,"/usr/local/www/websites/gbsystems/dw/eventos.txt");
@LINEAS = ;
close(ARCHI);
print "Content-type: text/html\n\n";
print "\n";
foreach $linea (@LINEAS) {
@renglon = split(/\|/, $linea);
#esta es la unica linea distinta al vereven2.pl
if (($renglon[0] gt $fecha) && ($renglon[5] ne "ARGENTINA")) {
print "\n";
print "\n";
print "$renglon[1]\n";
print " | \n";
print "$renglon[2]
\n";
print "$titulo1 \n";
if ($renglon[3]) {print "$renglon[3] \n";}
if ($renglon[4]) {print "$renglon[4] \n";}
if ($renglon[5]) {print "$renglon[5] \n";}
if ($renglon[6]) {
print "$titulo2 \n";
print "$renglon[6] \n";
}
if ($renglon[7]) {
print " $renglon[7] \n";
}
print " | \n";
print " \n";
}
}
print "\n";
}
|