<?php 


if(($_POST['act']== 'unblock_ips')) {
	$id_array = $_POST['ip']; // return array
	$id_count = count($_POST['ip']); // count array
	
	for($i=0; $i < $id_count; $i++) {
		$id = $id_array[$i];
		$query = mysqli_query(dbc(),"UPDATE  `ip_filter`  SET activate = 1 WHERE `id` = '$id'");
		if(!$query) { die(mysql_error()); }
	}
	header("Location: gateway.php?act=view_ip_filter&is=Update done successfully."); // redirent after deleting
}
?>