function build_listado_cantos()
{
    // Grid de cantos
    global $ins, $dic, $Path;
    $searchbox = $ins['searchbox'] ? $ins['searchbox'] : false;
    $sqlData = select_cantos(array(searchbox => $searchbox));
    $y = 0;
    if ($sqlData) {
        foreach ($sqlData as $row) {
            $seccion = 'cantos';
            $id = $row[id_canto];
            $valor = $row[canto];
            $tblData[$y] = $row;
            unset($tblData[$y][combo]);
            $tblData[$y][canto] = '<span class="editar campo-editable" data-name="canto" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $valor . '</span> <span id="frm-msj_' . $id . '"></span>';
            $tblData[$y][alias] = '<span class="editar campo-editable" data-name="alias" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[alias];
            $tblData[$y][autor] = '<span class="editar campo-editable" data-name="autor" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[autor];
            $tblData[$y][interprete] = '<span class="editar campo-editable" data-name="interprete" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[interprete];
            $tblData[$y][anio] = '<span class="editar campo-editable" data-name="anio" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[anio];
            $tblData[$y][pista] = '<span class="editar campo-editable" data-name="num_pista" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[pista];
            $tblData[$y][portada] = '<span style="text-align:center; vertical-align:middle;">' . '<img class="img-zoom" src="' . $Path[coversurl] . $row[portada] . '" data-zoom-image="' . $Path[coversurl] . $row[portada] . '" width="50%"/></span>';
            $tblData[$y][acciones] = ico_editar('ico-editar_' . $row[id_canto], 'editar_canto(' . $row[id_canto] . ');') . '  ' . ico_eliminar($id, "activate('frm-captura-" . $seccion . "','" . $seccion . "'," . $id . ');');
            $y++;
        }
    }
    return build_grid_paginado($tblData, $titulos);
}
示例#2
0
function dropdown_cantos($data = array())
{
    global $dic;
    $requerido = $data[requerido] ? true : false;
    $name = $data[name] ? $data[name] : 'lts_cantos';
    $value = $data[value] ? $data[value] : 'id_canto';
    $text = $data[text] ? $data[text] : 'canto';
    $lst_data = select_cantos();
    $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_cantos], 'leyenda' => $data[leyenda]);
    return drop_down_select($dataDropdown);
}