authentication check on the map file now

git-svn-id: http://www.observium.org/svn/observer/trunk@641 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-01-09 18:28:02 +00:00
parent 73708aeb58
commit ebd8fb0cf4
+8 -1
View File
@@ -2,8 +2,8 @@
include("../config.php"); include("../config.php");
include("../includes/functions.php"); include("../includes/functions.php");
include("includes/authenticate.inc");
#FIXME no auth on thie file??
if ($_GET['device']) { $where = "WHERE device_id = ".$_GET['device']; } else { $where = ""; } if ($_GET['device']) { $where = "WHERE device_id = ".$_GET['device']; } else { $where = ""; }
$deviceresult = mysql_query("SELECT * from devices $where"); $deviceresult = mysql_query("SELECT * from devices $where");
@@ -17,6 +17,12 @@ if (preg_match("/^[a-z]*$/", $_GET['format']))
"; ";
if(!$_SESSION['authenticated'])
{
$map .= "\"Not authenticated\" [fontsize=20 fillcolor=\"lightblue\" URL=\"/\" shape=box3d]\n";
}
else
{
while ($device = mysql_fetch_array($deviceresult)) while ($device = mysql_fetch_array($deviceresult))
{ {
if($device) if($device)
@@ -84,6 +90,7 @@ if (preg_match("/^[a-z]*$/", $_GET['format']))
$done = 0; $done = 0;
} }
} }
}
$map .= " $map .= "
};"; };";