Ejemplo n.º 1
0
function renderPatchCableOIFCompatEditor()
{
    echo '<br>';
    renderTwoColumnCompatTableEditor(getPatchCableOIFCompat(), array('header' => 'Cable type', 'key' => 'pctype_id', 'value' => 'pctype', 'width' => 64, 'options' => getPatchCableTypeOptions()), array('header' => 'Outer interface', 'key' => 'oif_id', 'value' => 'oif_name', 'width' => 48, 'options' => getPortOIFOptions()));
    echo '<br>';
}
function renderIIFOIFCompatEditor()
{
    startPortlet('WDM standard by interface');
    $iif = getPortIIFOptions();
    global $nextorder, $wdm_packs;
    $order = 'odd';
    echo '<table border=0 align=center cellspacing=0 cellpadding=5>';
    foreach ($wdm_packs as $codename => $packinfo) {
        echo "<tr><th>&nbsp;</th><th colspan=2>{$packinfo['title']}</th></tr>";
        foreach ($packinfo['iif_ids'] as $iif_id) {
            echo "<tr class=row_{$order}><th class=tdleft>" . $iif[$iif_id] . '</th><td>';
            echo getOpLink(array('op' => 'addPack', 'standard' => $codename, 'iif_id' => $iif_id), '', 'add');
            echo '</td><td>';
            echo getOpLink(array('op' => 'delPack', 'standard' => $codename, 'iif_id' => $iif_id), '', 'delete');
            echo '</td></tr>';
            $order = $nextorder[$order];
        }
    }
    echo '</table>';
    finishPortlet();
    startPortlet('interface by interface');
    renderTwoColumnCompatTableEditor(getPortInterfaceCompat(), array('header' => 'inner interface', 'key' => 'iif_id', 'value' => 'iif_name', 'width' => 16, 'options' => getPortIIFOptions()), array('header' => 'outer interface', 'key' => 'oif_id', 'value' => 'oif_name', 'width' => 48, 'options' => getPortOIFOptions()));
    finishPortlet();
}