function build_listado_escalas()
{
    // Grid de escalas
    global $ins, $dic;
    $searchbox = $ins['searchbox'] ? $ins['searchbox'] : false;
    $sqlData = select_escalas($searchbox);
    $y = 0;
    if ($sqlData) {
        foreach ($sqlData as $row) {
            $seccion = 'escalas';
            $id = $row[id_escala];
            $valor = $row[escala];
            $tblData[$y] = $row;
            unset($tblData[$y][combo]);
            $tblData[$y][escala] = '<span class="editar campo-editable" data-name="escala" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[escala] . '</span> <span id="frm-msj_' . $id . '"></span>';
            $tblData[$y][categoria] = '<span class="editar campo-editable" data-name="categoria" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[categoria];
            $tblData[$y][grado1] = '<span class="editar campo-editable" data-name="grado1" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[grado1];
            $tblData[$y][grado2] = '<span class="editar campo-editable" data-name="grado2" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[grado2];
            $tblData[$y][grado3] = '<span class="editar campo-editable" data-name="grado3" data-name="escala" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[grado3];
            $tblData[$y][grado4] = '<span class="editar campo-editable" data-name="grado4" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[grado4];
            $tblData[$y][grado5] = '<span class="editar campo-editable" data-name="grado5" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[grado5];
            $tblData[$y][grado6] = '<span class="editar campo-editable" data-name="grado6" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[grado6];
            $tblData[$y][grado7] = '<span class="editar campo-editable" data-name="grado7" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[grado7];
            $tblData[$y][armadura] = '<span class="editar campo-editable" data-name="armadura" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[armadura];
            $tblData[$y][quitar] = ico_eliminar($id, "activate('frm-captura-" . $seccion . "','" . $seccion . "'," . $id . ');');
            $y++;
        }
    }
    return build_grid_paginado($tblData, $titulos);
}
示例#2
0
function dropdown_escalas($data = array())
{
    global $dic;
    $requerido = $data[requerido] ? true : false;
    $name = $data[name] ? $data[name] : 'lts_escalas';
    $value = $data[value] ? $data[value] : 'id_escala';
    $text = $data[text] ? $data[text] : 'escala';
    $lst_data = select_escalas();
    $dataDropdown = array('data' => $lst_data, 'name' => $name, 'value' => $value, 'text' => $text, 'requerido' => $requerido, 'class' => $data[clase], 'multiple' => $data[multiple], 'width' => '200', 'selected' => $data[id_selected], 'title' => $dic[tooltips][lst_escalas]);
    return drop_down_select($dataDropdown);
}