values['name'] ? $g_table = $this -> values['name'] : $g_table = $this -> values[ 'table' ]; ?>
values['multiselect'] ) echo ''; if ( is_array( $this -> values['columns_view'] ) ) { $c_index = 0; $visible_columns = 0; foreach ( $this -> values['columns_view'] as $column ) { if ( filter_var( $this -> values['hidden_columns'][$c_index], FILTER_VALIDATE_BOOLEAN ) === false or $this -> values['hidden_columns'][$c_index] === null ) { $column['sort'] ? $sort = 'g-sort' : $sort = ''; if ( $column['sort'] ) { $sort_data = 'data="sort-column:' . $column['db'] . ';sort-type:'; if ( $column['db'] == $this -> values['order']['column'] ) $sort_data .= $this -> values['order']['type']; else $sort_data .= 'DESC'; $sort_data .= '"'; } else $sort_data = ''; echo ''; $visible_columns++; } $c_index++; } } if ( $this -> values['actions']['edit'] ) { echo ''; $visible_columns++; } if ( $this -> values['actions']['delete'] ) { echo ''; $visible_columns++; } ?> values['search'] ) ) { $c_index = 0; echo ''; if ( is_array( $this -> values['columns_view'] ) ) foreach ( $this -> values['columns_view'] as $column ) { $search_found = false; if ( filter_var( $this -> values['hidden_columns'][$c_index], FILTER_VALIDATE_BOOLEAN ) === false or $this -> values['hidden_columns'][$c_index] === null ) { foreach ( $this -> values['search'] as $search ) { if ( !empty( $column['db'] ) and $search['db'] == $column['db'] ) { $search_found = true; if ( $search['type'] == 'text' ) { echo ''; } if ( $search['type'] == 'select' ) { echo ''; } if ( $search['type'] == 'date_range' ) { echo ''; } } } if ( !$search_found ) echo ''; } $c_index++; } echo ''; } ?> values['cp'] - 1 ) * $this -> values['limit']; $context = false; if ( is_array( $this -> values['results'] ) and !empty( $this -> values['results'] ) ) foreach ( $this -> values['results'] as $row ) { $columns = array(); if ( is_array( $this -> values['columns_view'] ) ) foreach ( $this -> values['columns_view'] as $column ) { $columns = array_merge( $columns, $_SESSION[ 'g' . $g_table ] -> getParams( $column['action']['url'] ) ); $columns = array_merge( $columns, $_SESSION[ 'g' . $g_table ] -> getParams( $column['action']['js'] ) ); } $columns = array_unique( $columns ); echo ' values['id'] . '="' . $row[ $this -> values['id'] ] . '" '; if ( is_array( $columns ) ) foreach ( $columns as $column ) echo $column . '="' . $row[ $column ] . '" '; echo '>'; if ( $this -> values['multiselect'] ) echo ''; $c_index = 0; if ( is_array( $this -> values['columns_view'] ) ) foreach ( $this -> values['columns_view'] as $column ) { if ( filter_var( $this -> values['hidden_columns'][$c_index], FILTER_VALIDATE_BOOLEAN ) === false or $this -> values['hidden_columns'][$c_index] === null ) { if ( $column['autoincrement'] ) echo ''; else { echo ''; } } $c_index++; } if ( $this -> values['actions']['edit'] ) echo ''; if ( $this -> values['actions']['delete'] ) echo ''; echo ''; } else echo ''; if ( is_array( $this -> values['summary'] ) ) { echo ''; if ( is_array( $this -> values['columns_view'] ) ) foreach ( $this -> values['columns_view'] as $column ) { echo ''; } echo ''; } ?>
' . '' . ''; if ( $column['db'] == $this -> values['order']['column'] && $column['sort'] ) { if ( $this -> values['order']['type'] == 'ASC' ) echo ''; if ( $this -> values['order']['type'] == 'DESC' ) echo ''; } if ( $column['sort'] and $column['db'] != $this -> values['order']['column'] ) echo ''; echo $column['name']; echo 'EdytujUsuń
' . '' . '' . '' . ''; echo '
' . '' . '' . '' . '' . '
'; echo '
' . '' . '' . ++$i . '. convertString( $column['td']['js'], $row ); echo 'onclick="' . htmlspecialchars( $out_js ) . '"'; } echo '>'; if ( $column['content'] ) echo $_SESSION[ 'g' . $g_table ] -> convertString( $column['content'], $row ); else { /* podmiana na wartości tablicy */ if ( is_array( $column['replace']['array'] ) ) echo $_SESSION[ 'g' . $g_table ] -> convertString( $column['replace']['array'][ $row[ $column['db'] ] ], $row ); else if ( $column['replace']['sql'] ) { $sql = $_SESSION[ 'g' . $g_table ] -> convertString( $column['replace']['sql'], $row ); $results = $_SESSION[ 'g' . $g_table ] -> connectToDb() -> query( $sql ) -> fetchAll(); if ( $results[0][0] != '' ) echo $results[0][0]; else echo '-'; } /* modyfikacja wyświetlania daty */ else if ( $column['date_mod'] ) { if ( grid::validateDate( $row[ $column['db'] ] ) ) echo date( $column['date_mod'], strtotime( $row[ $column['db'] ] ) ); else echo '-'; } /* wyświtalania linku typu button */ else if ( $column['action']['type'] == 'button' ) { if ( $column['action']['url'] ) $out_url = $_SESSION[ 'g' . $g_table ] -> convertString( $column['action']['url'], $row ); else $out_url = '#'; $out_js = $_SESSION[ 'g' . $g_table ] -> convertString( $column['action']['js'], $row ); if ( $column['action']['js'] ) $out_js = $_SESSION[ 'g' . $g_table ] -> convertString( $column['action']['js'], $row ); $column['button']['title'] ? $title = $column['button']['title'] : $title = $column['button']['label']; echo '' . $column['button']['label'] . ''; } /* wyświtalania linku do edycji */ else if ( $column['action']['type'] == 'edit' ) { $out_url = $_SESSION[ 'g' . $g_table ] -> convertString( $column['action']['url'], $row ); $out_js = $_SESSION[ 'g' . $g_table ] -> convertString( $column['action']['js'], $row ); echo ''; } /* wyświtalania linku do usuwania */ else if ( $column['action']['type'] == 'delete' ) { $out_url = $_SESSION[ 'g' . $g_table ] -> convertString( $column['action']['url'], $row ); $out_js = $_SESSION[ 'g' . $g_table ] -> convertString( $column['action']['js'], $row ); echo ''; } /* ucunianie długich wartości */ else if ( $column['cut'] ) { echo ''; echo htmlspecialchars( mb_substr( $row[ $column['db'] ], 0, $column['cut'], 'UTF-8' ) ); if ( mb_strlen( $row[ $column['db'] ], 'UTF-8' ) > $column['cut'] ) echo '...'; echo ''; } else if ( $column['php'] ) { eval( $_SESSION[ 'g' . $g_table ] -> convertString( $column['php'], $row ) ); } /* zwykla wartość */ else echo $row[ $column['db'] ]; } echo '' . '' . '' . '' . '' . '' . '' . '' . '
' . $this -> values['empty_txt'] . '
'; if ( !empty( $this -> values['summary'][ $column['db'] ] ) ) echo '
Σ: ' . $this -> values['summary'][ $column['db'] ] . '
'; echo '
values['results'] ) and $this -> values['show_paging'] === true ):?>
values['count'] / $this -> values['limit'] );?>
Wyświetlaj rekordów