mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 02:42:58 +02:00
corrected some smaller bugs in some cgiŽs
added support for template in qos git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@1043 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -141,9 +141,9 @@ my @backups = `cd /var/ipfire/backup/ && ls *.ipf 2>/dev/null`;
|
||||
print <<END
|
||||
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
|
||||
<table width='95%' cellspacing='0'>
|
||||
<tr><td align='left' width='40%'>$Lang::tr{'logs'}</td><td align='left'>include Logfiles
|
||||
<tr><td align='left' width='40%'>$Lang::tr{'logs'}</td><td align='left'>$Lang::tr{'include logfiles'}
|
||||
<input type='radio' name='BACKUPLOGS' value='include'/>/
|
||||
<input type='radio' name='BACKUPLOGS' value='exclude' checked='checked'/> exclude Logfiles
|
||||
<input type='radio' name='BACKUPLOGS' value='exclude' checked='checked'/>$Lang::tr{'exclude logfiles'}
|
||||
</td></tr>
|
||||
<tr><td align='center' colspan='2'>
|
||||
<input type='hidden' name='ACTION' value='backup' />
|
||||
|
||||
@@ -185,7 +185,7 @@ print <<END;
|
||||
<tr> <th bgcolor='$color{'color20'}'>$Lang::tr{'network'}
|
||||
<th bgcolor='$color{'color20'}'>IP
|
||||
<th bgcolor='$color{'color20'}'>$Lang::tr{'status'}
|
||||
<tr> <td bgcolor='$Header::colourred' width='25%'><a href="/cgi-bin/pppsetup.cgi"><font size='2' color='white'><b>$Lang::tr{'internet'}:</b></font></a><br>
|
||||
<tr> <td align='center' bgcolor='$Header::colourred' width='25%'><a href="/cgi-bin/pppsetup.cgi"><font size='2' color='white'><b>$Lang::tr{'internet'}</b></font></a><br>
|
||||
<td width='30%' align='center'>$ipaddr
|
||||
<td width='45%' align='center'>$connstate
|
||||
END
|
||||
@@ -257,7 +257,7 @@ END
|
||||
}
|
||||
|
||||
if ( $netsettings{'GREEN_DEV'} ) { print <<END;
|
||||
<tr><td bgcolor='$Header::colourgreen' width='25%'><a href="/cgi-bin/dhcp.cgi"><font size='2' color='white'><b>$Lang::tr{'lan'}:</b></font></a>
|
||||
<tr><td align='center' bgcolor='$Header::colourgreen' width='25%'><a href="/cgi-bin/dhcp.cgi"><font size='2' color='white'><b>$Lang::tr{'lan'}</b></font></a>
|
||||
<td width='30%' align='center'>$netsettings{'GREEN_ADDRESS'}
|
||||
<td width='45%' align='center'>
|
||||
END
|
||||
@@ -267,7 +267,7 @@ END
|
||||
} else { print "Proxy aus"; }
|
||||
}
|
||||
if ( $netsettings{'BLUE_DEV'} ) { print <<END;
|
||||
<tr><td bgcolor='$Header::colourblue' width='25%'><a href="/cgi-bin/wireless.cgi"><font size='2' color='white'><b>$Lang::tr{'wireless'}:</b></font></a><br>
|
||||
<tr><td align='center' bgcolor='$Header::colourblue' width='25%'><a href="/cgi-bin/wireless.cgi"><font size='2' color='white'><b>$Lang::tr{'wireless'}</b></font></a><br>
|
||||
<td width='30%' align='center'>$netsettings{'BLUE_ADDRESS'}
|
||||
<td width='45%' align='center'>
|
||||
END
|
||||
@@ -277,7 +277,7 @@ END
|
||||
} else { print "Proxy aus"; }
|
||||
}
|
||||
if ( $netsettings{'ORANGE_DEV'} ) { print <<END;
|
||||
<tr><td bgcolor='$Header::colourorange' width='25%'><a href="/cgi-bin/dmzholes.cgi"><font size='2' color='white'><b>$Lang::tr{'dmz'}:</b></font></a><br>
|
||||
<tr><td align='center' bgcolor='$Header::colourorange' width='25%'><a href="/cgi-bin/dmzholes.cgi"><font size='2' color='white'><b>$Lang::tr{'dmz'}</b></font></a><br>
|
||||
<td width='30%' align='center'>$netsettings{'ORANGE_ADDRESS'}
|
||||
<td width='45%' align='center'><font color=$Header::colourgreen>Online</font>
|
||||
END
|
||||
@@ -289,7 +289,7 @@ END
|
||||
my %confighash = ();
|
||||
&General::readhasharray("${General::swroot}/vpn/config", \%confighash);
|
||||
print <<END;
|
||||
<tr><td bgcolor='$Header::colourvpn' width='25%'><a href="/cgi-bin/vpnmain.cgi"><font size='2' color='white'><b>$Lang::tr{'vpn'}:</b></font></a><br>
|
||||
<tr><td align='center' bgcolor='$Header::colourvpn' width='25%'><a href="/cgi-bin/vpnmain.cgi"><font size='2' color='white'><b>$Lang::tr{'vpn'}</b></font></a><br>
|
||||
<td width='30%' align='center'>$ipsecip
|
||||
<td width='45%' align='center'><font color=$Header::colourgreen>Online</font>
|
||||
END
|
||||
@@ -322,7 +322,7 @@ END
|
||||
`cat /var/ipfire/ovpn/settings | grep ^ENABLED_ORANGE=on`) {
|
||||
my $ovpnip = `cat /var/ipfire/ovpn/settings | grep ^DOVPN_SUBNET= | cut -c 14- | sed -e 's\/\\/255.255.255.0\/\/'`;
|
||||
print <<END;
|
||||
<tr><td bgcolor='$Header::colourovpn' width='25%'><a href="/cgi-bin/ovpnmain.cgi"><font size='2' color='white'><b>OpenVPN:</b></font></a><br>
|
||||
<tr><td align='center' bgcolor='$Header::colourovpn' width='25%'><a href="/cgi-bin/ovpnmain.cgi"><font size='2' color='white'><b>OpenVPN</b></font></a><br>
|
||||
<td width='30%' align='center'>$ovpnip
|
||||
<td width='45%' align='center'><font color=$Header::colourgreen>Online</font>
|
||||
END
|
||||
|
||||
@@ -97,7 +97,7 @@ END
|
||||
print <<END
|
||||
<tr>
|
||||
<td class='boldbase'><b>$Lang::tr{'ram'}</b></td>
|
||||
<td align='center'>$size</td>
|
||||
<td align='center'>$size KB</td>
|
||||
END
|
||||
;
|
||||
} elsif ($_ =~ m/^Swap:\s+(\d+)\s+(\d+)\s+(\d+)$/) {
|
||||
@@ -111,7 +111,7 @@ END
|
||||
print <<END
|
||||
<tr>
|
||||
<td class='boldbase'><b>$Lang::tr{'swap'}</b></td>
|
||||
<td align='center'>$size</td>
|
||||
<td align='center'>$size KB</td>
|
||||
END
|
||||
;
|
||||
} elsif ($ram and $_ =~ m/^-\/\+ buffers\/cache:\s+(\d+)\s+(\d+)$/ ) {
|
||||
@@ -120,8 +120,8 @@ END
|
||||
print "<tr><td colspan='2' class='boldbase'><b>$Lang::tr{'excluding buffers and cache'}</b></td>"
|
||||
}
|
||||
print <<END
|
||||
<td align='center'>$used</td>
|
||||
<td align='center'>$free</td>
|
||||
<td align='center'>$used KB</td>
|
||||
<td align='center'>$free KB</td>
|
||||
<td>
|
||||
END
|
||||
;
|
||||
@@ -137,9 +137,9 @@ END
|
||||
close FREE;
|
||||
print <<END
|
||||
<tr><td class='boldbase' colspan='2'><br /></td></tr>
|
||||
<tr><td class='boldbase'><b>$Lang::tr{'shared'}</b></td><td align='center'>$shared</td></tr>
|
||||
<tr><td class='boldbase'><b>$Lang::tr{'buffers'}</b></td><td align='center'>$buffers</td></tr>
|
||||
<tr><td class='boldbase'><b>$Lang::tr{'cached'}</b></td><td align='center'>$cached</td></tr>
|
||||
<tr><td class='boldbase'><b>$Lang::tr{'shared'}</b></td><td align='center'>$shared KB</td></tr>
|
||||
<tr><td class='boldbase'><b>$Lang::tr{'buffers'}</b></td><td align='center'>$buffers KB</td></tr>
|
||||
<tr><td class='boldbase'><b>$Lang::tr{'cached'}</b></td><td align='center'>$cached KB</td></tr>
|
||||
</table>
|
||||
END
|
||||
;
|
||||
|
||||
@@ -23,7 +23,7 @@ use RRDs;
|
||||
use strict;
|
||||
# enable only the following on debugging purpose
|
||||
# use warnings;
|
||||
#use CGI::Carp 'fatalsToBrowser';
|
||||
# use CGI::Carp 'fatalsToBrowser';
|
||||
|
||||
require '/var/ipfire/general-functions.pl';
|
||||
require "${General::swroot}/lang.pl";
|
||||
@@ -487,6 +487,95 @@ elsif ($qossettings{'ACTION'} eq $Lang::tr{'save'})
|
||||
}
|
||||
&General::writehash("${General::swroot}/qos/settings", \%qossettings);
|
||||
}
|
||||
elsif ($qossettings{'ACTION'} eq $Lang::tr{'template'} )
|
||||
{
|
||||
my @UP;
|
||||
#print "UP<br />";
|
||||
for(my $i = 1; $i <= 10; $i++) {
|
||||
$UP[$i] = int($qossettings{'OUT_SPD'} / $i );
|
||||
#print $i."=".$UP[$i]." ";
|
||||
}
|
||||
my @DOWN;
|
||||
#print "<br /><br />Down<br />";
|
||||
for(my $i = 1; $i <= 20; $i++) {
|
||||
$DOWN[$i] = int($qossettings{'INC_SPD'} / $i);
|
||||
#print $i."=".$DOWN[$i]." ";
|
||||
}
|
||||
open( FILE, "> $classfile" ) or die "Unable to write $classfile";
|
||||
print FILE <<END
|
||||
imq0;200;1;$DOWN[10];$DOWN[1];;;8;VoIP;
|
||||
imq0;203;4;$DOWN[20];$DOWN[1];;;0;VPN;
|
||||
imq0;204;5;$DOWN[20];$DOWN[1];;;8;Webtraffic;
|
||||
imq0;210;6;1;$DOWN[1];;;0;Standardklasse;
|
||||
imq0;220;7;1;$DOWN[1];;;1;P2P;
|
||||
ppp0;101;1;$UP[2];$UP[1];;;8;ACKs oder so;
|
||||
ppp0;102;2;$UP[3];$UP[1];;;8;VoIP;
|
||||
ppp0;104;5;$UP[10];$UP[1];;;8;Webtraffic;
|
||||
ppp0;110;6;1;$UP[1];;;0;Standardklasse;
|
||||
ppp0;120;7;1;$UP[1];;;1;P2P;
|
||||
ppp0;103;4;$UP[2];$UP[1];;;2;VPN;
|
||||
END
|
||||
;
|
||||
close FILE;
|
||||
open( FILE, "> $level7file" ) or die "Unable to write $level7file";
|
||||
print FILE <<END
|
||||
102;ppp0;dns;;;
|
||||
102;ppp0;sip;;;
|
||||
102;ppp0;skypetoskype;;;
|
||||
103;ppp0;ssh;;;
|
||||
103;ppp0;rdp;;;
|
||||
104;ppp0;http;;;
|
||||
104;ppp0;ssl;;;
|
||||
104;ppp0;pop3;;;
|
||||
110;ppp0;ftp;;;
|
||||
120;ppp0;applejuice;;;
|
||||
120;ppp0;bittorrent;;;
|
||||
200;imq0;skypetoskype;;;
|
||||
203;imq0;ssh;;;
|
||||
203;imq0;rdp;;;
|
||||
204;imq0;http;;;
|
||||
204;imq0;pop3;;;
|
||||
204;imq0;ssl;;;
|
||||
220;imq0;applejuice;;;
|
||||
220;imq0;bittorrent;;;
|
||||
210;imq0;ftp;;;
|
||||
END
|
||||
;
|
||||
close FILE;
|
||||
open( FILE, "> $portfile" ) or die "Unable to write $portfile";
|
||||
print FILE <<END
|
||||
101;ppp0;icmp;;;;;
|
||||
102;ppp0;tcp;;;;53;
|
||||
102;ppp0;udp;;;;53;
|
||||
103;ppp0;esp;;;;;
|
||||
103;ppp0;tcp;;;;1194;
|
||||
103;ppp0;udp;;4500;;4500;
|
||||
103;ppp0;udp;;500;;500;
|
||||
104;ppp0;tcp;;;;80;
|
||||
108;ppp0;esp;;;;;
|
||||
108;ppp0;l2tp;;;;;
|
||||
109;ppp0;icmp;;;;;
|
||||
200;imq0;icmp;;;;;
|
||||
203;imq0;esp;;;;;
|
||||
203;imq0;tcp;;;;1194;
|
||||
203;imq0;udp;;4500;;4500;
|
||||
203;imq0;udp;;500;;500;
|
||||
204;imq0;tcp;;;;80;
|
||||
END
|
||||
;
|
||||
close FILE;
|
||||
if ($qossettings{'DEF_INC_SPD'} eq '') {
|
||||
$qossettings{'DEF_INC_SPD'} = int($qossettings{'INC_SPD'} * 0.9);
|
||||
}
|
||||
if ($qossettings{'DEF_OUT_SPD'} eq '') {
|
||||
$qossettings{'DEF_OUT_SPD'} = int($qossettings{'OUT_SPD'} * 0.9);
|
||||
}
|
||||
$qossettings{'DEFCLASS_INC'} = "210";
|
||||
$qossettings{'DEFCLASS_OUT'} = "110";
|
||||
$qossettings{'ACK'} ="101";
|
||||
&General::writehash("${General::swroot}/qos/settings", \%qossettings);
|
||||
|
||||
}
|
||||
elsif ($qossettings{'ACTION'} eq 'Statusinformationen')
|
||||
{
|
||||
&Header::openbox('100%', 'left', 'QoS Status');
|
||||
@@ -686,7 +775,7 @@ END
|
||||
;}
|
||||
else
|
||||
{
|
||||
print $Lang::tr{'no information available'};
|
||||
print "\t</table><br />".$Lang::tr{'no information available'};
|
||||
}
|
||||
print "\t</table>";
|
||||
|
||||
@@ -761,15 +850,15 @@ sub changebandwidth {
|
||||
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
|
||||
<input type='hidden' name='DEF_OUT_SPD' value='' /><input type='hidden' name='DEF_INC_SPD' value='' />
|
||||
<table width='66%'>
|
||||
<tr><td width='100%' colspan='3'>$Lang::tr{'down and up speed'}
|
||||
<tr><td width='50%' align='right'>$Lang::tr{'downlink speed'}:
|
||||
<td width='30%' align='left'><input type='text' name='INC_SPD' maxlength='8' value="$qossettings{'INC_SPD'}" />
|
||||
<td width='20%' align='center'>
|
||||
<tr><td width='50%' align='right'>$Lang::tr{'uplink speed'}:
|
||||
<td width='30%' align='left'><input type='text' name='OUT_SPD' maxlength='8' value="$qossettings{'OUT_SPD'}" />
|
||||
<td width='20%' align='center'><input type='submit' name='ACTION' value="$Lang::tr{'save'}" /> <input type='reset' name='ACTION' value="$Lang::tr{'reset'}" />
|
||||
<tr><td width='100%' colspan='3'>$Lang::tr{'down and up speed'}</td></tr>
|
||||
<tr><td width='50%' align='right'>$Lang::tr{'downlink speed'}:</td>
|
||||
<td width='30%' align='left'><input type='text' name='INC_SPD' maxlength='8' value="$qossettings{'INC_SPD'}" /></td>
|
||||
<td width='20%' align='center' rowspan='2'><input type='submit' name='ACTION' value="$Lang::tr{'template'}" /><br /><input type='submit' name='ACTION' value="$Lang::tr{'save'}" /><br /><input type='reset' name='ACTION' value="$Lang::tr{'reset'}" /></td></tr>
|
||||
<tr><td width='50%' align='right'>$Lang::tr{'uplink speed'}:</td>
|
||||
<td width='30%' align='left'><input type='text' name='OUT_SPD' maxlength='8' value="$qossettings{'OUT_SPD'}" /></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<font color='red'>$Lang::tr{'template warning'}</font>
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
@@ -47,33 +47,33 @@ my %cgiparams=();
|
||||
# is also the name of the program
|
||||
my %servicenames =
|
||||
(
|
||||
$Lang::tr{'dhcp server'} => 'dhcpd',
|
||||
$Lang::tr{'web server'} => 'httpd',
|
||||
$Lang::tr{'cron server'} => 'fcron',
|
||||
$Lang::tr{'dns proxy server'} => 'dnsmasq',
|
||||
$Lang::tr{'logging server'} => 'syslogd',
|
||||
$Lang::tr{'kernel logging server'} => 'klogd',
|
||||
$Lang::tr{'ntp server'} => 'ntpd',
|
||||
$Lang::tr{'secure shell server'} => 'sshd',
|
||||
$Lang::tr{'vpn'} => 'pluto',
|
||||
$Lang::tr{'web proxy'} => 'squid',
|
||||
'OpenVPN' => 'openvpn'
|
||||
$Lang::tr{'dhcp server'} => 'dhcpd',
|
||||
$Lang::tr{'web server'} => 'httpd',
|
||||
$Lang::tr{'cron server'} => 'fcron',
|
||||
$Lang::tr{'dns proxy server'} => 'dnsmasq',
|
||||
$Lang::tr{'logging server'} => 'syslogd',
|
||||
$Lang::tr{'kernel logging server'} => 'klogd',
|
||||
$Lang::tr{'ntp server'} => 'ntpd',
|
||||
$Lang::tr{'secure shell server'} => 'sshd',
|
||||
$Lang::tr{'vpn'} => 'pluto',
|
||||
$Lang::tr{'web proxy'} => 'squid',
|
||||
'OpenVPN' => 'openvpn'
|
||||
);
|
||||
|
||||
my $iface = '';
|
||||
if (open(FILE, "${General::swroot}/red/iface"))
|
||||
{
|
||||
$iface = <FILE>;
|
||||
close FILE;
|
||||
chomp $iface;
|
||||
$iface = <FILE>;
|
||||
close FILE;
|
||||
chomp $iface;
|
||||
}
|
||||
$servicenames{"$Lang::tr{'intrusion detection system'} (RED)"} = "snort_${iface}";
|
||||
$servicenames{"$Lang::tr{'intrusion detection system'} (GREEN)"} = "snort_$netsettings{'GREEN_DEV'}";
|
||||
if ($netsettings{'ORANGE_DEV'} ne '') {
|
||||
$servicenames{"$Lang::tr{'intrusion detection system'} (ORANGE)"} = "snort_$netsettings{'ORANGE_DEV'}";
|
||||
$servicenames{"$Lang::tr{'intrusion detection system'} (ORANGE)"} = "snort_$netsettings{'ORANGE_DEV'}";
|
||||
}
|
||||
if ($netsettings{'BLUE_DEV'} ne '') {
|
||||
$servicenames{"$Lang::tr{'intrusion detection system'} (BLUE)"} = "snort_$netsettings{'BLUE_DEV'}";
|
||||
$servicenames{"$Lang::tr{'intrusion detection system'} (BLUE)"} = "snort_$netsettings{'BLUE_DEV'}";
|
||||
}
|
||||
|
||||
# Generate Graphs from rrd Data
|
||||
@@ -115,18 +115,19 @@ print "<br />\n";
|
||||
|
||||
print <<END
|
||||
<div align='center'>
|
||||
<table width='60%' cellspacing='0' border='0'>
|
||||
<table width='60%' cellspacing='1' border='0'>
|
||||
<tr><td align='left'><b>$Lang::tr{'services'}</b></td><td align='center'><b>$Lang::tr{'status'}</b></td><td align='center'><b>PID</b></td><td align='center'><b>$Lang::tr{'memory'}</b></td></tr>
|
||||
END
|
||||
;
|
||||
|
||||
my $key = '';
|
||||
foreach $key (sort keys %servicenames)
|
||||
{
|
||||
print "<tr>\n<td align='left'>$key</td>\n";
|
||||
my $shortname = $servicenames{$key};
|
||||
my $status = &isrunning($shortname);
|
||||
print "$status\n";
|
||||
print "</tr>\n";
|
||||
print "<tr>\n<td align='left'>$key</td>\n";
|
||||
my $shortname = $servicenames{$key};
|
||||
my $status = &isrunning($shortname);
|
||||
print "$status\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -138,58 +139,55 @@ print "</table></div>\n";
|
||||
|
||||
sub isrunning
|
||||
{
|
||||
my $cmd = $_[0];
|
||||
my $status = "<td bgcolor='${Header::colourred}'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td>";
|
||||
my $pid = '';
|
||||
my $testcmd = '';
|
||||
my $exename;
|
||||
my $cmd = $_[0];
|
||||
my $status = "<td align='center' bgcolor='${Header::colourred}'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td><td colspan='2'></td>";
|
||||
my $pid = '';
|
||||
my $testcmd = '';
|
||||
my $exename;
|
||||
my @memory;
|
||||
|
||||
$cmd =~ /(^[a-z]+)/;
|
||||
$exename = $1;
|
||||
$cmd =~ /(^[a-z]+)/;
|
||||
$exename = $1;
|
||||
|
||||
if (open(FILE, "/var/run/${cmd}.pid"))
|
||||
{
|
||||
$pid = <FILE>; chomp $pid;
|
||||
close FILE;
|
||||
if (open(FILE, "/proc/${pid}/status"))
|
||||
{
|
||||
while (<FILE>)
|
||||
{
|
||||
if (/^Name:\W+(.*)/) {
|
||||
$testcmd = $1; }
|
||||
}
|
||||
close FILE;
|
||||
if ($testcmd =~ /$exename/)
|
||||
{
|
||||
$status = "<td bgcolor='${Header::colourgreen}'><font color='white'><b>$Lang::tr{'running'}</b></font></td>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $status;
|
||||
if (open(FILE, "/var/run/${cmd}.pid")){
|
||||
$pid = <FILE>; chomp $pid;
|
||||
close FILE;
|
||||
if (open(FILE, "/proc/${pid}/status")){
|
||||
while (<FILE>){
|
||||
if (/^Name:\W+(.*)/) {$testcmd = $1; }
|
||||
}
|
||||
close FILE;
|
||||
}
|
||||
if (open(FILE, "/proc/${pid}/statm")){
|
||||
my $temp = <FILE>;
|
||||
@memory = split(/ /,$temp);
|
||||
}
|
||||
close FILE;
|
||||
if ($testcmd =~ /$exename/){$status = "<td align='center' bgcolor='${Header::colourgreen}'><font color='white'><b>$Lang::tr{'running'}</b></font></td><td align='center'>$pid</td><td align='center'>$memory[0] KB</td>";}
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
|
||||
sub percentbar
|
||||
{
|
||||
my $percent = $_[0];
|
||||
my $fg = '#a0a0a0';
|
||||
my $bg = '#e2e2e2';
|
||||
my $percent = $_[0];
|
||||
my $fg = '#a0a0a0';
|
||||
my $bg = '#e2e2e2';
|
||||
|
||||
if ($percent =~ m/^(\d+)%$/ )
|
||||
{
|
||||
print <<END
|
||||
if ($percent =~ m/^(\d+)%$/ ){
|
||||
print <<END
|
||||
<table width='100' border='1' cellspacing='0' cellpadding='0' style='border-width:1px;border-style:solid;border-color:$fg;width:100px;height:10px;'>
|
||||
<tr>
|
||||
END
|
||||
;
|
||||
if ($percent eq "100%") {
|
||||
print "<td width='100%' bgcolor='$fg' style='background-color:$fg;border-style:solid;border-width:1px;border-color:$bg'>"
|
||||
} elsif ($percent eq "0%") {
|
||||
print "<td width='100%' bgcolor='$bg' style='background-color:$bg;border-style:solid;border-width:1px;border-color:$bg'>"
|
||||
} else {
|
||||
print "<td width='$percent' bgcolor='$fg' style='background-color:$fg;border-style:solid;border-width:1px;border-color:$bg'></td><td width='" . (100-$1) . "%' bgcolor='$bg' style='background-color:$bg;border-style:solid;border-width:1px;border-color:$bg'>"
|
||||
}
|
||||
print <<END
|
||||
if ($percent eq "100%") {
|
||||
print "<td width='100%' bgcolor='$fg' style='background-color:$fg;border-style:solid;border-width:1px;border-color:$bg'>"
|
||||
} elsif ($percent eq "0%") {
|
||||
print "<td width='100%' bgcolor='$bg' style='background-color:$bg;border-style:solid;border-width:1px;border-color:$bg'>"
|
||||
} else {
|
||||
print "<td width='$percent' bgcolor='$fg' style='background-color:$fg;border-style:solid;border-width:1px;border-color:$bg'></td><td width='" . (100-$1) . "%' bgcolor='$bg' style='background-color:$bg;border-style:solid;border-width:1px;border-color:$bg'>"
|
||||
}
|
||||
print <<END
|
||||
<img src='/images/null.gif' width='1' height='1' alt='' /></td></tr></table>
|
||||
END
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user