#!/bin/sh . /www/cgi-bin/functions.sh lock_cgiwait dns_hijack=$($nvram get dns_hijack) refresh_url=$($nvram get refresh_url) print_cgi_header print_http_header cat < var dns_hijack="$dns_hijack"; var refresh_url="$refresh_url"; var index_ts = 0; if(dns_hijack=="1") { if(refresh_url=="com") parent.location.href="http://www.mywifiext.com/cgi-bin/welcome.html"; else if(refresh_url=="net") parent.location.href="http://mywifiext.net/cgi-bin/welcome.html"; else if(refresh_url=="manual_ip") parent.location.href="http://www.mywifiext.net/cgi-bin/welcome.html"; else parent.location.href="welcome.html"; } else { if(refresh_url=="com") parent.location.href="http://www.mywifiext.com/cgi-bin/index.html"; else if(refresh_url=="net") parent.location.href="http://mywifiext.net/cgi-bin/index.html"; else if(refresh_url=="manual_ip") parent.location.href="http://www.mywifiext.net/cgi-bin/index.html"; else parent.location.href="index.html"; } EOF $($nvram set refresh_url="") print_http_footer