diff --git a/CODE/cgi-bin/sefran3.pl b/CODE/cgi-bin/sefran3.pl index 6b5a1dc4..fa870492 100755 --- a/CODE/cgi-bin/sefran3.pl +++ b/CODE/cgi-bin/sefran3.pl @@ -441,14 +441,35 @@ =head1 Query string parameters # recupere les evenements dans la MC $f = "$MC3{ROOT}/$da/$MC3{PATH_FILES}/$MC3{FILE_PREFIX}$da$dm.txt"; if (-f $f) { - my @mc_liste = split(/\n/,qx(awk -F'|' '\$2 == "$dd" && substr(\$3,1,2) == "$hh" {printf "\%s\\n",\$0}' $f)); + my @mc_liste = split(/\n/,qx(awk -F'|' '{ d=1;if(\$7=="mn") d=60;if(\$7=="h") d=3600;if(\$7=="d") d=86400;} \$2=="$dd" && (substr(\$3,1,2)=="$hh" || (substr(\$3,1,2)<$hh && substr(\$3,1,2)+substr(\$3,3,2)/60+(substr(\$3,5,2)+\$6*d)/3600 >= $hh)) {printf "\%s\\n",\$0}' $f)); + #my @mc_liste = split(/\n/,qx(awk -F'|' '\$2 == "$dd" && substr(\$3,1,2) == "$hh" {printf "\%s\\n",\$0}' $f)); for (reverse @mc_liste) { my %MC = mcinfo($_); if (($MC{id} > 0 || ($userLevel >= 2 && $trash == 1)) && $userLevel >= 1) { - my $deb_evt = 1 + int($SEFRAN3{HOURLY_WIDTH}*($MC{minute}/60 + $MC{second}/3600)); - my $dur_evt = 1 + int(0.5 + $SEFRAN3{HOURLY_WIDTH}*$MC{duration}*$duration_s{$MC{unit}}/3600); - print "