/** * Returns a list of values, a human readable name and options * for the selecttag for a given realm. */ function get_realm_data($realm) { $name = NULL; $list = array(); $options = array(); switch ($realm) { case 'object': $name = 'Load balancer'; $list = getNarrowObjectList('IPV4LB_LISTSRC'); $options = array('name' => 'object_id'); break; case 'ipv4vs': $name = 'Virtual service'; $list = formatEntityList(listCells('ipv4vs')); $options = array('name' => 'vs_id'); break; case 'ipv4rspool': $name = 'RS pool'; $list = formatEntityList(listCells('ipv4rspool')); $options = array('name' => 'pool_id'); break; default: throw new InvalidArgException('realm', $realm); } return array('name' => $name, 'list' => $list, 'options' => $options); }
/** * Returns a list of values, a human readable name and options * for the selecttag for a given realm. */ function get_realm_data($realm) { $name = NULL; $list = array(); $options = array(); switch ($realm) { case 'object': $name = 'Load balancer'; $list = getNarrowObjectList('IPV4LB_LISTSRC'); $options = array('name' => 'object_id', 'tabindex' => 100); break; case 'ipv4vs': $name = 'Virtual service'; $list = getIPv4VSOptions(); $options = array('name' => 'vs_id', 'tabindex' => 101); break; case 'ipv4rspool': $name = 'RS pool'; $list = getIPv4RSPoolOptions(); $options = array('name' => 'pool_id', 'tabindex' => 102); break; default: throw new InvalidArgException('realm', $realm); } return array('name' => $name, 'list' => $list, 'options' => $options); }
function renderGlobalLogEditor() { echo "<table with='80%' align=center border=0 cellpadding=5 cellspacing=0 align=center class=cooltable><tr valign=top>"; printOpFormIntro('add'); echo '<th align=left>Name: ' . getSelect(getNarrowObjectList(), array('name' => 'object_id')) . '</th>'; echo "<tr><td align=left><table with=100% border=0 cellpadding=0 cellspacing=0><tr><td colspan=2><textarea name=logentry rows=3 cols=80></textarea></td></tr>"; echo '<tr><td align=left></td><td align=right>' . getImageHREF('CREATE', 'add record', TRUE) . '</td>'; echo '</tr></table></td></tr>'; echo '</form>'; echo '</table>'; }