<tr> <td class="noborder" style="padding-top:10px"> <?php echo _("Selected ports for the group"); ?> : </td> </tr> <tr> <td class="noborder"> <select id="selected_ports" name="act_ports[]" class='vfield' multiple="multiple"> <?php if (is_array($actives_ports)) { $actives_ports = Port_group::group_ports($actives_ports); foreach ($actives_ports as $v) { echo "<option value='{$v}' selected='selected'>{$v}</option>"; } } ?> </select> </td> </tr> <tr> <td class="noborder"> <div id='c_action_ports'> <input type="button" value=" [X] " onclick="deletefrom('selected_ports');" class="small av_b_secondary"/> <input type="button" value="<?php echo _('Delete all'); ?>
} else { $total = 0; } $xml .= "<rows>\n"; $xml .= "<page>{$page}</page>\n"; $xml .= "<total>{$total}</total>\n"; foreach ($port_list as $port_group) { $name = $port_group->get_name(); $id = $port_group->get_id(); $xml .= "<row id='" . $id . "'>"; $link_modify = "<a style='font-weight:bold;' href=\"./newportgroupform.php?id=" . $id . "\">" . Util::htmlentities($name) . "</a>"; $xml .= "<cell><![CDATA[" . $link_modify . "]]></cell>"; $ports = array(); foreach ($port_group->get_reference_ports($conn, $id) as $port) { $ports[] = $port->get_port_number() . "-" . $port->get_protocol_name(); } $ports = Port_group::group_ports($ports); $xml .= "<cell><![CDATA[" . implode(', ', $ports) . "]]></cell>"; if (Session::show_entities()) { $xml .= "<cell><![CDATA[" . Session::get_entity_name($conn, $port_group->get_ctx()) . "]]></cell>"; } $desc = $port_group->get_descr(); if ($desc == "") { $desc = " "; } $xml .= "<cell><![CDATA[" . utf8_encode($desc) . "]]></cell>"; $xml .= "</row>\n"; } $xml .= "</rows>\n"; echo $xml; $db->close();