function linkmgmt_opunlinkPort() { $port_id = $_REQUEST['port_id']; $linktype = $_REQUEST['linktype']; portlist::var_dump_html($_REQUEST); /* check permissions */ if (!permitted(NULL, NULL, 'set_link')) { exit; } if ($linktype == 'back') { $table = 'LinkBackend'; $remote_id = $_REQUEST['remote_id']; $retval = usePreparedExecuteBlade("DELETE FROM {$table} WHERE ( porta = ? and portb = ?) or (portb = ? and porta = ?)", array($port_id, $remote_id, $port_id, $remote_id)); } else { $table = 'Link'; $retval = usePreparedDeleteBlade($table, array('porta' => $port_id, 'portb' => $port_id), 'OR'); } if ($retval == 0) { echo " Link not found"; } else { echo " {$retval} Links deleted"; } unset($_GET['module']); unset($_GET['op']); header('Location: ?' . http_build_query($_GET)); //header('Location: ?page='.$_REQUEST['page'].'&tab='.$_REQUEST['tab'].'&object_id='.$_REQUEST['object_id']); exit; }