#!/usr/bin/perl -w # # $Id: ui.pl,v 1.2 2004/01/13 19:22:05 jeffo Exp $ # sub msgfont { my ($msg) = @_; return "$msg"; } sub errorformat { my ($errmsg) = @_; $errmsg = msgfont($errmsg); my $ERROR = msgfont(GetLanguageElement($SESSION{lang}, 570)); $errmsg = qq{
$ERROR $errmsg
}; return $errmsg; } sub okformat { my ($okmsg) = @_; $okmsg = msgfont($okmsg); my $OK = msgfont(GetLanguageElement($SESSION{lang}, 571)); $okmsg = qq{
$OK
$okmsg
}; return $okmsg; } # # Convert .97329 into 97.3, accoring to the input format, the configuration # format, or the default format. DOES NOT include the '%' sign. # sub format_percent { my ($value, $opts) = @_; my $fmt = $opts->{fmt} || $UI{PCNT_FMT} || "%.1f"; return sprintf($fmt, 100.0 * $value); } 1;