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

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("includes/jpgraph/src/jpgraph.php");
include("includes/jpgraph/src/jpgraph_line.php");
include("includes/jpgraph/src/jpgraph_utils.inc.php");
@@ -45,7 +45,7 @@ include("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']))
{