#!/bin/sh
. /www/cgi-bin/functions.sh
lock_cgiwait
totalnum=$($nvram get port_forwarding_num)
endis_remote=$($nvram get remote_endis)
remote_port=$($nvram get remote_port)
lan_get_ip=$($nvram get lan_ipaddr)
lan_get_netmask=$($nvram get lan_netmask)
forward_totalnum=$($nvram get port_forwarding_num)
trigger_totalnum=$($nvram get port_trigger_num)
#killall -17 upnp
upnp_totalnum=$( [ -f /tmp/upnp_portmap ] && cat /tmp/upnp_portmap | wc -l || echo 0)
info_get_wanproto=$($nvram get wan_proto)
endis_ntp=$($nvram get endis_ntp)
endis_upnp=$($nvram get upnp_enable)
print_cgi_header
print_http_header "/funcs.js" "/forwarding.js"
print_noload_header "_FW_forward" "forwarding.html" "forwarding_add"
print_table_header ""
echo ""
cat <
(1~65534)
(1~65534)
.
.
.
EOF
print_http_footer