$groups){ $groups_id[] = $groups['id_grupo']; } //$sql = "SELECT * FROM tnetflow_report WHERE 'group' IN (\"".implode('","',$groups_id)."\")"; $sql = "SELECT * FROM tnetflow_report WHERE id_group IN (".implode(',',$groups_id).")"; $reports = db_get_all_rows_sql($sql); if ($reports == false){ $reports = array(); } $table->width = '98%'; $table->head = array (); $table->head[0] = __('Report name'); $table->head[1]= __('Description'); $table->head[2] = __('Group'); $table->style = array (); $table->style[0] = 'font-weight: bold'; $table->align = array (); $table->align[2] = 'center'; $table->size = array (); $table->size[0] = '40%'; $table->size[1] = '40%'; $table->size[2] = '20%'; $table->data = array (); $total_reports = db_get_all_rows_filter ('tnetflow_report', false, 'COUNT(*) AS total'); $total_reports = $total_reports[0]['total']; //ui_pagination ($total_reports, $url); foreach ($reports as $report) { $data = array (); $data[0] = ''.$report['id_name'].''; $data[1] = $report['description']; $group = db_get_value('nombre','tgrupo', 'id_grupo', $report['id_group']); if ($group == '') $group = 'All'; $data[2] = $group; array_push ($table->data, $data); } html_print_table ($table); echo '
"; ?>