2008-11-05 13:57:44 +00:00
|
|
|
<?php
|
|
|
|
|
2012-05-09 10:01:42 +00:00
|
|
|
/**
|
2013-10-29 05:38:12 +10:00
|
|
|
* Observium
|
2012-05-09 10:01:42 +00:00
|
|
|
*
|
2013-10-29 05:38:12 +10:00
|
|
|
* This file is part of Observium.
|
2012-05-09 10:01:42 +00:00
|
|
|
*
|
2013-10-29 05:38:12 +10:00
|
|
|
* @package observium
|
|
|
|
* @subpackage ajax
|
|
|
|
* @author Adam Armstrong <adama@memetic.org>
|
|
|
|
* @copyright (C) 2006 - 2012 Adam Armstrong
|
2012-05-09 10:01:42 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2013-12-08 10:52:18 +00:00
|
|
|
if (isset($_GET['debug']))
|
2011-03-17 11:48:03 +00:00
|
|
|
{
|
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);
|
2010-06-21 04:18:06 +00:00
|
|
|
}
|
|
|
|
|
2011-05-12 22:14:56 +00:00
|
|
|
include_once("../includes/defaults.inc.php");
|
|
|
|
include_once("../config.php");
|
2012-05-09 10:01:42 +00:00
|
|
|
include_once("../includes/definitions.inc.php");
|
2011-05-12 22:14:56 +00:00
|
|
|
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");
|
2010-06-21 04:18:06 +00:00
|
|
|
|
2010-11-20 14:04:07 +00:00
|
|
|
if (!$_SESSION['authenticated']) { echo("unauthenticated"); exit; }
|
2008-11-05 13:57:44 +00:00
|
|
|
|
2010-11-20 14:04:07 +00:00
|
|
|
if (is_numeric($_GET['device_id']))
|
|
|
|
{
|
2011-05-12 22:14:56 +00:00
|
|
|
foreach (dbFetch("SELECT * FROM ports WHERE device_id = ?", array($_GET['device_id'])) as $interface)
|
2011-03-23 09:54:56 +00:00
|
|
|
{
|
2011-07-15 11:01:13 +00:00
|
|
|
$string = mres($interface['ifDescr']." - ".$interface['ifAlias']);
|
2012-05-16 13:25:50 +00:00
|
|
|
echo("obj.options[obj.options.length] = new Option('".$string."','".$interface['port_id']."');\n");
|
|
|
|
#echo("obj.options[obj.options.length] = new Option('".$interface['ifDescr']." - ".$interface['ifAlias']."','".$interface['port_id']."');\n");
|
2011-03-23 09:54:56 +00:00
|
|
|
}
|
2008-11-05 13:57:44 +00:00
|
|
|
}
|
|
|
|
|
2011-03-22 20:27:39 +00:00
|
|
|
?>
|