517 |
* |
* |
518 |
*/ |
*/ |
519 |
|
|
520 |
function create_link($interface_1, $interface_2) { |
function create_link($interface_1, $interface_2, $class, $bandwidth) { |
521 |
|
|
522 |
// create DB class |
// create DB class |
523 |
$loc_db = new locDatabase; |
$loc_db = new locDatabase; |
524 |
|
|
525 |
// build the SQL statement to insert the link into the DB |
// build the SQL statement to insert the link into the DB |
526 |
$sql = "INSERT INTO links(interface_1, interface_2) VALUES('$interface_1', '$interface_2')"; |
$sql = "INSERT INTO links(interface_1, interface_2, class, bandwidth) VALUES('$interface_1', '$interface_2', '$class', $bandwidth)"; |
527 |
|
|
528 |
$loc_db->query( $sql ); |
$loc_db->query( $sql ); |
529 |
|
|