/** * Return an HTML code containing form fields to filter data * @param $dcn_id (int) Datacenter ID. * @param $sts_id (int) Suite ID. * @param $rck_id (int) Rack ID. * @param $obt_id (int) Object ID. * @param $obj_owner_id (int) Owner ID. * @param $obj_tenant_id (int) Tenant ID. * @param $keywords (string) Keywords. * @return html code */ function F_getDataFilter($dcn_id = 0, $sts_id = 0, $rck_id = 0, $obt_id = 0, $obj_owner_id = 0, $obj_tenant_id = 0, $keywords = 0) { global $l, $db; require_once '../config/tce_config.php'; require_once 'tce_functions_user_select.php'; $out = ''; $out .= '<fieldset class="subset" style="text-align:left;">' . K_NEWLINE; $out .= '<legend>' . $l['w_selection filter'] . '</legend>' . K_NEWLINE; $out .= F_select_datacenter($dcn_id, $datacenter_data, true); $out .= F_select_suite($dcn_id, $sts_id, $suite_data, true); $out .= F_select_rack($dcn_id, $sts_id, $rck_id, $rack_data, $rack_pos, $rack_name, true); $out .= F_select_object_type($obt_id, true); $out .= F_get_user_selectbox($l['w_owner'], $obj_owner_id, 'obj_owner_id'); $out .= F_get_user_selectbox($l['w_tenant'], $obj_tenant_id, 'obj_tenant_id'); $out .= getFormRowTextInput('keywords', $l['w_keywords'], $l['w_search_keywords'], '', $keywords, '', 255, false, false, false, ''); // generate button $out .= '<div class="row">'; $out .= '<input type="submit" name="filter" id="filter" value="' . $l['w_filter'] . '" title="' . $l['h_filter_objects'] . '" />'; $out .= '</div>' . K_NEWLINE; $out .= '</fieldset>' . K_NEWLINE; return $out; }
} else { $sts_id = 0; $rck_id = 0; } } } else { $dcn_id = 0; $sts_id = 0; $rck_id = 0; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - echo '<div class="container">' . K_NEWLINE; echo '<div class="tceformbox">' . K_NEWLINE; echo '<form action="' . $_SERVER['SCRIPT_NAME'] . '" method="post" enctype="multipart/form-data" id="form_editor">' . K_NEWLINE; echo F_select_datacenter($dcn_id); echo F_select_suite($dcn_id, $sts_id, $suite_data); echo F_select_rack($dcn_id, $sts_id, $rck_id, $rack_data, $rack_pos, $rack_name); echo '<div class="row" style="margin-bottom:10px;"><hr /></div>' . K_NEWLINE; // *** MAP OF OBJECTS ON SELECTED RACK if (isset($rack_data)) { $rackobjs = '<div class="row">' . K_NEWLINE; $rackobjs .= getRackStack($dcn_id, $sts_id, $rck_id, $rack_data); $rackobjs .= '</div>' . K_NEWLINE; echo $rackobjs; // create guest and capacity list $guestlist = ''; $capacitylist = ''; foreach ($rack_data['rackstack'] as $rckobj) { // capacity (report free ports) if (isset($rckobj['capacity']) and !empty($rckobj['capacity'])) { foreach ($rckobj['capacity'] as $ck => $cv) {
$rck_description = ''; $rck_label = ''; $rck_tag = ''; $rck_height = 42; } } else { F_display_db_error(); } } } } echo '<div class="container">' . K_NEWLINE; echo '<div class="tceformbox">' . K_NEWLINE; echo '<form action="' . $_SERVER['SCRIPT_NAME'] . '" method="post" enctype="multipart/form-data" id="form_editor">' . K_NEWLINE; echo F_select_datacenter($dcn_id, $datacenter_data, false); echo F_select_suite($dcn_id, $sts_id, $suite_data, false); echo F_select_rack($dcn_id, $sts_id, $rck_id, $rack_data, $rack_pos, $rack_name, true); echo '<div class="row"><hr /></div>' . K_NEWLINE; echo getFormRowTextInput('rck_name', $l['w_name'], $l['h_rack_name'], '', $rck_name, '', 255, false, false, false, ''); echo getFormRowTextBox('rck_description', $l['w_description'], $l['h_rack_description'], $rck_description, false, ''); echo getFormRowTextInput('rck_label', $l['w_label'], $l['h_rack_label'], '', $rck_label, '', 255, false, false, false, ''); echo getFormRowTextInput('rck_tag', $l['w_tag'], $l['h_rack_tag'], '', $rck_tag, '', 255, false, false, false, ''); echo getFormRowTextInput('rck_height', $l['w_height'], $l['h_rack_height'], '', $rck_height, '', 255, false, false, false, ''); echo getFormRowTextInput('rck_position_x', $l['w_position_x'], $l['h_rack_pos_x'], '', $rck_position_x, '', 255, false, false, false, ''); echo getFormRowTextInput('rck_position_y', $l['w_position_y'], $l['h_rack_pos_y'], '', $rck_position_y, '', 255, false, false, false, ''); // ----------------------------------------------------------------------------- // group permissions echo '<fieldset class="subset" style="text-align:left;">' . K_NEWLINE; echo '<legend>' . $l['t_permissions'] . '</legend>' . K_NEWLINE; echo F_groupsPermsSelector($perms, false); echo '</fieldset>' . K_NEWLINE;