I'd like to use "if" and "elseif" in my sub html_record
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.
my (%rec) = @_; # Load any defaults to put in the VALUE field.
$rec{$db_key} =~ s/<.?B>//g;
($db_auto_generate and print &build_html_record(%rec) and return);
#my $font_color = 'Font face="Tahoma, Verdana, Arial, Helvetica" Size=2 Color=#003399';
#my $font = 'Font face="Tahoma, Verdana, Arial, Helvetica" Size=2';
print qq|
<p class="info">
<div class="row clear">
<label for="Description" class="name">Description:</label>
<div class="value">
<STRONG>$rec{'Description'}</STRONG>
</div>
</div>
</p><BR>
|;
}
like this:
Basic
<%elseif Level eq Regular%>
Regular
<%endif%>
where "Level" in default.cfg file is as Level => [9, 'alpha', 40, 100, 0, 'Basic', 'Basic|Regular|Premium'],
Any suggestion is appreciated, many thanks in advance.
Code:
sub html_record { # --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.
my (%rec) = @_; # Load any defaults to put in the VALUE field.
$rec{$db_key} =~ s/<.?B>//g;
($db_auto_generate and print &build_html_record(%rec) and return);
#my $font_color = 'Font face="Tahoma, Verdana, Arial, Helvetica" Size=2 Color=#003399';
#my $font = 'Font face="Tahoma, Verdana, Arial, Helvetica" Size=2';
print qq|
<p class="info">
<div class="row clear">
<label for="Description" class="name">Description:</label>
<div class="value">
<STRONG>$rec{'Description'}</STRONG>
</div>
</div>
</p><BR>
|;
}
like this:
Quote:
<%if Level eq Basic%> Basic
<%elseif Level eq Regular%>
Regular
<%endif%>
where "Level" in default.cfg file is as Level => [9, 'alpha', 40, 100, 0, 'Basic', 'Basic|Regular|Premium'],
Any suggestion is appreciated, many thanks in advance.