| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/13386/root/usr/libexec/webmin/Webmin/ |
Upload File : |
package Webmin::Icon;
use WebminCore;
=head2 Webmin::Icon(type, [message])
This object generates an icon indicating some status. Possible types are :
ok - OK
critial - A serious problem
major - A relatively serious problem
minor - A small problem
Can be used inside tables and property lists
=cut
sub new
{
if (defined(&Webmin::Theme::Icon::new) && caller() !~ /Webmin::Theme::Icon/) {
return new Webmin::Theme::Icon(@_[1..$#_]);
}
my ($self, $type, $message) = @_;
$self = { };
bless($self);
$self->set_type($type);
$self->set_message($message) if (defined($message));
return $self;
}
=head2 html()
Returns HTML for the icon
=cut
sub html
{
my ($self) = @_;
my $rv;
$rv .= "<img src=/images/".$self->get_type().".gif align=middle>";
if ($self->get_message()) {
$rv .= " ".$self->get_message();
}
return $rv;
}
sub set_type
{
my ($self, $type) = @_;
$self->{'type'} = $type;
}
sub get_type
{
my ($self) = @_;
return $self->{'type'};
}
sub set_message
{
my ($self, $message) = @_;
$self->{'message'} = $message;
}
sub get_message
{
my ($self) = @_;
return $self->{'message'};
}
1;