librenms/html/ajax/list_interfaces.php
Adam Amstrong 9a8c885adf interface lister
git-svn-id: http://www.observium.org/svn/observer/trunk@361 61d68cd4-352d-0410-923a-c4978735b2b8
2009-03-20 13:27:21 +00:00

17 lines
545 B
PHP
Executable File

<?php
include("../../config.php");
include("../../includes/functions.php");
include("../includes/authenticate.inc");
if(!$_SESSION['authenticated']) { echo("unauthenticated"); exit; }
if(isset($_GET['device_id'])){
$interfaces = mysql_query("SELECT * FROM interfaces WHERE device_id = '".$_GET['device_id']."'");
while($interface = mysql_fetch_array($interfaces)) {
echo "obj.options[obj.options.length] = new Option('".$interface['ifDescr']." - ".$interface['ifAlias']."','".$interface['interface_id']."');\n";
}
}
?>