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);
|
2010-06-21 04:18:06 +00:00
|
|
|
}
|
|
|
|
|
2010-11-20 14:04:07 +00:00
|
|
|
include("../includes/defaults.inc.php");
|
|
|
|
include("../config.php");
|
|
|
|
include("includes/functions.inc.php");
|
|
|
|
include("../includes/common.php");
|
|
|
|
include("../includes/rewrites.php");
|
|
|
|
include("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-03-23 09:54:56 +00:00
|
|
|
$ports = mysql_query("SELECT * FROM ports WHERE device_id = '".$_GET['device_id']."'");
|
2011-04-06 13:54:50 +00:00
|
|
|
while ($interface = mysql_fetch_assoc($ports))
|
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
|
|
|
?>
|