function dropdown_artistas($data = array()) { global $dic; $requerido = $data[requerido] ? true : false; $name = $data[name] ? $data[name] : 'lts_artistas'; $value = $data[value] ? $data[value] : 'id_artista'; $text = $data[text] ? $data[text] : 'combo'; $lst_data = select_artistas(); $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_artistas], 'leyenda' => $data[leyenda]); return drop_down_select($dataDropdown); }
function build_listado_artistas() { // Grid de artistas global $ins; $searchbox = $ins['searchbox'] ? $ins['searchbox'] : false; $sqlData = select_artistas($searchbox); $y = 0; if ($sqlData) { foreach ($sqlData as $row) { $seccion = 'artistas'; $id = $row[id_artista]; $valor = $row[artista]; $tblData[$y] = $row; unset($tblData[$y][combo]); $tblData[$y][artista] = '<span class="editar campo-editable" data-name="artista" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $valor . '</span> <span id="frm-msj_' . $id . '"></span>'; $tblData[$y][iglesia] = '<span class="editar campo-editable" data-name="iglesia" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[iglesia]; $tblData[$y][ministerio] = '<span class="editar campo-editable" data-name="ministerio" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[ministerio]; $tblData[$y][pais] = '<span class="editar campo-editable" data-name="pais" data-pk="' . $id . '" data-title="' . $dic[ico][editar] . '" title="' . $dic[ico][editar] . '">' . $row[pais]; $tblData[$y][quitar] = ico_eliminar($id, "activate('frm-captura-" . $seccion . "','" . $seccion . "'," . $id . ');'); $y++; } } return build_grid_paginado($tblData, $titulos); }