Updated the use of REMOTE_ADDR to a function then replaced its use

This commit is contained in:
laf
2015-03-18 19:14:51 +00:00
parent c667363d54
commit 791fa19a88
4 changed files with 16 additions and 7 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ include("../includes/functions.php");
include("includes/functions.inc.php");
include("includes/authenticate.inc.php");
if ($_SERVER['REMOTE_ADDR'] != $_SERVER['SERVER_ADDR']) { if (!$_SESSION['authenticated']) { echo("unauthenticated"); exit; } }
if (get_client_ip() != $_SERVER['SERVER_ADDR']) { if (!$_SESSION['authenticated']) { echo("unauthenticated"); exit; } }
require_once("includes/jpgraph/src/jpgraph.php");
require_once("includes/jpgraph/src/jpgraph_line.php");
require_once("includes/jpgraph/src/jpgraph_bar.php");
@@ -46,7 +46,7 @@ require_once("includes/jpgraph/src/jpgraph_date.php");
if (is_numeric($_GET['bill_id']))
{
if ($_SERVER['REMOTE_ADDR'] != $_SERVER['SERVER_ADDR'])
if (get_client_ip() != $_SERVER['SERVER_ADDR'])
{
if (bill_permitted($_GET['bill_id']))
{