".$sql."\n"; $columns = array("system", "jobid", "username", "account", "jobname", "nproc", "nodes", "mem_req", "mem_used", "submit_time", "start_time", "end_time", "walltime_req", "walltime", "charges", "queue", "type", "software"); $file_base = $_POST['system']."-joblist-".$_POST['start_date']."-".$_POST['end_date']; // if table if ( isset( $_POST['table'] ) ) { $table_result = db_query($db,$sql); if ( PEAR::isError($table_result) ) { echo "
".$result->getMessage()."\n"; } result_as_table($table_result,$columns); } // if csv if ( isset( $_POST['csv'] ) ) { $csv_result = db_query($db,$sql); result_as_csv($csv_result,$columns,$file_base); } //if xls if ( isset( $_POST['xls'] ) ) { $xls_result = db_query($db,$sql); result_as_xls($xls_result,$columns,$file_base); } // if ods if ( isset( $_POST['ods'] ) ) { $ods_result = db_query($db,$sql); result_as_ods($ods_result,$columns,$file_base); } db_disconnect($db); page_timer(); bookmarkable_url(); } else { begin_form("job-list.php"); system_chooser(); date_fields(); checkbox("Generate HTML table","table",1); checkbox("Generate CSV file","csv"); checkbox("Generate Excel file","xls"); checkbox("Generate ODF files","ods"); end_form(); } page_footer(); ?>