,parameter<?php echo $parameter['ID']; ?> .value);"/> </td> </form> </tr> <?php } ?> </tbody> </table> </div> <?php } else { if (!get_published_batch_id() && !get_stopped_batch_id() && !get_calculating_batch_id() && !get_accepted_batch_id()) { ?> <div class="topContent"> <?php echo get_text('Admin_intro'); ?> </div> <?php } } } ?> <div class="middleContent"> <h2><?php echo get_text('List_of_batches');
function accept_calculated_polls($id) { $date = create_date(); $batch = get_calculating_batch_id(); $polls = get_ok_overall_candidate_polls(); if ($polls) { foreach ($polls as $poll) { $reviewer = (int) $poll['Reviewer']; $reviewee = (int) $poll['Reviewee']; mysql_query("INSERT INTO poll (Reviewer, Reviewee, Status, Time_created, Last_update, Batch) VALUES({$reviewer}, {$reviewee}, (SELECT ID FROM poll_status WHERE Name = 'Niet Ingevuld'), '{$date}','{$date}',{$batch})"); echo mysql_error(); } } mysql_query("UPDATE batch SET Status = (SELECT ID FROM batch_status WHERE Name = 'Accepted') WHERE ID = {$id}"); header('Location: admin.php'); }
echo $batch['ID']; ?> "/> <?php if (get_batch_status_name($batch['Status']) == 'Init') { ?> <input type="submit" name="change_batch_status" onclick="change_batchstatus(<?php echo $batch['ID']; ?> , 'Start')" value="<?php echo get_text('Start_phase_1'); ?> " <?php if (get_running1_batch_id() || get_running2_batch_id() || get_calculating_batch_id() || get_accepted_batch_id()) { echo 'disabled="disabled"'; } ?> /> <?php } else { if (get_batch_status_name($batch['Status']) == 'Running1') { ?> <input type="submit" name="change_batch_status" onclick="change_batchstatus(<?php echo $batch['ID']; ?> , 'Calculate')" value="<?php echo get_text('Calculate_polls');