$data_con->set_order($default_sort_order); } } $data_con->make_query(); $total_records = $data_con->num_rows; require_once 'paged_result_class.php'; $pager = new paged_result($total_records, $results_per_page); $pager->get_page_data($result_pager, $current_page); $current_page = $pager->current_page; $data_con->set_limit($pager->offset, $pager->records_per_page); if (DEBUG_MODE && isset($print_settings) && $print_settings == TRUE) { echo '<pre>'; echo 'ListView Settings Dump: <br><br>'; echo '<b>$join_clause:</b> <br>' . $join_clause . '<br><br><hr>'; echo '<b>$where_clause:</b> <br>' . $where_clause . '<br><br><hr>'; echo '<b>$lst_fields:</b> <br>' . $lst_fields . '<br><br><hr>'; echo '<b>$arr_fields:</b> <br>'; array_to_source($arr_fields); echo '<br><br><hr>'; echo '<b>$arr_field_labels:</b> '; array_to_source($arr_field_labels); echo '<br><br><hr>'; echo '<b>$lst_filter_fields:</b><br>' . $lst_filter_fields . '<br><br><hr>'; echo '<b>$arr_filter_field_labels:</b> '; array_to_source($arr_filter_field_labels); echo '<br><br><hr>'; echo '<b>$arr_subtext_separators:</b> '; array_to_source($arr_subtext_separators); echo '<br><br><hr>'; echo '</pre>'; }
function array_to_source($array, $print_auto_index = FALSE, $tab_width = 6, $tab_increase = 6, $original_call = TRUE) { //This is like var_export but has some output format controls and output format follows Cobalt standard. if ($original_call) { echo '<pre>'; } if (is_array($array)) { echo "array("; $first_value = TRUE; foreach ($array as $index => $value) { $tab_extra = 0; if ($first_value) { $first_value = FALSE; } else { for ($a = 0; $a < $tab_width; ++$a) { echo ' '; } } if (is_int($index)) { if ($print_auto_index) { echo $index . '=>'; $tab_extra = strlen($index) + 2; } } else { echo "'{$index}'" . '=>'; $tab_extra = strlen($index) + 2; } if (is_array($value)) { array_to_source($value, $print_auto_index, $tab_width + $tab_increase + $tab_extra, $tab_increase, FALSE); } else { echo "'{$value}'," . '<br>'; } } for ($a = 0; $a < $tab_width - 1; ++$a) { echo ' '; } echo ")"; if ($original_call) { echo ';'; } else { echo ',' . '<br>'; } } if ($original_call) { echo '</pre>'; } }