$all_datas[] = $table_row; $csv_content[] = array(html_entity_decode($a_coachs['firstname'], ENT_QUOTES, $charset), html_entity_decode($a_coachs['lastname'], ENT_QUOTES, $charset), $time_on_platform, $last_connection, $nb_courses, $nb_sessions); } if ($tracking_column != 3) { usort($all_datas, 'sort_users'); if ($tracking_direction == 'DESC') { rsort($all_datas); } } if ($export_csv && $tracking_column != 3) { usort($csv_content, 'sort_users'); } foreach ($all_datas as $row) { $table->addRow($row, 'align="right"'); } $table->updateColAttributes(0, array('align' => 'left')); $table->updateColAttributes(1, array('align' => 'left')); $table->updateColAttributes(3, array('align' => 'left')); $table->updateColAttributes(7, array('align' => 'center')); $table->display(); } } // send the csv file if asked if ($export_csv) { ob_end_clean(); /*echo "<pre>"; print_r($csv_content); echo "</pre>";*/ Export::export_table_csv($csv_content, 'reporting_index'); } //footer