Пример #1
0
            $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) {
                if ($cv['free'] > 0) {
Пример #2
0
/**
 * 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;
}