#!/bin/sh . /www/cgi-bin/functions.sh lock_cgiwait upnp_onoff=$($nvram get upnp_enable) AdverTime=$($nvram get upnp_AdverTime) TimeToLive=$($nvram get upnp_TimeToLive) #killall -17 upnp upnp_portmap=$( [ -f /var/upnp_portmap ] && cat /var/upnp_portmap | sed -e 's/\\/\\\\/g' -e 's/\"/\\\"/g') upnp_portmap=`echo -n $upnp_portmap` print_cgi_header print_http_header "/funcs.js" "/upnp.js" print_body_header "_upnp" "upnp.html" "upnp" print_table_header "" cat < function loadvalue() { var cf=document.forms[0]; if('$upnp_onoff' == "1") cf.UPnP.checked =true; else cf.UPnP.checked =false; click_upnp('$AdverTime','$TimeToLive'); } EOF print_http_footer