name." at ".$timestr; page_head( $title ); $alljobs = all_jobs_of_user( $user ); $njobs = mysql_num_rows( $alljobs ); start_table(); if( $njobs ) { if( $njobs > 1 ) row1( "You have ".$njobs." jobs listed !
" ); else row1( "You have ".$njobs." job listed !
" ); end_table(); start_table(); row5( "Job #", "Job submit time", "Job status", "Job name", "Job ID" ); for( $jobindex = 0; $jobindex < $njobs; ++$jobindex ) { $job = mysql_fetch_object( $alljobs ); $workunitquery = mysql_query( "SELECT * FROM workunit WHERE id=".$job -> workunit ); if( $workunitquery ) { $workunit = mysql_fetch_object( $workunitquery ); if( $workunit ) { $prefix = ''; $workunitname = $prefix.workunit_name( $workunit ).''; $status = workunit_status_string( $workunit ); if( $status == "running" ) $status = "".$status.""; if( $status == "queued" ) $status = "".$status.""; if( $status == "ERROR" ) $status = "".$status.""; $jobsubmittime = time_str( $workunit -> create_time ); } else { $workunitname = "WORKUNIT NOT FOUND IN DATABASE"; $status = "UNKNOWN"; $jobsubmittime = "UNKNOWN"; } mysql_free_result( $workunitquery ); } $workunitstring = " workunit.">".$job -> workunit.""; row5( $jobindex+1, $jobsubmittime, $status, $workunitname, $workunitstring ); } } else row1("You have NO jobs listed !
"); end_table(); $max_jobs = max_nr_of_jobs_of_user( $user ); if( $max_jobs > $njobs ) { if( $max_jobs - $njobs > 1 ) $line = 'You can submit '.( $max_jobs - $njobs ).' more jobs: '; else $line = 'You can submit one more job: '; start_table(); row1( "Commands" ); row2( $line, 'Submit a job' ); row2( "", 'Your account' ); row2( "", 'Your computers' ); row2( "", 'Log out' ); end_table(); } else exit_with_text( "You cannot submit any more jobs, you have reached your limit, clean up first !" ); page_tail(); ?>