Hello, all. I was hoping that someone could help me solve this problem,
because I'm at wits end. I have copyed the code from the variable rating
image mod and made the following changes:
my %rec = @_;
my $cost_img = "";
$cost_01 = qq|<IMG SRC="/img/icon/1.gif" WIDTH=11 HEIGHT=16 ALT="Entry Fee: $rec{'FeeEntry'}, Est. Fully Loaded Cost: $rec{'FeeLoaded'}" BORDER="0" ALIGN="ABSMIDDLE">|;
$cost_02 = qq|<IMG SRC="/img/icon/2.gif" WIDTH=11 HEIGHT=16 ALT="Entry Fee: $rec{'FeeEntry'}, Est. Fully Loaded Cost: $rec{'FeeLoaded'}" BORDER="0" ALIGN="ABSMIDDLE">|;
$cost_03 = qq|<IMG SRC="/img/icon/3.gif" WIDTH=11 HEIGHT=16 ALT="Entry Fee: $rec{'FeeEntry'}, Est. Fully Loaded Cost: $rec{'FeeLoaded'}" BORDER="0" ALIGN="ABSMIDDLE">|;
$cost_04 = qq|<IMG SRC="/img/icon/4.gif" WIDTH=11 HEIGHT=16 ALT="Entry Fee: $rec{'FeeEntry'}, Est. Fully Loaded Cost: $rec{'FeeLoaded'}" BORDER="0" ALIGN="ABSMIDDLE">|;
$cost_05 = qq|<IMG SRC="/img/icon/5.gif" WIDTH=11 HEIGHT=16 ALT="Entry Fee: $rec{'FeeEntry'}, Est. Fully Loaded Cost: $rec{'FeeLoaded'}" BORDER="0" ALIGN="ABSMIDDLE">|;
if ($rec{'FeeLoaded'} eq '0') { $cost_img = $cost_01; }
elsif ($rec{'FeeLoaded'} le '25') { $cost_img = $cost_01; }
elsif ($rec{'FeeLoaded'} le '50') { $cost_img = $cost_02; }
elsif ($rec{'FeeLoaded'} le '75') { $cost_img = $cost_03; }
elsif ($rec{'FeeLoaded'} le '100') { $cost_img = $cost_04; }
else { $cost_img = $cost_05; }
return &load_template ('link.html', {
detailed_url => "$build_detail_url/$rec{'ID'}$build_extension",
cost_img => $cost_img,
%rec,
%globals
});
}
The problem is that $cost_05 never gets called, no matter how big
FeeEntry is over 100. Yet, I know the values are working because 1) FeeEntry
is calculated, and 2) if I set the first if line to eq '125' ... $cost_05,
it will indeed return $cost_05 for links with 125. It should work, it
doesn't, and I can't for the life of me figure out why. Help?
[This message has been edited by oldmoney (edited August 18, 1999).]
because I'm at wits end. I have copyed the code from the variable rating
image mod and made the following changes:
Code:
IN site_html_templates.pl, sub site_html_link my %rec = @_;
my $cost_img = "";
$cost_01 = qq|<IMG SRC="/img/icon/1.gif" WIDTH=11 HEIGHT=16 ALT="Entry Fee: $rec{'FeeEntry'}, Est. Fully Loaded Cost: $rec{'FeeLoaded'}" BORDER="0" ALIGN="ABSMIDDLE">|;
$cost_02 = qq|<IMG SRC="/img/icon/2.gif" WIDTH=11 HEIGHT=16 ALT="Entry Fee: $rec{'FeeEntry'}, Est. Fully Loaded Cost: $rec{'FeeLoaded'}" BORDER="0" ALIGN="ABSMIDDLE">|;
$cost_03 = qq|<IMG SRC="/img/icon/3.gif" WIDTH=11 HEIGHT=16 ALT="Entry Fee: $rec{'FeeEntry'}, Est. Fully Loaded Cost: $rec{'FeeLoaded'}" BORDER="0" ALIGN="ABSMIDDLE">|;
$cost_04 = qq|<IMG SRC="/img/icon/4.gif" WIDTH=11 HEIGHT=16 ALT="Entry Fee: $rec{'FeeEntry'}, Est. Fully Loaded Cost: $rec{'FeeLoaded'}" BORDER="0" ALIGN="ABSMIDDLE">|;
$cost_05 = qq|<IMG SRC="/img/icon/5.gif" WIDTH=11 HEIGHT=16 ALT="Entry Fee: $rec{'FeeEntry'}, Est. Fully Loaded Cost: $rec{'FeeLoaded'}" BORDER="0" ALIGN="ABSMIDDLE">|;
if ($rec{'FeeLoaded'} eq '0') { $cost_img = $cost_01; }
elsif ($rec{'FeeLoaded'} le '25') { $cost_img = $cost_01; }
elsif ($rec{'FeeLoaded'} le '50') { $cost_img = $cost_02; }
elsif ($rec{'FeeLoaded'} le '75') { $cost_img = $cost_03; }
elsif ($rec{'FeeLoaded'} le '100') { $cost_img = $cost_04; }
else { $cost_img = $cost_05; }
return &load_template ('link.html', {
detailed_url => "$build_detail_url/$rec{'ID'}$build_extension",
cost_img => $cost_img,
%rec,
%globals
});
}
The problem is that $cost_05 never gets called, no matter how big
FeeEntry is over 100. Yet, I know the values are working because 1) FeeEntry
is calculated, and 2) if I set the first if line to eq '125' ... $cost_05,
it will indeed return $cost_05 for links with 125. It should work, it
doesn't, and I can't for the life of me figure out why. Help?
[This message has been edited by oldmoney (edited August 18, 1999).]