git-svn-id: http://www.observium.org/svn/observer/trunk@285 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-11-05 13:57:44 +00:00
parent 19d87a8913
commit d6bb87e7fd
2 changed files with 21 additions and 1 deletions

20
html/list_interfaces.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
include("../config.php");
include("../includes/functions.php");
include("includes/authenticate.inc");
# ini_set('display_errors', 1);
# ini_set('display_startup_errors', 1);
# ini_set('log_errors', 1);
# ini_set('error_reporting', E_ALL);
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";
}
}
?>

View File

@@ -12,7 +12,7 @@ function getInterfaceList(sel)
var index = ajax.length;
ajax[index] = new sack();
ajax[index].requestFile = 'test_interfaces.php?device_id='+deviceId; // Specifying which file to get
ajax[index].requestFile = 'list_interfaces.php?device_id='+deviceId; // Specifying which file to get
ajax[index].onCompletion = function(){ createInterfaces(index) }; // Specify function that will be executed after file has been found
ajax[index].runAJAX(); // Execute AJAX function
}