2008-11-05 13:57:44 +00:00
|
|
|
<?php
|
|
|
|
|
2010-06-21 04:18:06 +00:00
|
|
|
if($_GET['debug']) {
|
|
|
|
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("../includes/defaults.inc.php");
|
|
|
|
include("../config.php");
|
|
|
|
include("../includes/common.php");
|
|
|
|
include("../includes/rewrites.php");
|
|
|
|
include("includes/authenticate.inc.php");
|
|
|
|
|
|
|
|
|
2009-03-11 14:50:24 +00:00
|
|
|
if(!$_SESSION['authenticated']) { echo("unauthenticated"); exit; }
|
2008-11-05 13:57:44 +00:00
|
|
|
|
|
|
|
if(isset($_GET['device_id'])){
|
|
|
|
|
2010-02-20 17:22:22 +00:00
|
|
|
$ports = mysql_query("SELECT * FROM ports WHERE device_id = '".$_GET['device_id']."'");
|
|
|
|
while($interface = mysql_fetch_array($ports)) {
|
2008-11-05 13:57:44 +00:00
|
|
|
echo "obj.options[obj.options.length] = new Option('".$interface['ifDescr']." - ".$interface['ifAlias']."','".$interface['interface_id']."');\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|