<?php

if(($_POST['act']== 'publish_results_prence')) {
	$id_array = $_POST['result']; // return array
	$id_count = count($_POST['result']); // count array

	for($i=0; $i < $id_count; $i++) {
		$id = $id_array[$i];
		$query = mysqli_query(dbc(),"UPDATE students_results_prence SET status =  0  WHERE `id` = '$id'");
		if(!$query) { die(mysql_error()); }



	//get parameters for re direct



	}


	//the ids for flip back of the





	    $sid = get_sid_from_results_sheet_prence($id);//get school id
		$pid = get_pid_from_results_sheet_prence($id);//get programm id
		$sess_id = get_sess_id_from_results_sheet_prence($id);//get session  id
		$sem_id = get_sem_id_from_results_sheet_prence($id);//get semester id
		$level = get_level_from_results_sheet_prence($id);//get level id



	header("Location: gateway.php?act=view_students_list_form_b2_prence&ses=$sess_id&sem=$sem_id&sid=$sid&pid=$pid&level=$level&is=Successfully Published"); // redirent after deleting view_students_list_form_b2&ses=3&sem=1&sid=4&pid=68&level=I
}
?>
