<?php
error_reporting(~E_ALL);
include("config.php");
$mode = $_GET['mode'];
//$cid = $_GET['cid'];
$id = $_GET[id];
$typ = $_GET[typ];



if($typ =="unapprove")
{
 $query1 = sprintf("update manager set permition = '' where id = '%d' ",$id);
if(!($result1=mysql_query($query1))){echo mysql_error($query1); exit;}
header("location:manager-list.php?flag=unapprove"); exit;

}

if($typ =="approve")
{
		
			
		$query = sprintf("update manager set permition = 'approve' where id = '%d' ",$id);
		if(!($result=mysql_query($query))){echo mysql_error($query); exit;}
	
		header("location:manager-list.php");exit;

}
?>