%settings = ();
%ethsettings = ();
@URI = ();
-$Header::supported=0;
### Make sure this is an SSL request
if ($ENV{'SERVER_ADDR'} && $ENV{'HTTPS'} ne 'on') {
print "Status: 302 Moved\r\n";
- print "Location: https://$ENV{'SERVER_ADDR'}:10443/$ENV{'PATH_INFO'}\r\n\r\n";
+ print "Location: https://$ENV{'SERVER_ADDR'}:444/$ENV{'PATH_INFO'}\r\n\r\n";
exit 0;
}
};
};
+### Read IPFire Buildversion
+$FIREBUILD = "File not found: firebuild\n";
+if (open(MYFile, "<${swroot}/firebuild")) {
+ $FIREBUILD = <MYFile>;
+ chomp($FIREBUILD);
+ $FIREBUILD = "(Build: $FIREBUILD)";
+ close(MYFile);
+};
require "${swroot}/langs/en.pl";
require "${swroot}/langs/${language}.pl";
+eval `/bin/cat /srv/web/ipfire/html/themes/$settings{'THEME'}/include/functions.pl`;
sub orange_used () {
if ($ethsettings{'CONFIG_TYPE'} =~ /^[1357]$/) {
my %subsystemhash = ();
my $subsystem = \%subsystemhash;
- $subsystem->{'01.home'} = {
+ $subsystem->{'10.home'} = {
'caption' => $tr{'alt home'},
'uri' => '/cgi-bin/index.cgi',
'title' => "$tr{'alt home'}",
'enabled' => 1,
};
- $subsystem->{'02.passwords'} = {
+ $subsystem->{'20.dialup'} = {
+ 'caption' => $tr{'alt dialup'},
+ 'uri' => '/cgi-bin/pppsetup.cgi',
+ 'title' => "$tr{'alt dialup'}",
+ 'enabled' => 1,
+ };
+ $subsystem->{'30.passwords'} = {
'caption' => $tr{'sspasswords'},
'uri' => '/cgi-bin/changepw.cgi',
'title' => "$tr{'sspasswords'}",
'enabled' => 1,
};
- $subsystem->{'03.ssh'} = {
+ $subsystem->{'40.ssh'} = {
'caption' => $tr{'ssh access'},
'uri' => '/cgi-bin/remote.cgi',
'title' => "$tr{'ssh access'}",
'enabled' => 1,
};
- $subsystem->{'04.gui'} = {
+ $subsystem->{'50.gui'} = {
'caption' => $tr{'gui settings'},
'uri' => '/cgi-bin/gui.cgi',
'title' => "$tr{'gui settings'}",
'enabled' => 1,
};
- $subsystem->{'05.shutdown'} = {
+ $subsystem->{'60.shutdown'} = {
'caption' => $tr{'shutdown'},
'uri' => '/cgi-bin/shutdown.cgi',
'title' => "$tr{'shutdown'} / $tr{'reboot'}",
my %substatushash = ();
my $substatus = \%substatushash;
- $substatus->{'01.systemstatus'} = {
+ $substatus->{'10.systemstatus'} = {
'caption' => $tr{'sssystem status'},
'uri' => '/cgi-bin/status.cgi',
'title' => "$tr{'sssystem status'}",
'enabled' => 1,
};
- $substatus->{'02.networkstatus'} = {
+ $substatus->{'20.networkstatus'} = {
'caption' => $tr{'ssnetwork status'},
'uri' => '/cgi-bin/netstatus.cgi',
'title' => "$tr{'ssnetwork status'}",
'enabled' => 1,
};
- $substatus->{'03.systemgraphs'} = {
+ $substatus->{'30.systemgraphs'} = {
'caption' => $tr{'system graphs'},
'uri' => '/cgi-bin/graphs.cgi',
'novars' => 1,
'title' => "$tr{'system graphs'}",
'enabled' => 1,
};
- $substatus->{'04.trafficgraphs'} = {
+ $substatus->{'40.trafficgraphs'} = {
'caption' => $tr{'sstraffic graphs'},
'uri' => '/cgi-bin/graphs.cgi',
'vars' => 'graph=network',
'title' => "$tr{'sstraffic graphs'}",
'enabled' => 1,
};
- $substatus->{'05.proxygraphs'} = {
+ $substatus->{'50.proxygraphs'} = {
'caption' => $tr{'ssproxy graphs'},
'uri' => '/cgi-bin/proxygraphs.cgi',
'title' => "$tr{'ssproxy graphs'}",
'enabled' => 1,
};
- $substatus->{'06.fwhits'} = {
+ $substatus->{'60.fwhits'} = {
'caption' => 'Firewall-Diagramme',
'uri' => '/cgi-bin/fwhits.cgi',
'title' => "Firewall-Diagramme",
'enabled' => 1,
};
- $substatus->{'07.connections'} = {
+ $substatus->{'70.hardwaregraphs'} = {
+ 'caption' => "$tr{'hardware graphs'}",
+ 'uri' => '/cgi-bin/hardwaregraphs.cgi',
+ 'title' => "$tr{'hardware graphs'}",
+ 'enabled' => 1,
+ };
+ $substatus->{'80.connections'} = {
'caption' => $tr{'connections'},
'uri' => '/cgi-bin/connections.cgi',
'title' => "$tr{'connections'}",
'enabled' => 1,
};
- $substatus->{'08.nettraf'} = {
+ $substatus->{'90.nettraf'} = {
'caption' => $tr{'sstraffic'},
'uri' => '/cgi-bin/traffic.cgi',
'title' => "$tr{'sstraffic'}",
'enabled' => 1,
};
- $substatus->{'99.iptfilters'} = {
- 'caption' => $tr{'iptfilters iptable rules'},
- 'uri' => '/cgi-bin/iptfilters.cgi',
- 'title' => "$tr{'iptfilters iptable rules'}",
+ $substatus->{'99.iptable'} = {
+ 'caption' => $tr{'iptable rules'},
+ 'uri' => '/cgi-bin/iptables.cgi',
+ 'title' => "$tr{'iptable rules'}",
'enabled' => 1,
};
my %subnetworkhash = ();
my $subnetwork = \%subnetworkhash;
- $subnetwork->{'01.proxy'} = {'caption' => 'Webproxy',
+ $subnetwork->{'10.netconf'} = {'caption' => "$tr{'net config'}",
+ 'uri' => '/cgi-bin/netconfig.cgi',
+ 'title' => "$tr{'net config'}",
+ 'enabled' => 0,
+ };
+ $subnetwork->{'20.proxy'} = {'caption' => 'Webproxy',
'uri' => '/cgi-bin/proxy.cgi',
'title' => "Webproxy",
'enabled' => 1,
};
- $subnetwork->{'02.urlfilter'} = {'caption' => 'URL-Filter',
+ $subnetwork->{'30.urlfilter'} = {'caption' => 'URL-Filter',
'uri' => '/cgi-bin/urlfilter.cgi',
'title' => "URL-Filter",
'enabled' => 1,
};
- $subnetwork->{'03.dhcp'} = {'caption' => $tr{'dhcp server'},
+ $subnetwork->{'40.dhcp'} = {'caption' => $tr{'dhcp server'},
'uri' => '/cgi-bin/dhcp.cgi',
'title' => "$tr{'dhcp server'}",
'enabled' => 1,
};
- $subnetwork->{'04.dialup'} = {
- 'caption' => $tr{'alt dialup'},
- 'uri' => '/cgi-bin/pppsetup.cgi',
- 'title' => "$tr{'alt dialup'}",
- 'enabled' => 1,
- };
- $subnetwork->{'05.hosts'} = {
+ $subnetwork->{'50.scheduler'} = {
+ 'caption' => $tr{'connscheduler'},
+ 'uri' => '/cgi-bin/connscheduler.cgi',
+ 'title' => "$tr{'connscheduler'}",
+ 'enabled' => 1,
+ };
+ $subnetwork->{'60.hosts'} = {
'caption' => $tr{'edit hosts'},
'uri' => '/cgi-bin/hosts.cgi',
'title' => "$tr{'edit hosts'}",
'enabled' => 1,
};
- $subnetwork->{'06.upload'} = {
+ $subnetwork->{'70.upload'} = {
'caption' => $tr{'upload'},
'uri' => '/cgi-bin/upload.cgi',
'title' => "$tr{'upload'}",
'enabled' => 0,
};
- $subnetwork->{'07.aliases'} = {
+ $subnetwork->{'80.aliases'} = {
'caption' => $tr{'aliases'},
'uri' => '/cgi-bin/aliases.cgi',
'title' => "$tr{'aliases'}",
+ 'enabled' => 0,
+ };
+ $subnetwork->{'90.wakeonlan'} = {
+ 'caption' => $tr{'WakeOnLan'},
+ 'uri' => '/cgi-bin/wakeonlan.cgi',
+ 'title' => "$tr{'WakeOnLan'}",
'enabled' => 1,
};
my $subservices = \%subserviceshash;
- $subservices->{'01.openvpn'} = {
+ $subservices->{'10.openvpn'} = {
'caption' => 'OpenVPN',
'uri' => '/cgi-bin/ovpnmain.cgi',
'title' => "$tr{'virtual private networking'}",
'enabled' => 1,
};
- $subservices->{'02.ipsec'} = {
+ $subservices->{'20.ipsec'} = {
'caption' => 'IPSec',
'uri' => '/cgi-bin/vpnmain.cgi',
'title' => "$tr{'virtual private networking'}",
'enabled' => 1,
};
- $subservices->{'03.dyndns'} = {'caption' => $tr{'dynamic dns'},
+ $subservices->{'30.dyndns'} = {'caption' => $tr{'dynamic dns'},
'uri' => '/cgi-bin/ddns.cgi',
'title' => "$tr{'dynamic dns'}",
'enabled' => 1,
};
- $subservices->{'04.time'} = {'caption' => $tr{'time server'},
+ $subservices->{'40.time'} = {'caption' => $tr{'time server'},
'uri' => '/cgi-bin/time.cgi',
'title' => "$tr{'time server'}",
'enabled' => 1,
};
- $subservices->{'05.qos'} = {'caption' => 'Quality of Service',
+ $subservices->{'50.qos'} = {'caption' => 'Quality of Service',
'uri' => '/cgi-bin/qos.cgi',
'title' => "Quality of Service",
'enabled' => 1,
};
- $subservices->{'06.ids'} = {'caption' => $tr{'intrusion detection'},
+ $subservices->{'60.ids'} = {'caption' => $tr{'intrusion detection'},
'enabled' => 1,
'uri' => '/cgi-bin/ids.cgi',
'title' => "$tr{'intrusion detection system'}",
my $subfirewall = \%subfirewallhash;
- $subfirewall->{'01.dnat'} = {
+ $subfirewall->{'10.dnat'} = {
'caption' => $tr{'ssport forwarding'},
'uri' => '/cgi-bin/portfw.cgi',
'title' => "$tr{'ssport forwarding'}",
'enabled' => 1,
};
- $subfirewall->{'02.xtaccess'} = {
+ $subfirewall->{'20.xtaccess'} = {
'caption' => $tr{'external access'},
'uri' => '/cgi-bin/xtaccess.cgi',
'title' => "$tr{'external access'}",
'enabled' => 1,
};
- $subfirewall->{'03.wireless'} = {
+ $subfirewall->{'30.wireless'} = {
'caption' => $tr{'blue access'},
'uri' => '/cgi-bin/wireless.cgi',
'title' => "$tr{'blue access'}",
'enabled' => 1,
};
- $subfirewall->{'04.dmz'} = {
+ $subfirewall->{'40.dmz'} = {
'caption' => $tr{'ssdmz pinholes'},
'uri' => '/cgi-bin/dmzholes.cgi',
'title' => "$tr{'dmz pinhole configuration'}",
'enabled' => 1,
};
- $subfirewall->{'05.outgoing'} = {
+ $subfirewall->{'50.outgoing'} = {
'caption' => $tr{'outgoing firewall'},
'uri' => '/cgi-bin/outgoingfw.cgi',
'title' => "$tr{'outgoing firewall'}",
'enabled' => 1,
};
- $subfirewall->{'06.fwopts'} = {
+ $subfirewall->{'60.upnp'} = {
+ 'caption' => 'UPnP',
+ 'uri' => '/cgi-bin/upnp.cgi',
+ 'title' => "Universal Plug and Play",
+ 'enabled' => 1,
+ };
+ $subfirewall->{'70.fwopts'} = {
'caption' => $tr{'options fw'},
'uri' => '/cgi-bin/optionsfw.cgi',
'title' => "$tr{'options fw'}",
my %sublogshash = ();
my $sublogs = \%sublogshash;
- $sublogs->{'01.summary'} = {'caption' => $tr{'log summary'},
+ $sublogs->{'10.summary'} = {'caption' => $tr{'log summary'},
'uri' => '/cgi-bin/logs.cgi/summary.dat',
'title' => "$tr{'log summary'}",
'enabled' => 1
};
- $sublogs->{'02.settings'} = {'caption' => $tr{'log settings'},
+ $sublogs->{'20.settings'} = {'caption' => $tr{'log settings'},
'uri' => '/cgi-bin/logs.cgi/config.dat',
'title' => "$tr{'log settings'}",
'enabled' => 1
};
- $sublogs->{'03.proxy'} = {'caption' => $tr{'proxy logs'},
+ $sublogs->{'30.proxy'} = {'caption' => $tr{'proxy logs'},
'uri' => '/cgi-bin/logs.cgi/proxylog.dat',
'title' => "$tr{'proxy logs'}",
'enabled' => 1
};
- $sublogs->{'04.firewall'} = {'caption' => $tr{'firewall logs'},
+ $sublogs->{'40.firewall'} = {'caption' => $tr{'firewall logs'},
'uri' => '/cgi-bin/logs.cgi/firewalllog.dat',
'title' => "$tr{'firewall logs'}",
'enabled' => 1
};
- $sublogs->{'05.ids'} = {'caption' => $tr{'ids logs'},
+ $sublogs->{'50.ids'} = {'caption' => $tr{'ids logs'},
'uri' => '/cgi-bin/logs.cgi/ids.dat',
'title' => "$tr{'ids logs'}",
'enabled' => 1
};
- $sublogs->{'07.urlfilter'} = {
- 'caption' => $tr{'urlfilter log'},
+ $sublogs->{'60.urlfilter'} = {
+ 'caption' => $tr{'urlfilter logs'},
'uri' => '/cgi-bin/logs.cgi/urlfilter.dat',
'title' => "$tr{'urlfilter log'}",
'enabled' => 1,
};
- $sublogs->{'08.openvpn'} = {'caption' => $tr{'openvpn log'},
+ $sublogs->{'70.openvpn'} = {'caption' => $tr{'openvpn log'},
'uri' => '/cgi-bin/logs.cgi/openvpn.dat',
'title' => "$tr{'openvpn log'}",
'enabled' => 1
};
- $sublogs->{'09.system'} = {'caption' => $tr{'system logs'},
+ $sublogs->{'80.system'} = {'caption' => $tr{'system logs'},
'uri' => '/cgi-bin/logs.cgi/log.dat',
'title' => "$tr{'system logs'}",
'enabled' => 1
};
- $sublogs->{'10.userlog'} = {'caption' => $tr{'user proxy logs'},
+ $sublogs->{'90.userlog'} = {'caption' => $tr{'user proxy logs'},
'uri' => '/cgi-bin/logs.cgi/userlog.dat',
'title' => "$tr{'user log'}",
'enabled' => 1
my %subipfirehash = ();
my $subipfire = \%subipfirehash;
- $subipfire->{'01.pakfire'} = {'caption' => 'Pakfire',
+ $subipfire->{'10.pakfire'} = {'caption' => 'Pakfire',
'uri' => '/cgi-bin/pakfire.cgi',
'title' => "Pakfire",
'enabled' => 1,
};
- $subipfire->{'02.asterisk'} = {'caption' => 'Asterisk',
+ $subipfire->{'20.asterisk'} = {'caption' => 'Asterisk',
'uri' => '/cgi-bin/asterisk.cgi',
'title' => "Asterisk",
'enabled' => 1,
};
- $subipfire->{'02.samba'} = {'caption' => 'Samba',
+ $subipfire->{'30.samba'} = {'caption' => 'Samba',
'uri' => '/cgi-bin/samba.cgi',
'title' => "Samba",
'enabled' => 1,
};
if (! blue_used() && ! orange_used()) {
- $menu->{'05.firewall'}{'subMenu'}->{'04.dmz'}{'enabled'} = 0;
+ $menu->{'05.firewall'}{'subMenu'}->{'40.dmz'}{'enabled'} = 0;
}
if (! blue_used()) {
- $menu->{'05.firewall'}{'subMenu'}->{'03.wireless'}{'enabled'} = 0;
+ $menu->{'05.firewall'}{'subMenu'}->{'30.wireless'}{'enabled'} = 0;
}
- if (! $ethsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/ && $ethsettings{'RED_TYPE'} eq 'STATIC' ) {
- $menu->{'03.network'}{'subMenu'}->{'04.aliases'}{'enabled'} = 0;
+ if ( $ethsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/ && $ethsettings{'RED_TYPE'} eq 'STATIC' ) {
+ $menu->{'03.network'}{'subMenu'}->{'70.aliases'}{'enabled'} = 1;
}
}
return '';
}
-
-sub showmenu() {
- print <<EOF
- <div id="menu-top">
- <ul>
-EOF
-;
- foreach my $k1 ( sort keys %$menu ) {
- if (! $menu->{$k1}{'enabled'}) {
- next;
- }
-
- my $link = getlink($menu->{$k1});
- if ($link eq '') {
- next;
- }
- if (! is_menu_visible($link)) {
- next;
- }
- if ($menu->{$k1}->{'selected'}) {
- print '<li class="selected">';
- } else {
- print '<li>';
- }
-
- print <<EOF
- <div class="rcorner">
- <a href="$link">$menu->{$k1}{'caption'}</a>
- </div>
- </li>
-EOF
-;
- }
-
- print <<EOF
- </ul>
- </div>
-EOF
-;
-}
-
-sub getselected($) {
- my $root = shift;
- if (!$root) {
- return 0;
- }
-
- foreach my $item (%$root) {
- if ($root->{$item}{'selected'}) {
- return $root->{$item};
- }
- }
-}
-
-sub showsubsection($$) {
- my $root = shift;
- my $id = shift;
- if ($id eq '') {
- $id = 'menu-left';
- }
-
- if (! $root) {
- return;
- }
- my $selected = getselected($root);
- if (! $selected) {
- return;
- }
- my $submenus = $selected->{'subMenu'};
- if (! $submenus) {
- return;
- }
-
- print <<EOF
- <div id="$id">
- <ul>
-EOF
-;
- foreach my $item (sort keys %$submenus) {
- my $hash = $submenus->{$item};
- if (! $hash->{'enabled'}) {
- next;
- }
-
- my $link = getlink($hash);
- if ($link eq '') {
- next;
- }
- if (! is_menu_visible($link)) {
- next;
- }
- if ($hash->{'selected'}) {
- print '<li class="selected">';
- } else {
- print '<li>';
- }
-
- print <<EOF
- <a href="$link">$hash->{'caption'}</a>
- </li>
-EOF
-;
- }
-
- print <<EOF
- </ul>
- </div>
-EOF
-;
-
-}
-
-
-sub showsubsubsection($) {
- my $root = shift;
- if (!$root) {
- return;
- }
- my $selected = getselected($root);
- if (! $selected) {
- return
- }
- if (! $selected->{'subMenu'}) {
- return
- }
-
- showsubsection($selected->{'subMenu'}, 'menu-subtop');
-}
-
-
-sub get_helpuri() {
- my $helpfile = '';
- if ($URI[0] =~ /.*\/([^\/]+)\.cgi/) {
- $helpfile = $1;
- } else {
- return '';
- }
- $helpfile .= '.help.html';
-
- my $helpuri = '/doc/'.$language.'/'.$helpfile;
- if (! -e $ENV{'DOCUMENT_ROOT'}.$helpuri) {
- return '';
- }
- return $helpuri;
-}
-
-
-sub openpage {
- my $title = shift;
- my $boh = shift;
- my $extrahead = shift;
-
- @URI=split ('\?', $ENV{'REQUEST_URI'} );
- &readhash("${swroot}/main/settings", \%settings);
- &genmenu();
-
- my $h2 = gettitle($menu);
- my $helpuri = get_helpuri();
-
- $title = "IPFire - $title";
- if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') {
- $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title";
- }
-
- print <<END
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html>
- <head>
- <title>$title</title>
-
- $extrahead
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5,Transition=12)">
- <meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5,Transition=12)">
- <link rel="shortcut icon" href="/favicon.ico" />
- <style type="text/css">\@import url(/include/style.css);</style>
- <style type="text/css">\@import url(/include/menu.css);</style>
- <style type="text/css">\@import url(/include/content.css);</style>
- <script language="javascript" type="text/javascript">
-
- function swapVisibility(id) {
- el = document.getElementById(id);
- if(el.style.display != 'block') {
- el.style.display = 'block'
- }
- else {
- el.style.display = 'none'
- }
- }
- </script>
-
- </head>
- <body>
-<!-- IPFIRE HEADER -->
-
-<div id="main">
-
-<div id="header">
- <img id="logo-product" src="/images/logo_ipfire.gif">
- <div id="header-icons">
- <a href="http://users.ipfire.eu/" target="_blank"><img border="0" src="/images/help.gif"></a>
- </div>
-</div>
-
-END
-;
-
- &showmenu();
-
-print <<END
-<div id="content">
- <table width="90%">
- <tr>
- <td valign="top">
-END
-;
-
- &showsubsection($menu);
-
- print <<END
- <p><center><img src="/images/iptux.png" width='160px' height='160px'></center></p>
- </td>
- <td width="100%" valign="top">
- <div id="page-content">
- <h2>$h2</h2>
-END
- ;
-
- &showsubsubsection($menu);
-
- eval {
- require 'ipfire-network.pl';
- $supported = check_support();
- warn_unsupported($supported);
- };
-}
-
-sub closepage () {
- my $status = &connectionstatus();
- $uptime = `/usr/bin/uptime`;
-
- print <<END
- <div align="center">
- <p>
- <div style="font-size: 9px"><b>Status:</b> $status <b>Uptime:</b>$uptime</div>
- </p>
- </div>
- </body>
-</html>
-END
-;
-}
-
-sub openbigbox
-{
- my $width = $_[0];
- my $align = $_[1];
- my $sideimg = $_[2];
-
- if ($errormessage) {
- $bgcolor = "style='background-color: $colourerr;'";
- } else {
- $bgcolor = '';
- }
-}
-
-sub closebigbox
-{
-# print "</td></tr></table></td></tr></table>\n"
-}
-
-sub openbox
-{
- $width = $_[0];
- $align = $_[1];
- $caption = $_[2];
-
- if ($caption) { print "<h3>$caption</h3>\n"; } else { print " "; }
-
- print "<table class=\"list\"><tr><td align=\"$align\">\n";
-}
-
-sub closebox
-{
- print "</td></tr></table><br><br>";
-}
-
sub writehash
{
my $filename = $_[0];
} elsif ($pppsettings{'TYPE'} eq 'eagleusbadsl') {
$speed = `/usr/sbin/eaglestat | /bin/grep Rate`;
}
- $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connected'} (<span class='ipcop_StatusBigRed'>$timestr</span>) $profileused (\@$speed)</span>";
+ $connstate = "$Lang::tr{'connected'} ($timestr) $profileused (\@$speed)";
} else {
- $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connected'} (<span class='ipcop_StatusBigRed'>$timestr</span>) $profileused</span>";
+ $connstate = "$Lang::tr{'connected'} ($timestr) $profileused";
}
} else {
if (-e "${General::swroot}/red/dial-on-demand") {
- $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'dod waiting'} $profileused</span>";
+ $connstate = "$Lang::tr{'dod waiting'} $profileused";
} else {
- $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'connecting'} $profileused</span>";
+ $connstate = "$Lang::tr{'connecting'} $profileused";
}
}
} else {
- $connstate = "<span class='ipcop_StatusBig'>$Lang::tr{'idle'} $profileused</span>";
+ $connstate = "$Lang::tr{'idle'} $profileused";
}
return $connstate;
}
<td width='25%' align='center'><a href='$ENV{'SCRIPT_NAME'}?IPADDR'><b>$tr{'ip address'}</b></a></td>
<td width='25%' align='center'><a href='$ENV{'SCRIPT_NAME'}?ETHER'><b>$tr{'mac address'}</b></a></td>
<td width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?HOSTNAME'><b>$tr{'hostname'}</b></a></td>
-<td width='30%' align='center'><a href='$ENV{'SCRIPT_NAME'}?ENDTIME'><b>$tr{'lease expires'} (local time d/m/y)</b></a></td>
+<td width='25%' align='center'><a href='$ENV{'SCRIPT_NAME'}?ENDTIME'><b>$tr{'lease expires'} (local time d/m/y)</b></a></td>
+<td width='5%' align='center'><b>Add to fix leases<b></td>
</tr>
END
;
my $id = 0;
foreach my $key (sort leasesort keys %entries) {
-
+ print "<form method='post' action='/cgi-bin/dhcp.cgi'>\n";
my $hostname = &cleanhtml($entries{$key}->{HOSTNAME},"y");
if ($id % 2) {
}
print <<END
-<td align='center'>$entries{$key}->{IPADDR}</td>
-<td align='center'>$entries{$key}->{ETHER}</td>
-<td align='center'> $hostname </td>
-<td align='center'>
+<td align='center'><input type='hidden' name='FIX_ADDR' value='$entries{$key}->{IPADDR}' />$entries{$key}->{IPADDR}</td>
+<td align='center'><input type='hidden' name='FIX_MAC' value='$entries{$key}->{ETHER}' />$entries{$key}->{ETHER}</td>
+<td align='center'><input type='hidden' name='FIX_REMARK' value='$hostname' /> $hostname</td>
+<td align='center'><input type='hidden' name='FIX_ENABLED' value='on' />
END
;
} else {
print "$enddate";
}
- print "</td></tr>";
+ print <<END
+<td><input type='hidden' name='ACTION' value='$Lang::tr{'add'}2' /><input type='submit' name='SUBMIT' value='$Lang::tr{'add'}' />
+</td></td></tr></form>
+END
+ ;
$id++;
}