diff options
-rw-r--r-- | etc/inc/authgui.inc | 10 | ||||
-rwxr-xr-x | usr/local/www/guiconfig.inc | 12 |
2 files changed, 15 insertions, 7 deletions
diff --git a/etc/inc/authgui.inc b/etc/inc/authgui.inc index 56e6f4c..b78a6ca 100644 --- a/etc/inc/authgui.inc +++ b/etc/inc/authgui.inc @@ -221,8 +221,12 @@ if($config['virtualip']) </head> <body onload="page_load()"> <div id="login"> - <?php if(is_ipaddr($http_host) && !$local_ip) - print_info_box(gettext("You are accessing this router by an IP address not configured locally, which may be forwarded by NAT or other means. <br/><br/>If you did not setup this forwarding, you may be the target of a man-in-the-middle attack.")); ?> + <?php + if(is_ipaddr($http_host) && !$local_ip) { + $nifty_background = "#999"; + print_info_box(gettext("You are accessing this router by an IP address not configured locally, which may be forwarded by NAT or other means. <br/><br/>If you did not setup this forwarding, you may be the target of a man-in-the-middle attack.")); + } + ?> <form id="iform" name="login_iform" method="post" autocomplete="off" action="<?=$_SERVER['SCRIPT_NAME'];?>"> <h1></h1> <div id="inputerrors"><?=$_SESSION['Login_Error'];?></div> @@ -257,4 +261,4 @@ if($config['virtualip']) <?php } // end function -?> +?>
\ No newline at end of file diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index e27b78b..8680c97 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -278,8 +278,12 @@ function verify_gzip_file($fname) { } function print_info_box_np($msg, $name="apply",$value="Apply changes") { - global $g; - + global $g, $nifty_redbox, $nifty_blackbox, $nifty_background; + + // Set the Nifty background color if one is not set already (defaults to white) + if(!$nifty_background) + $nifty_background = "#FFF"; + if(stristr($msg, "apply") != false || stristr($msg, "save") != false || stristr($msg, "create") != false) { $savebutton = "<td class='infoboxsave'>"; $savebutton .= "<input name=\"{$name}\" type=\"submit\" class=\"formbtn\" id=\"${name}\" value=\"{$value}\">"; @@ -331,8 +335,8 @@ function print_info_box_np($msg, $name="apply",$value="Apply changes") { </table> <script type="text/javascript"> NiftyCheck(); - Rounded("div#redbox","all","#FFF","{$nifty_redbox}","smooth"); - Rounded("td#blackbox","all","#FFF","{$nifty_blackbox}","smooth"); + Rounded("div#redbox","all","#{$nifty_background}","{$nifty_redbox}","smooth"); + Rounded("td#blackbox","all","#{$nifty_background}","{$nifty_blackbox}","smooth"); </script> EOFnp; |