Files
librenms-librenms/html/ajax_listports.php
T

32 lines
872 B
PHP
Raw Normal View History

2008-11-05 13:57:44 +00:00
<?php
2011-03-17 11:48:03 +00:00
if ($_GET['debug'])
{
2011-03-23 09:54:56 +00:00
ini_set('display_errors', 1);
ini_set('display_startup_errors', 0);
ini_set('log_errors', 0);
ini_set('allow_url_fopen', 0);
ini_set('error_reporting', E_ALL);
}
include_once("../includes/defaults.inc.php");
include_once("../config.php");
include_once("includes/functions.inc.php");
include_once("../includes/dbFacile.php");
include_once("../includes/common.php");
include_once("../includes/rewrites.php");
include_once("includes/authenticate.inc.php");
if (!$_SESSION['authenticated']) { echo("unauthenticated"); exit; }
2008-11-05 13:57:44 +00:00
if (is_numeric($_GET['device_id']))
{
foreach (dbFetch("SELECT * FROM ports WHERE device_id = ?", array($_GET['device_id'])) as $interface)
2011-03-23 09:54:56 +00:00
{
echo("obj.options[obj.options.length] = new Option('".$interface['ifDescr']." - ".$interface['ifAlias']."','".$interface['interface_id']."');\n");
}
2008-11-05 13:57:44 +00:00
}
2011-03-22 20:27:39 +00:00
?>